[Android General] biscottoesse:
Hi,

Im trying to edit the Settings.apk from my android, following a guide I found here, the only difference of this guide to my system was, the path of Settings is: /system/priv-app/Settings/Settings.apk

After that I was trying to do copy the file using the adb shell but gave me error of permision (even by doing: "adb shell" and then "su"), but I fixed it by copying it myself through the APP "RootExplorer"

The only problem is that after I do that and I restart hte phone, the Settings are gone. So I restored the original file and restarted the phone but the Settings keeps not appearing.

Tried wipe cache but no changes.

After search better, I found on google someone that had the same problem but after try to do all without use sign Settings.apk with ZipSign, worked... but not for me.

So I guess something changed from versions 4.x to 5.1

Could someone lend me a hand pls ? Pointing what Im doing wrong.

PS: I need reinstall the original ROM after this (so I get my settings back (with adb sidepull), so no data is lost)

The guide I followed:

Stuff You'll Need for the guide

Apktool (And therefore Java too)

A suitable Text Editor for your OS. For Windows, Notepad++ is best, for Linux I recommend Geany In this guide I will be using Geany on Ubuntu

Zipsigner on your device (for ease of use)

adb

NOTE: If you are using Linux, run everything, including apktool and your text editor/file manager as ROOT/SUDO

Do this first: Decompiling Settings.apk

Difficulty: ★★☆☆☆

1.) Open a command window in a suitable location, where apktool.jar is also located

1.) Pull your apk from your device

Code:

adb pull /system/app/Settings.apk

2.) Pull and install the framework from your device to apktool

Code:

adb pull /system/framework/framework-res.apk

Code:

java -jar apktool.jar if framework-res.apk

3.) Decompile your Settings.apk

Code:

java -jar apktool.jar d -s Settings.apk

(No source is needed)

Editing the Strings of your Settings apk

Difficulty: ★★☆☆☆

Editing the Settings option's icon

Difficulty: ★★★☆☆

Adding options to the settings headers

Difficulty: ★★★★☆

Adding dividers to settings

Difficulty: ★★★☆☆

Reordering Settings

Difficulty: ★★☆☆☆

Adding items to submenus

Want to add a "Credits" option to your "About device" menu? This is what you need

Difficulty: ★★★☆☆

Bonus: Forcing "Developer settings" to be available by default on 4.2

Difficulty: ★★☆☆☆

Do this last: Recompiling

Difficulty: ★★☆☆☆

1.) Re-open the command window that you used to decompile, in the same location

2.) Run the following code:

Code:

java -jar apktool.jar b Settings

3.) Push the new, unsigned apk to your device:

Code:

adb push Settings/dist/Settings.apk /sdcard/

4.) On the device, open Zipsigner and select the Settings.apk using the in/out button

5.) On the dropdown, select "platform"

6.) Press sign

7.) When it's done, run the following codes in the command window on the PC:

(Note: Some people might need to run 'adb root' first)

Code:

adb remount

Code:

adb shell cp /system/app/Settings.apk /system/app/Settings.bak

Code:

adb shell cp /sdcard/Settings-signed.apk /system/app/Settings.apk

8.) Reboot your device, you are done