You must know...
By law, everyone must carry a photo ID at all times. For a foreigner, this means your passport. However, the police will mostly be pragmatic and accept a plastified color photocopy.
Even the most patriotic Brazilian would say that the greatest problem the country faces is crime. Brazil is one of the most criminalised countries of the world, therefore the crime rate is high, even for a developing nation.
Food from street and beach vendors has a bad hygienic reputation in Brazil. The later in the day, the worse it gets. Bottled and canned drinks are safe, although some people will insist on using a straw to avoid contact with the exterior of the container.
Bear in mind the heat and humidity when storing perishable foods.