您好,登錄后才能下訂單哦!
這篇文章主要介紹“Android基礎(chǔ)逆向如何實(shí)現(xiàn)”的相關(guān)知識,小編通過實(shí)際案例向大家展示操作過程,操作方法簡單快捷,實(shí)用性強(qiáng),希望這篇“Android基礎(chǔ)逆向如何實(shí)現(xiàn)”文章能幫助大家解決問題。
自己玩
1.搜索“成功”
這里搜索到了三條數(shù)據(jù)
點(diǎn)進(jìn)去之后是這樣一個(gè)方法:
.method public static d()V .locals 4 const/4 v3, 0x1 const/4 v2, 0x0 sget v0, Lcom/xy/kom/d/bk;->i:I invoke-static {v0}, Lcom/xy/kom/g/p;->b(I)Z sget v0, Lcom/xy/kom/d/bk;->h:I invoke-static {v0}, Lcom/xy/kom/g/p;->c(I)Z sget-boolean v0, Lcom/xy/kom/d/bk;->G:Z if-eqz v0, :cond_4 sget-object v0, Lcom/xy/kom/GameActivity;->A:Lcom/xy/kom/GameActivity; iget-object v0, v0, Lcom/xy/kom/GameActivity;->m:Lcom/xy/kom/g/p; invoke-virtual {v0}, Lcom/xy/kom/g/p;->x()Ljava/util/ArrayList; move-result-object v0 invoke-static {}, Lcom/xy/kom/g/f;->l()Lcom/xy/kom/g/f; move-result-object v1 invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z :goto_0 sget-object v0, Lcom/xy/kom/GameActivity;->A:Lcom/xy/kom/GameActivity; iget-object v0, v0, Lcom/xy/kom/GameActivity;->m:Lcom/xy/kom/g/p; invoke-virtual {v0}, Lcom/xy/kom/g/p;->t()V sget-object v0, Lcom/xy/kom/GameActivity;->A:Lcom/xy/kom/GameActivity; iget-object v0, v0, Lcom/xy/kom/GameActivity;->r:Lcom/xy/kom/d/ei; if-eqz v0, :cond_0 sget-object v0, Lcom/xy/kom/GameActivity;->A:Lcom/xy/kom/GameActivity; iget-object v0, v0, Lcom/xy/kom/GameActivity;->r:Lcom/xy/kom/d/ei; invoke-virtual {v0, v2}, Lcom/xy/kom/d/ei;->a(I)V :cond_0 sget-object v0, Lcom/xy/kom/GameActivity;->A:Lcom/xy/kom/GameActivity; const/4 v1, 0x6 invoke-virtual {v0, v1}, Lcom/xy/kom/GameActivity;->a(I)V invoke-static {}, Lcom/xy/kom/d/bk;->h()V sget-object v0, Lcom/xy/kom/GameActivity;->A:Lcom/xy/kom/GameActivity; const-string v1, "\u8d2d\u4e70\u6210\u529f\uff01\u9053\u5177\u5df2\u53d1\u653e" invoke-static {v0, v1, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast; move-result-object v0 invoke-virtual {v0}, Landroid/widget/Toast;->show()V sget-object v0, Lcom/xy/kom/GameActivity;->N:Lcom/xy/kom/e/a; invoke-virtual {v0, v3}, Lcom/xy/kom/e/a;->a(I)V sput-boolean v3, Lcom/xy/kom/GameActivity;->M:Z invoke-static {}, Lcom/xy/kom/a/h;->f()I move-result v0 const/16 v1, 0xd if-ne v0, v1, :cond_2 sget v0, Lcom/xy/kom/GameActivity;->h:I const/4 v1, 0x2 if-ne v0, v1, :cond_2 sget-object v0, Lcom/xy/kom/GameActivity;->A:Lcom/xy/kom/GameActivity; iget-object v0, v0, Lcom/xy/kom/GameActivity;->m:Lcom/xy/kom/g/p; invoke-virtual {v0}, Lcom/xy/kom/g/p;->w()Ljava/util/ArrayList; move-result-object v0 invoke-interface {v0}, Ljava/util/List;->size()I move-result v1 sget-object v2, Lcom/xy/kom/GameActivity;->A:Lcom/xy/kom/GameActivity; iget-object v2, v2, Lcom/xy/kom/GameActivity;->m:Lcom/xy/kom/g/p; invoke-virtual {v2}, Lcom/xy/kom/g/p;->l()I move-result v2 if-ne v1, v2, :cond_1 sget-object v1, Lcom/xy/kom/GameActivity;->A:Lcom/xy/kom/GameActivity; iget-object v1, v1, Lcom/xy/kom/GameActivity;->r:Lcom/xy/kom/d/ei; invoke-interface {v0}, Ljava/util/List;->size()I move-result v2 add-int/lit8 v2, v2, -0x1 invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/xy/kom/g/f; invoke-virtual {v1, v0}, Lcom/xy/kom/d/ei;->b(Lcom/xy/kom/g/f;)V :cond_1 sget-object v0, Lcom/xy/kom/GameActivity;->A:Lcom/xy/kom/GameActivity; iget-object v0, v0, Lcom/xy/kom/GameActivity;->r:Lcom/xy/kom/d/ei; sget-object v1, Lcom/xy/kom/d/bk;->d:Lcom/xy/kom/g/f; invoke-virtual {v0, v1}, Lcom/xy/kom/d/ei;->a(Lcom/xy/kom/g/f;)V invoke-static {}, Lcom/xy/kom/d/bk;->m()V :cond_2 sget-boolean v0, Lcom/xy/kom/d/bk;->G:Z if-nez v0, :cond_3 const/4 v0, 0x0 sput-object v0, Lcom/xy/kom/d/bk;->d:Lcom/xy/kom/g/f; :cond_3 return-void :cond_4 sget-object v0, Lcom/xy/kom/GameActivity;->A:Lcom/xy/kom/GameActivity; iget-object v0, v0, Lcom/xy/kom/GameActivity;->m:Lcom/xy/kom/g/p; invoke-virtual {v0}, Lcom/xy/kom/g/p;->x()Ljava/util/ArrayList; move-result-object v0 sget-object v1, Lcom/xy/kom/d/bk;->d:Lcom/xy/kom/g/f; invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z goto/16 :goto_0.end method
這里找到一個(gè)調(diào)用成功的方法。我們繼續(xù)溯源查看。
發(fā)現(xiàn)是一個(gè)onResult方法。
解決方法:
(1)覆蓋switch失敗轉(zhuǎn)為成功。
(2)更改switch跳轉(zhuǎn)
(3)最后一種我最喜歡作用,思路最明確,使用goto進(jìn)行跳轉(zhuǎn)。跳轉(zhuǎn)到成功即可。
恩,改完之后匯編,整個(gè)游戲就破解好了。
沒什么好說的。
是成功的,懶的玩。不想發(fā)圖,自己測試吧,有疑問可以找我。
之前沒有找好,現(xiàn)在去找找。
找練習(xí)的APK的時(shí)候主要注意三點(diǎn)。
(1)最好是單機(jī)
(2)選擇大小的時(shí)候選小一點(diǎn)的,恩,反編譯快。我們的目的是為了練習(xí)。
(3)無殼,現(xiàn)階段可定脫不了殼。
找到了一個(gè)什么酷跑什么的游戲。
三步走
原版apk:練習(xí)傳送門在這里找,編號:2002
拿到游戲,首先就要玩一下是不,人家怎么購買的你總要知道吧。說不定會有新的發(fā)現(xiàn)。
搜索關(guān)鍵字“成功失敗”
點(diǎn)開之后進(jìn)去,發(fā)現(xiàn),原來還是一個(gè)onResult。
.method public onResult(ILjava/lang/String;Ljava/lang/Object;)V .locals 3 .param p1, "paramAnonymousInt" # I .param p2, "paramAnonymousString" # Ljava/lang/String; .param p3, "paramAnonymousObject" # Ljava/lang/Object; .prologue goto :pswitch_0 .line 26 packed-switch p1, :pswitch_data_0 .line 37 const-string v0, "Unity" new-instance v1, Ljava/lang/StringBuilder; const-string v2, "\u8d2d\u4e70\u9053\u5177\uff1a[" invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, "]\u53d6\u6d88\uff01" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I .line 38 invoke-static {}, Lcom/huibang/paopao/MainActivity;->access$0()Ljava/lang/String; move-result-object v0 invoke-static {}, Lcom/huibang/paopao/MainActivity;->access$1()Ljava/lang/String; move-result-object v1 const-string v2, "cancel" invoke-static {v0, v1, v2}, Lcom/unity3d/player/UnityPlayer;->UnitySendMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V .line 41 :goto_0 return-void .line 29 :pswitch_0 const-string v0, "Unity" new-instance v1, Ljava/lang/StringBuilder; const-string v2, "\u8d2d\u4e70\u9053\u5177\uff1a[" invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, "] \u6210\u529f\uff01" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I .line 30 invoke-static {}, Lcom/huibang/paopao/MainActivity;->access$0()Ljava/lang/String; move-result-object v0 invoke-static {}, Lcom/huibang/paopao/MainActivity;->access$1()Ljava/lang/String; move-result-object v1 const-string v2, "success" invoke-static {v0, v1, v2}, Lcom/unity3d/player/UnityPlayer;->UnitySendMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto :goto_0 .line 33 :pswitch_1 const-string v0, "Unity" new-instance v1, Ljava/lang/StringBuilder; const-string v2, "\u8d2d\u4e70\u9053\u5177\uff1a[" invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, "] \u5931\u8d25\uff01" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I .line 34 invoke-static {}, Lcom/huibang/paopao/MainActivity;->access$0()Ljava/lang/String; move-result-object v0 invoke-static {}, Lcom/huibang/paopao/MainActivity;->access$1()Ljava/lang/String; move-result-object v1 const-string v2, "fail" invoke-static {v0, v1, v2}, Lcom/unity3d/player/UnityPlayer;->UnitySendMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto :goto_0 .line 26 nop :pswitch_data_0 .packed-switch 0x1 :pswitch_0 :pswitch_1 .end packed-switch.end method
關(guān)于“Android基礎(chǔ)逆向如何實(shí)現(xiàn)”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識,可以關(guān)注億速云行業(yè)資訊頻道,小編每天都會為大家更新不同的知識點(diǎn)。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。