|
|
|
[求助]请教如何获得当前运行的Activity
可以写个service去轮询当前的topActivity ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE); ComponentName cn = am.getRunningTasks(1).get(0).topActivity; String pkgname = cn.getPackageName(); String clsname = cn.getClassName(); |
|
[讨论]LBE免root的分析
LBE应该用的是 http://www.saurik.com/id/18/ 这篇所说的方法。 我获得lbe_patch里确实没有重复的文件,但是这个lbe_patch的zip格式是有问题的: CERT.RSA的Central Directory结构里,其file comment length为32768,根据http://www.saurik.com/id/18/所说,java用的是readShort(),这样读的长度是0,但是C++里读的仍然是32768。 所以java层的签名校验是,解析Central Directory的时候,会直接读取接下来的那个Central Directory, 接下来两个Central Directory结构的file name都是以"/"结尾的,如下图: 而在PackageParser.java (/frameworks/base/core/java/android/content/pm/PackageParser.java)中: isDirectory()函数如下: 所以遇到文件名以"/"结尾的就直接pass了。 这样LBE就在java层的校验上通过了,同时在C++层面,解析完CERT.RSA Central Directory 后是正确的AndroidManifest.xml和classes.dex, 46 + filename_length + filecomment_length(32768) + extra_field_length会正好跳到AndroidManifest.xml,这样代码加载没有问题,同时又绕过了签名校验。 不知道讲清楚没。 |
|
[讨论]LBE免root的分析
LBE应该用的是 http://www.saurik.com/id/18/ 这篇所说的方法。 我获得lbe_patch里确实没有重复的文件,但是这个lbe_patch的zip格式是有问题的: CERT.RSA的Central Directory结构里,其file comment length为32768,根据http://www.saurik.com/id/18/所说,java用的是readShort(),这样读的长度是0,但是C++里读的仍然是32768。 所以java层的签名校验是,解析Central Directory的时候,会直接读取接下来的那个Central Directory, 接下来两个Central Directory结构的file name都是以"/"结尾的,如下图: 而在PackageParser.java (/frameworks/base/core/java/android/content/pm/PackageParser.java)中: isDirectory()函数如下: 所以遇到文件名以"/"结尾的就直接pass了。 这样LBE就在java层的校验上通过了,同时在C++层面,解析完CERT.RSA Central Directory 后是正确的AndroidManifest.xml和classes.dex, 46 + filename_length + filecomment_length(32768) + extra_field_length会正好跳到AndroidManifest.xml,这样代码加载没有问题,同时又绕过了签名校验。 不知道讲清楚没。 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值