Snailsoft
∞ and beyond!
Staff Member
Moderator
SB Mod Squad ⭐
✔ Approved Releaser
eBook Releaser
Active User
Member for 2 years
- Gender
- Not specified
- Device
- 6502
- Country
- Canada
Sometimes the difference between a shareware version of a game and a paid version is as simple as flipping a bit. Finding that bit can be the tricky part.
As many know, I am a big fan of the game Pixel Dungeon.
Many of you also know about Lucky Patcher , a tool to mod Android games. Unfortunately, many of Lucky Patcher custom mods are obsolete and no longer work on newer versions of a game.
Now, why you might ask would a game developer who uses source code and Android Studio to make a game be looking at Lucky Patcher for a mod?
Pixel Dungeon has a special mode for those who purchase it. I have hunted through code to locate it to no avail
Lucky Patcher has a custom mod for a 1x version of Pixel Dungeon that doesn't work on the 2x or current 3x versions.
I extracted the patch data:
It reminded me of many PC tools that patch executables or UNIX GSAR/GREP, a simple HEX Search and Replace.
Examining this one can see only a single value is changed, 01 into 11 or 0 into 1.
0 unpaid, 1 paid
I obtained a copy of 1.4.3, ran the patch and it failed.
Perplexed, and after some trial and error, I obtained another copy (both from legitimate sources) with a different size. This time it worked.
I decompiled the 3 APK's, first, second, and second patched.
The two unpatched were not alike. One was nice and clean, from the developer site, the other larger and full of bloatware from Google.
It turns out that the free versions with public source code has none of the bloatware, however, it also has none of the registration and paid features.
Ergo, only the release from Playstore has the Patron payment code.
All of my releases are based on the free and clean source code, hence why I couldn't find the code to mod.
Now that I knew what to look for and where, I ran a side-by-side byte comparison of the unpatched and patched decompiled APK's.
Using a wonderful PC tool, this took seconds. I have provided a custom Sbenny release.
forum.sbenny.com
I had to turn off date comparison and turn on byte comparison.
For those acquainted with JAVA, SMALI, RegEx or BOOLEAN this sets the value of a constant to 0 or 1 and the rest of the code decides what to do with it based on the value.
Also, the constant is located in the Payment services code.
Sure enough, my Super Green Shattered Pixel Dungeon source code doesn't have this code.
I downloaded a copy of 3.2.4 from Google and checked, sure enough, there's the file, but the code had changed enough for the pattern search to break, rendering Lucky Patcher useless.
Decompiled APK's produce SMALI code, but that's not the same as assembly code or JAVA.
So, using MT Manager I opened up the 3.2.4 Google version and my own SG compiled version.
I manually applied the patch to the Payment code, and then I manually transferred my own SG patches to the Google version and created a hybrid mod.
The result, a Super Green Shattered Pixel Dungeon with Patron mode unlocked.
forum.sbenny.com
Oh, and the bloatware and analytics are removed... this is the Google version (modded) so one must automatically assume the game will have malware.
As many know, I am a big fan of the game Pixel Dungeon.
Many of you also know about Lucky Patcher , a tool to mod Android games. Unfortunately, many of Lucky Patcher custom mods are obsolete and no longer work on newer versions of a game.
Now, why you might ask would a game developer who uses source code and Android Studio to make a game be looking at Lucky Patcher for a mod?
Pixel Dungeon has a special mode for those who purchase it. I have hunted through code to locate it to no avail
Lucky Patcher has a custom mod for a 1x version of Pixel Dungeon that doesn't work on the 2x or current 3x versions.
I extracted the patch data:
Code:
[BEGIN]
Shattered Tier Supporter unlocked. Patch for version 1.4.3!
[PACKAGE]
[CLASSES]
{"original":"12 01 39 00 03 00 0F 01 62 00 9F 0D 6E 20 7A 2C 20 00 0C 02 62 00 A4 0D"}
{"replaced":"12 11 39 00 03 00 0F 01 62 00 9F 0D 6E 20 7A 2C 20 00 0C 02 62 00 A4 0D"}
Examining this one can see only a single value is changed, 01 into 11 or 0 into 1.
0 unpaid, 1 paid
I obtained a copy of 1.4.3, ran the patch and it failed.
Perplexed, and after some trial and error, I obtained another copy (both from legitimate sources) with a different size. This time it worked.
I decompiled the 3 APK's, first, second, and second patched.
The two unpatched were not alike. One was nice and clean, from the developer site, the other larger and full of bloatware from Google.
It turns out that the free versions with public source code has none of the bloatware, however, it also has none of the registration and paid features.
Ergo, only the release from Playstore has the Patron payment code.
All of my releases are based on the free and clean source code, hence why I couldn't find the code to mod.
Now that I knew what to look for and where, I ran a side-by-side byte comparison of the unpatched and patched decompiled APK's.
Using a wonderful PC tool, this took seconds. I have provided a custom Sbenny release.
Beyond Compare v5 x64
Beyond Compare v5 x64 Description: Beyond Compare is the popular choice for data comparison. Compare folders, text files, images, and tables. Review differences efficiently and merge changes with confidence. Compare by date, time, size, CRC, Byte, attributes, missing, added, etc...
I had to turn off date comparison and turn on byte comparison.
For those acquainted with JAVA, SMALI, RegEx or BOOLEAN this sets the value of a constant to 0 or 1 and the rest of the code decides what to do with it based on the value.
Also, the constant is located in the Payment services code.
Sure enough, my Super Green Shattered Pixel Dungeon source code doesn't have this code.
I downloaded a copy of 3.2.4 from Google and checked, sure enough, there's the file, but the code had changed enough for the pattern search to break, rendering Lucky Patcher useless.
Decompiled APK's produce SMALI code, but that's not the same as assembly code or JAVA.
So, using MT Manager I opened up the 3.2.4 Google version and my own SG compiled version.
I manually applied the patch to the Payment code, and then I manually transferred my own SG patches to the Google version and created a hybrid mod.
The result, a Super Green Shattered Pixel Dungeon with Patron mode unlocked.
Shattered Pixel Dungeon Sbenny Exclusive Modded Version
Free Download Shattered Pixel Dungeon MOD APK Game for Android! Download for Free APK, DATA and MOD Full Android Games and Apps at SbennyDotCom!
Oh, and the bloatware and analytics are removed... this is the Google version (modded) so one must automatically assume the game will have malware.
