破解高德SDK实现免key
前言
准备工具
- 高德定位SDK最新版 AMap_Location_V2.9.0_20160906.jar
- Android Studio
- Java Decompiler
分析过程
- 包名
- 编译key的SHA1码
- 申请得到的key
修改jar
- 注意:这里 sha1AndPackage 中 SHA1 码与包名中间的冒号为中文冒号,高德真是费尽心机…
public IBinder onBind(Intent paramIntent) { try { String str1 = paramIntent.getStringExtra("apiKey"); String str2 = paramIntent.getStringExtra("packageName"); String str3 = paramIntent.getStringExtra("sha1AndPackage"); String str4 = paramIntent.getStringExtra("as"); Log.i("修改前数据", "apiKey:" + str1 + "\npackageName:" + str2 + "\nsha1AndPackage:" + str3 + "\nas:" + str4); paramIntent.putExtra("apiKey", "93036c13932aba6eeaee2a02656f14d7"); paramIntent.putExtra("packageName", "com.lge.clock"); paramIntent.putExtra("sha1AndPackage", "FA:AB:F5:02:B2:17:AC:D3:DA:46:38:ED:FF:E3:0C:A3:E4:67:0A:50:com.lge.clock"); str1 = paramIntent.getStringExtra("apiKey"); str2 = paramIntent.getStringExtra("packageName"); str3 = paramIntent.getStringExtra("sha1AndPackage"); str4 = paramIntent.getStringExtra("as"); Log.i("修改后数据", "apiKey:" + str1 + "\npackageName:" + str2 + "\nsha1AndPackage:" + str3 + "\nas:" + str4); return this.a.onBind(paramIntent); } catch (Throwable localThrowable) { c.a(localThrowable, "APSService", "onBind"); } return null; }
task makeJar(type: Copy) { delete 'build/libs/lib.jar' from('build/intermediates/bundles/release/') into('build/libs/') include('classes.jar') rename ('classes.jar', 'lib.jar')}makeJar.dependsOn(build)
gradlew makeJar
测试
国际惯例
https://github.com/YiuChoi/CrackAmap[size=0em]