mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-04-22 15:31:34 +00:00
Use uid 2000 to install patched apk
This commit is contained in:
parent
ddd513110f
commit
a4c1ddd9f2
@ -130,8 +130,7 @@ object PatchAPK {
|
|||||||
return false
|
return false
|
||||||
|
|
||||||
// Install the application
|
// Install the application
|
||||||
repack.setReadable(true, false)
|
if (!Shell.su("adb_pm_install $repack").exec().isSuccess)
|
||||||
if (!Shell.su("pm install $repack").exec().isSuccess)
|
|
||||||
return false
|
return false
|
||||||
|
|
||||||
Config.suManager = pkg.toString()
|
Config.suManager = pkg.toString()
|
||||||
|
@ -85,6 +85,16 @@ EOF
|
|||||||
cd /
|
cd /
|
||||||
}
|
}
|
||||||
|
|
||||||
|
adb_pm_install() {
|
||||||
|
local tmp=/data/local/tmp/patched.apk
|
||||||
|
cp -f "$1" $tmp
|
||||||
|
chmod 644 $tmp
|
||||||
|
su 2000 -c pm install $tmp
|
||||||
|
local res=$?
|
||||||
|
rm -f $tmp
|
||||||
|
return $res
|
||||||
|
}
|
||||||
|
|
||||||
check_boot_ramdisk() {
|
check_boot_ramdisk() {
|
||||||
# Create boolean ISAB
|
# Create boolean ISAB
|
||||||
[ -z $SLOT ] && ISAB=false || ISAB=true
|
[ -z $SLOT ] && ISAB=false || ISAB=true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user