Bro I understand that their forces were spread out but it didn't take that many soldiers for them to take over cities to begin with. They had a technological advantage over their opponents as they had better ships and cannons.Still. Their army was dispersed all over the globe, they were not concentrated in one area. This is the point that we are trying to make here. Yall make it out as if they have undertaken some grand expedition that required all of their manpower. They were merely toying with the coastal dwellers in Mogadishu, nothing serious man.
I'll tell you what happened... To begin with, it was the lands that my ancestors were dwelling in that they invaded. They ruled my ancestors for a while, this is in our books and oral tradition. I doubt their numbers surpassed triple digits, honestly. They got driven out by a group of fkin Barawanis and Swahili Arabs.
Tristão da Cunha then set his eyes on Ajuran territory, where the battle of Barawa was fought. After a long period of engagement, the Portuguese soldiers burned the city and looted it. However, fierce resistance by the local population and soldiers resulted in the Portuguese's failure to permanently occupy the city, and the inhabitants who had fled to the interior would eventually return and rebuild the city. After Barawa, Tristão would set sail for Mogadishu, which was the richest city on the East African coast.
They came back a while later with a slightly larger troop and managed to occupy the city ultimately leading to a "war" that lasted for a few days:
Ottoman-Somali cooperation against the Portuguese in the Indian Ocean reached a high point in the 1580s when Ajuran clients of the Somali coastal cities began to sympathize with the Arabs and Swahilis under Portuguese rule and sent an envoy to the Turkish corsair Mir Ali Beyfor a joint expedition against the Portuguese.
Think about this. The Portuguese were defeated within a few days... How large do you think their "army" was?
Clearly they weren't too invested in Somalia, otherwise they would have made efficacious use of their manpower.
Check out their capture of Malacca which was one of their most important conquests. It was 1000 Portuguese vs 20000 Malaccans.
https://en.wikipedia.org/wiki/Capture_of_Malacca_(1511)
Have you looked at the population of Portugal? They never had the numbers to invade even if they wanted to.