Smali语言是Davlik的虚拟机使用的一种语言,用toolapk反编译apk后,可以见到大量的.smali文件。
可以按照smali语法对其修改,然后重新生成一个未签名的apk。
下面是一个示例:
.class final Lcom/tencent/smtt/sdk/QbSdk$;
.super Ljava/lang/Object;
.source "SourceFile" # interfaces
.implements Lcom/tencent/smtt/sdk/QbSdk$b; # annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/tencent/smtt/sdk/QbSdk;
.end annotation .annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x8
name = null
.end annotation # direct methods
.method constructor <init>()V
.locals .prologue
.line
invoke-direct {p0}, Ljava/lang/Object;-><init>()V sget-boolean v0, Lcom/tencent/mm/BuildConfig;->SKIP:Z if-nez v0, :cond_0 invoke-static {}, Lcom/tencent/mm/A;->a()V :cond_0
return-void
.end method # virtual methods
.method public final onDownloadFinish(I)V
.locals .prologue
.line
const/ v0, 0x0 sput-boolean v0, Lcom/tencent/smtt/sdk/k;->llf:Z .line
invoke-static {}, Lcom/tencent/smtt/sdk/QbSdk;->bgT()Lcom/tencent/smtt/sdk/n; move-result-object v0 if-eqz v0, :cond_0 .line
invoke-static {}, Lcom/tencent/smtt/sdk/QbSdk;->bgT()Lcom/tencent/smtt/sdk/n; move-result-object v0 invoke-interface {v0, p1}, Lcom/tencent/smtt/sdk/n;->onDownloadFinish(I)V .line
:cond_0
sget-object v0, Lcom/tencent/smtt/sdk/QbSdk;->mTbsListenerDebug:Lcom/tencent/smtt/sdk/QbSdk$b; if-eqz v0, :cond_1 .line
sget-object v0, Lcom/tencent/smtt/sdk/QbSdk;->mTbsListenerDebug:Lcom/tencent/smtt/sdk/QbSdk$b; invoke-interface {v0, p1}, Lcom/tencent/smtt/sdk/QbSdk$b;->onDownloadFinish(I)V .line
:cond_1
return-void
.end method .method public final onDownloadProgres(I)V
.locals .prologue
.line
sget-object v0, Lcom/tencent/smtt/sdk/QbSdk;->mTbsListenerDebug:Lcom/tencent/smtt/sdk/QbSdk$b; if-eqz v0, :cond_0 .line
sget-object v0, Lcom/tencent/smtt/sdk/QbSdk;->mTbsListenerDebug:Lcom/tencent/smtt/sdk/QbSdk$b; invoke-interface {v0, p1}, Lcom/tencent/smtt/sdk/QbSdk$b;->onDownloadProgres(I)V .line
:cond_0
return-void
.end method .method public final onInstallFinish(I)V
.locals .prologue
const/ v0, 0x0 .line
invoke-static {v0}, Lcom/tencent/smtt/sdk/QbSdk;->setTBSInstallingStatus(Z)V .line
sput-boolean v0, Lcom/tencent/smtt/sdk/k;->llf:Z .line
invoke-static {}, Lcom/tencent/smtt/sdk/QbSdk;->bgT()Lcom/tencent/smtt/sdk/n; move-result-object v0 if-eqz v0, :cond_0 .line
invoke-static {}, Lcom/tencent/smtt/sdk/QbSdk;->bgT()Lcom/tencent/smtt/sdk/n; move-result-object v0 invoke-interface {v0, p1}, Lcom/tencent/smtt/sdk/n;->onInstallFinish(I)V .line
:cond_0
sget-object v0, Lcom/tencent/smtt/sdk/QbSdk;->mTbsListenerDebug:Lcom/tencent/smtt/sdk/QbSdk$b; if-eqz v0, :cond_1 .line
sget-object v0, Lcom/tencent/smtt/sdk/QbSdk;->mTbsListenerDebug:Lcom/tencent/smtt/sdk/QbSdk$b; invoke-interface {v0, p1}, Lcom/tencent/smtt/sdk/QbSdk$b;->onInstallFinish(I)V .line
:cond_1
return-void
.end method