Commit a4c1ddd9 authored by vvb2060's avatar vvb2060 Committed by John Wu

Use uid 2000 to install patched apk

parent ddd51311
......@@ -130,8 +130,7 @@ object PatchAPK {
return false
// Install the application
repack.setReadable(true, false)
if (!Shell.su("pm install $repack").exec().isSuccess)
if (!Shell.su("adb_pm_install $repack").exec().isSuccess)
return false
Config.suManager = pkg.toString()
......
......@@ -85,6 +85,16 @@ EOF
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() {
# Create boolean ISAB
[ -z $SLOT ] && ISAB=false || ISAB=true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment