# Editing/inverting Settings.apk



## buckmarble

Im trying to invert settings.apk however, any time I edit the androidmanifest.xml the system will not recognize it. Any help would be appreciated!


----------



## pedwards3x

Long story short you must sign the settings.apk along with all motorola apps at once then reflash them.


----------



## buckmarble

Okay this is what I did using apk tool 5.0.2

-Decompiled with dependencies> moto-res, systemui, framework-res, blur-res
-made edits to androidmanifest.xml and colors.xml
-recompiled with NO errors. Selected yes to system app, yes to original files
-deleted resources.asrc and androidmanifest.xml from "keep folder"
-signed(as suggested in last post)
-moved to system/app via root explorer and set permissions and rebooted

Settings does not exist after reboot. Everytime I change androidmanifest.xml is wont recognize the apk. If I edit any other xml it works fine. Any other ideas?


----------



## pedwards3x

What I meant in earlier post is that you need to go through the system/app folder and grab EVERY .apk that is signed by moto. Then sign all of these at once as well as the framework apks. Then flash everything back. Also you need to wipe data. Basically a full ROM install if you want to mess with androidmanifest. Sorry for not clarifying earlier.


----------



## buckmarble

What do I use to sign all of them? Can apk manager do them all in bulk? Or do i need to use something else? Sorry for the stupid question. I've never had to do this before. Had a d1 before this if that explains anything.


----------



## buckmarble

I got it! Looks like ill have some more work to do though. Got some white on white issues


----------



## buckmarble

Here's a look at it so far


----------



## EmericanX

That gray back ground under the list was a tough one for me. I don't remember which PNG it was... but it is an image edit in framework. The blue bar at the top is an image as well... title bar bottom I believe. Btw I could be wrong but I didn't think you were supposed to sign system files. Glad you got it working though.

Just a couple of other tips because I fought with this... the phone settings is themed through blur-phone and the data/battery manager is themed through data-manager-app...


----------



## buckmarble

I didn't think I was supposed to either. I am testing some different things with it. I think having dependencies may be the reason why it had to be signed. I've successfully put it into 3 different roms ans flashed with the rom and it worked. Only think I've found so far is it doesn't agree with the old market apk. And im not sure why. If you install the new market, the market works fine


----------



## EmericanX

Once you have your frame works installed correctly you shouldn't have to recompile w/ dependencies... at least I haven't had to. I couldn't get a successful recompile of blur-phone until I installed all frame works correctly.

In your apkmanager folder copy your frame works into the "others" folder I believe it is. Open a cmd terminal and CD to the same folder. Then type in apktool if framework-res.apk... so on for blur and moto. That will clean up your recompile/recompile alot! I haven't had a resource error since. I can tell you also I've seen a few people that were having issues with setting.API on apkmanager5.2... I used 4.9 for settings then the newest for everything else.


----------



## buckmarble

So what exactly are you doing when you apk tool those files? Like what is apk tool doing? Are you doing this after you recompile? Sorry, just trying to get this right. The whole trial and error thing is frustrating. I very much appreciate the input and assistance! Thanks!


----------



## EmericanX

Nope... you do it before recompile. Its properly installing the resources for use during decompile and recompiling. When I first started I simply copied and pasted the resource files into the apktool directory and had plenty of issues myself. Once I did what I previously mentioned recompile issues were gone! You'll get use to the trial and error lol.... I may even suggest that you keep a log of what changes and where you made them! It'll make it easier to pinpoint something you may wanna tweak a little.


----------



## buckmarble

Yso you're essentially doing the dependecies process before hand?


----------



## EmericanX

I guess you could say that. Since I've installed resources like that I've not had to "Decompile with dependencies" and I've had far less compile errors... if any they were due to me screwing up somewhere


----------



## pedwards3x

Ya if you use APKManager and decompile it will ask for dependencies and after you tell it once the apks are actually copied and saved in a folder for future use which is what lifebeginsfriday is referring to.


----------

