Can't decompile SecSettings ApkTool - Galaxy S 4 Q&A, Help & Troubleshooting

Hi
I try to decompile SecSettings by apktool and i get this:
Code:
C:\apktool>apktool d secsettings.apk SecSettings23
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x7f020052 drawable/avatar_default_6, config=-hdpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165
)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
5)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
ources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
a:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav
a:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
What to do ??
Thanks

Please any help?

Same issue here
osherdadon said:
Please any help?
Click to expand...
Click to collapse
Using a Note 3 from T-Mobile, I pulled the file with the adb command, with root explorer, and extracted it from the stock ROM file all giving me the same error. For some reason I also don't get any smali files out of my SystemUI.apk which has been driving me crazy. I can't seem to find any working answers yet... Fail...
Basically bumping this thread a half a year later...
SOMEONE HELP US

You have the relevant frameworks installed and java in your path?

Learned a lot in 24 hours
DSA said:
You have the relevant frameworks installed and java in your path?
Click to expand...
Click to collapse
Summary/Lessons Learned in the last 24 hours:
I must have been too tired, went to sleep got up again and went at it. I realized a few things, main thing was deodexing, I learned all about that. Converting the .odex file to a class.dex file inside the SystemUI.apk and SecSettings.apk so decompiling would work properly (I was originally missing the smali folder without deodexing my app). Second I needed to pull all the framework files from my device instead of just the two I had, then I used "apktool if framework-res.apk" then "apktool if twframework-res.apk" then "apktool d SystemUI.apk" then "apktool d SecSettings.apk". This time it actually worked, I proceeded to try and re-compile them just to test. The SystemUI.apk worked flawlessly but the the SecSettings.apk had errors then I realized I needed to copy the AndroidManifest.xml and resources.arsc from the original app to the decompiled folder and the SecSettings.apk compiled with no issues. I had to get the original file out of the stock ROM, it had gotten damaged somehow with zipping/raring/7zipping so quicktip no one should be zipping the files you're about to work on get it fresh from the ROM.
Current Issue:
Now that all that's done I'm onto what I was trying to get at when I started this whole project. I need to modify both of these apps which are now perfectly deodexed and on my stock device. Every time I try to modify these files I lose my status bar and my settings stop working, I'm obviously breaking it, this is the XDA guide I was following.
Any help or redirection on where to post would be greatly appreciated, thanks

Easiest thing - put your mod back in and get the status bar to disappear/fc whatever
Then, pull a log (catalog from appstore works fine)
Post that log at pastebin and link it here
We won't be able to solve your issue without knowing what it is, in the first place

Like this?
This was before I restarted: Log 1
Then I recorded for a little after I restarted probably pointless but that's where the error would have been: Log 2
DSA said:
Easiest thing - put your mod back in and get the status bar to disappear/fc whatever
Then, pull a log (catalog from appstore works fine)
Post that log at pastebin and link it here
We won't be able to solve your issue without knowing what it is, in the first place
Click to expand...
Click to collapse
Not sure exactly how to record it and send it to you, I pressed record but when the phone finished rebooting CatLog was closed so I reopened it and it keeps scrolling endlessly.

Research progressed a little
I came across a post here in the Flashlight Mod development thread which made me realize I'm not getting the ID's correct. They suggest compiling the modded SystemUI.apk to get the ID's into the apk file under the /res/values/public.xml file, then decompiling it to read the ID values. I'm missing a step or doing something wrong, I can't replicate it to find the ID values I need so I can add them to the .smali file and recompile a final time. I'm sure this is the only reason for the missing status bar and the force closes. I guess I need help understanding, a different set of instructions or just more detailed?
I can't post in that thread yet so I'm getting my posts up over here, I already posted in the Q&A thread but no one has responded yet, any help is greatly appreciated!
I get this when decompiling the modded apk: Modded SystemUI ApkTool Decompile
All these errors look like the file is broken now or something, I'm just lost at this point. I tried ApkTool 1.5.2 and 2.0 as well.
EDIT:
Additional info below for troubleshooting purposes since it seems my issue recompiling at the end to get the values for my public.xml
STEPS:
1. deodex (universal deodexer v5)
2. decompile (apktool 1.5.2 & 2.0 separate tests)
3. modify (add flashlight .png's and .smali file from 4.4kk flashlight mod files)
4. recompile (apktool)
5. decompile (apktool)
=
Errors <<<<< These errors solved in edit below
EDIT:
I forgot to use "apktool if SystemUI.apk" when loading "framework-res.apk" & "twframework-res.apk" now I get through decompiling and recompiling like I thought I should be and I even located the values int he public.xml, replaced them in the .smali and everything went peachy. Only problem is I never get the status bar after I reboot, not really getting any FC's but the status bar, if my goal were to get it to be invisible I would be so happy omg lol If you're curious I've also tested by signing and even another test with zipalign, nothing zip/zero/zilch...
EDIT... Again I know still no sleep, durp durp:
So my main issue was not using apktool v1.5.2 to decompile and v2.0 to compile EVERY SINGLE TIME, NO EXCEPTIONS. When I followed that simple rule I get it onto my device and she has no status bar... Hmmmmm..... And a logcat for anyone smart enough to help me
EDIT:
Maybe I'm in the right direction with an error I saw in the log at this post? I thought it was so I installed the DisableSignatureVerification Mod from the Xposed Modules and still nothing.

Calling All Developers
It's been like 2 weeks just curious if anyone has even looked at this, I haven't been able to make any progress so I started learning how to develop apps. I made two small apps basic flashlight and a counter app but I really want to know why I'm totally unable to mod a file on my phone. I can't get the ink effect to work with finger input either I've been really trying to get this flashlight mod and the ink effect for months. If I could get pointed in the direction of a developer that can actually help me I don't see why I couldn't donate like $10 or $20 to the one who helps me. I'm on android 4.4.2 (NK3) on my Note 3 from T-Mobile.

Related

Apktool and Rosie.apk

Okay I am trying to make some changes to my Rosie. I'm not going to ask how to make the changes I want I will hopefully figure it out myself....My question is about apktool. I keep getting FC on startup after trying to decompile and the build the rosie apk without making changes. What I've done
1) apktool d Rosie.apk
no errors ( Yes I have put the correct htc framework into apktool fw)
2)I Made no changes at all
cd Rosie
apktool b
3)I go to the build dir and the apk is there from here I have tried two different things
3a) Sign the apk using
java -jar signapk.jar testkey.x509.pem testkey.pk8 Rosie.apk your_app_signed.apk
3b)Leave the apk alone withouot signing it since it's a system app I dont think it needs to be signed, but I'm not sure
4) I put into a flashable file, in my update script I wipe dalvik cache as well, everything installs fine and I know this step isn't the issue
5) I reboot nand get constant FC so I have to pull the battery
I can't figure out why I'm getting this error so If anyone can help I would appreciate it alot....Thanks
it's not just Rosie I cant get to work....It's any apk...I decompile and build and they dont work with non changes....any ideas?
Hey bro I just started a thread on this in the theming section I'm with you on the Rosie.apk can't get it to work.
I haven't done system apps before, but I have successfully used apktool. There is (if it's different or maybe I'm just losing my mind) and additional tool called apk manager that utilizes the apk tool. That's what I've used that's so successful. It basically just gives you a list of choices with what to do with your apk. All you do is place the apk in the specific folder where the script can reach it and then run he script, make your choices, and bam. You have what you want. That could be either a system apk, regular apk, or a folder that's been decompiled. (I used a tool after that called j2gui that let's you take the .classes file and see a near perfect reproduction of the original java code).
Jack Attack!
I have had my fair share of dealings with Rosie, but apktool can do the job.
Everything up to Step 3 is good, although I don't 'cd' into Rosie, I just run:
apktool b Rosie from the previous folder.
Anyway, system files like Rosie do not need to be signed so scrap that route. The issue you have is with the new Rosie.apk that's been compiled not containing the original META-INF folder so won't be accepted by the system.
Check out this post that describes in full what I am trying to say. You'll want to focus on Step 3 and onwards in that post
i'm trying to do the same thing and i'm having a ton of different problems.
I believe about a month ago I checked the Apktool website and checked their list of bugs. There is a really nasty bug in the newest version (at the time I read it) where if you generated your .apk, then some things would be written incorrectly and of course would be the reason why your apps no longer work.
I'm gonna suggest you all check what versions you have and go to the previous version which worked great, or they might have fixed that already.

[REQ] Need help decompiling/recompiling framework-res.apk

Could someone help walk me through this? I've decompiled/recompiled plenty of apks, however the framework-res.apk is being relatively stubborn. After recompiling the apk I get force closes in random areas of settings, etc.
I use apktool (as I need to edit an xml file's value), to decode, then build.
Are there any random steps I'm missing?
I've tried this over and over to get the same results everytime.
Someone said it is because of corrupted xml, and if so how do I prevent the problem from happening?
Anyway, thanks in advance.
Check out the theme guides in epic themes and apps forum, grab apk manager, the op says to decompile and recompile without making any changes as some apks can just be problematic and error. But you should be able to edit xmls (no pngs! Drag and drop after!) And recompile with no prob, use like notepad++ as windows notepad adds junk characters tat cause issues too.
Sent from my SPH-D700 using Tapatalk

Transparent statusbar...!!! Guide needed!!!

I'm [12.Aug.2012] NexusHD2-ICS-4.0.4-CM9-HWA V2.6 (Kernel: tytung_HWA_r3.4) And tried hard for a mod to make its statusbar transparent...!!!:fingers-crossed::fingers-crossed::fingers-crossed:
Followed this guide but failed as it resulting no statusbar at the end.
Please can anybody guide us(noobs) with a proper tutorial for systemUI.apk mods for our leo???
Been looking for one as well, always end up stuffing mine up.
I'm not sure which guide you followed but you can try this one - http://forum.xda-developers.com/showpost.php?p=20654552&postcount=3
And if you are looking for different mods in general check out the SGN Themes&Apps section http://forum.xda-developers.com/forumdisplay.php?f=1340
It's way more active when it comes to mods&themes compared to the HD2 section (Which consists mostly of Questions and Disscusions anyway )
gogodu5sU said:
I'm not sure which guide you followed but you can try this one - http://forum.xda-developers.com/showpost.php?p=20654552&postcount=3
And if you are looking for different mods in general check out the SGN Themes&Apps section http://forum.xda-developers.com/forumdisplay.php?f=1340
It's way more active when it comes to mods&themes compared to the HD2 section (Which consists mostly of Questions and Disscusions anyway )
Click to expand...
Click to collapse
Sorry this is the guide I followed!!!!
http://forum.xda-developers.com/show....php?t=1523703
jhha said:
Sorry this is the guide I followed!!!!
http://forum.xda-developers.com/show....php?t=1523703
Click to expand...
Click to collapse
You were right, this guide - http://forum.xda-developers.com/showthread.php?t=1523703 works well.
I actually never sign SystemUI.apk nor framework-res.apk, never had a problem with that, so you can skip that part.
Try APK Multi-Tool - http://forum.xda-developers.com/showthread.php?t=1310151
and don't forget to drop framework-res.apk into Apk_Multi-Tool\other
next open Command prompt and navigate to that folder
type
Code:
apktool if framework-res.apk
and you should be ready to de- and recompile.
Attached is 100% transparent and 50% transparent. (have not tested 50% though)
Flash in recovery.
grumbles
im trying to figure this out for the rom in my sig which is a jb rom
but that guide did help me at all lol
none of the code matched up
Thanks those two mods worked, thanks.
Kameirus said:
grumbles
im trying to figure this out for the rom in my sig which is a jb rom
but that guide did help me at all lol
none of the code matched up
Click to expand...
Click to collapse
Probably because it's a different version of Android
Permissions???
gogodu5sU said:
You were right, this guide - http://forum.xda-developers.com/showthread.php?t=1523703 works well.
I actually never sign SystemUI.apk nor framework-res.apk, never had a problem with that, so you can skip that part.
Try APK Multi-Tool - http://forum.xda-developers.com/showthread.php?t=1310151
and don't forget to drop framework-res.apk into Apk_Multi-Tool\other
next open Command prompt and navigate to that folder
type
Code:
apktool if framework-res.apk
and you should be ready to de- and recompile.
Attached is 100% transparent and 50% transparent. (have not tested 50% though)
Flash in recovery.
Click to expand...
Click to collapse
Thanks man I'll definitely try with this & let you know & many thanks for the modded zips(till I learn how to manipulate SystemUI.apk successfully my leo can enjoy it!:highfive::highfive::highfive! Thanks again.!
I found this guide too...!!! :fingers-crossed::fingers-crossed::fingers-crossed:
http://rootzwiki.com/topic/31785-co...ng-and-recompiling-jb-systemuiapk-jelly-bean/
& managed to compile the SystemUI.apk but still it results in absent status bar in either way of following
1. Replacing the original SystemUI.apk in the ROM with the modded one & installing the ROM(Tried both signed & unsigned versions)
2. After installing the original ROM & later replace the SystemUI.apk with the modded one with root explorer (Tried signed version)
But when I Edit the permission(with root explorer) of the modded SystemUI.apk copied to the system folder (As in 2nd method), as for other system apps it worked. :cyclops::laugh::laugh::laugh:
I cant understand in which step I made things wrong! In which step we manage permissions of an app while decompiling, compiling or modding.!
It'd be nice if somebody can direct me right.! Love to learn from XDA...!!!
Kameirus said:
grumbles
im trying to figure this out for the rom in my sig which is a jb rom
but that guide did help me at all lol
none of the code matched up
Click to expand...
Click to collapse
Try above link...!!! Its originally for JB...!!!:laugh:
jhha said:
Thanks man I'll definitely try with this & let you know & many thanks for the modded zips(till I learn how to manipulate SystemUI.apk successfully my leo can enjoy it!:highfive::highfive::highfive! Thanks again.!
I found this guide too...!!! :fingers-crossed::fingers-crossed::fingers-crossed:
http://rootzwiki.com/topic/31785-co...ng-and-recompiling-jb-systemuiapk-jelly-bean/
& managed to compile the SystemUI.apk but still it results in absent status bar in either way of following
1. Replacing the original SystemUI.apk in the ROM with the modded one & installing the ROM(Tried both signed & unsigned versions)
2. After installing the original ROM & later replace the SystemUI.apk with the modded one with root explorer (Tried signed version)
But when I Edit the permission(with root explorer) of the modded SystemUI.apk copied to the system folder (As in 2nd method), as for other system apps it worked. :cyclops::laugh::laugh::laugh:
I cant understand in which step I made things wrong! In which step we manage permissions of an app while decompiling, compiling or modding.!
It'd be nice if somebody can direct me right.! Love to learn from XDA...!!!
Try above link...!!! Its originally for JB...!!!:laugh:
Click to expand...
Click to collapse
yes ive seen that thanks
found out last night that the status bar transparency on jb cant be done yet
pier10 said:
Unfortunately, there's still no hack on CM10 ...the .smali files (that need to modify) isn't exist in JB.
It's rather easy on CM9. Here's the guide http://forum.xda-developers.com/showthread.php?t=1523703
btw, the notification is transparent on this theme
Click to expand...
Click to collapse
im gonna try and figure out the notification pull down later today
jhha said:
Thanks man I'll definitely try with this & let you know & many thanks for the modded zips(till I learn how to manipulate SystemUI.apk successfully my leo can enjoy it!:highfive::highfive::highfive! Thanks again.!
I found this guide too...!!! :fingers-crossed::fingers-crossed::fingers-crossed:
http://rootzwiki.com/topic/31785-co...ng-and-recompiling-jb-systemuiapk-jelly-bean/
& managed to compile the SystemUI.apk but still it results in absent status bar in either way of following
1. Replacing the original SystemUI.apk in the ROM with the modded one & installing the ROM(Tried both signed & unsigned versions)
2. After installing the original ROM & later replace the SystemUI.apk with the modded one with root explorer (Tried signed version)
But when I Edit the permission(with root explorer) of the modded SystemUI.apk copied to the system folder (As in 2nd method), as for other system apps it worked. :cyclops::laugh::laugh::laugh:
I cant understand in which step I made things wrong! In which step we manage permissions of an app while decompiling, compiling or modding.!
It'd be nice if somebody can direct me right.! Love to learn from XDA...!!!
Try above link...!!! Its originally for JB...!!!:laugh:
Click to expand...
Click to collapse
Permissions are set in the AndroidManifest.xml. (in the root folder of the decompiled apk)
Sometimes, if an app is asking for "wierd" permissions which i/it doesn't need i just delete those lines from that file.
But in your case, i don't know what happend.
Kameirus said:
yes ive seen that thanks
found out last night that the status bar transparency on jb cant be done yet
im gonna try and figure out the notification pull down later today
Click to expand...
Click to collapse
Sorry Kameirus
but i can't help you with that either, i guess you would be better off downloading the jellybean source
and try to mod it that way or wait until somebody else does.
I don't think that those "smalis" don't exist, they are just named differently
and overall just different since it's a new android version.
My guess would be, if you want to add transparency you might want to look at:
SystemUI.apk\smali\com\android\systemui\statusbar\BaseStatusBar.smali
If you are going to learn a bit about smali, you could try Virtuous Ten Studio - http://forum.xda-developers.com/showthread.php?t=1619473
It makes smali's a bit easier on the eye and has a nice smali-guide within.
gogodu5sU said:
Permissions are set in the AndroidManifest.xml. (in the root folder of the decompiled apk)
Sometimes, if an app is asking for "wierd" permissions which i/it doesn't need i just delete those lines from that file.
But in your case, i don't know what happend.
Sorry Kameirus
but i can't help you with that either, i guess you would be better off downloading the jellybean source
and try to mod it that way or wait until somebody else does.
I don't think that those "smalis" don't exist, they are just named differently
and overall just different since it's a new android version.
My guess would be, if you want to add transparency you might want to look at:
SystemUI.apk\smali\com\android\systemui\statusbar\BaseStatusBar.smali
If you are going to learn a bit about smali, you could try Virtuous Ten Studio - http://forum.xda-developers.com/showthread.php?t=1619473
It makes smali's a bit easier on the eye and has a nice smali-guide within.
Click to expand...
Click to collapse
thanks
i saw that smali a little while ago when i was going thru the folders
ill look at it later after i get home
thanks for the tip
well no luck lol
but i did learn how to flash a backup blindfolded lmao
Ok I think I figured out whats the problem is with my compiling...!!!
When you run the compile it ask to replace every thing that not modified from the original. I chose "yes" earlier all the time! But when I select "no"
I could get a working SystemUI.apk even without zipaligning or signing.! :cyclops::cyclops::cyclops:
Learning something everyday!

Decompiling/compiling SystemUI.apk

I have been trying all night to compile SystemUI.apk
Does anyone have a quick link to a guide that they used to de/compile SystemUI.apk so i can change some smali and some .xmls??
all the guides ive found have not solved my compiling issues.
Download apktool and set it up correctly make sure the latest java is installed along with the most recent jdk. You have to load the framework usually before you edit a system apk, and remember system.apk's don't need to be signed. Sometimes it is necessary to load a secondary framework-res most likely for tw roms/firmware
apktool if framework-res.apk
apktool d SystemUI.apk
Leave window open
apktool b SystemUI blahblahblah.apk
After it's done
Drag meta-inf and androidmanifest.xml from old apk to new one, zip align and rename blahblahblah.apk to specific apk and voila push to system/app set permissions rw-r-r or chmod 644 reboot wipe cache and dalkvik fix permissions and you're ready to rock and roll
There is a thread on xda by ibotpeaches concerning apktool I would take a long hard look at it before you get into this stuff. Wouldn't want you messing anything up getting your phone stuck in a boot loop.
USMC0341 said:
Download apktool and set it up correctly make sure the latest java is installed along with the most recent jdk. You have to load the framework usually before you edit a system apk, and remember system.apk's don't need to be signed. Sometimes it is necessary to load a secondary framework-res most likely for tw roms/firmware
apktool if framework-res.apk
apktool d SystemUI.apk
Leave window open
apktool b SystemUI blahblahblah.apk
After it's done
Drag meta-inf and androidmanifest.xml from old apk to new one, zip align and rename blahblahblah.apk to specific apk and voila push to system/app set permissions rw-r-r or chmod 644 reboot wipe cache and dalkvik fix permissions and you're ready to rock and roll
There is a thread on xda by ibotpeaches concerning apktool I would take a long hard look at it before you get into this stuff. Wouldn't want you messing anything up getting your phone stuck in a boot loop.
Click to expand...
Click to collapse
I already know about installing the framework, and i installed both twframework-res.apk and framework-res.apk. i also installed SystemUI.apk as per several posts. I already read through ibotpeaches' post, that is where i got apktool afterall = ). in still running into compiling errors however.
Any ideas?
As implied, I have decompiled no problem, its compiling im running into issues with.
Nv1dia said:
I have been trying all night to compile SystemUI.apk
Does anyone have a quick link to a guide that they used to de/compile SystemUI.apk so i can change some smali and some .xmls??
all the guides ive found have not solved my compiling issues.
Click to expand...
Click to collapse
Here you go man he tells you exactly how to do it its not that hardhttp://forum.xda-developers.com/showthread.php?t=2279024
Sent from my GT-I9505 using xda premium
jthrasher47 said:
Here you go man he tells you exactly how to do it its not that hardhttp://forum.xda-developers.com/showthread.php?t=2279024
Sent from my GT-I9505 using xda premium
Click to expand...
Click to collapse
I am afraid this is not the answer as my errors look nothing like that. I remember reading a while back when i themed for the GS3 that i needed to move files out of apk before decompiling, i can't seem to find this page again however..... in any case thank you both for the help, i will just have to continue looking.
Nv1dia said:
I am afraid this is not the answer as my errors look nothing like that. I remember reading a while back when i themed for the GS3 that i needed to move files out of apk before decompiling, i can't seem to find this page again however..... in any case thank you both for the help, i will just have to continue looking.
Click to expand...
Click to collapse
Why haven't you posted the log so the compile error can be seen. How can you expect help without giving all the vital information?
Sent from my SAMSUNG-SGH-I337 using Tapatalk 4 Beta
Nv1dia said:
I am afraid this is not the answer as my errors look nothing like that. I remember reading a while back when i themed for the GS3 that i needed to move files out of apk before decompiling, i can't seem to find this page again however..... in any case thank you both for the help, i will just have to continue looking.
Click to expand...
Click to collapse
That link is showing the framework-res.apk error. Your getting "style" errors correct? You need to modify 2 XMLs from the res/layout folder. And cause I'm a nice guy I'll link you to my DB that has the modified ones and originals. PM me and I'll share my DB folder with you. Its very easy. The aapt for apktool needs updating but we Ave to resort to workarounds for the time being. Same thing for framework-res.apk and others. We'll get ya straightened out!
Sent from my SPH-L720 using Tapatalk 2
reverepats said:
That link is showing the framework-res.apk error. Your getting "style" errors correct? You need to modify 2 XMLs from the res/layout folder. And cause I'm a nice guy I'll link you to my DB that has the modified ones and originals. PM me and I'll share my DB folder with you. Its very easy. The aapt for apktool needs updating but we Ave to resort to workarounds for the time being. Same thing for framework-res.apk and others. We'll get ya straightened out!
Sent from my SPH-L720 using Tapatalk 2
Click to expand...
Click to collapse
I have resolved the issue.. Thanks for the help though! Turns out a simple reboot of my computer was all i needed. I wasnt getting a styel error. It was a simple Java error is all. Thank you everyone for all your help!

Need Help Trying to Modify and Recompile SystemUI APK [Android 7.1.1] [Stock]

Hey all.
I'm trying to modify my SystemUI.apk on stock Android 7.1.1 to remove the regular system clock and add the text clock, as well as hiding the VPN icon. On previous versions of Android, I simply used apktool to decompile the SystemUI.apk and framework-res.apk, made my necessary modifications to the res folder, and then recompiled with apktool.
However, I couldn't get that to work on Android 7.1.1, and I started following this guide: http://chromloop.com/2016/11/guide-how-to-port-pixel-navigation-bar-animation-to-your-phone/
Except I still can't get my modifications to work. When I follow the necessary steps and replace my SystemUI.apk, the statusbar and navigation bar are no longer rendered on my phone. And flashing back to stock SystemUI causes the phone to crash repeatedly with an error message of "SystemUI failed to start."
Can anyone kindly point me in the right direction?
Thanks!
SiliconMage said:
Hey all.
I'm trying to modify my SystemUI.apk on stock Android 7.1.1 to remove the regular system clock and add the text clock, as well as hiding the VPN icon. On previous versions of Android, I simply used apktool to decompile the SystemUI.apk and framework-res.apk, made my necessary modifications to the res folder, and then recompiled with apktool.
However, I couldn't get that to work on Android 7.1.1, and I started following this guide: http://chromloop.com/2016/11/guide-how-to-port-pixel-navigation-bar-animation-to-your-phone/
Except I still can't get my modifications to work. When I follow the necessary steps and replace my SystemUI.apk, the statusbar and navigation bar are no longer rendered on my phone. And flashing back to stock SystemUI causes the phone to crash repeatedly with an error message of "SystemUI failed to start."
Can anyone kindly point me in the right direction?
Thanks!
Click to expand...
Click to collapse
You'll need to flash stock img, nothing else i tried worked. I was farting around with both files and systemui stopped working for me after as well. I was just trying to change the framework-res colors. But using the recompiled apk crashed the UI even after replacing it.
StarRavier said:
You'll need to flash stock img, nothing else i tried worked. I was farting around with both files and systemui stopped working for me after as well. I was just trying to change the framework-res colors. But using the recompiled apk crashed the UI even after replacing it.
Click to expand...
Click to collapse
Cool, thanks. Did that get your colors working as well, or no?
SiliconMage said:
Cool, thanks. Did that get your colors working as well, or no?
Click to expand...
Click to collapse
I can change them with zips provided here. http://forum.xda-developers.com/nexus-6p/themes-apps/mod-theme-nmf26f-various-framework-res-t3515739
But I want to do it myself at least so i understand how to modify systemui instead of using user provided zips
Same here, man, same here. Thanks.
I received a response from sharkie405 and I was able to fix my issue by simply adding the -c command to the end of the apktool build command. The "-c" preserves the signing of the original jar, which is necessary for validating the recompiled jar file.
So after I made the necessary modifications to my xml files, I did: java -jar apktool b SystemUI -c

Categories

Resources