[Q] How to edit systemui.apk in Stock ROM? - Moto G5 Questions & Answers

How to edit systemui.apk in Stock ROM?

denisf1981 said:
How to edit systemui.apk in Stock ROM?
Click to expand...
Click to collapse
Decompile it with apktool
Make changes
Recompile with apktool
Push to system with permissions 644 & restart phone or make a flashable zip
Apktool with instructions & usage can be found
https://ibotpeaches.github.io/Apktool/
Can use Ubuntu/Linux or Windows
Obviously requires rooted phone

Related

I Can't Find The twframework-res.apk

So I am trying to using apk-took but I can not located the twframework-res.apk I have found the framework-res.apk in /system/framework/ directory and place both files in the other folder. I am running the stock rooted rom. Do I need to find the rom and decompile it or does someone already have those files for the GN that I can use. Any help would be nice. Thanks :cyclops:
LOL because we dont have a touchwiz framework-res.apk why are you looking for it anyways?
I figured, I thought it was required for apk tool. Thanks for the reassurance though and taking your time to answer this question.
Nope just need to run
Code:
apktool if framework-res.apk
then you can start decompiling system apps and such. Make sure you have the framework-res.apk from your ROM and running that command in the same directory (folder) as the APK.
ÜBER™ said:
LOL because we dont have a touchwiz framework-res.apk why are you looking for it anyways?
Click to expand...
Click to collapse
Hello! Where to find the twframework-res.apk in Android Oreo?

Please help me in this problem

Pleas Help..
When I work Combile and Decombile APKTOOL for File framwork-res.apk
Of Version Jelly Bean 4.1.2 XXLSJ All OK
But When Add My Rom BootLoop
Are you signing the apk after you recompile it??
Sent from my GT-I9300 using Tapatalk 2
AuSSiELaMbChOpS said:
Are you signing the apk after you recompile it??
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
no signing apk
whats this broplem
help
heeeeeeeeeeeeeeeeeeeeeeelp
amro habib said:
help
heeeeeeeeeeeeeeeeeeeeeeelp
Click to expand...
Click to collapse
The problem is with the signing. (The framework-res.apk has to be signed with the platform key)
Try to sign the apk (use apkmultitool), but I think it won't work, because you wont have the platform key.
I suggest you to do the following:
If you use apktool or apk-multi-tool apkmultitool.com:
1) if you want to change drawables, just push the new png-s into the original framework-res.apk (open the original framework-res.apk with 7zip, and drag and drop the new png in the corresponding drawable folder).
2) if you want to change xml-s, decompile framework-res.apk, change xml-s, recompile framework-res.apk, then extract the "resources.arsc" from the new apk, and push it to the original framework-res.apk (again with 7zip or any compatible file manager)
3) if you change some smali code, then you need to the same as in step 2, but with the classes.dex file.
Basically you should use the original framework-res.apk as a starting point, and (without extracting it) push all your mods into it!
OR try the UOT kitchen: http://uot.dakra.lt/
Cheers!
Gyebro said:
The problem is with the signing. (The framework-res.apk has to be signed with the platform key)
Try to sign the apk (use apkmultitool), but I think it won't work, because you wont have the platform key.
I suggest you to do the following:
If you use apktool or apk-multi-tool apkmultitool.com:
1) if you want to change drawables, just push the new png-s into the original framework-res.apk (open the original framework-res.apk with 7zip, and drag and drop the new png in the corresponding drawable folder).
2) if you want to change xml-s, decompile framework-res.apk, change xml-s, recompile framework-res.apk, then extract the "resources.arsc" from the new apk, and push it to the original framework-res.apk (again with 7zip or any compatible file manager)
3) if you change some smali code, then you need to the same as in step 2, but with the classes.dex file.
Basically you should use the original framework-res.apk as a starting point, and (without extracting it) push all your mods into it!
OR try the UOT kitchen: http://uot.dakra.lt/
Cheers!
Click to expand...
Click to collapse
all this work bootloop..

[Q]How to decompile framework.apk?

When I recompile framework-res.apk,the apktool notice "aapt:...".And the framework-res.apk still be builded.But I replace the resources.arsc and put it in the phone,reboot and always in bootanimation.I used apktool 1.4.10,1.5.0,1.5.1... and so on.I can not solve this problem,I need help.
Sent from my lt28h use sony fw.
kin912 said:
When I recompile framework-res.apk,the apktool notice "aapt:...".And the framework-res.apk still be builded.But I replace the resources.arsc and put it in the phone,reboot and always in bootanimation.I used apktool 1.4.10,1.5.0,1.5.1... and so on.I can not solve this problem,I need help.
Sent from my lt28h use sony fw.
Click to expand...
Click to collapse
I am not clear from what you did. But you need to do it this way.
apktool if ion SemcGenericUxRes.apk
apktool d -t ion framework-res.apk out
make changes to decompiled source
apktool b out new.framework-res.apk
Now open both framework-res.apk and new.framework-res.apk side by side using an archiver. Do not use windows open.
Now you will notice one thing that the new framework does not contain META-INF folder.
Delete the resources.arsc file from the original framework-res. Drag the resources.arsc from the new framework-res and dump it on to the original framework-res. Close both the files.
Now you are ready to use the updated original framework-res.apk
ganeshbiyer said:
I am not clear from what you did. But you need to do it this way.
apktool if ion SemcGenericUxRes.apk
apktool d -t ion framework-res.apk out
make changes to decompiled source
apktool b out new.framework-res.apk
Now open both framework-res.apk and new.framework-res.apk side by side using an archiver. Do not use windows open.
Now you will notice one thing that the new framework does not contain META-INF folder.
Delete the resources.arsc file from the original framework-res. Drag the resources.arsc from the new framework-res and dump it on to the original framework-res. Close both the files.
Now you are ready to use the updated original framework-res.apk
Click to expand...
Click to collapse
No need to install framework-res.apk only just SemcGenericUxpRes.apk?
ganeshbiyer said:
I am not clear from what you did. But you need to do it this way.
apktool if ion SemcGenericUxRes.apk
apktool d -t ion framework-res.apk out
make changes to decompiled source
apktool b out new.framework-res.apk
Now open both framework-res.apk and new.framework-res.apk side by side using an archiver. Do not use windows open.
Now you will notice one thing that the new framework does not contain META-INF folder.
Delete the resources.arsc file from the original framework-res. Drag the resources.arsc from the new framework-res and dump it on to the original framework-res. Close both the files.
Now you are ready to use the updated original framework-res.apk
Click to expand...
Click to collapse
I try to decompile this mod and it's sucessful.--->http://forum.xda-developers.com/showthread.php?t=2047999
Once I do the original framework-res I fail to make it use.
kin912 said:
I try to decompile this mod and it's sucessful.--->http://forum.xda-developers.com/showthread.php?t=2047999
Once I do the original framework-res I fail to make it use.
Click to expand...
Click to collapse
How are you trying to use it. Tell me the steps.
ganeshbiyer said:
How are you trying to use it. Tell me the steps.
Click to expand...
Click to collapse
1.Install framework about framework-res.apk and SemcGenericUxpRes.apk.
2.Decompile framework-res.apk and make change of the source.
3.Recompile framework-res.apk and build the new framework-res.apk.
4.Take the resources.arsc and the raw which I changed from the new framework-res.apk to the original framework-res.apk.
5.Replace the final framework-res.apk in my phone with 644 permission.
I reboot and loop in the bootanimation.
kin912 said:
1.Install framework about framework-res.apk and SemcGenericUxpRes.apk.
2.Decompile framework-res.apk and make change of the source.
3.Recompile framework-res.apk and build the new framework-res.apk.
4.Take the resources.arsc and the raw which I changed from the new framework-res.apk to the original framework-res.apk.
5.Replace the final framework-res.apk in my phone with 644 permission.
I reboot and loop in the bootanimation.
Click to expand...
Click to collapse
What are the sizes of the frameworks-res.apk's
ganeshbiyer said:
What are the sizes of the frameworks-res.apk's
Click to expand...
Click to collapse
Original:21MB
Decompile:14.9MB
If I do nothing change only recompile the frameworks-res.apk,it still has the bug.
kin912 said:
Original:21MB
Decompile:14.9MB
If I do nothing change only recompile the frameworks-res.apk,it still has the bug.
Click to expand...
Click to collapse
If you have followed pepitos tutorial from themes section then it should be ok.
There is nothing else to do.
Sent from my LT28i using xda premium
ganeshbiyer said:
If you have followed pepitos tutorial from themes section then it should be ok.
There is nothing else to do.
Sent from my LT28i using xda premium
Click to expand...
Click to collapse
I make sure the steps are ok because I can decompile the framework.apk of miui.Anyway,thanks a lot!

[GUIDE][MOD] Enable navigation bar 4.2.2

This is a quick dev guide to enable navigation bar for S4.
Decompile SystemUI.apk go to res/values/drawables and add:
Code:
[COLOR=#8b008b]<item [COLOR=#ff0000]type[/COLOR][COLOR=#0000ff]="drawable"[/COLOR] [COLOR=#ff0000]name[/COLOR][COLOR=#0000ff]="tw_navigationbar_bg"[/COLOR]>[/COLOR]#ff000000[COLOR=#8b008b]</item>[/COLOR]
Now download attached files and copy files to corresponding folders in SystemUI.apk if folder does not exist(drawables-xhdpi) create it.
Compile SystemUI.apk and push to device (nothing will happen yet) Just to check device boots fine.
Now use any buil.prop editor and add line:
Code:
qemu.hw.mainkeys=0
You can also enable it now through framework-res method.
Reboot and your done.
Please hit thanks and give credits.
Hi OP,
This looks just what I've been waiting for - if only there was a way to disable the stock menu and back buttons; my only gripe with the S4 is that I'm always touching one of theses buttons accidentally
JibbaJoy said:
Hi OP,
This looks just what I've been waiting for - if only there was a way to disable the stock menu and back buttons; my only gripe with the S4 is that I'm always touching one of theses buttons accidentally
Click to expand...
Click to collapse
This can easily be done when I find time I will add how to.
Sent from my GT-I9505 using xda premium
works perfect but no text under buttons below could you add them
I can´t find the /values/drawables after extracted the SystemUI.apk ? And where to add the following code please.
<item type="drawable" name="tw_navigationbar_bg">#ff000000</item>
missing /values/drawables
https://dl.dropboxusercontent.com/u/41923164/Untitled.png
janjan said:
I can´t find the /values/drawables after extracted the SystemUI.apk ? And where to add the following code please.
<item type="drawable" name="tw_navigationbar_bg">#ff000000</item>
missing /values/drawables
https://dl.dropboxusercontent.com/u/41923164/Untitled.png
Click to expand...
Click to collapse
you have to put <item type="drawable" name="tw_navigationbar_bg">#ff000000</item> inside drawables.xml, you can find it under decompiled SystemUI.apk /res/values
edit: copy the files to SystemUI.apk/res and add the line qemu.hw.mainkeys=0 with root explorer (text editor mode) in build.prop
bruzski said:
you have to put <item type="drawable" name="tw_navigationbar_bg">#ff000000</item> inside drawables.xml, you can find it under decompiled SystemUI.apk /res/values
edit: copy the files to SystemUI.apk/res and add the line qemu.hw.mainkeys=0 with root explorer (text editor mode) in build.prop
Click to expand...
Click to collapse
But after decompiled SystemUI.apk. /res/values is missing. Se the picture which i post above. thanks
janjan said:
But after decompiled SystemUI.apk. /res/values is missing. Se the picture which i post above. thanks
Click to expand...
Click to collapse
decompiled SystemUI.apk doesn't seem complete !! do you get errors while decompiling ? what version of apktool do you use?
I am using APK-Multi-Tool-Stable-RELEASE which is the latest version. no error during decompiling.. Which version do you use? Iam going to decompile it once again.
Edit.. still missing https://dl.dropboxusercontent.com/u/41923164/missing.png
i use ApkManager V6.1, works great!
Deleted
it seems this method is not working for me. i followed the instructions on the OP
include framework-res.apk, twframework-res.apk with "apktool if"
decomplie systemui.apk
modify res/values/drawables.xml to include <item type="drawable" name="tw_navigationbar_bg">#ff000000</item>
copy and replace files from the Navigation.zip into the res folder
recompile systemui.apk
i get a lot of @Styles errors and no default warnings when i try to compile
I tried using both latest version of apktool v152 and aapt from feb 2013 method and apkmanager v6.1 method and the results are the same
after i cleared the @style warnings with the "+" solution I am able to compile systemui.apk but when I copy it onto my device I lost the status bar and I still cant enable the navigation bar.
anyone else getting the same results?
TIA
Decompile errors
I'm trying to decompile SystemUI.apk (copied it from my phone "system\app" to "\place-apk-here-for-modding" folder) using ApkManager V6.1.
I'm getting an error message. Can somebody help please ? Log is attached.
Thanks!
Ok. I was able to decompile SystemUI.apk using ApkManager V6.1. The problem was in missing framework-res.apk and twframework-res.apk in "apktool" folder.
Now I'm getting errors on apk compilation. Please take a look at the attached log file. What am I missing now ?
Thank you!
hocgwai said:
it seems this method is not working for me. i followed the instructions on the OP
include framework-res.apk, twframework-res.apk with "apktool if"
decomplie systemui.apk
modify res/values/drawables.xml to include <item type="drawable" name="tw_navigationbar_bg">#ff000000</item>
copy and replace files from the Navigation.zip into the res folder
recompile systemui.apk
i get a lot of @Styles errors and no default warnings when i try to compile
I tried using both latest version of apktool v152 and aapt from feb 2013 method and apkmanager v6.1 method and the results are the same
after i cleared the @style warnings with the "+" solution I am able to compile systemui.apk but when I copy it onto my device I lost the status bar and I still cant enable the navigation bar.
anyone else getting the same results?
TIA
Click to expand...
Click to collapse
I just noticed that I have exactly the same problem as you are. Were you able to get it working ?
Its is more difficult decompiling and recompiling S4 SystemUI and I don't have time to write a tut now so 2 options
Use this you can turn nav bar on off with settings app or
Use this SystemUI.apk I have done the work for you it will recompile as normal and the only mod is %battery apart from that it is stock.
gharrington said:
Its is more difficult decompiling and recompiling S4 SystemUI and I don't have time to write a tut now so 2 options
Use this you can turn nav bar on off with settings app or
Use this SystemUI.apk I have done the work for you it will recompile as normal and the only mod is %battery apart from that it is stock.
Click to expand...
Click to collapse
Thank you !
One question before I proceed with your advice. I have Canadian SGH-I337M version with rooted stock I337MUMUAMDJ rom.
Can I use your SystemUI.apk (%battery mode) with my ROM ?
fmark said:
Thank you !
One question before I proceed with your advice. I have Canadian SGH-I337M version with rooted stock I337MUMUAMDJ rom.
Can I use your SystemUI.apk (%battery mode) with my ROM ?
Click to expand...
Click to collapse
People have reported this working but just make a backup first nothing ventured nothing gained
All I do is have 2 zips on my sdcard the original and the modded one if the mod fails simply boot into recovery and reflash original it takes 1 min to be up and running again
fmark said:
Ok. I was able to decompile SystemUI.apk using ApkManager V6.1. The problem was in missing framework-res.apk and twframework-res.apk in "apktool" folder.
Now I'm getting errors on apk compilation. Please take a look at the attached log file. What am I missing now ?
Thank you!
Click to expand...
Click to collapse
If you get an error in decompiling the apk, remove the "system_bar_settings_view.xml" and "system_bar_notification_panel_title.xml" from the layout folder
(SystemUI.apk\res\layout\). Don't forget to put the files back after compiling the modded statusbar.
:fingers-crossed:
bruzski said:
If you get an error in decompiling the apk, remove the "system_bar_settings_view.xml" and "system_bar_notification_panel_title.xml" from the layout folder
(SystemUI.apk\res\layout\). Don't forget to put the files back after compiling the modded statusbar.
:fingers-crossed:
Click to expand...
Click to collapse
Decompiling is fine - no errors. I'm getting errors when compiling.
---------- Post added at 07:29 AM ---------- Previous post was at 07:26 AM ----------
gharrington said:
People have reported this working but just make a backup first nothing ventured nothing gained
All I do is have 2 zips on my sdcard the original and the modded one if the mod fails simply boot into recovery and reflash original it takes 1 min to be up and running again
Click to expand...
Click to collapse
No, unfortunately your systemui.apk is not compatible with my Rom.
I need to solve compilation errors. Any advice on that?
Thank you!

How to mod android.policy.jar?

My Xperia S is official , it is odex
I want to mod the android.policy.jar
but I find it in system/framework/android.policy.jar is only 1KB
and the android.policy.jar next to android.policy.odex which is 369KB
I think the android.policy.odex is normal.
The android.policy.jar 's information is not I need , only have a small data!
How can i mod the android.policy.jar??
Thank you Very much~!
The android.policy.jar & android.policy.odex :
View attachment 2205036
:fingers-crossed:
lllllllllll said:
My Xperia S is official , it is odex
I want to mod the android.policy.jar
but I find it in system/framework/android.policy.jar is only 1KB
and the android.policy.jar next to android.policy.odex which is 369KB
I think the android.policy.odex is normal.
The android.policy.jar 's information is not I need , only have a small data!
How can i mod the android.policy.jar??
Thank you Very much~!
The android.policy.jar & android.policy.odex :
View attachment 2205036
:fingers-crossed:
Click to expand...
Click to collapse
Hi,
In order to make changes in the android policy.jar file, you first need to deodex it. You can very easily deodex it using my software over here - http://forum.xda-developers.com/showthread.php?t=2213235
Then, follow this huide to decompile the jar - http://forum.xda-developers.com/showthread.php?t=1732635
Good luck
Sent from my LT26i using xda app-developers app
abcdjdj said:
Hi,
In order to make changes in the android policy.jar file, you first need to deodex it. You can very easily deodex it using my software over here - http://forum.xda-developers.com/showthread.php?t=2213235
Then, follow this huide to decompile the jar - http://forum.xda-developers.com/showthread.php?t=1732635
Good luck
Sent from my LT26i using xda app-developers app
Click to expand...
Click to collapse
OK, thank you
Am i just deodex the android policy.jar? Do not need to deodex my rom?
Then , it is different for decompile the jar and decompile the apk?
Thank YoU ~
I'm Hongkonger~~ :victory:
lllllllllll said:
OK, thank you
Am i just deodex the android policy.jar? Do not need to deodex my rom?
Then , it is different for decompile the jar and decompile the apk?
Thank YoU ~
I'm Hongkonger~~ :victory:
Click to expand...
Click to collapse
You do not need to deodex your entire rom. Only deodexing the android policy.jar file will suffice. Decompiling a jar file is slightly different from decompiling an apk. We do not use apktool to decompile jar files but execute these two commands - (First extract classes.dex from anroid policy.jar using winrar and place it in the same folder as smali.jar and baksmali.jar)
Code:
java -jar baksmali.jar -o classout/ classes.dex
Make any changes that you want to do now.
Code:
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
Then rename new-classes.dex to classes.dex and put it back into the jar file.
Regards,
abcdjdj
Is there a guide how to return to odex? My rom is odex. I now have my mod android.policy.jar
AFAIK, when you deodex a framework file, all the rest needs to be deodexed also, something that doesn't exist with apps files...
gercen said:
Is there a guide how to return to odex? My rom is odex. I now have my mod android.policy.jar
Click to expand...
Click to collapse
Here is a guide to re-odex framework files - http://forum.xda-developers.com/showthread.php?t=1208320
Felimenta97 said:
AFAIK, when you deodex a framework file, all the rest needs to be deodexed also, something that doesn't exist with apps files...
Click to expand...
Click to collapse
I am sorry, I confused framework files with apks coz I have myself tried using a deodexed apk on a fully odexed rom and it worked. You are right, using a partially deodexed framework causes bootloops.

Categories

Resources