logo头像
Snippet 博客主题

Xposed监听通知消息

参考

配置

修改app/build.gradle

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
}

修改Edit configurations

Run -> Edit configuration

参照 上面 修改 成

1
:app:installDebug

Launch 修改成 Nothing

OK

优化

支付宝打赏 微信打赏

打赏