apk反编译(2)smali语言及文件
Smali语言是Davlik的虚拟机使用的一种语言,用toolapk反编译apk后,可以见到大量的.smali文件。
可以按照smali语法对其修改,然后重新生成一个未签名的apk。
下面是一个示例:
1 .class final Lcom/tencent/smtt/sdk/QbSdk$3; 2 .super Ljava/lang/Object; 3 .source "SourceFile" 4 5 # interfaces 6 .implements Lcom/tencent/smtt/sdk/QbSdk$b; 7 8 9 # annotations 10 .annotation system Ldalvik/annotation/EnclosingClass; 11 value = Lcom/tencent/smtt/sdk/QbSdk; 12 .end annotation 13 14 .annotation system Ldalvik/annotation/InnerClass; 15 accessFlags = 0x8 16 name = null 17 .end annotation 18 19 20 # direct methods 21 .method constructor <init>()V 22 .locals 1 23 24 .prologue 25 .line 1261 26 invoke-direct {p0}, Ljava/lang/Object;-><init>()V 27 28 sget-boolean v0, Lcom/tencent/mm/BuildConfig;->SKIP:Z 29 30 if-nez v0, :cond_0 31 32 invoke-static {}, Lcom/tencent/mm/A;->a()V 33 34 :cond_0 35 return-void 36 .end method 37 38 39 # virtual methods 40 .method public final onDownloadFinish(I)V 41 .locals 1 42 43 .prologue 44 .line 1265 45 const/4 v0, 0x0 46 47 sput-boolean v0, Lcom/tencent/smtt/sdk/k;->llf:Z 48 49 .line 1266 50 invoke-static {}, Lcom/tencent/smtt/sdk/QbSdk;->bgT()Lcom/tencent/smtt/sdk/n; 51 52 move-result-object v0 53 54 if-eqz v0, :cond_0 55 56 .line 1267 57 invoke-static {}, Lcom/tencent/smtt/sdk/QbSdk;->bgT()Lcom/tencent/smtt/sdk/n; 58 59 move-result-object v0 60 61 invoke-interface {v0, p1}, Lcom/tencent/smtt/sdk/n;->onDownloadFinish(I)V 62 63 .line 1268 64 :cond_0 65 sget-object v0, Lcom/tencent/smtt/sdk/QbSdk;->mTbsListenerDebug:Lcom/tencent/smtt/sdk/QbSdk$b; 66 67 if-eqz v0, :cond_1 68 69 .line 1269 70 sget-object v0, Lcom/tencent/smtt/sdk/QbSdk;->mTbsListenerDebug:Lcom/tencent/smtt/sdk/QbSdk$b; 71 72 invoke-interface {v0, p1}, Lcom/tencent/smtt/sdk/QbSdk$b;->onDownloadFinish(I)V 73 74 .line 1270 75 :cond_1 76 return-void 77 .end method 78 79 .method public final onDownloadProgres(I)V 80 .locals 1 81 82 .prologue 83 .line 1286 84 sget-object v0, Lcom/tencent/smtt/sdk/QbSdk;->mTbsListenerDebug:Lcom/tencent/smtt/sdk/QbSdk$b; 85 86 if-eqz v0, :cond_0 87 88 .line 1287 89 sget-object v0, Lcom/tencent/smtt/sdk/QbSdk;->mTbsListenerDebug:Lcom/tencent/smtt/sdk/QbSdk$b; 90 91 invoke-interface {v0, p1}, Lcom/tencent/smtt/sdk/QbSdk$b;->onDownloadProgres(I)V 92 93 .line 1288 94 :cond_0 95 return-void 96 .end method 97 98 .method public final onInstallFinish(I)V 99 .locals 1 100 101 .prologue 102 const/4 v0, 0x0 103 104 .line 1275 105 invoke-static {v0}, Lcom/tencent/smtt/sdk/QbSdk;->setTBSInstallingStatus(Z)V 106 107 .line 1277 108 sput-boolean v0, Lcom/tencent/smtt/sdk/k;->llf:Z 109 110 .line 1278 111 invoke-static {}, Lcom/tencent/smtt/sdk/QbSdk;->bgT()Lcom/tencent/smtt/sdk/n; 112 113 move-result-object v0 114 115 if-eqz v0, :cond_0 116 117 .line 1279 118 invoke-static {}, Lcom/tencent/smtt/sdk/QbSdk;->bgT()Lcom/tencent/smtt/sdk/n; 119 120 move-result-object v0 121 122 invoke-interface {v0, p1}, Lcom/tencent/smtt/sdk/n;->onInstallFinish(I)V 123 124 .line 1280 125 :cond_0 126 sget-object v0, Lcom/tencent/smtt/sdk/QbSdk;->mTbsListenerDebug:Lcom/tencent/smtt/sdk/QbSdk$b; 127 128 if-eqz v0, :cond_1 129 130 .line 1281 131 sget-object v0, Lcom/tencent/smtt/sdk/QbSdk;->mTbsListenerDebug:Lcom/tencent/smtt/sdk/QbSdk$b; 132 133 invoke-interface {v0, p1}, Lcom/tencent/smtt/sdk/QbSdk$b;->onInstallFinish(I)V 134 135 .line 1282 136 :cond_1 137 return-void 138 .end method