Rewrite app installation

Fix  #4960
This commit is contained in:
南宫雪珊
2021-12-14 21:20:29 +08:00
committed by GitHub
parent 5a49bd3ac9
commit baa19f0ccf
10 changed files with 160 additions and 395 deletions
+3 -1
View File
@@ -129,9 +129,11 @@ adb_pm_install() {
local tmp=/data/local/tmp/temp.apk
cp -f "$1" $tmp
chmod 644 $tmp
su 2000 -c pm install $tmp || pm install $tmp
su 2000 -c pm install $tmp || pm install $tmp || su 1000 -c pm install $tmp
local res=$?
rm -f $tmp
# Note: change this will kill self
[ $res != 0 ] && appops set "$2" REQUEST_INSTALL_PACKAGES allow
return $res
}