Jump to content

11 posts in this topic

Recommended Posts

Updated (edited)

Hey!

 

Long time ago, I made a Smali Hacking tutorial!

Find it here: https://iosgods.com/topic/30729-simple-smali-hacking/

 

Today, I wanna create a new one.

 

This one is about boolean hacking

boolean = FALSE/TRUE

 

Can be written in diffrent ways:

FALSE --> '0x0' or just '0' (smali only 0x0, atleast for what I've worked on)

TRUE --> '0x1' or just '1' (smali also only 0x1, again atleast for what I've worked on)

 

The game in this tutorial:

https://play.google.com/store/apps/details?id=com.fungamesforfree.snipershooter.free&hl=nl

 

Download the game on your pc & decompile it, how?

https://iosgods.com/topic/43411-decompile-recompile-apk-without-a-tool-like-advancedapktool-etc/

or use a tool:

https://iosgods.com/topic/30893-advanced-apktool-windows-download-link/

 

 

Once decompiled, it will look like this:

 

foma9Xj.png

 

Open up Sublime Text, Notepad++ or something like that.

 

We're gonna search for functions in ALL smali files.

How we do that is simple, once you opened Sublime Text you have a option 'Find'

Go to 'Find' - 'Find in files', now locate the smali folder from the decompiled apk

Will look like this:

 

5lKIfh6.png

 

So, for what kind of functions do we need to search?

Well, every game is diffrent, in some you won't even success.

Some example functions:

 

-hasUnlocked

-isUnlocked

-isLocked

-hasUpgraded

-isUpgraded

-has'itemofgame'

-hasPurchased'itemofgame'

-is'itemofgame'Purchased'

-is'itemofgame'locked

-is'itemofgame'unlocked

etc etc.

 

The game we have, includes weapons.

 

We will try 'hasUnlocked' first:

0 matches.

 

We will try 'isUnlocked' & 'isLocked'

0 matches for both

 

We will try 'has'itemofgame' = 'hasWeapon'

0 matches

 

We will try 'hasPurchased'itemofgame'' = 'hasPurchasedWeapon'

0 matches

 

We will try 'isWeaponPurchased'

14 Matches in 6 files.

 

So, we got which matches in the files. This does NOT mean, it's the right one. Let's have a look :)

 

This is what we got:

 

 

 

Searching 3204 files for "isWeaponPurchased"

 
~ /Users/Joey/Desktop/apktool/ssf/smali/com/fungamesforfree/snipershooter/d/a.smali:
  823      move-result v3
  824  
  825:     invoke-virtual {v2, v3}, Lcom/fungamesforfree/snipershooter/data/GameData;->isWeaponPurchased(I)Z
  826  
  827      move-result v3
  ...
  850      move-result v3
  851  
  852:     invoke-virtual {v2, v3}, Lcom/fungamesforfree/snipershooter/data/GameData;->isWeaponPurchased(I)Z
  853  
  854      move-result v3
  ...
  875      move-result v3
  876  
  877:     invoke-virtual {v2, v3}, Lcom/fungamesforfree/snipershooter/data/GameData;->isWeaponPurchased(I)Z
  878  
  879      move-result v3
  ...
  900      move-result v3
  901  
  902:     invoke-virtual {v2, v3}, Lcom/fungamesforfree/snipershooter/data/GameData;->isWeaponPurchased(I)Z
  903  
  904      move-result v2


~ /Users/Joey/Desktop/apktool/ssf/smali/com/fungamesforfree/snipershooter/data/GameData.smali:
 1972  .end method
 1973  
 1974: .method public isWeaponPurchased(I)Z
 1975      .locals 5
 1976  


~ /Users/Joey/Desktop/apktool/ssf/smali/com/fungamesforfree/snipershooter/k.smali:
  189      aget v4, v4, v0
  190  
  191:     invoke-virtual {p0, v4}, Lcom/fungamesforfree/snipershooter/data/GameData;->isWeaponPurchased(I)Z
  192  
  193      move-result v4


~ /Users/Joey/Desktop/apktool/ssf/smali/com/fungamesforfree/snipershooter/l/dv.smali:
  837      move-result v4
  838  
  839:     invoke-virtual {v5, v4}, Lcom/fungamesforfree/snipershooter/data/GameData;->isWeaponPurchased(I)Z
  840  
  841      move-result v4
  ...
 1095      move-result v4
 1096  
 1097:     invoke-virtual {v3, v4}, Lcom/fungamesforfree/snipershooter/data/GameData;->isWeaponPurchased(I)Z
 1098  
 1099      move-result v3
 ....
 1330      move-result v4
 1331  
 1332:     invoke-virtual {v3, v4}, Lcom/fungamesforfree/snipershooter/data/GameData;->isWeaponPurchased(I)Z
 1333  
 1334      move-result v3


~ /Users/Joey/Desktop/apktool/ssf/smali/com/fungamesforfree/snipershooter/l/i.smali:
  426      move-result v5
  427  
  428:     invoke-virtual {v4, v5}, Lcom/fungamesforfree/snipershooter/data/GameData;->isWeaponPurchased(I)Z
  429  
  430      move-result v4
  ...
  732      aget v3, v3, v0
  733  
  734:     invoke-virtual {v2, v3}, Lcom/fungamesforfree/snipershooter/data/GameData;->isWeaponPurchased(I)Z
  735  
  736      move-result v3


~ /Users/Joey/Desktop/apktool/ssf/smali/com/fungamesforfree/snipershooter/o/d.smali:
  356      iget-object v7, p0, Lcom/fungamesforfree/snipershooter/o/d;->b:Lcom/fungamesforfree/snipershooter/data/GameData;
  357  
  358:     invoke-virtual {v7, v4}, Lcom/fungamesforfree/snipershooter/data/GameData;->isWeaponPurchased(I)Z
  359  
  360      move-result v4
  ...
  364      iget-object v4, p0, Lcom/fungamesforfree/snipershooter/o/d;->b:Lcom/fungamesforfree/snipershooter/data/GameData;
  365  
  366:     invoke-virtual {v4, v5}, Lcom/fungamesforfree/snipershooter/data/GameData;->isWeaponPurchased(I)Z
  367  
  368      move-result v4
  ...
  372      iget-object v4, p0, Lcom/fungamesforfree/snipershooter/o/d;->b:Lcom/fungamesforfree/snipershooter/data/GameData;
  373  
  374:     invoke-virtual {v4, v6}, Lcom/fungamesforfree/snipershooter/data/GameData;->isWeaponPurchased(I)Z
  375  
  376      move-result v4


14 matches across 6 files

 

You see what we got?

The one marked with '~' is the location of the .smali where our matches has been found.

you'll see the most do locate to GameData.smali (under '~' they locate to 

com/fungamesforfree/snipershooter/data/GameData.smali:

OUR SECOND match IS GameData.smali, so we REALLY need to check this one out, also the name of it is intresting!

 

So let's open the second one (double click on it in your text viewer (sublime text in my case)

/Users/Joey/Desktop/apktool/ssf/smali/com/fungamesforfree/snipershooter/data/GameData.smali:

 

The whole code until the function is ended, is pretty long. It's like this:

 

 

 

method public isWeaponPurchased(I)Z    .locals 5   --> Start of function, the 'Z' means boolean.


    .prologue
    const/4 v1, 0x0


    .line 435
    invoke-static {}, Lcom/fungamesforfree/snipershooter/d/a;->l()Ljava/util/List;


    move-result-object v0


    .line 436
    invoke-virtual {p0}, Lcom/fungamesforfree/snipershooter/data/GameData;->getPurchasedWeapons()[Z


    move-result-object v2


    .line 438
    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;


    move-result-object v3


    :cond_0
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z


    move-result v0


    if-nez v0, :cond_1


    .line 444
    array-length v0, v2


    if-ge p1, v0, :cond_2


    .line 445
    aget-boolean v0, v2, p1


    .line 448
    :goto_0
    return v0


    .line 438
    :cond_1
    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;


    move-result-object v0


    check-cast v0, Lcom/fungamesforfree/snipershooter/d/a;


    .line 439
    invoke-virtual {v0}, Lcom/fungamesforfree/snipershooter/d/a;->r()I


    move-result v4


    if-ne v4, p1, :cond_0


    .line 440
    iget-object v2, p0, Lcom/fungamesforfree/snipershooter/data/GameData;->cryptoPreferences:Landroid/content/SharedPreferences;


    invoke-virtual {v0}, Lcom/fungamesforfree/snipershooter/d/a;->A()Ljava/lang/String;


    move-result-object v0


    invoke-interface {v2, v0, v1}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z


    move-result v0


    goto :goto_0


    :cond_2
    move v0, v1


    .line 448
    goto :goto_0.end method

 

 

 

It's a long one, but actually not, the function is: 'isWeaponPurchased' & right after that we get the boolean code.

 

This is the code we'll work with:

.method public isWeaponPurchased(I)Z  --> Function, the 'Z' is boolean
    .locals 5

    .prologue
    const/4 v1, 0x0   --> earlier explained: 0x0 means false

What do we do?

Functions is:

 

isWeaponPurchased, the code under it says NO IT IS NOT (0x0)

SOOOOO, WE CHANGE IT TO: 0x1, because that means TRUE.

.method public isWeaponPurchased(I)Z
    .locals 5

    .prologue
    const/4 v1, 0x1  --> changed to true

Recompile it to a apk, sign it & test it!

 

When you tested your .apk, you see only the last 3 weapons are unlocked, the ones you needed to purchase with real money.

I couldn't figure out how to hack the other weapons by code, maybe I missed something.

 

Luckily the money can be hacked with eyes closed :)

 

Coins are written in the same smali as the weapons, search for 'getMoney'

You'll get two matches

-  invoke-virtual {p0}, Lcom/fungamesforfree/snipershooter/data/GameData;->getMoney()I

- .method public getMoney()I

 

it's the second one, because under the second one you'll find this code:

.method public getMoney()I
    .locals 3

    .prologue
    .line 351
    iget-object v0, p0, Lcom/fungamesforfree/snipershooter/data/GameData;->preferences:Landroid/content/SharedPreferences;

    const-string v1, "e"

    const/4 v2, 0x0 ---> remove the /4 + add your own value (in hex)

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v0

    return v0
.end method

This is how I'll code it:

.method public getMoney()I
    .locals 3

    .prologue
    .line 351
    iget-object v0, p0, Lcom/fungamesforfree/snipershooter/data/GameData;->preferences:Landroid/content/SharedPreferences;

    const-string v1, "e"

    const v2, 0xfffffff

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v0

    return v0
.end method

Recompile, sign it & test it.

 

Proof:

 

 

 

Video Tutorial: 

 

 

 

Hope you learned something, might make a video tutorial for it too.

 

Credits: @Ted2

 

PS: I'm not hiding this tutorial because I want everyone be able to check it without giving me a like or reply, but if it helps. Please, hit the thanks &/or rep button :)

Updated by Ted2
  • Like 4
  • Thanks 2
Posted

Thanks man.. but I screwed up the spoilers & at the end the credits..

You know how to do them right? xD

Seems like the spoiler and credits tag was copy pasted. That's likely why it's not working.

 

Try typing them manually and remove formatting from the

tags. :)

Posted

Seems like the spoiler and credits tag was copy pasted. That's likely why it's not working.

 

Try typing them manually and remove formatting from the

tags. :)

Oh yea, I did. Thanks :D

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • BlazBlue Entropy Effect v1.1.0 +3 Cheats [ Damage + More ]
      Modded/Hacked App: BlazBlue Entropy Effect By ActGames Inc.
      Bundle ID: com.actgames.bbee.ios.gl
      App Store Link: https://apps.apple.com/us/app/blazblue-entropy-effect/id6742527094?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - God Mode
      - Freeze MP
        • Winner
        • Like
      • 9 replies
    • Train of Hope: Survival Game v1.9.1 +5 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Train of Hope: Survival Game By Samfinaco LLC
      Bundle ID: com.samfinaco.tos
      iTunes Store Link: https://apps.apple.com/us/app/train-of-hope-survival-game/id6636482655?uo=4

       
       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Unlimited Resources -> Will increase instead of decrease.
      - Unlimited Hero Experience -> Will increase instead of decrease.
        • Haha
        • Thanks
        • Winner
        • Like
      • 56 replies
    • Train of Hope: Survival Game v1.9.1 +5 Cheats [ Damage & Defence ]
      Modded/Hacked App: Train of Hope: Survival Game By Samfinaco LLC
      Bundle ID: com.samfinaco.tos
      iTunes Store Link: https://apps.apple.com/us/app/train-of-hope-survival-game/id6636482655?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Unlimited Resources -> Will increase instead of decrease.
      - Unlimited Hero Experience -> Will increase instead of decrease.
        • Agree
        • Like
      • 43 replies
    • Bloons Card Storm v5.1 +4 Jailed Cheats [ Unlimited Cards ]
      Modded/Hacked App: Bloons Card Storm By Ninja Kiwi Limited
      Bundle ID: com.ninjakiwi.bloonscardstorm
      iTunes Store Link: https://apps.apple.com/us/app/bloons-card-storm/id6478193271?uo=4


      Hack Features:
      - Unlimited Cards
      - Unlock All Cards
      - Unlock All Cosmetics -> Avatars, Card Backs etc.
      - Unlock All Heroes


      Jailbreak required hack(s): [Mod Menu Hack] Bloons Card Storm v1.00 +4 Cheats [ Unlimited Cards ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 29 replies
    • Bloons Card Storm v5.1 +4 Cheats [ Unlimited Cards ]
      Modded/Hacked App: Bloons Card Storm By Ninja Kiwi Limited
      Bundle ID: com.ninjakiwi.bloonscardstorm
      iTunes Store Link: https://apps.apple.com/us/app/bloons-card-storm/id6478193271?uo=4


      Hack Features:
      - Unlimited Cards
      - Unlock All Cards
      - Unlock All Cosmetics -> Avatars, Card Backs etc.
      - Unlock All Heroes


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Bloons Card Storm v1.00 +4 Cheats [ Unlimited Cards ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Thanks
        • Winner
        • Like
      • 32 replies
    • Merge 2 Survive: Zombie Game v1.22.2 +3 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Merge 2 Survive: Zombie Game By Pixodust Aplicativos LTDA
      Bundle ID: com.pixodust.games.merge.survive.puzzle.game
      iTunes Store Link: https://apps.apple.com/us/app/merge-2-survive-zombie-game/id6468487156?uo=4


      Hack Features:
      - Unlimited Coins
      - Unlimited Diamonds
      - Unlimited Energy


      Jailbreak required hack(s): [Mod Menu Hack] Merge 2 Survive: Zombie Game v1.0.3 +3 Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 31 replies
    • Merge 2 Survive: Zombie Game v1.22.2 +3 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Merge 2 Survive: Zombie Game By Pixodust Aplicativos LTDA
      Bundle ID: com.pixodust.games.merge.survive.puzzle.game
      iTunes Store Link: https://apps.apple.com/us/app/merge-2-survive-zombie-game/id6468487156?uo=4


      Hack Features:
      - Unlimited Coins
      - Unlimited Diamonds
      - Unlimited Energy


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Merge 2 Survive: Zombie Game v1.0.3 +3 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 35 replies
    • Disney Emoji Blitz Game v71.0.0 +1++ Jailed Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Disney Emoji Blitz Game By Jam City, Inc.
      Bundle ID: com.disney.emojimatch
      iTunes Store Link: https://apps.apple.com/us/app/disney-emoji-blitz-game/id1017551780
       

      Hack Features:
      - Unlimited Currencies -> Earn some.


      Jailbreak required hack(s): https://iosgods.com/topic/168886-disney-emoji-blitz-game-all-versions-1-cheats-unlimited-currencies/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 185 replies
    • Disney Emoji Blitz Game v71.0.0 +1++ Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Disney Emoji Blitz Game By Jam City, Inc.
      Bundle ID: com.disney.emojimatch
      iTunes Store Link: https://apps.apple.com/us/app/disney-emoji-blitz-game/id1017551780
       

      Hack Features:
      - Unlimited Currencies -> Earn some.


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/168888-disney-emoji-blitz-game-v5320-1-jailed-cheat-unlimited-currencies/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 62 replies
    • Soul Knight v7.4.1 +6 Jailed Cheats [ Unlimited Gems ]
      Modded/Hacked App: Soul Knight By 泽阳 李
      Bundle ID: com.ChillyRoom.DungeonShooter
      iTunes Store Link: https://apps.apple.com/us/app/soul-knight/id1184159988?uo=4


      Hack Features:
      - Unlimited Gems
      - God Mode
      - One-Hit Kill
      - Unlimited Energy
      - No Skill Cooldown
      - Increased Bullet Speed


      Jailbreak required hack(s): [Mod Menu Hack] Soul Knight v4.3.2 +6 Cheats [ Unlimited Gems ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 629 replies
    • Dawn of Ages: Medieval Games v2.1.1 +5 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Dawn of Ages: total war battle By BoomBit, Inc.
      Bundle ID: com.stratospheregames.dawnofages
      App Store Link: https://apps.apple.com/us/app/dawn-of-ages-total-war-battle/id6477473268?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Dumb Enemy
      - Premium Enabled
        • Agree
        • Winner
        • Like
      • 25 replies
    • Dawn of Ages: Medieval Games v2.1.1 +5 Cheats [ Damage & Defence ]
      Modded/Hacked App: Dawn of Ages: total war battle By BoomBit, Inc.
      Bundle ID: com.stratospheregames.dawnofages
      App Store Link: https://apps.apple.com/us/app/dawn-of-ages-total-war-battle/id6477473268?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Dumb Enemy
      - Premium Enabled

       

      ⬇️ iOS Hack Download Link


      Hidden Content

      Download Hack







       

      📖 iOS Installation Instructions

      STEP 1: Download the .deb hack file from the link above. Use Safari, Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If needed, tap on the downloaded file again, then select ‘Normal Install’ from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. If it doesn’t install successfully, see the note below.
      STEP 5: Open the game, log in to your iOSGods account when asked, then toggle on the features you want and enjoy!

       

      NOTE: If you have any questions or problems, read our Jailbreak iOS Hack Troubleshooting & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.

       

      🙌 Credits

      - @Puddin
      - @Laxus

       

      📷 Cheat Video/Screenshots

      N/A

       

      More iOS App Hacks
      If you’re looking for Non-Jailbroken & No Jailbreak required iOS IPA hacks, visit the iOS Game Cheats & Hacks or the iOSGods App for a variety of modded games and apps for non-jailbroken iOS devices.

      Modded Android APKs
      Need modded apps or games for Android? Check out the latest custom APK mods, cheats & more in our Android Section.
        • Agree
        • Thanks
        • Winner
        • Like
      • 31 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines