Andreas
Andreas

Reputation: 400

Access Android 5.1 Hidden API

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.

Upvotes: 2

Views: 2011

Answers (1)

xani
xani

Reputation: 804

From a similar Question:

For Lollipop the flow is little different:

  1. Get /system/framework/arm/boot.oat from lollipop device
  2. Use 'java -jar oat2dex.jar boot boot.oat'
  3. You will got 2 folders: dex and odex. Go to dex and make 'java -jar dex2jar.jar framework.dex'
  4. Rename resulting framework.jar to .zip, extract and find classes you need
  5. Go to [sdk_path]/platforms/[target_platform] and extract android.jar (first rename it to zip).
  6. Copy files from extracted framework to extracted android.jar. Then compress to zip and rename to .jar :)

See here

If you are using an emulator use "/system/framework/x86/boot.oat"

Upvotes: 3

Related Questions