[SOLVED] Issues editing SystemUI.apk with apktool - Android Q&A, Help & Troubleshooting

I've been having strange issues with SystemUI, first of all, I deodexed it, which worked fine. Then I tried using apktool to edit it, all I did was decompile it, the rebuild it. To keep signature I pulled the res folder and resources file from the built apk, and put them in the original (even though I didn't actually change anything, this was just a test). I attached a screen shot with the issue, the top bar in notification panel is green. Now remember I didn't actually change anything at this point. Now to further test, when I DO edit images or XML, the changes are recognized (I made the clock text bright red to test, and it worked).
Any help is greatly appreciated, thanks.
Sent from my XT1049 using xda app-developers app

Tory Gaurnier said:
I've been having strange issues with SystemUI, first of all, I deodexed it, which worked fine. Then I tried using apktool to edit it, all I did was decompile it, the rebuild it. To keep signature I pulled the res folder and resources file from the built apk, and put them in the original (even though I didn't actually change anything, this was just a test). I attached a screen shot with the issue, the top bar in notification panel is green. Now remember I didn't actually change anything at this point. Now to further test, when I DO edit images or XML, the changes are recognized (I made the clock text bright red to test, and it worked).
Any help is greatly appreciated, thanks.
Sent from my XT1049 using xda app-developers app
Click to expand...
Click to collapse
Usually when you rebuild you only need to pull the META-INF and AndroidManifest.. You should not need to pull your res folder..
But your issue.. Of being green.. Not sure man.. Images and backgrounds don't just change in their own..
Sent from my SCH-I605 using xda app-developers app

lacoursiere18 said:
Usually when you rebuild you only need to pull the META-INF and AndroidManifest.. You should not need to pull your res folder..
But your issue.. Of being green.. Not sure man.. Images and backgrounds don't just change in their own..
Sent from my SCH-I605 using xda app-developers app
Click to expand...
Click to collapse
Well, I actually figured it out, but I really wasn't changing anything, after decompiling SystemUI.apk I looked through the XML (not editing anything), and I found that the buttons associated with those "green boxes" were set to use list selector drawables from framework-res, which were in fact green, for some reason before decompiling it wasn't defaulting to those list selector drawables, but after decompiling it was, I have no idea why, it really doesn't make sense, but I really didn't edit anything.
And I'm not new to coding, I have HTML, CSS, Javascript, PHP, C++, C, and Python experience, so it's not like I don't know what I'm doing
Anyways, I ended up just setting colors instead of those drawables for those buttons and it was fixed.

How to rename thread???
By the way, I'm new to XDA, I want to change this thread to SOLVED, but I can't seem to find an 'edit' button, is it because I'm still to new? Is it one of the restrictions for new users? Or am I just not seeing it?
Never mind, didn't realize it was just under Advanced Edit

Hello sir,
U said to copy the Meta-Inf and Androidmanifest.xml only .. From the original apk to the built apk ... Do I have to copy it before compiling or after compiling ?? Bcause when i did that AFTER recompiled it .. I get 'SystemUI force close' ?? But no failure during recompile or decompile process ... Not sure what I've done wrong .. :banghead:
Sent from my Lenovo a369i using XDA Free mobile app

Ezzam_Itachi said:
Hello sir,
U said to copy the Meta-Inf and Androidmanifest.xml only .. From the original apk to the built apk ... Do I have to copy it before compiling or after compiling ?? Bcause when i did that AFTER recompiled it .. I get 'SystemUI force close' ?? But no failure during recompile or decompile process ... Not sure what I've done wrong .. :banghead:
Sent from my Lenovo a369i using XDA Free mobile app
Click to expand...
Click to collapse
This also didn't work for me, do the opposite, pull res and resources from the "built" and put in the "original", after building. For some reason this is the only way that seems to work, otherwise it doesn't accept the signature.
Sent from my XT1049 using XDA Free mobile app

Thanks for replying .. I did that just now ... It works !! My Status bar didnt force close this time ... But .. The change that I made was not applied .. Any idea ??
Sent from my Nexus S using XDA Free mobile app

Ezzam_Itachi said:
Thanks for replying .. I did that just now ... It works !! My Status bar didnt force close this time ... But .. The change that I made was not applied .. Any idea ??
Sent from my Nexus S using XDA Free mobile app
Click to expand...
Click to collapse
Well, what changes did you make?
Sent from my XT1049 using XDA Free mobile app

Just a color code .. #ff000000 to #00000000 ..
Sent from my Nexus S using XDA Free mobile app

Ezzam_Itachi said:
Just a color code .. #ff000000 to #00000000 ..
Sent from my Nexus S using XDA Free mobile app
Click to expand...
Click to collapse
Most likely it's not changing anything because that color code isn't used anywhere you can see right away, play with other color codes until you see something change. This just takes lots of trial and error.
Sent from my XT1049 using XDA Free mobile app

Thanks .. Will try right now .. ^^ Im just trying to learn modding SystemUI .. Even from last year .. Cant even edit anything :banghead: and still crawling ..
Sent from my Nexus S using XDA Free mobile app

Ezzam_Itachi said:
Thanks .. Will try right now .. ^^ Im just trying to learn modding SystemUI .. Even from last year .. Cant even edit anything :banghead: and still crawling ..
Sent from my Nexus S using XDA Free mobile app
Click to expand...
Click to collapse
When first starting out, when you want to know what changing a certain color code will do, make them dramatically noticeable colors like bright red, blue, green, etc, that way it's easy to tell when something changes.
Sent from my XT1049 using XDA Free mobile app

Okay .. Thanks for your help .. I think I get it now ..
Sent from my Nexus S using XDA Free mobile app

Related

[Q] XML Recompile to binary after editing.

Ok, so I spent all day researching this and didn't get a clear answer so I figured I just bring it to you guys. What I'm trying to do is edit some of the battery xml files in the framework-res.apk. I tried using apktool to decompile the apk, edit the file and then recompile the apk, but I always get an error. Read some stuff on that sdk might do it, but I could never get it to run (wore out when I tried lol). So now I'm stuck. Spent all day writting the exstensive xml file but can't do anything with it. This is my new hurrdle in theming and would really appreciate some help from you great people
Thanks in advance.
Sent from my SGH-T959 using XDA Premium App
Won't recompile if you don't add the images too - did you do that?
TXLunchbox said:
Ok, so I spent all day researching this and didn't get a clear answer so I figured I just bring it to you guys. What I'm trying to do is edit some of the battery xml files in the framework-res.apk. I tried using apktool to decompile the apk, edit the file and then recompile the apk, but I always get an error. Read some stuff on that sdk might do it, but I could never get it to run (wore out when I tried lol). So now I'm stuck. Spent all day writting the exstensive xml file but can't do anything with it. This is my new hurrdle in theming and would really appreciate some help from you great people
Thanks in advance.
Sent from my SGH-T959 using XDA Premium App
Click to expand...
Click to collapse
A lot of themes/rom frameworks won't recompile after decompiling them due to funky .9 pngs.
What I do is just take Stock KB1 (for instance) frameworks, and decompile/compile them with changes I made and just take the changes from the compiled one and add them to my working one. Did that make sense?
So. Decompile KB1, make changes, compile it back. Open it up, take your new files & put them in your framework you're working on.
The above method is a little trickier when dealing with things in the values folder, but you can still apply it with some logic
Let me know if you need me to clear anything up
Yeah, when I recompile I leave it all in the project folder in apktool. Select the xml I'm editing from there as well and save it there too.
Sent from my SGH-T959 using XDA Premium App
birgertime said:
A lot of themes/rom frameworks won't recompile after decompiling them due to funky .9 pngs.
What I do is just take Stock KB1 (for instance) frameworks, and decompile/compile them with changes I made and just take the changes from the compiled one and add them to my working one. Did that make sense?
So. Decompile KB1, make changes, compile it back. Open it up, take your new files & put them in your framework you're working on.
The above method is a little trickier when dealing with things in the values folder, but you can still apply it with some logic
Let me know if you need me to clear anything up
Click to expand...
Click to collapse
No I get it. Use stock to let recompile the xml to binary. Pull it from there and then add it to the framework I actually want to change correct?
Sent from my SGH-T959 using XDA Premium App
TXLunchbox said:
No I get it. Use stock to let recompile the xml to binary. Pull it from there and then add it to the framework I actually want to change correct?
Sent from my SGH-T959 using XDA Premium App
Click to expand...
Click to collapse
yep!
also see if apk manager is easier for you. seems to help me keep a little organized, sometimes at least
birgertime said:
yep!
also see if apk manager is easier for you. seems to help me keep a little organized, sometimes at least
Click to expand...
Click to collapse
Haha I just realized that's what I've been using lol
Thanks guys. Really appreciate the help. Let you know how it goes.
Just to drop a hint of what I'm working on is a vanilla theme for trigger...kind of like what you did birger, but a little deeper...
Sent from my SGH-T959 using XDA Premium App
Still getting the same issue! Tried a deodexed KB5 framework and a stock from another phone I'm working on. Both won't recompile without an error! Grr!
See If you can de compile and re compile without making any changes at all to it.
Slow50 said:
See If you can de compile and re compile without making any changes at all to it.
Click to expand...
Click to collapse
yeah that worked
EDIT: tried again and still get error!! I'm gettin mad
Ok, so this is there error I'm getting:
\projects\framework-res.apk\res\drawable\stat_sys_battery.xml:5662: error: Error parsing XML: mismatched tag
Click to expand...
Click to collapse
Any thoughts?
EDIT: Fixed that. Got it to recompile but didn't change what I want it to.
Ok, got it to finally work, but I don't think my XML code is right now, or I'm missing something Anyone want to take a look at it. It's a battery thing.
TXLunchbox said:
Ok, got it to finally work, but I don't think my XML code is right now, or I'm missing something Anyone want to take a look at it. It's a battery thing.
Click to expand...
Click to collapse
Did you add extra images you're adding to public XML?
Sent from my SGH-T959 using Tapatalk
birgertime said:
Did you add extra images you're adding to public XML?
Sent from my SGH-T959 using Tapatalk
Click to expand...
Click to collapse
No. That I did not. I'll take a look at that. Basically what happens is when I plug my phone in to charge the battery icon disappears.
Sent from my SGH-T959 using XDA Premium App
TXLunchbox said:
No. That I did not. I'll take a look at that. Basically what happens is when I plug my phone in to charge the battery icon disappears.
Sent from my SGH-T959 using XDA Premium App
Click to expand...
Click to collapse
yep. if you have 100 battery charing images there's a good chance you'll need to add them in
birgertime said:
yep. if you have 100 battery charing images there's a good chance you'll need to add them in
Click to expand...
Click to collapse
Haha! That's how many I've got! How'd you know? Lol! Thanks for your help man, I really appreciate it. Your willing to help is what makes you a great dev!
Sent from my SGH-T959 using XDA Premium App
TXLunchbox said:
Haha! That's how many I've got! How'd you know? Lol! Thanks for your help man, I really appreciate it. Your willing to help is what makes you a great dev!
Sent from my SGH-T959 using XDA Premium App
Click to expand...
Click to collapse
I'm no dev, just a really good blender.
Also, it's because that's the only other logical choice anyone would do. Bionix has like 26 or something and I only use 20 in Trigger
birgertime said:
I'm no dev, just a really good blender.
Also, it's because that's the only other logical choice anyone would do. Bionix has like 26 or something and I only use 20 in Trigger
Click to expand...
Click to collapse
I really like the smooth effect of it and how it looks when its charging. Just becoming a pain in my rear getting the xml code right. Lol
Sent from my SGH-T959 using XDA Premium App
So is there any easy way to modify the public.xml to include them all? lol! Boy did I take on a big job

Ok im gettin pissed

Now i made like 6 themes already and now every theme i try to make, the settings and any app that tries to modify settings or browse the folders just force closes on any image i change, even a freakin statusbar images!!!
HELP
try rebuilding from a fresh settings apk and framework files.. I had the same issue a while back and the only thing i could come up with was the files some how got corrupted as a result of me unzipping and rezipping the file a bunch. Except i didnt get FC's i just got bootloops.
Cheers
shreddintyres said:
try rebuilding from a fresh settings apk and framework files.. I had the same issue a while back and the only thing i could come up with was the files some how got corrupted as a result of me unzipping and rezipping the file a bunch. Except i didnt get FC's i just got bootloops.
Cheers
Click to expand...
Click to collapse
You know what it was.
Everytime I colored the activity bar, thats when it would happen....Weird I swear!!!!
Same here when using ninja morph get force close on almost all apps after changing activity bar color.Anyone got any ideas
Sent from my SGH-T959V using XDA Premium App
That's a .9 file. U shouldn't use nm for that. the image was prolly getting corrupted that's what was giving u issues.
Sent from my SGH-T959 using XDA App
Thanks guess gotta go at it the long way.Sure would be alot easier if nm worked on it though.Again thanks for the info
Sent from my SGH-T959V using XDA Premium App

[REQ] Transparent MMS.APK -- 2.2

I have searched high and low .... no luck. Can anyone point me in the direction of a theme that I could grab this from?? Or maybe make one
trainriderben said:
I have searched high and low .... no luck. Can anyone point me in the direction of a theme that I could grab this from?? Or maybe make one
Click to expand...
Click to collapse
my question is like yours
Bumpity Bump
Yet another bump
Sent from my SGH-T959 using XDA App
Look for glasstopia. It has the transparent mms I believe.
Sent from my SGH-T959 using XDA App
rel500 said:
Look for glasstopia. It has the transparent mms I believe.
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
Thanks, I have tries this one before. I push to system/app and fix permissions, but it won't change. I have deleted the old mms.apk and it never changes. Any help is greatly appreciated.
Sent from my SGH-T959 using XDA App
Try this guys
http://dl.dropbox.com/u/27219566/Mms.apk
Trainrider try putting a COPY in data\app as well as system\app
Not working for me, I put in both places and fixed permissions. Anyone else have differant results>?
so whats the problem? is it giving you a force close or error when you open it? Or it's not showing up in apps at all?
Jay2487 said:
so whats the problem? is it giving you a force close or error when you open it? Or it's not showing up in apps at all?
Click to expand...
Click to collapse
Shows up and opens... not transparent
Sent from my SGH-T959 using XDA App
hmm, when you copied to folders did it ask to replace existing? I pulled that out of Gassadena I think, standby I'll post Glasstopia, see if that works
I tried ones from both Glassadena and Glasstopia. I am overwriting the old and have tried both of these twice. Last shot - I wiped Dalvik to see if that would make a differance. I also used root explorer and searched for all instances of MMS on my phone and didnt find anything hiding anywhere else Damn this MMS it is hard to work with!
Yeah i don't know what to tell you, never had that much trouble. This might eork might not, go into glassadena or glasstopia zip and see if there is a copy in data and one in system, if so maybe move both to your corresponding folder? long shot but at least then you'll know if you need a copy in both, because if it has one in both then you know you do too

Why my rom doesn't start??

Hello guys today I am experiencing a lot of problems after the bootanimation of my rom start, this arrived (I think) in the middle of the folder part 1 stops for a while and then starts all over again always redoing this thing to infinity and the system does not boot, why? what happens? how to fix this? Thank you all for the answers
---blacksoul--- said:
Hello guys today I am experiencing a lot of problems after the bootanimation of my rom start, this arrived (I think) in the middle of the folder part 1 stops for a while and then starts all over again always redoing this thing to infinity and the system does not boot, why? what happens? how to fix this? Thank you all for the answers
Click to expand...
Click to collapse
Take a logcat and see what error it states.I doubt on android.policy.jar.have you edited it for power menu mod or for lock???
Sent from my GT-N7000 using xda app-developers app
vijai2011 said:
Take a logcat and see what error it states.I doubt on android.policy.jar.have you edited it for power menu mod or for lock???
Sent from my GT-N7000 using xda app-developers app
Click to expand...
Click to collapse
But how do I get from logcat recognize the device when it is connected is in recovery?
---blacksoul--- said:
But how do I get from logcat recognize the device when it is connected is in recovery?
Click to expand...
Click to collapse
Connect your phone to PC,boot your phone and type
adb logcat > myrom.log
Now read the log and see what you have done wrong.
Sent from my GT-N7000 using xda app-developers app
I do not think the error is in the android.policy.jar file I replaced by inserting the original file, and it's always the same thing, I made a video so I can better understand the problem (sometimes the bootanimation lasts longer)
http://youtu.be/yKkLuHpU1p0
---blacksoul--- said:
I do not think the error is in the android.policy.jar file I replaced by inserting the original file, and it's always the same thing, I made a video so I can better understand the problem
http://youtu.be/yKkLuHpU1p0
Click to expand...
Click to collapse
There are many possibilities for a boot loop to occur.Only logcat can explain the exact reason.
Sent from my GT-N7000 using xda app-developers app
vijai2011 said:
There are many possibilities for a boot loop to occur.Only logcat can explain the exact reason.
Sent from my GT-N7000 using xda app-developers app
Click to expand...
Click to collapse
So even if I connect the phone to PC during boot the PC should recognize it?
---blacksoul--- said:
So even if I connect the phone to PC during boot the PC should recognize it?
Click to expand...
Click to collapse
Yes.
Sent from my GT-N7000 using xda app-developers app
vijai2011 said:
Yes.
Sent from my GT-N7000 using xda app-developers app
Click to expand...
Click to collapse
This is the report I understand I was wrong to not put the apk with system apk or is it something more serious? I have attached the file because the report was too long
Logcat Log
I see that it has multiple Java errors with frameworks.Is this a AOSP rom????If so there maybe error while compilation....
Sent from my GT-N7000 using xda app-developers app
vijai2011 said:
I see that it has multiple Java errors with frameworks.Is this a AOSP rom????If so there maybe error while compilation....
Sent from my GT-N7000 using xda app-developers app
Click to expand...
Click to collapse
No it is not AOSP ROM is UOT
---blacksoul--- said:
No it is not AOSP ROM is UOT
Click to expand...
Click to collapse
You mean UOT kitchen???and I saw cyanogen mod in the log.That's why I asked.
Sent from my GT-N7000 using xda app-developers app
vijai2011 said:
You mean UOT kitchen???and I saw cyanogen mod in the log.That's why I asked.
Sent from my GT-N7000 using xda app-developers app
Click to expand...
Click to collapse
Yes UOT kitchen you read cyano in the log in because my ROM is based on CyanogenMod 7 and I have yet to complete the total customization, so some apk is still original Cyanogenmod
---blacksoul--- said:
Yes UOT kitchen you read cyano in the log in because my ROM is based on CyanogenMod 7 and I have yet to complete the total customization, so some apk is still original Cyanogenmod
Click to expand...
Click to collapse
If you used uot kitchen,I can assure you that the boot loop is because of it.I too had the same issue using uot kitchen.I don't know what causes the problem and I solved the problem by theming myself....
Sent from my GT-N7000 using xda app-developers app
vijai2011 said:
If you used uot kitchen,I can assure you that the boot loop is because of it.I too had the same issue using uot kitchen.I don't know what causes the problem and I solved the problem by theming myself....
Sent from my GT-N7000 using xda app-developers app
Click to expand...
Click to collapse
and then to solve the problem I put the apk SystemUI and framework-res original and then edit them manually?
---blacksoul--- said:
and then to solve the problem I put the apk SystemUI and framework-res original and then edit them manually?
Click to expand...
Click to collapse
Yeah....if you have HTC by any chance,you need HTC framework apks too for the dependency.
Sent from my GT-N7000 using xda app-developers app
vijai2011 said:
Yeah....if you have HTC by any chance,you need HTC framework apks too for the dependency.
Sent from my GT-N7000 using xda app-developers app
Click to expand...
Click to collapse
nothing does not want to leave, I did what you suggested, I even re-inserted the default keyboard, replace the original META-INF folder, but nothing does not start, what can I do?
Also, when I install from the recovery tells me that Framework-res, fonts and the bootanimation is still UOT why?
I'm having a doubt, it is not starting because I deleted some apk like Pacman.apk?
You need to start simple...
Get the cyanogenmod and just remove what you don't want and add what you do want first...then flash and see if it boots, if it does not boot then you deleted something you should've kept
Once youve gotten rid of unwanted apps and added wanted apps then you can start theming...uot kitchen is really only good for battery mod...but cyanogenmod already has this built into the settings... so, just use apktool to decompile the apks you want themed and start theming them with a photo editor...I use gimp, its free and has lots of features
UOT is great for personal quick themes...but if your going to be releasing the theme or ROM then you really want to do it all your self...you'll feel like you accomplished more, and it really helps you get n understanding on how things fit together in a ROM
Just by looking at your op...it is quite obvious that your new to android development...that is why I say to start simple, what I said above is exactly how I started...I would just delete and add apps at first, then I moved onto theming...and slowly progressed...now I'm building ROMs from source
Also BTW, cyanogenmod is an aosp based ROM...so your ROM is also aosp based...and I don't think uot kitchen works with cyanogenmod anyways because of all its existing mods
Sent from my SGH-I997 using Tapatalk 2

Irritating Boot

I asked before and im asking again..can somebody please help me with this. Every time I restart my phone I have to wait 4-5 minutes to get it start as its always optimizing all the apps and saying Android is upgrading. How to disable this Android is Upgrading and Applications Are optimizing thing? It gets very irritating
Sent from my LT26i using xda premium
Now you're irritating us by creating multiple threads for the same issue. Its standard android behaviour. Period.
Tapatalked !
Rapier07 said:
Now you're irritating us by creating multiple threads for the same issue. Its standard android behaviour. Period.
Tapatalked !
Click to expand...
Click to collapse
Not on every boot.
OP: It must be a mod you installed recently that is somewhat bugged, and does that. Dunno how to stop it.
"A scattered dream is like a far off memory
A far off memory is like a scattered dream"
Yes I did install a custom mod..it was systemui.apk battery and notification bar toggles
Sent from my LT26i using xda premium
Yasharkhan said:
Yes I did install a custom mod..it was systemui.apk battery and notification bar toggles
Sent from my LT26i using xda premium
Click to expand...
Click to collapse
I dont wana change da custom mod,is there any way I cud disable ds android is updating thing from happening.. Some one here on xda said if u delete da TB odex file this error goes.but I cant find dat file anywhere in data/apps
Sent from my LT26i using xda premium
Yasharkhan said:
I dont wana change da custom mod,is there any way I cud disable ds android is updating thing from happening.. Some one here on xda said if u delete da TB odex file this error goes.but I cant find dat file anywhere in data/apps
Sent from my LT26i using xda premium
Click to expand...
Click to collapse
I don't think there is any way to fix this, except for fixing the faulty mod.

Categories

Resources