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

    • Heroes Crew: Strategy Defense v1.5.7 [+13 Cheats]
      Modded/Hacked App: Heroes Crew: Strategy Defense By AlohaFactory
      Bundle ID: com.overdogs.heroes
      App Store Link: https://apps.apple.com/us/app/heroes-crew-strategy-defense/id6744350078?uo=4



      🤩 Hack Features

      - Add Currency
      - Unlimited Items
      - Unlimited Property (Heroes, Relic etc)
      - Activate VVip (Use after tutorial and only in main menu)
      - Activate Premium Hunt Pass (Use after tutorial and only in main menu)
      - Unlimited Battle Currency (Always Will Increase)
      • 144 replies
    • Heroes Crew: Strategy Defense v1.5.7 [+13 Jailed Cheats]
      Modded/Hacked App: Heroes Crew: Strategy Defense By AlohaFactory
      Bundle ID: com.overdogs.heroes
      App Store Link: https://apps.apple.com/us/app/heroes-crew-strategy-defense/id6744350078?uo=4



      🤩 Hack Features

      - Add Currency
      - Unlimited Items
      - Unlimited Property (Heroes, Relic etc)
      - Activate VVip (Use after tutorial and only in main menu)
      - Activate Premium Hunt Pass (Use after tutorial and only in main menu)
      - Unlimited Battle Currency (Always Will Increase)
      • 59 replies
    • Fishing Travel v3.4.0 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Fishing Travel By Ark Game Limited
      Bundle ID: com.arkgame.ft
      App Store Link: https://apps.apple.com/ph/app/fishing-travel/id6505145935?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Cash
      - Easy Catch
      - DMG
      • 11 replies
    • Fishing Travel v3.4.0 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Fishing Travel By Ark Game Limited
      Bundle ID: com.arkgame.ft
      App Store Link: https://apps.apple.com/ph/app/fishing-travel/id6505145935?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Cash
      - Easy Catch
      - DMG
      • 9 replies
    • Spin Squad! v2.1.2 [ +2 Cheats ] Battle Coins
      Modded/Hacked App: Lucky Offense By Crater Co., Ltd.
      Bundle ID: com.percent.ios.luckyrolling
      iTunes Store Link: https://apps.apple.com/us/app/lucky-offense/id6511224968?uo=4


      🤩 Hack Features

      - Battle Coins
      - ATK
      - ATK Range
      - ATK Speed

      ATK Linked Enemy
      • 101 replies
    • Wasteland Survival TD v0.6.3 [ +5 Cheats ] Currency Max
      Modded/Hacked App: Wasteland Survival TD By Mildmania Oyun Sistemleri Anonim Sirketi
      Bundle ID: com.mildmania.wasteland
      App Store Link: https://apps.apple.com/ca/app/wasteland-survival-td/id6749257865?uo=4

      🤩 Hack Features

      - Unlimited Currency
      - Unlimited Resources
      - Unlimited Battle Coins
      - Always Last Wave
      - DMG
      • 4 replies
    • Wasteland Survival TD v0.6.3 [ +5 Jailed ] Currency Max
      Modded/Hacked App: Wasteland Survival TD By Mildmania Oyun Sistemleri Anonim Sirketi
      Bundle ID: com.mildmania.wasteland
      App Store Link: https://apps.apple.com/ca/app/wasteland-survival-td/id6749257865?uo=4

      🤩 Hack Features

      - Unlimited Currency
      - Unlimited Resources
      - Unlimited Battle Coins
      - Always Last Wave
      - DMG
      • 7 replies
    • Block Kingdom v0.04.46 [ +13 Cheats ] Cheat Menu
      Modded/Hacked App: Block Kingdom By Tripledot Studios Limited
      Bundle ID: com.tripledot.blastroyale
      App Store Link: https://apps.apple.com/ph/app/block-kingdom/id6741105808?uo=4


      🤩 Hack Features

      - Cheat Menu / Play Match Then Back Show Menu Button©️

      • 2 replies
    • Block Kingdom v0.04.46 [ +13 Jailed ] Cheat Menu
      Modded/Hacked App: Block Kingdom By Tripledot Studios Limited
      Bundle ID: com.tripledot.blastroyale
      App Store Link: https://apps.apple.com/ph/app/block-kingdom/id6741105808?uo=4


      🤩 Hack Features

      - Cheat Menu / Play Match Then Back Show Menu Button ©️


      • 4 replies
    • Weapon Merge Battle v1.5 [ +3 Cheats ] Never Die
      Modded/Hacked App: Weapon Merge Battle By Rio Master DMCC
      Bundle ID: com.riomaster.weaponmerge
      App Store Link: https://apps.apple.com/ca/app/weapon-merge-battle/id6742321536?uo=4


      🤩 Hack Features

      - HP
      - ATK
      - DEF
      • 2 replies
    • Weapon Merge Battle v1.5 [ +3 Jailed ] Never Die
      Modded/Hacked App: Weapon Merge Battle By Rio Master DMCC
      Bundle ID: com.riomaster.weaponmerge
      App Store Link: https://apps.apple.com/ca/app/weapon-merge-battle/id6742321536?uo=4

       
      🤩 Hack Features

      - HP
      - ATK
      - DEF
      • 3 replies
    • Yukon: Family Adventure v1.67.3 [ +4++ Cheats ] Everything Unlimited
      Modded/Hacked App: Yukon: Family Adventure By Enixan Europe Limited
      Bundle ID: com.enixan.yukon.family.adventure
      iTunes Store Link: https://apps.apple.com/us/app/yukon-family-adventure/id6455041311?uo=4


      🤩 Hack Features

      - Gems

      - Energy

      - Items

      - EXP
      • 24 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