I was in 1 country from the beginning of the year until mid july (this was my source of income for the entire year), then moved to another country in mid july (where i'm still living) but had no income up to the end of the year. How do I address this when answering the questions regarding dates for Bona Fide Residence / Physical Presence Test and the Tax home established dates?
The fact that you lived in two countries does not change the Physical presence test -- it is away from USA that counts.. Thus for the test period ( say ) for 2018, you use 01/01/2018 and 12/31/2018. In this period of 365 days if you stayed away from the USA for at 330 days , you meet the test and therefore eligible for Earned Income Exclusion. You use the country you were in on 12/31/2018 as your tax home.
Does that answer your query or do you need more help ? When you respond, please include the names of the two countries. I am also assuming that you are US citizen/Resident ( Green Card )