-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow creating a flashable zip file that would restore apps' data #58
Comments
I have to admit, I've no idea how to flush user apps through recovery. Flashing system apps is not a problem but user apps, I've never done that before. If you've any resources on how to do that or any example flashable zip file, please share it here. |
Migrate-generated zips do the following, as far as I know:
Then, after rebooting, the Migrate app can take over the restoration process. I know it it somehow possible to install user apps through recovery mode, though, as some years back i used Titanium Backup to make such a zip, which restored apps from recovery alone. |
I'm not going to follow this scheme as it's not a convenient process. Besides, you can just install AM and restore all your (or selected) apps using batch operations.
If you can find such example, please share it. If it's possible, it will be both easy and convenient process. |
OAndBackupX also has such a feature in its' roadmap so we may try to see if their implementation makes sense for AM. This is the updater-script used in the flashable zip by TB (for an example audio recorder app):
It also, of course, carries with itself a large obfuscated It seems as if PM automatically handled installing apps if they are put in |
That's interesting. I wonder if it's true. It seems somebody wondered about it as well: https://forum.xda-developers.com/showthread.php?t=2017608 |
This creates another problem: How do I restore patched data like the odex file in this method? |
One way would be to make it a two-stage process, wherein the system boots after 1 flash, reboots and reflashes automatically through TWRP, which I think is possible, but might be too unconvenient compared to simple batch restore |
I think if the system detects an app installed at
Another issue that I can think of is the platform dependency. If you patch an app's odex file in arm64, you cannot use the same odex file in x86_64 platform (the One possible solution this problem is to detect the current platform and copy only the apk files (or skip restoring code path in #30) if it's different. |
Seems like the only sensible idea, possibly also show the user a warning at that. |
API 30 made things even more complicated and I don't think it would be appropriate to install (user) packages directly from recovery. The following workflow should work but it might need another reboot after the flash: During flash
After reboot
Complications
There might be other complications which I don't know yet due to lack of experience. |
It'd be nice if AM had a feature that allowed it to create a large flashable zip with all user apps' data that could be flashed when changing ROMs to restore all apps' data quickly and painlessly.
Feature inspired by Migrate
The text was updated successfully, but these errors were encountered: