Thank you for your very interesting question. The answer is that you are only partly right. Let me explain.
Under the Lusophone Community Convention, and other bilateral agreements between Brazil and Portugal, Brazilian citizens may indeed enter in Portugal visa free, but only up to 90 days in any 180 days period. In order to get residence, Brazilians also need a residence permit, like all other non-EU citizens.
However, once a person with Brazil citizenship has acquired a residence permit in Portugal under the normal rules, they may apply (and it is immediately granted) for the status of "equal rights and obligations". The status of equal rights and obligations allows Brazilians to enjoy the same rights as Portuguese citizens, especially to hold positions in the civil service which are not predominantly technical (for example, as a judge or a policeman). A Brazilian with this status is only prevented from having the right to diplomatic protection and from holding political positions, serving in the armed forces or diplomatic corps (arts. 15-16 of Decree-Law 154/2003). Brazilians who only have a general status of equal rights and obligations (without equal political rights) may vote and stand for elections in local elections in accordance with art. 15 (4) of the Constitution.
After 3 years' legal residence, a Brazilian may apply for the status of "equal political rights". Brazilian citizens, who have been living in Portugal for over three years and have the status of equal political rights, enjoy practically the same rights as the Portuguese (with the above mentioned exceptions), without losing their Brazilian citizenship and without needing to acquire Portuguese citizenship. In particular, they have access to non-technical posts in the civil service; can be elected to parliament, as mayor, or serve as government ministers. This status enables Brazilian citizens to fully exercise their political rights, and notably to vote and stand for election in local, regional and general elections, with the exception of noting or standing for election in presidential elections. This status is only conferred on Brazilians who have previously or simultaneously acquired the status of equal rights and obligations (art. 2(1) of Decree-Law 154/2003) and as long as they have lived in Portugal with a residence permit for at least three years (art. 17 of the 2000 Treaty of Friendship and art. 5(2) of Decree-Law 154/2003).
Please note that from the point of view of EU law, the two statuses above are not equivalent to EU citizenship!
After 6 years' residence, a Brazilian may apply for Portuguese citizenship.
I should say that the 3 years' rule existed until 2006, and also that if you have ancestors (up to grandparents) who were Portuguese citizens and never lost the citizenship, you may qualify for expedited citizenship. But otherwise, the rules explained above apply.
I hope my answer was useful and look forward to your rating, which is essential to my activity.
Dr I L Vlad