How do i Deodex just one apk file?. And can i run a deodexed apk in odexed rom? - Nexus 4 Q&A, Help & Troubleshooting

Hi all,
I have started porting my Semi-universal battery mods over to the nexus 4 ready for when I get mine. but I was wondering the two following things:
Firstly, to make the battery mods, I need the systemUI,apk to be deodexed, but if I am running a stock Odexed rom, will I still be able to place a deodexed systemUI.apk in the System/app folder and the phone still work?.
And is the a tool which lets me Deodex a single apk file, as all the ones I have found require you to deodex a whole rom.
Thanks in advance to anyone who can help
Cheers
Corey

fishingfon said:
Hi all,
I have started porting my Semi-universal battery mods over to the nexus 4 ready for when I get mine. but I was wondering the two following things:
Firstly, to make the battery mods, I need the systemUI,apk to be deodexed, but if I am running a stock Odexed rom, will I still be able to place a deodexed systemUI.apk in the System/app folder and the phone still work?.
And is the a tool which lets me Deodex a single apk file, as all the ones I have found require you to deodex a whole rom.
Thanks in advance to anyone who can help
Cheers
Corey
Click to expand...
Click to collapse
You DEODEX through JAVA, Smali and backsmali commands in Command Prompt.

I can answer the 2nd question. Not all deodexed apks can run on an odexed rom. Played around with them before and some do, some don't
Sent from my Nexus 7 using Tapatalk 2

I can confirm. Im running an Odexed rom and flashed 3 deodexed apk's today. An accuweather widget, voice mail and a transparent digital clock. All working fine

The OPs question has been misunderstood
The OP's question has been misunderstood. The question was not whether if you can run a deodexed .apk in an odexed ROM. On the contrary, the question was - can you run a odexed apk within a deodexed ROM. I stumbled onto this thread 'cuz I'm in a current situation where I'm asking the same question now.
Although I know the question the OP asks seems as if they're asking if you can place a deodexed apk within a odexed ROM, the overall question is how do you deodex a single apk to begin with?
I'm running a deodexed custom ROM on a Galaxy Note 2, however....virtually all the deodexed ROMs I've installed contain a flaw....the samsungcamera.apk is missing features. However, my default, stock ROM that I restored from my nandroid displays a complete camera full with the features I use regularly. So I was wondering....how do you deodex an apk? In other words, I have currently extracted from the stock ROM the samsungcamera.apk and its accompanying .odex file. Now I would like to join these and create a deodex version of this so I can import it into the custom ROM I'm using.
I believe the question was somewhat answered already on here. I will investigate a little further.
Thanks, guys.

[HOW TO][Windows] Manually Deodex and Odex back
As the thread is a bit "old", I suggest to update the tools in the zip, here you' cuold find the newest.
Hope this helps

Related

[Q] Deodexed Theme Template or equivalent?

Hi all,
Wondering if anyone has made a stock theme template for the Shift? All I see are ROMs but I like to mess around with a clean stock deodexed system for a while before I flash a full ROM. I would make one myself but I'm still learning how the update-script/updater-script works. Is there one, or does everyone just flash ROMs around here? Closest I've found is the theme eraser, but that assumes you're already deodexed (no .odex removal script). Any help would be appreciated, links to guides, tutorials, how CWM works, a stock theme template, anything. And thanks in advance.
http://forum.xda-developers.com/showthread.php?t=948566
there ya go
Thank you, but this is a full ROM not a theme template.
Sent from my PG06100 using Tapatalk
Are you looking for the stock framework then?
Sent from my PG06100 using XDA App
Basically just the /system/app and /system/framework dirs deodexed. no other changes to the system folder. And a script that removes the odex files. Can that be run with just an update-script, or would it need other things?
Sent from my PG06100 using Tapatalk
Just unzip the zip file from the thread foxsdaddy67 linked & you have access to those two deodexed directories.
I guess I'm not being clear enough. I'm aware those files are there, what I don't understand is how cwm works. I'm coming from sdx where every rom, theme and mod had the same structure with only an update script in meta-inf. By testing I did find out that just having an update script works though I'm not sure if a script will run. Guess I'll have to test it.
Bottom line is that there is no flashable theme template zip, only roms, but I think I'll be fixing that shortly.
Sent from my PG06100 using Tapatalk
Tambourineman is developing for the Shift?!? THATS AWESOME!!
No, I'm not. Just an end user.

Deodexed vs odex ROM

I know that deodexed rom can easyly be themed; But is that the only benefit of them? Is there any difference in performance betwen odex and dexodexed Rom?
lascoul said:
I know that deodexed rom can easyly be themed; But is that the only benefit of them?
Click to expand...
Click to collapse
Yes.
Is there any difference in performance betwen odex and dexodexed Rom?
Click to expand...
Click to collapse
Yes. Odexed is faster. I've always had two SGS at my disposal. One with stock odexed ROM and stock kernel, and one which I have modified with all the latest "speed improvements". At one time, though, the deodexed "improved" one was almost as fast as the stock one.
Thank for your reply. I will go back to stock odexed rom with a costum kernel
There are also custom odexed now.. Simplicity, Milky's Mod ...
nice and faster than stock, Simplicity is using TW4, Milky's on modded TW3 if i'm not mistaken
moegrave said:
There are also custom odexed now.. Simplicity, Milky's Mod ...
nice and faster than stock, Simplicity is using TW4, Milky's on modded TW3 if i'm not mistaken
Click to expand...
Click to collapse
You can thank brotuck when you see him.
Sent from my GT-I9000 using XDA Premium App
You can look at my mods/explanations about ODEXED JVR ROM!
http://forum.xda-developers.com/showthread.php?t=1196391
The .odex files are precompiled .dex files which must not be compiled by the dalvik-machine so they are faster. But if you want to modify anything its easier to to it on deodexed files!
But as you can see you can make also mods for ODEXED ROMs so if this MODs are enough for you, you run faster with odexed rom
yup some guys are just to lazy to make odex versions =)
$omator said:
yup some guys are just to lazy to make odex versions =)
Click to expand...
Click to collapse
Or they have got better at it and have moved to the next level. Either way, it's more choice for us.
Sent from my GT-I9000 using XDA Premium App
better on what
$omator said:
yup some guys are just to lazy to make odex versions =)
Click to expand...
Click to collapse
i am now on stock JVR using your Mod. Big thank somator. Is it possible to enable overglow on odex Rom?
idk maybe, will try for next firmware release
$omator said:
idk maybe, will try for next firmware release
Click to expand...
Click to collapse
it will be great!
I saw under SGS2 threads that there is an utility that can ODEX your DeODEXed ROM (you need a rooted terminal of course).
Is something like this that can be done for SGS1 as well?
Or in other words: is there a straight-foward (easy) way of odexing a rom.
I'm thinking that I can take my whole /system folder (or only /system/app and /system/framework) and odex them and create a CWM package to replace the existing deodexed files. The only issue is that I did not studied enough the odexing system. I have no idea what utilities will such action require.
Any help from the experienced users around here?
To convert back from deodexed to odexed is not so easy to do.
Some have done it with scripts, some do it in ADB or use programs to do it.
Android has a basic tool called dexopt-wrapper that can create a odex file from a apk or jar file. You still need the classes.dex to be deleted from the apk or jar file when returning to odex.
My experience with it is that it sometimes converts perfectly, but sometimes it does not. Especially converting themed framework files is very hard to convert back.
never had such problems =)
$omator said:
never had such problems =)
Click to expand...
Click to collapse
Try to make a 100% working overglow mod in odex and i believe you
Hell i will even donate !

[Q] How to appy a theme for Odex ROM onto a Deodex ROM?

I'd like to run an AT&T dedex ROM on my AT&T S4. But the only good looking theme is for Odex ROM's:
http://forum.xda-developers.com/showthread.php?t=2264641
Anyone know if after upgrading to a Deodex ROM with lots of mods for Deodex ROM's, if I can then safely conver to Odex and then apply the Odex theme?
There are scripts that will convert from deodex to odex, but I'm not sure if it will screw anything up. And without a true recovery, it's a PITA for me to try and fail.
If you go to page 18 post 173 of that thread you posted you will see a hack way of getting it to work on deodexed ROM that someone posted
http://forum.xda-developers.com/showthread.php?p=41347885
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2

[Q] Need Guidance for Theming

I am trying to learn how the theme a ROM. Example GoldenEye37 ROM (for my personal theme), the only thing I edit was some PNG's (not 9.png)using gimp but every time I try to flash the themed ROM i get this "com.android.keyguard has stopped " or just stuck on Samsung boot. Sorry been at this for 3 days now and normally I am good on searching for the answers. Couldn't find one that worked so far.
Any ideas why?
This is the guide ive been following http://forum.xda-developers.com/showthread.php?t=2251719
Thank You
Edit: So found out my problem in another forum. I was signing the framework-res.apk and SystemUI.apk . Signing them was causing the problem.
Now I need to find out when I need to sign the apk and not to, also what zipalign does.
Sorry for making a useless thread. I got impatiant after the 3rd day
At&t S4 SafeStrap
You could also grab a flashable vr theme zip, put all you .png files into their correct places in the flashable zip and zip it up and flash. No need for decompiling/recompiling/signing/zip aligning at all. The VR Theme flashable zip will integrate your .png files into each respective .apk file and do everything for you. You can grab my Red BadAss Flashable Theme and use it as a template. It is made for use on 4.2.2-4.3 roms or 4.4.2 roms. It has checks in it that will see which you have and flash the correct version.
It really is a easier way of making a theme. It will allow you to put .png, .9.png, .xml, or any other file type used inside the .apk and will change it for you.
Sent From My ATT S3 i747 Dark Blue BadAss Theme
RockRatt said:
You could also grab a flashable vr theme zip, put all you .png files into their correct places in the flashable zip and zip it up and flash. No need for decompiling/recompiling/signing/zip aligning at all. The VR Theme flashable zip will integrate your .png files into each respective .apk file and do everything for you. You can grab my Red BadAss Flashable Theme and use it as a template. It is made for use on 4.2.2-4.3 roms or 4.4.2 roms. It has checks in it that will see which you have and flash the correct version.
It really is a easier way of making a theme. It will allow you to put .png, .9.png, .xml, or any other file type used inside the .apk and will change it for you.
Sent From My ATT S3 i747 Dark Blue BadAss Theme
Click to expand...
Click to collapse
Thank you! I really appreciate it. Love your work! I downloaded your Red Badass theme to use as a template.
I want to theme different custom roms.
1.Do I just delete the framework, systemUI...etc..files you made in there and replace it with my theme?
2. Do I need to do anything to META-INF folder for different Roms 4.4.2 I want to theme?
3. What do you mean by zip it up and flash? Do I need a tool for this?
My apologies if my questions are common sense. I'm just starting to learn on my free time. I'm really good at building circuits/electronics though [emoji2]
Haha!
stric85 said:
Thank you! I really appreciate it. Love your work! I downloaded your Red Badass theme to use as a template.
I want to theme different custom roms.
1.Do I just delete the framework, systemUI...etc..files you made in there and replace it with my theme?
2. Do I need to do anything to META-INF folder for different Roms 4.4.2 I want to theme?
3. What do you mean by zip it up and flash? Do I need a tool for this?
My apologies if my questions are common sense. I'm just starting to learn on my free time. I'm really good at building circuits/electronics though [emoji2]
Haha!
Click to expand...
Click to collapse
1) I would suggest that you delete out all of the .PNG files inside of each folder, then add your .PNG files into the correct folders where they came from.
2) The Meta file should not need to be replaced and should work on any touchwiz 4.4.2 based ROM. When you unzip my theme you will see different folder right away. You will see "system" and "system4.3" inside. The one labeled "system" will work on 4.4.2 based Roms, the one labeled "system4.3" will work on 4.2 and 4.3 based Roms. Likewise for the other folders like "vrtheme" =4.4.2 and "vrtheme4.3" =4.2.2 and 4.3 based Roms.
3) Once you have put all your .PNG files into their respective folders, then you can use Root Explorer (on the phone) to ZIP the theme back up. Or you could use a PC based software to zip the theme back up (if your working on a PC to change out the .PNG files). Once it is zipped up you can put it on your phone and use your custom recovery/safestrap recovery to flash the created zip file.
Any further questions feel free to ask, I can help as needed.
RockRatt said:
1) I would suggest that you delete out all of the .PNG files inside of each folder, then add your .PNG files into the correct folders where they came from.
2) The Meta file should not need to be replaced and should work on any touchwiz 4.4.2 based ROM. When you unzip my theme you will see different folder right away. You will see "system" and "system4.3" inside. The one labeled "system" will work on 4.4.2 based Roms, the one labeled "system4.3" will work on 4.2 and 4.3 based Roms. Likewise for the other folders like "vrtheme" =4.4.2 and "vrtheme4.3" =4.2.2 and 4.3 based Roms.
3) Once you have put all your .PNG files into their respective folders, then you can use Root Explorer (on the phone) to ZIP the theme back up. Or you could use a PC based software to zip the theme back up (if your working on a PC to change out the .PNG files). Once it is zipped up you can put it on your phone and use your custom recovery/safestrap recovery to flash the created zip file.
Any further questions feel free to ask, I can help as needed.
Click to expand...
Click to collapse
hey um quick question. theres a theme out there called forum.xda-developers.com/showthread.php?t=2467075. How can i apply this theme to the samsung touchqiz stock rom. Im rooted withs afestrap and i backed up my current rom. If i extract the apkj i see a bunch of files pertaining to the system/fonts/wallpapaer. will moving these to /SYSTEM apply the theme being that stock roms lack a theme engine. Or do you know of any other way to apply this theme.
**THANKS IN ADVANCE
androidfine16 said:
hey um quick question. theres a theme out there called forum.xda-developers.com/showthread.php?t=2467075. How can i apply this theme to the samsung touchqiz stock rom. Im rooted withs afestrap and i backed up my current rom. If i extract the apkj i see a bunch of files pertaining to the system/fonts/wallpapaer. will moving these to /SYSTEM apply the theme being that stock roms lack a theme engine. Or do you know of any other way to apply this theme.
**THANKS IN ADVANCE
Click to expand...
Click to collapse
I checked out the link a bit. It is made for CM11. You could grab all the PNG files and copy them into the vrtheme flashable zip. BUT you will need to RENAME ALL/MOST of the .pngs for use on a Touchwiz based rom.
http://forum.xda-developers.com/showthread.php?t=2467075
It is a lot of work, but can be done. I did it with one of my themes from an older phone where I had a Touchwiz Based Theme and a CM/AOKP Based ROM Themes.
There is no way just to flash it as Touchwiz does not use the theme engine.
RockRatt said:
I checked out the link a bit. It is made for CM11. You could grab all the PNG files and copy them into the vrtheme flashable zip. BUT you will need to RENAME ALL/MOST of the .pngs for use on a Touchwiz based rom.
http://forum.xda-developers.com/showthread.php?t=2467075
It is a lot of work, but can be done. I did it with one of my themes from an older phone where I had a Touchwiz Based Theme and a CM/AOKP Based ROM Themes.
There is no way just to flash it as Touchwiz does not use the theme engine.
Click to expand...
Click to collapse
Okay so forget about flashjng it on or applying it via theme engine. How about remove touchwiz all together and use this theme/up instead .
Lol I really don't want to do the whole renaming/editing to get this to work right.
Sent from my SAMSUNG-SGH-I337 using XDA Premium 4 mobile app

[Q] Deodexing problem

Hello, I'm an owner of XPERIA Z1, using the latest Customized Lollipop firmware (.242), struggling very much to deodex his device. I've tried 2 different methods, which both lead to problems:
1.) Using a flashable zip provided by venkat kamesh, in this thread: link. After flashing, I don't face any prominent problems, like FCs on system apps e.t.c. But whenever I'm trying to launch any app requiring OpenGL ES 2 , I get an error message/toast notification, about that, saying that my device is incompatible. And Google Play refuses to even show these apps in the search results, listing them as incompatible.
2.) Modifying the flashable zip to use my own /app, /priv-app, /framework, and even /vendor/apps fully deodexed folders, leading to a bootloop, and refusing to show more than 2 seconds of the bootanimation before rebooting. I thought that some package may be incompatible with my firmware, but this theory can't be proved yet.
*I've tried fixing permisions using both terminaland adb using this method: link. No result either.
Is there any other solution? Thank you!
NFS_FM said:
Hello, I'm an owner of XPERIA Z1, using the latest Customized Lollipop firmware (.242), struggling very much to deodex his device. I've tried 2 different methods, which both lead to problems:
1.) Using a flashable zip provided by venkat kamesh, in this thread: link. After flashing, I don't face any prominent problems, like FCs on system apps e.t.c. But whenever I'm trying to launch any app requiring OpenGL ES 2 , I get an error message/toast notification, about that, saying that my device is incompatible. And Google Play refuses to even show these apps in the search results, listing them as incompatible.
2.) Modifying the flashable zip to use my own /app, /priv-app, /framework, and even /vendor/apps fully deodexed folders, leading to a bootloop, and refusing to show more than 2 seconds of the bootanimation before rebooting. I thought that some package may be incompatible with my firmware, but this theory can't be proved yet.
*I've tried fixing permisions using both terminaland adb using this method: link. No result either.
Is there any other solution? Thank you!
Click to expand...
Click to collapse
Are you deodexing every odexed file? I normally only deodex those files whose smali I'm going to mod. There's not much point deodexing anything else..
Ticklefish said:
Are you deodexing every odexed file? I normally only deodex those files whose smali I'm going to mod. There's not much point deodexing anything else..
Click to expand...
Click to collapse
Well yes, I just suppose that a fully odexed or deodexed system is more stable than a mix of those two.
Is there any red-line that I must not pass? Like a paricular .apk or .jar file, for example. Also on KitKat, we had to have fully deodexed system for some mods to work (like the 4K Mod by Chocolatetrain). This restriction doesn't exist on Lollipop, which utilises ARM?
NFS_FM said:
Well yes, I just suppose that a fully odexed or deodexed system is more stable than a mix of those two.
Is there any red-line that I must not pass? Like a paricular .apk or .jar file, for example. Also on KitKat, we had to have fully deodexed system for some mods to work (like the 4K Mod by Chocolatetrain). This restriction doesn't exist on Lollipop, which utilises ARM?
Click to expand...
Click to collapse
No. You can, in theory, deodex as many or as few APK and JAR files as you like.
The whole point of deodexing is to make it easy to change smali files. It doesn't affect stability or performance, it's solely for modding. I normally deodex SystemUI.apk, framework.jar and android.policy.jar then leave the rest of the odexed files alone.
(Well, technically a deodexed ROM takes longer to boot if the Dalvik cache has been wiped but that's about it.)
The only reason I ask is that, if you only need to deodex a few files, there are various tools available for deodexing individual files instead of whole ROM's. I could mention that Tickle My Android can do it but that'd be a bit cheeky.
Oh, looking at that 4K mod you mentioned, it doesn't actually need the whole ROM to be deodexed. But there are so many files that are being replaced that do need to be deodexed that it's probably just simpler to say the entire ROM needs to be.
Ticklefish said:
No. You can, in theory, deodex as many or as few APK and JAR files as you like.
The only reason I ask is that, if you only need to deodex a few files, there are various tools available for deodexing individual files instead of whole ROM's. I could mention that Tickle My Android can do it but that'd be a bit cheeky.
Click to expand...
Click to collapse
OK, thank you for the answer, I will try then deodexing just the essentials: SystemUI.apk, framework.jar, framework-res.apk and SemcGenericUxpRes.apk
Final question, as I see in your program's thread, Lollipop editing/deodexing is not supported yet, so do you recommend an automate tool for the deodexing process (like JoelDroidLollipopBatchDeodexe or any other), or the manual method?
NFS_FM said:
OK, thank you for the answer, I will try then deodexing just the essentials: SystemUI.apk, framework.jar, framework-res.apk and SemcGenericUxpRes.apk
Final question, as I see in your program's thread, Lollipop editing/deodexing is not supported yet, so do you recommend an automate tool for the deodexing process (like JoelDroidLollipopBatchDeodexe or any other), or the manual method?
Click to expand...
Click to collapse
TMA does support deodexing of Lollipop APK files...I just can't guarantee that it'll be able to deodex everything. Guess I need to reword the OP....lol
NFS_FM said:
OK, thank you for the answer, I will try then deodexing just the essentials: SystemUI.apk, framework.jar, framework-res.apk and SemcGenericUxpRes.apk
Final question, as I see in your program's thread, Lollipop editing/deodexing is not supported yet, so do you recommend an automate tool for the deodexing process (like JoelDroidLollipopBatchDeodexe or any other), or the manual method?
Click to expand...
Click to collapse
you also can use advance apktool (nice tool) , but you will have to update the apktool to the last one i think its the 2.0.0because is not updated.. cheers
juanpirulo said:
you also can use advance apktool (nice tool) , but you will have to update the apktool to the last one i think its the 2.0.0because is not updated.. cheers
Click to expand...
Click to collapse
Hm... I will try that too if my (already) deodexed apks won't work, thank you.
Please ask in the Q&A section for your device.
Cross device section is for development only
Thread closed

Categories

Resources