N9 Factory Image - Deodexing Problems - Nexus 9 Q&A, Help & Troubleshooting

I have been trying to deodex the factory image and have had no success. What am I missing?? I have tried using ArchiKitchen and most of the available XDA tools. I used ArchiKitchen to extract the image and I have tried several different approaches but none work. I even tried putting the odex, apk, and jars together in their correct folders and get the following message from ArchiKitchen for all odex files. The odex and apk are in different folders in Lollipop.
Deodexing Hangouts.apk...
Disassembling Hangouts.odex...
Exception in thread "main" org.jf.util.ExceptionWithContext: PROJECT_110814_083005_N9_FACTORY_TEST/system/app/Hangouts.odex is not an apk, dex file or odex file.
at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileF actory.java:111)
at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileF actory.java:54)
at org.jf.baksmali.main.main(main.java:252)
Has anyone had success deodexing the factory image?? If yes can you please point me in the right direction. Thanks

Related

Recompling an apk questions

Trying to modify contacts.apk to make the dialer multi-dpi compatible. Did that and it works.
My issue is recompiling the apk. Everytime I recompile the apk with apktool it looses over a megabyte in size. In my case went from 4.49MB to 3.19MB after rebuilding. Only file modified was dialer_app.xml and it's size stayed about the same.
I've brought framework-res.apk and twframework.apk into apktool. After copying the resulting contacts.apk back to the device it is not recognized.
I've also tried copying the META-INF directory from the original apk over to the new one. Still no luck. I'm new to this and if anyone has some help for me it would be greatly appreciated!
Did you sign your new apk after recompiling it ?
Do you have classes.dex and resources.arsc files in your new apk ?
since its a system apk I've read it shouldn't be signed. Only thing I did was copy the META-INF folder to the new apk. In the new apk I do see classes.dex and resources.arsc. All the files appear to be there but the apk has shrunken in size.
I'm guessing I'm missing something simple here. But I'm new to this. Been at it for a few hours haven't had any luck.
I am new in development field. I have two questions 1. Is there same meaning for building and recompiling using apk tool? 2. I know framework-res.apk is needed for apktool d com, but where and the what is the use of twframework.apk file. Please explain anyone .
Recompiled apks will be quite a bit smaller as they will have more compression applied, this is normal, just be careful as if the tool compresses it to much you will get fc's. But it should work fine.
idhbar said:
I am new in development field. I have two questions 1. Is there same meaning for building and recompiling using apk tool? 2. I know framework-res.apk is needed for apktool d com, but where and the what is the use of twframework.apk file. Please explain anyone .
Click to expand...
Click to collapse
Read the apktool website for info about framework files, as far as which one to use, if you are decompiling a la2 or la4 base use a kl2 or kk5 framework without jkays built in as the laX frameworks are kinda buggy.
Sent from my GT-I9100 using Tapatalk

[Q] De-Odexed Framework not working

Hello all;
I have an LG p698 device, with a custom ROM (ZemDroid)(Gingerbread). Everything is working fine, but I wanted to add Arabic support to it, and for that, I need a deodexed framework.
I pulled the entire /system/framework directory, copied and modified the BOOTCLASSPATH as necessary, and used smali and baksmali 2.0.3. They reported no errors in disassembling the framework.odex file, created the "out" directory, and then using smali created the classes.dex file, which I shoved into the framework.jar file using Ark (Kubuntu 13.10).
I made a copy of the working framework.jar and framework.odex files on device, and put the new jar, and of course, deleted the odex.
wiped the dalvik cache for good measure, and rebooted.. The phone got stuck on LG logo :/ (It didn't even reach the custom splash image)
I can reboot into CWM, I can even adb into it in this state, but it won't continue starting up. Replacing original ones lets the device start normally, but my deodexed framework.jar won't
Any ideas?

[Q] Modifying odexed framework

I have an SGH-i547c running stock rom. This is what I prefer. Needless to say, it is odexed
I needed to edit the AudioService.smali file in the framework.odex
I figured out how to deodex framework.odex and edit the AudioService.smali file from the "out" folder
I also figured out how to odex the folder back into a framework.odex file without any errors.
However, the original framework.odex file is 8502KB and the edited and re-odexed version is 8034KB and it does not work on my device. The device failed to boot after replacing with the smaller file..........I had to re-flash the stock /system with Odin as I could not gain enough permission to push the original framework.odex I had backed up, back to the device using ADB through stock recovery or download mode.
I only changed a couple values in the AudioService.smali file yet I tried re-odexing several times and the output file was always smaller than the original and would not work on device.
I found some tutorials on this online and I find them not very well explained, complicated and not specific to what I am trying to do.
What did I do wrong??
Can someone explain to me how to do this properly without having to go get a degree?
Thanks

[Q] deodexing and odexing back

I am trying to edit a smali file in the framework.odex file on my stock touchwiz rom.
I first deodexed it with baksmali.jar
I got the "out" folder containing the .smali files which I wanted to edit. Great! right??
Without touching anything in the "out" folder, I attempted to odex back as a test.
I did so using smali.jar and got a my new framework.odex file in the smali/baksmali folder as expected.
However, the output framework.odex file is slightly smaller than the original framework.odex file which makes no sense to me.
The output file caused the device to bootloop when I replaced the original framework.odex file on the device with the one output from smali.jar.
I cannot seem to get a straight explanation on how to do this properly. I do not want to deodex my entire rom when all I need is to change a couple values in the AudioService.smali of my odexed framework.jar.
Can someone please help me deodex this freaking framework.odex file and odex it back so it actually works on the phone. I know I am close and there is a simple step I am missing yet I cannot figure it out to save my life.
Please help!!!!
Cheers!
Mike

Deodex - odex. Just one jar. Possible?

Hello. Lets assume I have odexed firmware. There's no trouble at all to deodex apk files without deodexing the whole rom.
But what if I want to deodex jar file (Android-telephony.jar), make some changes, then odex it and run normally changed code?
What are the requirements? Is it possible
Long ago it was possible via check summ replacement in hex editor.
But now there're oat files, arm64 folders...
Anyway, Is there a guide or something?
Thanks
Anyone

Categories

Resources