Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to explain Android 9 deodex #47

Closed
sputnick-dev opened this issue Jan 18, 2019 · 4 comments
Closed

Need to explain Android 9 deodex #47

sputnick-dev opened this issue Jan 18, 2019 · 4 comments
Labels

Comments

@sputnick-dev
Copy link

sputnick-dev commented Jan 18, 2019

It's very confusing, not obvious what is the way to deodex Android 9.

Can you please send me a draft of the list of the commands to run ?

I will elaborate on this and create a pull request to have a clear doc with pleasure, or better a bash script. It's my job !

I try to deodex vdex files to enable signature spoofing to install MicroG via NanoDroid for LineageOS 16.0 alpha (Android 9.0 Pie SM-A520F device)

I follow instructions from here

I wonder how to use vdexextractor/tools/deodex/run.sh

What I have tried so far :

adb shell
$ find / -name '*.vdex' 2>/dev/null > /sdcard/list.vdex

# from Linux
$ adb pull /sdcard/list.vdex ~
$ while read a; do
    mkdir -p ./${a%/*}
    adb pull "$a" ./$a
done < ~/list.vdex
$ find system
system/system/framework/boot-android.test.base.vdex
system/system/framework/arm64/boot-android.test.base.vdex
system/system/framework/arm64/boot-ext.vdex
system/system/framework/arm64/boot-telephony-common.vdex
system/system/framework/arm64/boot-conscrypt.vdex
system/system/framework/arm64/boot-android.hidl.base-V1.0-java.vdex
system/system/framework/arm64/boot-framework-oahl-backward-compatibility.vdex
system/system/framework/arm64/boot-okhttp.vdex
system/system/framework/arm64/boot-bouncycastle.vdex
system/system/framework/arm64/boot-android.hidl.manager-V1.0-java.vdex
system/system/framework/arm64/boot-ims-common.vdex
system/system/framework/arm64/boot-voip-common.vdex
system/system/framework/arm64/boot.vdex
system/system/framework/arm64/boot-core-libart.vdex
system/system/framework/arm64/boot-apache-xml.vdex
system/system/framework/arm64/boot-framework.vdex
system/system/framework/boot-ext.vdex
system/system/framework/boot-telephony-common.vdex
system/system/framework/boot-conscrypt.vdex
system/system/framework/boot-android.hidl.base-V1.0-java.vdex
system/system/framework/boot-framework-oahl-backward-compatibility.vdex
system/system/framework/boot-okhttp.vdex
system/system/framework/boot-bouncycastle.vdex
system/system/framework/oat/arm64/wifi-service.vdex
system/system/framework/oat/arm64/com.android.location.provider.vdex
system/system/framework/oat/arm64/org.lineageos.hardware.vdex
system/system/framework/oat/arm64/org.lineageos.platform.vdex
system/system/framework/oat/arm64/ethernet-service.vdex
system/system/framework/oat/arm64/services.vdex
system/system/framework/boot-android.hidl.manager-V1.0-java.vdex
system/system/framework/boot-ims-common.vdex
system/system/framework/boot-voip-common.vdex
system/system/framework/boot.vdex
system/system/framework/boot-core-libart.vdex
system/system/framework/arm/boot-android.test.base.vdex
system/system/framework/arm/boot-ext.vdex
system/system/framework/arm/boot-telephony-common.vdex
system/system/framework/arm/boot-conscrypt.vdex
system/system/framework/arm/boot-android.hidl.base-V1.0-java.vdex
system/system/framework/arm/boot-framework-oahl-backward-compatibility.vdex
system/system/framework/arm/boot-okhttp.vdex
system/system/framework/arm/boot-bouncycastle.vdex
system/system/framework/arm/boot-android.hidl.manager-V1.0-java.vdex
system/system/framework/arm/boot-ims-common.vdex
system/system/framework/arm/boot-voip-common.vdex
system/system/framework/arm/boot.vdex
system/system/framework/arm/boot-core-libart.vdex
system/system/framework/arm/boot-apache-xml.vdex
system/system/framework/arm/boot-framework.vdex
system/system/framework/boot-apache-xml.vdex
system/system/framework/boot-framework.vdex

$ cd /path/to/vdexExtractor
$ find ../system -name '*.vdex' | while read a; do
     dir=${a%/*]
    tools/deodex/run.sh -i "$a" -o ../system_new
 done

But now, I have only as *.dex :

system_new/framework/arm64/vdexExtractor_deodexed/boot-framework/boot-framework_classes3.dex
system_new/framework/arm64/vdexExtractor_deodexed/boot-framework/boot-framework_classes2.dex
system_new/framework/arm64/vdexExtractor_deodexed/boot-framework/boot-framework_classes.dex
system_new/framework/vdexExtractor_deodexed/boot-framework/boot-framework_classes3.dex
system_new/framework/vdexExtractor_deodexed/boot-framework/boot-framework_classes2.dex
system_new/framework/vdexExtractor_deodexed/boot-framework/boot-framework_classes.dex
system_new/framework/oat/arm64/vdexExtractor_deodexed/services/services_classes.dex
system_new/framework/arm/vdexExtractor_deodexed/boot-framework/boot-framework_classes3.dex
system_new/framework/arm/vdexExtractor_deodexed/boot-framework/boot-framework_classes2.dex
system_new/framework/arm/vdexExtractor_deodexed/boot-framework/boot-framework_classes.dex

I think I miss something.

  • I think I don't have one dex file per .vdex
  • the path is messy with vdexExtractor_deodexe extra dir
  • does I need to use instead bin/vdexExtractor binary ? The doc said to use 'compact_dex_extractor', but don't know how if not ran with tools/deodex/run.sh

I think I miss-use the tool. What is the full list of commands to be able to patch Pie aka Android 9 ?

@anestisb
Copy link
Owner

I don't think you're messing up with anything. If the corresponding Dex files are successfully generated in means that the tool is doing its job. Its up to you then to manually repackage the Dex files back to Apks under the appropriate names and resign them.

And again as described in #25 (comment), a full-stack deodexing is not among the primary purposes of this tool. However, I've noticed in the past that some folks have already wrapped around this tool their deodexing kits, so feel free to search for them in XDA forums or Google.

@palight
Copy link

palight commented May 17, 2019

I'm triying to deodex services.jar on Pie to install nanodroid-patcher and get signature spoofing, but after running script in tools/deodex/run.sh on it I obtain a folder named services_classes.dex with too files in it. Wich File I have to repack to services.jar ?

@anestisb
Copy link
Owner

@palight both files should be added back to the jar file following the naming convention (classes.dex, classes2.dex, etc.)

@palight
Copy link

palight commented May 21, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants