[Q] Able to de and re compile framework-res.apk? - T-Mobile Samsung Galaxy S 4

I was just wondering if anyone with the UAMDL software has been able to decompile and recompile the framework on here yet.
I have tried with the APK multi tool and the decompile works fine but when I try to recompile it errors our right away.
Anyone have any luck with this?
If so what tool did you use?

Yes I have.
Sent from my SGH-M919 using Tapatalk 2

I'd like to know this as well, and how people have been successful. I haven't had any luck installing framework-res.apk or recompiling a modified app. From my understanding, it's an issue with apktool and aapt that needs to be updated.

TheArtiszan said:
I was just wondering if anyone with the UAMDL software has been able to decompile and recompile the framework on here yet.
I have tried with the APK multi tool and the decompile works fine but when I try to recompile it errors our right away.
Anyone have any luck with this?
If so what tool did you use?
Click to expand...
Click to collapse
That and SystemUI.apk are both missing files needed for them to decompile and recompile right
evil..............out

elesbb said:
Yes I have.
Sent from my SGH-M919 using Tapatalk 2
Click to expand...
Click to collapse
Can you elaborate on what tools you used and how to set it up please?
I have been stuck trying to get this to work for over a week now.
Sent using xda premium.

evil1art said:
That and SystemUI.apk are both missing files needed for them to decompile and recompile right
evil..............out
Click to expand...
Click to collapse
There are ways for making it work though
TheArtiszan said:
Can you elaborate on what tools you used and how to set it up please?
I have been stuck trying to get this to work for over a week now.
Sent using xda premium.
Click to expand...
Click to collapse
I used the tool in my signature and you have to remove some layout paramaters in the xml files then recompile and copy the originals over to the newly compiled apk.

elesbb said:
There are ways for making it work though
I used the tool in my signature and you have to remove some layout paramaters in the xml files then recompile and copy the originals over to the newly compiled apk.
Click to expand...
Click to collapse
Im the one who figured out the missing style for the systemui
evil..............out

evil1art said:
Im the one who figured out the missing style for the systemui
evil..............out
Click to expand...
Click to collapse
Yeah so did I lol. Ive ran into that issue before and thats all you have to do to get around it.

elesbb said:
There are ways for making it work though
I used the tool in my signature and you have to remove some layout paramaters in the xml files then recompile and copy the originals over to the newly compiled apk.
Click to expand...
Click to collapse
We have our own modified apk manger works good
evil..............out

evil1art said:
We have our own modified apk manger works good
evil..............out
Click to expand...
Click to collapse
Ahhh. That makes life a lot easier lol. How did you modify it? Build it from source or edit the jar file?

elesbb said:
Ahhh. That makes life a lot easier lol. How did you modify it? Build it from source or edit the jar file?
Click to expand...
Click to collapse
Modified the original files and changed memory heap etc
evil..............out

Oh okay that makes sense.
I am editing the framework res apk
Making changes only to the arrays.xml file in the values folder.
Which styles should I be commenting out and then which file should I copy to the original?
I tried putting a + in front of a few lines based on the errors I was getting but that seemed to make it worse.
Sent using xda premium.

I think the arrays and other values xml get compiled into the resources file no?
Sent using xda premium.

TheArtiszan said:
I think the arrays and other values xml get compiled into the resources file no?
Sent using xda premium.
Click to expand...
Click to collapse
Everything in the values directory is found in your resources.arsc file in the apk.
Sent from my SGH-M919 using Tapatalk 2

Ah that makes sense.
The changes made for layouts, does that go into the same area though?
Just wondering if that might cause a problem since that is what I would want to move over.
Sent from my HTC VLE_U using xda premium

That is odd.
I can get this to decompile in apk multi tool but not Elesbb's GUI
I get the following error:
Tue 06/25/2013
0:46:56.39
Decompiling.. "C:\Users\Bill\APK GUI\framework-res.apk"
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x010802f4 drawable/ic_ab_back_holo_dark, config=-hdpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:197)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:166)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:131)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:106)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:390)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:56)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:48)
at brut.androlib.Androlib.getResTable(Androlib.java:48)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:166)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:99)
at brut.apktool.Main.cmdDecode(Main.java:131)
at brut.apktool.Main.main(Main.java:68)
-----------------------------------------------------------------
Did I miss something.

Made some progress and decompiling ok now on a different computer.
If I add the + before the layouts would that cause operation issues?

I would like to know too.
Still having trouble.
What did you do too decompile?

Okay I can now get it to recompile adding the +layout to the xml files that were erroring in the compile log and only other change was made was to the arrays.xml file to enable bluetooth tethering like on the GS3 did.
however when I push it to the phone and chmod and try it I get a boot loop.
Did I do something wrong?
Am I supposed to copy out the resource.asrc from the file I compiled like a zip then add it to the original that I pulled using 7zip or something?
Any input would be greatly appreciated.

TheArtiszan said:
Okay I can now get it to recompile adding the +layout to the xml files that were erroring in the compile log and only other change was made was to the arrays.xml file to enable bluetooth tethering like on the GS3 did.
however when I push it to the phone and chmod and try it I get a boot loop.
Did I do something wrong?
Am I supposed to copy out the resource.asrc from the file I compiled like a zip then add it to the original that I pulled using 7zip or something?
Any input would be greatly appreciated.
Click to expand...
Click to collapse
Move the AndroidManifest.xml and Meta-INF folder from the original apk to the modified one.
Sent from my SGH-M919 using xda premium

Related

[Q] adding battery % mod to existing theme

I've been reading the theme guides and, time permitting, would like to start playing around. I've been comparing files from the stock theme template to crakes battery percent mod found here: http://forum.xda-developers.com/showthread.php?t=793805&highlight=battery+mod and have been trying to figure out how to use it in another theme. Is it as simple as adding the extra stat_sys_battery_#.png's or does something else have to be done to the framework-res.apk to get the phone to point to the added pngs? I hope thats understandable, thanks in advance for your help all!
amosher13 said:
I've been reading the theme guides and, time permitting, would like to start playing around. I've been comparing files from the stock theme template to crakes battery percent mod found here: http://forum.xda-developers.com/showthread.php?t=793805&highlight=battery+mod and have been trying to figure out how to use it in another theme. Is it as simple as adding the extra stat_sys_battery_#.png's or does something else have to be done to the framework-res.apk to get the phone to point to the added pngs? I hope thats understandable, thanks in advance for your help all!
Click to expand...
Click to collapse
If your theme has 1% intervals already its just a matter of swapping the png files. If the theme don't your gonna have to devompile the apk and edit 3 xml files then recompile
Sent from my SPH-D700 using XDA App
okay, ya thats what i was wondering. any help on the xml files to edit and how? i've got apk manager and have it decompiled, i dont see anything that jumps out.
EDIT: okay i've got in the drawable folder stat_sys_battery, stat_sys_battery_charge, stat_sys_battery_charge_err_vinsq, stat_sys_battery_charge_vinsq, stat_sys_battery_vinsq. my guess is its 3 of those, i guess i can just compare the stock theme with the stock battery mod to see what to do.
amosher13 said:
okay, ya thats what i was wondering. any help on the xml files to edit and how? i've got apk manager and have it decompiled, i dont see anything that jumps out.
EDIT: okay i've got in the drawable folder stat_sys_battery, stat_sys_battery_charge, stat_sys_battery_charge_err_vinsq, stat_sys_battery_charge_vinsq, stat_sys_battery_vinsq. my guess is its 3 of those, i guess i can just compare the stock theme with the stock battery mod to see what to do.
Click to expand...
Click to collapse
You can do that but do you know how to add a line to an xml file
Sent from my SPH-D700 using XDA App
mysteryemotionz said:
You can do that but do you know how to add a line to an xml file
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
in general, yes, but i may not know how for these purposes. what might i be missing?
There's an even easier way.
start adb
and type adb pull /system/framework/framework-res.apk framework-res.apk
(grab frameworkTW-res.apk*i think* if you want it for touchwiz instead)
Next
go here UOT Kitchen
select flashable .zip
go through the stuff
upload the framework-res.apk you just pulled.
wait a bit download package and move to sd card then browse and install it and reboot.
TADA!
art3mis-nyc said:
There's an even easier way.
start adb
and type adb pull /system/framework/framework-res.apk framework-res.apk
(grab frameworkTW-res.apk*i think* if you want it for touchwiz instead)
Next
go here UOT Kitchen
select flashable .zip
go through the stuff
upload the framework-res.apk you just pulled.
wait a bit download package and move to sd card then browse and install it and reboot.
TADA!
Click to expand...
Click to collapse
very interesting, i'll certainly check that out. though i am interested also in learning how to do it myself, but that looks pretty cool!
art3mis-nyc said:
There's an even easier way.
start adb
and type adb pull /system/framework/framework-res.apk framework-res.apk
(grab frameworkTW-res.apk*i think* if you want it for touchwiz instead)
Next
go here UOT Kitchen
select flashable .zip
go through the stuff
upload the framework-res.apk you just pulled.
wait a bit download package and move to sd card then browse and install it and reboot.
TADA!
Click to expand...
Click to collapse
Thee problem with this is if there's any edited .9 pngs in the theme the out come is ****
Sent from my SPH-D700 using XDA App
mysteryemotionz said:
Thee problem with this is if there's any edited .9 pngs in the theme the out come is ****
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
so how about this: i pull the xmls from crakes framework-res.apk (do i need anything from twframework-res.apk?), recompile into the framework-res.apk from the theme i'm hacking, then dump the pngs into drawable-hdpi from the % mod i want to include and just make sure theres an image for each line in the xmls. sound good?
amosher13 said:
so how about this: i pull the xmls from crakes framework-res.apk (do i need anything from twframework-res.apk?), recompile into the framework-res.apk from the theme i'm hacking, then dump the pngs into drawable-hdpi from the % mod i want to include and just make sure theres an image for each line in the xmls. sound good?
Click to expand...
Click to collapse
Sounds great but just remember if your theme has any edited .9.pngs you will get errors with the framework.
What there are you trying to edit?
Sent from my SPH-D700 using XDA App
mysteryemotionz said:
Sounds great but just remember if your theme has any edited .9.pngs you will get errors with the framework.
What there are you trying to edit?
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
basically i want to work in a battery % mod into the theme from AOSP Magic (partially just to see if i can do it ). when you say "has any edited .9.pngs" do you mean if i edit any? or if the theme contains any that are already edited.
amosher13 said:
basically i want to work in a battery % mod into the theme from AOSP Magic (partially just to see if i can do it ). when you say "has any edited .9.pngs" do you mean if i edit any? or if the theme contains any that are already edited.
Click to expand...
Click to collapse
If the theme has any edited already out if you edited any
Sent from my SPH-D700 using XDA App
mysteryemotionz said:
If the theme has any edited already out if you edited any
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
ya i'm a little confused at that point on how i'd handle that. anywhere i can read up on that?
so basically if the theme i want to mod has .9.pngs that were edited from stock, when i decompile and recompile with the new xmls its going to break something? if so, what would i do? use the battery % mod theme and dump the drawable-hdpi folder into the apk after?
amosher13 said:
ya i'm a little confused at that point on how i'd handle that. anywhere i can read up on that?
so basically if the theme i want to mod has .9.pngs that were edited from stock, when i decompile and recompile with the new xmls its going to break something? if so, what would i do? use the battery % mod theme and dump the drawable-hdpi folder into the apk after?
Click to expand...
Click to collapse
What I do is modify the xml files ona stock framework. Make all the changes I need then recompile. Once compiled its a matter of dragging and dropping the pngs
Sent from my SPH-D700 using XDA App
mysteryemotionz said:
What I do is modify the xml files ona stock framework. Make all the changes I need then recompile. Once compiled its a matter of dragging and dropping the pngs
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
gotcha, perfect thanks!

Recompile Question

Ok so I used http://forum.xda-developers.com/showthread.php?t=882742 to upack / uncompile my framework-res. I then made my changes to the xml's that I wanted to edit. I then used the same program to repack them but it does not recompress them for some reason. I tried to use apkmanager but found it very confusing to use it to recompile and could never get it to work correctly. Any help would be appreciated.
With apkmanager after you make your edits you choose 11 to recompile, answer yes and yes, go to the keep folder that it creates and delete everything you edited. You will get a unsigned.apk.
Sent from my ADR6300 using XDA App
Hatman41 said:
Ok so I used http://forum.xda-developers.com/showthread.php?t=882742 to upack / uncompile my framework-res. I then made my changes to the xml's that I wanted to edit. I then used the same program to repack them but it does not recompress them for some reason. I tried to use apkmanager but found it very confusing to use it to recompile and could never get it to work correctly. Any help would be appreciated.
Click to expand...
Click to collapse
if you use apk manager and make xml edits make sure you delete the resources arsa also
newtoroot said:
if you use apk manager and make xml edits make sure you delete the resources arsa also
Click to expand...
Click to collapse
Thanks for the reply but I still find apkmanager very confusing to use to recompile.

[Q] Modifying xmls

I am interested in changing the color of the text of the status bar. I have already modified all the images I need, now just need to modify the xml.
I am modifying the framework-res.apk colors xml. After I have made the change I recompile the apk. Switch out the Meta-INF and AndroidManifest.xml with the ones from the original apk but when I push to my phone the color of the status bar text isn't changing. These are the lines I have changed:
<color name="status_bar_text">#ff73cd68</color>
<color name="status_bar_clock_text">#ff73cd68</color>
You might find better luck actually pming a themer or posting it in the theme section. Not much Turner's drop by here
Sent from my SPH-D710 using XDA App
davidc23 said:
You might find better luck actually pming a themer or posting it in the theme section. Not much Turner's drop by here
Sent from my SPH-D710 using XDA App
Click to expand...
Click to collapse
yeah I was thinking that, I might just check on the irc channel. Thanks for looking out.
Hmmm did you reboot the phone?
Sent from my Epic™ 4G Touch
globalninja said:
Hmmm did you reboot the phone?
Sent from my Epic™ 4G Touch
Click to expand...
Click to collapse
Yeah, I didn't actually push the framework. I created a flashable zip.
dtm_stretch said:
Yeah, I didn't actually push the framework. I created a flashable zip.
Click to expand...
Click to collapse
If you got the framework-res.apk to recompile without errors then the changes you made should definitely work. There is no need to sawp anything owhen recompiling, just edit the xml, recompile it as a system app and push it to system/app via root explorer or any equivalent.
Which ROM framework are you trying to modify?
fnut6969 said:
If you got the framework-res.apk to recompile without errors then the changes you made should definitely work. There is no need to sawp anything owhen recompiling, just edit the xml, recompile it as a system app and push it to system/app via root explorer or any equivalent.
Which ROM framework are you trying to modify?
Click to expand...
Click to collapse
Thanks ill give that I try.
I am actually modifying the ICS theme for Cakulin's rom.
**Doesn't seem to work either. I should be changing the colors.xml in the framework-res.apk right?
Got it: Make sure to delete the stupid resources.arsc!
dtm_stretch said:
Thanks ill give that I try.
I am actually modifying the ICS theme for Cakulin's rom.
**Doesn't seem to work either. I should be changing the colors.xml in the framework-res.apk right?
Click to expand...
Click to collapse
Yes, and although you won't find the values folder when you recompile you'll still need to delete the resources.arsc when recompiling, if you'd like, you can attach the framework-res.apk you're trying to modify and I can change it for you.
I also, stated inadvertently, to place it in system/app that is incorrect it goes in system/framework which may actually be part of the problem.
fnut6969 said:
Yes, and although you won't find the values folder when you recompile you'll still need to delete the resources.arsc when recompiling, if you'd like, you can attach the framework-res.apk you're trying to modify and I can change it for you.
I also, stated inadvertently, to place it in system/app that is incorrect it goes in system/framework which may actually be part of the problem.
Click to expand...
Click to collapse
I got it figured out, just before you posted about the resources. Now I just got to figure out why my launcher keeps restarting.

[Q] Edited framework-res.apk

Can anyone edit a framework-res.apk with no mods other than adding the crt animation? I've found guides on how to edit the bools file in the res/values filder inside the apk, but I can't get it to recompile the apk correctly. Can someone tell me how or send me an edited apk or something?
If you want to post your framework file, I'll do it for you and send it back.
I just posted several of these for Caulkulin's 3.0 rom. What are you using now? His framework, but with a stock battery look.
Sent from my SPH-D710 using XDA
kyamora said:
Can anyone edit a framework-res.apk with no mods other than adding the crt animation? I've found guides on how to edit the bools file in the res/values filder inside the apk, but I can't get it to recompile the apk correctly. Can someone tell me how or send me an edited apk or something?
Click to expand...
Click to collapse
You need to check the error and see whats wrong with the framework file. Also you just want a stock framework file with crt on? Also what are you using to compile and decompile
playya said:
You need to check the error and see whats wrong with the framework file. Also you just want a stock framework file with crt on? Also what are you using to compile and decompile
Click to expand...
Click to collapse
I was using apk manager 4.9, and I have no idea how to read the log.
I attached my framework-res. It's stock from FD19, I probably should have specified.
If no one gets to it, I'll mod it when I get home.
Sent from my SPH-D710 using xda premium
All done. I tested on my phone. After I replaced the apk, I had to manually restart the phone for it to work. I placed your apk in a zip file before I uploaded, so make sure you unzip your apk before putting it back on your phone.
Thank you so much, it works very well.
Now I'd just like to know how you did it. Coming from a clean computer with nothing installed, what would I need to decompile an apk, edit it, and compile it again? I'm trying to get a handle on the whole thing to do some development myself.
Try and upgrade to Apk Manager 5.02 since I just de-compiled and then compiled your apk file without an issue. Also try and update everything associated with it like your java... But it seems quite fine to me
Edit: just tried yours again as well as removing animation I lowered autobrightness which is something I do on all my roms for better battery life.. Try that mod next
playya said:
Try and upgrade to Apk Manager 5.02 since I just de-compiled and then compiled your apk file without an issue. Also try and update everything associated with it like your java... But it seems quite fine to me
Edit: just tried yours again as well as removing animation I lowered autobrightness which is something I do on all my roms for better battery life.. Try that mod next
Click to expand...
Click to collapse
Do I have to do anything to set it up or is it good to go from install? Should I restart my computer?
Also where can I find 5.02? I had a lot of trouble finding 4.9 in the first place.
I've never used apk manager, so I'll check that out also. I used apktool to mod your framework along with all the java runtime files it needed to work.
Sent from my SPH-D710 using xda premium
&roid said:
I've never used apk manager, so I'll check that out also. I used apktool to mod your framework along with all the java runtime files it needed to work.
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
Apktool confused me so I used apk manager. I can't figure out how to get apktool to work. Do you have a link to a good guide or anything?
There are some good ones on xda. I'll link you one when I get home.
Sent from my SPH-D710 using xda premium
I was apparently using the gingerbread method for an ICS build. Would that have kept it from compiling correctly?
kyamora said:
I was apparently using the gingerbread method for an ICS build. Would that have kept it from compiling correctly?
Click to expand...
Click to collapse
YES
&roid said:
YES
Click to expand...
Click to collapse
Haha, at least I'm learning.
To be fair, no one specified. Thanks for all the help guys.
Hi. Any help me to on crt effect in this framework ? I try apk menager and apk edit, and always some problem when compile, program loop and only exit work
http://db.tt/W2DKqulN

[Help] [Pro] Help me to edit settings.apk (decompile & compile) correctly

I installed all apk found under system/framework with apktool.
*framework-res.apk & another apk
Then decompiled Settings.apk of Xperia pro stock ics Rom.
After that ,without making any change I compiled the apk. Then I surprisingly noticed that the size compiled apk is 1/3 of original stock settings.apk .
Then I flashed the apk using cwm to my phone to test if it work .after flashing, the setting icon is invisible in launcher menu !
Plz anybody tech me how decompile and re compile stock settings.apk of Xperia pro properly..
----------------****---------------
I'm noob. Help me to be great like U
shouvo said:
I installed all apk found under system/framework with apktool.
*framework-res.apk & another apk
Plz anybody tech me how decompile and re compile stock settings.apk of Xperia pro properly..
----------------****---------------
I'm noob. Help me to be great like U
Click to expand...
Click to collapse
take a look here
cosmyndemeter said:
take a look here
Click to expand...
Click to collapse
On that post I found something like this
"2-STEP hope u guys know how to decompile iam not going to explain it so decompile the settings.apk (make sure u set the compression level 128mb)"
Then explain me how set compression level in apktool??
Sent from my MK16i using xda premium
I know how to decompile and compile. Also know how to mod....but main problem Is ,after re compile, settings.apk's size is decreased...why it's happening !?
Sent from my MK16i using xda premium
shouvo said:
I know how to decompile and compile. Also know how to mod....but main problem Is ,after re compile, settings.apk's size is decreased...why it's happening !?
Sent from my MK16i using xda premium
Click to expand...
Click to collapse
size depends on apktool aapt or other files. ıts not so important. if you truly decompiled and recompiled. Be sure on resources.arsc's compression method is STORE. Generally that causes this problem. run 2 apps (original and unsigned) with winrar. move edited xmls from unsigned to signed with normal compression. Move icons(if you added or changed) with STORE method and finally move resources.arsc with STORE method.
Erhany said:
size depends on apktool aapt or other files. ıts not so important. if you truly decompiled and recompiled. Be sure on resources.arsc's compression method is STORE. Generally that causes this problem. run 2 apps (original and unsigned) with winrar. move edited xmls from unsigned to signed with normal compression. Move icons(if you added or changed) with STORE method and finally move resources.arsc with STORE method.
Click to expand...
Click to collapse
"Be sure on resources.arsc's compression method is STORE. " how can i set it to STORE ??
Sent from my MK16i using xda premium
shouvo said:
"Be sure on resources.arsc's compression method is STORE. " how can i set it to STORE ??
Sent from my MK16i using xda premium
Click to expand...
Click to collapse
as I told you, open 2 apks with winrar. drag& drop resources arsc from unsigned.apk to original.apk, a screen will appear, Check compressin method on left center( generally writes NORMAL) change it to STORE and select OK for copying. thats all
Erhany said:
as I told you, open 2 apks with winrar. drag& drop resources arsc from unsigned.apk to original.apk, a screen will appear, Check compressin method on left center( generally writes NORMAL) change it to STORE and select OK for copying. thats all
Click to expand...
Click to collapse
thanks dude...it worked just like a charm
Sent from my MK16i using xda premium
shouvo said:
thanks dude...it worked just like a charm
Sent from my MK16i using xda premium
Click to expand...
Click to collapse
You r welcom. Im glad

Categories

Resources