yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] AnonVendetta:
I noticed that the OP says that this deodexer works on LG Marshmallow ROMs. So I tried it with my LG v10. It doesnt boot. I've tried several other deodexers before this, same results.

My steps:

1. Extract system.img from stock 20L KDZ, with Windows LG Firmware Extract tool.

2. Install Ext2Fsd (to allow the reading of ext4 filesystems on Windows), then mounted the system.img with ImDisk Toolkit

3. Copied app, framework, priv-app, and build.prop into a folder called "system" (no quotes). Everything copied fine with the exception of a few lib files, which were actually Linux symlinks that Windows cant handle

4. Installed Java JDK (which includes the JRE)

5. Downloaded precompiled smali/baksmali JARs (v2.2b4)

6. Ran Fulmics, set the smali/baksmali location, and enabled debug logging.

7. Set system folder location, and selected to deodex all 3 folders

8. Waited an hour, it finished, then it asked if I wanted to delete odex and oat files, I answered yes.

9. I then downloaded Lordroid's batch deodexer, it has some standalone signing, zipaligning, and flashable zip creation tools. I used it to sign, zipalign, and create a zip. Flashing that zip results in a bootloop, it gets as far as the Android logo (briefly) before rebooting.

It looks like all files deodexed fine according to the log file, with the exception of LGWeatherService, which isnt critical. This has an encrypted odex file, many have tried but to my knowledge noone has successfully deodexed it. The error is something along the lines of "Failed to get classes.dex".

Where am I going wrong?
[Android Software/Hacking General [Developers Only]] zeroprobe:
Little suggestion to OP.

Can you make the program remember the last working directory you opened.
[Android Software/Hacking General [Developers Only]] j to the 4n:
you patched the boot.img to bypass dm_verity?

Since marshmallow the rom won#t boot if /system is touched...that applies also for just deodexing it.
[Android Software/Hacking General [Developers Only]] xpirt:
version 1.1 (20/02/2017):

- [feature] remember last system path used

- [fix] deodexing never ending on app/priv-app without selecting framework

- [fix] log output spaces removed and added additional useful info
[Android Software/Hacking General [Developers Only]] AnonVendetta:
[MENTION=4905624]j to the 4n[/MENTION]: I seriously doubt that dm-verity has anything to do with this. As an example, I have Xposed installed into the system partition, phone boots fine. I've made numerous other modifications to other system files, like deleting bloatware apps, still boots fine. And my root management solution, phh's Superuser, is installed into the system partition. It patches the boot image's dm-verity when I flash the zip. SELinux is also set to permissive by my boot image (a mod I did myself). But is there any way to be certain that dm-verity is actually disabled (terminal command, app, etc)?

As I said before, no deodexer has successfully produced something that actually boots. Deodexing usually goes fine. To date I've tried Lordroid's Batch Deodexer, Fulmics, and SuperR's Kitchen.

A dev for the LG v10, who goes by [MENTION=5687366]Eliminater74[/MENTION], produced a deodexed build for our device that does boot, but it's a bit outdated and I can't use it because of LG's anti-rollback restrictions. It's based on MM stock firmware. People have said that it does boot fine. I took a look at it, it looks like there is still a boot.oat/boot.art at /system/framework/arm/ and /system/framework/arm64/. I have no way to prove my suspicion, but I think that the lack of these 4 files is what is causing my inability to boot. But how can I be sure? Every deodexer I've tried so far deletes these files when finished. Even if I manually add them back in, still can't boot. Is there a way to rebuild them?

Thanks again!
[Android Software/Hacking General [Developers Only]] NotATreoFan:
The V20 system dumps can be deodexed without issue using this tool. I understand that's Nougat, not MM, but just wanted to state that LG does work with this. I was using Superr's Kitchen on a Linux machine prior to this. Have you tried deodexing using Linux, to make sure the source files are good?

If you don't have Linux, point me to the source file, and I'll see what I can whip up.
[Android Software/Hacking General [Developers Only]] AnonVendetta:
I actually do have Linux (Fedora) installed on my laptop, but I have basically no deodexing experience, and I'm not that good with Linux either. As stated, I already tried with SuperR's Kitchen, several times. Admittedly, given my lack of experience, I probably made a few mistakes. Which is why I tried automated tools. However, I'm not new to Android, not by a long shot, I consider myself an intermediate power user.

I'm going to provide you with a KDZ, it's as pure as a system dump, since it's unmodded, straight from LG. You'll need to use a tool called Windows LG Firmware Extract. You only need the parts related to system, the rest can be ignored. Then you need to merge the system parts into system.img (with the same tool). Shouldn't take more than 15-30 mins. The resulting system.img's MD5 checksum should be:

ac8a8e91127cf55e08965fb142c55453

I Googled for the exact name of the KDZ, got less than 500 results. This link should work:

https://mega.nz/#!vh9SzZIT!A9Xpojdcun8KUUDrWwffHVhjbAKFm20ayeTvTVIQJ-w

To be clear, I really appreciate your help. But I'm not looking for spoonfeeding. If you can at least tell me what you did and give some pointers along the way, then I'd really appreciate it. I do want to get a learning experience and eventually do this myself.

Thanks again!
[Android Software/Hacking General [Developers Only]] NotATreoFan:
Yeah, didn't mean to assume you were looking for spoonfeeding. Apologies if my reply came out that way. I went through a handful of failed deodexing runs since getting the V20, so I'll take notes as I do this one, and give them to you to reproduce should they work.
[Android Software/Hacking General [Developers Only]] AnonVendetta:
[MENTION=320479]NotATreoFan[/MENTION]: Do you plan to test with SuperR, Fulmics, or both?

I do have a few requests, please dont debloat unless absolutely necessary, including apps that fail. The LGWeatherService will fail, since its' odex is encrypted. Just leave it intact if you can, I'll manually delete it before booting, it will cause FCs if you dont. My intent is to freely provide the deodexed image to the v10 community, assuming it boots. I'm thinking that maybe modders for my device may find it useful. It may be useful even if this is a failure. On a personal level, I want to apply the MicroG signature spoofing patch to framework.jar, which requires that it be deodexed. I will only do this if you grant permission, and I'll give full credit. I plan to make a private deodexed image for personal use, for the learning experience. I want to take my Android knowledge to a new level by going beyond things like rooting, etc. Development, modding, ROM building, etc are what I want to get into eventually.

I'm still suspicious that the 4 boot.oat/boot.art files are the real issue. I also think thatvWindows not being able to handle Linux symlinks is another part of the problem, maybe the symlinks need to be present. And maybe it really is better to deodex with Linux. I say these things I managed to deodex a CM13 MM ROM for my Samsung Galaxy 10.1 tablet, it booted fine. The CM13 builds I deodexed for the v10 also boot, but CM isnt optimal for my device because the camera and 2nd screen dont work, mobile data issues as well. For thosr runs I used Lordroid Batch Deodexer, which uses Java.

The particular SuperR's Kitchen I used was the customized Ubuntu ISO provided in SuperR's thread. I booted it from a USB 3.0 256GB flash drive.

I may buy the v20 eventually from T-Mobile, possibly as early as next month. I'm getting sick and tired of the v10 and all the issues I'm having with it. I mostly want a device that can run CM/LineageOS with no major issues, the v10 is not that device. I dont like the v10's stock firmware but at least it's more stable than CM for this device. On the other hand, I might just tough it out until my v10 dies from the infamous bootloop of death or whatever.

Can we communicate via private message, Hangouts, Skype, etc? I just figured some one on one collaboration might be beneficial.

Thanks again!

Edit: Here is a link to [MENTION=5687366]Eliminater74[/MENTION]'s 20E deodexed ROM. The latest firmware update is 20L (what I'm providing), but I figured you might want to take a look anyway. You'll see what I mean in regards to him leaving the 4 boot.oat/boot.art files.:

https://www.androidfilehost.com/?fid=24566382913912908
[Android Software/Hacking General [Developers Only]] j to the 4n:
Well, I hadn't the info, that you had a patched boot.img. that's why I asked.

If you have issue with deodexing using the existing solution...you can always use smali and baksmali and deodex the files yourself.

write a small batch or tool to automate it.

That's what we did too, because existing solutions didn't work when Android N dropped. Having an own deodexer and being able to modify/fix it yourself for your needs is the best solution.

Also: did you actually go through some apks and jars to confirm that they have a classes.dex? If not, they are not deodexed.

You also just said it does not boot, that's very less info. you should do a logcat then and look for hints there.
[Android Software/Hacking General [Developers Only]] AnonVendetta:
[MENTION=4905624]j to the 4n[/MENTION]: Well, since I already made all these other changes to /system, then I kind of figured dm-verity couldn't be the issue, since if it were, it would have failed to boot even if it were odexed. I do get a warning when powering on for a brief moment, but this is standard for my device if you've rooted etc, it just keeps on booting fine.

I do have [MENTION=1299419]JesusFreke[/MENTION]'s latest precompiled smali/baksmali binaries, I'll have to do some more research to figure out how to use them manually. But arent most of the latest deodex tools based on his work? I'm also aware of the oat2dex approach.

No, I didnt check for classes.dex, I just assumed that since the deodex tools I've tried said the process was successful, that everything should be kosher. No point in a tool saying something is deodexed if it really isnt, of course things dont always work as expected. You have to give a certain degree of trust to the tools you're using, that they've actually done what they claim. Does an APK/jar always have to have a classes.dex (or more than one) as a rule? If not, what are the exceptions?

Is it possible to get a logcat while the device is booting? I'm guessing so but dont know how. I didnt get more than maybe 10 seconds into booting before it bootlooped, maybe that wouldnt be enough to catch a log? I'm thinking I'll need need to connect my device to PC and use ADB to get the log.

In the meantime, [MENTION=320479]NotATreoFan[/MENTION] says he might be able to help, but while he's doing his thing I'm going to do some reading on smali/baksmali and give SuperR's Kitchen another run.

Thanks again!
[Android Software/Hacking General [Developers Only]] NotATreoFan:
Deodex is running now in superr's kitchen. I suggest not modifying the boot.img in any way when you flash it to test. Instead, flash either Magisk or SuperSU, and allow it to inject the modifications needed for stock kernels to boot on modified/unlocked systems.
[Android Software/Hacking General [Developers Only]] NotATreoFan:
[MENTION=7441667]AnonVendetta[/MENTION]

I was able to deodex the system files. I used the latest superr's kitchen, but got an error with LGWeatherService and Photos (Google Photos) odex files. So I ran it again and chose the Smali option instead of OAT, and got no errors. I uploaded both of them to AFH and will PM you the links.
[Android Software/Hacking General [Developers Only]] AnonVendetta:
[MENTION=320479]NotATreoFan[/MENTION]: Here is the recovery.log you need:
[Android Software/Hacking General [Developers Only]] pendor24:
Hello

It still does not work on s7edge nougat
[Android Software/Hacking General [Developers Only]] kykint:
It does, u need a custom kernel for a deodexed rom to work.
[Android Software/Hacking General [Developers Only]] pendor24:
Hello

The kernel has nothing to see inside the view that the program blocks this and no file is written deodex or ok in the log
[Android Software/Hacking General [Developers Only]] kykint:
i don't quite get what you mean. You need to compile a kernel from sammy opensource or use ones released by devs.
[Android Software/Hacking General [Developers Only]] pendor24:
The problem comes from fulmix which does not deodex (rom nougat)

The tool freeze before the end and the apk are not deodex.
[Android Software/Hacking General [Developers Only]] xpirt:
log?
[Android Software/Hacking General [Developers Only]] pendor24:
https://mega.nz/#!tElijbpS!ytvsQomHMfLe3kqkuidIB1179VpIGZdsfqTVQE7GV8I

Log is here
[Android Software/Hacking General [Developers Only]] xpirt:
could you upload the framework folder of the system you are trying to deodex?
[Android Software/Hacking General [Developers Only]] pendor24:
https://mega.nz/#F!QEEVVJzD!9krJ6K_pdmWwXuxaXw4wkw

Framwork is here
[Android Software/Hacking General [Developers Only]] xpirt:
I need the whole odexed framework folder..
[Android Software/Hacking General [Developers Only]] pendor24:
Take the file frame. Rar

In mega. This is the system structure file that I compress in. Rar
[Android Software/Hacking General [Developers Only]] xpirt:
tested and it worked just fine. your log ends at deodexing services.jar, but it just takes a little longer until done, you have to wait.
[Android Software/Hacking General [Developers Only]] pendor24:
OK, thanks.

I started a deodexing, a fulmix is ​​blocked on the service file. Odex (for 28 minutes) faut, he's still waiting?
[Android Software/Hacking General [Developers Only]] SidRobo:
hi. i get error! Do you have java installed and set in PATH?

but java is already installed and set in path. i had same problem with other tool so i tried x32 version and it worked.

java version "1.8.0_121"

Java(TM) SE Runtime Environment (build 1.8.0_121-b13)

Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

--------------

windows 10 enterprise

version 1607

os build 14393.693
[Android Software/Hacking General [Developers Only]] xpirt:
error code 2.. either java is not set in PATH or not set correctly.
[Android Software/Hacking General [Developers Only]] SidRobo:
but it's already installed and other programs are using it. :( :rolleyes:
[Android Software/Hacking General [Developers Only]] xpirt:
try removing the existing one and to "Path" at the bottom, within system variables, add this instead:
[Android Software/Hacking General [Developers Only]] SidRobo:
it was C:\ProgramData\Oracle\Java\javapath by default but it didn't work(fulmics) so i change it to %JAVA_HOME\bin but still the same.

is it possible that it's incompatible with windows 10 ?!! because as i said i had same problem with SAV x64 deodexer so i tried x32 version of it and it worked.
[Android Software/Hacking General [Developers Only]] levone1:
Won't open on my Windows 7.

'windows problem event name clr20r3'

Tried v1.0 and 1.1

Any ideas? Thanks
[Android Software/Hacking General [Developers Only]] xpirt:
do you have latest .net framework, version 4.5?

and if yes, verify its integrity, or uninstall and install it again.
[Android Software/Hacking General [Developers Only]] levone1:
Thanks. I got it going on a W10 computer. I think it was an a/v thing. Anyway, works great. Deodexed AOSP N, and apps run great, if I replace them one-by-one, but when flashing all at once I get boot loop every time. Tried various wipes, etc. No big deal, though, since it's only a handful I want to mod anyway. The others can just stay odex...

Thanks
[Android Software/Hacking General [Developers Only]] SidRobo:
thanks Xpirt. my problem fix.

i uninstalled and reinstalled java from oracle.
[Android Software/Hacking General [Developers Only]] nabeelahmad909:
how to add smali and baksmali to path?

i did not find java files of smali a.

where to download,in download section there are zip files
[Android Software/Hacking General [Developers Only]] xpirt:
version 1.2 (18/03/2017):

- [feature] ability to set a custom java directory

- [feature] improved logging system, now gives more appropiate information

- [fix] potential java compatibility issues due to mismatched executables

- [fix] lots of fixes and overall improvements

note that most of the issues previously reported were related to a wrong installation of Java in your systems. from now on you will be able to choose the proper java JRE path in settings, so if you're on 64bit make sure you choose the java path inside C:\Programs\ and not C:\Programs (x86)\, if you have a java folder only in that directory that means you installed Java JRE 32bit on a 64bit system (which will lead to issues).
[Android Software/Hacking General [Developers Only]] Hamidreza2010:
thanks for update

its very good if add " automatically sign and zipaline .apk and .jar " files option to the tool

not need to use another tool for do this

if possible please update it

thanks a lot for your great work
[Android Software/Hacking General [Developers Only]] pendor24:
Hello

Thanks for the maj.

The yes sign with the original signature would be the top
[Android Software/Hacking General [Developers Only]] IgorEisberg:
I still get "Error! Do you have Java installed and set in PATH?" even when I select the JRE folder or JRE/bin folder manually.

Obviously has nothing to do with "wrong installation of Java" since I tried both setting the 32-bit JRE folder and the 64-bit JRE folder.

Nothing works.

It won't even find Java in PATH, even though entering "java" in Command Prompt works perfectly.
[Android Software/Hacking General [Developers Only]] xpirt:
please attach the log..
[Android Software/Hacking General [Developers Only]] IgorEisberg:
Attached.
[Android Software/Hacking General [Developers Only]] edzamber:
Hi mate,

Did you read your log ?

At begining, no build.prop found...
[Android Software/Hacking General [Developers Only]] IgorEisberg:
Please, if you have no idea what you're replying, don't do so. You're confusing others.

I added the build.prop afterwards and it was the same result. Note that this log is of multiple sessions...

P.S. Even if it was the issue, the error message should have been appropriate to the condition.
[Android Software/Hacking General [Developers Only]] edzamber:
OK mate, sorry to trying to help you so. I only read your log and this is what your log said.

I never answer if i have no idea mate, but nevermind, good luck.
[Android Software/Hacking General [Developers Only]] xpirt:
could you please enable debug mode in settings?
[Android Software/Hacking General [Developers Only]] IgorEisberg:
I enabled it right now and did 3 things:

The first error - Using PATH variable.

Second error - Set the Java path manually to "C:\Program Files\Java\jre1.8.0_121"

Third error - Set the Java path manually to "C:\Program Files\Java\jre1.8.0_121\bin"

Which basically means that when we set the Java path manually, we have to actually select the \bin sub-folder, so the second error is fine.

First and third errors are the actual problem.
[Android Software/Hacking General [Developers Only]] mastarifla:
Hey xpirt,

First of all, great app, it's helped me with taking a look at Motorola's Nougat updates...

Couple ideas/suggestions (though I have only used version 1)

0) Are you wiling to put your source code on github?

1) Any way you could have a popup at the end letting the user know that it has completed?

2) Could you save/persist the previous checkboxes or have it as an option? (as I never do the framework)

3) After completing, could you allow for the user to select another system folder in case they want to do another without needing to close and re-open the app?

Thanks in advance :)
[Android Software/Hacking General [Developers Only]] dedraks:
Hi [MENTION=5132229]xpirt[/MENTION]

Thanks for the great app.

Is there a linux version planned?
[Android Software/Hacking General [Developers Only]] NotATreoFan:
If the Deodex process runs into an error, will it notify me somehow? I ask because I got an error this morning trying to deodex an LG 7.0 ROM in Linux, but did not get an error in Fulmics on Win 7.

So I'm curious if not getting any notification indicates that it ran into no errors.
[Android Software/Hacking General [Developers Only]] xpirt:
yes, should tell in the generated log file.
[Android Software/Hacking General [Developers Only]] NotATreoFan:
OK thanks. I didn't look for a log file, but also didn't see any errors.
[Android Software/Hacking General [Developers Only]] Hamidreza2010:
[MENTION=5132229]xpirt[/MENTION] please add support this path:

system/vender/app

in sony roms , some apk is here

thanks
[Android Software/Hacking General [Developers Only]] radheyiit:
What is the benifit of deodexing a cutom rom ?
[Android Software/Hacking General [Developers Only]] IgorEisberg:
The only benefit of it is that it allows customizing the APKs.

Stock/odex ROMs already have their classes.dex pre-optimized, while deodexed ROMs have to optimize all of the apps when you first boot/factory reset/clear dalvik-cache, which makes first boot longer (that's the main con).
[Android Software/Hacking General [Developers Only]] _LLJY:
There is no need to deodex those..
[Android Software/Hacking General [Developers Only]] Nosepull:
Thanks for this great small tool. However, after almost every run I have to remove the folder C:\Users\Username\AppData\Local\_PrivateImplementationDet (and re-establish all settings), otherwise the programm won't start again?!

And: Linux (Mono?) version would be greatly appreciated!
[Android Software/Hacking General [Developers Only]] john.reyes.jmr:
Bro, does this tool support 64bit MTK processors? I've tried it but the classes.dex in the apps have the same file size of 156bytes.
[Android Software/Hacking General [Developers Only]] xpirt:
version 1.3 (24/04/2017):

- [fix] gui not opening if last system path is not found

- [fix] some minor adjustments

[MENTION=6316062]Nosepull[/MENTION] should fix your issue.
[Android Software/Hacking General [Developers Only]] Nosepull:
Thanks!
[Android Software/Hacking General [Developers Only]] paphonb:
Can I get the sources? I want to port it to macOS. Thanks.
[Android Software/Hacking General [Developers Only]] edzamber:
Great job !

Working perfectly on S6 Edge Nougat Rom [emoji4]
[Android Software/Hacking General [Developers Only]] _LLJY:
Well you could try "lordroid's deodexer to rule them all" it's open source, only issue is that it uses an outdated version of smali/baksmali, which doesn't support nougat, you can try to port that, it should be easier.

https://xdaforums.com/android/software-hacking/tool-batch-deodex-rom-t3313150
[Android Software/Hacking General [Developers Only]] paphonb:
Thanks.
[Android Software/Hacking General [Developers Only]] Nosepull:
An update of that programm would be great in order to have a working deodexer for Linux, too!
[Android Software/Hacking General [Developers Only]] xpirt:
version 1.4 (03/05/2017):

- [fix] process finished dialog displaying even when no files were deodexed

- [fix] priv-app folder now deodexes only if its checkbox is checked

- [fix] minor cosmetic fixes and improvements
[Android Software/Hacking General [Developers Only]] _LLJY:
I tried this with wine and mono, neither worked. The lordroid's deodexer does work however. But doesn't support N
[Android Software/Hacking General [Developers Only]] Nosepull:
Same situation here :( .
[Android Software/Hacking General [Developers Only]] hoan1999:
Log "Baksmali process returned error code: 1" What is it, i dont know where it export ?
[Android Software/Hacking General [Developers Only]] john.reyes.jmr:
Bro please add support for 64bit devices which have arm64 folders. :D :):good:
[Android Software/Hacking General [Developers Only]] Nosepull:
???Works for me.