Jump to content

denizdeni

Newbie
  • Posts

    7
  • Joined

  • Last visited

Posts posted by denizdeni

  1. 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. :(

  2. 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

  3. 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

     

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