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

    • Stone Age Survival-Tribal Game v2.1.0 [+3 Cheats]
      Modded/Hacked App: Stone Age Survival-Tribal Game By HYPERCELL SIA
      Bundle ID: com.stone.age.game
      iTunes Store Link: https://apps.apple.com/us/app/stone-age-survival-tribal-game/id6742344241?uo=4
       

      🤩 Hack Features

      - Unlimited Currency (Enable and Spend or Earn)
      - Never Die
      - Get IAP (Enable and you get NoAds, Starter pack)
      • 3 replies
    • Stone Age Survival-Tribal Game v2.1.0 [+3 Jailed Cheats]
      Modded/Hacked App: Stone Age Survival-Tribal Game By HYPERCELL SIA
      Bundle ID: com.stone.age.game
      iTunes Store Link: https://apps.apple.com/us/app/stone-age-survival-tribal-game/id6742344241?uo=4



      🤩 Hack Features

      - Unlimited Currency (Enable and Spend or Earn)
      - Never Die
      - Get IAP (Enable and you get NoAds, Starter pack)
      • 6 replies
    • Margonem Adventures v1.15.1 [+3 Jailed Cheats]
      Modded/Hacked App: Margonem Adventures By GARMORY sp. z o.o. sp. k.
      Bundle ID: pl.Garmory.MargonemAdventures
      iTunes Store Link: https://apps.apple.com/us/app/margonem-adventures/id6444410609?uo=4

       

      🤩 Hack Features

      - Enemy Can't Move
      - Enemy Can't Attack
      - Unlimited Mana
      • 12 replies
    • Margonem Adventures v1.15.1 [+3 Cheats]
      Modded/Hacked App: Margonem Adventures By GARMORY sp. z o.o. sp. k.
      Bundle ID: pl.Garmory.MargonemAdventures
      iTunes Store Link: https://apps.apple.com/us/app/margonem-adventures/id6444410609?uo=4



      🤩 Hack Features

      - Enemy Can't Move
      - Enemy Can't Attack
      - Unlimited Mana
      • 6 replies
    • Go Go Werewolf! v1.2 [+3 Jailed Cheats]
      Modded/Hacked App: Go Go Werewolf! By Dejaime Antonio de Oliveira Neto
      Bundle ID: productions.artcode.ggw
      iTunes Store Link: https://apps.apple.com/us/app/go-go-werewolf/id6739493341?uo=4



      🤩 Hack Features

      - Never Die
      - Free Item Upgrade
      - Unlimited Coins (Enable and Finish Stage)
      • 3 replies
    • Go Go Werewolf! v1.2 [+3 Cheats]
      Modded/Hacked App: Go Go Werewolf! By Dejaime Antonio de Oliveira Neto
      Bundle ID: productions.artcode.ggw
      iTunes Store Link: https://apps.apple.com/us/app/go-go-werewolf/id6739493341?uo=4


      🤩 Hack Features

      - Never Die
      - Free Item Upgrade
      - Unlimited Coins (Enable and Finish Stage)
      • 1 reply
    • Pal Go: Tower Defense TD v0.3.59 [+7 Cheats]
      Modded/Hacked App: Pal Go: Tower Defense TD By Playwind Ltd
      Bundle ID: com.playwindgames.freedefender
      iTunes Store Link: https://apps.apple.com/us/app/pal-go-tower-defense-td/id6479316663?uo=4


       

      🚀 Hack Features

      - [VIP] Freeze Currency (Currency will not decrease when used)

      - [VIP] Currency Always Enough (Buy even when you don't have enough currency)

      - [Free] Higher Recruit Energy (Gives 500 Recruit Energy Every Wave)

      - [Free] Always Can Drag Hero

      - [Free] Skip Ads

      - [Free] No Attack Cooldown

      - [Free] Global Speed Multiplier (Enable Inside Battle)

       

      Warning


      Do not use on main account. There is a chance of ban. Not responsible for any bans.

       


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      • 34 replies
    • Pal Go: Tower Defense TD v0.3.59 [+7 Jailed Cheats]
      Modded/Hacked App: Pal Go: Tower Defense TD By Playwind Ltd
      Bundle ID: com.playwindgames.freedefender
      iTunes Store Link: https://apps.apple.com/us/app/pal-go-tower-defense-td/id6479316663?uo=4


       

      Hack Features

      - [VIP] Freeze Currency (Currency will not decrease when used)

      - [VIP] Currency Always Enough (Buy even when you don't have enough currency)

      - [Free] Higher Recruit Energy (Gives 500 Recruit Energy Every Wave)

      - [Free] Always Can Drag Hero

      - [Free] Skip Ads

      - [Free] No Attack Cooldown

      - [Free] Global Speed Multiplier (Enable Inside Battle)

       

      Warning


      Do not use on main account. There is a chance of ban. Not responsible for any bans.

       

      Jailbreak required iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APKs: https://iosgods.com/forum/68-android-section/
      • 58 replies
    • Run! Goddess v1.0.9 [+3 Jailed Cheats]
      Modded/Hacked App: Run! Goddess By TOP GAMES INC.
      Bundle ID: com.topgamesinc.rg
      iTunes Store Link: https://apps.apple.com/us/app/run-goddess/id6667111749?uo=4



      🤩 Hack Features

      - No Skill Cooldown
      - Slow Enemy
      - Enemy Can't Attack (Enemy Can't Do Damage)
      • 27 replies
    • Run! Goddess v1.0.9 [+3 Cheats]
      Modded/Hacked App: Run! Goddess By TOP GAMES INC.
      Bundle ID: com.topgamesinc.rg
      iTunes Store Link: https://apps.apple.com/us/app/run-goddess/id6667111749?uo=4

       

      🤩 Hack Features

      - No Skill Cooldown
      - Slow Enemy
      - Enemy Can't Attack (Enemy Can't Do Damage)
       
      • 20 replies
    • AXIS BLADE v1.1.0 +3 cheats [ Dmg x Def ]
      Modded/Hacked App: AXIS BLADE By AWESOMEPIECE<br style="background-color:#1e1f25;color:rgba(255,255,255,0.81);font-size:14px;">
      Bundle ID: com.awesomepiece.axisblade<br style="background-color:#1e1f25;color:rgba(255,255,255,0.81);font-size:14px;">
      iTunes Store Link: https://apps.apple.com/us/app/axis-blade/id6736382225

       

       

       

      📌 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
      - Defense Multiplier
      - No Wall Damage

       

      ⬇️ 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

      - @KyosukeNanbu

       

      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.
      • 24 replies
    • AXIS BLADE v1.1.0 +3 cheats [ Dmg x Def ]
      Modded/Hacked App: AXIS BLADE By AWESOMEPIECE<br style="background-color:#1e1f25;color:rgba(255,255,255,0.81);font-size:14px;">
      Bundle ID: com.awesomepiece.axisblade<br style="background-color:#1e1f25;color:rgba(255,255,255,0.81);font-size:14px;">
      iTunes Store Link: https://apps.apple.com/us/app/axis-blade/id6736382225

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - Damage Multiplier
      - Defense Multiplier
      - No Wall Damage
       

       

      ⬇️ iOS Hack Download IPA Link


      Hidden Content

      Download IPA Hack







       

      📖 PC Installation Instructions

      STEP 1: Download the pre-hacked .IPA file from the link above to your computer. To download from the iOSGods App, see our iOSGods App IPA Download Tutorial which includes a video example.
      STEP 2: Download Sideloadly and install it on your Windows or Mac.
      STEP 3: Open Sideloadly on your computer, connect your iOS device, and wait until your device name appears in Sideloadly.
      STEP 4: Once your iDevice is recognized, drag the modded .IPA file you downloaded and drop it into the Sideloadly application.
      STEP 5: Enter your Apple Account email, then press “Start.” You’ll then be asked to enter your password. Go ahead and provide the required information.
      STEP 6: Wait for Sideloadly to finish sideloading/installing the hacked IPA. If there are issues during installation, please read the note below.
      STEP 7: Once the installation is complete and you see the app on your Home Screen, you will need to go to Settings -> General -> Profiles / VPN & Device Management. Once there, tap on the email you entered from step 6, and then tap on 'Trust [email protected]'.
      STEP 8: Now go to your Home Screen and open the newly installed app and everything should work fine. You may need to follow further per app instructions inside the hack's popup in-game.

      NOTE: iOS/iPadOS 16 and later, you must enable Developer Mode. For free Apple Developer accounts, you will need to repeat this process every 7 days. If you have any questions or problems, read our Sideloadly FAQ section of the topic and if you don't find a solution, please post your issue below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.

       

      🙌 Credits

      - @KyosukeNanbu

       
      • 14 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