[Q] Edit system/framework/services.jar ? - Google Pixel XL Questions & Answers

I got tired of waiting for a nice custom ROM or Xposed to drop, so I decided to look into doing my own mods. I've been wanting to learn for the longest time.
My Googling suggests things I mostly want (such as the five-way-reboot and disabling of screen-on when plugged/unplugged) are options that can be change in services.jar.
But I'm not finding the classes.dex in my services.jar file.
Can anyone point me in the right direction to get started?
Maybe toss a link my way to read?
I got brain tired after 20 minutes of Googling only led me to how-to guides that aren't working out because I don't have this classes.dex thing?

CZ Eddie said:
I got tired of waiting for a nice custom ROM or Xposed to drop, so I decided to look into doing my own mods. I've been wanting to learn for the longest time.
My Googling suggests things I mostly want (such as the five-way-reboot and disabling of screen-on when plugged/unplugged) are options that can be change in services.jar.
But I'm not finding the classes.dex in my services.jar file.
Can anyone point me in the right direction to get started?
Maybe toss a link my way to read?
Click to expand...
Click to collapse
Pull the .jar file to your local machine and open it in an archiver that supports .zip compression. Many files including 'classes.dex' are inside the .jar file. Simplest way is to extract the classes.dex then decompile it using backsmali.

mostyle said:
Pull the .jar file to your local machine and open it in an archiver that supports .zip compression.
Click to expand...
Click to collapse
Right, but there is only one file inside the services.jar and it's not classes.dex. It's just the META-INF folder wiht MANIFEST.MF inside.
As well, the services.jar is only 318 Bytes.
I use 7zip on my computer or Root Explorer on the phone.

Good Job Eddie!
While you are learning can you incorporate a dark background in the app drawer.
Keep up the good work.

CZ Eddie said:
Right, but there is only one file inside the services.jar and it's not classes.dex. It's just the META-INF folder wiht MANIFEST.MF inside.
As well, the services.jar is only 318 Bytes.
I use 7zip on my computer or Root Explorer on the phone.
Click to expand...
Click to collapse
Same here. I suspect the dex code you are looking for has moved either to an APK or a different JAR.
Have you looked at the classes.dex in framework-res.apk?
There are a LOT of 318 byte files in /system/framework. This tells me most definitely that the code has been offloaded elsewhere and that these files were likely left as legacy reference. Apologies for not looking at the files before replying.

Now that you mention it, I did try all the other jar's in /system/framework.
The only one that had a classes.dex was embmslibrary.jar.
But I got errors when trying to unpack it.
Wish I'd saved the errors to post here.
Figured I'd give some of the ROM building utilities a go but have not had success yet. I'm only still just starting out though.
I'm thinking we'll probably need an all new ROM Kitchen for 7.1 due to many significant changes.
Which are probably what's holding up ROM development so far.
I got the Nexu.... uh, Pixel because I figured we'd have a bunch of cool AOSP ROM's within a week or two. doh.

DIXZ06 said:
Good Job Eddie!
While you are learning can you incorporate a dark background in the app drawer.
Keep up the good work.
Click to expand...
Click to collapse
There are already mods out there for the Pixel Launcher.
I use Nova Launcher though, which has color and transparency options built right into it.

XDA's Chef Central subforum:
http://forum.xda-developers.com/chef-central/android

The reason you're not seeing the classes.dex file in any of the jar files is because the system is odexed. The classes.dex file is actually services.odex in /system/framework/oat/arm64.

Good to know, thank you!
It's a bummer about all these Android Kitchen variations out there.
None work with the Pixel yet.
I'm not having warm & fuzzy feelings about development for this phone.

Has anyone found a way to deodex the Pixel 7.1 yet?
I'm not finding any "utilities" that support Pixel yet.

disable screen on when plugged in can be disabled by editing "bools.xml" in the framework-res.apk
i can do it for you if you want

flex360 said:
disable screen on when plugged in can be disabled by editing "bools.xml" in the framework-res.apk
i can do it for you if you want
Click to expand...
Click to collapse
Thank you!
Holy moly, I've already found 18 bools.xml's in framework-res.apk and there are still about two hundred folders to manually open to see what's in there.
Do you know which one to edit? I'd like to learn all this myself.
I'm using APK Studio and really wish it had a better search function.

CZ Eddie said:
Thank you!
Holy moly, I've already found 18 bools.xml's in framework-res.apk and there are still about two hundred folders to manually open to see what's in there.
Do you know which one to edit? I'd like to learn all this myself.
I'm using APK Studio and really wish it had a better search function.
Click to expand...
Click to collapse
the one in the "values" folder

Ahh. There are like five million Values folders.
But only one value folder.
I missed that. lol
Thanks

CZ Eddie said:
Thank you!
Holy moly, I've already found 18 bools.xml's in framework-res.apk and there are still about two hundred folders to manually open to see what's in there.
Do you know which one to edit? I'd like to learn all this myself.
I'm using APK Studio and really wish it had a better search function.
Click to expand...
Click to collapse
And you thought this was going to be easy why??? LOL

You're not kidding.
Just one roadblock after another.
And all my Googling leads to old research/faq's that just don't seem to work on the Pixel.
I need to go buy an old Nexus running Gingerbread just to get some of this stuff to work.
My current roadblock is trying to write to /system via ADB.
It pretends to let me write.
But after a reboot, all my changes are gone and it's gone back to the original files again.
adb root
adb remount
adb push filename /system/folder/filename.
It's like yeahhhh, 100% write complete.
PSYCH! Then you reboot and it's like you never wrote anything.

I even tried replacing the framework file using Root Explorer but it just immediately reboots and bootloops.
I did sign the apk succesfully before trying that.

FINALLY I have success.
I'm now able to unplug my phone without the screen turning on.
This was a huge frustration when car-docked.
Now I can work on a few other things and come back and play with some more mods later. :good:
So my stumbling blocks were permissions (duh) and being unable to decompile, recompile and then sign the apk and get it onto the phone without bootlooping.
I still don't have a good way of dcompiling/recompiling without doing some 7zip magic afterwards. But at least I have some success and a footprint to move forward with learning some further mods. :good:
And I had to get this done using Root Explorer, so I still need to figure out a proper way to mount the system and push system files with ADB and get them to stick.

Well, so my ultimate goal was to do a bunch of mods and then release a custom stock-based ROM to the community.
But holy moly, more stumbling blocks.
Couldn't figure out how to create a simple flashable ROM zip.
So I just released my mods in the Themes & Apps subforum:
http://forum.xda-developers.com/pixel-xl/themes/framework-mods-disable-screen-off-usb-t3508322
Thanks for the help, guys. :good:
I'll get back at the custom ROM thing another time.
I'll tell you what though.
I have tons more respect for devs after trying all this on my own.
Even if it's something you know how to do, there is a LOT of time and work spent on modding.
And then figuring out something new for the first time is incredibly frustrating.

Related

How To Theme Develop for Windows For Dummies in 10 easy steps

How To Theme Develop for Windows For Dummies in 10 easy steps (( no your really not a dummy its just an easy name for a how to lol))
well i'm going to give this a shot in the dark on how to create this how to be as easy as possible
1st
download these files if you don't already have them
JAVA
http://java.sun.com/javase/downloads/index.jsp
download the JDK
Winrar
http://rarlabs.com/rar/wrar380.exe
and Auto-sign.zip
http://www.mediafire.com/download.php?uwzjjydnm2r
2nd
Download my included Auto-sign files.
what it contains.
the Test keys file..
and an update.zip file
and a batch file i created called auto-sign to make things easier to sign
3rd
after you have downloaded my Auto-sign
then you extract it to where ever you want.
4th.
use the update.zip included if your a Beginner it includes my windows 7 theme .. i edit so many files that it's easier to tell what does what and whats goiing to go where. now open that zip file DON'T EXTRACT just open it using winrar..
5th
When it is open go to Framework.. and open Framework-res.apk
NOW IF THE APK. POPS UP AND SAYS IT CANT OPEN BLAH BLAH SELECT A PROGRAM AND THEN SELECT WINRAR.
6th
Once you open Framework-res.apk KEEP THIS WINDOW AND UPDATE.ZIP WINDOW OPEN!!
then just extract the whole Res Folder to where ever you like this makes it easier to see what files you wish to edit.. most of the files will be in the folder called Drawable
7th
open up your favorite photo editor .. i use photoshop along with 90% of the people who Graphic Design... Edit your pictures Remember a file with a .9 can mess up your phone so edit those carefully.. and save what ever pictures you have
8th
Now drag the whole Res Folder .. back into the Framework-res.apk
now your update.zip file is going to say files has been changed to framework-res blah blah do you wish to save it . click yes .. now your framework has been updated you can close everything out
9th
go to the Auto-sign folder.. and open Auto-sign this will now sign your update.zip .. and rename it to update_sign.zip .. now just delete your old update.zip.. rename update_signed.zip to update.zip
10th
put it on the root of your memory card.. reset using green call + menu + end
then hold home and end .. until the recovery mode shows up .. then press Alt+S and hope your device isn't bricked
Disclaimers
I'm not responsible if your brick your device.. but i will help to the best of my abilty and if i can't help i'm sure XDA will
i don't sign every file in my update.zip i just sign update.zip .. and hey it works lol..
For ADP or RC 8 versions .. just download your favortie ADP theme or RC 8
put it in the Auto-sign folder.. and rename it to update.zip if it isn't already then just follow my steps
Screenshots will be added later.. you have to understand i did this right when i woke up i didnt' even eat breakfast yet lol.. so if something is flawed.. just write me and i'll change my post..
reserved for later use
thank you a didnt want to download linx...i will try when i get home tonight.thanks in advance
you are the man!!!! thanks, really appreciate this. got some ideas. i'll run them by you when i can get some time to start on my theme.
Dave Da illest 1 said:
How To Theme Develop for Windows For Dummies in 10 easy steps (( no your really not a dummy its just an easy name for a how to lol))
1st
download these files if you don't already have them
JAVA
http://javadl.sun.com/webapps/download/AutoDL?BundleId=26223
Winrar
http://rarlabs.com/rar/wrar380.exe
and Auto-sign.zip
http://www.mediafire.com/download.php?uwzjjydnm2r
2nd
Download my included Auto-sign files.
what it contains.
the Test keys file..
and an update.zip file
and a batch file i created called auto-sign to make things easier to sign
3rd
after you have downloaded my Auto-sign
then you extract it to where ever you want.
Click to expand...
Click to collapse
Is the "Auto-sign files" you mention in step 2 the same as the link you provided for the "and Auto-sign.zip"?
Just want to make sure Im not missing anything.
Thanks for putting this together!
xavier6303 said:
Is the "Auto-sign files" you mention in step 2 the same as the link you provided for the "and Auto-sign.zip"?
Just want to make sure Im not missing anything.
Thanks for putting this together!
Click to expand...
Click to collapse
yes it is iima have to edit that lata right now i gotta get ready to return my laptop
Dave Da illest 1 said:
yes it is iima have to edit that lata right now i gotta get ready to return my laptop
Click to expand...
Click to collapse
Ok cool. Thanks for the prompt response!
hey i was looking through and i noticed you did have the .9 files edited, what do you mean they can mess up your phone? Also how did you edit it so that the tab is the way that it is across the screen? Thanks.
Ill explain more about .9 in my reserved post and more about app designing when I get home..the file ur looking for is in launcher.apk .. under drawable-port and land
Do not edit or open .9.png's They will distort when android tries to resize them, editing them can also make apps force close upon boot. You will make more trouble for yourself by editing these files! Leavem alone! Just opening the files to look at them can make them distort... I fought with these images for weeks and caused serious problems in my theme...
Stericson
Stericson said:
Do not edit or open .9.png's They will distort when android tried to resize them, editing them can also make apps force close upon boot. You will make more trouble for yourself by editing these files! Leavem alone!
Stericson
Click to expand...
Click to collapse
Its true! Listen to him! Dont touch the .9.png files!
I Wish Android Had This
It would be nice if we had a website like this , http://iphonethememaker.com/
btw, thanks for the simple instructions
I noticed in framework-res.apk has a "resoriginal" folder with what appears to be all the orignal files. Does this cause any problems when left in the apk or did you just include it so we have a backup?
Do we need to take it out before resigning and flashing?
Can we take it out before resigning and flashing?
Thanks
Just noticed something else, not trying to bash your post Dave but You have to let people know that you need to resign every .apk that you edit! Yes you may get away with not signing the apk, but when the time comes that you've changed something in an apk to such an extent that the sigs do not match anymore, you are going to get stuck at the g1 boot screen. Then you are going to have a hard time figuring out which apk is not signed correctly. Resign every apk just to be safe. Don't cut corners, your gonna end up causing more problems for yourself.
Stericson
Stericson said:
Just noticed something else, not trying to bash your post Dave but You have to let people know that you need to resign every .apk that you edit! Yes you may get away with not signing the apk, but when the time comes that you've changed something in an apk to such an extent that the sigs do not match anymore, you are going to get stuck at the g1 boot screen. Then you are going to have a hard time figuring out which apk is not signed correctly. Resign every apk just to be safe. Don't cut corners, your gonna end up causing more problems for yourself.
Stericson
Click to expand...
Click to collapse
So if you dont touch an .apk, you don't have to sign it right? Just want to be sure.
thats correct, assuming that it has been resigned once already. like if you are building off of one of our themes, all our apks should be resigned, so if you dont mess with it, you dont have to sign it again.
Stericson
will this theme wipe everything?
and is there a way to edit icons and such?
Ahh stupid me I left it in there..that's why my theme was almost 10 MBs lol I didn't think much of it since it worked ! Lol..but yeah you can take it out..or use it as a reference lol I guess it works out for a better that I left it there ..and yeah I edited .9 files but I did it in a way that well it worked for me..but it deffintly won't work all the time..you see the blue black in the phone app when u make a call and how it looks streched out..yeah so that didn't work out type good ..but hey it worked and doesn't look all that bad lol..so some you can edit but in a certain way..and others you can't without it messing up..but don't even considor editing .9 button files..atleast until somebody figures out a way where it won't look funny
you can get away wit not signing if ur only editing the icon of the program..every apk in my theme has been signed even ones I didn't edit but if ur. Just editing the icon. And a couple of other things u really don't need to resign..for example.. I didn't sign not one program after I did my back to the future theme ..and my windows 7 theme seems to flash better then my. Back to the future theme..also one other note to add..that if you resign an app..please remember the programs are case sensitive..but to be on the safe side if u edit more then three things in a apk just sign it..as a matter of fact later tonight I will make a auto-sign for every program to make it easy for everyone
And this is non-wipe by default..
Edit- the different things I did from my back to the future theme to this theme for me not to have to resign..
Update to 1.31
Only edit icons.
The procedure I used to save my files.
Changed my theme to non wipe
Or maybe I just have pure luck lol
But listen to the guru on this and sign all .apks don't test ur luck. Like I have ..
Edit 2- I just remember I'm not sure wats the limit u can edit before u have to resign..cause on my framework-res.apk.. I editied over 10 files without signing.. but if you want to test ur luck be my guest..but that's why I put a disclaimer..but the way signapk.jar works is actually quite interesting ..cause it will auto update the meta files and automaticlly add the sha-1 digest files for you
Dave Da illest 1 said:
..but don't even considor editing .9 button files..atleast until somebody figures out a way where it won't look funny
Click to expand...
Click to collapse
Ask and you shall receive:
Excuse me if you already knew all about this, but these files are Android 9-patch files
Nine-patch files are stretchable graphics that allow you to define regions to stretch and regions that will stay the same. This page describes them in pretty good detail.
And you can read how to use the draw9patch tool in your SDK here.
This was just a little something I ran across the other day, and just realized you guys were prob. talking about these.
Hope that helps! Can't wait to see what comes of it. Keep up the good work.
Ricky
DesignDawg

Merging Flashable ZIPs

Hey everyone, so I'm just starting to buckle down and learn more about Android Mods. Here's my latest question. I have a few zip files that I always flash on top of a new ROM. These include at the moment, a Rotary Lockscreen and the DroidX boot animation, possibly a circle battery shortly.
My question is, would there be a simple way to merge these zip files so I only have to flash one every time I load a new ROM, or even better, load these into a ROM file before flashing?
Is it as simple as opening the ZIPs, moving the files from one to the other (keeping the directory structure intact) and re-zipping the lot? Or is there something more complicated I need to look at...
Thanks in advance!
Edit: A quick look in one of the files revealed a .xml file with some references to the files to be installed. I assume I would have to edit the .xml to include all the instructions from each mod, but if that's all it takes, that should be easy... Again, I ask all of you... Am I missing something?
PSULightingGuy said:
Hey everyone, so I'm just starting to buckle down and learn more about Android Mods. Here's my latest question. I have a few zip files that I always flash on top of a new ROM. These include at the moment, a Rotary Lockscreen and the DroidX boot animation, possibly a circle battery shortly.
My question is, would there be a simple way to merge these zip files so I only have to flash one every time I load a new ROM, or even better, load these into a ROM file before flashing?
Is it as simple as opening the ZIPs, moving the files from one to the other (keeping the directory structure intact) and re-zipping the lot? Or is there something more complicated I need to look at...
Thanks in advance!
Edit: A quick look in one of the files revealed a .xml file with some references to the files to be installed. I assume I would have to edit the .xml to include all the instructions from each mod, but if that's all it takes, that should be easy... Again, I ask all of you... Am I missing something?
Click to expand...
Click to collapse
i think you need to edit the meta file and the xml file, but this can be done though.
PSULightingGuy said:
Hey everyone, so I'm just starting to buckle down and learn more about Android Mods. Here's my latest question. I have a few zip files that I always flash on top of a new ROM. These include at the moment, a Rotary Lockscreen and the DroidX boot animation, possibly a circle battery shortly.
My question is, would there be a simple way to merge these zip files so I only have to flash one every time I load a new ROM, or even better, load these into a ROM file before flashing?
Is it as simple as opening the ZIPs, moving the files from one to the other (keeping the directory structure intact) and re-zipping the lot? Or is there something more complicated I need to look at...
Thanks in advance!
Edit: A quick look in one of the files revealed a .xml file with some references to the files to be installed. I assume I would have to edit the .xml to include all the instructions from each mod, but if that's all it takes, that should be easy... Again, I ask all of you... Am I missing something?
Click to expand...
Click to collapse
what is the full name of the .xml file you see?
the recovery reads a file called update-script or updater-script inside the zip file META-INF/com/google/android/ directory. you memorize that directory path after messing with enough zip files!
that file tells the recovery what actions to take with which files. for list of very basic commands for this update-script file, i have a guide - http://forum.sdx-developers.com/android-2-1/creating-an-update-zip-list-of-commands/
it is possible to merge update.zip files but its important to understand their structure and how the commands are executed.
also signing .zip files is a whole different topic...
hopefully this helps get you going in the correct direction!
joeykrim said:
what is the full name of the .xml file you see?
the recovery reads a file called update-script or updater-script inside the zip file META-INF/com/google/android/ directory. you memorize that directory path after messing with enough zip files!
that file tells the recovery what actions to take with which files. for list of very basic commands for this update-script file, i have a guide - http://forum.sdx-developers.com/android-2-1/creating-an-update-zip-list-of-commands/
Click to expand...
Click to collapse
Since all the files have this could you copy and paste the codes inside them into one file?
Sent from my PC36100 using XDA App
chandlerw88 said:
Since all the files have this could you copy and paste the codes inside them into one file?
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
You would want to read up a little bit and make sure you understand the commands, but yes. You do not want to copy the entire set of commands, just the particular needed lines. Often you don't need to change anything because the script may just say copy this entire system directory and everything in it will go.
Sent from my PC36100 using XDA App
It's pretty basic.
Move all the files into the same zip delete everything in meta-inf except the update script.
Adjust the script accordingly, pay attention to syntax or better yet just look at all the individual scripts and put them together, then remove dupes
As for zip signing..
This is what you need
http://forum.xda-developers.com/showthread.php?t=666441
OK, thanks! This has all helped a lot and I think I nailed the basics that I was shooting for, just haven't been able to test yet since no need to re-flash a working ROM.
My next question is, would there be a way to force files INSIDE an APK? Trying to add a different battery meter (have the images) to framework-res.apk and would love to do that from a boot script... Ideas?
PSULightingGuy said:
OK, thanks! This has all helped a lot and I think I nailed the basics that I was shooting for, just haven't been able to test yet since no need to re-flash a working ROM.
My next question is, would there be a way to force files INSIDE an APK? Trying to add a different battery meter (have the images) to framework-res.apk and would love to do that from a boot script... Ideas?
Click to expand...
Click to collapse
yes, its called 7-zip and its your new best friend in this battle. heres how i learned.
i started ripping apart the things that i liked, including roms themselves. now find an update zip that has the files inside the folders that you will need to add, and you can then recycle that update zip. here it is plain and simple:
1.use 7zip to VIEW; NEVER UNZIP the files(forget about windows zips)
2.check what folder the apps you will be putting in belong in
3.put them in their corresponding folders(some apps are tricky when you need to install their libs too and you dont know it)
4.erase the 3 bottom files in your meta-inf folder
5.resign the rom
6.verify the sign(look for the new certs)
7.move to sd
8.flash rom
9.have a pop,beer, or w/e your vice.(my fave is cherry coke)
if you need help getting started feel free to pm. you dont know who i am, but ive been thru this process many times.
​
Actually, that's not quite what I'm talking about... I want a flashable zip that will add certain images (the battery meter) to the INSIDE of a .apk file that already exists on the device. Not sure if it's possible, but if so, I'd love to know... If not, I'll try pulling the .apk and using 7-zip...

Need some help

Hi all I need help I want to start building roms.But I need a good guide for themeing if any one can help me or just show me where to start that would be great ..
Thank you
Sent from my PC36100 using XDA App
There aren't any, try asking this question in the theming section and somebody might be kind enough to help you out...
Are you trying to build a rom or are you trying to theme an existing rom? if you are just trying to change the theme and arent doing any development work it will be much easier on you if you just learn how to make/edit a theme. In fact it can be relatively simple (though very very time consuming) to make your own basic theme.
To start with you will want to get your framework-res.apk file and you will want to decompile it. once you do this you will see several folders in the res folder you should see a drawable folder. this holds all your xml files. These are the actual "code" for a good part of the framework. you should see several other folders drawable-hdpi is the folder that will hold most of your images (in .png or .9.png) these can be replaced with the images you want (keep them same name and same format for .png for .9 it is not suggested that you mess witht hem till you do research and learn how specifically to edit them .once done recompile the framework-res.apk file and put it in your rom or into a flashable zip.
this will let you change a large portion of the framework theme of your phone. it takes a little practice and patients. Obviously there are many other things you an do that are much more difficult but this should get you started at least.
DO NOT EDIT .9s IF YOU DON'T KNOW HOW YET!!
Stick to regular pngs as a starting point.
When decompiling existing themes I have seen them throw errors left and right because of badly edited .9s. These errors won't allow the framework to recompile correctly.
Grab some themes you want to play with and pull the drawable-hdpi folders out of the apk then mix and match the images you want into the apk you are going to use.
Once you get an idea of which images change what in the system then you can start looking at editing .9s. When you get to that point you will see just how amazing it is that themes even work with badly compiled .9s.
I know first hand. I literally had to fix .9 pngs in an entire theme just to be able to edit the xmls myself and have it recompile.
very true i dont sugest editing .9s unless you know how. Most basic icon changes can be made without editing them however if you mess them up it can be a huge pain to get the theme going. Another tip always make a back up of your default untouched framework. this can help save you if you mess something up and need to replace the files.
omegasun18 said:
very true i dont sugest editing .9s unless you know how. Most basic icon changes can be made without editing them however if you mess them up it can be a huge pain to get the theme going. Another tip always make a back up of your default untouched framework. this can help save you if you mess something up and need to replace the files.
Click to expand...
Click to collapse
Another good suggestion.
To add to this, op you should learn to use adb.
It will save you ALOT of time when testing the icon changes.
Instead of having to make a flashable zip file, when you learn adb you can push the one file you are testing and if it bootloops your device guess what, just adb push the original back and your system will boot again.
This prevents you from having to nand restore everytime you boot loop your device.
At this point, the only thing I flash via zips are full roms (mine at least). Everything else I either adb push/pull or fastboot flash it.
Thanks for all your help...I will try to figure this thing out

[Q] Noob question will probably get flamed

ok so i tried readin the guides and i have to say i was completely lost. might be cuz i havnt gotten any rest in a while but anyways i was looing for a way to be able to combine 2 themes. i really like the status bar icons on one theme like the bluetooth and wifi however i like everythig else from the other one also one is using launcher pro the other one tw launcher. would like to keep the one with launcher pro and just changethe top icons that always show. if i missed something please let me know any help would be greatly appreciated
Make a copy of the original themes to fall back on first.
What you have to do is open up the zip files of the themes. Extract the res folders from each themes framework-res.apk. Obviously you will have to rename one of them to something like res1 or put it in another place. Once you have the two folders extracted make the launcherpro one your base. Copy the images that you want to keep from the other theme (probably located in drawable-hdpi or drawable-hdpi-v4) and paste them into the same folder of the launcherpro theme and overwrite them. Once you have everything copied the way you want it open the framework-res.apk of the launcherpro theme. Go to the res folder and remove whatever folder you are adding back in (drawable.hdpi for example). Now drag the launcherpro folder that you made all of the changes to (drawable.hdpi or whatever) into the res folder of framework-res.apk. If you took the framework-res.apk file out of the zip file to begin with you have to also add it back into the themes zip file. Otherwise you just put the zip back on the phone and flash. It is always a good idea to put the original theme zip file on the phone also just in case something goes wrong you can just reflash the original theme and start over. If you need any additional help let us know.
^^^What he said
What you're really trying to do is essentially to create your own theme. If those instructions seem overwhelming or dont work, go to the top of this forum and start reading up on theming. Its a fairly simple concept but you might want to familiarize yourself with what it is exactly that you are doing. Everything visual on the phone is stored in image files, you're just swapping out the images. Maybe you'll get inspired and create something totally new that you can share with the community.
I tried reading theming on the top but I guess all that info at once was kind of overwhelming at the moment I was almost dead asleep however the info here seems more direct to the point so ill go ahead and see if I have time to mess with it today. I might also need to install gimp because I only saw like 1 or 2 image files when I opened up the zips with 7zip. Thanks for the help guys ill go ahead and give an update when I'm done maybe post some screen shots
jsredlineracer said:
I tried reading theming on the top but I guess all that info at once was kind of overwhelming at the moment I was almost dead asleep however the info here seems more direct to the point so ill go ahead and see if I have time to mess with it today. I might also need to install gimp because I only saw like 1 or 2 image files when I opened up the zips with 7zip. Thanks for the help guys ill go ahead and give an update when I'm done maybe post some screen shots
Click to expand...
Click to collapse
You will only need gimp if you are editing images. Make sure you are looking in the right directory. You should see a ton of png files. The bulk of the images are located in drawable-hdpi (the native folder) or drawable-hdpi-v4 (some themes have this folder instead). The only tool you need for moving images from one theme to the other is a zip program. I haven't used 7zip but maybe it didn't extract all of the files. I use winrar myself. Let us know how it works out.
OK I made a really quick video. Nothing fancy but puts a visual to the text I wrote. Hope it helps.
Well here are the screenies. Thanks for the help. And also thanks to those who created the original themesblue one is after changes
Sent from my SPH-D700 using XDA App
sorry was having some issues. i couldnt upload pics from my phone
Sent from my SPH-D700 using XDA App

[Q] framework decompile help.

Not sure if this is the right spot or should actually go in development or here since I got lectured for putting it in development the last time.
But what I am trying to do is decompile the framework file from the stock rom and change a xml and recompile so as to bypass the tetheringprovison call.
The last time I did this on the HTC One S I ran into the trouble that the recompiled verision didn't work and ended up just opening the recompiled apk as a zip pulling the xml and replacing it in the original apk and load that.
That seemed to do the trick on that phone.
I think the problem is with compression as the output apk I get after recompiling is never even close to the original size.
I am having the same issue when it comes to the file for the gs3.
So far I haven't tested a recompiled one yet since I haven't rooted yet but just working on the file.
That is a job for a little later on my days off where I don't need my phone.
But with this one the file I am looking for once it is decompiled shows in res/values/arrays.xml for this one. How ever if I open either the source file or the recompiled when I don't see those values folders anywhere inside.
I am not sure if they are just hidden in something else or where the other files are.
I am using the newest verision of apk multi tool to recompiling and decompiling with compression values tested at 1 and 0.
both the framework-res.apk and twframework files are loaded into it as well as dependencies.
Any ideas on the best way of changing out this one file?
Or if anyone can recompile one with the following arrays.xml file instead that I have attached.
When it is decompiled it does show the right folder string "\res\values" and the array.xml inside I have just made a change to the xml that would not check the tethering provision on the device to allow the built in tether to work again. and a recompiled verision with that file will bypass any tethering check
any help would be greatly appreciated.
*edited* to include the arrays xml
Anything found in the "values" directory are not going to be visible inside the apk they are files used to build the actual apk that tells the other XML and other files where things are. Compression won't break an apk. What exact file are you editing? Also you are going to have to root if you want to put the modded file back on the device..
Sent from my SGH-T999 using Tapatalk 2
Yeah will be rooton on day off so i dont have to worry about it too much.
But with the arrays file that has a call in it to consult a different program before starting tethering.
I have changed that file so it dont check anymore.
This worked on it before with it just unlocked and a different apn update came and dont work anymore.
I am just confused that why it recompiled before for the one and wouldnt work right.
Based on what i read should be no problem as long as both frameworks are installed to the apk multitool
M9x3mos said:
Yeah will be rooton on day off so i dont have to worry about it too much.
But with the arrays file that has a call in it to consult a different program before starting tethering.
I have changed that file so it dont check anymore.
This worked on it before with it just unlocked and a different apn update came and dont work anymore.
I am just confused that why it recompiled before for the one and wouldnt work right.
Based on what i read should be no problem as long as both frameworks are installed to the apk multitool
Click to expand...
Click to collapse
I decompile framework-res.apk all the time with no issues. What is the exact issue you're having?
Sent from my SGH-T999 using Tapatalk 2
Just that when I decompile the framework-res.apk replace one xml file and recompile it using the multitool (am using the system apk with dependancies and linking the twframework) and then try and load it on the phone it seems to cause it to crash.
M9x3mos said:
Just that when I decompile the framework-res.apk replace one xml file and recompile it using the multitool (am using the system apk with dependancies and linking the twframework) and then try and load it on the phone it seems to cause it to crash.
Click to expand...
Click to collapse
You cannot replace XML files with other XML files. You have to open the XML in notepad++ and edit the actual lines of code then recompile. And I thought you weren't rooted so how are you able to push the app back to the device? Also, are you setting correct permissions for the newly compiled apk?
Sent from my SGH-T999 using Tapatalk 2
Yeah sorry for the late reply.
I am still tinkering with it. I wanted to root just till I had a day off that it wouldn't kill me to have the phone down for a little.
I will be rooting it in the next day or two since I am off.
After recompiling the APK and pulling the XML out of that one and putting in the original was the only way I could get the change to take on the One S.
When I was testing then, and will try the same procedure with the GS3, is after recompiling it with the tool I would put on sd card then using twrp copy to the phone and chmod 644
Out of curiosity what would be the DD command for backing up the recovery to the sd card?
I am having trouble finding that.
I would like to have that to flash back on the phone as I am planning to try this again from within twrp and see what happens.
From my understanding for triangle away to work you need to be on stock recovery right?
Ok
Now I have a new problem I have stumbled upon.
I have modded the file but when I try and push it with ADB from the pc even after system mounted it tells me that permission is denied.
Any ideas why that is happening?
Tried copying over with root explorer and that froze during copy and then resulted I'm a boot loop.
Not sure if that was because of the method or a problem with the file I made.
When decompiling does that need to be done with the twframework dependence or just simple decompile?
Also then after switching the arrays.xml I can just recompile with no compression or do I have to do something with keeping files.
Since the arrays is in something else I'm not sure what it shouldn't keep.
Any ideas would be greatly appreciated.
And I can't find if should either be zipaligned or signed. Some articles say signed some say don't sign system apks
Holy crap... youre allllllllllll over the place one bite at a time.. Quick answers first:
You do not need to backup your recovery. It is flashable via Odin and is much safer to flash via odin then it is using DD. With DD, you could flash the wrong partition by a simple slip of a keystroke. IE you typed '9' instead of '0'
Secondly: You got that 'freeze' issue using Root Explorer because framework-res.apk is constantly in use by the system. The BEST way to apply any system file is by creating a flashable zip file then applying it through recovery.
Thirdly: You do NOT need stock recovery to use Triangle Away, ive used it twice now with CWM as my recovery.
About your issues with decompiling recompiling.. I dont think its necessary to install the twframework... i dont recall if i had to when i was on Frosty, but doing "java -jar apktool.jar if <twframework here>" wouldnt hurt.
Also what exactly are you trying to modify?
Yeah Sorry about that
was just as I was reading other things and playing with it I kept coming across other questions.
Was thinking about that with the recovery so I am just going to skip doing that and flash a custom one then.
Was trying to do it without switching to avoid tripping the counter but seems like that is un neesicary
I am looking to stay on the stock software of the phone but want to edit the arrays file out of the framework so it don't check for tethering provisions.
Previously I was able to tether just by changing the APNs on the device now I can't do that. Says I don't have a tmo tathering plan. But also not with T-Mobile so that is problematic.
M9x3mos said:
Yeah Sorry about that
was just as I was reading other things and playing with it I kept coming across other questions.
Was thinking about that with the recovery so I am just going to skip doing that and flash a custom one then.
Was trying to do it without switching to avoid tripping the counter but seems like that is un neesicary
I am looking to stay on the stock software of the phone but want to edit the arrays file out of the framework so it don't check for tethering provisions.
Previously I was able to tether just by changing the APNs on the device now I can't do that. Says I don't have a tmo tathering plan. But also not with T-Mobile so that is problematic.
Click to expand...
Click to collapse
Quick question, are you running Stock Jellybean? And who is your carrier? There was a hacked apk that enabled tethering.. not sure what its called. just read about it. Never tried/downloaded it.
i got this to work last night for frosty 11.2.1, AllenD87 over at the att forums helped me get it right.
I have the stock jellybean on tmo device and use with simple mobile service
Just checked out the other one hack/mod that was looking like the same kind of mod where made changes to the framework and put it back.
different firmware so I don't that I should try that on mine.
i just decompiled framework-res.apk made the changes and recompiled. put it in the rom and flashed the whole rom.
Trying to keep the absolute stock rom.
I just installed twrp since it has file manager so I don't need to make a flashable zip but just copy over and chmod 0644
first attempt gave me a boot hang so I am going to try compiling with a different tool
Ok found out the problem was the multi tool inwas using
Used the beta instead and everything worked ok

Categories

Resources