Decompiling SystemUI.apk problem - Galaxy Tab 10.1 Q&A, Help & Troubleshooting

I've been trying to decompile SystemUI to mod a couple xml's. Whenever I try with apkmanager I get errors. I know there's some trick to get this to work with framework. Can anyone help a noob out?

tallgrasshawk said:
I've been trying to decompile SystemUI to mod a couple xml's. Whenever I try with apkmanager I get errors. I know there's some trick to get this to work with framework. Can anyone help a noob out?
Click to expand...
Click to collapse
its better to bring the error log here, its located in apk manager directory log.txt

When at the PC I will zip up my apktool and run you through what I do
---------- Post added at 05:08 AM ---------- Previous post was at 04:53 AM ----------
Here is my APKtool folder (I doubt it matters but I keep it in the C drive) C:\apktool
http://dl.dropbox.com/u/22063477/apktool.zip
1. apktool if framework-res.apk (this is the stock framework from whatever rom you are working on)
2. apktool d -f SystemUI.apk (seem to have better luck with using the force command)
3. make your edits
4. apktool b -f SystemUI SystemUIedit.apk
5. clap with glee that after bashing your head into a wall like I have been you can now edit XML's
6. now come help me fix some things in my themes

Don't you also have to install the twframework as well?

tallgrasshawk said:
Don't you also have to install the twframework as well?
Click to expand...
Click to collapse
I didnt have to but may want to avoid some of the phantom file missing errors

Hmm. I get the res folder decompiled but I still get a smali folder as well. And looking at the xml's I think I'm getting in over my head.

tallgrasshawk said:
Hmm. I get the res folder decompiled but I still get a smali folder as well. And looking at the xml's I think I'm getting in over my head.
Click to expand...
Click to collapse
here is what I did and it seemed to help me get teh basic understanding (changing clock color etc)
there is a app called CSDiff you can use it to compare diff in a folder, so I decompiled two SystemUI's one stock one themed and then took a look at what changed in the XML then can test and recompile. has worked ok for me so far lol

Thanks for the help boosted. I think I got the color figured out. Do you know how to change the font as well? I don't really see that in the xml anywhere.

tallgrasshawk said:
Thanks for the help boosted. I think I got the color figured out. Do you know how to change the font as well? I don't really see that in the xml anywhere.
Click to expand...
Click to collapse
this gave me a headache more than helped but may help you out a bit..
http://www.xoomforums.com/forum/mot...guide-xml-breakout-themeing-full-details.html

Hey boosted, have you seen this version of apktool? It allows the decompiling of SystemUI, etc. with no problem. Rename current apktool.jar and name this new one apktool.jar and put it into APKmanager's "other" folder.

Comment deleted

Related

Need Help

Posted it here because i need a dev.
I pulled my Framework-res.apk and modified all the icons for everything. I decompiled using apktool.
My question is what steps do i take now (do i need to sign it, what a good tool to recompile it as apktool does and gives me a framework-res.apk but caused my phone not to boot up)..also someone said seomthing about resources.arsc or something..not sure where to go...thanks for your help.
Open ur new apk using 7zip (righr click>7zip>open archive) and do the same with ur old one. Delete the resources.xxxx(i dont know the name by heart lol) and drag and drop the one (by one i meant the resources.xxxx file) from the new zip to the old zip and adb push ur old frameworkres apk and reboot
Sent from my PG86100 using XDA App
kpkimmel said:
Posted it here because i need a dev.
I pulled my Framework-res.apk and modified all the icons for everything. I decompiled using apktool.
My question is what steps do i take now (do i need to sign it, what a good tool to recompile it as apktool does and gives me a framework-res.apk but caused my phone not to boot up)..also someone said seomthing about resources.arsc or something..not sure where to go...thanks for your help.
Click to expand...
Click to collapse
sounds more like a question. Use apk manager and or 7zip
how does just that one file carry over all the new pics and stuff i changed...
edited......
What exactly have you edited? If you just change non patch9 images... then you can just drag and drop the new images into the apk (may have to rename apk to zip).
If they are patch9's... you need to..
decompile framework-res.apk (apktool d framework-res.apk)
swap out images
recompile (apktool b framework-res)
Now take the newly compiled apk (in the /dist folder). Open it up and take the edited images (only the ones you need changed) and put them into your original apk.
No need to resign just push it to your phone and verify that it works
If you are editing xml files in /values* or /layout..
do the same as above, except after re-compiling, you're going to swap over the resources.arsc file to the original apk.
This is using apktool... in my experience apk manager doesn't do the job to my expectations... so i just do it manually with apktool.
Lemme know if u need anything more, or if i didnt touch on a specific situation.
Btw, maybe to combat the retarded comments about q&a and being in the right section... maybe turn the OP into a How-To?
preludedrew said:
What exactly have you edited? If you just change non patch9 images... then you can just drag and drop the new images into the apk (may have to rename apk to zip).
If they are patch9's... you need to..
decompile framework-res.apk (apktool d framework-res.apk)
swap out images
recompile (apktool b framework-res)
Now take the newly compiled apk (in the /dist folder). Open it up and take the edited images (only the ones you need changed) and put them into your original apk.
No need to resign just push it to your phone and verify that it works
If you are editing xml files in /values* or /layout..
do the same as above, except after re-compiling, you're going to swap over the resources.arsc file to the original apk.
This is using apktool... in my experience apk manager doesn't do the job to my expectations... so i just do it manually with apktool.
Lemme know if u need anything more, or if i didnt touch on a specific situation.
Btw, maybe to combat the retarded comments about q&a and being in the right section... maybe turn the OP into a How-To?
Click to expand...
Click to collapse
Thank you very much..finally...one last question, where do i put the wallpaper so when the system is fully booted it shows the wallpaper i want? Thanks.
kpkimmel said:
Thank you very much..finally...one last question, where do i put the wallpaper so when the system is fully booted it shows the wallpaper i want? Thanks.
Click to expand...
Click to collapse
There's an xml edit for it... but forgot it off the top of my head... quickest way is to replace system/customize/resource/shows_over.jpg with your image.
preludedrew said:
There's an xml edit for it... but forgot it off the top of my head... quickest way is to replace system/customize/resource/shows_over.jpg with your image.
Click to expand...
Click to collapse
Thanks you, sorry about the stupid framework-res question...i knew the answer but had been so long forget the simplest of steps....instead of normal compression i was using store instead.....duh.......thank you though for the reminder because 7zip will automatically restore the same it was decompressed with, unlike that crap winrar. Have a good one man and thank you again.

editing xml help, stuck in bootloop.

Hi everyone, i used to tommytomatoes linux software to work on framwork and com.htc.resource files and all seemed to go fine with tommy's tools. no errors.
i pushed them to my phone and then installed them using adb.
i restart the phone and end up in a bootloop.
all i did was edit the colors.xml file to change the color and nothing else, no images, not a thing.
is there a way to figure out what is wrong with the 2 apk's i edited?
Thanks for any and all assistance, xml editing is killing me.
what ROM is it from? odex or not?
i used the apk's from king cobras rom.
I can't quite remember (and it could be different on a GSM ROM but I doubt it) but I think if you edit xml you need to remove the arsc or dex from the apk before you recompile.
you can ask here - lots of great help there, including tommyt
http://forum.xda-developers.com/showthread.php?t=1320891
hackit said:
Hi everyone, i used to tommytomatoes linux software to work on framwork and com.htc.resource files and all seemed to go fine with tommy's tools. no errors.
i pushed them to my phone and then installed them using adb.
i restart the phone and end up in a bootloop.
all i did was edit the colors.xml file to change the color and nothing else, no images, not a thing.
is there a way to figure out what is wrong with the 2 apk's i edited?
Thanks for any and all assistance, xml editing is killing me.
Click to expand...
Click to collapse
If any .xml's are edited, before you recompile the .apk, you should remove the resources.arsc file. Then, compile.
^^^ that thanks, I couldn't remember lol.
pinky059 said:
If any .xml's are edited, before you recompile the .apk, you should remove the resources.arsc file. Then, compile.
Click to expand...
Click to collapse
il Duce said:
^^^ that thanks, I couldn't remember lol.
Click to expand...
Click to collapse
where is the resource.arc file i have looked in the decompiled apk and i dont see it, but i see it in one that i havent decompiled?
ok i keep getting stuck bootlooping.
I have removed the resources.arsc file and lef tit in and either way it's the same, all i'm editing is the colors.xml and nothing else.
If i post my colors.xml and the apk can you maybe try it and see if you can do it?
Thanks to anyone willing to take the time to do this.
Kev
dased14 said:
where is the resource.arc file i have looked in the decompiled apk and i dont see it, but i see it in one that i havent decompiled?
Click to expand...
Click to collapse
it build when you compile - then delete from "keep" or whatever before you "finish" (in apkmanager anyway)
hackit said:
ok i keep getting stuck bootlooping.
I have removed the resources.arsc file and lef tit in and either way it's the same, all i'm editing is the colors.xml and nothing else.
If i post my colors.xml and the apk can you maybe try it and see if you can do it?
Thanks to anyone willing to take the time to do this.
Kev
Click to expand...
Click to collapse
post your exact edits, and you MUST remove arsc when edited xml, and your apk here with what you're trying to do >>
http://forum.xda-developers.com/showthread.php?t=1320891

Compiling SystemUI.apk?

I've looked around dozens of threads, but nothing has helped me fix my problem.
I have a Droid Incredible and there is a Quick Settings mod for the dropdown notification bar. My goal is to remove the Hotspot option from that list. When I try decompiling SystemUI.apk with Apktool OR Apkmultitool, I think it works fine. Apktool said there were errors decompiling two images, but I think i fixed those. I have tried installing framework-res.apk and com.htc.resources.apk to decomile it. After making the needed changes and going to compile it, it just spits out errors. No matter what I try I always get an error. What an I doing wrong? What do I need to do to get it to compile without errors?
TeeRom said:
I've looked around dozens of threads, but nothing has helped me fix my problem.
I have a Droid Incredible and there is a Quick Settings mod for the dropdown notification bar. My goal is to remove the Hotspot option from that list. When I try decompiling SystemUI.apk with Apktool OR Apkmultitool, I think it works fine. Apktool said there were errors decompiling two images, but I think i fixed those. I have tried installing framework-res.apk and com.htc.resources.apk to decomile it. After making the needed changes and going to compile it, it just spits out errors. No matter what I try I always get an error. What an I doing wrong? What do I need to do to get it to compile without errors?
Click to expand...
Click to collapse
Might need a bit more info.
What os you running? What commands you running? Have you installed your framework with a tag?
Sent from my Galaxy Nexus using Tapatalk
Evostance said:
Might need a bit more info.
What os you running? What commands you running? Have you installed your framework with a tag?
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
2.3.4 my own version of stock. In APKtool I was running d and b with SystemUI. Don't know if I installed it with a tag.
pull your framework-res.apk
You can then install a tag by installing it as:
apktool if framework-res.apk droid
Decompile it like you have done, but with the tag:
apktool d -f -t droid SystemUI.apk
Made your changes and then recompile it:
apktool b <Path/To/Decompiled/APK>

Replacing icons in apk

Hi
sorry if for expert devs this is a basic question
I have been looking around but I did not found this explained
HOW TO CHANG THE ICON ASSOCIATED WITH AN APK ????
I know how to open a apk with 7 zip and that I have to change the png file there
but which file ?????
do I need to change just the file associated with the icons or all the others ?
I mean .... inside (for example) mm.apk I found the icons related to contacts.apk to email.apk etc ... do I need to chenge all of them with the new ones ?
decompile and recompile
Decompile the app with apktool and go into the res folder and find the icon u want to replace ,,change it and recompile with apktool.Lastly sign the app and you are good to go
I have never tried change icons but i tried to change the background images for dialer and system menu. I used the same method mentioned above by opening the apk using 7zip and changing the images files with my custom images and rename them exactly the same as old ones.
Then I used CWM to flash the zip which contains the modified apk (i.e. contacts.apk and framework-res.apk)
However, I would recommend that you backup your ROM before flashing the modified zip file just in case something wrong happens.
Good Luck
I remember that there is a tool much faster than apktool ti decompile recompile but ... I have not been on the forum for long and I lost it
Is it also possible to change only theicon by using vrtheme ? if yes can someone explain how ?
Thanks
Give this thread a whirl...should be very useful
Basic theming guide by Dully79
Darkside Agent said:
Give this thread a whirl...should be very useful
Basic theming guide by Dully79
Click to expand...
Click to collapse
All very interesting I am sure I will use it at some point
I installed Java SDK and APKtool ... I remembered what they are for ... but still ...
the only thing I needed to know was if I need to change all the images in res or only that associated to the icon.....
ads7112 said:
All very interesting I am sure I will use it at some point
I installed Java SDK and APKtool ... I remembered what they are for ... but still ...
the only thing I needed to know was if I need to change all the images in res or only that associated to the icon.....
Click to expand...
Click to collapse
fine, whatever, ignore my post
Please .. do not missunderstand me !!!
Your help is very much apreciated
I knew approximately what to do to modify the theme also if in general I preferred kitchen uot
Instead I was hoping in a simple change of icon afetr decompressing/decompiling the apk but apparently it is not so simple ...never mind

[Q] Modifying SystemUI.apk xml file

I am using kyanROM and love it! One little tweak I was looking to make was in the notification it has kyanROM along the bottom. I was looking to replace that with my nickname. I am new to modding Android, so any help or tips would be appreciated.
Here are the steps I took and the issues I encountered:
Using NinjaMorph I extracted/decompiled SystemUI
I copied the files over to my PC
Looking through the files (not an exhaustive search mind you), I found one, tw_status_bar_tracking.xml, that had android:text="@string/kyanROM and android:layout_gravity="bottom". This looked promising to me, so I changed kyanROM to the name I wanted to use.
After saving, I copied this file back to my phone and opened the projected in NinjaMorph and said replace the original xml file with my new xml file.
"Finished" the project and closed out NinjaMorph.
Immediately experienced issues. SystemUI stopped working. Rebooting did nothing. So I restored my nandroid backup in order to start over. Back in NinjaMorph, I extracted SystemUI again and copied all files to my PC. Searching the contents of all files (a more exhaustive search) I found 4 instances of the phrase kyanROM:
First was the original in tw_status_bar_tracking.xml and said android:text="@string/kyanROM"
Second is in values\public.xml and says <public type="string" name="kyanROM" id="0x7f0800cd" />
The last two hits are from the same line in values\strings.xml and say <string name="kyanROM">kyanROM</string>
Now, assuming I'm correct that I need to mod SystemUI, after looking at the search results I'm thinking the change I need to make is to the last hit on my search, thus making it <string name="kyanROM">myName</string>. Then, when tw_status_bar_tracking.xml looks for the string kyanROM, it will display myName.
So, am I correct that in order to make this change I need to be in SystemUI? And If that is correct, is my proposed change correct - modifying the strings.xml file to show <string name="kyanROM">myName</string>?
If I do those, go into NinjaMorph and say to replace the original file with my new file I then should see myName along the bottom of the notification dropdown. Thoughts???
So I started over, this time I pulled the SystemUI.apk using adb. Then using apktool I did "apktook if SystermUI.apk". Then, apktool d SystermUI.apk ./mod". Found the file I *think* I need to modify (\values\strings.xml) and replaced kyanROM with myName. Saved the file.
Now I'm trying to recompile the file. I run the following apktool b -f -d mod. When I run this I get the error: Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml.
1) Am I modifying the correct file to place myName at the bottom of the notification screen?
2) How do I fix the PathNotExist error? I've looked at some solutions, but none seem to have worked.
Actually you need framework-res.apk from /system/framework installed through apk tool.
Pull framwork-res.apk and install it as you did for systemui.
After installing framework,type
apktool d systemui.apk
Now make the necessary changes and type
apktool b systemui
To recompile it back.
Note:after you recompile,you need to add meta-inf folder from original apk to your new recompiled apk to make it work.
Sent from my GT-N7000 using xda app-developers app
OK, I think I'm with you.
I need both SystemUI and framework-res in order to modify SystemUI
Install both (apktool if NameOfApk.apk)
decompile (apktool d SystemUI.apk)
make changes
recompile (apktool b SystemUI) but not the framework-res since I made no changes to it
And thanks for the tip about adding the meta-inf folder. I knew this, but since I never gotten that far to test, I'd probably forget to do that.
cyberpac9 said:
OK, I think I'm with you.
I need both SystemUI and framework-res in order to modify SystemUI
Install both (apktool if NameOfApk.apk)
decompile (apktool d SystemUI.apk)
make changes
recompile (apktool b SystemUI) but not the framework-res since I made no changes to it
And thanks for the tip about adding the meta-inf folder. I knew this, but since I never gotten that far to test, I'd probably forget to do that.
Click to expand...
Click to collapse
Installing framework-res.apk alone is enough if you have Samsung phone and have the latest apktool...
Sent from my GT-N7000 using xda app-developers app
vijai2011 said:
Installing framework-res.apk alone is enough if you have Samsung phone and have the latest apktool...
Sent from my GT-N7000 using xda app-developers app
Click to expand...
Click to collapse
OK, I installed both - no harm I guess. So I have made all my changes, updated the apk with the meta folder, etc. I'm ready to push this over to my phone. Using adb, do I need to remount or can I just do the following: adb push S:\apk\SystemUI.apk /system/app/
Well, I took a shot and just did the adb push without remount. I think it worked. We'll see if there are any issues moving forward. Yay! Many thanks....
edit: I noticed it reset my wallpaper, easy fix. Wonder if anything else would've been reset by this change?

Categories

Resources