added support for non-root autostart on boot (can be enabled whit the same toggle in settings) #584
+167
−13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Quite a while ago i made a discussion post about a way to have shizuku autorun on non-root devices, this sadly requires a permission that is not allowed to be published on google play, so i made a functions that detects IF shizuku has WRITE_SECURE_PERMISSION or not, so for google play the permission can be removed from the manifest and shizuku will function without error, just without the autorun function working on non-root
on BootCompleteReceiver it checks if device previously connected with adb and if so then its starts a service in the background that turns on wireless debugging (and also disables adb unathourization so over time you wont have to re-pair wireless adb)
permissions are checked and granted on the first time the user pairs shizuku.
I've gotten into some issues regarding memory managments systems like the ones in MIUI that destroy any service that exists, so for these any battery saver mode needs to be disabled, and so is "pause app activity if unused" needs to be turned off, unfortunately I don't know how to work with XML layouts so I'm unable to add any disclaimer regarding this issue, also the toggle in the settings needs to be modified to make it clear that is also works now on non-root. I just don't know how to do that.
Hope this can be a usefull addition to this great app.