Fix Shizuku Installer profile context issue (#718)#1359
Open
Willie169 wants to merge 1 commit into
Open
Conversation
…ps to the profile where Shizuku is running, ignoring the profile Droid-ify is running in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR fixes #718 where the Shizuku Installer would only install apps to the profile where Shizuku is running, ignoring the profile Droid-ify is running in.
Problem
The original Shizuku Installer used shell commands executed through Shizuku. These commands run in a separate shell process context, which loses the profile information. When Droid-ify runs in a work profile/secondary space/secure folder (via Insular/Island/Shelter/ROM feature etc.), the shell process doesn't know about the profile and installs to the personal profile (user 0) instead.
Solution
Replace the shell-based installation with
ShizukuWorkerfrom re7gog/shizuku_apk_installer, which is also used by Obtainium.Details:
ShizukuWorkerAdapter) to not change the upstreamShizukuWorkerclass.Testing
Tested on Samsung Galaxy S24+ Android 16 with work profile (Insular):
Unit test has same result as before my commit, 33 tests completed, 3 failed.
AI Disclosure
LLM used to assist development and refine wording since I'm new to Kotlin and not a native English speaker.