How phone specific is services.jar? - Android Q&A, Help & Troubleshooting

I saw where someone had modified the services.jar file for Droid X that removed the Clock from Notification Bar. Is the services.jar file really specific for every phone? I was wondering if I could rename my present services.jar file and place this modified file on my phone to test to see if it worked. Or would doing this cause my phone not work at all to where I couldn't easily go back and replace the file with my previous one? I assume if things did turn bad I could go to download mode and redo stock ROM but thought I ask first to hear thoughts
Thanks

Related

A primer for modifying framework-res.apk?

I've been trying to make a couple of modifications to framework-res.apk and I've been having a lot of trouble. I've bootlooped the DX2 more than a few times (and was able to recover with the recently released SBF).
I've tried making one change, I've tried signing the file, I've tried not signing it, I've tried different compression levels on the zip, all with no luck. The one time I got my apk into the phone with my change on board (I verified that it was there) my change was ignored by the phone. (I've been trying to replace /res/drawable-hdp/zz_moto_list_texture_bg.png to change the default list background from the light gray to black.)
Has anyone been successful making modifications to this file in a DX2? If so, how did you do it?
What did program did you zip it with?
What was the compression set to?
Did you sign the file? If so, with what program and key?
What method did you use to drop framework-res.apk back into the phone?
Are there any files that should not be modified? (I've heard to leave the ".9" files alone.)
Thanks,
Chris
I've been trying to do the exact same thing and haven't got too far. I'm doing dev stuff thru Ubuntu and it seems to be very friendly along with gimp. I've actually been able to drag and drop replacement files without extracting the apk but haven't been able to flash it inside a theme. I haven't actually tried just replacing the framework.
Staying tuned...
Sent from my DROID X2 using XDA App
You can make a theme at uot.dakra.lt and flash the .zip file to your phone.. jus upload your framework-res.apk to the site once you make it, but anyway, they modify the file and it worked for me.
Peperm1nt said:
You can make a theme at uot.dakra.lt and flash the .zip file to your phone.. jus upload your framework-res.apk to the site once you make it, but anyway, they modify the file and it worked for me.
Click to expand...
Click to collapse
Yes I've been using this but it's not really set up for blur. we're talking about going deeper than UOT can reach with current software.
Sent from my DROID X2 using XDA App
You can recompile and decompile with apkmanager, but its not without some hiccups. First, it compresses the resources.arsc which unlike the rest of the apk needs to be decompressed. To fix this I pull it out then with 7zip I add it back to the framework-res archive with zip as the format and store as compression. That fixes the boot-loops. Even after that there's been some minor problems with it recompiling certain .xml a little goofy.
But at least it doesnt cause a boot loop.

Creating Battery Mods

So i have been attempting to create a battery mod using some of the ones for the i9100 and i have been failing. I'm currently running Cognition V2. I only want the battery icon to change. and i know the files are in the framework-res.apk in the drawable-hdpi. I was told i can put all the image files in a modified Framework-res.apk and put in the framework folder. then rename the one the phone is using and then rename the modified one to exactly what it is suppose to be. It works for him but when i do it i instantly get FC when i change the name of the file. then after a reboot the correct battery icon is there but i get lots of FC's including the all important android.phone.com. So i must be doing something wrong. i was conversing in the Cognition section but since its off topic i moved it here. any help and tips are appreciated.
thejanitor86 said:
So i have been attempting to create a battery mod using some of the ones for the i9100 and i have been failing. I'm currently running Cognition V2. I only want the battery icon to change. and i know the files are in the framework-res.apk in the drawable-hdpi. I was told i can put all the image files in a modified Framework-res.apk and put in the framework folder. then rename the one the phone is using and then rename the modified one to exactly what it is suppose to be. It works for him but when i do it i instantly get FC when i change the name of the file. then after a reboot the correct battery icon is there but i get lots of FC's including the all important android.phone.com. So i must be doing something wrong. i was conversing in the Cognition section but since its off topic i moved it here. any help and tips are appreciated.
Click to expand...
Click to collapse
The key is to move the modified framework-res apk (correctly named and ready to move) into system (not in a subfolder), change the permissions to the appropriate ones there (sd card won't let you do them). I'm pretty sure the permissions are rw-r-r. They have to match the permissions of the file it's replacing. This is why you get the FCs. From here, move it into the framework folder, it'll prompt if you want to replace, hit yes or ok. Reboot.

Framework-res always displays glitches

I tried to decompile, modify 1 xml file and recompile the framework-res.apk.
But everytime I do it, I either get into a boot loop, or when In succeed it displays glitches (like notification bar, and messed up lock screen, and settings)
This is for AURORA ICS 4.0.3 and I do have the latest aapt.exe file .. so I don't know what is wrong!
I tried to use the original framework-res but replace the resources file inside, stored and compressed methods.
Tried to get the compiled framework-res but add the META-INF and Manifest file (again, both with compressed and stored resources file) and always.. it just glitches or bootloops.. and the mod that I tried (ICS on screen buttons or the CRT effect when you switch off the screen, mainly used in Oxygen roms, but it's available in all ROMs).. it never works.. only glitches the lock screen, notification bar etc..
Any help?
Thanks.
I might know the answer to this..
Which files are you modifying in framework-res? And how are you pushing it back to your phone?
Sent from my U20i using xda premium
Would be great
I am modifying some files in the values folder, bools.xml, arrays.xml .. but even if I edit bools.xml alone, it still glitches.
To push it back: I go to recovery mode on my phone, plug it into my linux machine (the system partition mounts), paste the new framework-res.apk to replace the old one, fix permissions (otherwise it boot loops), and restart the phone. This method works for other files and never had any problems, like the android.policy.jar
Would be great if you can help me. Thanks
Well, the XML files you're editing are all part of resources.arsc so it's something to do with that which is causing the problem. I used to get all sorts of annoying bugs when I edited anything in resources.arsc and I eventually found out that I was pushing the final apk back to the phone incorrectly.
I use a Windows PC, not Linux, so I might not be that helpful but this is what I do to modify and replace framework-res.apk. Hopefully it'll help. What I do is..
Decompile framework-res.apk
Make my changes
Recompile the file
Use a program like 7zip to open the old and the new files
Drag and drop the "res" folder from the new file into the old
Extract resources.arsc from the new framework-res.apk and add it to the old one in "STORE" mode, so it's not actually compressed
Go into recovery, mount the system partition and push the old file
..and that's it. Works a charm every time.
I would have thought that you would need to do the same thing on Linux but with the additional step of correcting the permissions. If you do all that and it still doesn't work, then there has to be a problem with the actual mod you're trying to do.
Thank you very much, I actually tried that method. It sort of worked, but everytime it breaks the notification bar. It becomes like double the size and I'm not sure why.
Thanks.
Then the issue must be with the modification itself. What exactly are you changing to what?
Sent from my U20i using xda premium
I tried different ones.. but even a simple one.. enable CRT animation.. which is pretty much open bools.xml and edit one true to false.. it breaks it :/

[Q] Replace lock screen and scrolling wallpaper

I am on ShishirROM ICS and I really like the Rom over all. However in his latest up date he included the stock ICS lock screen and scrolling wallpaper and I personally prefer the ones from the previous release. I am willing to do the work to revert them to what I want but want to make sure I am on the right track. Is this guide from the walkthrough sticky the correct way to do this (How to manually replace modded/stock system files)? I have both versions of the ROM on my laptop so I am thinking I can pull what I want from one and use the guide above to replace it in the other. Thank you in advance for your help.
Switch the android.policy.jar file and that should give you the old lockscreen.
That's generally all you should do for deodex, so I do not know since his rom is odex.
LiLChris06 said:
Switch the android.policy.jar file and that should give you the old lockscreen.
That's generally all you should do for deodex, so I do not know since his rom is odex.
Click to expand...
Click to collapse
Thanks Ill give it a shot and see. Whats the worst that can happen? Lol
Bootloop, reflash the rom without wipe.
LiLChris06 said:
Switch the android.policy.jar file and that should give you the old lock screen.
That's generally all you should do for deodex, so I do not know since his ROM is odex.
Click to expand...
Click to collapse
Not sure why but when I replace the android.policy.jar file and reboot I still have the same lock screen.
what I am doing. Unpack ROM, copy android.policy.jar from laptop to external SD, move file to system, change permissions to match existing file(rw-r-r), confirm permission change, move file to framework, replace existing file OK, back out of root explorer and reboot.
Any suggestions would be appreciated thanks.

How can I turn my framework-res.apk into flashable zip?

Hello. I just learned how to create flashable zips, but every tutorial Ive seen only explains how to turn apps into flashable zips. I made a few updates to the framework-res.apk file for a rom and would like to save the changes into a zip file.
My concern is if I save my whole backed up framework-res file, when someone else goes to add this to their system, does it add the changes or does it completely replace their file with mine?
If this happens, how can I make a flashable zip that only adds a few changes to the framework-res.apk file without messing with any other settings?
sparkplug619 said:
Hello. I just learned how to create flashable zips, but every tutorial Ive seen only explains how to turn apps into flashable zips. I made a few updates to the framework-res.apk file for a rom and would like to save the changes into a zip file.
My concern is if I save my whole backed up framework-res file, when someone else goes to add this to their system, does it add the changes or does it completely replace their file with mine?
If this happens, how can I make a flashable zip that only adds a few changes to the framework-res.apk file without messing with any other settings?
Click to expand...
Click to collapse
it would kill the old file. Not sure how to stop that i it is even possible.
sparkplug619 said:
Hello. I just learned how to create flashable zips, but every tutorial Ive seen only explains how to turn apps into flashable zips. I made a few updates to the framework-res.apk file for a rom and would like to save the changes into a zip file.
My concern is if I save my whole backed up framework-res file, when someone else goes to add this to their system, does it add the changes or does it completely replace their file with mine?
If this happens, how can I make a flashable zip that only adds a few changes to the framework-res.apk file without messing with any other settings?
Click to expand...
Click to collapse
Not sure what you mean by "turning apps into flashable zips", but if you edit an apk and want to flash that to a phone through recovery (in a flashable zip package), it will replace the entire apk, not just your edits in the apk. It is not possible to flash only parts of an apk over another - it will always change the entire apk.
Ok thanks for the info.
What I am doing is creating a mod for my phones rom, several have been created and posted on the thread, the mod is just a simple crt animation disable. I had to edit the framework file in order to make this happen.
I've opened a few zip files and I see they have framework-res.apk files attached, so everytime I flash a mod to my phone, it is wiping all previous changes I've made to my framework-res.apk file?
sparkplug619 said:
Ok thanks for the info.
What I am doing is creating a mod for my phones rom, several have been created and posted on the thread, the mod is just a simple crt animation disable. I had to edit the framework file in order to make this happen.
I've opened a few zip files and I see they have framework-res.apk files attached, so everytime I flash a mod to my phone, it is wiping all previous changes I've made to my framework-res.apk file?
Click to expand...
Click to collapse
Yes, the files in the zip will overwrite your existing files. If you like one of those other mods, just decompile the framework-res with the themes that you want and edit the bools.xml line for CRT (config_animateScreenLights, or something like that if I recall), and recompile (deleting the resources.arsc from the keep folder if you use APK Manager). Or make your own themes for your mod...
Thats really strange, ive added plenty of mods to my phone and they all stayed intact, but when I check them out, they are all apks being flashed from zip files. Maybe I am missing something, or maybe I am not asking the question right, its just really hard to understand how it works. Also, I havent slept for over 24 hours so im really sketchy with processing info right now

Categories

Resources