Skip to content

Unable to deodex odex files when system.img is 'Linux rev 1.0 ext2 filesystem data' format #775

Open
@neo1949

Description

@neo1949

The miui rom was download from here, the rom is based on Android 10. After generating the system.img file and mount it to the system directory, using the baksmali-2.4.0.jar to deodex an odex file get following messages:

$ file miui/umi/system.img 
miui/umi/system.img: Linux rev 1.0 ext2 filesystem data (mounted or unclean), UUID=4729639d-b5f2-5cc1-a120-9ac5f788683c (extents) (large files) (huge files)

$ sudo mount miui/umi/system.img miui/system/

$ java -jar romutils/baksmali-2.4.0.jar x miui/system/system/framework/oat/arm64/services.odex 
Exception in thread "main" java.lang.RuntimeException: "miui/system/system/framework/oat/arm64/services.odex" has no dex files
	at org.jf.baksmali.DexInputCommand.loadDexFile(DexInputCommand.java:167)
	at org.jf.baksmali.DisassembleCommand.run(DisassembleCommand.java:162)
	at org.jf.baksmali.Main.main(Main.java:102)

# specify directory where miui/system/system/framework/arm64/boot.oat locates
$ java -jar romutils/baksmali-2.4.0.jar x miui/system/system/framework/oat/arm64/services.odex -d miui/system/system/framework/arm64/
Exception in thread "main" java.lang.RuntimeException: "miui/system/system/framework/oat/arm64/services.odex" has no dex files
	at org.jf.baksmali.DexInputCommand.loadDexFile(DexInputCommand.java:167)
	at org.jf.baksmali.DisassembleCommand.run(DisassembleCommand.java:162)
	at org.jf.baksmali.Main.main(Main.java:102)

Maybe the baksmali-2.4.0.jar does not support Android 10? Or the root cause is the ext2 file format?

Activity

JesusFreke

JesusFreke commented on Mar 3, 2021

@JesusFreke
Owner

Are you sure it needs to be deodexed? If the .odex file has no dex files, it's likely the original dex files are still in the .jar file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @JesusFreke@neo1949

        Issue actions

          Unable to deodex odex files when system.img is 'Linux rev 1.0 ext2 filesystem data' format · Issue #775 · JesusFreke/smali