yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] mikedavis120:
deleted one .png from drawable-mdpi

was trying to take out an icon from the settings menu that the rom dev added. I'm using the rom as a base but have to remove icon

dont know what to really do here now

i have a feeling is framework installation when doing " apktool if Settings.apk" cause that gave me a warning but i lost that in the buffer sorry

here is output from terminal

I: Building resources...
C:\Documents and Settings\Mike\Desktop\APK THEME WORK FOLDER\Settings\res\values\public.xml:119: error: Public symbol drawable/ic_settings_baked_rom_control declared here is not defined.
C:\Documents and Settings\Mike\Desktop\APK THEME WORK FOLDER\Settings\res\values\public.xml:41: error: Public entry identifier 0x7f0200a5 entry index is larger than available symbols (index 165, total symbols 165).
C:\Documents and Settings\Mike\Desktop\APK THEME WORK FOLDER\Settings\res\values\public.xml:41: error: Public symbol drawable/wifi_signal_open declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException:
could not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:\DOCUME~1\Mike\LOCALS~1\Temp\APKTOOL4005691740071795946.tmp, -0, arsc, -I, C:\Documents and Settings\Mike\apktool\framework\1.apk, -S, C:\Documents and Settings\Mike\Desktop\APK THEME WORK FOLDER\Settings\res, -M, C:\Documents and Settings\Mike\Desktop\APK THEME WORK FOLDER\Settings\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:\DOCUME~1\Mike\LOCALS~1\Temp\APKTOOL4005691740071795946.tmp, -0, arsc, -I, C:\Do
cuments and Settings\Mike\apktool\framework\1.apk, -S, C:\Documents and Settings\Mike\Desktop\APK THEME WORK FOLDER\Settings\res, -M, C:\Documents and Settings\Mike\Desktop\APK THEME WORK FOLDER\Settings\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:\DOCUME~1\Mike\LOCALS~1\Temp\APKTOOL4005691740071795946.tmp, -0, arsc, -I, C:\Documents and Settings\Mike\apktool\framework\1.apk, -S, C:\Documents and Settings\Mike\Desktop\APK THEME WORK FOLDER\Settings\res, -M, C:\Documents and Settings\Mike\Desktop\APK THEME WORK FOLDER\Settings\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
[Android Software/Hacking General [Developers Only]] :
You can't really just remove the icon. You have to either make the icon transparent or remove the code that calls for it.

Also note that the first three lines that start with C:\ tell you where the problem is. I would (after decompiling again with your rom specific framework files and not doing apktool if systemui.apk) start with the fix first error then recompile. If the rest of the errors persist fix them as well.

So the first error says that public.xml is looking for an image that is not there ( ic_settings_baked_rom_control.png). Go into that xml and delete or comment out the line looking for the image. Then recompile. You will probably get more errors. Follow the trail till you don't get any errors.

Public.xml is located in /res/values. Note that when compiled this xml is bundled in resources.arsc. This file must be in your new apk.

Also, just load the framework from your rom. Don't apktool if systemui.apk.
[Android Software/Hacking General [Developers Only]] mikedavis120:
thanks that helped, brain farted on just making the .png transparent lol.
[Android Software/Hacking General [Developers Only]] Ichigo:
Ouch! Doesn't it hurt? :eek:;)
[Android Software/Hacking General [Developers Only]] chalid:
Thank you for the guide. I just tried EVERYTHING compiling the SystemUI.apk, but it failed to work on the phone, no matter how I did it. With these instructions it finally worked. :good:
[Android Software/Hacking General [Developers Only]] powerpoint45:
No problem dude
[Android Software/Hacking General [Developers Only]] p95870:
help me

Sorry follow step by step your tutorial but I get this details

on ubuntu 12.10

You can Help me please.... thanks -
[Android Software/Hacking General [Developers Only]] jrod091:
Did you do "apktool if framework-res.apk" plus any other framework apks your ROM might be using?
[Android Software/Hacking General [Developers Only]] tdunham:
Typically, that is the only one you will need to use.
[Android Software/Hacking General [Developers Only]] jrod091:
I understand, but if you're on a tw ROM, you will need twframework-res.apk, etc etc
[Android Software/Hacking General [Developers Only]] p95870:
Thanks I do it and work it

I write this

apktool if framework-res.apk

apktool if twframework-res.apk

and after the systemui

work very well :)
[Android Software/Hacking General [Developers Only]] jrod091:
Glad it worked
[Android Software/Hacking General [Developers Only]] gius321:
What Phone Do You Have?

seems so cool... :good:
[Android Software/Hacking General [Developers Only]] powerpoint45:
YES! that is very important.
[Android Software/Hacking General [Developers Only]] :
Typically the 'no default translation' warning will not stop apktool from compiling. So the problem is with styles. You must have added a bunch of style names to one of the xmls and not added them to the styles.xml or accidentally deleted some of the styles in the styles.xml.

Would you please give us some more information as to what you were doing and to what rom and phone so we can provide better help?

Also, try decompiling without using the command apktool if SystemUI.apk.
[Android Software/Hacking General [Developers Only]] jasminthoria:
Nice guide thanks
[Android Software/Hacking General [Developers Only]] :
You need to use apktool, obviously, but dont do the

apktool if SystemUI.apk

Just load the frameworks.

Are you on a stock ROM? Is your ROM deodexed? Please post your original stat_sys_battery.xml
[Android Software/Hacking General [Developers Only]] XTCrefugee:
OK, so I'll delete 127.apk and try that. This is on the stock, odexed rom - I know others have managed to do the battery mod on odexed so didn't think that would be an issue? I'm not at home right now so can't post the original stat_sys_battery.xml, but it was just the usual one.
[Android Software/Hacking General [Developers Only]] :
After looking into the issue it is not how you modified the files. It has to do with apktool or sdk setup. If you decompile the apk then immediately recompile it you get the errors you posted. Ill keep working on a solution and let you know what I find.
[Android Software/Hacking General [Developers Only]] :
I really want to blame it on the new 4.2 TouchPiss. Stock android apps such as the stock SystemUI.apk decompile/recompile fine on my machine.
[Android Software/Hacking General [Developers Only]] XTCrefugee:
:( I'll see if there are any other framework apk's to install tomorrow, maybe I'll get lucky. I checked my SDK just to make sure, it's all current.
[Android Software/Hacking General [Developers Only]] :
Maybe ask in the S4 general board. One of the themers there may have gone through the same issue.
[Android Software/Hacking General [Developers Only]] jrod091:
http://xdaforums.com/showthread.php?t=2279024

Try this thread?
[Android Software/Hacking General [Developers Only]] XTCrefugee:
After much searching I eventually came across this: http://xdaforums.com/showthread.php?t=2263664

It's an ugly fix (removing system_bar_settings_view.xml and system_bar_notification_panel_title.xml from the layout folder before decompilation, then adding them back into the apk just before zipaligning) but it does work.
[Android Software/Hacking General [Developers Only]] rakz992:
Awesome guide!! Thank you very much:)

I have a question the shortcuts to Wi-Fi Bluetooth etc on notification menu is addressed by which xml files?? System bar or status bar??
[Android Software/Hacking General [Developers Only]] HeadlessPonch:
I did this with the frameworks I pulled from my S3 running mf1. I did not "if SystemUI.apk" though, as someone in this thread said you didn't have to. Made my xml edits to arrays and drawables and all is good. Shouldn't this step be added to the OP?

Thanks for the tutorial, by the way. APK Multi Tool works for the framework, but not SystemUI.

---------- Post added at 01:57 PM ---------- Previous post was at 01:56 PM ----------

Did you mean in the pulldown? On my S3 it's in res/values/arrays.xml. All I'm showing is Wifi, Bluetooth, and GPS.
[Android Software/Hacking General [Developers Only]] Tomislav Veličanstveni:
I have these errors while decompiling systemUI.apk,

C:\>apktool d systemui.apk sys

I: Baksmaling...

I: Loading resource table...

I: Loaded.

I: Decoding AndroidManifest.xml with resources...

I: Loading resource table from file: C:\Users\Tomislav\apktool\framework\1.apk

I: Loaded.

I: Regular manifest package...

I: Decoding file-resources...

W: Could not decode attr value, using undecoded value instead: ns=android, name=

drawable, value=0x01080994

W: Could not decode attr value, using undecoded value instead: ns=android, name=

drawable, value=0x01080995

W: Could not decode attr value, using undecoded value instead: ns=android, name=

drawable, value=0x010808f6

W: Could not decode attr value, using undecoded value instead: ns=android, name=

drawable, value=0x01080994

W: Could not decode attr value, using undecoded value instead: ns=android, name=

drawable, value=0x010808d1

I: Decoding values */* XMLs...

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:

0x010a0124

at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)

at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)

at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)

at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferen

ceValue.java:62)

at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResRefe

renceValue.java:46)

at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlValueExt(Re

sScalarValue.java:86)

at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlValue(ResSc

alarValue.java:55)

at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(Re

sStyleValue.java:61)

at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResour

ces.java:440)

at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:243

)

at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:115)

at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)

at brut.apktool.Main.cmdDecode(Main.java:146)

at brut.apktool.Main.main(Main.java:77)

C:\>
[Android Software/Hacking General [Developers Only]] Tomislav Veličanstveni:
I forgot for framework, sorry :D
[Android Software/Hacking General [Developers Only]] slebit:
Thanks for this guide! Awesome work. :)
[Android Software/Hacking General [Developers Only]] cowsquad:
Thanks to this guide I was able to compile miuisystemui.apk
[Android Software/Hacking General [Developers Only]] mahanddeem:
Hello .. Please help here , I am on stock TW JB 4.1.2 deodexed.. at&t skyrocket trying to theme my SystemUI.apk

I am doing all "if" for SystemUI.apk , framework-res.apk and twframework-res.apk

2 things

1.I don't see any feedback from the commands , normal ?

2.I can see the decompiled SystemUI.apk and I make one png change inside it..When I put the command of recompile to almostdone.apk , it just shows me the next "C:" and no alomostdone.apk :(

What's wrong ?
[Android Software/Hacking General [Developers Only]] SXUsr:
Have you set up apktool correctly?
[Android Software/Hacking General [Developers Only]] mahanddeem:
Ooh wait no ! I did not setup it correctly lol

Thanks man , but seriously if I would think it is not setup correctly I wouldn't ask !

I will keep trying again
[Android Software/Hacking General [Developers Only]] SXUsr:
:rolleyes: If I had a pound for every time I've read something along the lines of "I've followed all steps but it doesn't work" and then watch the thread grow by 3 or 4 pages to then discover they hadn't actually followed all steps correctly, I'd be richer than I am now.
[Android Software/Hacking General [Developers Only]] XTCrefugee:
It's impossible for anyone to answer 2 because of 1, and no that's not normal. Check your apktool, aapt, java, etc.
[Android Software/Hacking General [Developers Only]] jrod091:
Just to rule things out, did you grab the aapt from ibotpeaches' thread too?
[Android Software/Hacking General [Developers Only]] Tomislav Veličanstveni:
Nope, from apktool site
[Android Software/Hacking General [Developers Only]] SXUsr:
Decompiling usually requires two framework apks so you need to install the other which is specific for your device.
[Android Software/Hacking General [Developers Only]] jrod091:
get the one that ibotpeaches posts in his thread along with his apktool

For other apks yes, for framework-res.apk no, it has no other dependencies
[Android Software/Hacking General [Developers Only]] Tomislav Veličanstveni:
Ok I changed aapt and installed SemcGenericUxpRes.apk from my sony too and still getting same error :confused:
[Android Software/Hacking General [Developers Only]] jrod091:
Can you post your framework-res.apk, I'll take a look at it to see if I can decompile it
[Android Software/Hacking General [Developers Only]] kingdj:
hai bro can u make like the 1 u did but make it for xperia go.i love it how it look,plzz bro,il provide my system ui n anything u need for it if u willing,best regards budy:good:
[Android Software/Hacking General [Developers Only]] jjhiza:
Quick Settings Modifications

Hey everyone! Let me start by saying that this is a fantastic guide, and thank you for putting it together. I have an issue in regards to adding tiles to the Quick Settings mod, found here.

I'd like to mimic some of Widgetsoid2.x's functionality, by adding the following tiles to the mod above:

- RAM monitoring

- ROM (phone memory monitoring)

- Always On (keeps the phone's screen from shutting off)

I've decompiled the QSM.apk and the SystemUI.apk (installed frameworks properly for both), and I made what I thought were the appropriate xml edits to enable the RAM tile (I started with that one for testing purposes). However, after I recompile and flash the mod, the tile won't appear... It's listed in the QSM checkbox list, but after applying it (which restarts SystemUI), the tile simply doesn't show up, despite the fact that the app says it's active. Am I missing something? I'm assuming that I may need to make some smali edits, but I'm not well versed in doing so... Would anyone be willing to give me a hand with this? All I really need is to be shown how to add one of those three tiles (RAM monitoring preferably), and I can add the others on my own. I'd really like to get this figured out, so I can make the changes, and push them into my custom ROM.

I'm on a Galaxy Nexus (Toro if it matters), and I can upload my SystemUI.apk if need be. Thanks for taking the time to read this, guys, and thank you in advance for any/all assistance.

*And yes, I have PM'ed the QSM dev... He's currently unable to continue support for the mod, so I'm not sure what my chances are of getting a response from him. Thanks again guys. :good:
[Android Software/Hacking General [Developers Only]] slsamg7112:
i can't build almostdone.apk in step 5 :(

i find my problem is when i do nothing,it can be recomplied.

but if i change some pictures,like status_bar_close_off.9.png(the photo under the telecom name),i could not recomplie it

could you tell me how to solve it? thanks :)
[Android Software/Hacking General [Developers Only]] bombaybadboy:
Editing .9.pngs take a bit more work, description in this guide may help you understand

http://xdaforums.com/showthread.php?p=42633315
[Android Software/Hacking General [Developers Only]] slsamg7112:
thanks for the link ,but i think it too hard for me :p

i'll do my best to try it :)
[Android Software/Hacking General [Developers Only]] tommypacker:
Can anyone help me out? I'm trying to recompile framework-res.apk but I keep getting these errors. It decompiles with some warnings but I don't know if that affects to recompilation process. Thanks!

http://pastebin.com/L8mRCM1J
[Android Software/Hacking General [Developers Only]] jrod091:
Did you run:

apktool if framework-res.apk

before starting? Looks like apktool can't find the resources
[Android Software/Hacking General [Developers Only]] tommypacker:
Yes I did. I tried a different method and I'm now getting this.

http://pastebin.com/6XqCtW4h
[Android Software/Hacking General [Developers Only]] jrod091:
I've had this problem before, can't remember what I did though, I'm sorry :-/ looks like the apk had been modified before. What rom is this from?
[Android Software/Hacking General [Developers Only]] tommypacker:
It's from a PACman port that I made, and I just needed to edit one line of bools.xml to get Network working, but it's not recompiling.:crying:
[Android Software/Hacking General [Developers Only]] jrod091:
I can give it a try if you like? Just tell me the edit and send me the apk
[Android Software/Hacking General [Developers Only]] tommypacker:
Here's the apk http://www.mediafire.com/?4zgog8grha2ry9h

Here's what needs to he done

http://www.mediafire.com/view/?aizaxe85y536g57

Except instead of making it false, change it to true

Sent from my Infuse 4G with Carbon Rom
[Android Software/Hacking General [Developers Only]] jrod091:
Hey, I've been real busy at work, don't think I forgot about you though! Trying to setup my work computer with an apktool setup so I can work on this stuff from work. lol
[Android Software/Hacking General [Developers Only]] jrod091:
I received those same warnings that you got, but I was able to build the apk after making the change to that one bool. attached is the apk, hope it works!
[Android Software/Hacking General [Developers Only]] tommypacker:
Thanks a lot!

Sent from my Infuse 4G with Carbon Rom
[Android Software/Hacking General [Developers Only]] faiz1:
pls can u give me tutorial with screen shot I m beginners plss sir
[Android Software/Hacking General [Developers Only]] mjz2cool:
i have the same problem, but it won't recompile even when i didn't mod anything, i only got this problem with systemui, it can't find resources.

it's a touchwiz systemui, and i have installed the framework.
[Android Software/Hacking General [Developers Only]] bombaybadboy:
http://xdaforums.com/showthread.php?p=42633315

This should help you
[Android Software/Hacking General [Developers Only]] jrod091:
did you also do:

apktool if twframework-res.apk?
[Android Software/Hacking General [Developers Only]] mjz2cool:
yeah, i did actually, but i already solved it :)
[Android Software/Hacking General [Developers Only]] tdunham:
You mean we solved it ;)
[Android Software/Hacking General [Developers Only]] mjz2cool:
true :p thanks for your help, now i can mod the heck out of my phone :p
[Android Software/Hacking General [Developers Only]] mjz2cool:
i had the same problem, but tdunham has helped me out with that one, you need two folder named values-sw720dp and values-sw720dp-port, will upload them when i have a stable internet connection, or you could ask him to send you the files, or search them with google or something
[Android Software/Hacking General [Developers Only]] Heatshiver:
[MENTION=1042140]tdunham[/MENTION]

[MENTION=4493698]jrod091[/MENTION]

[MENTION=2675075]mjz2cool[/MENTION]

Hi, I am encountering a similar problem that tommypacker had here:

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, /tmp/APKTOOL8445708596288998545.tmp, -x, -S, /home/tommypacker/framework-res/res, -M, /home/tommypacker/framework-res/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, /tmp/APKTOOL8445708596288998545.tmp, -x, -S, /home/tommypacker/framework-res/res, -M, /home/tommypacker/framework-res/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, /tmp/APKTOOL8445708596288998545.tmp, -x, -S, /home/tommypacker/framework-res/res, -M, /home/tommypacker/framework-res/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)

I have a LG G2 and this only happens when I try to decompile LGSettings.apk, LGSystemUI.apk, or framework-res.apk. A folder is created, but it con not be recompiled. I have tried using modded apks and apks from a system dump I made (we only have customized stock ROMs available at this time). I have also tried several different tools without success.

Any help or guidance would be greatly appreciated. If you need anything from me, I'll upload it immediately. I really want to understand what I need to do for future projects as well...

Thank you!
[Android Software/Hacking General [Developers Only]] bjks88:
It is here https://android.googlesource.com/pl.../0e721a4005b4d119cf641ca0dd0d8744672646f0/res

but that way do not work. Always the same error.
[Android Software/Hacking General [Developers Only]] mjz2cool:
it looks like that's for a launcher, (/platform/packages/apps/Launcher2/)

the link for the two folders i meant, it was [MENTION=1042140]tdunham[/MENTION] who gave me those :p

link

just put the folders under SystemUI\res
[Android Software/Hacking General [Developers Only]] Heatshiver:
Thank you, but I actually figured it out.

In case it helps anyone else, it seems that there were

multiple framework files

(some phones seem to have just one). For the LG G2 there are four APKs in the framework folder. The three with res in the name are all framework files. It seems that you need to use all three APKs for the LGSystemUI.apk. Hopefully this will help anyone else who has a similar issue.

I appreciate the reply though!
[Android Software/Hacking General [Developers Only]] bjks88:
Thanks for interest. In my case, that errors appear when I flip some png's from another SystemUI to res/drawable-hdpi. I try put that folders to res catalogue, but it won't help :confused:
[Android Software/Hacking General [Developers Only]] mjz2cool:
what are you trying to replace (complete filename)
[Android Software/Hacking General [Developers Only]] bjks88:
I try to replace battery and toggles icons. But now everything work fine :) thanks for your help. Errors appears because in res/drawable-hdpi some icons have duplicate something like "iconname.9.png" and "iconname.png". When I delete files without 9 everything works.
[Android Software/Hacking General [Developers Only]] mjz2cool:
you probably copied the 9patch icons over, while there where normal png's in the original folder, so you didn't actually replace the icons
[Android Software/Hacking General [Developers Only]] bombaybadboy:
Sorry if this is the wrong place to ask but it seems a topic question. I have 4.3 on i9500 and made the brightness slider transparent. Every time I flip to all toggles and back again it goes back to black. Does anyone have a solution plz