├── .gitignore
├── README.md
├── apk
├── app-debug.apk
└── app-release-unsigned.apk
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── coderpig
│ │ └── cpwechatxposed
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── assets
│ │ └── xposed_init
│ ├── java
│ │ └── com
│ │ │ └── coderpig
│ │ │ └── cpwechatxposed
│ │ │ ├── App.kt
│ │ │ ├── Constants.kt
│ │ │ ├── XposedInit.kt
│ │ │ ├── hook
│ │ │ ├── EmojiGameHook.kt
│ │ │ ├── QYPacketHook.kt
│ │ │ ├── RedPacketHook.kt
│ │ │ ├── RevokeMsgHook.kt
│ │ │ └── StepHook.kt
│ │ │ ├── ui
│ │ │ └── SettingActivity.kt
│ │ │ └── utils
│ │ │ ├── SharedPreferenceUtils.kt
│ │ │ ├── Utils.kt
│ │ │ └── XPrefs.kt
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ └── activity_setting.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── coderpig
│ └── cpwechatxposed
│ └── ExampleUnitTest.java
├── auto_extract_apk.py
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── res
├── head_icon.png
├── project_icon.jpg
├── public_qr_code.jpg
├── robot_qr_code.png
└── screen_shot_1.jpg
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | .DS_Store
3 | .idea/
4 | build/
5 | */build/
6 | *.iml
7 | local.properties
8 | .gradle/
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 使用Xposed Hook微信等APP
11 |
12 |
13 |
14 | **`CPWechatXposed`** 是笔者折腾Xposed插件的一些记录,Xposed通过Hook应用相关的方法来为应用添加一些附加的
15 | 功能。本项目仅用于技术研究学习之用,请勿用于商业用途,所以项目不会做任何适配!只保证在笔者手机上是可以
16 | 正常运行的,代码开源,有问题或者建议欢迎提issues。另外,使用Xposed插件的手机需要root,如果不想root,
17 | 可以自行搜索VirtualXposed和EXposed相关的资料。
18 |
19 |
20 | ## Dev Environment
21 |
22 | - Java 1.8.0_91
23 | - Android Studio 3.3.2
24 | - Machine:Moto xt1085(Android 5.1),Meizu M2 E(Android 6.0.1)
25 |
26 | ## Feature
27 |
28 | 笔者想做,正在做,已经做完的一些功能(可以提需求,但超懒,随缘实现,莫催,顺序不代表优先级!)
29 |
30 | - 1、Hook王者荣耀获取手机系统机型的方法,改为OV系统,以此畅玩高帧率模式(已实现)
31 | - 2、Hook计步传感器,自定义设置倍率1-1000,走1步等于别人走1000步(已实现)
32 | - 3、Hook微信猜拳和投骰子,想出什么,就出什么(已实现)
33 | - 4、Hook下厨房检测手机是否安装了Xposed的方法,以此去掉恶心的重复弹出警告对话框(已实现)
34 | - 5、Hook微信,实现聊天信息防撤回(已实现)
35 | - 6、Hook微信运动,一键点赞所有好友。
36 | - 7、Hook微信,秒抢红包。
37 | - 8、Hook微信,未读信息清0,小红点强迫症患者福音。
38 | - 9、Hook微信朋友圈,实现防删除,评论防删除。
39 | - 10、Hook微信朋友圈,添加特别关注,特别关注的小姐姐发动态时候,秒赞。
40 | - 11、Hook微信朋友圈假点赞,衣食住行,分享票圈享优惠福音。
41 | - 12、Hook微信,添加不常用群聊分组,把不想看,又不能退的群收纳其中,还你一片净土。
42 | - 13、Hook微信,获取某个好友朋友圈所有的数据。
43 | - 14、Hook微信,突破双端登录限制,实现多个手机登录同一个微信号。
44 | - 15、Hook企业微信,秒抢红包
45 |
46 | ## ScreenShot
47 |
48 | 插件页面截图如下:
49 |
50 | 
51 |
52 | ## Article
53 |
54 | 笔者在折腾Xposed里的一些记录文章,想了解和学习Xposed可以看看研究研究~
55 |
56 |
57 | - [抱歉,Xposed真的可以为所欲为——1.基础知识储备](https://juejin.im/post/5ad9886df265da0b776f3dcb)
58 | - [抱歉,Xposed真的可以为所欲为——2.改为OV机型流畅玩耍高帧率王者农药](https://juejin.im/post/5adafc1ef265da0b83365204)
59 | - [抱歉,Xposed真的可以为所欲为——3.微信运动占领封面出售广告位](https://juejin.im/post/5adf1d846fb9a07abb234015)
60 | - [抱歉,Xposed真的可以为所欲为——4.猜拳投骰子你能赢算我输](https://juejin.im/post/5ae1fe0e518825672a02a248)
61 | - [抱歉,Xposed真的可以为所欲为——5.我自己刷的Xposed凭什么不给我用](https://juejin.im/post/5b167a665188257d86687b22)
62 | - [抱歉,Xposed真的可以为所欲为——6.你的表白撤不回了](https://juejin.im/post/5b2e2ba451882574e94f05eb)
63 |
64 | ## Tips
65 |
66 | >
67 | 对于一些比较大的apk,直接使用jadx反编译的话,很容易直接卡死。笔者采用的方法:
68 | >
69 | - 1、把apk后缀名修改为zip。
70 | - 2、解压某个文件夹中。
71 | - 3、多次调用 **jadx -d 输出目录 dex文件** 去反编译每个dex文件。
72 | - 4、把所有反编译后的文件夹汇总到一个目录下,然后Android Studio打开这个文件夹。
73 | >
74 | > 因为操作比较机械和繁琐,索性用Python写了个批处理脚本,读者只需把工程目录下的
**`auto_extract_apk.py`** 文件和 **需要反编译的apk** 拷贝到 **`jadx\build\jadx\bin`** 目录下,
75 | 如下图所示:
76 | >
77 | > 
78 | >
79 | > 接着终端cd到这个目录下,键入:**`python auto_extract_apk.py`** 执行脚本,等待片刻后
80 | > 反编译后的代码会保存到 **output** 目录下。然后使用Android Studio打开此目录即可。
81 | >
82 | > 因为用到Python,所以需要安装Python环境,关于Python的安装可以移步到:
83 | > [猪行天下之Python基础——1.1 Python开发环境搭建](https://juejin.im/post/5c9f3a04e51d45210203c699)
84 |
85 | ## Join in
86 |
87 | 如果你对Android或Python有兴趣,想一起交流学习可以通过「**机器人**」或「**公众号**」进群~
88 |
89 |
90 |  
91 |
92 |
93 | ## Donate
94 |
95 | 如果觉得本项目对你有所帮助,如果经济条件允许的话,可以请小猪喝杯一点点,你的支持是我完善项目的动力~
96 |
97 |   
98 |
99 |
100 | ## LICENSE
101 |
102 | [GNU General Public License v3.0](http://www.gnu.org/licenses/gpl-3.0.html)
103 |
104 |
105 | [1]: http://static.zybuluo.com/coder-pig/z09hudoorfh43vdj6ijjxryc/2.png
106 | [2]: https://juejin.im/post/5c9f3a04e51d45210203c699
107 |
--------------------------------------------------------------------------------
/apk/app-debug.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/apk/app-debug.apk
--------------------------------------------------------------------------------
/apk/app-release-unsigned.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/apk/app-release-unsigned.apk
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'kotlin-android'
3 | apply plugin: 'kotlin-android-extensions'
4 |
5 | android {
6 | compileSdkVersion 26
7 | buildToolsVersion '28.0.3'
8 | defaultConfig {
9 | applicationId "com.coderpig.cpwechatxposed"
10 | minSdkVersion 19
11 | targetSdkVersion 26
12 | versionCode 1
13 | versionName "1.0"
14 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
15 | }
16 | buildTypes {
17 | release {
18 | minifyEnabled false
19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20 | }
21 | }
22 | }
23 |
24 | dependencies {
25 | implementation fileTree(dir: 'libs', include: ['*.jar'])
26 | implementation 'com.android.support:appcompat-v7:26.1.0'
27 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
28 | testImplementation 'junit:junit:4.12'
29 | implementation "com.orhanobut:hawk:2.0.1"
30 | compileOnly 'de.robv.android.xposed:api:82'
31 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
32 |
33 | }
34 | repositories {
35 | mavenCentral()
36 | }
37 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/coderpig/cpwechatxposed/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.coderpig.cpwechatxposed;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.coderpig.cpwechatxposed", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
13 |
14 |
17 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/assets/xposed_init:
--------------------------------------------------------------------------------
1 | com.coderpig.cpwechatxposed.XposedInit
--------------------------------------------------------------------------------
/app/src/main/java/com/coderpig/cpwechatxposed/App.kt:
--------------------------------------------------------------------------------
1 | package com.coderpig.cpwechatxposed
2 |
3 | import android.app.Application
4 | import com.orhanobut.hawk.Hawk
5 | import kotlin.properties.Delegates
6 |
7 | /**
8 | * 描述:应用的APP类
9 | *
10 | * @author CoderPig on 2018/04/24 15:22.
11 | */
12 | class App : Application() {
13 | companion object {
14 | var instance by Delegates.notNull()
15 | }
16 |
17 | override fun onCreate() {
18 | super.onCreate()
19 | instance = this
20 | }
21 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/coderpig/cpwechatxposed/Constants.kt:
--------------------------------------------------------------------------------
1 | package com.coderpig.cpwechatxposed
2 |
3 | /**
4 | * 描述:相关常量
5 | *
6 | * @author CoderPig on 2018/04/24 15:11.
7 | */
8 | class Constants {
9 | companion object {
10 | val IS_STEP_OPEN = "is_step_open" //是否打开步数助手
11 | val CUR_STEP_MULT = "cur_step_multiple" //步数助手的倍数
12 | val IS_CQ_OPEN = "is_cq_open" //是否打开猜拳助手
13 | val IS_TZ_OPEN = "is_tz_open" //是够打开投骰子助手
14 | val CUR_CQ_NUM = "cur_cq_num" //猜拳数字0,1,2对应剪刀石头布
15 | val CUR_TZ_NUM = "cur_tz_num" //骰子数字0-5,对应1-6点
16 | val IS_WX_FCH_OPEN = "is_wx_fch_open" //是否打开下厨房弹窗屏蔽
17 | }
18 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/coderpig/cpwechatxposed/XposedInit.kt:
--------------------------------------------------------------------------------
1 | package com.coderpig.cpwechatxposed
2 |
3 | import com.coderpig.cpwechatxposed.hook.*
4 | import com.coderpig.cpwechatxposed.utils.SharedPreferenceUtils
5 | import de.robv.android.xposed.IXposedHookLoadPackage
6 | import de.robv.android.xposed.XC_MethodReplacement
7 | import de.robv.android.xposed.XSharedPreferences
8 | import de.robv.android.xposed.XposedHelpers
9 | import de.robv.android.xposed.callbacks.XC_LoadPackage
10 | import kotlin.properties.Delegates
11 |
12 | /**
13 | * 描述:Xposed 处理类
14 | *
15 | * @author CoderPig on 2018/04/24 16:03.
16 | */
17 | class XposedInit : IXposedHookLoadPackage {
18 | companion object {
19 | var xsp by Delegates.notNull()
20 | }
21 |
22 | init {
23 | xsp = SharedPreferenceUtils.getPref()!!
24 | // xsp = XSharedPreferences(BuildConfig.APPLICATION_ID, "config")
25 | // xsp.makeWorldReadable()
26 | }
27 |
28 | @Throws(Throwable::class)
29 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
30 | when (lpparam.packageName) {
31 | //微信相关
32 | "com.tencent.mm" -> {
33 | xsp.reload()
34 | StepHook.hook() //步数助手
35 | EmojiGameHook.hook(lpparam) //猜拳和投骰子助手
36 | RevokeMsgHook.hook(lpparam) //消息防撤回
37 | RedPacketHook.hook(lpparam) //抢红包
38 | }
39 | //Hook掉模块验证方法返回true,验证模块是否生效
40 | "com.coderpig.cpwechatxposed" -> {
41 | XposedHelpers.findAndHookMethod("com.coderpig.cpwechatxposed.ui.SettingActivity",
42 | lpparam.classLoader, "isModuleActive", XC_MethodReplacement.returnConstant(true))
43 | }
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/coderpig/cpwechatxposed/hook/EmojiGameHook.kt:
--------------------------------------------------------------------------------
1 | package com.coderpig.cpwechatxposed.hook
2 |
3 | import com.coderpig.cpwechatxposed.Constants
4 | import com.coderpig.cpwechatxposed.XposedInit.Companion.xsp
5 | import de.robv.android.xposed.XC_MethodHook
6 | import de.robv.android.xposed.XposedHelpers
7 | import de.robv.android.xposed.callbacks.XC_LoadPackage
8 |
9 | /**
10 | * 描述:猜拳和投骰子Hook
11 | *
12 | * @author jay on 2018/4/28 15:42
13 | */
14 | object EmojiGameHook {
15 | fun hook(lpparam: XC_LoadPackage.LoadPackageParam) {
16 | val clazz = XposedHelpers.findClass("com.tencent.mm.sdk.platformtools.bo", lpparam.classLoader)
17 | XposedHelpers.findAndHookMethod(clazz, "gV", Int::class.java, Int::class.java, object : XC_MethodHook() {
18 | override fun afterHookedMethod(param: MethodHookParam) {
19 | xsp.reload()
20 | if (param.args[0] == 2 && xsp.getBoolean(Constants.IS_CQ_OPEN, false))
21 | param.result = xsp.getInt(Constants.CUR_CQ_NUM, 0)
22 | else if (param.args[0] == 5 && xsp.getBoolean(Constants.IS_TZ_OPEN, false))
23 | param.result = xsp.getInt(Constants.CUR_TZ_NUM, 0)
24 | super.afterHookedMethod(param)
25 | }
26 | })
27 | }
28 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/coderpig/cpwechatxposed/hook/QYPacketHook.kt:
--------------------------------------------------------------------------------
1 | package com.coderpig.cpwechatxposed.hook
2 |
3 | /**
4 | * @Author: CoderPig
5 | * @CreateTime: 2019-02-02
6 | * @Description: 企业微信抢红包Hook
7 | */
--------------------------------------------------------------------------------
/app/src/main/java/com/coderpig/cpwechatxposed/hook/RedPacketHook.kt:
--------------------------------------------------------------------------------
1 | package com.coderpig.cpwechatxposed.hook
2 |
3 | import android.content.ContentValues
4 | import android.util.Log
5 | import com.coderpig.cpwechatxposed.Constants
6 | import com.coderpig.cpwechatxposed.XposedInit
7 | import de.robv.android.xposed.XC_MethodHook
8 | import de.robv.android.xposed.XposedHelpers
9 | import de.robv.android.xposed.callbacks.XC_LoadPackage
10 | import android.os.Message
11 |
12 | /**
13 | * @Author: CoderPig
14 | * @CreateTime: 2019-02-02
15 | * @Description: 微信抢红包Hook
16 | */
17 | object RedPacketHook {
18 | fun hook(lpparam: XC_LoadPackage.LoadPackageParam) {
19 | try {
20 | val clazz = XposedHelpers.findClass("com.tencent.wcdb.database.SQLiteDatabase", lpparam.classLoader)
21 | XposedHelpers.findAndHookMethod(clazz, "insert",
22 | String::class.java, String::class.java, ContentValues::class.java,
23 | object : XC_MethodHook() {
24 | override fun beforeHookedMethod(param: MethodHookParam) {
25 | XposedInit.xsp.reload()
26 | Log.e("微信", "更新一条信息~")
27 | Log.e("微信", param.args[0].toString())
28 | Log.e("微信", param.args[1].toString())
29 | for (item in (param.args[2] as ContentValues).valueSet()) {
30 | Log.e("微信", item.key + "==>" + item.value.toString())
31 | }
32 | super.beforeHookedMethod(param)
33 | }
34 | })
35 | } catch (e: Error) {
36 | e.printStackTrace()
37 | } catch (e: Exception) {
38 | e.printStackTrace()
39 | }
40 | }
41 | }
42 |
43 | // if ("digest=[微信红包]" in param.args[1].toString() && "我给你发了一个红包,赶紧去拆!" in param.args[1].toString()) {
44 | // Log.e("微信", "收到微信红包")
45 | // }
--------------------------------------------------------------------------------
/app/src/main/java/com/coderpig/cpwechatxposed/hook/RevokeMsgHook.kt:
--------------------------------------------------------------------------------
1 | package com.coderpig.cpwechatxposed.hook
2 |
3 | import android.content.ContentValues
4 | import android.util.Log
5 | import com.coderpig.cpwechatxposed.Constants
6 | import com.coderpig.cpwechatxposed.XposedInit
7 | import com.coderpig.cpwechatxposed.XposedInit.Companion.xsp
8 | import de.robv.android.xposed.XC_MethodHook
9 | import de.robv.android.xposed.XposedBridge
10 | import de.robv.android.xposed.XposedHelpers
11 | import de.robv.android.xposed.callbacks.XC_LoadPackage
12 | import java.io.File
13 |
14 |
15 | /**
16 | * 描述:微信信息防撤回Hook
17 | *
18 | * @author jay on 2018/6/28 12:28
19 | */
20 | object RevokeMsgHook {
21 |
22 | val msgContainer = mutableMapOf()
23 | var insertAny: Any? = null
24 |
25 | fun hook(lpparam: XC_LoadPackage.LoadPackageParam) {
26 | // Hook 撤回信息的方法
27 | try {
28 | val clazz = XposedHelpers.findClass("com.tencent.wcdb.database.SQLiteDatabase", lpparam.classLoader)
29 | XposedHelpers.findAndHookMethod(clazz, "updateWithOnConflict", String::class.java, ContentValues::class.java,
30 | String::class.java, Array::class.java, Int::class.java, object : XC_MethodHook() {
31 | override fun beforeHookedMethod(param: MethodHookParam) {
32 | xsp.reload()
33 | if (param.args[0] == "message") {
34 | val contentValues = param.args[1] as ContentValues
35 | val content = contentValues.getAsString("content")
36 | if (XposedInit.xsp.getBoolean(Constants.IS_WX_FCH_OPEN, false) && contentValues.getAsInteger("type") == 10000 && content != "你撤回了一条消息") {
37 | val msgId = contentValues.getAsLong("msgId")
38 | val msg = msgContainer[msgId]
39 | XposedHelpers.setObjectField(msg, "field_content", "\uD83D\uDC37 拦截到=== " + content.substring(1, content.indexOf("撤") - 2) + " ===撤回的 \uD83D\uDCA9 ")
40 | XposedHelpers.setIntField(msg, "field_type", contentValues.getAsInteger("type"))
41 | XposedHelpers.setLongField(msg, "field_createTime", XposedHelpers.getLongField(msg, "field_createTime") + 1L)
42 | XposedHelpers.callMethod(insertAny, "c", msg, false)
43 | param.result = 1
44 | }
45 | }
46 | super.beforeHookedMethod(param)
47 | }
48 | })
49 |
50 | // Hook 删除资源文件数据库记录的方法
51 | XposedHelpers.findAndHookMethod(clazz, "delete", String::class.java, String::class.java, Array::class.java, object : XC_MethodHook() {
52 | override fun beforeHookedMethod(param: MethodHookParam) {
53 | val tableName = param.args[0].toString()
54 | if (XposedInit.xsp.getBoolean(Constants.IS_WX_FCH_OPEN, false) && tableName.contains("voiceinfo") || tableName.contains("ImgInfo2") ||
55 | tableName.contains("videoinfo2") || tableName.contains("WxFileIndex2")) {
56 | param.result = 1
57 | }
58 | super.beforeHookedMethod(param)
59 | }
60 | })
61 |
62 | // Hook 删除文件的方法
63 | XposedHelpers.findAndHookMethod(File::class.java, "delete", object : XC_MethodHook() {
64 | override fun beforeHookedMethod(param: MethodHookParam) {
65 | val filePath = (param.thisObject as File).absolutePath
66 | if (XposedInit.xsp.getBoolean(Constants.IS_WX_FCH_OPEN, false) && filePath.contains("/image2/") || filePath.contains("/voice2/") || filePath.contains("/video/")) {
67 | param.result = true
68 | }
69 | super.afterHookedMethod(param)
70 | }
71 | })
72 |
73 | // Hook 插入信息的方法
74 | val cla = XposedHelpers.findClass("com.tencent.mm.storage.bj", lpparam.classLoader)
75 | XposedBridge.hookAllMethods(cla, "c", object : XC_MethodHook() {
76 | override fun afterHookedMethod(param: MethodHookParam) {
77 | insertAny = param.thisObject
78 | val bd = param.args[0]
79 | val field_msgId = XposedHelpers.getLongField(bd, "field_msgId")
80 | msgContainer[field_msgId] = bd
81 | super.afterHookedMethod(param)
82 | }
83 | })
84 |
85 | } catch (e: Error) {
86 | e.printStackTrace()
87 | } catch (e: Exception) {
88 | e.printStackTrace()
89 | }
90 | }
91 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/coderpig/cpwechatxposed/hook/StepHook.kt:
--------------------------------------------------------------------------------
1 | package com.coderpig.cpwechatxposed.hook
2 |
3 | import android.annotation.SuppressLint
4 | import com.coderpig.cpwechatxposed.Constants
5 | import com.coderpig.cpwechatxposed.XposedInit
6 | import com.coderpig.cpwechatxposed.XposedInit.Companion.xsp
7 | import de.robv.android.xposed.XC_MethodHook
8 | import de.robv.android.xposed.XposedBridge
9 |
10 | /**
11 | * 描述:步数Hook
12 | *
13 | * @author jay on 2018/4/28 12:28
14 | */
15 | object StepHook {
16 | @SuppressLint("PrivateApi")
17 | fun hook() {
18 | val c1 = Class.forName("android.hardware.SystemSensorManager\$SensorEventQueue")
19 | XposedBridge.hookAllMethods(c1, "dispatchSensorEvent", object : XC_MethodHook() {
20 | override fun beforeHookedMethod(param: MethodHookParam ) {
21 | xsp.reload()
22 | if (XposedInit.xsp.getBoolean(Constants.IS_STEP_OPEN, false)) {
23 | (param.args[1] as FloatArray)[0] = (param.args[1] as FloatArray)[0] * (xsp.getString(Constants.CUR_STEP_MULT, "1").toInt())
24 | }
25 | super.beforeHookedMethod(param)
26 | }
27 | })
28 | }
29 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/coderpig/cpwechatxposed/ui/SettingActivity.kt:
--------------------------------------------------------------------------------
1 | package com.coderpig.cpwechatxposed.ui
2 |
3 | import android.annotation.SuppressLint
4 | import android.os.Bundle
5 | import android.support.v7.app.AppCompatActivity
6 | import android.widget.SeekBar
7 | import com.coderpig.cpwechatxposed.Constants
8 | import com.coderpig.cpwechatxposed.R
9 | import com.coderpig.cpwechatxposed.utils.SharedPreferenceUtils
10 | import com.coderpig.cpwechatxposed.utils.shortToast
11 | import kotlinx.android.synthetic.main.activity_setting.*
12 |
13 | /**
14 | * 描述:Xposed设置页
15 | *
16 | * @author CoderPig on 2018/04/24 14:45.
17 | */
18 |
19 | class SettingActivity : AppCompatActivity() {
20 | override fun onCreate(savedInstanceState: Bundle?) {
21 | super.onCreate(savedInstanceState)
22 | setContentView(R.layout.activity_setting)
23 | initView()
24 | if (!isModuleActive()) shortToast("Xposed模块未激活!")
25 | }
26 |
27 | @SuppressLint("SetTextI18n")
28 | private fun initView() {
29 | // 步数助手
30 | tv_mutiple.text = ((resources.getString(R.string.cur_multiple) +
31 | (SharedPreferenceUtils.getSP(Constants.CUR_STEP_MULT, "0").toString().toInt() + 1)))
32 | cb_step_switch.isChecked = SharedPreferenceUtils.getSP(Constants.IS_STEP_OPEN, false) as Boolean
33 |
34 | cb_step_switch.setOnCheckedChangeListener { _, isChecked ->
35 | SharedPreferenceUtils.putSP(Constants.IS_STEP_OPEN, isChecked)
36 | }
37 | sb_multiple.progress = SharedPreferenceUtils.getSP(Constants.CUR_STEP_MULT, "1").toString().toInt() + 1
38 | sb_multiple.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
39 | override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
40 | tv_mutiple.text = resources.getString(R.string.cur_multiple) + (progress + 1)
41 | }
42 |
43 | override fun onStartTrackingTouch(seekBar: SeekBar) {}
44 |
45 | override fun onStopTrackingTouch(seekBar: SeekBar) {
46 | SharedPreferenceUtils.putSP(Constants.CUR_STEP_MULT, "" + seekBar.progress)
47 | }
48 | })
49 |
50 | //猜拳助手
51 | cb_cq.isChecked = SharedPreferenceUtils.getSP(Constants.IS_CQ_OPEN, false) as Boolean
52 | when (SharedPreferenceUtils.getSP(Constants.CUR_CQ_NUM, 0)) {
53 | 0 -> rb_jd.isChecked = true
54 | 1 -> rb_st.isChecked = true
55 | 2 -> rb_b.isChecked = true
56 | }
57 | cb_cq.setOnCheckedChangeListener { _, isChecked ->
58 | SharedPreferenceUtils.putSP(Constants.IS_CQ_OPEN, isChecked)
59 | }
60 | rg_cq.setOnCheckedChangeListener { _, checkedId ->
61 | when (checkedId) {
62 | R.id.rb_jd -> SharedPreferenceUtils.putSP(Constants.CUR_CQ_NUM, 0)
63 | R.id.rb_st -> SharedPreferenceUtils.putSP(Constants.CUR_CQ_NUM, 1)
64 | R.id.rb_b -> SharedPreferenceUtils.putSP(Constants.CUR_CQ_NUM, 2)
65 | }
66 | }
67 |
68 | //骰子助手
69 | cb_tz.isChecked = SharedPreferenceUtils.getSP(Constants.IS_TZ_OPEN, false) as Boolean
70 | when (SharedPreferenceUtils.getSP(Constants.CUR_TZ_NUM, 0)) {
71 | 0 -> rb_tz_1.isChecked = true
72 | 1 -> rb_tz_2.isChecked = true
73 | 2 -> rb_tz_3.isChecked = true
74 | 3 -> rb_tz_4.isChecked = true
75 | 4 -> rb_tz_5.isChecked = true
76 | 5 -> rb_tz_6.isChecked = true
77 | }
78 | cb_tz.setOnCheckedChangeListener { _, isChecked ->
79 | SharedPreferenceUtils.putSP(Constants.IS_TZ_OPEN, isChecked)
80 | }
81 |
82 | rg_tz.setOnCheckedChangeListener { _, checkedId ->
83 | when (checkedId) {
84 | R.id.rb_tz_1 -> SharedPreferenceUtils.putSP(Constants.CUR_TZ_NUM, 0)
85 | R.id.rb_tz_2 -> SharedPreferenceUtils.putSP(Constants.CUR_TZ_NUM, 1)
86 | R.id.rb_tz_3 -> SharedPreferenceUtils.putSP(Constants.CUR_TZ_NUM, 2)
87 | R.id.rb_tz_4 -> SharedPreferenceUtils.putSP(Constants.CUR_TZ_NUM, 3)
88 | R.id.rb_tz_5 -> SharedPreferenceUtils.putSP(Constants.CUR_TZ_NUM, 4)
89 | R.id.rb_tz_6 -> SharedPreferenceUtils.putSP(Constants.CUR_TZ_NUM, 5)
90 | }
91 | }
92 |
93 | //微信防撤回
94 | cb_wx_fch.isChecked = SharedPreferenceUtils.getSP(Constants.IS_WX_FCH_OPEN, false) as Boolean
95 | cb_wx_fch.setOnCheckedChangeListener { _, isChecked -> SharedPreferenceUtils.putSP(Constants.IS_WX_FCH_OPEN, isChecked) }
96 | }
97 |
98 |
99 | //判断模块是否生效的方法,XposedInit里把这个方法Hook掉返回true
100 | private fun isModuleActive() = false
101 |
102 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/coderpig/cpwechatxposed/utils/SharedPreferenceUtils.kt:
--------------------------------------------------------------------------------
1 | package com.coderpig.cpwechatxposed.utils
2 |
3 | import android.annotation.SuppressLint
4 | import android.content.Context
5 | import android.preference.PreferenceManager
6 | import com.coderpig.cpwechatxposed.App
7 | import com.coderpig.cpwechatxposed.BuildConfig
8 | import de.robv.android.xposed.XSharedPreferences
9 | import java.io.File
10 | import java.lang.ref.WeakReference
11 |
12 |
13 | /**
14 | * 描述:SharedPreference工具类
15 | *
16 | * @author CoderPig on 2018/04/24 17:00.
17 | */
18 | class SharedPreferenceUtils {
19 | companion object {
20 | var xSharedPreferences: WeakReference = WeakReference(null)
21 |
22 | fun getPref(): XSharedPreferences? {
23 | var preferences = xSharedPreferences.get()
24 | if (preferences == null) {
25 | preferences = XSharedPreferences(BuildConfig.APPLICATION_ID)
26 | preferences.makeWorldReadable()
27 | preferences.reload()
28 | xSharedPreferences = WeakReference(preferences)
29 | } else {
30 | preferences.reload()
31 | }
32 | return preferences
33 | }
34 |
35 |
36 | @SuppressLint("ApplySharedPref")
37 | fun putSP(key: String, value: Any) {
38 | val type = value.javaClass.simpleName
39 | val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(App.instance)
40 | val editor = sharedPreferences?.edit()
41 | when (type) {
42 | "Integer" -> editor?.putInt(key, value as Int)
43 | "Boolean" -> editor?.putBoolean(key, value as Boolean)
44 | "String" -> editor?.putString(key, value as String)
45 | "ADloat" -> editor?.putFloat(key, value as Float)
46 | "Long" -> editor?.putLong(key, value as Long)
47 | }
48 | editor?.apply()
49 | setWorldReadable()
50 | }
51 |
52 | fun getSP(key: String, defValue: Any): Any? {
53 | val type = defValue.javaClass.simpleName
54 | val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(App.instance)
55 | return when (type) {
56 | "Integer" -> sharedPreferences?.getInt(key, defValue as Int)
57 | "Boolean" -> sharedPreferences?.getBoolean(key, defValue as Boolean)
58 | "String" -> sharedPreferences?.getString(key, defValue as String)
59 | "Float" -> sharedPreferences?.getFloat(key, defValue as Float)
60 | "Long" -> sharedPreferences?.getLong(key, defValue as Long)
61 | else -> null
62 | }
63 | }
64 |
65 | @SuppressLint("SetWorldReadable", "WorldReadableFiles")
66 | private fun setWorldReadable() {
67 | val dataDir = File(App.instance.applicationContext.applicationInfo.dataDir)
68 | val prefsDir = File(dataDir, "shared_prefs")
69 | val prefsFile = File(prefsDir, BuildConfig.APPLICATION_ID + "_preferences.xml")
70 | if (prefsFile.exists()) {
71 | for (file in arrayOf(dataDir, prefsDir, prefsFile)) {
72 | file.setReadable(true, false)
73 | file.setExecutable(true, false)
74 | }
75 | }
76 | }
77 |
78 | }
79 |
80 |
81 | }
82 |
--------------------------------------------------------------------------------
/app/src/main/java/com/coderpig/cpwechatxposed/utils/Utils.kt:
--------------------------------------------------------------------------------
1 | package com.coderpig.cpwechatxposed.utils
2 |
3 | import android.widget.Toast
4 | import com.coderpig.cpwechatxposed.App
5 |
6 | /**
7 | * 描述:工具方法扩展文件
8 | *
9 | * @author CoderPig on 2018/04/27 12:26.
10 | */
11 | fun shortToast(msg: String) = Toast.makeText(App.instance, msg, Toast.LENGTH_SHORT).show()
12 |
13 | fun longToast(msg: String) = Toast.makeText(App.instance, msg, Toast.LENGTH_LONG).show()
14 |
15 | inline fun toArray(list: List<*>): Array {
16 | return (list as List).toTypedArray()
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/java/com/coderpig/cpwechatxposed/utils/XPrefs.kt:
--------------------------------------------------------------------------------
1 | package com.coderpig.cpwechatxposed.utils
2 |
3 | import com.coderpig.cpwechatxposed.BuildConfig
4 | import de.robv.android.xposed.XSharedPreferences
5 | import java.lang.ref.WeakReference
6 |
7 |
8 | /**
9 | * @Author: CoderPig
10 | * @Description:
11 | * @Date: Create in 下午 05:31 2019/9/29 0029
12 | */
13 | class XPrefs {
14 | companion object {
15 | var xSharedPreferences: WeakReference = WeakReference(null)
16 |
17 | fun getPref(): XSharedPreferences? {
18 | var preferences = xSharedPreferences.get()
19 | if (preferences == null) {
20 | preferences = XSharedPreferences(BuildConfig.APPLICATION_ID)
21 | preferences.makeWorldReadable()
22 | preferences.reload()
23 | xSharedPreferences = WeakReference(preferences)
24 | } else {
25 | preferences.reload()
26 | }
27 | return preferences
28 | }
29 | }
30 |
31 | fun putSP(key: String, value: Any) {
32 | val type = value.javaClass.simpleName
33 | val sharedPreferences = getPref()
34 | val editor = sharedPreferences?.edit()
35 | when (type) {
36 | "Integer" -> editor?.putInt(key, value as Int)
37 | "Boolean" -> editor?.putBoolean(key, value as Boolean)
38 | "String" -> editor?.putString(key, value as String)
39 | "ADloat" -> editor?.putFloat(key, value as Float)
40 | "Long" -> editor?.putLong(key, value as Long)
41 | }
42 | editor?.apply()
43 | }
44 |
45 | fun getSP(key: String, defValue: Any): Any? {
46 | val type = defValue.javaClass.simpleName
47 | val sharedPreferences = getPref()
48 | return when (type) {
49 | "Integer" -> sharedPreferences?.getInt(key, defValue as Int)
50 | "Boolean" -> sharedPreferences?.getBoolean(key, defValue as Boolean)
51 | "String" -> sharedPreferences?.getString(key, defValue as String)
52 | "Float" -> sharedPreferences?.getFloat(key, defValue as Float)
53 | "Long" -> sharedPreferences?.getLong(key, defValue as Long)
54 | else -> null
55 | }
56 | }
57 |
58 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_setting.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
26 |
27 |
36 |
37 |
50 |
51 |
59 |
60 |
69 |
70 |
71 |
83 |
84 |
91 |
92 |
98 |
99 |
105 |
106 |
107 |
108 |
117 |
118 |
119 |
120 |
121 |
129 |
130 |
131 |
143 |
144 |
151 |
152 |
158 |
159 |
165 |
166 |
172 |
173 |
179 |
180 |
186 |
187 |
188 |
189 |
190 |
199 |
200 |
201 |
209 |
210 |
211 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | CPWechatXposed
3 | 步数助手(1到100倍)
4 | 启用
5 | 禁用
6 | 当前倍数:
7 | 猜拳助手
8 | 剪刀
9 | 石头
10 | 布
11 | 骰子助手
12 | 下厨房Xposed弹窗屏蔽
13 | 微信防撤回
14 | 王者荣耀变OPPO R11
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/test/java/com/coderpig/cpwechatxposed/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.coderpig.cpwechatxposed;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/auto_extract_apk.py:
--------------------------------------------------------------------------------
1 | """
2 | 自动解压apk,批量使用jadx进行反编译,结果代码汇总
3 | """
4 | import os
5 | import zipfile
6 |
7 | temp_output_dir = os.path.join(os.getcwd(), "temp\\") # 解压后文件的临时存储路径
8 | last_output_dir = os.path.join(os.getcwd(), "output\\") # 最后汇总的输出目录
9 |
10 |
11 | # 判断目录是否存在,不存在则创建
12 | def is_dir_existed(path, mkdir=True):
13 | if mkdir:
14 | if not os.path.exists(path):
15 | os.makedirs(path)
16 | else:
17 | return os.path.exists(path)
18 |
19 |
20 | # 获取目录下的所有文件路径
21 | def fetch_all_file(file_dir):
22 | return list(map(lambda x: os.path.join(file_dir, x), os.listdir(file_dir)))
23 |
24 |
25 | # 解压文件到特定路径中
26 | def unzip_file(file_name, output_dir):
27 | print("开始解压文件...")
28 | f = zipfile.ZipFile(file_name, 'r')
29 | for file in f.namelist():
30 | f.extract(file, os.path.join(os.getcwd(), output_dir))
31 | print("文件解压完毕...")
32 |
33 |
34 | if __name__ == '__main__':
35 | # 相关文件夹初始化
36 | is_dir_existed(temp_output_dir)
37 | is_dir_existed(last_output_dir)
38 | # 判断目录中是否存在apk文件
39 | file_path_list = fetch_all_file(os.getcwd())
40 | apk_path = ''
41 | for file_path in file_path_list:
42 | if file_path.endswith('.apk') or file_path.endswith('.zip'):
43 | apk_path = file_path
44 | if apk_path == '':
45 | print("当前目录中没有apk文件,请检查后重试!")
46 | exit(0)
47 | else:
48 | # 修改后缀名
49 | print("修改文件后缀名")
50 | os.rename(apk_path, apk_path.replace(".apk", ".zip"))
51 | # 解压
52 | unzip_file(apk_path.replace(".apk", ".zip"), 'temp\\')
53 | # 获取所有dex后缀的文件路径
54 | file_path_list = fetch_all_file(temp_output_dir)
55 | dex_path_list = [] # dex后缀文件路径列表
56 | for file_path in file_path_list:
57 | if file_path.endswith(".dex"):
58 | dex_path_list.append(file_path)
59 | # 批量反编译到特定文件
60 | print("开始反编译所有dex文件")
61 | for dex in dex_path_list:
62 | os.system(
63 | "jadx -d {0} {1}".format(os.path.join(last_output_dir, dex.split("\\")[-1][:-4]), dex))
64 | print("所有dex文件反编译完毕!")
65 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext.kotlin_version = '1.3.0'
5 |
6 | repositories {
7 | google()
8 | jcenter()
9 | }
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:3.3.0'
12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
13 |
14 | // NOTE: Do not place your application dependencies here; they belong
15 | // in the individual module build.gradle files
16 | }
17 | }
18 |
19 | allprojects {
20 | repositories {
21 | google()
22 | jcenter()
23 | }
24 | }
25 |
26 | task clean(type: Delete) {
27 | delete rootProject.buildDir
28 | }
29 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Jan 31 17:55:02 CST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/res/head_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/res/head_icon.png
--------------------------------------------------------------------------------
/res/project_icon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/res/project_icon.jpg
--------------------------------------------------------------------------------
/res/public_qr_code.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/res/public_qr_code.jpg
--------------------------------------------------------------------------------
/res/robot_qr_code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/res/robot_qr_code.png
--------------------------------------------------------------------------------
/res/screen_shot_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder-pig/CPWechatXposed/c82f2bafa0c2ad0ab65ddacec45abc61961ac9e2/res/screen_shot_1.jpg
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------