This is a bash script that automates the process of manually restoring android apps from a TWRP backup. This script was taken from information provided by semipol.
Well, yes. A TWRP data restore reflashes all your andorid app data /data/data. However, if you just completely wiped your phone during a ROM upgrade or change, you may not want to/ be able to restore all your applications.
This script allows you to semi-automate the manaul restore process, so you can be selective about what applications you restore.
- Unzip data.ext4 volumes
- Install app on phone
- Connects to phone via adb
- Pushes TWRP app backup /data/data/com.data.app to android app data location /data/data/com.data.app
- Gets the userId for the app
- Changes ownership of app data folders to application via the userId
- Restore the SELinux attributes of the folder