Jump to content

7 posts in this topic

Recommended Posts

Posted

I trying to mod a apk. I created a small smali code for check device id and if id if not equal its closing the app. But its crashing instantly (not exitting). I adding these lines to OnStart function. And extra information i modding cocos2dx game.

The code:

invoke-virtual {p0}, Lorg/cocos2dx/cpp/AppActivity;->getApplicationContext()Landroid/content/Context;

move-result-object v0

invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v0

const-string v1, "android_id"

invoke-static {v0, v1}, Landroid/provider/Settings$Secure;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;

move-result-object v0

const-string v1, "810b0fb3128d05bc"

if-eq v0, v1, :cond_19

const/4 v0, 0x1

invoke-static {v0}, Ljava/lang/System;->exit(I)V

:cond_19

 

Posted (edited)
.method public checkDeviceID()V
    .registers 5

    .prologue
    .line 28
    invoke-virtual {p0}, Lorg/cocos2dx/cpp/AppActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    const-string v3, "android_id"

    invoke-static {v2, v3}, Landroid/provider/Settings$Secure;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 31
    .local v0, "android_id":Ljava/lang/String;
    const-string v1, "810b0fb3128d05bc"

    .line 33
    .local v1, "b":Ljava/lang/String;
    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_19

    const-string v2, "IOSGods @Sinrason"

    const-string v3, "They are equal"

    invoke-static {v2, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 34
    :cond_19
    return-void
.end method

 

Check with this, an activity is already an instance of Context so u should be fine by calling getContentResolver directly i think.

Updated by Sinrason
Posted

not worked

Quote

 

.method public checkDeviceID()V
    .registers 5

    .prologue
    .line 28
    invoke-virtual {p0}, Lorg/cocos2dx/cpp/AppActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    const-string v3, "android_id"

    invoke-static {v2, v3}, Landroid/provider/Settings$Secure;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 31
    .local v0, "android_id":Ljava/lang/String;
    const-string v1, "810b0fb3128d05bc"

    .line 33
    .local v1, "b":Ljava/lang/String;
    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_19

    const-string v2, "IOSGods @Sinrason"

    const-string v3, "They are equal"

    invoke-static {v2, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 34
    :cond_19
    return-void
.end method

.method public onStart()V
    .locals 3
    
    invoke-virtual {p0}, Lorg/cocos2dx/cpp/AppActivity;->checkDeviceID()V
    

 

 

24 minutes ago, Sinrason said:

.method public checkDeviceID()V
    .registers 5

    .prologue
    .line 28
    invoke-virtual {p0}, Lorg/cocos2dx/cpp/AppActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    const-string v3, "android_id"

    invoke-static {v2, v3}, Landroid/provider/Settings$Secure;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 31
    .local v0, "android_id":Ljava/lang/String;
    const-string v1, "810b0fb3128d05bc"

    .line 33
    .local v1, "b":Ljava/lang/String;
    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_19

    const-string v2, "IOSGods @Sinrason"

    const-string v3, "They are equal"

    invoke-static {v2, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 34
    :cond_19
    return-void
.end method

 

Check with this, an activity is already an instance of Context so u should be fine by calling getContentResolver directly i think.

i posted my code

Posted

wdym not work, give more info about what happens, if its still crashing then just put logs to check where it crashes, fire up cmd or from the phone terminal and type:

adb logcat -s "Testing" (if u have adb and u are in windows)

if u have a terminal in the phone just do
logcat -s "Testing"

then on the smali just put different logs like so:
 

const-string v2, "Testing"

const-string v3, "Passed first call"

invoke-static {v2, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

............. (call another function)

const-string v2, "Testing"

const-string v3, "Passed second call"

invoke-static {v2, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

then open the apk and check in the logcat what passes and what not.

 

  • Informative 1
Posted
5 hours ago, Sinrason said:

wdym not work, give more info about what happens, if its still crashing then just put logs to check where it crashes, fire up cmd or from the phone terminal and type:


adb logcat -s "Testing" (if u have adb and u are in windows)

if u have a terminal in the phone just do
logcat -s "Testing"

then on the smali just put different logs like so:
 


const-string v2, "Testing"

const-string v3, "Passed first call"

invoke-static {v2, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

............. (call another function)

const-string v2, "Testing"

const-string v3, "Passed second call"

invoke-static {v2, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

then open the apk and check in the logcat what passes and what not.

 

i figured out but i have a another issue if main package name is changed protection is not working and closing app. :(

Posted
1 hour ago, denizdeni said:

i figured out but i have a another issue if main package name is changed protection is not working and closing app. :(

Why would u change the package name? If someone tries to change it then they might not have nice intentions, just leave it to crash lol

Posted
On 3/8/2020 at 4:10 AM, Sinrason said:

Why would u change the package name? If someone tries to change it then they might not have nice intentions, just leave it to crash lol

nah i just trying to play normal game and modded game same time.

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

    • Wukong's Arsenal:Rogue RPG v1.8.1 [+3 Cheats]
      Modded/Hacked App: Wukong's Arsenal:Rogue RPG By HangZhou Mai Di Wen Network Technology Co., Ltd
      Bundle ID: com.medivhgame.wukongfIght.ios
      App Store Link: https://apps.apple.com/us/app/wukongs-arsenal-rogue-rpg/id6733239805?uo=4

       

      🤩 Hack Features

      - Never Die
      - Unlimited Currency
      - Remove Ads
      • 6 replies
    • Wukong's Arsenal:Rogue RPG v1.8.1 [+3 Jailed Cheats]
      Modded/Hacked App: Wukong's Arsenal:Rogue RPG By HangZhou Mai Di Wen Network Technology Co., Ltd
      Bundle ID: com.medivhgame.wukongfIght.ios
      App Store Link: https://apps.apple.com/us/app/wukongs-arsenal-rogue-rpg/id6733239805?uo=4



      🤩 Hack Features

      - Never Die
      - Unlimited Currency
      - Remove Ads
      • 2 replies
    • Townfall: Zombie Tower Defense v20.1.5 [+4 Cheats]
      Modded/Hacked App: Townfall: Zombie Tower Defense By Sugarscone
      Bundle ID: com.nmg.townfall.ios
      App Store Link: https://apps.apple.com/us/app/townfall-zombie-tower-defense/id6476259669?uo=4



      🤩 Hack Features

      - No Reload
      - Add Gold (Enable inside battle and finish stage)
      - Add Wood (Enable inside battle)
      - Skip Wave (Enable inside wave)
      • 7 replies
    • Townfall: Zombie Tower Defense v20.1.5 [+4 Jailed Cheats]
      Modded/Hacked App: Townfall: Zombie Tower Defense By Sugarscone
      Bundle ID: com.nmg.townfall.ios
      App Store Link: https://apps.apple.com/us/app/townfall-zombie-tower-defense/id6476259669?uo=4



      🤩 Hack Features

      - No Reload
      - Add Gold (Enable inside battle and finish stage)
      - Add Wood (Enable inside battle)
      - Skip Wave (Enable inside wave)
      • 8 replies
    • Kingdom Survivors v1.0730 [+4 Cheats]
      Modded/Hacked App: Kingdom Survivors By a plant standing on a chair Game Studio HB
      Bundle ID: com.DefaultCompany.MonsJacobSurvivorGame
      iTunes Store Link: https://apps.apple.com/us/app/kingdom-survivors/id1662497248?uo=4



      🚀 Hack Features

      - Never Die
      - Gain Exp (Toggle On gives you exp in battle)
      - Unlock All Characters
      - Add Currency
      • 18 replies
    • Kingdom Survivors v1.0730 [+4 Jailed Cheats]
      Modded/Hacked App: Kingdom Survivors By a plant standing on a chair Game Studio HB
      Bundle ID: com.DefaultCompany.MonsJacobSurvivorGame
      iTunes Store Link: https://apps.apple.com/us/app/kingdom-survivors/id1662497248?uo=4



      Hack Features:

      - Never Die
      - Gain Exp (Toggle On gives you exp in battle)
      - Unlock All Characters
      - Add Currency

        • Winner
      • 14 replies
    • Bounce Defense v1.2.5 [+5 Jailed Cheats]
      Modded/Hacked App: Bounce Defense By Voodoo
      Bundle ID: com.minigamelab.bouncedefense
      App Store Link: https://apps.apple.com/us/app/bounce-defense/id6740627201?uo=4



      🤩 Hack Features

      - Add Currency
      - Add Battle Currency (Enable inside battle)
      - Never Die
      - Unlock All Towers
      - Unlimited Tower Cards
      • 5 replies
    • Bounce Defense v1.2.5 [+5 Cheats]
      Modded/Hacked App: Bounce Defense By Voodoo
      Bundle ID: com.minigamelab.bouncedefense
      App Store Link: https://apps.apple.com/us/app/bounce-defense/id6740627201?uo=4



      🤩 Hack Features

      - Add Currency
      - Add Battle Currency (Enable inside battle)
      - Never Die
      - Unlock All Towers
      - Unlimited Tower Cards
        • Like
      • 3 replies
    • Hex Warriors v2.0.5 Cheat Menu [+10 Jailed Cheats]
      Modded/Hacked App: Hex Warriors By Voodoo
      Bundle ID: com.dong.hexwarriors
      App Store Link: https://apps.apple.com/us/app/hex-warriors/id6736930021?uo=4


       

      🤩 Hack Features

      Cheat Menu (Currency, Auto Win, Cards and more)
      • 4 replies
    • Hex Warriors v2.0.5 Cheat Menu [+10 Cheats]
      Modded/Hacked App: Hex Warriors By Voodoo
      Bundle ID: com.dong.hexwarriors
      App Store Link: https://apps.apple.com/us/app/hex-warriors/id6736930021?uo=4



      🤩 Hack Features

      - Cheat Menu (Currency, Auto Win, Cards and more)
      • 3 replies
    • Subway Surfers v3.46.0 +22 Jailed Cheats [ Currencies + More ]
      Modded/Hacked App: Subway Surfers By Sybo Games ApS
      Bundle ID: com.kiloo.subwaysurfers
      iTunes Store Link: https://apps.apple.com/us/app/subway-surfers/id512939461?uo=4


      Hack Features:
      - Unlimited Currencies
      - Freeze Currencies
      - Free In-App Purchases
      - All Characters Unlocked
      - All Boards Unlocked
      - God Mode
      - No Stumble
      - Score Multiplier
      - Speed Multiplier
      - Gravity Multiplier
      - Jump Height Multiplier
      - Air Jump Height Multiplier
      - Unlimited Jumps
      - Unlimited Powers
      - Instant Lane Change
      - Freeze Trains
      - No Clip
      - Disable All Pickup
      - No Revive Cost
      - Unlimited Jetpack Time
      - Camera Stops
      - Camera Follows


      Jailbreak required hack(s): [Mod Menu Hack] Subway Surfers v3.40.0 +20 Cheats [ Currencies + More ] - 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 39 replies
    • Subway Surfers v3.46.0 +22 Cheats [ Currencies + More ]
      Modded/Hacked App: Subway Surfers By Sybo Games ApS
      Bundle ID: com.kiloo.subwaysurfers
      iTunes Store Link: https://apps.apple.com/us/app/subway-surfers/id512939461?uo=4


      Hack Features:
      - Unlimited Currencies
      - Freeze Currencies
      - Free In-App Purchases
      - All Characters Unlocked
      - All Boards Unlocked
      - God Mode
      - No Stumble
      - Score Multiplier
      - Speed Multiplier
      - Gravity Multiplier
      - Jump Height Multiplier
      - Air Jump Height Multiplier
      - Unlimited Jumps
      - Unlimited Powers
      - Instant Lane Change
      - Freeze Trains
      - No Clip
      - Disable All Pickup
      - No Revive Cost
      - Unlimited Jetpack Time
      - Camera Stops
      - Camera Follows


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Subway Surfers v3.40.0 +20 Jailed Cheats [ Currencies + More ] - 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/
        • Agree
        • Haha
        • Thanks
        • Like
      • 45 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