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

"Hide the Magisk App" fails without "Install Unknown Apps" permission #4960

Closed
huw0 opened this issue Nov 20, 2021 · 11 comments · Fixed by #5027
Closed

"Hide the Magisk App" fails without "Install Unknown Apps" permission #4960

huw0 opened this issue Nov 20, 2021 · 11 comments · Fixed by #5027
Assignees
Labels
confirmed Issue confirmed to exist and the reason is known

Comments

@huw0
Copy link

huw0 commented Nov 20, 2021

"Hide the Magisk App" fails if Magisk Manager does not have permission to "Install Unknown Apps". There is no prompt that this functionality is missing. Instead the hidden app is in a half-installed state where there is a launcher icon but it cannot be launched.

Magisk Manager should check that it has this permission before attempting to hide.

This permission prompt for this successfully appears when updating (or reinstalling) Magisk Manager from within Magisk Manager. After this the "Hide the Magisk App" function works successfully.

Device: Pixel 5
Android version: 11
Magisk version name: 23014
Magisk version code: 23014

@huw0 huw0 changed the title "Hide the Magisk App" fails "Hide the Magisk App" fails without "Install Unknown Apps" permission Nov 20, 2021
@osm0sis osm0sis added the confirmed Issue confirmed to exist and the reason is known label Nov 23, 2021
@vvb2060
Copy link
Collaborator

vvb2060 commented Nov 24, 2021

@osm0sis Can you reproduce it?

@osm0sis
Copy link
Collaborator

osm0sis commented Nov 24, 2021

On MIUI I definitely can

@vvb2060
Copy link
Collaborator

vvb2060 commented Nov 24, 2021

@osm0sis

video_2021-11-24_22-35-06.mp4

@Howard20181
Copy link

@osm0sis

video_2021-11-24_22-35-06.mp4

MIUI 12.5 21.11.23 Nightly
Android 11

@vvb2060
Copy link
Collaborator

vvb2060 commented Nov 24, 2021

video_2021-11-24_22-36-37.mp4

Pixel5 RQ3A.211001.001

@osm0sis
Copy link
Collaborator

osm0sis commented Nov 24, 2021

I'll add my Poco X2 video here later, since we're doing show-and-tell. 😛

@huw0
Copy link
Author

huw0 commented Nov 25, 2021

Probably should've mentioned in the original summary - this is with the latest LineageOS, rather than stock AOSP.
I note one of the videos shows a USB install popup - if it makes a difference I have ADB debug disabled.

@vvb2060
Copy link
Collaborator

vvb2060 commented Nov 25, 2021

No one can reproduce it or provide a valid log.

@vvb2060 vvb2060 closed this as completed Nov 25, 2021
@vvb2060 vvb2060 removed the confirmed Issue confirmed to exist and the reason is known label Nov 25, 2021
@osm0sis osm0sis added the confirmed Issue confirmed to exist and the reason is known label Nov 27, 2021
@osm0sis osm0sis reopened this Nov 27, 2021
@osm0sis
Copy link
Collaborator

osm0sis commented Nov 27, 2021

I can reproduce the issue, repeatedly, with ease.
logcat.log

I can give you logs, but wouldn't be able to fix it myself.

I have a screen recording of the whole process but it's 100mb. I'll upload it to my AFH if you want to inspect it.
https://androidfilehost.com/?fid=7161016148664847413

@vvb2060
Copy link
Collaborator

vvb2060 commented Nov 27, 2021

ActivityManager: Killing 9793:com.topjohnwu.magisk/u0a166 (adj 700): REQUEST_INSTALL_PACKAGES changed.

Granting REQUEST_INSTALL_PACKAGES kills the process and when returning to the app it is already a new process, causing the previously registered install broadcast receiverto be lost.

// Install and auto launch app
APKInstall.registerInstallReceiver(activity, WaitPackageReceiver(pkg, activity))
if (!Shell.su("adb_pm_install $repack").exec().isSuccess)
APKInstall.installHideResult(activity, repack)

@osm0sis
Copy link
Collaborator

osm0sis commented Nov 27, 2021

Added video above. 👍

@vvb2060 vvb2060 self-assigned this Nov 27, 2021
topjohnwu pushed a commit that referenced this issue Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed Issue confirmed to exist and the reason is known
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants