In the 1820s, Brazil keeps the Portuguese colonies

Background from OTL:
In 1807, the Portuguese court fled with British help from Lisbon to Brazil and set up shop in Rio de Janeiro.
In 1815, the United Kingdom of Portugal, Brazil and the Algarves was established. The royal court stayed in Rio.
In 1820, in Portugal merchants and bourgeois started the Liberal revolution. They demanded that Brazil would revert to a Principality (colony) and that the king would return to Portugal. The court did return, but the crown prince stayed in Rio.
In 1822, Brazil declared its independence and established itself as an empire.

Question:
Might it happen that the new Empire of Brazil manages to keep (most of) the former Portuguese colonies in Africa and Asia? Perhaps by splitting them with the UK? That might happen if the revolution in Portugal looks more "jacobin" in character and the royal court stays in Brazil. The royal commander in Portugal was the British Viscount Beresford. If revolutionaries attack or assassinate him, that will certainly turn British opinions against them.
(If Rio remains the capital and royal/imperial residence of an United Brazilian-Portuguese Empire, with all important decisions made in Brazil and Portugal proper relegated to the role of an unruly, revolution-torn overseas possion in Europe, that would certainly also fit the concept.)

Here is the list of Portuguese possessions:
~ Azores and Madeira: I am not sure what their status was at the time. They will stay Portuguese in almost all cases, nonetheless.
~ Capeverdian Islands and Guinea(-Bissau): Might perhaps go to Brazil, but would they even want them save for prestige reasons?
~ Sao Tomé and Príncipe: Interesting for the slave trade, certainly attractive for slave-owning Brazil, but would the British let them have it?
~ Angola and Cabinda: Certainly the most attractive Portuguese possession, practacally the Brazilian counter-coast in Africa. If the get it and not much else, will they move upwards the Congo earlier than OTL explorers?
~ Mozambique: Not that attractive in the 1820s, AFAICT. I don't know if the British might want to get it. Might stay Portuguese.
~ Goa: perhaps an interesting addition to the Bombay Presidency.
~ Timor: Far from Brazilian interests. No idea.
~ Macao: Certainly very attractive for the British. If they acquire it, then Hong Kong will probably never exist.
 
The best scenario for having a Brazil that inherits the Portuguese colonies is to have a rebel Portugal-proper with the royal family resisting in Brazil, never relinquishing the claim to be Kings of Portugal.

IOTL, in Portugal - while they were pissed off for waiting for the king to decide to return - there was talk of nominating the Duke of Cadaval as king, deposing João VI on the grounds that he had abandoned the kingdom.
 
The closest to that occurred in 1825 when one of Dom Pedro I's councillors suggested that Brazil should claim the African colonies. The idea was to keep a good source of slaves. That's all. The Emperor did not bring the idea ahead during the talks for the recognition of the Brazilian independence.
 
It would change a lot. But Portugal needs to rebel against the Braganca to form an republic. While they where able to win in mainland Portugal, the colonies remain loyal to the true Porteguese goverment in Rio de Jeneiro. European powers interfer, The Braganca's renounce there claims of the thrones of Portugal and Algavra. However the colonies will be transferd to newly created Empire of Brazil. Madeira, Azoras will to be elevated to dukedom or earldom in order to be an separate entitie.
 
Top