[Q] What exactly are "SystemUI.apk" and "framework-res.apk" - Android Q&A, Help & Troubleshooting

I have use apktool to decompile an apk and made some customizations on it, there after recompiled it back using the same apktool. But for recompiling SystemUI.apk and framework-res.apk files were needed, anyway i downloaded it from some sites and now the recompiling has done successfully. So i need to know what exactly are these apk's and where to get these apk? I had googled it several times but did't got a right answer, all i understand is that both that apk's are part of rom.

Related

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?

Recompling an apk questions

Trying to modify contacts.apk to make the dialer multi-dpi compatible. Did that and it works.
My issue is recompiling the apk. Everytime I recompile the apk with apktool it looses over a megabyte in size. In my case went from 4.49MB to 3.19MB after rebuilding. Only file modified was dialer_app.xml and it's size stayed about the same.
I've brought framework-res.apk and twframework.apk into apktool. After copying the resulting contacts.apk back to the device it is not recognized.
I've also tried copying the META-INF directory from the original apk over to the new one. Still no luck. I'm new to this and if anyone has some help for me it would be greatly appreciated!
Did you sign your new apk after recompiling it ?
Do you have classes.dex and resources.arsc files in your new apk ?
since its a system apk I've read it shouldn't be signed. Only thing I did was copy the META-INF folder to the new apk. In the new apk I do see classes.dex and resources.arsc. All the files appear to be there but the apk has shrunken in size.
I'm guessing I'm missing something simple here. But I'm new to this. Been at it for a few hours haven't had any luck.
I am new in development field. I have two questions 1. Is there same meaning for building and recompiling using apk tool? 2. I know framework-res.apk is needed for apktool d com, but where and the what is the use of twframework.apk file. Please explain anyone .
Recompiled apks will be quite a bit smaller as they will have more compression applied, this is normal, just be careful as if the tool compresses it to much you will get fc's. But it should work fine.
idhbar said:
I am new in development field. I have two questions 1. Is there same meaning for building and recompiling using apk tool? 2. I know framework-res.apk is needed for apktool d com, but where and the what is the use of twframework.apk file. Please explain anyone .
Click to expand...
Click to collapse
Read the apktool website for info about framework files, as far as which one to use, if you are decompiling a la2 or la4 base use a kl2 or kk5 framework without jkays built in as the laX frameworks are kinda buggy.
Sent from my GT-I9100 using Tapatalk

Framework for apktool

what's the framework-res.apk to use to decompile apks in apktool? i can't decompile even one apk because it says the framework installed is wrong.
also maybe can someone attach the original stock settings.apk for lww?
:thanks:
patz0110 said:
what's the framework-res.apk to use to decompile apks in apktool? i can't decompile even one apk because it says the framework installed is wrong.
also maybe can someone attach the original stock settings.apk for lww?
:thanks:
Click to expand...
Click to collapse
The framework-res.apk you need to install is the one which comes with your rom. You may need to install some other files as well, depending on which files you're trying to decompile.
Best thing to do is go through your system/app and system/framework folders and install everything with the word 'res' in the name. You might install some files you don't need, but this won't cause any harm and it will ensure you've installed all the resources available.
Solved by installing SemcGenericUxpRes.apk
closed

[Q] Modifying SystemUI.apk xml file

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?

Help editing SystemUI (LineageOS)

Hi, i want to edit the systemui. I decompile the apk, then i edit the files, recompile and move META-INF and resources.arsc to the apk, no problems but when i replace in the phone i get bootloop no mather what i do, i tried various guides and nothing any help please?
Sorry for my english

Categories

Resources