1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| // 每次修改运行后自动让 VXP 中的模块`即时生效` ,需要将 (Debug Configurations) - Before Launch - Gradle aware Make - 修改为 :app:installDebug afterEvaluate { installDebug.doLast { updateVirtualXposedAPP.execute() rebootVirtualXposedAPP.execute() launchVirtualXposedAPP.execute() } } // 更新 VXP 中的 app task updateVirtualXposedAPP(type: Exec) { def pkg = android.defaultConfig.applicationId commandLine android.adbExecutable, 'shell', 'am', 'broadcast', '-a', 'io.va.exposed.CMD', '-e', 'cmd', 'update', '-e', 'pkg', pkg } // 重启 VXP task rebootVirtualXposedAPP(type: Exec) { commandLine android.adbExecutable, 'shell', 'am', 'broadcast', '-a', 'io.va.exposed.CMD', '-e', 'cmd', 'reboot' } // 重启 VXP 微信 task launchVirtualXposedAPP(type: Exec) { def pkg = 'com.tencent.mm' commandLine android.adbExecutable, 'shell', 'am', 'broadcast', '-a', 'io.va.exposed.CMD', '-e', 'cmd', 'launch', '-e', 'pkg', pkg }
|