This is the sort of challenge that is potentially insurmountable.
First and foremost … though this cartoon was clearly intended to be humorous, your actual situation is much more terrifying than funny. But that just makes the point of the cartoon even more important:
xkcd.com
The countries which are openly known to spy on people’s phones are also known to physically take people’s phones — and, when they return them, they’ve been opened up and had spying tools installed in them that simply can’t be protected against.
Worse, using techniques which might be effective at stopping government spying can also draw attention. You might make your phone government-spy-proof only to make the government really want to spy on you so they can learn what it is you have to hide from them.
Short of urging you to leave your country, I don’t want to give you much in the way of specific advice.
Your safest bet is to not do anything that would make the government upset — but, of course, as an American, I would also hope that citizens of oppressive governments would have the courage to do what is necessary to bring about liberal reform.
How to “fight the good fight” … immediately goes into “spy v spy” territory, something that nobody here knows anything about. Should you openly, brazenly protest? Should you publicly be a model citizen but have a private secret identity? How do you do any of that?
I have no clue, and neither does anybody else here.
The one thing I would note … that “Lockdown Mode” link above describes how people in “safe” countries who are likely to be the target of foreign oppressive governments can have the best chance at avoiding targeted cyberattacks. It turns off a lot of features that we take for granted; it essentially cripples the phone. But it just barely leaves enough features to still do basic, important things. It won’t protect you if somebody can physically take your phone from you. It won’t magically make you invisible to local police. It won’t hide the fact that you’re making it very difficult to be hacked. But if, for example, you’re a foreign journalist outside an oppressive country trying to report on what’s going on inside, it’s the best tool you can get your hands on.
b&