The German military had few options to successfully defend against the coming Soviet onslaught by early 1945. The vast majority of their armies had been crushed and/or captured elsewhere before this battle, and they were in the final stages of mobilization by the time a defense of Berlin was being planned.
Their only hope of success lay not in actually repelling Soviet attacks, but in delaying them as long as possible and inflicting as many casualties as they could. The last elements of the Volkssturm, the Peoples' Army, was scraped together from the wounded, the very young (10 or 12 years old in some cases) and the very old (often veterans of the First World War).
Fuel was in critically short supply, as was food, but weapons were plentiful, including the Panzerfaust--a simplified bazooka--that was easy to use, transport, manufacture and yet still packed a punch. It could stop a Soviet tank or be used against infantry, and was employed in large numbers during the defense of Berlin.
Roadblocks were set up, bridges dynamited, land mines arrayed at the riverbanks and approaches to the city, and ordinary citizens were "encouraged" to fight by the SS and the Gestapo. Most, however, were war weary and content to ride out the storm in hiding places and basements.
All things considered, the defense went quite well. The city held for over a month and the Soviets lost more than 100,000 soldiers in the offensive. Nothing could stop the inevitable defeat of Germany however.