[REQ] battery% mod(explicit) - Nexus 4 Themes and Apps

hey guys!
i kindly ask anyone in here whos in to modding the systemUI.apk from CM10.1 latest nightly(08/01) to show the stock icon, with a battery percentage on the left like the galaxy s3. i just cant figure out how to do this
heres a picture : http://i.ytimg.com/vi/9dBgAW6m9PE/0.jpg
thanks in advance!
cheers

bump.
Sent from my Nexus 4 using xda premium

Hung0702 said:
removed said:
Hi,
I hope I'm not bothering you, but I was browsing the ParanoidAndroid thread and you posted something about modifying battery icons. I've been trying to do this on my Nexus 4 running PA/Francos, and for some reason I can't figure out how to get different battery icons, I really just want an icon that shows the percentage. I have gotten some icons on, but it only showed the stock increments (43, 57, 71, etc.), but I can't figure out how to get 0-100 percentages showing. I was wondering if you could help, tell me how you did it and such.
Thanks.
Click to expand...
Click to collapse
No prob, bud. I just say "NO PMs" because I don't want to be flooded with personal zip requests. I'm no dev!
Anyway, I wasn't very descriptive when I talked about the batt icon mods. I forgot that I already injected the percent mod into my system. That's why you are having problems. Sorry for the ambiguity and lack of info. I'll be sure to edit the post soon. Let me know which one though, because I don't want other people to have the same trouble.
All you need to do is pull your SystemUI.apk and framework-res.apk (which I'm assuming you've done) and follow the directions on this page [http://forum.xda-developers.com/showthread.php?t=2037171]
Check the output and don't use the zip. Instead go into the zip and pull our the SystemUI.apk from that output and place it into the zip that is attached to the first post. The generated output flashable zip is broken, so he attached a working one to that first post.
I would still recommend you just take the generated SystemUI.apk and push it into your system yourself. I'll quote another post of mine:
Hung0702 said:
5. Put the modified SystemUI.apk on your phone's sdcard partition. You can do this through adb.
However, I don't use adb at all. I keep the SystemUI.apk on [Google] Drive, modify it from there, and download the modified SystemUI.apk to the sdcard. You can then replace the old SystemUI.apk using a root file browser (part 5a).
5a. Move/Copy the modified SystemUI.apk to the /system, but not in /system/app! Modify the permissions to match the current SystemUI.apk (you should just have to uncheck the group write privilege): rw-r--r--
Note that the permissions are set correctly, you can move the replace the old SystemUI.apk with your fancy new one. I recommend backing up the old one (you can just append the name so it looks like SystemUI.apk.bak). Reboot and you'll have a new battery icon. Maybe wipe cache and dalvik-cache. Occasionally, you'll get the old battery icon. I'm not sure why, and I don't really care.​
Click to expand...
Click to collapse
Now, you 100% have to reboot right after you replace the SystemUI.apk, but I don't always wipe cache. I do eventually get some unexpected force-closes so I strongly recommend wiping and allowing your phone to rebuild cache if you have the time. Just wipe, boot and DON'T touch anything for 10 min. Then only touch the phone to reboot, wait another 10 min after it finishes booting again. Then reboot 1 more time and you should be good to go.
GLHF
Click to expand...
Click to collapse
Here's a PM thread some one asked me. Just read through it and be sure to read ask the posts for the associated links. Again, no PMs please.

Related

How can i make theme by myself for g1?

How can i make theme by my self for my g1 because i want all kind of connect full. wifi full, bluetooth, 3g, signal full, it must fixed always full. Or someone made can share for me, please?
minim0g said:
How can i make theme by my self for my g1 because i want all kind of connect full. wifi full, bluetooth, 3g, signal full, it must fixed always full. Or someone made can share for me, please?
Click to expand...
Click to collapse
I really don't have a clue of what your asking.
You want to know how to theme or how to make a rom?
The best thing to do is start off small. Very small. For example try to theme Launcher.apk.
Open it with WinRAR and extract it.
Replace ONLY the .png files. (NOT 9.PNG files because those will mess up when you start your phone and can cause it to crash!)
Move your modified files back over to the location in WinRAR and replace the original.
Sign your modified file.
Create a flashable zip file with an update-script in the META-INF folder (better use an existing theme to figure that out)
Sign the zip file
Try to flash it. If you see the changes in your Launcher (that is the tab at the bottom of your screen that holds your apps) then it worked and you did it right. If not then search (PLEASE SEARCH) and read (PLEASE READ) before you post a question. This is a lot of time consuming and hard work for a noob. Not to be taken lightly.
Once you have the Launcher down you can do other apps (browser, gallery, music, phone, contacts, etc).
Once you have those down then we get to the GUTS of the phone. The framework! This is the status bar and everything in it. This is also other critical parts for your Android in this folder. Over 400 to be exact. Mess up just 1 of those and it can cause some serious problems! This is the /system/framework/framework-res.apk file. Treat it just like any other apk file.
By the way... don't ask us to help you with out searching first. Fair warning. This is a complicated process to explain in detail. I've made and modified my share of themes and I can tell you that even with everything already made and done it still takes about an hour to port everything over for a new rom. So again... this will take time and you can find all your answers by searching and reading but we will not spoon feed anyone nor will we do it for you. We're here to help but not to do everything for you.
Have fun and good luck.
Binary100100 said:
I really don't have a clue of what your asking.
You want to know how to theme or how to make a rom?
The best thing to do is start off small. Very small. For example try to theme Launcher.apk.
Open it with WinRAR and extract it.
Replace ONLY the .png files. (NOT 9.PNG files because those will mess up when you start your phone and can cause it to crash!)
Move your modified files back over to the location in WinRAR and replace the original.
Sign your modified file.
Create a flashable zip file with an update-script in the META-INF folder (better use an existing theme to figure that out)
Sign the zip file
Try to flash it. If you see the changes in your Launcher (that is the tab at the bottom of your screen that holds your apps) then it worked and you did it right. If not then search (PLEASE SEARCH) and read (PLEASE READ) before you post a question. This is a lot of time consuming and hard work for a noob. Not to be taken lightly.
Once you have the Launcher down you can do other apps (browser, gallery, music, phone, contacts, etc).
Once you have those down then we get to the GUTS of the phone. The framework! This is the status bar and everything in it. This is also other critical parts for your Android in this folder. Over 400 to be exact. Mess up just 1 of those and it can cause some serious problems! This is the /system/framework/framework-res.apk file. Treat it just like any other apk file.
By the way... don't ask us to help you with out searching first. Fair warning. This is a complicated process to explain in detail. I've made and modified my share of themes and I can tell you that even with everything already made and done it still takes about an hour to port everything over for a new rom. So again... this will take time and you can find all your answers by searching and reading but we will not spoon feed anyone nor will we do it for you. We're here to help but not to do everything for you.
Have fun and good luck.
Click to expand...
Click to collapse
Or he can make a metamorph which is basicly the same thing. The only differences are that you don't need to make a META-INF file or an Update-script. Pretty much all you need are the pictures that you want to use and your imagination.
Macrophage001 said:
Or he can make a metamorph which is basicly the same thing. The only differences are that you don't need to make a META-INF file or an Update-script. Pretty much all you need are the pictures that you want to use and your imagination.
Click to expand...
Click to collapse
I can make a theme easily... but my metamorphs never seem to work for some reason. Maybe I'm just trying too hard.
Or he can make a metamorph which is basicly the same thing. The only differences are that you don't need to make a META-INF file or an Update-script.
Click to expand...
Click to collapse
I can make a theme easily... but my metamorphs never seem to work for some reason. Maybe I'm just trying too hard.
Click to expand...
Click to collapse
One of the most common mistakes is when you are writing the .thm file.
When you are writing the location of the apk file, you have to put the forward-slash at the end.
Example:
/system/app/
how to create themes for metamorph
Macrophage001 said:
One of the most common mistakes is when you are writing the .thm file.
When you are writing the location of the apk file, you have to put the forward-slash at the end.
Example:
/system/app/
Click to expand...
Click to collapse
hey bro, good day, I just want to ask if how could I make a theme for my rooted G1 which is running a CM7 rom. I've seen you say that it is easier to create metamorph themes, with just a pictures and imagination?? how will I do that? sorry for that question but I'm really a new on this things,,

[Q] question on editing framework-res.apk

hey guys.
i'm having a frustrating issue when editing framework-res.apk to include the rectangle battery mod.
this is a long post...please DO NOT POST GENERIC ANSWERS WITHOUT READING THE POST FIRST!!!
i'm used to editing framework-res.apk and all other .apks on my phone for various purposes. i use a combination of 7zip and apkmanager 4.9 to extract, replace, decompile/recompile, etc. depending on what i'm doing.
at this point here's what i'm trying to do:
DaGunn provided me with a modified framework-res.apk which includes a buttonized power control widget (from JsChiSurf's thread). this is v2.0 (on the 3.29 ota). previously i had v1.0 which I had fully customized to my liking.
the file provided to me by DaGunn has the buttonized look, and some smooth sense elements, as well as the super circle battery meter.
i opened framework-res.apk he provided with 7zip and replaced all the 901 images in res/drawable-hdpi with my own 901 image files from my existing framework. these files all have the same exact name and same exact extensions. (hence when I drag and drop into the new framework-res.apk in 7zip i get a direct replacement rather than having extra files).
this has worked countless times in the past. as a matter of fact, it worked 99% of the way this time. all the framework images went back to my customized images. except the battery disappeared.
i narrowed it down to the battery images. if i leave his 101 circle battery .pngs and replace every other file in framework-res, it works just fine. all my images show and the battery shows up in the circle style. if i then just replace his 101 circle battery .pngs with my 101 matted blues rectangle battery .pngs, which are the same exact names (i checked!) and extension, and after I optimized them almost exactly the same file size as well, everything goes to crap. the battery doesn't show up at all in the title bar.
if i plug in the phone, the rectangle charging animation works, the download animation works, all other smooth sense animations that I have replaced with the mattedblues files from my previous framework work. except for the battery.
now, if his .pngs work, and mine replace his directly with the same exact name and extension, why would the battery display suddenly disappear?!
I'm being told it has to do with resource IDs, but here's the problem. I was provided a "guide" on how to properly modify framework-res by one of the guys involved in MattedBlues (beatblaster). in it I was told that I only need to recompile framework-res after adding NEW .pngs, that if the .pngs were already accounted for in resources.arsc then trying to recompile would throw errors and instead I should replace those .pngs with 7zip. that's what i'm trying to do but as I said, then the battery meter doesn't work.
if i decompile DaGunn's original file, I'm able to recompile it just fine. keep in mind this file already has a lot of modifications on it as it is. but if i decompile his framework, and I replace his .pngs with mine, and try to recompile, I get thousands of lines of error in the log. all having to do with public.xml, which I'm being told goes back to resource IDs.
what am i missing here? i know how to remove the battery display from the title bar so I dont have that empty space, but I do enjoy my percentage battery and I would like to get this to work!
any input will be greatly appreciated...
+5 points for you if you read this far!
I'm not clear if you are recompiling or just dropping the images in, but if you are recompiling try making all your xml changes without adding the new images. Then after its compiled drop your new images in.
Sent from my PC36100 using XDA App
i'm not modifying any xmls. only replacing .pngs. it's specifically clarified in the OP.
the existing framework, with its modified .xmls and .pngs as given to me decompiles and recompiles just fine. if i decompile, then replace the .pngs with my own, and try to recompile, then it gives error. if i just open it in 7zip and replace the .pngs with my own, the battery disappears, but no force closes or error messages.
anyone else?
Are any of the .png files you are replacing have the 9.png extension? I know modifying these is very tedious and requires a more difficult process. Also can u post the errors in the apkmanager log?
Sent from my DROIDX using XDA App
nope. the files are stat_sys_battery_0 through stat_sys_battery_100. all .png not a single one in any other extension.
i can't post the apk manager log because it is literally thousands of lines of errors.
what I can do is give you the framework as I have it, working with his battery .pngs and a separate .zip with my battery .pngs, so you can try to do it yourself and see the problem/compile errors.
it really is weird...or stupidly simple!
Firstly you SHOULD NOT be decompiling just to swap images, even .9 pngs. You only need to decompile if you are editing xml files which by reading your post you aren't. To change pngs only, you should use option 1 (extract) in apk manager. Then change all your pngs you want changed. Use option 3 to recompress your framework. Make sure to tell it that it is a system apk, and then use option 12 to resign. You should be good to go.
t3project said:
Firstly you SHOULD NOT be decompiling just to swap images, even .9 pngs. You only need to decompile if you are editing xml files which by reading your post you aren't. To change pngs only, you should use option 1 (extract) in apk manager. Then change all your pngs you want changed. Use option 3 to recompress your framework. Make sure to tell it that it is a system apk, and then use option 12 to resign. You should be good to go.
Click to expand...
Click to collapse
+1
The reason I was confused about what you were trying to accomplish is because you don't need to decompile unless changing xml's.
Thats what I do for non system apps. I'll give it a try in the morning and see if it makes a difference.
Swyped from my HTC Evo 4G on the MetroPCS 1X network!
Ok first if you go to recompile something and you get errors usally the first error is the one causing the problem. Look and see what the first error is and fix it, like has been said what you are trying to do using 7 zip is a good way to do it, not decompiling. You said this is how you prefer way to do it anyway so that's good.
Second I have found at times that 7 zip does not properly replace threw images so weird things happen, only happens sometimes. With that said try using apk manager to unzip the apk replace the images and rezip it do not sign it. See if that works
Third. If all else fails download nijamorph from the market. Put the images you want on your scard where I can find them easy. Open nijamorph and start a new project navigate to your framework-res.apk.from here you can do two things first you can press existing project and find what you are looking for and change one at a time or the easy way. Close the app open your favorite file manager find the pngs you are going to use, copy them, then navigate to android themes/workspace in there you will find the framework-resapk folder, in there is everything just like the apk so paste the files were they go (that last step can all be done on the computer if that is easier for you.) Next open your nijamorph app and press finish project follow the prompts and let it do its thing. If your phone does not reboot reboot it.you should be good to go.
Like always do a backup before doing these steps
Good luck
Sent from my unrEVOked using xda app
Max_Pain said:
Thats what I do for non system apps. I'll give it a try in the morning and see if it makes a difference.
Swyped from my HTC Evo 4G on the MetroPCS 1X network!
Click to expand...
Click to collapse
it works the same way when replacing pngs. compiling and recompiling is only needed if making xml/code changes. i had to learn this the hard way too. just make sure you sign system apps with option 12 instead of option 4 like you would with a non-system app.
t3project said:
To change pngs only, you should use option 1 (extract) in apk manager. Then change all your pngs you want changed. Use option 3 to recompress your framework. Make sure to tell it that it is a system apk, and then use option 12 to resign. You should be good to go.
Click to expand...
Click to collapse
this worked!
dont know why I would have to extract, replace, compress, as I've NEVER done that with framework-res.apk, only when editing apps that need to be resigned. oh well, it worked
I think you misunderstood what I told you in the guide I gave you which is you only need to decompile/recompile when you are making XML code changes as stated above in a previous post. When I wrote that guide for you I wrote it thinking you wanted to add more features to the original power control widgets (such as smooth mods). If you want to simply replace PNGs, as stated previously, all you need to do is replace the PNGs without decompiling and recompiling.
In this instance, the problem you're running into is that you're trying to compile the framework using already-customized PNGs which will not work (another point that was stated in the guide as well )
So, in conclusion, if all you want to do is change the PNGs all you gotta do is (and you probably already know this but I'm including it to be thorough):
- Open archive (framework) in 7-zip
- Navigate to framework-res/res/drawable-hdpi
- Add your desired PNGs into the 7-zip window
- Close the 7-zip window and answer yes when 7zip asks if you want to update the archive
- Flash framework onto your phone
- All should be well
- When using this method there is no signing necessary!
Again, as stated previously, the only time you need to decompile/recompile is when you're going to edit an XML (or make any other code changes). So, for a final example of this, let's say you wanted to take DaGunn's power widgets framework but you wanted to change the "text highlight" color. What you would do then is this:
- Decompile DaGunn's framework in APK manager (option 9)
- Navigate to /projects/framework-res.apk/values/styles..xml
- Search for for "<item name="textColorHighlight">" and change the color HEX code
- Save the changes to styles.xml
- Compile the framework in APK manager (option 11)
- When asked if this is a system apk answer Y for yes
- When asked if you want to copy additional files to reduce the amount of errors answer Y for yes
- When prompted about the "keep" folder, open a file manager and navigate to /<apk_manager_folder>/keep and DELETE the resources.arsc file
- Go back to the APK manager window and press any button to finish the compile process
- Back in your file manager, go back to /<apk_manager_folder>/place-apk-here-for-modding/ folder, grab the unsignedFramework-res.apk, rename it to framework-res.apk and flash it however you flash it.
- Test your changes (in this example, the text highlight color)
This concludes my post.
thanks for the clarification beat.
but the problem was I was just opening framework-res.apk with 7zip, doing it like you're saying to do in the first part of your post above, and the battery meter would disappear instead of showing the mattedblues battery images instead of the circle ones.
if i left his .pngs in, the battery would show. if i replaced his with mine using 7zip, the battery would disappear.
this confused me because this is exactly the way that I've been integrating mattedblues into every framework i get. i open in 7zip, replace existing files with my own, and bam, everything works. this time it didnt!
this got fixed by extracting, replacing, and compressing again in apk manager 4.9.
i tried decompiling/recompiling simply because I was so out of ideas as to how else to go about it. I don't need to make any .xml changes to DaGunn's file because he had already integrated most of smooth sense with the percentage battery and v2 of the power widgets
anyways, thanks for the clarification.
beatblaster said:
So, in conclusion, if all you want to do is change the PNGs all you gotta do is (and you probably already know this but I'm including it to be thorough):
- Open archive (framework) in 7-zip
- Navigate to framework-res/res/drawable-hdpi
- Add your desired PNGs into the 7-zip window
- Close the 7-zip window and answer yes when 7zip asks if you want to update the archive
- Flash framework onto your phone
- All should be well
- When using this method there is no signing necessary!
Click to expand...
Click to collapse
max, not sure why this wouldnt work for you.
t3project said:
max, not sure why this wouldnt work for you.
Click to expand...
Click to collapse
no. this method is SUPPOSED TO WORK, as I said in the original post. this is how I've done every single change to framework-res.apk in the past. that is why I felt the need to ask for help. because the same thing that has always worked, suddenly wasn't working anymore!
for some reason, using 7zip WAS NOT WORKING to replace the battery .pngs....but ONLY those files. every other file was replaced using 7zip and they all worked. the only files I ended up having to replace through apk manager extract/compress method you gave me were the battery images.
thanks everyone
Max_Pain said:
no. this method is SUPPOSED TO WORK, as I said in the original post. this is how I've done every single change to framework-res.apk in the past. that is why I felt the need to ask for help. because the same thing that has always worked, suddenly wasn't working anymore!
for some reason, using 7zip WAS NOT WORKING to replace the battery .pngs....but ONLY those files. every other file was replaced using 7zip and they all worked. the only files I ended up having to replace through apk manager extract/compress method you gave me were the battery images.
thanks everyone
Click to expand...
Click to collapse
ohh i know. i use the way i told you because i just like to see the images while im playing with them. that way i know for sure whats up.

Compiling two SystemUI.apk's into one

Hello. I would like to know how to compile two SystemUI.apk's into one .apk
I found two mods here on XDA-one is a NavBar theme, and the second one is a mod to show battery stats in the notification bar.
Im not a real expert about these stuff but Im willing to try, so if someone could tell me how to do it, instead of doing it for me, I would be glad
Thanks!
Use 7zip to extract the navbar mod and find the images (right click the apk and extract like a zip file). Now place those images into the battery mod system.apk my right clicking and opening with 7zip (don't extract). Then just sign the apk and push it back to the phone. The reason to do it this way is that disassembling SystemUI.apk can cause issues if done wrong, simply replacing images is safer.
Thanks for the quick replay! I have one last question-do I really need to sign the .apk? Or it can work even without singing it.
[EDIT] Never mind, did everything u said about copying the .png's but without singing-and it worked. Thank you so much!
problem
hi good day!
i have a very big problem with my android phone i wiped out all data including system files with out back up..how to fix it and restore the original files..can somebody help me...

[Q] Where is the apk that has the phone icon in Jellybean?

Sorry for such a simple question but this is driving me nuts. I'm running the recently released deodexed Jelly Bean 4.1.1 ROM and I am rooted. I want to change some of the system icons and I've found most of them. I'm not having any luck with the phone ico,however.
I found the SecPhone.apk and it looks like that is where it is. But it must be somewhere else because every time I've changed it, I always get the same result...the little green phone.
Here is what I did:
I copied the SecPhone.apk to my computer and replaced the icon with the one I wanted.
I zipped it.
Signed it.
Then changed the zip to apk.
I then pasted the apk to my sdcard on my phone.
I then went into ES Explorer with root access and replaced the apk in /system/app with the new apk and made sure the permissions were correct and then rebooted.
(Note: I tried to install it but it would not let me. I read a how-to that stated placing it in the folder and rebooting would work the same way. Probably not true, looking back on it now.)
After all that (many times) the damn green phone icon pops back up when the phone re-boots, just sitting there, mocking me.
It's probably evident from my post I'm a noob with modding but this seems like it should be much easier than what I'm going through right now. Any help with this is much appreciated. Thank you.
if I'm not mistaken phone n contacts are switchd so to speak.extract the SecContacts.apk like you did phone. find 5 or 6 folders that start with mipmap-xxxx and replace ic_launcher_phone in all of them. Do the same in the drawable folders as well
Thanks for the suggestion. I'll give it a shot. I figured there had to be other copies of that icon and I just hadn't found the right one yet.
You were correct. There are about 10 copies of ic_launcher_phone in the different folders exactly where you stated.
Guess I should match the sizes of the icons I'm replacing too. These can't all be the same dimensions, can they? This is an awful lot of work to change one icon. LOL. Thanks again.
evoliphant said:
You were correct. There are about 10 copies of ic_launcher_phone in the different folders exactly where you stated.
Guess I should match the sizes of the icons I'm replacing too. These can't all be the same dimensions, can they? This is an awful lot of work to change one icon. LOL. Thanks again.
Click to expand...
Click to collapse
lol no problem
Pretty sure they're all the same.You should be safe
billard412 said:
lol no problem
Pretty sure they're all the same.You should be safe
Click to expand...
Click to collapse
Sort-of. Only the one for your phone's DPI is going to get used, so if you make them all the same it just means you can't run the same .apk on a tablet. Also, it might screw with you if you use HDMI out and the icons get made smaller to match the lower DPI of a monitor (100 vs 300+ on the SGS3), but I don't have the MHL adapter yet so I haven't tried that myself.
Well, unfortunately it didn't work. I did finally get rid of the green phone icon, but mine was no where to be found! Plus, com.phone.blahblah kept forcing close. Whatever I did, 4.1.1 didn't like one bit.
Oh well.
I followed the same process as I put in the OP for this except I did it for both SecPhone.apk and SecContacts.apk. Pasted both with Root Explorer, rebooted and then the home screen would come up, the phone icon was gone and then it would hang and give me the FC error. I just reflashed and gave up for the time being. Hopefully someone has an answer. The only other thing I might try differently is using adb? Would that be a better option than using the Root Explorer copy/paste method?
I wonder if I took the 4.1.1 Rom and opened it and changed the files in that and then flashed the whole ROM again if that would be any better. Would I basically just do the same process I did with the individual apks, except instead of just installing the single apk, the whole ROM goes in with it.
I just can't for the life of me understand why changing png icon images would cause the com.phone process to FC.
Try to use 7zip to extract the icon located in 'res/mipmap-xhdpi' of SecContacts.apk, edit it, and the use 7zip to drop the edited icon directly into the apk. Don't rezip or sign..
That did it! Thank you so much. I actually went ahead replaced all the pngs with my icon in all folders of the SecContacts. I did it first in just the folder you suggested but that didn't change anything. I then changed them all using 7 zip and put them in system/app and rebooted. Boom, Green phone gone! Looks like it was zip/signing problem. 7zip is the answer to my modding woes I guess. Thanks again.
evoliphant said:
That did it! Thank you so much. I actually went ahead replaced all the pngs with my icon in all folders of the SecContacts. I did it first in just the folder you suggested but that didn't change anything. I then changed them all using 7 zip and put them in system/app and rebooted. Boom, Green phone gone! Looks like it was zip/signing problem. 7zip is the answer to my modding woes I guess. Thanks again.
Click to expand...
Click to collapse
It may be expecting the file to be uncompressed as well - maybe 7z is putting it in the same way it was. The other issue is it needs to be 4-byte aligned, which you can get via the zipalign program that comes with the SDK - and maybe 7z does that automatically as well.

Odex ANY touchwiz ROM for the GN2 #moreperformance

“ADMIRAL WILL YOU PLEASE COLOR CODE THAT WALL OF TEXT?” – why yes I will.
GREEN = Informational stuff about what we are doing.
BLUE = Instructions for process
RED = IMPORTANCE, PLEASE DO NOT DISREGARD
BLACK = not too important
PINK = very manly
####################################################################
DISCLAIMER – THIS WILL IMPROVE PERORMANCE (again…lolllll) AND FURTHER AND FARTHER OPTIMIZE YOUR DEVICE, SAVE STORAGE SPACE ON YOUR INTERNAL SD, AND PUT YOUR /SYSTEM/FRAMEWORK DIRECTORY AND ALL CONTENTS ON THE MOST POTENT ANABOLIC STERIODS KNOWN TO MAN. I AM NOT RESPONSIBLE IF/WHEN YOU FINISH READING THIS THREAD YOUR DEVICE RUNS OFF WITH YOUR GIRLFRIEND/WIFE/FAMILY/JOB BECAUSE IT IS NOW MORE “MANLEY” THAN YOU (see wut I did there…manley..rofl…).
####################################################################
Ok on to the serious part….
First, why odex? And what does it mean?
1.Odexing has the following benefits: Saves space in your /data directory, speeds up boot times SLIGHTLY, boosts loading of apps (in this case the apps that compose your framework), zip aligns framework and corresponding .odex files, reduced CPU cycles by optimizing framework.
2.So what is an “odex” file? Android applications similar to zip files. APK stands for “android package” and all of them contain java code, which is the second language in android aside from Linux. This code speaks to the device to execute operations that in turn speak to other system files, then ultimately the kernel, hardware, etc etc etc… we’ll not get into that. Java code is packed into a file within the APK called a “classes.dex” file and this file is parsed (copied) by the dalvik JVM and a cache of the processed classes.dex file is stored in the device’s /data/dalvik-cache directory.
An odex file is basically an already processed version of the classes.dex file that is “execution ready” for Dalvik. When xxxx application is “odexed”, the classes.dex is removed from the APK entirely and the information is converted to an odex file, and stored aside its owner APK (or in this case framework file). So rather than have two copies of the same file, and in different locations, you have one copy of that file, in the same location of the APK, all ready to go, and therefore making it more optimized for access by you – the user.
The benefits of doing this are tremendous! I have been doing this to all of my ROMs since I can remember. This process is detailed, but simple, just read carefully. I outlined the directions as simple and clear as I possibly could
On to the fun part>>>>>
FIRST, BEFORE YOU CONTINUE, BEAR IN MIND I DO NOT CURRENTLY HAVE A SCRIPT MADE TO UNDO THIS MOD, ONCE IT IS DONE, IT IS DONE! IT IS SAFE, HOWEVER, JUST FOLLOW DIRECTIONS CAREFULLY!
ALSO, MAKE SURE YOU ALREADY HAVE YOUR FAVORITE THEME INSTALLED! I WILL NOT BE RESPONSIBLE IF YOU APPLY THIS MOD THEN TRY TO FLASH XXXXX THEME AND GET CAUGHT IN A BOOT LOOP BECAUSE YOU COULDN’T DECIDE IF YOU WANTED GREEN OR BLUE BATTERY ICONS THEN CHANGED YOUR MIND ABOUT IT AFTER DOING THIS…..just don’t waste your time posting in this thread if you do that. But if you MUST bother such a story, here is your answer to the problem… “flash your ROM again, no need to wipe data, your device will boot now”############
Instructions:
1.Download Terminal emulator and FX file explorer and FX root add on from market.
2.Download the zip file at the end of this post named “odex.zip” to your device.
3.Open FX file explorer, find the odex.zip file, long press on it and select “open with” then select “Archive Extractor” then hit “extract here”
4.After it is done, you will then find a folder named “odex” in the same location of the downloaded “zip” version. Llong press on that folder and select copy
5.Navigate to the home screen of the FX file app, and select the red system logo (this is the one that allows you to explore as root.
6.Navigate to /data/local/tmp, when you get to tmp, select the icon at the top right corner of the app that says “clipboard” and paste the folder into /data/local/tmp
You should now have a folder there named “odex”
7.Long press on the folder, select “permissions” and check ALL of the 3 boxes for Read, Write, and Exec(ute)… if you have done this successfully the bottom left of that little popup window for setting permissions should say 0777, hit “ok” to commit the changes.
8.Now go into the odex folder, and inside of it repeat step 7 for ALL 5 files. They should all have FULL permissions.
9.After that is done, hit back until you are at the root directory, seeing “System (Root)” at the top of the FX file window with the red box with a # symbol inside of it. You’ll notice as well, the top right corner there is a yellow lock icon, inside a green box. We need that to be red, with an “unlocked” lock icon. Select it, and disregard built in FX file warning about how the world is going to end etc etc etc if you don’t know what you are doing – you know what you are doing, so no worries. If it is already red and “unlocked” then awesome, skip to step 10.
10.Scroll down a bit, and you will see “system” folder, this is your system directory. Go in there, and again make sure we are “red” and “unlocked” in the top right corner. You are a savage animal at this point, on a mission. Your device needs optimizing, disregard doomsday warnings about the T1000 enslaving the human race and how your brother will likely turn into a cylon if you unlock your /system directory (or make it read/writable… which is all this is doing)
NOW! The really fun part. You got your favorite theme? Sweet. Got your odex files all cocked and ready to rock? Check. Got your kids addicted to Teletubbies in case you mess up your ***t and you need like an hour to fix it?!?! Kidding… that won’t happen…
FIRST BEFORE YOU CONTINUE!!!!! PUT YOUR DEVICE INTO AIRPLANE MODE!!!!!!! You do not want to get a phone call or something while this script is executing. Interruptions will be rude and unkind… Please follow this instruction, please. For the love of the last terrible terminator movie.
11.Open terminal emulator, and type the following commands WITHOUT the quotes, hitting enter after each line:
“su” (if it asks for super user permission, grant it, obviously, if it doesn’t ask, you have already granted it)
“/data/local/tmp/odex/odex”
About 8.7 seconds later, it should be done, and you will see a little message saying “reboot to recovery and wipe cache and dalvik cache one more time” at the very end.
12.Hold power button, select “reboot options” then “recovery” hit ok, boom. If you don’t have that neat little modification to your android.policy.jar file, then power off, and boot into recovery by holding the volume up, home, and power button. In that order, until you see something on your screen. If you are NOT RUNNING EXT2… meaning you are not running Malicious ROM and/or you have not used my ext2 modificaitons…. Then simply type “reboot recovery” in terminal emulator, hit enter, and skip all the previous crap in “12”… “but then y u no say that first admiral?” … “Don’t question me son, it is for the good of the nation and humanity, and noobs who would read “oh ok reboot recovery BOOM” then they corrupt a file somewhere because of an unclean shutdown and are back at step -1 of this entire instruction which is restoring their backup… if they were pansy enough to make a backup. The admiral is manley, he has no use for backups. But he also knows what to do in case he needs one and doesn’t have one, cadet.”
ALSO IMPORTANT!!!!! Before you wipe dalvik cache again from recovery… if you are running my ext2 modification for /system /data/ and /cache…. MAKE SURE YOU VERIFY “THE BOX” is checked in twrp settings… you know which one I am talking about at this point. lol. It is the “format with yadda yadda rm command”
Wipe dalvik cache from recovery once more, then reboot the device.
DONE! Your ROM is now odexed!
-Admiral
http://db.tt/na11Ma9L
Another may mod. I'm not the only one who enjoys odexed. I was actually going to make the next release odexed... or was at least tossing the idea around in my head
Sent from my SGH-T889 using xda app-developers app
kintwofan said:
Another may mod. I'm not the only one who enjoys odexed. I was actually going to make the next release odexed... or was at least tossing the idea around in my head
Sent from my SGH-T889 using xda app-developers app
Click to expand...
Click to collapse
Well now you can.
I'm a firm believer in odexing. Most efficient way to run. I'm all about efficiency
Sent from my SM-N900T
Is tweaked odexed?
Sent from my SGH-T889 using xda premium
Tweaked is not odexed by default. You can find out if the ROM you are running is odexed or not by going to /system/framework with a file explorer. If you see a bunch of files in there with ".odex" tags on the tail end of them, then it is odexed.
If they are not there, then it is not odexed.
Sent from my SM-N900T
AngryDinosaur said:
Is tweaked odexed?
Sent from my SGH-T889 using xda premium
Click to expand...
Click to collapse
Non if the custom ROMs are odexed. It's more of a stock thing
Sent from my SGH-T889 using xda app-developers app
Alright
Sent from my SGH-T889 using xda premium
I keep getting this
Sent from my SGH-T889 using xda premium
Can we Odex our roms with XPosed framework mod installed? Or can we only Odex the apps and not system? Thanks a bunch for sharing.
Noellenchris
noellenchris said:
Can we Odex our roms with XPosed framework mod installed? Or can we only Odex the apps and not system? Thanks a bunch for sharing.
Noellenchris
Click to expand...
Click to collapse
you can odex any framework with this...
Not sure what you mean by the second part of your question, though. This is odexing your framework... which is found in /system ...?
ezsoulja said:
I keep getting this
Sent from my SGH-T889 using xda premium
Click to expand...
Click to collapse
For some reason it is thinking you are trying to execute a folder? And not a file?
Not cutting or flaming you in any way, but this is a user error. You typed the command properly, and everything looks like it SHOULD have executed. Go back to the step where you are moving the odex folder to the /data/local/tmp directory, make sure you did everything correctly, and retry.
Admiral Sir Manley Power said:
you can odex any framework with this...
Not sure what you mean by the second part of your question, though. This is odexing your framework... which is found in /system ...?
For some reason it is thinking you are trying to execute a folder? And not a file?
Not cutting or flaming you in any way, but this is a user error. You typed the command properly, and everything looks like it SHOULD have executed. Go back to the step where you are moving the odex folder to the /data/local/tmp directory, make sure you did everything correctly, and retry.
Click to expand...
Click to collapse
i made sure of it, i extracted the folder to the tmp folder and changed the odex folder 1 and 2 to 777 and all the files inside the 2nd odex folder and had both the root of the system and folder unlocked with the red icon. im not sure what could else be missing. im on tweaked 2.4.1 btw
ezsoulja said:
i made sure of it, i extracted the folder to the tmp folder and changed the odex folder 1 and 2 to 777 and all the files inside the 2nd odex folder and had both the root of the system and folder unlocked with the red icon. im not sure what could else be missing. im on tweaked 2.4.1 btw
Click to expand...
Click to collapse
Why do you have two odex folders?
Sent from my SGH-T889 using Tapatalk 2
Admiral Sir Manley Power said:
you can odex any framework with this...
Not sure what you mean by the second part of your question, though. This is odexing your framework... which is found in /system ...?.
Click to expand...
Click to collapse
With XPosed installed it can modify the framework, I'm afraid if I odex the framework, the xposed add on will crash my system. There is also an application on XDA called "Odex Me" which only Odex's the Applications and not the framework, that's what I was talking about in my second part of the question. I suppose I can do a backup and give it a go and see what xposed does.
Also Xposed also does other system mods other than framework. So it may only disable the framework modding portions after I odex the framewok.
Noellenchris
Admiral Sir Manley Power said:
Why do you have two odex folders?
Sent from my SGH-T889 using Tapatalk 2
Click to expand...
Click to collapse
For some reason when I extracted it, that's the way it came.. So it's basically just like the line says /data/local/tmp/odex/odex
EDIT: just removed one of the odex folders from within the odex folder and transfered the files to the first folder and everything worked from that point on..
Sent from my SGH-T889 using xda premium
noellenchris said:
With XPosed installed it can modify the framework, I'm afraid if I odex the framework, the xposed add on will crash my system. There is also an application on XDA called "Odex Me" which only Odex's the Applications and not the framework, that's what I was talking about in my second part of the question. I suppose I can do a backup and give it a go and see what xposed does.
Also Xposed also does other system mods other than framework. So it may only disable the framework modding portions after I odex the framewok.
Noellenchris
Click to expand...
Click to collapse
You'll be fine.
Go ahead and do it. Just make a backup of your /system if you wanna be safe, that's what they are there for
The DL link isn't working
Edit: Got it downloaded and working thanks for the odex man.
P.S What can be modified without messing up the odex for example will xposed framework modules cause the rom and odex to have complications. Thanks in advance
Sent from my SGH-T889 using xda premium
gonnapushthru06 said:
The DL link isn't working
Edit: Got it downloaded and working thanks for the odex man.
P.S What can be modified without messing up the odex for example will xposed framework modules cause the rom and odex to have complications. Thanks in advance
Sent from my SGH-T889 using xda premium
Click to expand...
Click to collapse
It may or may not. Honestly, either way it will require a little bit of work on your part after you flash it (assuming it actually boots, but it should...)
Just, best thing to do, like I said in the OP... Is flash your themes first, then odex. It will save you from the extra headaches and work trying to do the process in reverse.
Admiral Sir Manley Power said:
You'll be fine.
Go ahead and do it. Just make a backup of your /system if you wanna be safe, that's what they are there for
Click to expand...
Click to collapse
I've odex'd and it seems fine with xposed, after reading info on xposed they say it works on deox and odex roms, and it's running smooth. For some reason the screen appears brighter and sharper, probably some mod is not working but either way it is smooth and placebo maybe but looks great. Thanks again. I've done this in the past, but never to the system, just apps.
Noellenchris

Categories

Resources