[Q][DEV] Modifying XML files in SystemUI.apk - Samsung Galaxy Nexus

Hey,
I want to modify some images in SystemUI.apk, namely the "softkey" bar... but I want to animate the png's, which requires adding XML files for animation.
The apk's are obviously compiled, not just a zip, so I can't just throw in an xml file.
How would I go about doing this?
Use apk-tool to decompile, add in the xml files, then recompile? I heard this introduces some errors.
Is there a way to get the source of the SystemUI.apk since this is a dev phone?
Any help is greatly appreciated.

This is similar but not quite the same
http://forum.xda-developers.com/showpost.php?p=11891313&postcount=2

Royal2000H said:
Hey,
I want to modify some images in SystemUI.apk, namely the "softkey" bar... but I want to animate the png's, which requires adding XML files for animation.
The apk's are obviously compiled, not just a zip, so I can't just throw in an xml file.
How would I go about doing this?
Use apk-tool to decompile, add in the xml files, then recompile? I heard this introduces some errors.
Is there a way to get the source of the SystemUI.apk since this is a dev phone?
Any help is greatly appreciated.
Click to expand...
Click to collapse
Source is in ASOP so that's easy... http://source.android.com/
But you're correct about apktool - just get the latest, decode the apk, edit the xml and encode the result... move edited stuff from new apk to source apk and tada!

Related

[How To]: Decompile / Compile .APK

Source Found
Brut.all of XDA has released the program APKtool which make the process of editing any APK file much easier, especially XML editing. Before you had to use a few different programs (Smali, hex editor, etc) to do the same thing. A future release is going to have the decompiler dump into an easy to import into Javabeans/Eclipse format.. so nice
Program and Usage link;
APKTool 1.2
Setup;
Before you start, download from the link above both the apktool-1.2.0.tar.bz2 and apktool-install-windows-2.2_r01-1.tar.bz2 and extract them to your windows folder.
Usage;
Decoding APKs;
Code:
apktool d <file.apk> <directory to output to>
Compiling APKs*;
Code:
apktool b <directory of decoded apk>
*The compiled apk will be saved to the sub directory "dist", which is in what ever directory you choose to compile.
Output structure;
Smali directory - The output of classes.dex, the code to the apk
Res directory - Your resources, the images and layout/structure xmls
Lib directory - Shared library files
Dist directory - The apk output of the "apktool b" command, if you didn't run it you won't have it.
Build directory - The compiled output of the "apktool b" command, like what you would see if you just extracted an apk file with 7zip. If you didn't run it you won't have it.
General info;
Once you have your edited apk from the Dist directory you'll need to sign it. I use Dave Da illest 1 of XDA's modified script for signing. Just place your apk, this should be the only apk in this folder, in the same folder that you extracted the auto-signer to and execute sign.bat. The script will output your_app_signed.apk, which is your signed and ready to load on your phone apk.
If you'd like to decompile/compile an apk file that doesn't have a classes.dex, like framework-res.apk, just place any classes.dex into the apk and it will decompile. If you don't do this apktool will through up an error. Just remember to pull the classes.dex out before you sign it.
Videos;
Editing an Apk file with APKTool;
http://www.youtube.com/watch?v=XXgYVHTcl6c
Editing a Jar file with APKtool;
http://www.youtube.com/watch?v=VAekeWiqHcY
Why?;
Localization / Translation
Themeing
Adding in features or taking them out
Impressing friends and family, lol
etc..
Issues;
I noticed that while the new version 1.2 works great on the framework-res.apk file, it seems to have issues with other System/app files like Settings.apk,Phone.apk, etc. For these files use version 1.1.1.
Hopefully this is helpful, I tend to ramble.
-Ften @ sdx-developers.com
http://forum.xda-developers.com/forumdisplay.php?f=613
Post it here too, mate.
shokkapic said:
http://forum.xda-developers.com/forumdisplay.php?f=613
Post it here too, mate.
Click to expand...
Click to collapse
Will do, not having a good time at the moment as I can't seem to edit launcher.apk with this tool. Not sure why. basically I decompile, edit then compile but having issues when transferring it back to the phone.
EDIT: I just get a black screen when trying the new modified .apk file.
Why to create new threads, if apktool has its official thread here
http://forum.xda-developers.com/showthread.php?t=640592
andrewb84uk said:
Will do, not having a good time at the moment as I can't seem to edit launcher.apk with this tool. Not sure why. basically I decompile, edit then compile but having issues when transferring it back to the phone.
EDIT: I just get a black screen when trying the new modified .apk file.
Click to expand...
Click to collapse
Do you get any errors in logcat?
Brut.all said:
Why to create new threads, if apktool has its official thread here
http://forum.xda-developers.com/showthread.php?t=640592
Do you get any errors in logcat?
Click to expand...
Click to collapse
I could not find it anywhere else and I did do searches for hours Brilliant tool!
See Attachment, I think it's this line
Code:
E/PackageManager( 138): Package com.android.launcher signatures do not match the previously installed version; ignoring!
However, not sure how to fix it.
andrewb84uk said:
I could not find it anywhere else and I did do searches for hours Brilliant tool!
See Attachment, I think it's this line
Code:
E/PackageManager( 138): Package com.android.launcher signatures do not match the previously installed version; ignoring!
However, not sure how to fix it.
Click to expand...
Click to collapse
Not an expert. But try to uninstall the previous launcher, before installing that one.
shokkapic said:
Not an expert. But try to uninstall the previous launcher, before installing that one.
Click to expand...
Click to collapse
Will try it.
EDIT: Nope, uninstalled re-installed, still black screen.
andrewb84uk said:
I could not find it anywhere else and I did do searches for hours Brilliant tool!
See Attachment, I think it's this line
Code:
E/PackageManager( 138): Package com.android.launcher signatures do not match the previously installed version; ignoring!
However, not sure how to fix it.
Click to expand...
Click to collapse
I think you can't install Launcher just like that, because it's system app. You should do it through update.zip file.
Try to not use apktool, but just unpack Launcher.apk, remove META-INF dir, zip it back, sign and install. If you will get similar problems, then they can't be related to apktool (because you didn't even use it), but to something else.
Brut.all said:
I think you can't install Launcher just like that, because it's system app. You should do it through update.zip file.
Try to not use apktool, but just unpack Launcher.apk, remove META-INF dir, zip it back, sign and install. If you will get similar problems, then they can't be related to apktool (because you didn't even use it), but to something else.
Click to expand...
Click to collapse
If I unzip it, remove META-INF dir, zip it back, sign + install and it works fine. It doesn't work when I edit 1 file by decompiling and compiling, sign, upload it fails but it also fails using APKManager.
EDIT: I have also tried using notepad++ / notepad to edit the xml both to the same issue.
Err... you know, your problem is for sure related to signing/installation and not to apktool. Key error line is here:
E/PackageManager( 138): Package com.android.launcher signatures do not match the previously installed version; ignoring!
Click to expand...
Click to collapse
andrewb84uk said:
If I unzip it, remove META-INF dir, zip it back, sign + install and it works fine. It doesn't work when I edit 1 file by decompiling and compiling, sign, upload it fails but it also fails using APKManager.
Click to expand...
Click to collapse
Could you explain, how is it possible, that you can properly sign rezipped apk, but you can't reapktoold' one? If you get signing issues, then this is totally irrelevant what apktool does. All files could be random binary strings as well cause they aren't even read.
This thread can be deleted or moved to the bin or where ever it needs to go!
idroid84 said:
Usage;
Decoding APKs;
Code:
apktool d <file.apk> <directory to output to>
Compiling APKs*;
Code:
apktool b <directory of decoded apk>
*The compiled apk will be saved to the sub directory "dist", which is in what ever directory you choose to compile.
Click to expand...
Click to collapse
Thank you soooo much!!! It took me hours of searching to find this post and once I did, I had my apk decompressed in under a minute!!! You da man
If your running windows XP here's a right click reg edit I made for making decompiling/compiling quicker-
forum.xda-developers.com/showthread.php?t=935967
Hey guys... really trying to theme for the first time with xml files.
I have done modifying of png which are easy, but just lenghty and detailed.
So now that Gingerbread is out, some of the items have been moved to the xml files.
indeterminate was from 4 and now down to 3. but I want to increase to 8 to mimic honeycomb. Also the progress horizontal was once a png reference file now its in the systemui.apk xml too.
Anyhow short version.... anytime i edit more then 1 line at a time after decompiling, when trying to say it will ask to save as text.
Whats the best file editor for xml? or recommendations.
I use notepad++ on windows, you can also import your decompiled apk into eclipse and use that, it'll also report any errors or mistakes you might make.
Hope this helps.
Yeah I have been using that do and any time I compile and flash it just gives me boot loop.
Question about proper importing to eclips.
Whenever I just flat out decompile ... do my modification, go to recompile, it get errors. In apktool and apkmanager.
Should I extract the resource file and class dex out and then decompile. Cus when I have the resource file in the same directory....at least last nights attempt, apktool finale didn't give me an error and compiled.
I've done a decompile just from apk and imported to eclips and when I try to run, gives error.... "no style availiable" or something like that
Sent from my Droid using XDA App
Thank you!!!
Greetings.
fixing a broken abondon market apk
Could someone fix this app VirginmobileMinuitechecker . I think i found the problem . Virgin Mobile updated there site from logon www1 to www2 . I edited it from the open source and zipped it back up but i cannot get this compile program to run at all . here is the zip master . I made several attempts emailing jay goel but he his MIA .. the app will no longer log in because of the VM website recent changes . TIA
EDIT ,, NEVER MIND . i got it working and fixed that app . works like a charm now pretty good being i don't code for a living.. if you don't mind i posted the fixed app . you may move or delete if it is not proper . thank you for the tutorial .

[Q] Modding CM framework-res with new battery icons.

I am trying to use percentage icons with CM nightly build. I tried to unzip it and replace icons and xml battery files but I don't get any battery icons to show up on my status bar. I was able to make my own theme by replacing icons and image files but I wan percentage battery icons. I tryied to change xml files in CM source code and recompiled it and then I gor random icons instead of my battery icons. I also tried to replace all images but then would tell me that images are missing something and will stop compile. Could somone point me the right direction on how to mod framework-res to include percentage icons
http://forum.xda-developers.com/showthread.php?t=724778
I tried it and does not work. The kitchen does wird stuff to my framework and makes the phone reboot
tritron777 said:
I am trying to use percentage icons with CM nightly build. I tried to unzip it and replace icons and xml battery files but I don't get any battery icons to show up on my status bar. I was able to make my own theme by replacing icons and image files but I wan percentage battery icons. I tryied to change xml files in CM source code and recompiled it and then I gor random icons instead of my battery icons. I also tried to replace all images but then would tell me that images are missing something and will stop compile. Could somone point me the right direction on how to mod framework-res to include percentage icons
Click to expand...
Click to collapse
In addition to changing the XML files in the /res/drawable folder, specifically:
stat_sys_battery_charge.xml
zzz_stat_sys_battery_1.xml
stat_sys_battery.xml
And adding the new png file to /res/drawable-hdpi
You MUST make sure you add resource IDs for each of your newly added png files to the /res/values/public.xml file. Otherwise, the XML has no way of referencing the new images by ID, and the likely reason why you were getting random imagines, rather than the new ones specified.
If you are manually editing and recompiling, you can then just grab the above referenced XML files and the 'resources.arsc' file from the newly built apk file and drop them in your original.
JsChiSurf said:
In addition to changing the XML files in the /res/drawable folder, specifically:
stat_sys_battery_charge.xml
zzz_stat_sys_battery_1.xml
stat_sys_battery.xml
And adding the new png file to /res/drawable-hdpi
You MUST make sure you add resource IDs for each of your newly added png files to the /res/values/public.xml file. Otherwise, the XML has no way of referencing the new images by ID, and the likely reason why you were getting random imagines, rather than the new ones specified.
If you are manually editing and recompiling, you can then just grab the above referenced XML files and the 'resources.arsc' file from the newly built apk file and drop them in your original.
Click to expand...
Click to collapse
What's the easiest way to get the resource ID's for the new images?
HeyItsLou said:
What's the easiest way to get the resource ID's for the new images?
Click to expand...
Click to collapse
Decompile an existing super battery framwork-res and pull the IDs from it's public.xml file.
You do not need to put in the ID's. You can just edit the xml files add the pics to your hdpi folder and recompile, apkmanager will make the ID's by itself.
rujelus22 said:
You do not need to put in the ID's. You can just edit the xml files add the pics to your hdpi folder and recompile, apkmanager will make the ID's by itself.
Click to expand...
Click to collapse
I don't use apk manager but I do use apktool which apk manager uses and I can verify this to work 100%
If you open say com.htc.resources.apk with an archive manager like 7zip for windows or archive manager if you're using linux and drop in your edited png's then use apktool to decompile the framework it should create all of the resource ID's in the public.xml file for you. At this point if you have any xml edits or smali edits to do complete those then recompile. Now just extract the "res" folder and the "resources" files from the compiled apk and using the same archive manager from above to open the original com.htc.resources.apk and replace the files you should be good to go.
IS there a way to autogenerate image ids?
tritron777 said:
IS there a way to autogenerate image ids?
Click to expand...
Click to collapse
Not that I'm aware of however I'm no pro themer. As far as I know you have to manually edit the xml's in the drawable directory by creating the strings that point to the drawable hdpi images you created or it won't work.
if you use http://circle.glx.nl/ you won't need to do the manual xml updating. i use this kitchen for my cm6 nightly ROM.
extract the framework.apk file from the cm6nightly that you are using (current nightly builds have had changes to the framework...thus if you flash tonight you may need to redo the process..perhaps you can just dump the updated framework and resign the zip..i just go back to the kitchen and recook) anyway..
after extract
go to kitchen
set ur desired options
upload the framework file
wait
download the UOTxxx.zip file
put on root of evo sdcard
reboot into recovery
flash the UOT zip file
enjoy
but then, that's the automated cheater way.
I suppose if you don't know what you're doing, kitchens are great. For non noobs who don't want / need to use (the whole point of the thread as the op had problems), doing it manually makes sure it is done right without making your framework all screwy.
Sent from my HTC Evo
JsChiSurf said:
I suppose if you don't know what you're doing, kitchens are great. For non noobs who don't want / need to use (the whole point of the thread as the op had problems), doing it manually makes sure it is done right without making your framework all screwy.
Sent from my HTC Evo
Click to expand...
Click to collapse
I completely agree. I rather learn how to do something the manual way it just empowers you for any future mods you may want to do. Not to mention if you rely on one resource and all of a sudden that resource such as a kitchen goes away you're out of luck.
HeyItsLou said:
I completely agree. I rather learn how to do something the manual way it just empowers you for any future mods you may want to do. Not to mention if you rely on one resource and all of a sudden that resource such as a kitchen goes away you're out of luck.
Click to expand...
Click to collapse
Completely agree, Learning how to do something is always better.

[Q] Theme errors in apkmanager compile/decompile

I've just tried some of the themes available here against the apkmanager tool - decompiling and then compiling the framework-res.apk and twframework-res.apk and all of the custom themes give tons of errors (sometimes won;t even compile back) .. the only one that goes without troubles is the stock framework-res.apk and twframework-res.apk
I'm just wondering whether this is correct or not and where is the issue - is it apkmanager or the themes that are wrong ?
w83 said:
I've just tried some of the themes available here against the apkmanager tool - decompiling and then compiling the framework-res.apk and twframework-res.apk and all of the custom themes give tons of errors (sometimes won;t even compile back) .. the only one that goes without troubles is the stock framework-res.apk and twframework-res.apk
I'm just wondering whether this is correct or not and where is the issue - is it apkmanager or the themes that are wrong ?
Click to expand...
Click to collapse
I never had much luck with APKManager, that's why I use APKTool.
Try v1.3.1 if you can find it, 1.3.2 has problems.
Apk Manager uses apktool too.
@w83
Take a look at log.txt.
I guess it's due to corrupted .9.png.
Solution:
Replace all modded .9.png with original files, decompile, make your changes, compile.
Then you can put in your modded .9.pngs again...
scheichuwe said:
Apk Manager uses apktool too.
@w83
Take a look at log.txt.
I guess it's due to corrupted .9.png.
Solution:
Replace all modded .9.png with original files, decompile, make your changes, compile.
Then you can put in your modded .9.pngs again...
Click to expand...
Click to collapse
Is it really a solution ? .. cause it seems like all of the modded .9.pngs are basically broken
You're right, let's say workaround
For fixing your modded .9.png search for xUltimate draw 9 patcher. I don't know what it's called exactly.
But for editing framework-res.apk the workaround should be acceptable.
I can manage to decompile the theme (usually with some patched pngs messed up) but when I try to compile it (even without any changes) I end up with tons of errors in the form:
apktools/vagreen_frame/res/values/public.xml:3760: error: Public symbol drawable/zzzzz_tw_quickcontact_top_frame declared here is not defined.
(lots of these ones)
any idea what's wrong ?
w83 said:
I can manage to decompile the theme (usually with some patched pngs messed up) but when I try to compile it (even without any changes) I end up with tons of errors in the form:
apktools/vagreen_frame/res/values/public.xml:3760: error: Public symbol drawable/zzzzz_tw_quickcontact_top_frame declared here is not defined.
(lots of these ones)
any idea what's wrong ?
Click to expand...
Click to collapse
Once your 9.pngs are poorly done, errors such as the above would appear. There were only 6 9.png errors and the log generated a loh file size of 130+kb. But once solved, all errors were eliminated.
Sent from my GT-I9000 using XDA App
scheichuwe said:
You're right, let's say workaround
For fixing your modded .9.png search for xUltimate draw 9 patcher. I don't know what it's called exactly.
But for editing framework-res.apk the workaround should be acceptable.
Click to expand...
Click to collapse
I'm either using the android sdk draw9patch to generate the pngs or even GIMP to do it. Just make sure the first and last row/column must be either alpha or black. No other colours are allowed there.
Sent from my GT-I9000 using XDA App
g00ndu said:
I'm either using the android sdk draw9patch to generate the pngs or even GIMP to do it. Just make sure the first and last row/column must be either alpha or black. No other colours are allowed there.
Click to expand...
Click to collapse
Ok so ur saying that after I should correct the patch 9 pngs in the framework and it should compile correctly ? .. so two options: [1] decompile, replace the pngs with correct ones, compile ? .. or .. [2] correct pngs, compile in eclipse, replace in framework, decompile, compile ?
I am pretty sure that I've already tried correcting them using [1] and it didn't help at all .. I was still flooded with errors ..
I guess I'll try to modify things from the bottom up .. take the stock theme with extended menu and play around with it .. are there any significant changes in the .jars inside the /system/framework in most of current themes ?
but still it would be way nicer if I could decompile and compile one of current themes without errors .. I'm so curious how the theme gurus are doing it .. I envy their knowledge
w83 said:
...
but still it would be way nicer if I could decompile and compile one of current themes without errors .. I'm so curious how the theme gurus are doing it .. I envy their knowledge
Click to expand...
Click to collapse
Replace all modded .9.png with original files, decompile, make your changes, compile.
The person who made the theme did it lazily and incorrectly. The first couple versions of my ROM had this problem. Did some research into how .9 PNGs work.
If you want to fix them, I can tell you how. It's a bit tedious.
scheichuwe said:
Replace all modded .9.png with original files, decompile, make your changes, compile.
Click to expand...
Click to collapse
Yep that worked perfectly !! Thx mate for that
I'll try to mod something and see how it works
MikeyMike01 said:
The person who made the theme did it lazily and incorrectly. The first couple versions of my ROM had this problem. Did some research into how .9 PNGs work.
Click to expand...
Click to collapse
Most of the available themes can't be compiled and decompiled without errors
w83 said:
Most of the available themes can't be compiled and decompiled without errors
Click to expand...
Click to collapse
But mine can.
Spent a couple days fixing every .9 PNG one at a time. All you have to do is:
Decompile the unthemed .apk
Copy the broken PNG equivalents from the unthemed .apk
Decompile the themed .apk
Delete the broken .9 PNGs
APK Manager will rename the broken xxxxx.9.png to xxxxx.png
Open the non-broken PNGs in your favorite image editor
Delete everything but the 1 pixel border
Paste the edited PNG over it, without touching the 1 pixel border
Save
Recompile the themed.apk
MikeyMike01 said:
But mine can.
Spent a couple days fixing every .9 PNG one at a time. All you have to do is:
Decompile the unthemed .apk
Copy the broken PNG equivalents from the unthemed .apk
Decompile the themed .apk
Delete the broken .9 PNGs
APK Manager will rename the broken xxxxx.9.png to xxxxx.png
Open the non-broken PNGs in your favorite image editor
Delete everything but the 1 pixel border
Paste the edited PNG over it, without touching the 1 pixel border
Save
Recompile the themed.apk
Click to expand...
Click to collapse
Thank you so very much for sharing this info!!!
MikeyMike01 said:
But mine can.
Click to expand...
Click to collapse
Perfect
MikeyMike01 said:
Delete everything but the 1 pixel border
Paste the edited PNG over it, without touching the 1 pixel border
Click to expand...
Click to collapse
You can just edit the broken png in draw9patch (or gimp or whatever) but sticking to the patch 9 png rules
Thanks for sharing !
Could you briefly explain how the editing in draw9patch is done, please.
MikeyMike01 said:
But mine can.
Spent a couple days fixing every .9 PNG one at a time. All you have to do is:
Decompile the unthemed .apk
Copy the broken PNG equivalents from the unthemed .apk
Decompile the themed .apk
Delete the broken .9 PNGs
APK Manager will rename the broken xxxxx.9.png to xxxxx.png
Open the non-broken PNGs in your favorite image editor
Delete everything but the 1 pixel border
Paste the edited PNG over it, without touching the 1 pixel border
Save
Recompile the themed.apk
Click to expand...
Click to collapse
But lets say I want to change the default blue of 'statusbar_background.9.png' to full plain black. If I leave the 1 pixel border and fill the rest to black, wouldn't I have a blue border in the status bar?
brittosa said:
But lets say I want to change the default blue of 'statusbar_background.9.png' to full plain black. If I leave the 1 pixel border and fill the rest to black, wouldn't I have a blue border in the status bar?
Click to expand...
Click to collapse
No, there's a special one pixel border that has black and transparent pixels that tell the system how to stretch the image without making it look stretched.
That's why you'll note that .9 PNG files are buttons and other things that are used to make different sized objects.
Sent from my Captivate.

[Bugfix][Gingerbread-JV*] Oversized/Unaligned browser combobox in themes.

Hi! I noticed this bug in ock's theme originally and then when I was trying to make my own theme banged heads with it myself.
The issue is that in the browser the combobox button seems to spill over into the text and generally is stretched poorly.
Like this:
I tried at first simply creating a .9.png version and removing the originals and replacing with the .9s. This made the bar vanish completely.
Eventually I got it working with a bit of a work-around, by compiling the .apk twice and extracting the images.
Having to explain that process recently lead me to the real answer though.
combobox_disabled.png and combobox_nohighlight.png ARE .9.pngs even though they do not have the .9.png extension.
apkmanager won't decompile (or compile) them as .9's because they don't have the right extension (and the right extension 'breaks' the theme).
Attatched are my .9.png versions of both images. I added the guidelines from scratch, but they seem to be correct. If your theme has this issue and you need to fix it, just drop the 'compiled' versions into your res/drawable-hdpi and apk-manager should happily compile it and the issue should be resolved.
tried both versions to just replace the ones in my framework-res.apk (didn't decompile the file but just replaced the files) and both didn't solve the problem.
XlAfbk said:
tried both versions to just replace the ones in my framework-res.apk (didn't decompile the file but just replaced the files) and both didn't solve the problem.
Click to expand...
Click to collapse
That -may- not work. That was one of the first things I tried to do - replace with .pngs straight from stock without a decompile/recompile of the whole apk.
The format of the zip file might be slightly ambiguous.
9s - are the raw pngs with draw9patch guidelines.
compiled - are the compiled draw9patch pngs. If you use a draw9patch compiler on the files in the 9s directory you get these.
Even though the pngs are compiled you still need to go through the decompile/recompile procedure with apk manager. (using the 'compiled' pngs).
sargorn, I've tried several times to decompile and recompile the framework with no luck. The new framework is ok, except this damn combo box rendering.
I personally gave up trying :|.
Toss me the framework and I'll give it a shot.
here's mine, based on JVB. thx fo giving it a try
XlAfbk said:
here's mine, based on JVB. thx fo giving it a try
Click to expand...
Click to collapse
Hi,
I tried decompiling and then recompiling your framework and it does not recompile.
zzzzz_tw_quickcontact_slider_btn_pressed.9.png and zzzzz_tw_quickcontact_slider_btn_selected.9.png were both 0 bytes.
If you've just been replacing images this probably won't work
Here it is decompiled and recompiled with stock copies of those two files and the combo box 'fix'.
The filesize seems very 'off' so I'm not sure if it'll work or not.
ro_explorer said:
sargorn, I've tried several times to decompile and recompile the framework with no luck. The new framework is ok, except this damn combo box rendering.
I personally gave up trying :|.
Click to expand...
Click to collapse
I've just de/recompiled JVH's framework-res and the combobox fix still seems to work. (Although maybe it's not needed in JVH, didn't test it!).
I tried it again with JVH and failed again. What I did:
1. decompile framework-res.apk with apkmanager
(2. make some of my changes to some xml files)
3. place the 2 files from compiled in drawable-hdpi-v4
4. recompile the apk
Everything but the comboboxes works as expected.
I'm attaching the apk, maybe you could have a look at it. If you can make it work please tell me what I did wrong. Many thx
XlAfbk said:
I tried it again with JVH and failed again. What I did:
1. decompile framework-res.apk with apkmanager
(2. make some of my changes to some xml files)
3. place the 2 files from compiled in drawable-hdpi-v4
4. recompile the apk
Everything but the comboboxes works as expected.
I'm attaching the apk, maybe you could have a look at it. If you can make it work please tell me what I did wrong. Many thx
Click to expand...
Click to collapse
As im here looking for the fix for my dhd I thought I might be able to help
Looking at your framework I can clearly see that those images in there are not fixed.
Try simply dragging and dropping the fixed pngs straight into your framework
liamstears said:
Try simply dragging and dropping the fixed pngs straight into your framework
Click to expand...
Click to collapse
that won't work, was said before, needs to be compiled in
Try out the jvo rom - I think this issue may be resolved in that framework.
Sent from my GT-I9000 using XDA Premium App
I still have that issue with my JVO theme

[Q] Decompiling and building SystemUI.apk

Okay, so I am trying to get the navbar working on the Samsung Galaxy Note 3. Pretty much, I have a feeling that SystemUI is missing the icons for the navbar, which causes it to crash when the build.prop has the line "qemu.hw.mainkeys=0". The SystemUI has all the other files that were required for the S4 sysui mod, except for the icons. Being a noob at this, I went ahead and tried to add the icons, but my apk resulted in "System UI has stopped.".
So I decided maybe I am doing something wrong. So with Android Multitool for windows, I installed framework-res.apk, SystemUI.apk, and twframework-res.apk. Next I select the SystemUI.apk for decompiling, and decompile it. Then I simply select the decompiled directory (didn't modify anything!), and recompile it. I then open the new SystemUI.apk in 7z and add the META-INF and AndroidManifest.xml from the old SystemUI.apk. I then select the newly compiled SystemUI.apk for signing, then I sign it.
This is just decompiling, then building the same thing without modifications. SystemUI.apk before decompiling is 2.7 MB, the newly compiled one is only 2 MB! Something is missing out of the new one, but when I compare them in 7z, the only thing I can see that is different is the packed size; whereas the old one has files and folders that take up more space packed than the new one.
When I try doing this with just apktool and cmd, I get java errors like crazy, and the whole SystemUI.apk ends up only half decompiling.
Any idea what I am doing wrong?
Your best bet would be to copy the log to pastebin, and post it in the apktool support thread. Get more views there for sure. Which version of apktool are you using? Can you decompile and recompile anything? Also, if you want post your systemui up and i could see if I can get it to work, narrow it down to a problem on your end that way.
Sent from my SM-N900T using Xparent Skyblue Tapatalk 2
This is my first time doing this, so of course I make a noob mistake! I thought I had to sign ALL apks, but this is a SYSTEM app, and I don't sign it. All is well! Thanks for the reply. I also updated my apktool to 1.5.2, so that may have helped too.
all you have to do is add a + before the @ sign in the line that is giving you errors....umm depending if it is xml errors....
post the errors.....
gakio12 said:
This is my first time doing this, so of course I make a noob mistake! I thought I had to sign ALL apks, but this is a SYSTEM app, and I don't sign it. All is well! Thanks for the reply. I also updated my apktool to 1.5.2, so that may have helped too.
Click to expand...
Click to collapse
You don't need to sign it? I have also this problem. It gives me error that SystemUI has stopped.

Categories

Resources