[Q] KH3 - editing classes.dex in services.jar??? - Captivate Q&A, Help & Troubleshooting

Digging a bit into the cappy and wanting to see if I can handle editing classes.dex in the services.jar to get rid of the fully charged notification on stock KH3.
I have found this post:
http://forum.xda-developers.com/showpost.php?p=9369187&postcount=4
Wanting to know if that is the process to edit and I do not know which line I am supposed to edit out in services.jar?
Hoping someone can just let me know that the process is sound and what line to kill to eliminate the stupid fully charged notification.
I also want to learn how to add back the stay awake setting in the dev settings but one step at a time..
Thanks for reading and appreciate any tips you can give to let me know what needs to be modified in services.jar.

weav2k4 said:
Digging a bit into the cappy and wanting to see if I can handle editing classes.dex in the services.jar to get rid of the fully charged notification on stock KH3.
I have found this post:
http://forum.xda-developers.com/showpost.php?p=9369187&postcount=4
Wanting to know if that is the process to edit and I do not know which line I am supposed to edit out in services.jar?
Hoping someone can just let me know that the process is sound and what line to kill to eliminate the stupid fully charged notification.
I also want to learn how to add back the stay awake setting in the dev settings but one step at a time..
Thanks for reading and appreciate any tips you can give to let me know what needs to be modified in services.jar.
Click to expand...
Click to collapse
If you just want to remove sound try deleting these files from system/media/audio/ui -
TW_Battery_caution.ogg & TW_Low_Battery.ogg
else the code is now in SystemUI.apk. When you decompile it you can edit playTone method in smali\com\android\systemui\statusbar\policy\Status BarPolicy.smali

watsa said:
If you just want to remove sound try deleting these files from system/media/audio/ui -
TW_Battery_caution.ogg & TW_Low_Battery.ogg
else the code is now in SystemUI.apk. When you decompile it you can edit playTone method in smali\com\android\systemui\statusbar\policy\Status BarPolicy.smali
Click to expand...
Click to collapse
You are just exceptional my friend!! Thanks for the assist and will try my hand at modding stock.. wish me luck!
Best,
weav

Related

[Q] Custom XML documents in APK files

Please read this whole thing before you reply!
I am trying to edit the battery icon XML files in framework-res.apk. Awhile ago I found a tool that would convert from binary XML to human-readable XML and back again, but for the life of me I cannot find it again.
Anyway, I opened stat_sys_battery_charge.xml with it and all was good, except it mentioned weird names for filenames. Eg instead of 'res/drawable-hdpi/stat_sys_battery_0.png' it was '89845b4jrqyuq34gy34q89tyq34' (or some gibberish like that).
I understand everything up to this point. I understand why those names are encoded like that. What I don't understand is how people figure out these codes. I have been using someone elses framework-res.apk as my base, and they use "v4" folders. Eg 'drawable-hdpi-v4' instead of 'drawable-hdpi'. These filename codes in the XML value were generated for this V4 folder, correct? How did they do that?
I do not want to use a V4 folder in my theme if I can avoid it. If I have to, I still have a problem as to how to correctly point to my battery icons. And no I cannot just replace the PNGs because my changing icons have more frames than the stock XML allows.
Any help would be extremely appreciated. Thank you.
TheLynxy said:
Please read this whole thing before you reply!
I am trying to edit the battery icon XML files in framework-res.apk. Awhile ago I found a tool that would convert from binary XML to human-readable XML and back again, but for the life of me I cannot find it again.
Anyway, I opened stat_sys_battery_charge.xml with it and all was good, except it mentioned weird names for filenames. Eg instead of 'res/drawable-hdpi/stat_sys_battery_0.png' it was '89845b4jrqyuq34gy34q89tyq34' (or some gibberish like that).
I understand everything up to this point. I understand why those names are encoded like that. What I don't understand is how people figure out these codes. I have been using someone elses framework-res.apk as my base, and they use "v4" folders. Eg 'drawable-hdpi-v4' instead of 'drawable-hdpi'. These filename codes in the XML value were generated for this V4 folder, correct? How did they do that?
I do not want to use a V4 folder in my theme if I can avoid it. If I have to, I still have a problem as to how to correctly point to my battery icons. And no I cannot just replace the PNGs because my changing icons have more frames than the stock XML allows.
Any help would be extremely appreciated. Thank you.
Click to expand...
Click to collapse
Well I'm using apktool for decompiling and I'm also trying to add some icons so maybe the help Daneshm90 has given me can help you Apkmanager
EDIT: Lol you didn't even write you were trying to add icons It is seriously stuck to my brain xD
Does apktool let you change the paths for the filenames in XML files, and correctly re-encodes it when you compile it back? I have been trying desperately to get apktool to work for me, but it just refuses. I'll have to try it on another computer or perhaps a VM then.
If apktool does not correctly handle paths, is there any tool that can? From what I've read, its impossible, but there must be a way!
TheLynxy said:
Does apktool let you change the paths for the filenames in XML files, and correctly re-encodes it when you compile it back? I have been trying desperately to get apktool to work for me, but it just refuses. I'll have to try it on another computer or perhaps a VM then.
If apktool does not correctly handle paths, is there any tool that can? From what I've read, its impossible, but there must be a way!
Click to expand...
Click to collapse
What do you mean by "paths in XML files"? Apktool decompiles XMLs fully, so you could do everything that you could do with your own app/sources.

[Q] Editing services.jar when not deodexed

I'm trying to change the colour of all my status bar text. I'd like to do this on the stock 2.2 (FRG33) which isn't deodexed.
Is it possible to edit the services.odex file and then put then reodex it and put it back on the phone or do I just need to deodex it into services.jar then put services.jar back on the phone.
Also I'm having problems deodexing services.jar as it seems to have a ton of dependencies every time I find one odex it's dependant on another pops up.
All this just for white text in a black notification bar. It's a lot of hassle (but lots of fun too)
Edit: Update
Ok I've managed to deodex services.odex but now need to find a good list of the locations of all the notification text, anybody know any? Cheers.
Ozymandias88 said:
I'm trying to change the colour of all my status bar text. I'd like to do this on the stock 2.2 (FRG33) which isn't deodexed.
Is it possible to edit the services.odex file and then put then reodex it and put it back on the phone or do I just need to deodex it into services.jar then put services.jar back on the phone.
Also I'm having problems deodexing services.jar as it seems to have a ton of dependencies every time I find one odex it's dependant on another pops up.
All this just for white text in a black notification bar. It's a lot of hassle (but lots of fun too)
Edit: Update
Ok I've managed to deodex services.odex but now need to find a good list of the locations of all the notification text, anybody know any? Cheers.
Click to expand...
Click to collapse
Search is your friend.
http://forum.xda-developers.com/showthread.php?t=630267

[REQ] Accurate Battery Mod/Theme

This would be AMAZING to see on the fascinate!
http://forum.xda-developers.com/showthread.php?t=756441
taypotts said:
This would be AMAZING to see on the fascinate!
http://forum.xda-developers.com/showthread.php?t=756441
Click to expand...
Click to collapse
im looking into it... ill see what i can do.
Sweet!! I know it has something to do with the .xml files. Look into a guy named Eugene he was the creator of this I believe..
taypotts said:
Sweet!! I know it has something to do with the .xml files. Look into a guy named Eugene he was the creator of this I believe..
Click to expand...
Click to collapse
yeah... i dont know xml though.... we need to find someone who does xml..
We found anyone that knows XML yet?? I'm really really wanting this!! Lol
As I said before it got lost in the forum crash, I'm pretty sure you just need to copy files from the Captivate version (thread 756627) or original Desire version (thread 756627) into the Fascinate's framework-res.apk and then reinstall that. Will work on it when my phone arrives.
s44 said:
As I said before it got lost in the forum crash, I'm pretty sure you just need to copy files from the Captivate version (thread 756627) or original Desire version (thread 756627) into the Fascinate's framework-res.apk and then reinstall that. Will work on it when my phone arrives.
Click to expand...
Click to collapse
nah already tried that... you have to exit the .xml to update that there is new images for the battery too.... we need an xml person, i promise.
Hello,
I too was interested in this mod so I went ahead and ported it to the Fascinate.
My framework-res.apk is from dh12 I am unsure if this works with the update. There is a readme in the zip file that explains how to install. This is not an update.zip you must push my framework-res.apk using adb or some other method.
I take no responsibility if you brick your phone with this. Make a backup and follow the directions in the readme file. It seems to work ok on my phone, but I'm not going to sit there and watch it drain every percentage point
I take no credit for this I just modified what I found on the OP's linked thread. What I implemented was the battery with the number inside, but you can use any of the other types by replacing the pngs in my framework-res.apk with 7-zip.
If there are any problems let me know.
Enjoy.
Threax said:
Hello,
I too was interested in this mod so I went ahead and ported it to the Fascinate.
My framework-res.apk is from dh12 I am unsure if this works with the update. There is a readme in the zip file that explains how to install. This is not an update.zip you must push my framework-res.apk using adb or some other method.
I take no responsibility if you brick your phone with this. Make a backup and follow the directions in the readme file. It seems to work ok on my phone, but I'm not going to sit there and watch it drain every percentage point
I take no credit for this I just modified what I found on the OP's linked thread. What I implemented was the battery with the number inside, but you can use any of the other types by replacing the pngs in my framework-res.apk with 7-zip.
If there are any problems let me know.
Enjoy.
Click to expand...
Click to collapse
Excellent, yea that framework should work, I have switched from both systems without doing the full update and my phone has been fine.
May I ask the names of the xmls you edited, so I can manually pull them, I don't want to retheme the whole framework-res lol.
EDIT: Nevermind just downloaded and saw that you included the files you edited separately too.
My hero right here!! I'm going to have some fun with themes now!! Lol
Threax said:
Hello,
I too was interested in this mod so I went ahead and ported it to the Fascinate.
My framework-res.apk is from dh12 I am unsure if this works with the update. There is a readme in the zip file that explains how to install. This is not an update.zip you must push my framework-res.apk using adb or some other method.
I take no responsibility if you brick your phone with this. Make a backup and follow the directions in the readme file. It seems to work ok on my phone, but I'm not going to sit there and watch it drain every percentage point
I take no credit for this I just modified what I found on the OP's linked thread. What I implemented was the battery with the number inside, but you can use any of the other types by replacing the pngs in my framework-res.apk with 7-zip.
If there are any problems let me know.
Enjoy.
Click to expand...
Click to collapse
yes! Thanks so much, just got it on my phone and so far so good
is it possible to make the battery the stock blue color?
betostunts said:
yes! Thanks so much, just got it on my phone and so far so good
is it possible to make the battery the stock blue color?
Click to expand...
Click to collapse
I will be working with this tonight and hopefully coming out with a flashable version as well..
Yes implementing this into my remix nextheme as we speak.
Problem is I am making each image one by one lol.
What did you use to decompile and rebuild your apk? I'm just getting android developement/themeing and I noticed there seem to be a couple tools.
Thanks,
Dan
It doesn't seem to change the battery charge images...
(Working on this)
Yeah I keep changing the images and try to put them in a update.zip but I fail.. it doesn't keep up with the actual charge of the battery.
I used apk manager 4.9. You will need to get adb and java for it to work. Also I can't get this program to push the modded apks, but I just do it manually. The program is nice because it kind of guides you through what you need to do.
Also I did not modify the charge icons just the battery drain.
Sent from my SCH-I500 using XDA App
Is apk manager's advice that you don't sign system apks correct?
Threax said:
I used apk manager 4.9. You will need to get adb and java for it to work. Also I can't get this program to push the modded apks, but I just do it manually. The program is nice because it kind of guides you through what you need to do.
Also I did not modify the charge icons just the battery drain.
Sent from my SCH-I500 using XDA App
Click to expand...
Click to collapse
Thanks - I had seen that but was just apkTool 1.2. I have been using adb and have been successful in making some small tweaks to verify what I am doing.
Regarding signing - it was my understanding that the apks should always be signed to ensure the system doesn't run into problems. I have not proofed how not signing effects things or if there are any side effects to now signing or if an app looks for a specific signature.
References for anyone following this thread...(http removed as I'm a new member and cannot post links yet)
APK Manager --> forum.xda-developers.com/showthread.php?t=695701
apkTool --> forum.xda-developers.com/showthread.php?t=707189
dashultz said:
Thanks - I had seen that but was just apkTool 1.2. I have been using adb and have been successful in making some small tweaks to verify what I am doing.
Regarding signing - it was my understanding that the apks should always be signed to ensure the system doesn't run into problems. I have not proofed how not signing effects things or if there are any side effects to now signing or if an app looks for a specific signature.
References for anyone following this thread...(http removed as I'm a new member and cannot post links yet)
APK Manager --> forum.xda-developers.com/showthread.php?t=695701
apkTool --> forum.xda-developers.com/showthread.php?t=707189
Click to expand...
Click to collapse
You don't want to sign the system apks. It is my understanding that it somehow reuses the old signature. This is what is nice about Apk Manager as it will prompt you with this information so you don't have to guess when you are first learning. It also nicely organizes your projects and allows you to easily zip everything back up.
It also has a nice feature when recompiling a system apk to allow you to copy files from the original apk if unmodified (you delete what you have changed from a directory it created). I needed to do this because when I was first modifying framework-res.apk I would get a blank screen when rebooting my phone. When I had apk manager keep most of the old files it worked perfectly, so if you are having problems with modded xml files try using this feature. It will prompt you when you are recompiling the apk.
Sorry to turn this into the noob apk packaging thread, but I am new to this as well and am happy to share what I've picked up to save any other people some time.

[REQ] [froyo] BLACK/TRANSPARENT notification pull down bar

Searched and couldn't find just this...a black notification pull down. I think I am one of the few that likes the stock look just want a black/ transparent pulldown and don't want a whole new theme to get it. I am running dl30 BTW. I KNOW THAERE ALOT OF REQUEST BUT HOPEFULLY MINE IS EASY TO FULL FILL WITH A COUPLE OF OPTIONS TO ADD AS A ZIP FOR THOSE THAT LIKE A SEMI-STOCK LOOK. HOPE TO SEE A COUPLE SOON.
THANKS IN ADVANCE
A little FYI...I really like the midnight pulldown and buttons....many others are nice as well..
This can be done by modifying the png images in the framework i believe. If you use 7zip to extract it and then edit with photoshop or gimp and save the png and put back into the framework file.
If i am wrong somebody can correct me though.
bump....seems easy but I am an idiot with this phone?!?
I want it also
I pulled out the files and changed everything and put it back into the apk file. When I put it back on my phone I didnt get any changes. I thought I read that if your only changeing pics, this is all that was needed.
I posted asking if there was something I was missing but no answer.
I have the changes if I could get the phone to take them.
Yeah i tried ti compile it too just now....fail.
MSHancock said:
I pulled out the files and changed everything and put it back into the apk file. When I put it back on my phone I didnt get any changes. I thought I read that if your only changeing pics, this is all that was needed.
I posted asking if there was something I was missing but no answer.
I have the changes if I could get the phone to take them.
Click to expand...
Click to collapse
Attach your framework-res.apk & twframework-res.apk and let me look at it. It will be hard to give an accurate explanation without first doing this.
EDIT: Or do what nitsuj said below and it should work. Your probably having problems with .9 pngs
MSHancock said:
I pulled out the files and changed everything and put it back into the apk file. When I put it back on my phone I didnt get any changes. I thought I read that if your only changeing pics, this is all that was needed.
I posted asking if there was something I was missing but no answer.
I have the changes if I could get the phone to take them.
Click to expand...
Click to collapse
to do what you are trying to do.......grab the twframework-res.apk from your phone by pulling it with adb...or simple version just grab it out the rom you are currently using by moving the og rom file to your desktop and use 7zip to extract it.
now use 7zip again to extract the drawable-hdpi folder from the apk.
swap out status_bar_background.9 for a transparent one you grabbed from another theme...or you can make one by yourself...but its a .9 image so you ll have to patch it in 9 patch.
if you want to avoid that heres a transparent one for you http://dl.dropbox.com/u/15331201/rom/transparentbackground.zip (just extract it and swap it)
open up the twframework with 7zip again and copy this drawabl-hdpi folder over the old one....then you can push this framework back to your phone...or just take one of our theme update.zips and open it up with 7zip...go into the system folder, delete the app and font folders...go into the framework folder and delete whats theres and place the twframework-res.apk in it....put the zip file on ur sdcard...boot to recovery and flash it
Thanks
Thanks for the tips guys. I will work on this today and have something later.
as soon as I get back to my comp I am going to try and fix it...

[HELP] Question about Status_Bar.XML

Hey guys, this is gonna be kind of long so bear with me:
I'm running a Le Pan TC970 and we currently have root access, but no CWM or custom ROMS. It runs on Froyo 2.2 OS and as we all know, it's ugly as sin. I've successfully managed to use this framework-res replacement script (found here: http://forum.xda-developers.com/showthread.php?t=889963) to swap out icons galore and change the status bar and notification area to blacked-out colors. I'm trying to make a theme for our community, because I know I can't be the only one looking at this ugly OS and screaming.
Well the problem I'm having is really frustrating, the black notification bar looks great, however the notifications & clock are in black font. Therefore you can't see them with the new notif/status areas. I did some research and figured out you can change some color codes in the /layout/status_bar.xml file. But when I try to open it, it's all encrypted. I used APKTool to decompile and recompile it and it wasn't encrypted. I changed the #000000 to #FFFFFF. Then, flashed it using the script. This caused a massive boot loop and I couldn't power down the tab at all. Being impatient, with the help of a friend I figured out how to rip open the tab and pull the battery, allowing me to access the proprietary recovery & I reflashed the firmware and got back to stock.
I've tried pulling that file from other themes and just replacing it, I've tried decompiling & recompiling and editing the original file, I've tried everything I can think of and every solution I've searched for has lead me to endless boot loops when I try to screw with anything besides the icons & images in hdpi folder. This is the only stopping me from having a custom theme is the damn color code. Does ANYONE have any suggestions I can try?
I don't want to continue getting boot loops because each time I have to reflash the stock firmware, re-root, tiba restore to get my root tools back and it's a big fat pain in the A$$. We have no CWM or NANDROID capabilities, so this is really my only option. Before I throw this stupid thing, I thought I'd ask around XDA and see if someone knew the solution to my problem.
Thanks for any help
you should enable usb debugging and from then you can use adb
i you make backups of the file you might try pushing it back if the edit fails
however, you might want to take a look at this topic: [TUTORIAL] Where to find the colors for making a theme
hope this topic helps you
picard666 said:
you should enable usb debugging and from then you can use adb
i you make backups of the file you might try pushing it back if the edit fails
however, you might want to take a look at this topic: [TUTORIAL] Where to find the colors for making a theme
hope this topic helps you
Click to expand...
Click to collapse
I've read this thread a few times, I could be doing something completely wrong I'm not sure. But I've used APKTool to decompile and edit the font colors as that guide suggests and then recompile and it always ends in a bootloop. I have tried pushing the individual files with adb & that was a flop also. It's just this one stinkin' XML file giving me issues. I'll try re-reading that again and see if I did something wrong, thanks for the help
dbaybay said:
I've read this thread a few times, I could be doing something completely wrong I'm not sure. But I've used APKTool to decompile and edit the font colors as that guide suggests and then recompile and it always ends in a bootloop. I have tried pushing the individual files with adb & that was a flop also. It's just this one stinkin' XML file giving me issues. I'll try re-reading that again and see if I did something wrong, thanks for the help
Click to expand...
Click to collapse
color is 8-digit number: AAEEGGBB, where AA is alpha value (or transparency, where FF is the least transparent and 00 is fully transparent), and RRGGBB is the color code in RGB hex (in the OP you wrote 6digit colors, so i'm not sure if you used those in the xml or the proper format, because using 6digit colors might be a cause of bootloop)
picard666 said:
color is 8-digit number: AAEEGGBB, where AA is alpha value (or transparency, where FF is the least transparent and 00 is fully transparent), and RRGGBB is the color code in RGB hex (in the OP you wrote 6digit colors, so i'm not sure if you used those in the xml or the proper format, because using 6digit colors might be a cause of bootloop)
Click to expand...
Click to collapse
Yeah, I meant it that way, sorry. Once the XML file was viewable in Notepad++ (it was encrypted until I used APKTool) I noticed it said "FF000000" and I wanted it white, so I replaced only the "000000" with white, leaving it exactly "FFFFFFFF".
I also tried swapping out that file with files from other themes that already had white text. Every time results in a boot loop. I'm not sure if the files for my tab are proprietary but when I edited it myself and recompiled I just don't get why it wouldn't work.
In some of the research I've been doing, I stumbled across this thread - http://forum.xda-developers.com/archive/index.php/t-1060199.html - which states that if you edit and XML file you must delete the resources.arsc so it knows to create a new one reflecting the changes.
I'm using APKTool to decompile the framework.res.apk file and once it's decompiled "resources.arsc" isn't there. It only shows back up once I recompile the framework-res.apk.
Can someone give me a lead as to if this is true and if so, how to do it properly?
try apkmanager
picard666 said:
try apkmanager
Click to expand...
Click to collapse
Tried this out, decompiled, edited, compiled, signed, flashed. Still got the bootloop and fried my 16GB microSD card. Flashed the same file several times now with no problems besides the bootloop, so this is the only thing I can accuse of frying my SD card.
Sigh. I give up at this point.

Categories

Resources