Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 1008 Bytes

1.extract_service_jar.md

File metadata and controls

38 lines (32 loc) · 1008 Bytes

Android source directories and jar building output

jar ouput directory

We can get the output information from makefile and package config.

# com.android.nfc_extras.xml
file="/system/framework/com.android.nfc_extras.jar"

target jar for analysis

Get all jar from android image.

adb pull system/framework

Android 6 use art runtime so the jar files are empty and the code is in oat and odex files.

  1. framework.jar framework\x86_64 boot.oat

  2. service.jar framework\oat\x86_64 services.odex

Convert to jar,https://medium.com/@_sushil/oat2dex-android-pentesting-6f99e9c57198 Use oat2dex to convert oat and odex to dex. And use d2j-dex2jar to convert dex to jar.

# framework.jar
java -jar oat2dex.jar boot boot.oat
d2j-dex2jar.bat dex/framework.dex
d2j-dex2jar.bat dex/framework-classes2.dex

# service.jar
java -jar oat2dex.jar services.odex dex/
d2j-dex2jar.bat services.dex

Poc app with hiden api

Use the framework.jar extract from Android image.