revanced-manager
revanced-manager copied to clipboard
fix: Directly save APK to the cache when saving last patched app
~~This should hopefully solve the issue where it can't write the patched app for some reason~~
Instead of copying the APK from the temp patcher directory after patching is complete, the patcher will just save the APK to the directory to begin with.
This needs to be tested before merging. I can't get the original issue to appear.
According to the doc, this change should not make a difference:
https://stackoverflow.com/questions/71823734/what-is-the-difference-between-gettemporarydirectory-and-getapplicationsupport
This needs to be tested before merging. I can't get the original issue to appear.
Does this fix https://github.com/ReVanced/revanced-manager/issues/2224? If yes, you can send me an APK with the changes and I'll test it
@validcube, This PR was marked as ready for review yet there's no review. Maybe you can look into this?
I tested this PR and found two issues
- "Installation cancelled" is fixed, but instead, the patched app is not saved to the last patched app section sometimes.
- When the above issue (1.) occurs, the
tmp-XXXXXX.apkfile (last patched app) is left in the app data and become an orphan file. Since the file names are randomized, it will never be overwritten. There is no way to remove it other than clearing the app data.
I think randomization doesn't really solve the problem.
I found another simple solution, so please check a PR that I will open.
EDITED: I finally found a real cause of this issue. I said "once every two times" at first, but this was wrong. Edited.
@validcube, apart from merge conflicts, is this ready?
Hello!
This PR will be closed as we have transitioned from Flutter to Compose.
🥞 Thanks.