├── LICENSE ├── README.md ├── build.gradle ├── screenshots ├── 00.png ├── 01.png └── 02.png ├── settings.gradle ├── tencentmaplib ├── build.gradle ├── libs │ ├── TencentLocationSdk_v6.2.5.3_r15b3b3cc_20171103_115903.jar │ ├── TencentMapSearch_v1.1.7.1.3e04ee1.jar │ └── tencent_map_sdk_4.0.7.1.9692d6e.jar ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── jniLibs │ ├── arm64-v8a │ ├── libtencentloc.so │ └── libtxmapengine.so │ ├── armeabi-v7a │ ├── libtencentloc.so │ └── libtxmapengine.so │ ├── armeabi │ ├── libtencentloc.so │ └── libtxmapengine.so │ ├── mips64 │ └── libtxmapengine.so │ ├── x86 │ ├── libtencentloc.so │ └── libtxmapengine.so │ └── x86_64 │ ├── libtencentloc.so │ └── libtxmapengine.so └── wechathelper ├── build.gradle ├── proguard-rules.pro └── src └── main ├── AndroidManifest.xml ├── assets └── xposed_init ├── java └── com │ └── wuxiaosu │ └── wechathelper │ ├── Main.java │ ├── activity │ ├── MainActivity.java │ └── TencentMapActivity.java │ ├── base │ └── BaseActivity.java │ ├── bean │ └── LocationSearchSuggestions.java │ └── hook │ ├── EmojiGameHook.java │ ├── MoneyHook.java │ ├── RevokeMsgHook.java │ ├── StepHook.java │ └── TencentLocationManagerHook.java └── res ├── drawable-xhdpi ├── ic_current_location.png └── ic_location_on.png ├── drawable ├── ic_arrow_back.xml ├── ic_done.xml ├── ic_info.xml ├── ic_my_location.xml └── ic_search.xml ├── layout ├── activity_main.xml ├── activity_tencent_map.xml ├── dialog_about_content.xml ├── divider_common.xml └── toolbar_common.xml ├── menu ├── menu_main.xml └── menu_tencent_map.xml ├── mipmap-xhdpi └── ic_launcher.png ├── mipmap-xxhdpi └── ic_launcher.png └── values ├── colors.xml ├── dimens.xml ├── strings.xml └── styles.xml /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # XposedWechatHelper 2 | Xposed 微信辅助模块,实现消息防撤回、运动步数修改、猜拳骰子游戏作弊、零钱余额修改。 3 | ## 效果图 4 | ![00.png](https://raw.githubusercontent.com/wuxiaosu/XposedWechatHelper/master/screenshots/00.png) 5 | ![01.png](https://raw.githubusercontent.com/wuxiaosu/XposedWechatHelper/master/screenshots/01.png) 6 | ![02.png](https://raw.githubusercontent.com/wuxiaosu/XposedWechatHelper/master/screenshots/02.png) 7 | ## 下载 8 | - release from [github](https://github.com/wuxiaosu/XposedWechatHelper/releases) [v1.01](https://github.com/wuxiaosu/XposedWechatHelper/releases/tag/v1.01) 9 | ## v1.01 10 | 增加对6.6.5的支持; 11 | 修复设置初始值错误的问题; 12 | ## v1.0 13 | 支持: 14 | 微信 "6.6.0", "6.6.1", "6.6.2", "6.6.3" -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | google() 7 | jcenter() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:3.0.1' 11 | classpath 'com.jakewharton:butterknife-gradle-plugin:8.4.0' 12 | 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 | maven { 24 | url 'https://raw.githubusercontent.com/wuxiaosu/MvnRepository/master' 25 | } 26 | } 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /screenshots/00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/screenshots/00.png -------------------------------------------------------------------------------- /screenshots/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/screenshots/01.png -------------------------------------------------------------------------------- /screenshots/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/screenshots/02.png -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':tencentmaplib', ':wechathelper' 2 | -------------------------------------------------------------------------------- /tencentmaplib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 26 5 | 6 | defaultConfig { 7 | minSdkVersion 19 8 | targetSdkVersion 26 9 | versionCode 1 10 | versionName "1.0" 11 | 12 | } 13 | 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | 21 | } 22 | 23 | dependencies { 24 | api fileTree(dir: 'libs', include: ['*.jar']) 25 | } 26 | -------------------------------------------------------------------------------- /tencentmaplib/libs/TencentLocationSdk_v6.2.5.3_r15b3b3cc_20171103_115903.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/tencentmaplib/libs/TencentLocationSdk_v6.2.5.3_r15b3b3cc_20171103_115903.jar -------------------------------------------------------------------------------- /tencentmaplib/libs/TencentMapSearch_v1.1.7.1.3e04ee1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/tencentmaplib/libs/TencentMapSearch_v1.1.7.1.3e04ee1.jar -------------------------------------------------------------------------------- /tencentmaplib/libs/tencent_map_sdk_4.0.7.1.9692d6e.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/tencentmaplib/libs/tencent_map_sdk_4.0.7.1.9692d6e.jar -------------------------------------------------------------------------------- /tencentmaplib/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 | -------------------------------------------------------------------------------- /tencentmaplib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /tencentmaplib/src/main/jniLibs/arm64-v8a/libtencentloc.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/tencentmaplib/src/main/jniLibs/arm64-v8a/libtencentloc.so -------------------------------------------------------------------------------- /tencentmaplib/src/main/jniLibs/arm64-v8a/libtxmapengine.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/tencentmaplib/src/main/jniLibs/arm64-v8a/libtxmapengine.so -------------------------------------------------------------------------------- /tencentmaplib/src/main/jniLibs/armeabi-v7a/libtencentloc.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/tencentmaplib/src/main/jniLibs/armeabi-v7a/libtencentloc.so -------------------------------------------------------------------------------- /tencentmaplib/src/main/jniLibs/armeabi-v7a/libtxmapengine.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/tencentmaplib/src/main/jniLibs/armeabi-v7a/libtxmapengine.so -------------------------------------------------------------------------------- /tencentmaplib/src/main/jniLibs/armeabi/libtencentloc.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/tencentmaplib/src/main/jniLibs/armeabi/libtencentloc.so -------------------------------------------------------------------------------- /tencentmaplib/src/main/jniLibs/armeabi/libtxmapengine.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/tencentmaplib/src/main/jniLibs/armeabi/libtxmapengine.so -------------------------------------------------------------------------------- /tencentmaplib/src/main/jniLibs/mips64/libtxmapengine.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/tencentmaplib/src/main/jniLibs/mips64/libtxmapengine.so -------------------------------------------------------------------------------- /tencentmaplib/src/main/jniLibs/x86/libtencentloc.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/tencentmaplib/src/main/jniLibs/x86/libtencentloc.so -------------------------------------------------------------------------------- /tencentmaplib/src/main/jniLibs/x86/libtxmapengine.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/tencentmaplib/src/main/jniLibs/x86/libtxmapengine.so -------------------------------------------------------------------------------- /tencentmaplib/src/main/jniLibs/x86_64/libtencentloc.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/tencentmaplib/src/main/jniLibs/x86_64/libtencentloc.so -------------------------------------------------------------------------------- /tencentmaplib/src/main/jniLibs/x86_64/libtxmapengine.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/tencentmaplib/src/main/jniLibs/x86_64/libtxmapengine.so -------------------------------------------------------------------------------- /wechathelper/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'com.jakewharton.butterknife' 3 | 4 | android { 5 | compileSdkVersion 26 6 | defaultConfig { 7 | applicationId "com.wuxiaosu.wechathelper" 8 | minSdkVersion 21 9 | targetSdkVersion 23 10 | versionCode 2 11 | versionName "1.01" 12 | } 13 | 14 | buildTypes { 15 | release { 16 | minifyEnabled true 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | signingConfig signingConfigs.release 19 | 20 | manifestPlaceholders = [ 21 | TencentMapKey: "WKNBZ-3UU6X-B4D4K-TRLDW-C5NWQ-XSBGZ" 22 | ] 23 | applicationVariants.all { variant -> 24 | variant.outputs.all { output -> 25 | def oldFile = output.outputFile 26 | def newName = oldFile.name 27 | if (variant.buildType.name == 'release') { 28 | newName = oldFile.name.replace(".", "-v" + variant.versionName + '.') 29 | } 30 | outputFileName = newName 31 | } 32 | } 33 | } 34 | 35 | debug { 36 | minifyEnabled true 37 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 38 | manifestPlaceholders = [ 39 | TencentMapKey: "WKNBZ-3UU6X-B4D4K-TRLDW-C5NWQ-XSBGZ" 40 | ] 41 | } 42 | 43 | } 44 | } 45 | 46 | repositories { 47 | flatDir { 48 | dirs 'libs' 49 | } 50 | } 51 | 52 | dependencies { 53 | implementation fileTree(dir: 'libs', include: ['*.jar']) 54 | //noinspection GradleCompatible 55 | implementation 'com.android.support:appcompat-v7:26.1.0' 56 | provided 'de.robv.android.xposed:api:82' 57 | compile 'com.jaeger.statusbarutil:library:1.4.0' 58 | compile 'com.github.arimorty:floatingsearchview:2.1.1' 59 | compile 'com.jakewharton:butterknife:8.8.1' 60 | annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' 61 | compile project(':tencentmaplib') 62 | implementation 'com.github.wuxiaosu:SettingLabelView:1.0@aar' 63 | } 64 | -------------------------------------------------------------------------------- /wechathelper/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 | -keep class com.wuxiaosu.wechathelper.activity.MainActivity { 23 | private static boolean isModuleActive(...); 24 | } 25 | -keep class com.wuxiaosu.wechathelper.Main { 26 | public void handleLoadPackage(...); 27 | } 28 | #腾讯地图 3D sdk 29 | -keep class com.tencent.tencentmap.**{*;} 30 | -keep class com.tencent.map.**{*;} 31 | -keep class com.tencent.beacontmap.**{*;} 32 | -keep class navsns.**{*;} 33 | -dontwarn com.qq.** 34 | -dontwarn com.tencent.beacon.** 35 | 36 | #腾讯地图检索sdk 37 | -keep class com.tencent.lbssearch.**{*;} 38 | -keep class com.google.gson.examples.android.model.** { *; } 39 | 40 | #腾讯地图定位sdk 41 | -keepclassmembers class ** { 42 | public void on*Event(...); 43 | } 44 | -keep class c.t.**{*;} 45 | -keep class com.tencent.map.geolocation.**{*;} 46 | -keep class com.tencent.tencentmap.lbssdk.service.**{*;} 47 | 48 | 49 | -dontwarn org.eclipse.jdt.annotation.** 50 | -dontwarn c.t.** -------------------------------------------------------------------------------- /wechathelper/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 42 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 70 | 73 | 76 | 77 | 80 | 81 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /wechathelper/src/main/assets/xposed_init: -------------------------------------------------------------------------------- 1 | com.wuxiaosu.wechathelper.Main -------------------------------------------------------------------------------- /wechathelper/src/main/java/com/wuxiaosu/wechathelper/Main.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaosu.wechathelper; 2 | 3 | import android.content.Context; 4 | import android.content.ContextWrapper; 5 | import android.content.pm.ApplicationInfo; 6 | import android.content.pm.PackageInfo; 7 | import android.content.pm.PackageManager; 8 | 9 | import com.wuxiaosu.wechathelper.hook.EmojiGameHook; 10 | import com.wuxiaosu.wechathelper.hook.MoneyHook; 11 | import com.wuxiaosu.wechathelper.hook.RevokeMsgHook; 12 | import com.wuxiaosu.wechathelper.hook.StepHook; 13 | import com.wuxiaosu.wechathelper.hook.TencentLocationManagerHook; 14 | 15 | import de.robv.android.xposed.IXposedHookLoadPackage; 16 | import de.robv.android.xposed.XC_MethodHook; 17 | import de.robv.android.xposed.XC_MethodReplacement; 18 | import de.robv.android.xposed.XposedBridge; 19 | import de.robv.android.xposed.XposedHelpers; 20 | import de.robv.android.xposed.callbacks.XC_LoadPackage; 21 | 22 | /** 23 | * Created by su on 2017/12/29. 24 | */ 25 | 26 | public class Main implements IXposedHookLoadPackage { 27 | 28 | @Override 29 | public void handleLoadPackage(final XC_LoadPackage.LoadPackageParam lpparam) throws Throwable { 30 | 31 | if (lpparam.appInfo == null || (lpparam.appInfo.flags & (ApplicationInfo.FLAG_SYSTEM | 32 | ApplicationInfo.FLAG_UPDATED_SYSTEM_APP)) != 0) { 33 | return; 34 | } 35 | 36 | final String packageName = lpparam.packageName; 37 | final String processName = lpparam.processName; 38 | 39 | if (BuildConfig.APPLICATION_ID.equals(packageName)) { 40 | XposedHelpers.findAndHookMethod("com.wuxiaosu.wechathelper.activity.MainActivity", lpparam.classLoader, 41 | "isModuleActive", XC_MethodReplacement.returnConstant(true)); 42 | } 43 | 44 | final String WECHAT_PACKAGE = "com.tencent.mm"; 45 | 46 | if (WECHAT_PACKAGE.equals(packageName)) { 47 | if (WECHAT_PACKAGE.equals(processName)) { 48 | // 只HOOK UI进程 49 | try { 50 | // 由于微信Tinker的存在,hook Application.attach 不如 ContextWrapper.attachBaseContext稳定 51 | // 参见 :https://github.com/Gh0u1L5/WechatMagician/blob/master/src/main/java/com/gh0u1l5/wechatmagician/backend/WechatHook.kt 52 | XposedHelpers.findAndHookMethod(ContextWrapper.class, 53 | "attachBaseContext", 54 | Context.class, new XC_MethodHook() { 55 | @Override 56 | protected void afterHookedMethod(XC_MethodHook.MethodHookParam param) throws Throwable { 57 | super.afterHookedMethod(param); 58 | Context context = (Context) param.args[0]; 59 | ClassLoader appClassLoader = context.getClassLoader(); 60 | handleHook(appClassLoader, 61 | getVersionName(context, "com.tencent.mm")); 62 | } 63 | }); 64 | } catch (Throwable e) { 65 | XposedBridge.log(e); 66 | } 67 | } 68 | } 69 | } 70 | 71 | private void handleHook(ClassLoader classLoader, String versionName) { 72 | new TencentLocationManagerHook(versionName).hook(classLoader); 73 | new EmojiGameHook(versionName).hook(classLoader); 74 | new MoneyHook(versionName).hook(classLoader); 75 | StepHook.hook(classLoader); 76 | RevokeMsgHook.hook(classLoader); 77 | } 78 | 79 | private String getVersionName(Context context, String pkgName) { 80 | try { 81 | PackageManager packageManager = context.getPackageManager(); 82 | PackageInfo packInfo = packageManager.getPackageInfo(pkgName, 0); 83 | return packInfo.versionName; 84 | } catch (PackageManager.NameNotFoundException e) { 85 | e.printStackTrace(); 86 | } 87 | return ""; 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /wechathelper/src/main/java/com/wuxiaosu/wechathelper/activity/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaosu.wechathelper.activity; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.app.AlertDialog; 5 | import android.content.ComponentName; 6 | import android.content.Context; 7 | import android.content.Intent; 8 | import android.content.SharedPreferences; 9 | import android.content.pm.PackageManager; 10 | import android.net.Uri; 11 | import android.os.Bundle; 12 | import android.text.Editable; 13 | import android.text.Html; 14 | import android.text.TextUtils; 15 | import android.text.TextWatcher; 16 | import android.util.Log; 17 | import android.view.LayoutInflater; 18 | import android.view.Menu; 19 | import android.view.MenuItem; 20 | import android.view.View; 21 | import android.widget.CompoundButton; 22 | import android.widget.EditText; 23 | import android.widget.ImageView; 24 | import android.widget.RadioButton; 25 | import android.widget.RadioGroup; 26 | import android.widget.TextView; 27 | import android.widget.Toast; 28 | 29 | import com.wuxiaosu.wechathelper.BuildConfig; 30 | import com.wuxiaosu.wechathelper.R; 31 | import com.wuxiaosu.wechathelper.base.BaseActivity; 32 | import com.wuxiaosu.widget.SettingLabelView; 33 | 34 | import java.util.Arrays; 35 | 36 | import butterknife.BindView; 37 | import butterknife.ButterKnife; 38 | import butterknife.OnClick; 39 | 40 | 41 | public class MainActivity extends BaseActivity { 42 | 43 | @BindView(R.id.et_latitude) 44 | EditText etLatitude; 45 | @BindView(R.id.et_longitude) 46 | EditText etLongitude; 47 | @BindView(R.id.iv_location) 48 | ImageView ivLocation; 49 | @BindView(R.id.et_money) 50 | EditText etMoney; 51 | @BindView(R.id.slv_hide_icon) 52 | SettingLabelView slvHideIcon; 53 | @BindView(R.id.rl_morra) 54 | RadioGroup rlMorra; 55 | @BindView(R.id.rl_dice) 56 | RadioGroup rlDice; 57 | @BindView(R.id.rl_step) 58 | RadioGroup rlStep; 59 | 60 | private final String[] wechatSupportVersions = 61 | new String[]{"6.6.0", "6.6.1", "6.6.2", "6.6.3", "6.6.5"}; 62 | 63 | @Override 64 | protected void onCreate(Bundle savedInstanceState) { 65 | super.onCreate(savedInstanceState); 66 | setContentView(R.layout.activity_main); 67 | ButterKnife.bind(this); 68 | getToolbar().setNavigationIcon(null); 69 | 70 | if (!isModuleActive()) { 71 | Toast.makeText(this, "模块未激活", Toast.LENGTH_SHORT).show(); 72 | } 73 | initView(); 74 | } 75 | 76 | private void initView() { 77 | SharedPreferences sharedPreferences = 78 | getSharedPreferences(SettingLabelView.DEFAULT_PREFERENCES_NAME, Context.MODE_WORLD_READABLE); 79 | 80 | bindPreferences(etLatitude, sharedPreferences, R.string.pre_key_latitude, null); 81 | bindPreferences(etLongitude, sharedPreferences, R.string.pre_key_longitude, null); 82 | bindPreferences(etMoney, sharedPreferences, R.string.pre_key_money, "0.00"); 83 | bindPreferences(rlDice, sharedPreferences, R.string.pre_key_dice, "0"); 84 | bindPreferences(rlMorra, sharedPreferences, R.string.pre_key_morra, "0"); 85 | bindPreferences(rlStep, sharedPreferences, R.string.pre_key_step, "2"); 86 | 87 | slvHideIcon.setCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { 88 | @Override 89 | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { 90 | hideLauncherIcon(isChecked); 91 | } 92 | }); 93 | } 94 | 95 | @OnClick({R.id.iv_location}) 96 | public void onClickListener() { 97 | TencentMapActivity.actionStart(this, 98 | etLatitude.getText().toString(), etLongitude.getText().toString()); 99 | } 100 | 101 | public void hideLauncherIcon(boolean isHide) { 102 | PackageManager packageManager = this.getPackageManager(); 103 | int hide = isHide ? PackageManager.COMPONENT_ENABLED_STATE_DISABLED : PackageManager.COMPONENT_ENABLED_STATE_ENABLED; 104 | packageManager.setComponentEnabledSetting(getAliasComponentName(), hide, PackageManager.DONT_KILL_APP); 105 | } 106 | 107 | private ComponentName getAliasComponentName() { 108 | return new ComponentName(MainActivity.this, "com.wuxiaosu.wechathelper.activity.MainActivity_Alias"); 109 | } 110 | 111 | private void bindPreferences(View view, final SharedPreferences sharedPreferences, final int preStrResId, Object defaultValue) { 112 | if (view instanceof EditText) { 113 | String temp = sharedPreferences.getString(getString(preStrResId), (String) defaultValue); 114 | ((EditText) view).setText(temp); 115 | ((EditText) view).addTextChangedListener(new TextWatcher() { 116 | @Override 117 | public void beforeTextChanged(CharSequence s, int start, int count, int after) { 118 | 119 | } 120 | 121 | @Override 122 | public void onTextChanged(CharSequence s, int start, int before, int count) { 123 | 124 | } 125 | 126 | @Override 127 | public void afterTextChanged(Editable s) { 128 | sharedPreferences.edit().putString(getString(preStrResId), s.toString()).apply(); 129 | } 130 | }); 131 | return; 132 | } 133 | if (view instanceof RadioGroup) { 134 | String temp = sharedPreferences.getString(getString(preStrResId), (String) defaultValue); 135 | if (!TextUtils.isEmpty(temp)) { 136 | sharedPreferences.edit().putString(getString(preStrResId), temp).apply(); 137 | for (int i = 0; i < ((RadioGroup) view).getChildCount(); i++) { 138 | if (((RadioGroup) view).getChildAt(i).getContentDescription().toString().equals(temp)) { 139 | ((RadioButton) ((RadioGroup) view).getChildAt(i)).setChecked(true); 140 | break; 141 | } 142 | } 143 | } 144 | ((RadioGroup) view).setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { 145 | @Override 146 | public void onCheckedChanged(RadioGroup group, int checkedId) { 147 | sharedPreferences.edit().putString(getString(preStrResId), findViewById(checkedId).getContentDescription().toString()).apply(); 148 | } 149 | }); 150 | } 151 | } 152 | 153 | @Override 154 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { 155 | super.onActivityResult(requestCode, resultCode, data); 156 | if (requestCode == TencentMapActivity.REQUEST_CODE && resultCode == RESULT_OK) { 157 | etLatitude.setText(data.getStringExtra(TencentMapActivity.LAT_KEY)); 158 | etLongitude.setText(data.getStringExtra(TencentMapActivity.LON_KEY)); 159 | } 160 | } 161 | 162 | @Override 163 | public boolean onCreateOptionsMenu(Menu menu) { 164 | getMenuInflater().inflate(R.menu.menu_main, menu); 165 | return true; 166 | } 167 | 168 | @Override 169 | public boolean onOptionsItemSelected(MenuItem item) { 170 | int id = item.getItemId(); 171 | if (id == R.id.action_about) { 172 | showInfo(); 173 | } 174 | return super.onOptionsItemSelected(item); 175 | } 176 | 177 | @SuppressLint("SetTextI18n") 178 | private void showInfo() { 179 | View view = LayoutInflater.from(this).inflate(R.layout.dialog_about_content, null); 180 | TextView mTvVersionName = view.findViewById(R.id.tv_version_name); 181 | TextView mTvInfo = view.findViewById(R.id.tv_info); 182 | final TextView mTvUrl = view.findViewById(R.id.tv_url); 183 | mTvUrl.setText(Html.fromHtml("https://github.com/wuxiaosu/XposedWechatHelper")); 184 | mTvUrl.setOnClickListener(new View.OnClickListener() { 185 | @Override 186 | public void onClick(View v) { 187 | sendURLIntent(((TextView) v).getText().toString()); 188 | } 189 | }); 190 | mTvVersionName.setText(getString(R.string.app_name) + " v" + BuildConfig.VERSION_NAME); 191 | mTvInfo.setText(getString(R.string.app_description) 192 | + ",当前版本已支持\n微信:" 193 | + Arrays.toString(wechatSupportVersions) 194 | + "\n更多详情:"); 195 | AlertDialog alertDialog = new AlertDialog.Builder(this) 196 | .setTitle("关于") 197 | .setView(view) 198 | .create(); 199 | alertDialog.show(); 200 | } 201 | 202 | private void sendURLIntent(String url) { 203 | Intent intent = new Intent(); 204 | intent.setAction("android.intent.action.VIEW"); 205 | Uri contentUrl = Uri.parse(url); 206 | intent.setData(contentUrl); 207 | startActivity(intent); 208 | } 209 | 210 | /** 211 | * 模块是否启用 212 | * 213 | * @return 214 | */ 215 | private static boolean isModuleActive() { 216 | Log.i(MainActivity.class.getSimpleName(), "dummy log for hook : " + MainActivity.class); 217 | return false; 218 | } 219 | } 220 | -------------------------------------------------------------------------------- /wechathelper/src/main/java/com/wuxiaosu/wechathelper/activity/TencentMapActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaosu.wechathelper.activity; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.os.Bundle; 6 | import android.support.design.widget.FloatingActionButton; 7 | import android.support.v4.content.ContextCompat; 8 | import android.support.v7.app.AppCompatActivity; 9 | import android.text.Html; 10 | import android.text.TextUtils; 11 | import android.view.MenuItem; 12 | import android.view.View; 13 | import android.view.WindowManager; 14 | import android.widget.ImageView; 15 | import android.widget.TextView; 16 | import android.widget.Toast; 17 | 18 | import com.arlib.floatingsearchview.FloatingSearchView; 19 | import com.arlib.floatingsearchview.suggestions.SearchSuggestionsAdapter; 20 | import com.arlib.floatingsearchview.suggestions.model.SearchSuggestion; 21 | import com.jaeger.library.StatusBarUtil; 22 | import com.tencent.lbssearch.TencentSearch; 23 | import com.tencent.lbssearch.httpresponse.BaseObject; 24 | import com.tencent.lbssearch.httpresponse.HttpResponseListener; 25 | import com.tencent.lbssearch.object.param.SearchParam; 26 | import com.tencent.lbssearch.object.result.SearchResultObject; 27 | import com.tencent.map.geolocation.TencentLocation; 28 | import com.tencent.map.geolocation.TencentLocationListener; 29 | import com.tencent.map.geolocation.TencentLocationManager; 30 | import com.tencent.map.geolocation.TencentLocationRequest; 31 | import com.tencent.tencentmap.mapsdk.maps.CameraUpdate; 32 | import com.tencent.tencentmap.mapsdk.maps.CameraUpdateFactory; 33 | import com.tencent.tencentmap.mapsdk.maps.MapView; 34 | import com.tencent.tencentmap.mapsdk.maps.TencentMap; 35 | import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptorFactory; 36 | import com.tencent.tencentmap.mapsdk.maps.model.CameraPosition; 37 | import com.tencent.tencentmap.mapsdk.maps.model.LatLng; 38 | import com.tencent.tencentmap.mapsdk.maps.model.Marker; 39 | import com.tencent.tencentmap.mapsdk.maps.model.MarkerOptions; 40 | import com.wuxiaosu.wechathelper.R; 41 | import com.wuxiaosu.wechathelper.bean.LocationSearchSuggestions; 42 | 43 | import java.util.ArrayList; 44 | import java.util.List; 45 | 46 | import butterknife.BindView; 47 | import butterknife.ButterKnife; 48 | import butterknife.OnClick; 49 | 50 | public class TencentMapActivity extends AppCompatActivity { 51 | 52 | @BindView(R.id.mapview) 53 | MapView mMapView; 54 | @BindView(R.id.floating_search_view) 55 | FloatingSearchView floatingSearchView; 56 | @BindView(R.id.fb_location) 57 | FloatingActionButton fbLocation; 58 | 59 | private TencentMap mTencentMap; 60 | 61 | private TencentLocationListener mLocationListener; 62 | private TencentLocationManager mLocationManager; 63 | 64 | private boolean isLocation = false; 65 | private Marker mLocationMarker; 66 | private Marker mChooseMarker; 67 | 68 | public final static String LAT_KEY = "lat"; 69 | public final static String LON_KEY = "lon"; 70 | public final static int REQUEST_CODE = 1001; 71 | 72 | @Override 73 | protected void onCreate(Bundle savedInstanceState) { 74 | super.onCreate(savedInstanceState); 75 | setContentView(R.layout.activity_tencent_map); 76 | ButterKnife.bind(this); 77 | StatusBarUtil.setTranslucentForImageView(this, findViewById(R.id.view_need_offset)); 78 | 79 | getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); 80 | 81 | initMap(); 82 | initLocation(); 83 | } 84 | 85 | private void initMap() { 86 | mTencentMap = mMapView.getMap(); 87 | Intent intent = getIntent(); 88 | String lat = intent.getStringExtra(LAT_KEY); 89 | String lon = intent.getStringExtra(LON_KEY); 90 | LatLng latLng = new LatLng(39.908860, 116.397390); //天安门 91 | 92 | if (!TextUtils.isEmpty(lat) && !TextUtils.isEmpty(lon)) { 93 | latLng = new LatLng(Double.valueOf(lat), Double.valueOf(lon)); 94 | addMarker(latLng, false, null); 95 | } 96 | cameraUpdate(latLng); 97 | 98 | mTencentMap.setOnMapClickListener(new TencentMap.OnMapClickListener() { 99 | @Override 100 | public void onMapClick(LatLng latLng) { 101 | addMarker(latLng, false, null); 102 | } 103 | }); 104 | 105 | floatingSearchView.setOnSearchListener(new FloatingSearchView.OnSearchListener() { 106 | @Override 107 | public void onSuggestionClicked(SearchSuggestion searchSuggestion) { 108 | LocationSearchSuggestions suggestions = (LocationSearchSuggestions) searchSuggestion; 109 | addMarker(suggestions.getLatLng(), false, null); 110 | cameraUpdate(suggestions.getLatLng()); 111 | floatingSearchView.clearSuggestions(); 112 | floatingSearchView.clearSearchFocus(); 113 | } 114 | 115 | @Override 116 | public void onSearchAction(String currentQuery) { 117 | } 118 | }); 119 | 120 | floatingSearchView.setOnMenuItemClickListener(new FloatingSearchView.OnMenuItemClickListener() { 121 | @Override 122 | public void onActionMenuItemSelected(MenuItem item) { 123 | poiSearch(floatingSearchView.getQuery()); 124 | } 125 | }); 126 | 127 | floatingSearchView.setOnBindSuggestionCallback(new SearchSuggestionsAdapter.OnBindSuggestionCallback() { 128 | @Override 129 | public void onBindSuggestion(View suggestionView, 130 | ImageView leftIcon, 131 | TextView textView, 132 | SearchSuggestion item, 133 | int itemPosition) { 134 | 135 | LocationSearchSuggestions suggestions = (LocationSearchSuggestions) item; 136 | leftIcon.setImageDrawable(ContextCompat.getDrawable(TencentMapActivity. 137 | this, R.drawable.ic_current_location)); 138 | String key = floatingSearchView.getQuery().split(" ")[1]; 139 | String text = suggestions.getTitle() 140 | .replaceFirst(key, "" + key + "") 141 | + "
" + suggestions.getBody(); 142 | textView.setText(Html.fromHtml(text)); 143 | } 144 | }); 145 | } 146 | 147 | private void poiSearch(String key) { 148 | if (TextUtils.isEmpty(key)) { 149 | return; 150 | } 151 | final String[] strings = key.trim().split(" "); 152 | if (strings.length != 2) { 153 | Toast.makeText(this, "搜索格式错误", Toast.LENGTH_SHORT).show(); 154 | return; 155 | } 156 | SearchParam param = new SearchParam().keyword(strings[1]).boundary(new SearchParam.Region().poi(strings[0])); 157 | TencentSearch tencentSearch = new TencentSearch(this); 158 | tencentSearch.search(param, new HttpResponseListener() { 159 | @Override 160 | public void onSuccess(int i, BaseObject baseObject) { 161 | if (baseObject != null && 162 | ((SearchResultObject) baseObject).data != null && 163 | ((SearchResultObject) baseObject).data.size() != 0) { 164 | 165 | SearchResultObject obj = (SearchResultObject) baseObject; 166 | floatingSearchView.swapSuggestions(searchResultData2SearchSuggestion(obj.data)); 167 | } else { 168 | Toast.makeText(TencentMapActivity.this, "在“" + 169 | strings[0] + "”搜索不到“" + strings[1] + "”", Toast.LENGTH_SHORT).show(); 170 | } 171 | } 172 | 173 | @Override 174 | public void onFailure(int i, String s, Throwable throwable) { 175 | Toast.makeText(TencentMapActivity.this, "搜索错误", Toast.LENGTH_SHORT).show(); 176 | } 177 | }); 178 | } 179 | 180 | private List searchResultData2SearchSuggestion(List data) { 181 | List result = new ArrayList<>(); 182 | for (SearchResultObject.SearchResultData datum : data) { 183 | result.add(new LocationSearchSuggestions(datum.title, datum.address, new LatLng(datum.location.lat, datum.location.lng))); 184 | } 185 | return result; 186 | } 187 | 188 | private void cameraUpdate(LatLng latLng) { 189 | CameraUpdate cameraSigma = 190 | CameraUpdateFactory.newCameraPosition( 191 | new CameraPosition(latLng, 14, 0, 0)); 192 | mTencentMap.moveCamera(cameraSigma); 193 | } 194 | 195 | private void initLocation() { 196 | mLocationManager = TencentLocationManager.getInstance(this); 197 | mLocationListener = new TencentLocationListener() { 198 | @Override 199 | public void onLocationChanged(TencentLocation tencentLocation, int i, String s) { 200 | if (TencentLocation.ERROR_OK == i) { 201 | LatLng latLng = new LatLng(tencentLocation.getLatitude(), tencentLocation.getLongitude()); 202 | addMarker(latLng, isLocation, tencentLocation.getName()); 203 | cameraUpdate(latLng); 204 | } else { 205 | Toast.makeText(TencentMapActivity.this, "定位失败", Toast.LENGTH_SHORT).show(); 206 | } 207 | stopLocation(); 208 | } 209 | 210 | @Override 211 | public void onStatusUpdate(String s, int i, String s1) { 212 | } 213 | }; 214 | } 215 | 216 | private void startLocation() { 217 | isLocation = true; 218 | int error = mLocationManager.requestLocationUpdates(TencentLocationRequest.create(), mLocationListener); 219 | if (error != 0) { 220 | Toast.makeText(TencentMapActivity.this, "定位失败", Toast.LENGTH_SHORT).show(); 221 | isLocation = false; 222 | } 223 | } 224 | 225 | 226 | private void stopLocation() { 227 | isLocation = false; 228 | mLocationManager.removeUpdates(mLocationListener); 229 | } 230 | 231 | /** 232 | * 添加标记 并移除旧的 233 | * 234 | * @param latLng 235 | * @param isLocationMarker 236 | * @return 237 | */ 238 | private void addMarker(LatLng latLng, boolean isLocationMarker, String name) { 239 | MarkerOptions markerOptions = new MarkerOptions(); 240 | markerOptions.icon(BitmapDescriptorFactory.fromResource(isLocationMarker 241 | ? R.drawable.ic_location_on : R.drawable.ic_current_location)); 242 | markerOptions.position(latLng); 243 | markerOptions.snippet(latLng.latitude + "," + latLng.longitude); 244 | if (isLocationMarker) { 245 | markerOptions.title(TextUtils.isEmpty(name) ? "未知" : name); 246 | } 247 | Marker marker = mTencentMap.addMarker(markerOptions); 248 | if (isLocationMarker) { 249 | if (mLocationMarker != null) { 250 | mLocationMarker.remove(); 251 | } 252 | mLocationMarker = marker; 253 | } else { 254 | if (mChooseMarker != null) { 255 | mChooseMarker.remove(); 256 | } 257 | mChooseMarker = marker; 258 | } 259 | } 260 | 261 | @OnClick(R.id.fb_location) 262 | public void onLocation(View view) { 263 | if (!isLocation) { 264 | startLocation(); 265 | } 266 | } 267 | 268 | @OnClick(R.id.fb_done) 269 | public void chooseDone(View view) { 270 | if (mChooseMarker != null) { 271 | Intent result = new Intent(); 272 | result.putExtra(LAT_KEY, String.valueOf(mChooseMarker.getPosition().latitude)); 273 | result.putExtra(LON_KEY, String.valueOf(mChooseMarker.getPosition().longitude)); 274 | setResult(RESULT_OK, result); 275 | } 276 | finish(); 277 | } 278 | 279 | @Override 280 | protected void onDestroy() { 281 | mMapView.onDestroy(); 282 | super.onDestroy(); 283 | } 284 | 285 | @Override 286 | protected void onPause() { 287 | mMapView.onPause(); 288 | super.onPause(); 289 | } 290 | 291 | @Override 292 | protected void onResume() { 293 | mMapView.onResume(); 294 | super.onResume(); 295 | } 296 | 297 | @Override 298 | protected void onStop() { 299 | mMapView.onStop(); 300 | super.onStop(); 301 | } 302 | 303 | public static void actionStart(Activity context, 304 | String lat, String lon) { 305 | Intent intent = new Intent(context, TencentMapActivity.class); 306 | intent.putExtra(TencentMapActivity.LAT_KEY, lat); 307 | intent.putExtra(TencentMapActivity.LON_KEY, lon); 308 | context.startActivityForResult(intent, REQUEST_CODE); 309 | } 310 | } 311 | -------------------------------------------------------------------------------- /wechathelper/src/main/java/com/wuxiaosu/wechathelper/base/BaseActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaosu.wechathelper.base; 2 | 3 | import android.app.ProgressDialog; 4 | import android.content.pm.ActivityInfo; 5 | import android.content.pm.PackageManager; 6 | import android.support.annotation.ColorRes; 7 | import android.support.v4.content.ContextCompat; 8 | import android.support.v7.app.AppCompatActivity; 9 | import android.support.v7.widget.Toolbar; 10 | import android.view.View; 11 | import android.widget.Toast; 12 | 13 | import com.jaeger.library.StatusBarUtil; 14 | import com.wuxiaosu.wechathelper.R; 15 | 16 | import butterknife.ButterKnife; 17 | 18 | /** 19 | * Created by su on 2018/1/7. 20 | */ 21 | 22 | public class BaseActivity extends AppCompatActivity { 23 | 24 | private Toolbar mToolbar; 25 | 26 | @Override 27 | public void setContentView(int layoutResID) { 28 | super.setContentView(layoutResID); 29 | initStatusBar(); 30 | initToolbar(); 31 | ButterKnife.bind(this); 32 | } 33 | 34 | /** 35 | * 初始化状态栏颜色 36 | * 更多详情https://github.com/laobie/StatusBarUtil 37 | */ 38 | protected void initStatusBar() { 39 | if (isStatusBarTransparent()) { 40 | StatusBarUtil.setTransparent(BaseActivity.this); 41 | return; 42 | } 43 | StatusBarUtil.setColor(this, 44 | (ContextCompat.getColor(this, getStatusBarColor())), 0); 45 | } 46 | 47 | /** 48 | * 状态栏是否透明 49 | * 50 | * @return 默认否 51 | */ 52 | protected boolean isStatusBarTransparent() { 53 | return false; 54 | } 55 | 56 | /** 57 | * 状态栏默认颜色,不支持动态修改 58 | * 59 | * @return 状态栏颜色 60 | */ 61 | @ColorRes 62 | protected int getStatusBarColor() { 63 | return R.color.status_bar; 64 | } 65 | 66 | 67 | private void initToolbar() { 68 | mToolbar = findViewById(R.id.toolbar); 69 | if (null == mToolbar) { 70 | return; 71 | } 72 | ActivityInfo mActivityInfo = null; 73 | try { 74 | mActivityInfo = getPackageManager(). 75 | getActivityInfo(this.getComponentName(), PackageManager.GET_META_DATA); 76 | } catch (PackageManager.NameNotFoundException e) { 77 | e.printStackTrace(); 78 | } 79 | // 在 AndroidManifest 中添加 android:label 设置默认标题栏 80 | if (mActivityInfo != null && 0 != mActivityInfo.labelRes) { 81 | mToolbar.setTitle(mActivityInfo.labelRes); 82 | } else { 83 | mToolbar.setTitle(""); 84 | } 85 | setSupportActionBar(mToolbar); 86 | mToolbar.setNavigationIcon(R.drawable.ic_arrow_back); 87 | mToolbar.setNavigationOnClickListener(new View.OnClickListener() { 88 | @Override 89 | public void onClick(View v) { 90 | onBackPressed(); 91 | } 92 | }); 93 | } 94 | 95 | public Toolbar getToolbar() { 96 | return mToolbar; 97 | } 98 | 99 | /** 100 | * 显示状态栏 101 | */ 102 | public void showToolbar() { 103 | getToolbar().setVisibility(View.VISIBLE); 104 | } 105 | 106 | /** 107 | * 隐藏状态栏 108 | */ 109 | public void hideToolbar() { 110 | getToolbar().setVisibility(View.GONE); 111 | } 112 | 113 | private ProgressDialog mProgressDialog; 114 | 115 | /** 116 | * 显示 progress dialog 117 | */ 118 | public void showProgressDialog() { 119 | showProgressDialog("请稍候...", false); 120 | } 121 | 122 | /** 123 | * 显示 progress dialog 124 | * 125 | * @param cancelable 点击空白处是否可以关闭 126 | */ 127 | public void showProgressDialog(boolean cancelable) { 128 | showProgressDialog("请稍候...", cancelable); 129 | } 130 | 131 | /** 132 | * 显示 progress dialog 133 | * 134 | * @param text 135 | * @param cancelable 136 | */ 137 | public void showProgressDialog(String text, boolean cancelable) { 138 | if (null == mProgressDialog) { 139 | mProgressDialog = new ProgressDialog(this); 140 | } 141 | mProgressDialog.setMessage(text); 142 | mProgressDialog.setCancelable(cancelable); 143 | mProgressDialog.show(); 144 | } 145 | 146 | /** 147 | * 关闭 progress dialog 148 | */ 149 | public void dismissProgressDialog() { 150 | if (null != mProgressDialog && mProgressDialog.isShowing()) { 151 | mProgressDialog.dismiss(); 152 | } 153 | } 154 | 155 | /*** 156 | * 双击退出 157 | * 158 | * @param text 159 | */ 160 | protected void exitBy2Click(String text) { 161 | long secondTime = System.currentTimeMillis(); 162 | if (secondTime - firstTime > 2000) { 163 | Toast.makeText(this, text, Toast.LENGTH_SHORT).show(); 164 | firstTime = secondTime; 165 | } else { 166 | finish(); 167 | } 168 | } 169 | 170 | private long firstTime = 0; 171 | } 172 | -------------------------------------------------------------------------------- /wechathelper/src/main/java/com/wuxiaosu/wechathelper/bean/LocationSearchSuggestions.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaosu.wechathelper.bean; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.os.Parcel; 5 | 6 | import com.arlib.floatingsearchview.suggestions.model.SearchSuggestion; 7 | import com.tencent.tencentmap.mapsdk.maps.model.LatLng; 8 | 9 | /** 10 | * Created by su on 2018/3/2. 11 | */ 12 | 13 | @SuppressLint("ParcelCreator") 14 | public class LocationSearchSuggestions implements SearchSuggestion { 15 | 16 | private String title; 17 | private String body; 18 | private LatLng latLng; 19 | 20 | public LocationSearchSuggestions(String title, String body, LatLng latLng) { 21 | this.title = title; 22 | this.body = body; 23 | this.latLng = latLng; 24 | } 25 | 26 | @Override 27 | public String getBody() { 28 | return body; 29 | } 30 | 31 | @Override 32 | public int describeContents() { 33 | return 0; 34 | } 35 | 36 | public String getTitle() { 37 | return title; 38 | } 39 | 40 | public LatLng getLatLng() { 41 | return latLng; 42 | } 43 | 44 | @Override 45 | public void writeToParcel(Parcel dest, int flags) { 46 | dest.writeString(title); 47 | dest.writeString(body); 48 | dest.writeParcelable(latLng, flags); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /wechathelper/src/main/java/com/wuxiaosu/wechathelper/hook/EmojiGameHook.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaosu.wechathelper.hook; 2 | 3 | import com.wuxiaosu.wechathelper.BuildConfig; 4 | import com.wuxiaosu.widget.SettingLabelView; 5 | 6 | import de.robv.android.xposed.XC_MethodHook; 7 | import de.robv.android.xposed.XSharedPreferences; 8 | import de.robv.android.xposed.XposedHelpers; 9 | 10 | /** 11 | * Created by su on 2018/02/06. 12 | * 骰子 猜拳 hook 13 | */ 14 | 15 | public class EmojiGameHook { 16 | private XSharedPreferences xsp; 17 | 18 | private boolean fakeMorra; 19 | private String morra; 20 | private boolean fakeDice; 21 | private String dice; 22 | private String methodName; 23 | private String clazzName; 24 | 25 | public EmojiGameHook(String versionName) { 26 | switch (versionName) { 27 | case "6.6.0": 28 | clazzName = "com.tencent.mm.sdk.platformtools.bh"; 29 | methodName = "em"; 30 | break; 31 | case "6.6.1": 32 | clazzName = "com.tencent.mm.sdk.platformtools.bh"; 33 | methodName = "en"; 34 | break; 35 | case "6.6.2": 36 | clazzName = "com.tencent.mm.sdk.platformtools.bh"; 37 | methodName = "eF"; 38 | break; 39 | case "6.6.3": 40 | clazzName = "com.tencent.mm.sdk.platformtools.bh"; 41 | methodName = "eF"; 42 | break; 43 | default: 44 | case "6.6.5": 45 | clazzName = "com.tencent.mm.sdk.platformtools.bi"; 46 | methodName = "eI"; 47 | break; 48 | } 49 | } 50 | 51 | public void hook(ClassLoader classLoader) { 52 | xsp = new XSharedPreferences(BuildConfig.APPLICATION_ID, SettingLabelView.DEFAULT_PREFERENCES_NAME); 53 | xsp.makeWorldReadable(); 54 | try { 55 | Class clazz = XposedHelpers.findClass(clazzName, classLoader); 56 | XposedHelpers.findAndHookMethod(clazz, methodName, int.class, int.class, new XC_MethodHook() { 57 | @Override 58 | protected void afterHookedMethod(MethodHookParam param) throws Throwable { 59 | int result = (int) param.getResult(); 60 | int type = (int) param.args[0]; 61 | reload(); 62 | switch (type) { 63 | case 5: 64 | if (fakeDice) { 65 | result = Integer.valueOf(dice); 66 | } 67 | break; 68 | case 2: 69 | if (fakeMorra) { 70 | result = Integer.valueOf(morra); 71 | } 72 | break; 73 | } 74 | param.setResult(result); 75 | super.afterHookedMethod(param); 76 | } 77 | }); 78 | } catch (Error | Exception e) { 79 | e.printStackTrace(); 80 | } 81 | } 82 | 83 | private void reload() { 84 | xsp.reload(); 85 | fakeMorra = xsp.getBoolean("fake_morra", false); 86 | fakeDice = xsp.getBoolean("fake_dice", false); 87 | morra = xsp.getString("morra", "0"); 88 | dice = xsp.getString("dice", "0"); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /wechathelper/src/main/java/com/wuxiaosu/wechathelper/hook/MoneyHook.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaosu.wechathelper.hook; 2 | 3 | import android.widget.TextView; 4 | 5 | import com.wuxiaosu.wechathelper.BuildConfig; 6 | import com.wuxiaosu.widget.SettingLabelView; 7 | 8 | import de.robv.android.xposed.XC_MethodHook; 9 | import de.robv.android.xposed.XSharedPreferences; 10 | import de.robv.android.xposed.XposedHelpers; 11 | 12 | import static de.robv.android.xposed.XposedHelpers.getObjectField; 13 | 14 | 15 | /** 16 | * Created by su on 2018/2/05. 17 | * 零钱 hook 18 | */ 19 | 20 | public class MoneyHook { 21 | private static XSharedPreferences xsp; 22 | 23 | private static boolean fakeMoney; 24 | private static String money; 25 | 26 | private String mallIndexUIMethodName; 27 | private String mallIndexUIFiledName; 28 | 29 | private String walletBalanceManagerUIMethodName; 30 | private String walletBalanceManagerUIFiledName; 31 | 32 | public MoneyHook(String versionName) { 33 | switch (versionName) { 34 | //6.6.1 通过 35 | case "6.6.0": 36 | mallIndexUIMethodName = "aSR"; 37 | mallIndexUIFiledName = "nya"; 38 | 39 | walletBalanceManagerUIMethodName = "au"; 40 | walletBalanceManagerUIFiledName = "rFA"; 41 | break; 42 | case "6.6.1": 43 | mallIndexUIMethodName = "aTu"; 44 | mallIndexUIFiledName = "nCe"; 45 | 46 | walletBalanceManagerUIMethodName = "au"; 47 | walletBalanceManagerUIFiledName = "rJK"; 48 | break; 49 | case "6.6.2": 50 | mallIndexUIMethodName = "aYm"; 51 | mallIndexUIFiledName = "olV"; 52 | 53 | walletBalanceManagerUIMethodName = "au"; 54 | walletBalanceManagerUIFiledName = "szP"; 55 | break; 56 | default: 57 | case "6.6.5": 58 | mallIndexUIMethodName = "aYS"; 59 | mallIndexUIFiledName = "orA"; 60 | 61 | walletBalanceManagerUIMethodName = "av"; 62 | walletBalanceManagerUIFiledName = "sFT"; 63 | break; 64 | } 65 | } 66 | 67 | private void reload() { 68 | xsp.reload(); 69 | money = xsp.getString("money", "0.00"); 70 | fakeMoney = xsp.getBoolean("fake_money", false); 71 | } 72 | 73 | public void hook(ClassLoader classLoader) { 74 | xsp = new XSharedPreferences(BuildConfig.APPLICATION_ID, SettingLabelView.DEFAULT_PREFERENCES_NAME); 75 | xsp.makeWorldReadable(); 76 | try { 77 | Class clazz = XposedHelpers.findClass("com.tencent.mm.plugin.mall.ui.MallIndexUI", classLoader); 78 | if (clazz != null) { 79 | XposedHelpers.findAndHookMethod(clazz, mallIndexUIMethodName, new XC_MethodHook() { 80 | @Override 81 | protected void afterHookedMethod(MethodHookParam param) throws Throwable { 82 | reload(); 83 | if (fakeMoney) { 84 | Object object = param.thisObject; 85 | TextView textView = (TextView) getObjectField(object, mallIndexUIFiledName); 86 | textView.setText("¥" + money); 87 | } 88 | super.afterHookedMethod(param); 89 | } 90 | }); 91 | } 92 | 93 | XposedHelpers.findAndHookMethod("com.tencent.mm.plugin.wallet.balance.ui.WalletBalanceManagerUI", classLoader, 94 | walletBalanceManagerUIMethodName, new XC_MethodHook() { 95 | @Override 96 | protected void afterHookedMethod(MethodHookParam param) throws Throwable { 97 | reload(); 98 | if (fakeMoney) { 99 | Object object = param.thisObject; 100 | TextView textView = (TextView) getObjectField(object, walletBalanceManagerUIFiledName); 101 | textView.setText("¥" + money); 102 | } 103 | super.afterHookedMethod(param); 104 | } 105 | }); 106 | } catch (Error | Exception e) { 107 | e.printStackTrace(); 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /wechathelper/src/main/java/com/wuxiaosu/wechathelper/hook/RevokeMsgHook.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaosu.wechathelper.hook; 2 | 3 | import android.content.ContentValues; 4 | import android.util.Log; 5 | 6 | import com.wuxiaosu.wechathelper.BuildConfig; 7 | import com.wuxiaosu.widget.SettingLabelView; 8 | 9 | import java.util.HashMap; 10 | import java.util.Map; 11 | 12 | import de.robv.android.xposed.XC_MethodHook; 13 | import de.robv.android.xposed.XSharedPreferences; 14 | import de.robv.android.xposed.XposedBridge; 15 | import de.robv.android.xposed.XposedHelpers; 16 | 17 | /** 18 | * Created by su on 2018/1/29. 19 | */ 20 | 21 | public class RevokeMsgHook { 22 | 23 | private static Map msgCacheMap = new HashMap<>(); 24 | private static Object storageInsertClazz; 25 | private static XSharedPreferences xsp; 26 | 27 | private static boolean disableRevoke; 28 | 29 | public static void hook(ClassLoader classLoader) { 30 | xsp = new XSharedPreferences(BuildConfig.APPLICATION_ID, SettingLabelView.DEFAULT_PREFERENCES_NAME); 31 | xsp.makeWorldReadable(); 32 | try { 33 | Class clazz = XposedHelpers.findClass("com.tencent.wcdb.database.SQLiteDatabase", classLoader); 34 | XposedHelpers.findAndHookMethod(clazz, "updateWithOnConflict", 35 | String.class, ContentValues.class, String.class, String[].class, int.class, 36 | new XC_MethodHook() { 37 | @Override 38 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable { 39 | if (param.args[0].equals("message")) { 40 | ContentValues contentValues = ((ContentValues) param.args[1]); 41 | reload(); 42 | if (disableRevoke && contentValues.getAsInteger("type") == 10000) { 43 | handleMessageRecall(contentValues); 44 | param.setResult(1); 45 | } 46 | } 47 | super.beforeHookedMethod(param); 48 | } 49 | }); 50 | } catch (Error | Exception e) { 51 | e.printStackTrace(); 52 | } 53 | 54 | try { 55 | // insert method 56 | Class clazz = XposedHelpers.findClass("com.tencent.mm.storage.av", classLoader); 57 | XposedBridge.hookAllMethods(clazz, "b", 58 | new XC_MethodHook() { 59 | @Override 60 | protected void afterHookedMethod(MethodHookParam param) throws Throwable { 61 | storageInsertClazz = param.thisObject; 62 | Object msg = param.args[0]; 63 | long msgId = XposedHelpers.getLongField(msg, "field_msgId"); 64 | msgCacheMap.put(msgId, msg); 65 | super.afterHookedMethod(param); 66 | } 67 | }); 68 | } catch (Error | Exception e) { 69 | e.printStackTrace(); 70 | } 71 | } 72 | 73 | 74 | private static void reload() { 75 | xsp.reload(); 76 | disableRevoke = xsp.getBoolean("disable_revoke", false); 77 | } 78 | 79 | private static void handleMessageRecall(ContentValues contentValues) { 80 | long msgId = contentValues.getAsLong("msgId"); 81 | Object msg = msgCacheMap.get(msgId); 82 | 83 | long createTime = XposedHelpers.getLongField(msg, "field_createTime"); 84 | XposedHelpers.setIntField(msg, "field_type", contentValues.getAsInteger("type")); 85 | XposedHelpers.setObjectField(msg, "field_content", 86 | contentValues.getAsString("content") + "(已被阻止)"); 87 | XposedHelpers.setLongField(msg, "field_createTime", createTime + 1L); 88 | XposedHelpers.callMethod(storageInsertClazz, "b", msg, false); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /wechathelper/src/main/java/com/wuxiaosu/wechathelper/hook/StepHook.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaosu.wechathelper.hook; 2 | 3 | import com.wuxiaosu.wechathelper.BuildConfig; 4 | import com.wuxiaosu.widget.SettingLabelView; 5 | 6 | import de.robv.android.xposed.XC_MethodHook; 7 | import de.robv.android.xposed.XSharedPreferences; 8 | import de.robv.android.xposed.XposedBridge; 9 | import de.robv.android.xposed.XposedHelpers; 10 | 11 | /** 12 | * Created by su on 2018/02/07. 13 | * 运动步数 14 | */ 15 | 16 | public class StepHook { 17 | private static XSharedPreferences xsp; 18 | private static boolean fakeStep; 19 | private static String step; 20 | 21 | public static void hook(ClassLoader classLoader) { 22 | xsp = new XSharedPreferences(BuildConfig.APPLICATION_ID, SettingLabelView.DEFAULT_PREFERENCES_NAME); 23 | xsp.makeWorldReadable(); 24 | 25 | try { 26 | //4.4 nexus 通过 27 | Class clazz = XposedHelpers.findClass("android.hardware.SystemSensorManager$SensorEventQueue", classLoader); 28 | XposedBridge.hookAllMethods(clazz, "dispatchSensorEvent", new XC_MethodHook() { 29 | @Override 30 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable { 31 | reload(); 32 | if (fakeStep) { 33 | ((float[]) param.args[1])[0] = (((float[]) param.args[1])[0]) * Integer.valueOf(step); 34 | } 35 | super.beforeHookedMethod(param); 36 | } 37 | 38 | }); 39 | } catch (Error | Exception e) { 40 | e.printStackTrace(); 41 | } 42 | } 43 | 44 | 45 | private static void reload() { 46 | xsp.reload(); 47 | fakeStep = xsp.getBoolean("fake_step", false); 48 | step = xsp.getString("step", "2"); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /wechathelper/src/main/java/com/wuxiaosu/wechathelper/hook/TencentLocationManagerHook.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaosu.wechathelper.hook; 2 | 3 | import com.wuxiaosu.wechathelper.BuildConfig; 4 | import com.wuxiaosu.widget.SettingLabelView; 5 | 6 | import de.robv.android.xposed.XC_MethodHook; 7 | import de.robv.android.xposed.XSharedPreferences; 8 | import de.robv.android.xposed.XposedBridge; 9 | import de.robv.android.xposed.XposedHelpers; 10 | 11 | /** 12 | * Created by su on 2017/8/30. 13 | * 腾讯定位 hook 14 | */ 15 | 16 | public class TencentLocationManagerHook { 17 | private XSharedPreferences xsp; 18 | 19 | private boolean fakeLocation; 20 | private String latitude; 21 | private String longitude; 22 | 23 | private String methodName; 24 | 25 | public TencentLocationManagerHook(String versionName) { 26 | xsp = new XSharedPreferences(BuildConfig.APPLICATION_ID, SettingLabelView.DEFAULT_PREFERENCES_NAME); 27 | xsp.makeWorldReadable(); 28 | 29 | //6.6.1 6.6.0 通过 30 | if (versionName.startsWith("6.6")) { // 6.6.x 31 | methodName = "a"; 32 | } else if (versionName.startsWith("6.5")) { // 6.5.x 33 | methodName = "b"; 34 | } 35 | } 36 | 37 | public void hook(ClassLoader classLoader) { 38 | try { 39 | Class managerClazz = XposedHelpers.findClass("com.tencent.map.geolocation.TencentLocationManager", classLoader); 40 | XposedBridge.hookAllMethods(managerClazz, "requestLocationUpdates", new XC_MethodHook() { 41 | @Override 42 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable { 43 | Object tencentLocationListener = param.args[1]; 44 | XposedBridge.hookAllMethods(tencentLocationListener.getClass(), methodName, new XC_MethodHook() { 45 | @Override 46 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable { 47 | reload(); 48 | if (fakeLocation) { 49 | param.args[1] = Double.valueOf(latitude); 50 | param.args[2] = Double.valueOf(longitude); 51 | } 52 | super.beforeHookedMethod(param); 53 | } 54 | }); 55 | super.beforeHookedMethod(param); 56 | } 57 | }); 58 | } catch (Error | Exception e) { 59 | e.printStackTrace(); 60 | } 61 | } 62 | 63 | 64 | private void reload() { 65 | xsp.reload(); 66 | fakeLocation = xsp.getBoolean("fake_location", false); 67 | latitude = xsp.getString("latitude", "39.908860"); 68 | longitude = xsp.getString("longitude", "116.397390"); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/drawable-xhdpi/ic_current_location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/wechathelper/src/main/res/drawable-xhdpi/ic_current_location.png -------------------------------------------------------------------------------- /wechathelper/src/main/res/drawable-xhdpi/ic_location_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/wechathelper/src/main/res/drawable-xhdpi/ic_location_on.png -------------------------------------------------------------------------------- /wechathelper/src/main/res/drawable/ic_arrow_back.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/drawable/ic_done.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/drawable/ic_info.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/drawable/ic_my_location.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/drawable/ic_search.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 14 | 15 | 20 | 21 | 26 | 27 | 32 | 33 | 39 | 40 | 46 | 47 | 56 | 57 | 67 | 68 | 69 | 70 | 82 | 83 | 84 | 89 | 90 | 96 | 97 | 107 | 108 | 109 | 110 | 111 | 116 | 117 | 121 | 122 | 126 | 127 | 131 | 132 | 136 | 137 | 138 | 139 | 144 | 145 | 149 | 150 | 154 | 155 | 159 | 160 | 164 | 165 | 169 | 170 | 174 | 175 | 179 | 180 | 181 | 182 | 188 | 189 | 193 | 194 | 198 | 199 | 203 | 204 | 208 | 209 | 213 | 214 | 215 | 216 | 220 | 221 | 222 | 223 | 224 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/layout/activity_tencent_map.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 16 | 17 | 27 | 28 | 29 | 39 | 40 | 50 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/layout/dialog_about_content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 16 | 17 | 23 | 24 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/layout/divider_common.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/layout/toolbar_common.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/menu/menu_tencent_map.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/wechathelper/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /wechathelper/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android-hacker/XposedWechatHelper/ae6cb863ff23ed0b9a1bea3b5ab5b6b1d59e29a6/wechathelper/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /wechathelper/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #4CAF50 4 | #388E3C 5 | #C8E6C9 6 | #009688 7 | 8 | 9 | #F5F4F3 10 | 11 | #388E3C 12 | 13 | 14 | #00000000 15 | 16 | 17 | #e0000000 18 | 19 | 20 | #212121 21 | #757575 22 | 23 | #BDBDBD 24 | 25 | 26 | 27 | #d32f2f 28 | #f44336 29 | #ef9a9a 30 | 31 | 32 | #c2185b 33 | #e91e63 34 | #e48fb1 35 | 36 | 37 | #7b1fa2 38 | #9c27b0 39 | #ce93d8 40 | 41 | 42 | #512da8 43 | #673ab7 44 | #b39ddb 45 | 46 | 47 | #303f9f 48 | #3f51b5 49 | #9fa8da 50 | 51 | 52 | #1976d2 53 | #2196f3 54 | #90caf9 55 | 56 | 57 | #0288d1 58 | #03a9f4 59 | #81d4fa 60 | 61 | 62 | #0097a7 63 | #00bcd4 64 | #80deea 65 | 66 | 67 | #00796b 68 | #009688 69 | #80cbc4 70 | 71 | 72 | #388e3c 73 | #4caf50 74 | #a5d6a7 75 | 76 | 77 | #689f38 78 | #8bc34a 79 | #c5e1a5 80 | 81 | 82 | #afb42b 83 | #cddc39 84 | #e6ee9c 85 | 86 | 87 | #fbc02d 88 | #ffeb3b 89 | #fff59d 90 | 91 | 92 | #ffa000 93 | #ffc107 94 | #ffe082 95 | 96 | 97 | #f57c00 98 | #ff9800 99 | #ffcc80 100 | 101 | 102 | #e64a19 103 | #ff5722 104 | #ffab91 105 | 106 | 107 | #5d4037 108 | #795548 109 | #bcaaa4 110 | 111 | 112 | #616161 113 | #9e9e9e 114 | #eeeeee 115 | 116 | 117 | #455a64 118 | #607d8b 119 | #b0bec5 120 | 121 | 122 | #ffffffff 123 | 124 | #ff000000 125 | 126 | 127 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 8dp 6 | 4dp 7 | 8 | 9 | 64dp 10 | 32dp 11 | 40dp 12 | 24dp 13 | 14 | 2dp 15 | 36dp 16 | 48dp 17 | 18 | 19 | 56dp 20 | 40dp 21 | 22 | 56dp 23 | 24 | 1dp 25 | 26 | 27 | 28 | 112sp 29 | 56sp 30 | 45sp 31 | 34sp 32 | 24sp 33 | 20sp 34 | 16sp 35 | 14sp 36 | 14sp 37 | 12sp 38 | 14sp 39 | 40 | 41 | 36dp 42 | 43 | 44 | 24dp 45 | 24dp 46 | 12dp 47 | 6dp 48 | 8dp 49 | 4dp 50 | 2dp 51 | 1dp 52 | 53 | 54 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 微信助手 3 | 4 | fake_location 5 | latitude 6 | longitude 7 | hide_icon 8 | fake_money 9 | money 10 | fake_dice 11 | fake_step 12 | step 13 | fake_morra 14 | morra 15 | dice 16 | disable_revoke 17 | 18 | 搜索 19 | 关于 20 | 微信辅助 21 | 22 | -------------------------------------------------------------------------------- /wechathelper/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 14 | 15 | 25 | 26 | 37 | 38 | 41 | 42 | --------------------------------------------------------------------------------