访问的是Android 5.1隐藏API [英] Access Android 5.1 Hidden API
问题描述
我试图访问一个隐藏API VOM的是Android 5.1(API等级22),如本文的https://devmaze.word$p$pss.com/2011/01/18/using-com-android-internal-part-2-hacking-around/
我的问题是,从仿真器framework.jar文件,我的Nexus 7只有309个字节大,不包含classes.dex文件。
从哪里我能得到这个framework.jar或者为API级别21或22已经修改的android.jar?
更新1:我与亚洲开发银行,而不是试图DDMS直接一个更多的时间,同样的结果。
平台工具$ ./adb拉/system/framework/framework.jar
214 KB /秒(在0.001S 309字节)
更新2:我是能够得到一个包含classes.dex文件4.4.2仿真器framework.jar文件。我会离开的问题公开,因为我需要一个最新版本。
从一个类似的问题:
有关棒棒糖流量稍有不同:
- 从棒棒糖设备/system/framework/arm/boot.oat获取
- 使用Java的罐子oat2dex.jar启动boot.oat
- 您将得到2个文件夹:DEX和ODEX。转到DEX,使Java的罐子dex2jar.jar framework.dex
- 重命名导致framework.jar为.zip,提取和查找类需要
- 转到[sdk_path] /平台/ [TARGET_PLATFORM]和提取的android.jar(第一重命名为ZIP)。
摘自框架提取的android.jar- 复制文件。那么COM preSS来压缩并重新命名为.JAR:)
块引用>如果您使用的是仿真器使用/system/framework/x86/boot.oat
I try to access a hidden API vom Android 5.1 (API Level 22) as described in this article https://devmaze.wordpress.com/2011/01/18/using-com-android-internal-part-2-hacking-around/
My problem is that the framework.jar file from the emulator and my nexus 7 is only 309 bytes large and don't contain a classes.dex file.
From where I can get this framework.jar or maybe a already modified android.jar for API Level 21 or 22?
Update 1: I tried it one more time directly with adb instead of DDMS, same result
platform-tools$ ./adb pull /system/framework/framework.jar 214 KB/s (309 bytes in 0.001s)
Update 2: I was able to get a framework.jar file from the 4.4.2 Emulator that contains a classes.dex file. I will leave the question open, because I need a current version.
解决方案From a similar Question:
For Lollipop the flow is little different:
- Get /system/framework/arm/boot.oat from lollipop device
- Use 'java -jar oat2dex.jar boot boot.oat'
- You will got 2 folders: dex and odex. Go to dex and make 'java -jar dex2jar.jar framework.dex'
- Rename resulting framework.jar to .zip, extract and find classes you need
- Go to [sdk_path]/platforms/[target_platform] and extract android.jar (first rename it to zip).
- Copy files from extracted framework to extracted android.jar. Then compress to zip and rename to .jar :)
If you are using an emulator use "/system/framework/x86/boot.oat"
这篇关于访问的是Android 5.1隐藏API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!