Skip to content
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

1 issue and 1 suggestion #2

Open
Kylejustknows opened this issue Nov 18, 2021 · 3 comments
Open

1 issue and 1 suggestion #2

Kylejustknows opened this issue Nov 18, 2021 · 3 comments

Comments

@Kylejustknows
Copy link

issue: It seems when the zip gets too large (4GB+), the flasher totally failed. (tons of red errors of signature not correct and file not found.)

suggestion: when flashing, it "unzip" the apk and bunch other information into data/local/tmp/ and app actual data as a tar.gz into data/data/
why don't we put them all in one place like all in " data/local/tmp/" for less messy?
Reason1, if flash failed, the developers know how to clean it up much easier.
Reason2, in the worst scenario, the developer or the user can manually "unzip" the backup.zip to the /tmp and make things works.
Reason3, If the "helper" can also locate/select an "all-in-one" tmp folder in any location, and maybe do some simple unzip work, the migrate+helper can serve as a classic backup+restore combination.

@SayantanRC
Copy link
Member

The 4 GB+ issue has been reported especially if user tries to save in SD card and SD card is in FAT32. This is being looked into.

The reason the tar.gz files are unpacked under /data/data and not under /data/local/tmp is because in some ROMs, the helper failed to move the tar.gz files under /data/data and then extract, the ROMs did not allow the move for some weird reason. So it was decided to directly unpack under /data/data itself from the recovery environment.

Concern 1: Yes cleaning can be messy. But migrate helper can do it without any problem from the "Uninstall App or finalize restore" button. Also after a restore is finished it does take care of those files if they are not already removed.

Concern 2: There is a note in the telegram group (https://t.me/migrateApp) saved as manual_extract which exactly details this step on how to extract everything under /data/local/tmp/migrate_cache. This also includes the tar.gz files under this directory itself and not under /data/data. Migrate helper can detect if tar.gz files are under the migrate_cache directory and move them to /data/data and then extract, or directly extract, whichever works best.

Concern 3: As explained above, the helper can perform the operation from migrate_cache under tmp if required.

@Kylejustknows
Copy link
Author

Sorry if waste your time I am not in the telegram currently, the issues may have already been discussed there I wasn't aware.

4GB+ issue more details:
A modern phone, no external sdcard, all partition f2fs or ext4. My backup was a big zip, 30GB+. The big.zip is later hash checked on PC side with no data error. The flasher "sees" all the small files inside the big.zip, but gives a signature check error to every single small file.

I eventually slowly figured out the working logic of migrate (re-packed some apps into 3GB.zip, and "manually flashed" some apps into the /data)
In the end, all things worked, but it took me like 4~5 hours researching/trying/repacking. :((
(the worst thing is, it passed the "small apps test" at the first, which made people over-confident)

"extract everything under /data/local/tmp/migrate_cache" ------------ I wish I knew this earlier hahaha, good job! Write it down in the flasher help doc please, it is helpful.

"the helper failed to move the tar.gz files under /data/data and then extract, the ROMs did not allow the move for some weird reason" ------------ I remember one of the root file explorers had a similar issue before and solved after some turnings. I will do some digging, and will write back here if find something promising.

Anyway, love the logic of your programming! And thanks for making such a thoughtful tool to the whole dev community! Keep up the good work!

@SayantanRC
Copy link
Member

Yeah... thing is, the flasher uses a unzip binary from opengapps package (I think). So this allows it to directly unzip everything under /data/local/tmp/migrate_cache using a root shell. (Programmatically extracting all files and then moving to tmp folder using root will take far more space). Sooo... that binary might have some trouble..
Flasher does have a lot of problems and I really need experienced people to look into the code. I will release the code later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants