From de23b321cede5243cbdf8e80d545337146822a8e Mon Sep 17 00:00:00 2001 From: xerox Date: Wed, 5 Aug 2020 08:47:48 +0000 Subject: [PATCH 01/12] Add new file --- ligma (cheat)/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ligma (cheat)/README.md diff --git a/ligma (cheat)/README.md b/ligma (cheat)/README.md new file mode 100644 index 000000000..d56512215 --- /dev/null +++ b/ligma (cheat)/README.md @@ -0,0 +1,14 @@ +# 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. \ No newline at end of file From 3afd9d84263f1002abfc6fe195445dddbdfed357 Mon Sep 17 00:00:00 2001 From: xerox Date: Wed, 5 Aug 2020 08:53:08 +0000 Subject: [PATCH 02/12] Update README.md --- ligma (cheat)/README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ligma (cheat)/README.md b/ligma (cheat)/README.md index d56512215..086a2b588 100644 --- a/ligma (cheat)/README.md +++ b/ligma (cheat)/README.md @@ -11,4 +11,21 @@ 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. \ 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 + +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: + + \ No newline at end of file From 16818e3508583cdc85e77848fb0a787fc00a8836 Mon Sep 17 00:00:00 2001 From: xerox Date: Wed, 5 Aug 2020 08:55:25 +0000 Subject: [PATCH 03/12] Update README.md --- ligma (cheat)/README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/ligma (cheat)/README.md b/ligma (cheat)/README.md index 086a2b588..36d891c48 100644 --- a/ligma (cheat)/README.md +++ b/ligma (cheat)/README.md @@ -28,4 +28,22 @@ 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: - \ No newline at end of file + + +### 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. \ No newline at end of file From 3a465c5f1b15bac3ab52a4d3f4ee3baf83de70ed Mon Sep 17 00:00:00 2001 From: xerox Date: Wed, 5 Aug 2020 08:56:53 +0000 Subject: [PATCH 04/12] Update README.md --- ligma (cheat)/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ligma (cheat)/README.md b/ligma (cheat)/README.md index 36d891c48..75e4338ca 100644 --- a/ligma (cheat)/README.md +++ b/ligma (cheat)/README.md @@ -20,7 +20,7 @@ is not inside of this repo, you will need to first download the apk from here: [ ### decompile -use apktool.jar to decompile the apk. we are going to patch a smali file to load our .so before any other .so. +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 @@ -46,4 +46,6 @@ 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. \ No newline at end of file +now you have a patched & signed apk. Its time to install the apk. + +### install \ No newline at end of file From b05e2128613bba8395f4db220ebaeed64678d168 Mon Sep 17 00:00:00 2001 From: xerox Date: Wed, 5 Aug 2020 09:02:26 +0000 Subject: [PATCH 05/12] Update README.md --- ligma (cheat)/README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ligma (cheat)/README.md b/ligma (cheat)/README.md index 75e4338ca..644cdb212 100644 --- a/ligma (cheat)/README.md +++ b/ligma (cheat)/README.md @@ -48,4 +48,13 @@ apksigner.jar -a codm_patched.apk now you have a patched & signed apk. Its time to install the apk. -### install \ No newline at end of file +### 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. \ No newline at end of file From ad7b2af92b361bd981a5843030720e749f3ab311 Mon Sep 17 00:00:00 2001 From: xerox Date: Wed, 5 Aug 2020 09:03:30 +0000 Subject: [PATCH 06/12] Update README.md --- ligma (cheat)/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ligma (cheat)/README.md b/ligma (cheat)/README.md index 644cdb212..250762c76 100644 --- a/ligma (cheat)/README.md +++ b/ligma (cheat)/README.md @@ -57,4 +57,5 @@ to `Android/obb (or copy the content from inside of the obb file to here)` on yo -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. \ No newline at end of file +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`. \ No newline at end of file From c6838c753c1c5ceb41ed360e85f0938d64404cfa Mon Sep 17 00:00:00 2001 From: xerox Date: Wed, 5 Aug 2020 09:05:48 +0000 Subject: [PATCH 07/12] Update README.md --- ligma (cheat)/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ligma (cheat)/README.md b/ligma (cheat)/README.md index 250762c76..0ee040789 100644 --- a/ligma (cheat)/README.md +++ b/ligma (cheat)/README.md @@ -58,4 +58,10 @@ to `Android/obb (or copy the content from inside of the obb file to here)` on yo 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`. \ No newline at end of file +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: + + \ No newline at end of file From a87a798c86aef228a95eb0e68e23ecfc7758507b Mon Sep 17 00:00:00 2001 From: xerox Date: Wed, 5 Aug 2020 09:06:43 +0000 Subject: [PATCH 08/12] Update README.md --- ligma (cheat)/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ligma (cheat)/README.md b/ligma (cheat)/README.md index 0ee040789..4e0462d2c 100644 --- a/ligma (cheat)/README.md +++ b/ligma (cheat)/README.md @@ -62,6 +62,6 @@ Ensure that the `apk` is named `base_orig.apk`. If everything is done correctly # Result -now if you click build inside of visual studios your screen should look like this: +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!): \ No newline at end of file From 0d41744f4a4c89ea4a786110042de51388b3200c Mon Sep 17 00:00:00 2001 From: xerox Date: Wed, 5 Aug 2020 09:08:55 +0000 Subject: [PATCH 09/12] Update README.md --- ligma (cheat)/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ligma (cheat)/README.md b/ligma (cheat)/README.md index 4e0462d2c..3e699976f 100644 --- a/ligma (cheat)/README.md +++ b/ligma (cheat)/README.md @@ -28,6 +28,13 @@ 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: +(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 From f41951907562e7533c27e548acf0ccd6cc0db066 Mon Sep 17 00:00:00 2001 From: xerox Date: Wed, 5 Aug 2020 09:09:15 +0000 Subject: [PATCH 10/12] Update README.md --- ligma (cheat)/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ligma (cheat)/README.md b/ligma (cheat)/README.md index 3e699976f..7ed855910 100644 --- a/ligma (cheat)/README.md +++ b/ligma (cheat)/README.md @@ -28,7 +28,7 @@ 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: -(do not put libligma.so or ligma.so just ligma!) +[`[WARNING]`: (do not put libligma.so or ligma.so just ligma!) ``` const-string v0, "ligma" From fdb69b66e264b2cf4ea323d719fc987973b8ba7a Mon Sep 17 00:00:00 2001 From: xerox Date: Wed, 5 Aug 2020 09:09:28 +0000 Subject: [PATCH 11/12] Update README.md --- ligma (cheat)/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ligma (cheat)/README.md b/ligma (cheat)/README.md index 7ed855910..787a419bc 100644 --- a/ligma (cheat)/README.md +++ b/ligma (cheat)/README.md @@ -28,7 +28,7 @@ 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!) +[`[WARNING]`]: (do not put libligma.so or ligma.so just ligma!) ``` const-string v0, "ligma" From c88be3951e6dd933212f5de90a6569df21561c0d Mon Sep 17 00:00:00 2001 From: xerox Date: Wed, 5 Aug 2020 09:10:34 +0000 Subject: [PATCH 12/12] Update README.md --- ligma (cheat)/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ligma (cheat)/README.md b/ligma (cheat)/README.md index 787a419bc..66121979e 100644 --- a/ligma (cheat)/README.md +++ b/ligma (cheat)/README.md @@ -69,6 +69,6 @@ Ensure that the `apk` is named `base_orig.apk`. If everything is done correctly # 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!): +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