Jump to content

Bypassing Google License Check - Harry Potter Hogwarts Mystery Example [Smali]


9 posts in this topic

Recommended Posts

Updated (edited)

Hi,

I saw that people commented in the request of the game about the fact they weren't able to play the game due the Beta Limited.

I was pretty sure it was just a simple license check, so I thought let's show you guys how to disable it :)

 

Requirements:

- Apktool (or any tool where you can decompile the apk with)

- A text editor which can read smali files (sublime, notepad++ etc)

 

Alright so it's pretty simple & is always the same file (from my experience)

Go to:

/smali/com/google/android/vending/licensing/LicenseValidator.smali

or

/smali_classes2/com/google/android/vending/licensing/LicenseValidator.smali --> Some apps have 2 classes.dex files nowadays

 

Open that file in your text editor.

 

Search for 'handleRespone' as a method:

HPZioUQ.png

 

Now inside this method, 'mPolicy' & under that you see 'allowAcces()Z' --> ()Z means BOOLEAN in smali

Q194ZmX.png

 

Now you can bypass the license check in two ways:

1. Return allowAccess to true (0x1)

2. comment out the jump (if-eqz v0, :cond_0)

 

I prefer option two, since I don't have to type 2 lines of code LUL

 

How it should look like after patch:

gabPEYN.png


Original Code:

Spoiler

 


.method private handleResponse(ILcom/google/android/vending/licensing/ResponseData;)V
    .locals 1
    .param p1, "response"    # I
    .param p2, "rawData"    # Lcom/google/android/vending/licensing/ResponseData;

    .prologue
    .line 210
    iget-object v0, p0, Lcom/google/android/vending/licensing/LicenseValidator;->mPolicy:Lcom/google/android/vending/licensing/Policy;

    invoke-interface {v0, p1, p2}, Lcom/google/android/vending/licensing/Policy;->processServerResponse(ILcom/google/android/vending/licensing/ResponseData;)V

    .line 214
    iget-object v0, p0, Lcom/google/android/vending/licensing/LicenseValidator;->mPolicy:Lcom/google/android/vending/licensing/Policy;

    invoke-interface {v0}, Lcom/google/android/vending/licensing/Policy;->allowAccess()Z

    move-result v0

    if-eqz v0, :cond_0  <---- comment this one out for patch

    .line 215
    iget-object v0, p0, Lcom/google/android/vending/licensing/LicenseValidator;->mCallback:Lcom/google/android/vending/licensing/LicenseCheckerCallback;

    invoke-interface {v0, p1}, Lcom/google/android/vending/licensing/LicenseCheckerCallback;->allow(I)V

    .line 219
    :goto_0
    return-void

    .line 217
    :cond_0
    iget-object v0, p0, Lcom/google/android/vending/licensing/LicenseValidator;->mCallback:Lcom/google/android/vending/licensing/LicenseCheckerCallback;

    invoke-interface {v0, p1}, Lcom/google/android/vending/licensing/LicenseCheckerCallback;->dontAllow(I)V

    goto :goto_0
.end method

 


Patched Code:

Spoiler

 


.method private handleResponse(ILcom/google/android/vending/licensing/ResponseData;)V
    .locals 1
    .param p1, "response"    # I
    .param p2, "rawData"    # Lcom/google/android/vending/licensing/ResponseData;

    .prologue
    .line 210
    iget-object v0, p0, Lcom/google/android/vending/licensing/LicenseValidator;->mPolicy:Lcom/google/android/vending/licensing/Policy;

    invoke-interface {v0, p1, p2}, Lcom/google/android/vending/licensing/Policy;->processServerResponse(ILcom/google/android/vending/licensing/ResponseData;)V

    .line 214
    iget-object v0, p0, Lcom/google/android/vending/licensing/LicenseValidator;->mPolicy:Lcom/google/android/vending/licensing/Policy;

    invoke-interface {v0}, Lcom/google/android/vending/licensing/Policy;->allowAccess()Z

    move-result v0

    #if-eqz v0, :cond_0  <--- Commented out & now there is no license check & will always give you access. NOICE :D

    .line 215
    iget-object v0, p0, Lcom/google/android/vending/licensing/LicenseValidator;->mCallback:Lcom/google/android/vending/licensing/LicenseCheckerCallback;

    invoke-interface {v0, p1}, Lcom/google/android/vending/licensing/LicenseCheckerCallback;->allow(I)V

    .line 219
    :goto_0
    return-void

    .line 217
    :cond_0
    iget-object v0, p0, Lcom/google/android/vending/licensing/LicenseValidator;->mCallback:Lcom/google/android/vending/licensing/LicenseCheckerCallback;

    invoke-interface {v0, p1}, Lcom/google/android/vending/licensing/LicenseCheckerCallback;->dontAllow(I)V

    goto :goto_0
.end method

 

 

Hope you learned something :)

 

Credits:

- @Ted2

Updated by Ted2
  • Like 3
  • Thanks 2

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

    • Lost Enders v1.9.6 +3 Cheats [ God / O-HK ]
      Modded/Hacked App: Lost Enders By makoto takeuchi
      Bundle ID: jp.co.kurukurugames.lostenders
      iTunes Store Link: https://apps.apple.com/us/app/lost-enders/id6502868763?uo=4


      Hack Features:
      - God Mode
      - One-Hit Kill


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Lost Enders v1.0.4 +2 Jailed Cheats [ God / O-HK ] - 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/
      • 70 replies
    • Octopus Feast v2.5.4 +1++ Jailed Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Octopus Feast By Rollic Games Oyun Yazilim ve Pazarlama Anonim Sirketi
      Bundle ID: com.twodestudios.octopusfeast
      iTunes Store Link: https://apps.apple.com/us/app/octopus-feast/id6499421924?uo=4


      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.


      Jailbreak required hack(s): [Mod Menu Hack] Octopus Feast v1.2.4 +1++ Cheat [ 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/
      • 50 replies
    • Octopus Feast v2.5.4 +1++ Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Octopus Feast By Rollic Games Oyun Yazilim ve Pazarlama Anonim Sirketi
      Bundle ID: com.twodestudios.octopusfeast
      iTunes Store Link: https://apps.apple.com/us/app/octopus-feast/id6499421924?uo=4


      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Octopus Feast v1.2.4 +1++ Jailed Cheat [ 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/
      • 51 replies
    • Cash King: Tycoon Earn Money v1.12.0 +4 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Cash King: Tycoon Earn Money By BFK ARASTIRMA GELISTIRME YAZILIM BILGISAYAR SANAYI VE TICARET ANONIM SIRKETI
      Bundle ID: com.tcn.cking
      iTunes Store Link: https://apps.apple.com/us/app/cash-king-tycoon-earn-money/id6479973614?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Unlimited Cash -> Will increase instead of decrease.
      - Unlimited Tickets -> Will increase instead of decrease.
      - Unlimited Health & Happiness -> Will not decrease.
      -- No Ads


      Jailbreak required hack(s): [Mod Menu Hack] Cash King: Tycoon Earn Money v0.7.2 +4 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/
        • Agree
      • 39 replies
    • Cash King: Tycoon Earn Money v1.12.0 +4 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Cash King: Tycoon Earn Money By BFK ARASTIRMA GELISTIRME YAZILIM BILGISAYAR SANAYI VE TICARET ANONIM SIRKETI
      Bundle ID: com.tcn.cking
      iTunes Store Link: https://apps.apple.com/us/app/cash-king-tycoon-earn-money/id6479973614?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Unlimited Cash -> Will increase instead of decrease.
      - Unlimited Tickets -> Will increase instead of decrease.
      - Unlimited Health & Happiness -> Will not decrease.
      -- No Ads


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Cash King: Tycoon Earn Money v0.7.2 +4 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/
      • 24 replies
    • Soccer Manager 2025 - Football v2.2.10 +2 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Soccer Manager 2025 - Football By INVINCIBLES STUDIO LTD
      Bundle ID: com.invinciblesstudioltd.soccermanager2025
      iTunes Store Link: https://apps.apple.com/us/app/soccer-manager-2025-football/id6449935779?uo=4


      Hack Features:
      - Unlimited Cash -> Accept a Sponsorship.
      - Unlimited Cash v2 -> Create a Club.
      - 1 Gold Cost -> Making purchases with gold will only use 1 gold. Make sure you have enough gold first! DO NOT USE IN THE SHOP!


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 141 replies
    • Smashero.io - Hack N Slash RPG v1.18.1 +2 Jailed Cheats [ God / O-HK ]
      Modded/Hacked App: Smashero.io - Hack N Slash RPG By CANNON CRACKER, Inc.
      Bundle ID: com.cc.Smashero
      iTunes Store Link: https://apps.apple.com/us/app/smashero-io-hack-n-slash-rpg/id6505129091?uo=4


      Hack Features:
      - God Mode
      - One-Hit Kill


      Jailbreak required hack(s): [Mod Menu Hack] Smashero.io - Hack N Slash RPG v3.3 +2 Cheats [ God / O-HK ] - 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/
      • 32 replies
    • Smashero.io - Hack N Slash RPG v1.18.1 +2 Cheats [ God / O-HK ]
      Modded/Hacked App: Smashero.io - Hack N Slash RPG By CANNON CRACKER, Inc.
      Bundle ID: com.cc.Smashero
      iTunes Store Link: https://apps.apple.com/us/app/smashero-io-hack-n-slash-rpg/id6505129091?uo=4


      Hack Features:
      - God Mode
      - One-Hit Kill


      Non-Jailbroken & No Jailbreak required hack(s): [No Jailbreak Required] Smashero.io - Hack N Slash RPG v3.3 +2 Jailed Cheats [ God / O-HK ] - 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/
      • 62 replies
    • Trash Tycoon Idle Empire v4.0.3 +1++ Jailed Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Trash Tycoon Idle Empire By SUPERSONIC STUDIOS LTD
      Bundle ID: com.funcell.trashinc
      iTunes Store Link: https://apps.apple.com/us/app/trash-tycoon-idle-empire/id1595274680?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.


      Jailbreak required hack(s): [Mod Menu Hack] Trash Tycoon Idle Empire v2.6.2 +1++ Cheat [ 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/
      • 68 replies
    • Trash Tycoon Idle Empire v4.0.3 +1++ Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Trash Tycoon Idle Empire By SUPERSONIC STUDIOS LTD
      Bundle ID: com.funcell.trashinc
      iTunes Store Link: https://apps.apple.com/us/app/trash-tycoon-idle-empire/id1595274680?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Trash Tycoon Idle Empire v2.6.2 +1++ Jailed Cheat [ 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/
      • 38 replies
    • Fishing Master v2.3 +1 Jailed Cheat [ Freeze Fish ]
      Modded/Hacked App: Fishing Master By Ark Game Limited
      Bundle ID: com.fishgame.fishon
      iTunes Store Link: https://apps.apple.com/us/app/fishing-master/id6471659176?uo=4


      Hack Features:
      - Freeze Fish -> Makes catching fish so much easier.


      Jailbreak required hack(s): [Mod Menu Hack] Fishing Master v1.3 +1 Cheat [ Freeze Fish ] - ViP 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/
        • Agree
        • Like
      • 34 replies
    • Fishing Master v2.3 +1 Cheat [ Freeze Fish ]
      Modded/Hacked App: Fishing Master By Ark Game Limited
      Bundle ID: com.fishgame.fishon
      iTunes Store Link: https://apps.apple.com/us/app/fishing-master/id6471659176?uo=4


      Hack Features:
      - Freeze Fish -> Makes catching fish so much easier.


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Fishing Master v1.3 +1 Jailed Cheat [ Freeze Fish ] - ViP Non-Jailbroken Hacks & 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/
      • 64 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