From 3930ae1ba50292de27a3096d33fd1f4278428530 Mon Sep 17 00:00:00 2001 From: xerox Date: Wed, 5 Aug 2020 20:37:00 -0700 Subject: [PATCH] moved readme --- README.md | 75 ++++++++++++++++++++++++++++++++++++++++++++++--- ligma/README.md | 74 ------------------------------------------------ 2 files changed, 71 insertions(+), 78 deletions(-) delete mode 100644 ligma/README.md diff --git a/README.md b/README.md index 208d72d7b..66121979e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,74 @@ -# COD-Mobile +# build scripts -:skull: some work on cod mobile. :) +First things first, to get this compiling/working for you, you are going to need to fix these build scripts: - +``` +adb logcat -c +adb push C:\Users\%USERNAME%\source\repos\ligma\ARM\Release\libligma.so /data/app/com.activision.callofduty.shooter-1/lib/arm/libligma.so +start cmd /k "title 'ligma filter' & adb logcat | findstr ligma" +start cmd /k "title 'codm logs' & adb logcat | findstr com.activision.callofduty.shooter" +start cmd /k "title 'all logs' & adb logcat" +adb shell am start -n com.activision.callofduty.shooter/com.tencent.tmgp.cod.PermissionGrantActivity +``` - \ No newline at end of file +just change `C:\Users\%USERNAME%\source\repos\ligma\ARM\Release\libligma.so` to the path of your repo. Also change `adb` to whatever `adb` your emulator is using. + +# setup + +Since we arent done making this cheat, we have no need to repackage the entire apk and reinstall everytime we wanna test our code. Since the application +is not inside of this repo, you will need to first download the apk from here: [cod mobile](https://apkpure.com/call-of-duty-legends-of-war/com.activision.callofduty.shooter). + +### decompile + +First unzip the xapk and take the .apk that is inside of it out. use apktool.jar to decompile the apk. we are going to patch a smali file to load our .so before any other .so. + +``` +apktool.jar d codm.apk +``` + +now go to this smali file: `smali\com\tencent\tpshell\TPShellApplication.smali`. Add this smali code to load our .so: + +[`[WARNING]`]: (do not put libligma.so or ligma.so just ligma!) + +``` +const-string v0, "ligma" +invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V +``` + + + +### recompile + +simply run this to recompile the apk, this apk is not signed and will need to be signed. + +``` +apktool.jar b codm -o codm_patched.apk +``` + +### signing + +use apksigner.jar to sign the newly compiled apk. + +``` +apksigner.jar -a codm_patched.apk +``` + +now you have a patched & signed apk. Its time to install the apk. + +### install + +now that we have a signed and patched apk, install the apk (not the xapk) just the patched apk into your emulator. After you have installed it you will +need to copy the .obb files which are located INSIDE of the xapk. open the xapk back up in zip, open `Android` folder and you will see an `obb` folder. Copy this folder +to `Android/obb (or copy the content from inside of the obb file to here)` on your emulator. + + + + +Finally you will now need to copy the original `apk` to `/data/app/` please refer to [this](https://githacks.org/android-reverse-engineering/cod-mobile/-/blob/master/ligma%20(cheat)/ligma/bypass/bypass.cpp#L35) line of code to understand why. +Ensure that the `apk` is named `base_orig.apk`. If everything is done correctly you will now be able to build your .so and the game will auto run. + +# Result + +now if you click build inside of visual studios your screen should look like this (make sure you build in release otherwise the build script wont know where to copy your .so from!). Also be aware that you may need to build 2/3 times since `adb` will connect the first time... + + \ No newline at end of file diff --git a/ligma/README.md b/ligma/README.md deleted file mode 100644 index 66121979e..000000000 --- a/ligma/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# build scripts - -First things first, to get this compiling/working for you, you are going to need to fix these build scripts: - -``` -adb logcat -c -adb push C:\Users\%USERNAME%\source\repos\ligma\ARM\Release\libligma.so /data/app/com.activision.callofduty.shooter-1/lib/arm/libligma.so -start cmd /k "title 'ligma filter' & adb logcat | findstr ligma" -start cmd /k "title 'codm logs' & adb logcat | findstr com.activision.callofduty.shooter" -start cmd /k "title 'all logs' & adb logcat" -adb shell am start -n com.activision.callofduty.shooter/com.tencent.tmgp.cod.PermissionGrantActivity -``` - -just change `C:\Users\%USERNAME%\source\repos\ligma\ARM\Release\libligma.so` to the path of your repo. Also change `adb` to whatever `adb` your emulator is using. - -# setup - -Since we arent done making this cheat, we have no need to repackage the entire apk and reinstall everytime we wanna test our code. Since the application -is not inside of this repo, you will need to first download the apk from here: [cod mobile](https://apkpure.com/call-of-duty-legends-of-war/com.activision.callofduty.shooter). - -### decompile - -First unzip the xapk and take the .apk that is inside of it out. use apktool.jar to decompile the apk. we are going to patch a smali file to load our .so before any other .so. - -``` -apktool.jar d codm.apk -``` - -now go to this smali file: `smali\com\tencent\tpshell\TPShellApplication.smali`. Add this smali code to load our .so: - -[`[WARNING]`]: (do not put libligma.so or ligma.so just ligma!) - -``` -const-string v0, "ligma" -invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V -``` - - - -### recompile - -simply run this to recompile the apk, this apk is not signed and will need to be signed. - -``` -apktool.jar b codm -o codm_patched.apk -``` - -### signing - -use apksigner.jar to sign the newly compiled apk. - -``` -apksigner.jar -a codm_patched.apk -``` - -now you have a patched & signed apk. Its time to install the apk. - -### install - -now that we have a signed and patched apk, install the apk (not the xapk) just the patched apk into your emulator. After you have installed it you will -need to copy the .obb files which are located INSIDE of the xapk. open the xapk back up in zip, open `Android` folder and you will see an `obb` folder. Copy this folder -to `Android/obb (or copy the content from inside of the obb file to here)` on your emulator. - - - - -Finally you will now need to copy the original `apk` to `/data/app/` please refer to [this](https://githacks.org/android-reverse-engineering/cod-mobile/-/blob/master/ligma%20(cheat)/ligma/bypass/bypass.cpp#L35) line of code to understand why. -Ensure that the `apk` is named `base_orig.apk`. If everything is done correctly you will now be able to build your .so and the game will auto run. - -# Result - -now if you click build inside of visual studios your screen should look like this (make sure you build in release otherwise the build script wont know where to copy your .so from!). Also be aware that you may need to build 2/3 times since `adb` will connect the first time... - - \ No newline at end of file