revanced-manager icon indicating copy to clipboard operation
revanced-manager copied to clipboard

feat: Custom patched APKs store path

Open PalmDevs opened this issue 3 years ago • 1 comments

Type

Functionality

Manager Branch

Flutter

Issue

I don't feel like /data/local/tmp is a good directory to store patched APKs. Even though this directory is never cleaned by Android itself, many rooted apps and optimization scripts do. It's just a minor inconvenience to re-patch everything again if you forgot to back things up.

Feature

Custom patched APKs store path should be a feature. This means you could even store it in external storage (storage cards, etc). Meaning you could do a full factory reset and the patched APK could still be recognized.

Though this may require some changes because of how ReVanced Manager store data of patched apps, it doesn't store it anywhere, but in its data. Causing you to lose some of the patched app's metadata when reinstalling ReVanced Manager. This is made into a separated issue, #285 .

Motivation

Many builders store it elsewhere. Reis' builder for example, stores it in /data/adb/revanced. Which I find easier to access because it's closer to where the mount scripts are (/data/adb/service.d).

Additional context

No response

Acknowledgements

  • [X] I have searched the existing issues and this is a new and no duplicate or related to another open issue.
  • [X] I have written a short but informative title.
  • [x] I filled out all of the requested information in this issue properly.
  • [X] The issue is related solely to the ReVanced Manager

PalmDevs avatar Sep 23 '22 07:09 PalmDevs

If we are going to implement this, I highly recommend using this API

https://developer.android.com/training/data-storage/shared/documents-files#grant-access-directory

This way no additional permission is needed at all.

escape0707 avatar Sep 23 '22 07:09 escape0707