[Android Themes] Ticklefish:
It depends on which Oreo we're talking about. If you're using a version of Android between 7.0 and 8.0 then you...

Use baksmali.jar with this command:

java -Xmx2056m -jar baksmali.jar list dex c:\ticklemyandroid\_workarea1\_deodex\app\Settings.odex

Make sure to change the address and filename to the particular file in "app" or "priv-app" you want to deodex. You may not need the 2056m either, I used to use 1024m and that worked for most things.

This will tell you how many dex files you have inside that odex.file. You'll need to deodex each one separately. Most system apps have only one or two but that's not guaranteed. The facebook had over 30 last time I checked!

Use this command to turn the dex files into smali code. Again, adjust the command to your particular needs.

java -Xmx2056m -jar baksmali.jar deodex -c boot.oat:Settings.odex -d c:/ticklemyandroid/_workarea1/_deodex/app/Settings/oat/arm32/ -d framework/arm32 -o out c:/ticklemyandroid/_workarea1/_deodex/app/Settings/oat/arm32/Settings.odex/classes.dex

Change the "classes.dex" to the name of whichever dex file you're processing.

If all goes well, you should have a folder called "out" with a collection of smali files in. You now need to turn those files into a single file that can go back into your APK. Use this command for that:

java -Xmx2056m -jar smali.jar assemble -a 27 out -o classes.dex

Again, change the "classes.dex" to the name of the dex file you're using.

You should now have a file called "classes.dex". Use 7z to put this into the APK file. If you have 7za, you can use this command here:

7za u -tzip c:\ticklemyandroid\_workarea1\_deodex\app\Settings\Settings.apk

.

Delete the "classes.dex" file and "out" folder and continue until you've processed every dex file inside the APK.

Now delete the entire "arm" and "arm32" (or x86 or whatever) folders for that APK.

You now have a fully deodexed APK, ready to put back onto your phone! Now keep doing this for every single APK in the folder.

Repeat the above process for your "priv-app" folder. If you have a "vendor/app", "vendor/priv-app" or ""vendor/framework" folder, you'll need to do those as well.

You'll need to follow the process for the APK files in your "framework" folder. There may also be JAR files that are odexed in that folder. The process is much the same but the ODEX files are in "framework/oat/arm32" or "framework/oat/arm". Or maybe even in "framework/oat/x86" if you're using a rom made for a x86 processor..

There will be JAR files in the "framework" folder that belong to the BOOTCLASSPATH. That's gotten more involved over the years and, if you deodex one, you really have to deodex them all. For these you'll need to use baksmali to list all the files inside "framework\arm32(or whatever)\boot.oat" and process them one by one, making sure to add them into the appropriate JAR files.

Once you've done everything, and deleted the "framework\oat" and "framework\arm32(or whatever)" folders, you should be left with an "app", "priv-app" and "framework" folder containing deodexed files. You might also have those "vendor" folders I mentioned.

Now you just need to put them onto your phone. I recommend using a flashable ZIP file that will delete the original, odexed folders and replace them with your new ones.

This is the method that TMA uses, essentially. There are a few extra steps that have to be taken for an automated process to work but that's what it does.

You can get smali.jar and baksmali.jar from here: https://bitbucket.org/JesusFreke/smali/downloads/ and there's a guide here: https://github.com/JesusFreke/smali/wiki

Deodexing is relatively simple but it's a looong process.