博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
android 反编译,反,注射LOG
阅读量:5942 次
发布时间:2019-06-19

本文共 2849 字,大约阅读时间需要 9 分钟。

反编译smali注射显示LOG该代码。以后使用:

.class public Lnet/iaround/connector/DebugClass;.super Ljava/lang/Object;.source "DebugClass.java"# direct methods.method public constructor 
()V .locals 0 .prologue .line 5 invoke-direct {p0}, Ljava/lang/Object;->
()V return-void.end method.method public static showLog(Ljava/lang/String;)V .locals 5 .parameter "log" .prologue .line 9 new-instance v2, Ljava/lang/Exception; invoke-direct {v2}, Ljava/lang/Exception;->
()V invoke-virtual {v2}, Ljava/lang/Exception;->getStackTrace()[Ljava/lang/StackTraceElement; move-result-object v2 const/4 v3, 0x1 aget-object v1, v2, v3 .line 10 .local v1, traceElement:Ljava/lang/StackTraceElement; new-instance v2, Ljava/lang/StringBuilder; invoke-virtual {v1}, Ljava/lang/StackTraceElement;->getClassName()Ljava/lang/String; move-result-object v3 invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String; move-result-object v3 invoke-direct {v2, v3}, Ljava/lang/StringBuilder;->
(Ljava/lang/String;)V const-string v3, "." invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v1}, Ljava/lang/StackTraceElement;->getMethodName()Ljava/lang/String; move-result-object v3 invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 const-string v3, ":\t" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 .line 11 .local v0, pre:Ljava/lang/String; const-string v2, "yangjianchao" new-instance v3, Ljava/lang/StringBuilder; invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String; move-result-object v4 invoke-direct {v3, v4}, Ljava/lang/StringBuilder;->
(Ljava/lang/String;)V invoke-virtual {v3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v3 invoke-static {v2, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I .line 12 return-void.end method# virtual methods.method public o()Ljava/lang/String; .locals 1 .prologue .line 15 const-string v0, "888888888888888" .line 21 .local v0, rtn:Ljava/lang/String; return-object v0.end method

调用方法:

invoke-static {p2}, Lnet/iaround/connector/DebugClass;->showLog(Ljava/lang/String;)V

版权声明:本文博客原创文章,博客,未经同意,不得转载。

你可能感兴趣的文章
Microsoft Excel软件打开文件出现文件的格式与文件扩展名指定格式不一致?
查看>>
ios ble 参考
查看>>
linux中注册系统服务—service命令的原理通俗
查看>>
基于托管C++的增删改查及异步回调小程序
查看>>
Oracle DBMS_STATS 包 和 Analyze 命令的区别
查看>>
给Visual Studio 2010中文版添加Windows Phone 7模板
查看>>
linux下基本命令
查看>>
windows server 2008R2 上安装配置freesshd
查看>>
手动删除SVCH0ST.EXE的方法
查看>>
已释放的栈内存
查看>>
Android网络之数据解析----SAX方式解析XML数据
查看>>
Java递归列出所有文件和文件夹
查看>>
[关于SQL]查询成绩都大于80分的学生
查看>>
Delphi(Tuxedo,BDE,ADO)三合一数据集组件HsTxQuery
查看>>
java之ibatis数据缓存
查看>>
“TNS-03505:无法解析名称”问题解决一例
查看>>
LeetCode - Longest Common Prefix
查看>>
Android图片处理
查看>>
2015年第21本:万万没想到,用理工科思维理解世界
查看>>
大家谈谈公司里的项目经理角色及职责都是干什么的?
查看>>