Its not sure if he was Albanian. Yes, he was born in Kavala, but there are sources who say that his grandfather and greatgrandfather were born in Konya, and moves to Kavala later on because of a bloodfeud.
He was trained and send to Egypt by the Ottoman Sultan as part of a expedition force to fight against the Napoleonite troops.
Because of his courage, the units there choose him as Wali.
As a Wali, the Sultan ordered him later to come back and smash the Greek uprising. He did and was succesfull.
After that, he lost the Battle of Navarino against the Europeans badly. And the Sultan didnt like that, thats where the feud started with him.