Can I apply for Schengen visa from German consulate (Germany will be my entry port)though I will be staying for more nights in Poland?

I have booked a package tour for travelling in Europe from Bangalore. My entry port will be Germany where I will be staying for 2 nights and I will be staying in Poland for 3 nights. I want to know if I can apply for Visa from Germany( can apply for Visa in Bangalore) instead of Poland since we have to travel to Mumbai from Bangalore in order apply for Visa.