In front of me I have an Android phone that has been infected with a malware installed as system service. I want to perform a factory reset on this phone, but first I need to make a backup, of course. The phone needs to stay in offline mode, due to the malware.
After making the backup, I want to selectively reinstall the apps and restore their data. For now, I'm assuming that I don't need the APKs, but having them wouldn't hurt.
One thing is that the malware has installed itself as a system service, so can I even trust my backup anymore?
How should I (as a software developer) proceed?
More importantly, how should an ordinary Android user deal with this situation? This means the only allowed tools are those that have a GUI and that have acceptable usability. And, of course, no root access to the phone. Shouldn't Google as the manufactorer of the Android operating system provide these very basic services?
adb backup
(for those apps that allow it). For being able to selectively restore you need to backup every app on your own, preferably by a script like https://codeberg.org/izzy/Adebar. But you will recognize that may be 50% of the apps don't allow backup. – Robert Dec 17 '21 at 18:58adb backup
(which is deprecated, by the way) or the more modernadb shell bmgr
. An ordinary Android user should not have to enable the developer mode just to do a regular backup. – Roland Illig Dec 17 '21 at 19:29