mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 16:07:39 +00:00
AppMigration: put suManager after installation
This commit is contained in:
parent
5b29fefc65
commit
5e6b53e0da
@ -191,11 +191,12 @@ object AppMigration {
|
|||||||
|
|
||||||
// Install and auto launch app
|
// Install and auto launch app
|
||||||
val session = APKInstall.startSession(activity, pkg, onFailure) {
|
val session = APKInstall.startSession(activity, pkg, onFailure) {
|
||||||
|
Config.suManager = pkg
|
||||||
|
Shell.cmd("touch $AppApkPath").exec()
|
||||||
launchApp(activity, pkg)
|
launchApp(activity, pkg)
|
||||||
}
|
}
|
||||||
|
|
||||||
Config.suManager = pkg
|
val cmd = "adb_pm_install $repack $pkg"
|
||||||
val cmd = "touch $AppApkPath; adb_pm_install $repack $pkg"
|
|
||||||
if (Shell.cmd(cmd).exec().isSuccess) return true
|
if (Shell.cmd(cmd).exec().isSuccess) return true
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -240,11 +241,12 @@ object AppMigration {
|
|||||||
}
|
}
|
||||||
val apk = StubApk.current(activity)
|
val apk = StubApk.current(activity)
|
||||||
val session = APKInstall.startSession(activity, APP_PACKAGE_NAME, onFailure) {
|
val session = APKInstall.startSession(activity, APP_PACKAGE_NAME, onFailure) {
|
||||||
|
Config.suManager = ""
|
||||||
|
Shell.cmd("touch $AppApkPath").exec()
|
||||||
launchApp(activity, APP_PACKAGE_NAME)
|
launchApp(activity, APP_PACKAGE_NAME)
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
}
|
}
|
||||||
Config.suManager = ""
|
val cmd = "adb_pm_install $apk $APP_PACKAGE_NAME"
|
||||||
val cmd = "touch $AppApkPath; adb_pm_install $apk $APP_PACKAGE_NAME"
|
|
||||||
if (Shell.cmd(cmd).await().isSuccess) return
|
if (Shell.cmd(cmd).await().isSuccess) return
|
||||||
val success = withContext(Dispatchers.IO) {
|
val success = withContext(Dispatchers.IO) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user