[Q] Modifying SystemUI.apk xml file - Android

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?

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.

Volume Slider Color

I'm wanting to change the color of the slider when you turn your volume up and down from yellow to another color. I'm running CM7 fascinatemtd ROM by JT, I know which folder it's in and how to do it. My question is, I use Apk Manager to decomplie my framework-res.apk which was pulled from the ROM using 7zip, I've decompiled the apk, edited the XML file, when I went to recompile the framework-res apk using option 11, a error pop up and told me to read the log, I hit enter, answered yes to system question, then went to keep folder and deleted the resources file as instructed, and hit enter, I was left with an unsigned framework-res.apk file, renamed it to framework-res.apk, and pushed it back into ROM with 7zip, rebooted recovery, cleared caches, and installed ROM, but phone wouldn't boot up. So what am I doing wrong...
Obviously not
Sent from my SCH-I500 using XDA App
What color do you want the slider man
Sent from my SCH-I500 using XDA App
Blue would match my theme the HEX code is 11114b...
Sent from my SCH-I500 using XDA Premium App
If apkmanager errors common logic would dictate to read the log and see what is going wrong
Trying to flash a broken apk won't work obviously
I've gotten it to decompile and recompile bit the problem now os the changes I've made don't show up I'm not getting any errors before I was ising a ROM that I themed so I went back and used the original ROM how do I get the changes to stay...
Sent from my SCH-I500 using XDA Premium App
And you're trying to edit progress_horizontal.xml? And changing code to ff11114b leaving the "f's" in?
good day.
Yes
Sent from my SCH-I500 using XDA Premium App
I should rename unsigned framework.res to framework.res right...
Sent from my SCH-I500 using XDA Premium App
And during the compile process, you hit y for "system apk" and hit y for "would you like to copy over any files..............." and from the keep folder delete resources.arsc and continue to compile. And yes rename back to framework-res.apk.
good day.
Answered yes to system app and no to copy over files, didn't delete arsc and changes stayed, but if I install will I get boot loop since I didn't delete arsc....
Sent from my SCH-I500 using XDA Premium App
If I hit y to copy over files the changes don't stay only if I hit n
Sent from my SCH-I500 using XDA Premium App
it worked, by not copying over the files and not deleting the resources arsc file, does anyone know what the XML file name is for the download progress bar color is...and thanks for your help guys...
Here's what I would do if I was on Windows!
Download apktool & dependencies:
http://android-apktool.googlecode.com/files/apktool1.4.1.tar.bz2
http://android-apktool.googlecode.com/files/apktool-install-windows-r04-brut1.tar.bz2
Unpack both archives to your Windows folder. This will make apktool accessible through cmd anywhere.
CD in cmd window to the location of your apk, If you haven't already done so and install the resources by copying or pulling (framework-res.apk, twframework-res.apk for touchwiz) or (framework-res.apk, SystemUI.apk for GB). Once copied to the folder you are cd'd too...
Install the resources
apktool if framework-res.apk
apktool if twframework-res.apk
apktool if SystemUI.apk
Decompile and make your changes..
apktool d framework-res.apk
Recompile when done
apktool b framework-res
If it built succesfully, then make a copy of your framework-res.apk. Then navigate to framework-res/build/apk! Open your copied apk with 7zip and drag n drop res & resources.arsc from framework-res/build/apk inside! Close it up..
Push and test.. On windows you may need to navigate to your sdk directory if not properly setup!
adb push "your_copied_file"/system/framework/framework-res.apk
If you get a failed to write to system, run this first.
adb shell su -c rw
YES got all progress bar colors changed to blue now my CM7 Fascinatemdt ROM is themed all of my drawable hdpi and XML files are complete I might post this as a theme, thank you for your help...
Sent from my SCH-I500 using XDA Premium App
notta said:
Here's what I would do if I was on Windows!
Download apktool & dependencies:
http://android-apktool.googlecode.com/files/apktool1.4.1.tar.bz2
http://android-apktool.googlecode.com/files/apktool-install-windows-r04-brut1.tar.bz2
Unpack both archives to your Windows folder. This will make apktool accessible through cmd anywhere.
CD in cmd window to the location of your apk, If you haven't already done so and install the resources by copying or pulling (framework-res.apk, twframework-res.apk for touchwiz) or (framework-res.apk, SystemUI.apk for GB). Once copied to the folder you are cd'd too...
Install the resources
apktool if framework-res.apk
apktool if twframework-res.apk
apktool if SystemUI.apk
Decompile and make your changes..
apktool d framework-res.apk
Recompile when done
apktool b framework-res
If it built succesfully, then make a copy of your framework-res.apk. Then navigate to framework-res/build/apk! Open your copied apk with 7zip and drag n drop res & resources.arsc from framework-res/build/apk inside! Close it up..
Push and test.. On windows you may need to navigate to your sdk directory if not properly setup!
adb push "your_copied_file"/system/framework/framework-res.apk
If you get a failed to write to system, run this first.
adb shell su -c rw
Click to expand...
Click to collapse
will this work also when trying to decompile/recompile a non system app, like one from the market, that has dependencies
adude247 said:
will this work also when trying to decompile/recompile a non system app, like one from the market, that has dependencies
Click to expand...
Click to collapse
It will work with anything provided you have the resources. Some apk's are picky by means of what you can replace.
The method above is using apktool the way it is supposed to be used. That apkmanager thing sounded crazy with the delete this after that, hit y or n before this. Seems like alot of un-needed steps and confusion!
On linux it's even easier, pretty much fully auto!
notta said:
It will work with anything provided you have the resources. Some apk's are picky by means of what you can replace.
The method above is using apktool the way it is supposed to be used. That apkmanager thing sounded crazy with the delete this after that, hit y or n before this. Seems like alot of un-needed steps and confusion!
On linux it's even easier, pretty much fully auto!
Click to expand...
Click to collapse
yeah, I didn't delete anything just decompiled, edited the XML, and recompiled, that was the only way I could get the changes to stay. Any suggestions on what to use if the above resources don't work to get the apk to decompile, an example of an apk that I want to edit but cant get it to recompile after decompiling and editing the XMLs is....
adude247 said:
yeah, I didn't delete anything just decompiled, edited the XML, and recompiled, that was the only way I could get the changes to stay. Any suggestions on what to use if the above resources don't work to get the apk to decompile, an example of an apk that I want to edit but cant get it to recompile after decompiling and editing the XMLs is....
Click to expand...
Click to collapse
I can't and won't explain getting resources for market apps or generally someone else's work. However there are several ways to approach non-building apk's.
For example aapt has the capability to recompile standalone 9's as well as xml's, which can then be injected into the apk with the 7zip method. Especially useful for minor changes.
Another example for stubborn apk's would be the Eclipse or similar project. This is where you would partially build the files you wanted to change.
Thanks for the advice...
Sent from my SCH-I500 using XDA Premium App

Having issues with decompiling Mms.apk for compression fix

Hey guys I have an evo 4g I am trying to apply steelH's Mms compression fix and I'm wondering what I'm doing wrong. I extracted the MMS.apk file along with the framework-res.apk file into the apktool directory to install the framework with the apktool if framework-res.apk command and it said that it was installed then I tried to decompile with apktool d Mms.apk and it just gave me a bunch of errors and at the end it said that it needed the proper framework files but the folder with all the decompiled files were still there. So I went ahead and found the imagemodel.smali file and made the necessary changes and tried to recompile it but it gives me a bunch of errors that you can see in this screenshot. Any idea what I should do to fix this so I can recompile and put the MMS.apk file back into my phone with the fix?
Usually when you get the weird characters it means the apk did not decompile properly, make sure when you decompile the SystemUI.apk you also put framework-res .apk In your apktool folder. Then in cmd type
apktool if framework-res.apk
apktool d SystemUI.apk
Well if you take a look at the screenshot my framework-res.apk is in the folder with the apktool and the Mms.apk which I wanted to decompile and those are the commands I used except I didnt need to decompile systemUI but rather Mms.apk. So I'm wondering what I'm doing wrong since I've done exactly what you suggested in the first place. the 1.apk is from the first command as it installed correctly according to cmd.
Have you type those word in cmd? You need to type in those code while decompiling ssystem app
Accidentally sent from my Google Nexus S using XDA Premium
yes i typed in cmd: apktool if framework-res.apk but not apktool d systemui.apk I don't want to decompile that file. I'm confused about why you're telling me to decompile that file. can you please give me an explanation as to why I need to decompile that file to decompile mms.apk?
EDIT: Nevermind, I figured out what the problem was. I also needed to bring out and install the resources from the rom for the decompile to work.
SprintTouchPro2 said:
yes i typed in cmd: apktool if framework-res.apk but not apktool d systemui.apk I don't want to decompile that file. I'm confused about why you're telling me to decompile that file. can you please give me an explanation as to why I need to decompile that file to decompile mms.apk?
EDIT: Nevermind, I figured out what the problem was. I also needed to bring out and install the resources from the rom for the decompile to work.
Click to expand...
Click to collapse
Can you post more info on this?

[Q] Re-compile framework-res.apk

I am trying to make some minor changes to framework-res.apk in /res/values/bools.xml
I used apktool to decompile and make my changes but I am not sure how to properly re-compile.
Just "apktool b framework-res" errors out with invalid resource names.
Finally got it to re-compile by pasting the resource.arsc. from original apk(Dunno if this is correct way)
Then, after re-compile I paste the META-INF from the original apk.
I am hesitant to push this onto my phone now because to file sizes of the modified and original .apk differ by like 2mb. And theres 100 more files in /res of the modified .apk. (Now shows file I was trying to access by decompiling before)
Can I safely push the .apk? or am I doing it completly wrong?
Thanks!
( I did search forums and web before, but did not find anyone having to copy resource.arsc before re-compiling)
trailblazerz11 said:
I am trying to make some minor changes to framework-res.apk in /res/values/bools.xml
I used apktool to decompile and make my changes but I am not sure how to properly re-compile.
Just "apktool b framework-res" errors out with invalid resource names.
Finally got it to re-compile by pasting the resource.arsc. from original apk(Dunno if this is correct way)
Then, after re-compile I paste the META-INF from the original apk.
I am hesitant to push this onto my phone now because to file sizes of the modified and original .apk differ by like 2mb. And theres 100 more files in /res of the modified .apk. (Now shows file I was trying to access by decompiling before)
Can I safely push the .apk? or am I doing it completly wrong?
Thanks!
( I did search forums and web before, but did not find anyone having to copy resource.arsc before re-compiling)
Click to expand...
Click to collapse
FOr me, APKtool works as ****...
What you can do: pull /system/framework/framework-res.apk ~/backup
and then you can push. If it doesn't work, then boot into recovery, select mount system and push back the old one.
OT: I don't get why you should use original resources.arsc...
offtopic: when I decompile framework-res using apktool, I get other file structure then normal extract. example: my framework-res doenst have a raw-folder, but apktool decompiled has...
mDroidd said:
FOr me, APKtool works as ****...
What you can do: pull /system/framework/framework-res.apk ~/backup
and then you can push. If it doesn't work, then boot into recovery, select mount system and push back the old one.
OT: I don't get why you should use original resources.arsc...
offtopic: when I decompile framework-res using apktool, I get other file structure then normal extract. example: my framework-res doenst have a raw-folder, but apktool decompiled has...
Click to expand...
Click to collapse
This is due to the raw folder being combined into the resources file. Search for apkmultitool it is a far easier tool to use and will do everything you need. That goes for both posts
Before doing that, create a flashable zip containing the framework-res.apk file which you can use in case you get a black screen or something.
So that you don't have to restore.
You do realize that resources.arsc, aka resources directory is the collection of xml and other data. You take it from another ROM, how on earth will your xml edits be preserved?
Sent from my HTC Desire using Tapatalk
I need to edit the bools.xml file in framework-res.apk and an a bit stuck on the apktool. I used the APK Multitool to decompile the framework-res.apk file. I then used notepad++ to edit the bools.xml file. I then recompiled it using the APK Multitool and pushed it to /system/framework overwriting the original (after first making a copy of the original). On reboot the phone is stuck in a boot loop.
I managed to use ADB shell to restore the original file and it now boots (I lost all the synchronise stuff but not a big deal). So I have been searching and have found various posts about the later versions of apktool not working very well.
I have a fairly clean Windows 7 x86 installation with Java 1.6 and am using this to do the work on. Can someone point me in the right direction as to how to edit/recompile the framework-res.apk file?
Andy
I actually also trying to edit bools.xml located in framework-res.apk
I'm using Apk Changer it may be easier.
after some tries (and bootloops) I've managed to do some changes in framework-res : replacing pictures -> It works
after decompiling the apk, when I edit values within bools.xml , & then choose to compile, it creates a folder called "keep" and i have to delete edited files in that folder so as to replace them by my customized files.
BUT I don't find the folder "values" that contains bools.xml . Therefore, the generated apk will not make changes done in bools.xml .
Does anyone has any idea about Editing that xml ?
More details & Tuto :
http://forum.xda-developers.com/showthread.php?t=916814
http://forum.xda-developers.com/showpost.php?p=9066440&postcount=1
http://forum.xda-developers.com/showpost.php?p=9978779&postcount=62
@ADB100
Advanced Decompiling
Sometimes, you have that pesky app that just won't decompile correctly. Usually, it's an app related to others, like a proprietary system app based off framework-res.apks.
When this happens, you need to ensure that the frameworks are there to have the app's recourse tables properly compile.
For either apktool or apk manager, find a folder on your computer called "apktool."
The should be a folder in here called "framework," and inside that, a 1.apk.
For an app that is dependent on the framework-res.apk in a specific phone/rom, take the framework-res.apk for that rom and rename it 1.apk.
Replace the default one in the folder with yours.
If there's a second one, like the twframework-res.apk for Samsung phones, rename it 2.apk and place it in the "framework" folder.
Now, decompile like normal, and everything should be good
//By theimpaler747
Click to expand...
Click to collapse
-Yasser-
-yasser- said:
I actually also trying to edit bools.xml located in framework-res.apk
I'm using Apk Changer it may be easier.
after some tries (and bootloops) I've managed to do some changes in framework-res : replacing pictures -> It works
after decompiling the apk, when I edit values within bools.xml , & then choose to compile, it creates a folder called "keep" and i have to delete edited files in that folder so as to replace them by my customized files.
BUT I don't find the folder "values" that contains bools.xml . Therefore, the generated apk will not make changes done in bools.xml .
Does anyone has any idea about Editing that xml ?
More details & Tuto :
http://forum.xda-developers.com/showthread.php?t=916814
http://forum.xda-developers.com/showpost.php?p=9066440&postcount=1
http://forum.xda-developers.com/showpost.php?p=9978779&postcount=62
@ADB100
-Yasser-
Click to expand...
Click to collapse
The values folders get compressed into the resources.arsc file so in the keep folder delete this file and your changes will stick
not sure if you got this figured out yet but if not heres how the whole process should go.
Code:
apktool if framework-res.apk
if on a sense based rom do this too
Code:
apktool if com.htc.resources.apk
change to the directory where your framework-res.apk is
Code:
apktool d -f framework-res.apk out
or something like this if apktool is not in your path
Code:
apktool d -f ~/Desktop/framework-res.apk ~/Desktop/out
easy way to build is to cd to out folder
Code:
cd ~/Desktop/out
to build apk
Code:
apktool b
then just sign apk if needed
if you are on linux you can try this:
http://forum.xda-developers.com/showthread.php?t=1446233
wes342 said:
not sure if you got this figured out yet but if not heres how the whole process should go.
Code:
apktool if framework-res.apk
if on a sense based rom do this too
Code:
apktool if com.htc.resources.apk
change to the directory where your framework-res.apk is
Code:
apktool d -f framework-res.apk out
or something like this if apktool is not in your path
Code:
apktool d -f ~/Desktop/framework-res.apk ~/Desktop/out
easy way to build is to cd to out folder
Code:
cd ~/Desktop/out
to build apk
Code:
apktool b
then just sign apk if needed
if you are on linux you can try this:
http://forum.xda-developers.com/showthread.php?t=1446233
Click to expand...
Click to collapse
Thanks for this. This is what I have done but it hasn't worked for me so far. I am not sure whether I need to sign the file or not - I suspect I do?
Apart from the boot-loop another thing that worries me is the file sizes - the original framework-res.apk is 6,135,120-bytes whilst the new one is 3,319,608-bytes.
My ROM is based on the stock rooted 3.12.405.1 by nitro. The framework-res.apk already had a modification (the default wallpaper was changed) and I changed this back by just replacing the image in the .apk from WinRar and this worked fine. I want to edit the bools.xml file and get it back into the resources.arsc file.
Andy
ADB100 said:
Thanks for this. This is what I have done but it hasn't worked for me so far. I am not sure whether I need to sign the file or not - I suspect I do?
Apart from the boot-loop another thing that worries me is the file sizes - the original framework-res.apk is 6,135,120-bytes whilst the new one is 3,319,608-bytes.
My ROM is based on the stock rooted 3.12.405.1 by nitro. The framework-res.apk already had a modification (the default wallpaper was changed) and I changed this back by just replacing the image in the .apk from WinRar and this worked fine. I want to edit the bools.xml file and get it back into the resources.arsc file.
Andy
Click to expand...
Click to collapse
No you don't have to sign the framework API. System apks are signed. What edits are you trying to do?
zelendel said:
No you don't have to sign the framework API. System apks are signed. What edits are you trying to do?
Click to expand...
Click to collapse
All I want to edit is the bools.xml file so I can enable the SIP client to work over 3G: i.e. change this line in the file and re-cook it
Code:
<bool name="config_sip_wifi_only">true</bool>
This is potentially the 1st step though. If I can sucessfully edit this then I will probably try other things.
Andy
ADB100 said:
All I want to edit is the bools.xml file so I can enable the SIP client to work over 3G: i.e. change this line in the file and re-cook it
Code:
<bool name="config_sip_wifi_only">true</bool>
This is potentially the 1st step though. If I can sucessfully edit this then I will probably try other things.
Andy
Click to expand...
Click to collapse
Ok so here is a step by step that I have used to make just this edit.
Apkmultitool is the one I use.
1. Decompile the apk
2. Change the false to true
3. Compile with option 11
4. In the keep folder delete the resource.asc file and then finish compiling.
5. Put New apk in zip removing the unsigned so it is named properly
6. Flash
zelendel said:
Ok so here is a step by step that I have used to make just this edit.
Apkmultitool is the one I use.
1. Decompile the apk
2. Change the false to true
3. Compile with option 11
4. In the keep folder delete the resource.asc file and then finish compiling.
5. Put New apk in zip removing the unsigned so it is named properly
6. Flash
Click to expand...
Click to collapse
OK - just removed and reinstalled APK Multitool, verified the path environment variable and followed these steps - Step 3 where it asks whether this is a system apk I said yes and when it asks about copying files I said yes. The resulting file is now 5,653KB compared to the original that is 5,992KB. I assume the difference is the lack of signing?
Does this sound right?
Andy
ADB100 said:
OK - just removed and reinstalled APK Multitool, verified the path environment variable and followed these steps - Step 3 where it asks whether this is a system apk I said yes and when it asks about copying files I said yes. The resulting file is now 5,653KB compared to the original that is 5,992KB. I assume the difference is the lack of signing?
Does this sound right?
Andy
Click to expand...
Click to collapse
That and the compression level that is used. It will also change if you optimize the pngs. Nothing to really worry about
I am obviously doing something fundamentally wrong
I followed the instructions to the letter, created the unsignedframework-res.apk, renamed it, pushed it to to my device (adb remount, adb push framework-res.apk system/framework/framework-res.apk) and rebooted - boot loop. Tried signing it with APK Multitool and then pushing this file. This time it booted but I had forced close on all sorts of things. Restored the original file and it is working again but all the sync stuff has screwed up meaning I need to re-flash as my ROM has stuff in /data that will get wiped if I do a factory reset.
Any other pointers or do you want to try editing the file for me and I'll see if yours works? I have attached the original file.
Andy
ADB100 said:
I am obviously doing something fundamentally wrong
I followed the instructions to the letter, created the unsignedframework-res.apk, renamed it, pushed it to to my device (adb remount, adb push framework-res.apk system/framework/framework-res.apk) and rebooted - boot loop. Tried signing it with APK Multitool and then pushing this file. This time it booted but I had forced close on all sorts of things. Restored the original file and it is working again but all the sync stuff has screwed up meaning I need to re-flash as my ROM has stuff in /data that will get wiped if I do a factory reset.
Any other pointers or do you want to try editing the file for me and I'll see if yours works? I have attached the original file.
Andy
Click to expand...
Click to collapse
I've tried to change it for you,
Code:
<bool name="config_sip_wifi_only">false</bool>
The file size is reduced to 3.23 Mb maybe it's bcz of optimizing effect..
check if it works .
-Yasser-
-yasser- said:
I've tried to change it for you,
Code:
<bool name="config_sip_wifi_only">false</bool>
The file size is reduced to 3.23 Mb maybe it's bcz of optimizing effect..
check if it works .
-Yasser-
Click to expand...
Click to collapse
Hi
Thanks for this. Just renamed this and pushed it to my DHD, rebooted and yep it works. I haven't built a ROM with it yet but this tells me something is wrong at my end....
I have a fairly vanilla Dell PC with Windows 7 Ultimate x86 OEM. I have installed the DSIXDA kitchen and have been building ROMs for my DHD for a while. I have some of the Android SDK installed but maybe not all or updated (not sure if this is a problem?) but enough for adb.exe to work? I have installed the APK Multitool (obviously) and some other utilities (Ultimate Multi Tool, HTC Sync)
Other than that its a pretty clean machine - Microsoft Security Essentials and WinRar is all that's installed. This is a spare PC that I wiped recently and installed Windows 7 on and all I am really using it for is making android ROMs.
EDIT: Just built a ROM with this framework-res.apk as swapping this after I have configured account sync seems to screw the accounts up (they sync but aren't displayed in Settings, Accounts & Sync). Anyway the ROM built OK and its all working. I'd really like to know what I am doing wrong with editing the APK?
Andy
OK.
I don't really know what's wrong with your PC, or procedure ..
I'll tell you what I am doing, that may helps.
I'm using apk changer . download it from here
I think It's nearly the same as other tools, although you can try it.
For editing framework-res.apk,
first open cmd : cd <..>\apk_changer\other (folder containing apktool.jar)
then type : java -jar apktool.jar if <PATH To>\framework-res.apk
It should tell you that "framework installed to ..."
Now put your framework-res.apk in "place-files-here-for-modding"
and run apkchanger.bat choose 1 (decompile) and 3 (for sources & resources)
Do your modifications.
then return to bat, type 3 (compile). yes for system apk & yes for replacing original files.
a 'keep' folder will be created, delete resources.asc inside it.
type enter within cmd & you're done . check the new file in "place-files-here-for-modding" (unsignedframework-res.apk)
Yasser
-yasser- said:
OK.
I don't really know what's wrong with your PC, or procedure ..
I'll tell you what I am doing, that may helps.
I'm using apk changer . download it from here
I think It's nearly the same as other tools, although you can try it.
For editing framework-res.apk,
first open cmd : cd <..>\apk_changer\other (folder containing apktool.jar)
then type : java -jar apktool.jar if <PATH To>\framework-res.apk
It should tell you that "framework installed to ..."
Now put your framework-res.apk in "place-files-here-for-modding"
and run apkchanger.bat choose 1 (decompile) and 3 (for sources & resources)
Do your modifications.
then return to bat, type 3 (compile). yes for system apk & yes for replacing original files.
a 'keep' folder will be created, delete resources.asc inside it.
type enter within cmd & you're done . check the new file in "place-files-here-for-modding" (unsignedframework-res.apk)
Yasser
Click to expand...
Click to collapse
Hi
Thanks for replying. I am going to wipe and reinstall Windows 7. I know it seems a bit drastic but its the only way I can eliminate it - plus its just a PC in the corner that has no important stuff (apart from the android stuff) on it.
Andy

[Q] Edited SystemUI.apk simply not working.

Hey,
I have a devastatingly annoying problem on my hands, involving my SystemUI.apk (go figure).
You see, I've been trying to edit my status bar, and make it semi-transparent.
First, I followed this guide: http://forum.xda-developers.com/showthread.php?t=2144911
And then this one: http://forum.xda-developers.com/showthread.php?t=2204389
But neither seemed to work. All I get is a message telling me that SystemUI.apk has stopped working (I have tried rebooting, it doesn't work.)
Now the process I went through to edit the .apk file was, of course:
1. I extracted /system (and all its apks) with adb
2. I installed the framework of both framework-res.apk and SystemUI.apk with apktool using:
Code:
apktool if framework-res.apk
and
Code:
apktool if SystemUI.apk
2. I decompiled the apk with apktool
Code:
apktool d SystemUI.apk SystemUI_new
3. I edited the status_bar.xml file with Notepad++
4. I recompiled with, again, apktool.
5. I went and made a copy of the original apk, and copied the altered files from the edited apk to the copied one.
6. To be safe, I got drag2sign (the bat file, yes) and signed the apk.
7. I copied the new apk onto my phone, and put it in /system/app/ to replace the original .apk
8. After rebooting my phone, my status bar was gone.
Just to be sure, I went ahead and copied back the original SystemUI.apk back into system/app just to check if I was putting it in the wrong place, but after rebooting once more it worked fine.
I have a niggling suspicion that it was something either to do with the permissions that are set on my edited apk (--- r-x rwx, which I have no idea how to change) or the fact that I'm meant to edit something in the framework-res.apk or twframework-res.apk, which both remain at a plain deodex as of now. I have attached the edited apk, just so if anyone wants to take a thorough look at the one line I changed to tell me what I have done wrong, they can go right on ahead.
The only reason I am being so unnaturally detailed in this question is I have quite honestly had it with this stupid SystemUI.apk, and am desperate for help. Please, if you have anymore questions you have to ask about what I have/haven't done, please, ask away. If you have a solution, feel free to berate my stupidity. If there is a thread on XDA which I overlooked, please shove it in my face. Anything to figure out what the hell I am doing wrong.
PLEASE HELP!

Categories

Resources