mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 20:15:29 +00:00
Temporary disable verification when hiding app
For some reason, Google Play Protect randomly blocks our self-signed repackaged Magisk Manager APKs. Since we are root, the sky is our limit, so yeah, disable package verification temporarily when installing patched APKs, LOLz Close #1979
This commit is contained in:
parent
0b87108174
commit
9d948f2c2b
@ -103,7 +103,7 @@ object PatchAPK {
|
||||
|
||||
// Install the application
|
||||
repack.setReadable(true, false)
|
||||
if (!Shell.su("pm install $repack").exec().isSuccess)
|
||||
if (!Shell.su("force_pm_install $repack").exec().isSuccess)
|
||||
return false
|
||||
|
||||
Config.suManager = pkg
|
||||
|
@ -109,3 +109,13 @@ EOF
|
||||
touch hosts/auto_mount
|
||||
cd /
|
||||
}
|
||||
|
||||
force_pm_install() {
|
||||
local APK=$1
|
||||
local VERIFY=`settings get global package_verifier_enable`
|
||||
[ "$VERIFY" -eq 1 ] && settings set global package_verifier_enable 0
|
||||
pm install -r $APK
|
||||
local res=$?
|
||||
[ "$VERIFY" -eq 1 ] && settings set global package_verifier_enable 1
|
||||
return $res
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user