Defy+ CM9 On-screen button - Defy Android Development

Hey guys, I finally managed to get it to work! I've done the editting of the framework-res.apk and finally got the on-screen button to work!
After you downloaded the file, unzip it and use adb and push it into your system/framework.res
Or:
Unzip it and put it into the flashable zip, system/framework. Then flash it via CMW.
NOTE: To disable the capacitive buttons, download the four file from the link and copy paste it into your system/usr/keylayout.
*remember to back up the 4 original files before replacing it!
Credit to " adamo3957 " for telling me this!
http://www.mediafire.com/?jzcpylhc0996xa4
http://www.mediafire.com/?iuuinn9t0m1vrww
http://www.mediafire.com/?2uw2z7oubw9it2l
http://www.mediafire.com/?7aivvw3acd25rl7
Sorry I had to upload to mediafire, because my PC is not working..
Alternate Link: http://db.tt/h8Bd1nIZ
marhensa said:
-----------------------------------------------
Make sure you have JRE installed on your system
Download and install JRE first
* Download JRE 64 bit for 64 bit system *
- Get your original framework-res.apk file from /system/framework/framework-res.apk
- Use adb pull, or just simply take it from inside ROM's zip
- Download the attachment, or this link (APKTool) (use this APKTool, some APKTools version cannot re-compile)
- Extract APKTool.zip
- In Windows Explorer, press hold Shift and right click APKTool folder
- Choose "Open command window here"
- In command prompt window, type:
apktool d framework-res.apk framework-res-edit
- APK is now decompiled, so now you can edit something, like changing the images or editing XMLs.
- Decompiled APK is on folder "framework-res-edit"
- Go to folder \framework-res-edit\res\values
- There's two file should be edited, bools.xml and dimens.xml
- For bools.xml, find this line, and change it to true, then save.
<bool name="config_showNavigationBar">true</bool>
- For dimens.xml, find this line, and change it to 36 (36 of height, so won't take much space), save.
<dimen name="navigation_bar_height">36.0dip</dimen>
- Back to the command prompt and then type:
apktool b framework-res-edit
- Just wait, it would take a minutes.. and now APK is re-compiled
if anything goes right, it should be like this screenshot:
ps:
on decompile and re-compile command i'm using "framework-edit-res" as an example of folder name,
you could use another folder name, it's your choice.
IMPORTANT..!!
In this case (editing a framework),
just DO NOT USE a recompiled APK on \framework-res-edit\dist
Use manual method, instead.
Because "resources.arsc" file inside the framework APK should not be compressed at all,
otherwise, you'll get bootloop.
resources.arsc should ONLY be "stored" on archive file, not "compressed".
So, here we go..
- Rename the ORIGINAL framework-res.apk to framework-res.zip
- OPEN it with 7zip or WinRAR, just let the window stay opened
- Go to folder \framework-res-edit\build\apk then delete AndroidManifest.xml file
- Drag "res" folder into 7zip / WinRAR window, so the res folder is now updated
- Drag resources.arsc file into 7zip / WinRAR window, BUT set the compression as "STORE" only
- Now all the files on original framework-res should be updated with the edited one
- Rename framework-res.zip to framework-res.apk.
- You are good to go, use that new framework in your system.
- Use adb push or create update zip to put it on your rom, your choice..
- Make sure wipe cache + wipe dalvik cache after that.
-----------------------------------------------
Click to expand...
Click to collapse
*Awesome tutorial from marhensa
Updates:
Added: Flashable Zip for those who don't know how to use ADB
Added: (090712 Quarx Defy+/ GB kernel build) On Screen Button
Added: (100712 Quarx Defy+/ GB kernel build) On Screen Button
Added: (110712 Epsylon Defy/ Froyo kernel build) On Screen Button
DEFY+
Some Requests:
-Enable + Revert ( Epsylon 11072012 Defy Build):
https://www.dropbox.com/s/ix0f5nhk71y7s5b/(Multi) Epsylon 11072012 Defy Build.rar
-Enable + Revert ( Quarx 10072012 Defy+ Build):
https://www.dropbox.com/s/no864wps6s5zpyn/(Multi) Quarx 10072012 Defy+ Build.rar
*Download according to your model! Don't download the wrong ones, as I have added a Epsylon DEFY Build (11072012)!

yeah, great mod mate..
although it is little weird..
because we have physical touch button.

It would be useful if we can disable the physical touch-buttons so you don't touch them accidentally in-game.(That happens sometimes to me).

Yeah, I know. I'm now trying to find a way to disable it.

marhensa said:
yeah, great mod mate..
although it is little weird..
because we have physical touch button.
Click to expand...
Click to collapse
I like virtual buttons that's what ICS is all about.

Why would you waste screen estate when you have physical buttons?
Sent from my MB525 using xda premium

vap_66 said:
Why would you waste screen estate when you have physical buttons?
Sent from my MB525 using xda premium
Click to expand...
Click to collapse
Well, its up to your taste. If you like the ICS om-screen button, but don't mind wasting just a little bit space, then this is good. But you if don't like wasting a little space, then you can stick to the physical buttons.

I have this mod too running on my defy...... I was a bit confused at first yesterday while i was recompiling my framework-res..... Modding is sooo much fun

Kayant said:
I have this mod too running on my defy..
Click to expand...
Click to collapse
saw you have this running on a SoC green lens. did you follow same steps as OP?
Edit: bit the bullet and went ahead and followed OP instructions on green lens. didn't work. ah, oh well

How edited you the framework-res?
If I edit my and install it I can't boot anymore.

m11kkaa said:
How edited you the framework-res?
If I edit my and install it I can't boot anymore.
Click to expand...
Click to collapse
Decompile edit recompile...
I don't remember if sign is required or not...
Last time I signed and bootlooped!
Editmake sure it recompiles properly... apktool can have problems... recompiled file is smaller that original...
Sent from my MB525 using xda premium

what da ugly mada..
Using heeptick also can ma
.

Maybe you guys forgot this step
syllogyking said:
saw you have this running on a SoC green lens. did you follow same steps as OP?
Edit: bit the bullet and went ahead and followed OP instructions on green lens. didn't work. ah, oh well
Click to expand...
Click to collapse
m11kkaa said:
How edited you the framework-res?
If I edit my and install it I can't boot anymore.
Click to expand...
Click to collapse
I used this amazing guide by _calum_ for assistant as am a noob at editiing apks
http://forum.xda-developers.com/showpost.php?p=9126643#post9126643
I think you lot have forgotten to do the last step........ copy the edited files from the newly complied framework to your original........ I don't do that before and i got bootloops.

nogoodusername said:
Decompile edit recompile...
I don't remember if sign is required or not...
Last time I signed and bootlooped!
Editmake sure it recompiles properly... apktool can have problems... recompiled file is smaller that original...
Sent from my MB525 using xda premium
Click to expand...
Click to collapse
That's why I always stuck at boot loop when I use apktool. This thread is good , http://forum.xda-developers.com/showpost.php?p=9126643#post9126643 that's what I did to recompile it!
guffoe said:
what da ugly mada..
Using heeptick also can ma
.
Click to expand...
Click to collapse
Not that ugly.. hmm, the way you 'speak' looks familiar:... looks like singlish...

Nchls said:
I like virtual buttons that's what ICS is all about.
Click to expand...
Click to collapse
no it's not
Galaxy Nexus has them because it uses 0.35" of the screen, without them, Galaxy Nexus would have a 4.3" screen with physical buttons...
ICS is much much much more than just that, this is probably 1% of it, and it's only for Galaxy Nexus.
Only HD2 would have use of that

mihovil13 said:
no it's not
Galaxy Nexus has them because it uses 0.35" of the screen, without them, Galaxy Nexus would have a 4.3" screen with physical buttons...
ICS is much much much more than just that, this is probably 1% of it, and it's only for Galaxy Nexus.
Only HD2 would have use of that
Click to expand...
Click to collapse
I see..but I think that its quite cool to have no physical buttons.

Nchls could you please tell me how to disable capacitive buttons or reupload qtouck-touchscreen.kl and umts_jordan-keypad.kl because they are duplicates of the other two files

for me this is what ics is about!
Windowed applications!
Sent from my MB526 using xda premium

Kayant said:
Nchls could you please tell me how to disable capacitive buttons or reupload qtouck-touchscreen.kl and umts_jordan-keypad.kl because they are duplicates of the other two files
Click to expand...
Click to collapse
Download the 4 files from mediafire, put it inside system/use/keylayout. Replace the original files, but backup the original files first. What do you mean by duplicate of 2 files? The 4 links are different files.
nogoodusername said:
View attachment 902011
View attachment 902012
for me this is what ics is about!
Windowed applications!
Sent from my MB526 using xda premium
Click to expand...
Click to collapse
Woah. How did you do it!?

Nchls said:
Woah. How did you do it!?
Click to expand...
Click to collapse
lol that's just an app...AirCalc. dl from market.

Related

[MOD] jholtom's CRT animation on Screen Lock

jholtom said:
Hi, All,
I got it working for screen off only
The changes are in framework-res.apk
Attached is the apk for Prime 2.0.4 ONLY!
To Use:
remove the unsigned- part from the name and use root explorer or adb push to put it in system/framework/
and then reboot!
To do this mod to another rom:
Decompile using apktool or apkmanager (which utilizes apktool) and then...
find bools.xml in res/values of a decompiled framework-res and then find this line
Code:
<bool name="config_animateScreenLights">true</bool>
and change the true to false
save and recompile and push or use root explorer to apply the new file
Click to expand...
Click to collapse
I'm quoting and reuploading to this post in case anyone else wants to try it out.
Jholtom do you mind if I post this on RootzWiki as well, giving you full credit?
+1
Would be nice.
Nothing so far. I too have been looking.
http://forum.xda-developers.com/showthread.php?t=1267728
I know you already mentioned it but there's actually two apps
Sucesss!!!!!!!!!!!!!!!
Hi, All,
I got it working for screen off only
The changes are in framework-res.apk
Attached is the apk for Prime 2.0.4 ONLY!
To Use:
remove the unsigned- part from the name and use root explorer or adb push to put it in system/framework/
and then reboot!
To do this mod to another rom:
Decompile using apktool or apkmanager (which utilizes apktool) and then...
find bools.xml in res/values of a decompiled framework-res and then find this line
Code:
<bool name="config_animateScreenLights">true</bool>
and change the true to false
save and recompile and push or use root explorer to apply the new file
Made a stupid mistake!! I can't remember how to push the file using ADB and my Transformer is force closing like crazy hahaha. Can someone give me some quick instructions? Watched a couple videos but they're all different and not working. I've got ADB running, it's mounted, the .apk is in the ADB folder but I can't get it to push. Please help! Thanks so much!
EDIT: Nevermind. Also a stupid mistake haha, that was a close one.
Thanks for doing this jholtom, I've wanted this for a while as well!
awesoe works nice man ought to make a thread for it so people can find it... or edit this one...
Sent from my Optimus Prime Transformer
Nice work. Seems I have to choose between this or the battery percentage mod but not both.
Thanks jholtom . You should contact roach so he can have it built in the rom!
It works! Tha mate.
I dont really mind where it gets posted
Credit is always nice though
jholtom said:
Decompile using apktool or apkmanager (which utilizes apktool) and then...
find bools.xml in res/values of a decompiled framework-res and then find this line
Code:
<bool name="config_animateScreenLights">true</bool>
and change the true to false
save and recompile and push or use root explorer to apply the new file
Click to expand...
Click to collapse
Can't seems to find res/values (using apkmanager do I need to decompile or extract APK?)
^ decompile.
Sent from samsung vibrant
Alex9090 said:
^ decompile.
Sent from samsung vibrant
Click to expand...
Click to collapse
Thanks. Yeah finally figured how to decomplie. Changed the field from true to false. Just trying to see what i'm doing wrong cause after compiling it back it doesn't have the crt shut down
Theres some sort of setting that can apparently cause it to work about 7/8 of the time but not that other 1/8. I'm looking around to see what it is and how it can be resolved.
And just in case did you push or install with root explorer?
jholtom said:
Theres some sort of setting that can apparently cause it to work about 7/8 of the time but not that other 1/8. I'm looking around to see what it is and how it can be resolved.
And just in case did you push or install with root explorer?
Click to expand...
Click to collapse
I used Root Explorer, I'll try to push it to see if it's any better.
EDIT: I just compile again and it seems to be working better. Thank you.
Hi all! First off, thanks to jholtom for figuring this out. I have thrown this mod in my PCB Blue theme (beta testing only now), and confirm that it works, BUT only when on the homescreen. I.E. if you are in any other app, the CRT animation will not run. Switching back to the homescreen does allow it to work again though. Another trick (if you have the kb dock) is to hit the "LOCK" key (top-right) while in another app, and then the CRT animation appears to play on further on/off toggles, but without unlocking the screen.
Not sure what the cause/solution of that may be, but I did find this thread on RootzWiki that also shows how to edit a .smali file in 'services.jar'. I am too lazy to decompile 'services.jar' and the .smali script, but if someone else is able to, maybe we can see if the further mods will allow it to work 100% of the time. Here's that thread:
[DEV] Enabling CRT ON & OFF Animation in Roms [HOW-TO]
I hope Roach gets wind of this, and maybe his expertise will point us in the right direction for how to get it working perfectly. It is such a simple animation overall, but one that gives us such joy and pleasure
Cheers!
Was hoping you would catch wind of this scar45 and put it in your theme. And nice work to you jholtom!
I hadn't looked at the CRT off animation for HC before as I read it didn't work right but I also didn't know about the potential fix in the services.jar file.
I'll have a wee play about and see what I can come up with.
Can any tell me if the issue still exists where it only works in landscape?
Roach2010 said:
Can any tell me if the issue still exists where it only works in landscape?
Click to expand...
Click to collapse
It work while in portrait also but the animation only shut down in landscape.
Like on the phone it only shut down in portrait. Hope I make sense.
It only work when you're on one of the home screen and not anywhere else.
Yeah, I got it working for screen on and off but only from the Home Screen. When you do if from within an app the TF flips out.

Miui extended settings mod *help*

bswann said:
Here you go -
ES Center 1.9.16( Clock is centered )
ES Right 1.9.16 ( clock is to the right )
ES Switched 1.9.16 ( Everything is reversed )
MIUI_Settings ( for controlling Extended Settings )
Click to expand...
Click to collapse
The three ES zips currently do not work because of the flash error "" Installing update.. Amend scripting (update-script) is no longer supported. Amend scripting was deprecated by Google in Android 1.5. It was necessary to remove it when upgrading to the Clockwork Mod 3.0 Gingerbread based recovery. Please switch to edify scripting(updater-script and update-binary) to create working update zip packages. Installation aborted."
I've already asked raver but he's busy so I don't want to bother him any longer. So is anyone willing to instruct me or help me to make the ES zips flash-able so that the MIUI control extended settings apk can work?
Raver's miui settings extended zip down below but it doesn't really change the fact that the ES zip wont flash. So I'm wondering if I should take the update script and Binary from his and place it in the ES zips. Help me out please.
Omg its not signed u have to sign it first
Sent From My Rockin' Galaxy S 4G
DnickDominic said:
Omg its not signed u have to sign it first
Sent From My Rockin' Galaxy S 4G
Click to expand...
Click to collapse
What do you mean sign.. It's not even mine, plus what does having it signed and not signed make a difference? Please inform me
DnickDominic said:
Omg its not signed u have to sign it first
Sent From My Rockin' Galaxy S 4G
Click to expand...
Click to collapse
Unsigned zip files are fine for CWM. It's unsigned APKs that might not work.
EDIT
You're using older CWM zips. Are you sure you want to do this? They're using amend scripting which to me suggests that they're REALLY old. Where'd you get them from?
FBis251 said:
Unsigned zip files are fine for CWM. It's unsigned APKs that might not work.
EDIT
You're using older CWM zips. Are you sure you want to do this? They're using amend scripting which to me suggests that they're REALLY old. Where'd you get them from?
Click to expand...
Click to collapse
http://miuiandroid.com/community/threads/mod-extended-settings-menu-options.7738/
I'm supposed to flash the ES_zips and then use the extended settings apk, but the ES_zips are too old. Raver said it was easy, but I don't understand his professional ways . I still want to do this if I knew, if this works, people who enjoy changing up their miui look for the gs4g would have an extra something . Can you help?
Just extract the miui extra settings and install
Sent From My Rockin' Galaxy S 4G
DnickDominic said:
Just extract the miui extra settings and install
Sent From My Rockin' Galaxy S 4G
Click to expand...
Click to collapse
+1. You can just download the zip and push the files yourself. Make sure you set execute permissions on the files you replace though.
I'm really not getting what you guys are saying.. I'm really slow at these things So do I extract the EScenter.zip and take out the system and META-INF files and push it via file explorer?
Lubcrayon said:
I'm really not getting what you guys are saying.. I'm really slow at these things So do I extract the EScenter.zip and take out the system and META-INF files and push it via file explorer?
Click to expand...
Click to collapse
Only system. Push the system folder to the root directory (/)
FBis251 said:
Only system. Push the system folder to the root directory (/)
Click to expand...
Click to collapse
Oh, I'll try it and let you know. THANKS I know I sounded stupid but my brain seems to function slowly on stuff like this.
I made this CWM zip that I haven't tested yet.
Tell me if it works for you, but like I said the files are old and you might wind up bootlooping.
Pushing the files didn't do anything nor did your zip. :/ The miui control panel doesn't change anything ( If were to change the clock to center it stays in place ) Nothing changes like its supposed to for example, clock centering, carrier changing, or battery hiding. Sigh .______.
u can decompile the system ui and under res layout xml status bar change the clock gravity to center recompile enjoy
RaverX3X said:
u can decompile the system ui and under res layout xml status bar change the clock gravity to center recompile enjoy
Click to expand...
Click to collapse
I guess that's another way , is there a way to change the carrier logo?
Lubcrayon said:
I guess that's another way , is there a way to change the carrier logo?
Click to expand...
Click to collapse
http://miuiandroid.com/community/th...ttings-menu-options.7738/page-135#post-112329
http://speedy.sh/x2X6p/2.3.9-MODs.zip

How to customise APK's Images [EASY]

First off you need a deodoxed custom rom , next copy the desired APK's from your System/App folder or from the zip you flashed or from wherever.
Download and Install WinRAR or 7Zip and drag the APK onto the shortcut on your desktop. It should open it up , next extract the LDPI and the HDPI folder/s onto your desktop.
Edit your pics with any program e.g. Paint.net . Then replace the modified folder with the old one.
Next download SignAPKTics from APKTops and install that. Drag the modded APK to your SD card.
Click START , choose the APK , click next , choose Test Sign and click sign! Wait 1.5 mins! And ot should be done. Now just (with root browser) replace the old one with the modded one.
And re-boot! Enjoy...
hah great tip for us
thanks
Has the OP tested this trick?
Thanks a lot!!!!!!!!!!!! :^)
Sent from my GT-S5360 using xda premium
bumslayer said:
Has the OP tested this trick?
Click to expand...
Click to collapse
Click START , choose the APK , click next , choose Test Sign and click sign! Wait 1.5 mins! And ot should be done. Now just (with root browser) replace the old one with the modded one.
Click to expand...
Click to collapse
I'm not sure if he has tried it with system app. replacing a file like systemUI.apk or framework-res.apk will make our device continously give FC message. we should use zip file to push the apk to /system/app. system app is also should not signed. I always using this trick without signing stuff and it works. we just need to make sure that we're replace the ordinary file (not the .9 one) and put a picture with same resolution with the original one.
Exactly my thoughts. Resigning systems apps is a big NO. I already did it twice (SystemUI.apk) and I ended up with no statusbar. Good thing I had a backup.
bumslayer said:
Exactly my thoughts. Resigning systems apps is a big NO. I already did it twice (SystemUI.apk) and I ended up with no statusbar. Good thing I had a backup.
Click to expand...
Click to collapse
afaik, it's all or nothing. if you resign one system apk, you have to do for all system apk with the same key.
irfanbagus said:
afaik, it's all or nothing. if you resign one system apk, you have to do for all system apk with the same key.
Click to expand...
Click to collapse
AND permissions.. make sure the permissions are same as original BEFORE putting it in the appropriate folder..
noobwithgalaxyy said:
AND permissions.. make sure the permissions are same as original BEFORE putting it in the appropriate folder..
Click to expand...
Click to collapse
Thats the reason I prefer flashing instead of manually replacing the files cuz then you dont need to set the permissions. Its good for lazy people like me
I have tried it and it works. I did it because when I didn't it said "status bar force close".
Sent from my GT-S5360 using XDA
I.AM.H3RO said:
I have tried it and it works. I did it because when I didn't it said "status bar force close".
Sent from my GT-S5360 using XDA
Click to expand...
Click to collapse
lol?
show us screen shots
when making a guide always post screenshots dude,
not just post words,
make it clarified and very detailed so that people reading this will not get lost,
also don't post for the sake of just putting it there,
you have a good title
but when people read this its not "easy"
try to put yourself in other people's shoes,
even i can't comprehend the output you put on this
no offence but make this better and stop posting threads that are useless
The easiest and foolproof method is to use Ninjamorph or metamorph app from market.I've modified tones of .pngs with them.
First open the apk with the app
Exit the app
Go to myfiles/Androidthemes/workspace/name-of-apk/res/
Then go to drawable ldpi
Take a look at all of the .png files
Find which .png you want to replace.
You should make your own pic with photoshop or anything to replace it with exact resolution and name
Store it in the sd-card
Open the app again
Go to Existing project/name-of-apk/res/drawable ldpi
Click on the .png you want to replace
App will ask you to replace it with some other .png
Navigate to the modified pic
It'll replace the .png
Then go back to homepage of app
Then click finish project
Tap on the apk name
App will ask you whether you want to replace the original apk
Do as you want
Reboot phone
Make a nandroid backup before everything. cheers
sent while doin' some burnouts
b16h22 said:
The easiest and foolproof method is to use Ninjamorph or metamorph app from market.I've modified tones of .pngs with them.
First open the apk with the app
Exit the app
Go to myfiles/Androidthemes/workspace/name-of-apk/res/
Then go to drawable ldpi
Take a look at all of the .png files
Find which .png you want to replace.
You should make your own pic with photoshop or anything to replace it with exact resolution and name
Store it in the sd-card
Open the app again
Go to Existing project/name-of-apk/res/drawable ldpi
Click on the .png you want to replace
App will ask you to replace it with some other .png
Navigate to the modified pic
It'll replace the .png
Then go back to homepage of app
Then click finish project
Tap on the apk name
App will ask you whether you want to replace the original apk
Do as you want
Reboot phone
Make a nandroid backup before everything. cheers
sent while doin' some burnouts
Click to expand...
Click to collapse
yea metamorph/ninjamorph is great but i'd prefer to do it in PC and just push it via adb cuz i use photoshop and i find it a hassle to use my phone to edit apk's
It's for those guys who dont know how to decompile/compile apk files with their pc.But I agree with you, pc is the best way to go.
sent while doin' some burnouts
I.AM.H3RO said:
First off you need a deodoxed custom rom , next copy the desired APK's from your System/App folder or from the zip you flashed or from wherever.
Download and Install WinRAR or 7Zip and drag the APK onto the shortcut on your desktop. It should open it up , next extract the LDPI and the HDPI folder/s onto your desktop.
Edit your pics with any program e.g. Paint.net . Then replace the modified folder with the old one.
Next download SignAPKTics from APKTops and install that. Drag the modded APK to your SD card.
Click START , choose the APK , click next , choose Test Sign and click sign! Wait 1.5 mins! And ot should be done. Now just (with root browser) replace the old one with the modded one.
And re-boot! Enjoy...
Click to expand...
Click to collapse
May be you should try it out first.Replacing system apps with root explorer is a very dangerous business.I'm familiar with that.My phone started to do endless boot loops which even a nandroid restore failed to fix and ended up in flashing a new stock rom.
sent while doin' some burnouts
b16h22 said:
May be you should try it out first.Replacing system apps with root explorer is a very dangerous business.I'm familiar with that.My phone started to do endless boot loops which even a nandroid restore failed to fix and ended up in flashing a new stock rom.
sent while doin' some burnouts
Click to expand...
Click to collapse
agree
pushing it using adb is a more safer way, because if something goes wrong with forcing it to system then you can just repush the original system apk
you was replacing a running apk. there's no doubt it will give you FC message (lol). try your method to replace framework-res.apk or any system app/framework. b16h22 is right. your method is dangerous.
I modify my systemui.apk but signapktic give
Doesn't exist
132 installed package
Error ...
I'm just trying to help people , if you don't like it then good for you. I'd love to add screenies but laptop is broken. If you could provide them then brilliant.
Sent from my GT-S5360 using XDA
Use test sign and if that doesn't work are install signapktic
Sent from my GT-S5360 using XDA

[HowTo] Odex FRAMEWORK, all Android versions may apply.

Here in this tutorial, I will show some facts about Deodex and Odex, then explain how to odex the framework of a ROM(which is pretty annoying, you'll find out). Credits goes to myself
This method should work on all Android devices.
------------------------------------------------------------------------------------------------------------
First of all, what is odex? Something you should know about classes.dex.
Odex stands for Optimized dex. I'm not gonna explain a lot because I'm not sure if I'm right. First of all, in typical apk files, when you open it with WinRAR or something like that, you can find a file called "classes.dex"(this type of apk is deodexed). This file is the key. It contains the core codes of the apk. However the other type of apk comes with an *.odex file and doesn't have classes.dex inside the apk file. This is odexed apk. There are 2 types of ROMs here, odexed and deodexed. Odexed ROMs' classes.dex are already out of the apk files, while deodexed ROMs' classes.dex are still in the apks. When Android executes an apk, it has to extract the classes.dex out and execute it. So when you flash an deodexed ROM, the first boot takes a long long time since the Android system needs to extract all the classes.dex into dalvik-cache(it shows "Optimizing apks" on the screen for 4.0 ROMs, shows boot animation on screen for 2.3 or below ROMs). However for the odexed ROMs, because the classes.dex are already out there, the system just grabs them and use them, without wasting time and storage space extracting classes.dex out.
Why odex framework?
It can boost your device a little by odexing your framework. Your phone can run more efficiently. Although it's a complicated process, but trust me, it's worth it.
What is so special about odexing framework files? What's the difference?
Odexing an app is very easy, and I believe everyone knows how to do it. But odexing framework is really annoying. Why? Because apps and more like stand-alone things, they are not a part of system. You delete it, nothing bad happens, your phone still boots, you just get endless FC if you delete the wrong one, or missing status bar, that's all. But framework files you cannot mess around. They are parts of the system. They have to match the system's codes precisely, without any error, even the order of files(keep this in mind, very important). So for every ROM, the framework initialize codes are different(same RUU or other ROM based ROMs count as its base ROM), and you must modify the odexing binary to make it odex for you properly, or you can sit and watch the beautiful bootloop.
What's the relationship between odexing apps and odexing framework?
Simple, but important. If you odexed apps, you cannot touch the framework. Framework always goes in the first place. If you wanna odex both, you must odex framework first. Or... "The Tragedy of App and Framework"...
So what do we have to keep in mind before we start?
Keep your mind clear, prepare a bag of ice in case you feel dizzy with the codes, and MAKE ENOUGH SPACE FOR FRAMEWORK ODEXING. I would prefer you remove a few useless apks in /system/app first to make more room in system partition. Failing odexing may brick your device forever! Nah just kidding it will only cause you to bootloop. No big deal. Also, it won't odex your framework-res.apk and always will not, so don't feel bad and do it again and again till your phone burn . Make sure your device is ROOTED and enable USB debug. You need Java Runtime Environment.
What tools do you need?
Notepad++ and a magical rar that contains all you need to success.
Let's get started.
------------------------------------------------------------------------------------------------------------
1. Use your file manager to find init.rc at the very root directory of your phone and copy it to SDCard for later code editing, or you simply adb pull it out and skip the coping step. (If you know how to compile boot.img it is even easier, just unpack boot in Android Kitchen, look for line "export BOOTClassPATH". I'm not gonna introduce that method since most people can't. Silly me, didn't I just intoduced that? XD)
2. Connect USB, set mode as disk drive so you can access your SDCard. Copy init.rc into your computer. Open it with notepad, and find where it says "export BOOTClassPATH", create a new file and copy line "export BOOTClassPATH" into the new file. For example:
Code:
export BOOTCLASSPATH/system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar:/system/framework/HTCExtension.jar:/system/framework/com.htc.framework.jar:/system/framework/com.htc.android.pimlib.jar:/system/framework/com.htc.android.easopen.jar:/system/framework/com.scalado.util.ScaladoUtil.jar:/system/framework/com.orange.authentication.simcard.jar:/system/framework/android.supl.jar:/system/framework/com.ecrio.sip.jar
3. Open dexopter in the rar you downloaded with Notepad++. Find the lines that show the similar contents to the things after "export BOOTClassPATH". It is Line 21 to Line 35 on my laptop. Edit them according to the things you just copied out of init.rc. For example, if the first file is "X.jar", then you will have to edit the line into "dexopt-wrapper/system/framework/X.jar /system/framework/X.odex". Then repeat until you finish with all the files that are listed in the long list you copied out of init.rc. File order DOES MATTER. Use the bag of ice I told you to prepare eariler to make you sober if you feel dizzy with the codes. The lines may be more or less after you edited them, doesn't matter.
4. Copy "dexopter" and "dexopt-wrapper" into /system/bin and set the correct permissions. Make sure they have enough permission to change your system files. Restart your phone.
5. Go to CMD and lead it to where adb.exe is(included in the rar). Type these in order:
Code:
adb shell
su
cd system/framework
dexopter fr
Then the codes will run crazy in your cmd window... The odex process has begun!
6. If the odex process completed without error, you are half way there! Well it doesn't mean you have to stare at your screen during the process. It's about time we figure it out! The phone will automatically reboot once it's finished. If it doesn't and you are sure all are done, reboot manually.
7. If you can't boot properly, go back and check everything carefully. If you can, then open your file manager and copy the entire framework directory into your SDCard. You can still adb pull and skip the next coping step.
8. Mount SDCard. Go into framework directory on your computer. Open every file that has an odex file with it, delete the classes.dex inside. WinRAR is okay. The files may seem ridiculously small after you delete the classes.dex, but don't worry since classes.dex are already pulled out and turned into odex files.
9. Copy the whole framework folder into the folder where adb is at. Use adb to push all the files back into /system/framework.
Code:
adb root
adb remount
adb push framework /system/framework
adb shell
su
chmod /system/framework xxx (xxx is a permission code, depends on your ROM. They should be the same as the old deodexed framework files. Use Google to find out how to use the permission codes.)
10. After all the files are pushed in, reboot your phone.
11. If it still boots into the system, congratulations! You've successfully odexed your framework! If it doesn't, then go back and read everything carefully. The most common error occurs when you are editing the dexopter code. You will have to redo everything again.
Done! Everything is ready to go!
You can directly grab the files you've odexed and put it in your custom ROM(must be the same base), just don't forget the odex files.
------------------------------------------------------------------------------------------------------------
Okay, hmm, what to say now? Still, I would be glad if you donated me, but if you don't it's okay, just reply and hit thanks .
Oh almost forgot, the magical rar: http://d-h.st/tYi
------------------------------------------------------------------------------------------------------------
Big thanks to Scott, see him in #3. He explained why some files aren't odexed and provided a easier method(but they all get you dizzy )
Big thanks to JSLEnterprises, see him in #4. He provided a newer busybox for Scott's method.
If you can, send me a PM on how to odex apps.
Sent from my HTC One X using Tapatalk 2
BreatheHT said:
Here in this tutorial, I will show some facts about Deodex and Odex, then explain how to odex the framework of a ROM(which is pretty annoying, you'll find out). Credits goes to myself
Also, it won't odex your framework-res.apk and always will not, so don't feel bad and do it again and again till your phone burn . Make sure your device is ROOTED and enable USB debug. You need Java Runtime Environment.
Click to expand...
Click to collapse
Good write up. Other files that wont "re-odex" are com.htc.resources.apk, com.htc.videowidget.res.apk, com.htc.weather.res.apk and framework-htc-res.apk.
The reason? The files dont have .dex files because there is no code in them. These files just carrier resources like images (for those that didint know).
The .dex files are the actual smali code that devs mod to make the ROM do crazy things
Also, an easier method can be found here: http://themikmik.com/showthread.php?12988-Tool-App-Dexo-the-Universal-Odex-Utility
It does it all and pulls the bootclass for you. And it also does /system/app/ in one simple shot.
Also, one last thing... You can just as easily pull the files back to the PC using the ADB Pull command...
Code:
adb pull /system/app ./app
adb pull /system/framework/ ./framework
EDIT: And another simple method to get your bootclass is do another ADB Pull
Code:
add pull init.rc
I find the adb pull method quicker and more simple...
theking_13 said:
If you can, send me a PM on how to odex apps.
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
You can use the method I just explained or if you want to try the framework manually then do apps seperately then you can use this: http://forum.xda-developers.com/showthread.php?t=1514576
I use that app to re-odex updated files in the ROM. For example... If Gmail updates (which it just did) I would remove the old gmail files from system/app/ and put the new one in and run that program then pull the files.
-Scott
If anyone finds this to be too much work... dont worry... it only unpacks the classes.dex once. It will only need to unpack a dex if original file has changed (changed entries need to propogate). That's why all the consecutive boots are back to a 'normal' span of time.
re-odexing your roms IS recommended if either A) you're anal-retentive/have OCD or B) propogation ("Android is Upgrading...") happens every time you reboot your device (it happens sometimes)
If you're going to use the tool scrosler linked to, replace the busybox binary with the one inside the attatched zip (this is busybox 1.20.1). The one that come with the tool is pretty dated.
:good:
Update: Busybox 1.20.2 has been released (though not compiled for android use yet)
Great stuff guys.
scrosler said:
Good write up. Other files that wont "re-odex" are com.htc.resources.apk, com.htc.videowidget.res.apk, com.htc.weather.res.apk and framework-htc-res.apk.
The reason? The files dont have .dex files because there is no code in them. These files just carrier resources like images (for those that didint know).
The .dex files are the actual smali code that devs mod to make the ROM do crazy things
Also, an easier method can be found here: http://themikmik.com/showthread.php?12988-Tool-App-Dexo-the-Universal-Odex-Utility
It does it all and pulls the bootclass for you. And it also does /system/app/ in one simple shot.
Also, one last thing... You can just as easily pull the files back to the PC using the ADB Pull command...
Code:
adb pull /system/app ./app
adb pull /system/framework/ ./framework
EDIT: And another simple method to get your bootclass is do another ADB Pull
Code:
add pull init.rc
I find the adb pull method quicker and more simple...
You can use the method I just explained or if you want to try the framework manually then do apps seperately then you can use this: http://forum.xda-developers.com/showthread.php?t=1514576
I use that app to re-odex updated files in the ROM. For example... If Gmail updates (which it just did) I would remove the old gmail files from system/app/ and put the new one in and run that program then pull the files.
-Scott
Click to expand...
Click to collapse
hehe yep I know the adb pull command, I thought about it and I didn't put it in...
theking_13 said:
If you can, send me a PM on how to odex apps.
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
You confused bro?
Thanks. Even though I won't ever be doing this, it's good to know what's going on.
This is awesome. Thanks so much for this. I wanted to know how to odex and deodex roms.
Sent from my HTC One XL using xda app-developers app
scrosler said:
Good write up. Other files that wont "re-odex" are com.htc.resources.apk, com.htc.videowidget.res.apk, com.htc.weather.res.apk and framework-htc-res.apk.
The reason? The files dont have .dex files because there is no code in them. These files just carrier resources like images (for those that didint know).
The .dex files are the actual smali code that devs mod to make the ROM do crazy things
Also, an easier method can be found here: http://themikmik.com/showthread.php?12988-Tool-App-Dexo-the-Universal-Odex-Utility
It does it all and pulls the bootclass for you. And it also does /system/app/ in one simple shot.
Also, one last thing... You can just as easily pull the files back to the PC using the ADB Pull command...
Code:
adb pull /system/app ./app
adb pull /system/framework/ ./framework
EDIT: And another simple method to get your bootclass is do another ADB Pull
Code:
add pull init.rc
I find the adb pull method quicker and more simple...
You can use the method I just explained or if you want to try the framework manually then do apps seperately then you can use this: http://forum.xda-developers.com/showthread.php?t=1514576
I use that app to re-odex updated files in the ROM. For example... If Gmail updates (which it just did) I would remove the old gmail files from system/app/ and put the new one in and run that program then pull the files.
-Scott
Click to expand...
Click to collapse
Is there also a tool to deodex roms?
Sent from my HTC One XL using xda app-developers app
SkizzMcNizz said:
Is there also a tool to deodex roms?
Sent from my HTC One XL using xda app-developers app
Click to expand...
Click to collapse
Like Scott posted?
Basically that is the steps right there..you are doing the apk in the system/app and framework.
That link provides a tool which when done properly will run on the de-odexed stock Rom and odex it...
Good luck with that...it's a nightmare...haha..
SkizzMcNizz said:
Is there also a tool to deodex roms?
Sent from my HTC One XL using xda app-developers app
Click to expand...
Click to collapse
Yep Android Kitchen can do it.
Hopefully this will help to see more odex ROMs
This is the first phone I've had where developers strive to odex their roms
Something to get used to
Sent from my HTC One X using Tapatalk 2
superchilpil said:
This is the first phone I've had where developers strive to odex their roms
Something to get used to
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
Most official ROMs are odexed.
BreatheHT said:
Most official ROMs are odexed.
Click to expand...
Click to collapse
Quite the opposite where I come from
Although I came from a different carrier so this side of the forums is different
Sent from my HTC One X using Tapatalk 2
superchilpil said:
Quite the opposite where I come from
Although I came from a different carrier so this side of the forums is different
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
Nah carrier doesn't matter.
SkizzMcNizz said:
Is there also a tool to deodex roms?
Sent from my HTC One XL using xda app-developers app
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1208320
(you'll have to update the versions included in the zip as this thread is dated - 2011)
Note: the API level for 4.0.3/4.0.4 (what our HOX's run) is '15'.
you can also use DSIXDA's kitchen which can be used to batch deodex apk's after you set the api level
(it's defaulted to '10'... which was Gingerbread -> 2.3.3-2.3.7)
Full list of API levels for their specific Android versions
BreatheHT said:
hehe yep I know the adb pull command, I thought about it and I didn't put it in...
Click to expand...
Click to collapse
Yeah, I like to do it better that way. Dont have to move my hands from the keyboard and mouse. Makes you more efficient :good:
BreatheHT said:
Most official ROMs are odexed.
Click to expand...
Click to collapse
I think all?
superchilpil said:
Quite the opposite where I come from
Although I came from a different carrier so this side of the forums is different
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
Carrier is irrelevant. Most people dont know how to work with ODEX files so they go with de-odex. Its mroe challanging but provides a better experience.
techlogik said:
Like Scott posted?
Basically that is the steps right there..you are doing the apk in the system/app and framework.
That link provides a tool which when done properly will run on the de-odexed stock Rom and odex it...
Good luck with that...it's a nightmare...haha..
Click to expand...
Click to collapse
No he is asking to go the other way from odex to de-odex.
BreatheHT said:
Yep Android Kitchen can do it.
Click to expand...
Click to collapse
JSLEnterprises said:
http://forum.xda-developers.com/showthread.php?t=1208320
(you'll have to update the versions included in the zip as this thread is dated - 2011)
Note: the API level for 4.0.3/4.0.4 (what our HOX's run) is '15'.
you can also use DSIXDA's kitchen which can be used to batch deodex apk's after you set the api level
(it's defaulted to '10'... which was Gingerbread -> 2.3.3-2.3.7)
Full list of API levels for their specific Android versions
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Yep, I love that script. I was the one that sent him the mnt point file for the HOX :highfive:
I am going to talk to him about bringing in "official" support for the Asus TF300T. I got the boot.img fiugred out this morning! Woot. **** is about to get real with the Asus!
superchilpil said:
This is the first phone I've had where developers strive to odex their roms
Something to get used to
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
its a good final touch when cook done with smali tweaks.
another benefit is sorta kang-protection

[TUTORIAL] Speed up notification pullup and dropdown (SystemUI.apk) all devices :)

Tutorial about speeding up notification center drop down/pull up
1.First of all you need to get SystemUI.apk of yur actual rom
The ne im using is open root explorer and copy SystemUI.apk to your sdcard
2.Connect the phone to the computer and copy the SystemUI.apk to the extracted APKTOOL directory (download apktoolApktool.zip)
3.There is a guide on how to use apktool here :Guide apktool
4.Decompile SystemUI.apk
5.Navigate \SystemUI\res\values and open dimens.xml (use notepad ++)
6. Find self_expand_velocity, self collapse velocity. and change the values from the defalut +2000 per each.
7.You can change other values too, they are pretty much selfexplanatory.
8.After the necessary changes save the file and recompile systemui.apk
9.After recmpiling you can push it to system using ADB or i made a .zip to flash it in recovery.(Just put SystemUI.apk in system/app and you are ok) Just whatch out for the name as it should be exactly the ssame as it was before.
10.Flash the zip wipe cache/dalvik and enjoy your new fast dropdown and pullup
DONT FORGET THANX BUTTON
EDIT: It was pointed out that in newer versions of android (dip=dp) its the same thing so don't change it.
Mr.Nigma... said:
Tutorial about speeding up notification center drop down/pull up
1.First of all you need to get SystemUI.apk of yur actual rom
The ne im using is open root explorer and copy SystemUI.apk to your sdcard
2.Connect the phone to the computer and copy the SystemUI.apk to the extracted APKTOOL directory (download apktoolApktool.zip)
3.There is a guide on how to use apktool here :Guide apktool
4.Decompile SystemUI.apk
5.Navigate \SystemUI\res\values and open dimens.xml (use notepad ++)
6. Find self_expand_velocity, self collapse velocity. and change the values from the defalut +2000 per each.
7.You can change other values too, they are pretty much selfexplanatory.
8.After the necessary changes save the file and recompile systemui.apk
9.After recmpiling you can push it to system using ADB or i made a .zip to flash it in recovery.(Just put SystemUI.apk in system/app and you are ok) Just whatch out for the name as it should be exactly the ssame as it was before.
10.Flash the zip wipe cache/dalvik and enjoy your new fast dropdown and pullup
DONT FORGET THANX BUTTON
Click to expand...
Click to collapse
I decompiled systemui.apk but i can/t find \SystemUI\res\values
I have the same question. maybe your decompilation have some problems.
Sent from my lenovo A789 using xda app-developers app
Got it working... FINALLY
OK first of all thanks for this, makes a huge difference on the notification pullup and dropdown speed.
I couldn't apply the path with just the regular apktool, tried different revisions and none worked until I found apktoolsjb on this forum
http://forum.xda-developers.com/showthread.php?t=1809649
Thanks again
yonutz said:
I decompiled systemui.apk but i can/t find \SystemUI\res\values
Click to expand...
Click to collapse
it is in that folder for sure. have followed the guide step by step? maybe u havent decompiled just extracted the apk.
On Note 2 (and probably other Samsung devices) there is no layout.xml, but values are inside smali file (SystemUI\smali\com\android\systemui\R$layout.smali). However those are in hex format which I cannot decode.
.field public static final self_collapse_velocity:I = 0x7f0c001c
.field public static final self_expand_velocity:I = 0x7f0c001b
Click to expand...
Click to collapse
Above value translates to 2131492892 as integer, which makes zero sense. Probably some kind of float value?
matejdro said:
On Note 2 (and probably other Samsung devices) there is no layout.xml, but values are inside smali file (SystemUI\smali\com\android\systemui\R$layout.smali). However those are in hex format which I cannot decode.
Above value translates to 2131492892 as integer, which makes zero sense. Probably some kind of float value?
Click to expand...
Click to collapse
Looks more like a reference to resources to me.
matejdro said:
On Note 2 (and probably other Samsung devices) there is no layout.xml, but values are inside smali file (SystemUI\smali\com\android\systemui\R$layout.smali). However those are in hex format which I cannot decode.
Above value translates to 2131492892 as integer, which makes zero sense. Probably some kind of float value?
Click to expand...
Click to collapse
Try to check for that id (0x7f0c001c and/or 0x7f0c001b) in res/values/ids.xml. It could point to any value in any of the xml inside res/ folder.
No xml file contains those values (I ran search over whole folder). Only before mentioned R$layout.smali and com\android\systemui\statusbar\phone\PhoneStatusBar.smali
Linux
Any way I con do this in Linux, ubuntu to be specific.
I figured it out, Ijust hope I can put back into .apk format.
Be careful:
"dp" was actually called "dip" in early versions of the SDK. They changed it to "dp" shortly after.
Click to expand...
Click to collapse
That screenshot isn't from a 4.1/4.2 rom - So anyone who wants to try this and has 4.2 (I'm having 4.2.2), change only the values. leave the "dp" as is, don't change it into "dip".
OP - you might as well write this down!
Great, some developer with Xposed skills to do that through an Xposed module .... (You know that would be great)
I used your MOD as an Add On for my ROM. I hope thats ok credit was given (see bottom of OP). Thanks for the Info..
http://forum.xda-developers.com/showpost.php?p=37148754&postcount=1
Thanks. I already hitted it.
Sent from my C6603 using xda app-developers app
Great tut, I would suggest turning off animations entierly in developers options for the best UI smoothness.
self_expand_velocity, self collapse velocity NOT FOUND
I dint find anything like that in \SystemUI\res\values\dimens.xml
Samsung galaxy ace GT-S5830i
I can't find a values folder in my SystemUI
riteshpanjwani said:
I dint find anything like that in \SystemUI\res\values\dimens.xml
Samsung galaxy ace GT-S5830i
Click to expand...
Click to collapse
As some people replied these values are in another file. But i'll look again and edit the op with SAMSUNG specific files
Hmmm
JDogg1329 said:
I can't find a values folder in my SystemUI
Click to expand...
Click to collapse
Check your ROM if it is odex, check /system/app/ if there is SystemUI.odex. You need to deodexed if first so you can edit. However you can also di it using baksmali you just need the SystemUI.odex.
I have this, dont have this what you say.What do now?.Custom ROM - CM7

Categories

Resources