[Android General] sud.vastav:
Hi guys! This is my first Tutorial that I'm sharing on XDA.

Want to change/add something in your Settings.apk? Here's a tutorial that you can follow...
​

So lets start...

Things that you'll need:

*A PC(obviously :P)

*A device to test

*A tool to decompile/recompile apk( I'd recommend Tickle My Android and I'll be using it in the tutorial. I'll be calling it TMA)

*A text editor(I'd recommend Notepad++ and I'll be using it in the tutorial)

*Settings.apk

*framework-res.apk

If you're new to decompiling and all and then use Tickle My Android! It would let you decompile/recompile/push/import your apks with a click. Hats-off to Ticklefish for the tool.

Before coming to modding your Settings.apk, here are some tips:

*Always BACKUP before doing anything

*Always recompile with original signature(unless and untill you're editing AndroidManifest.xml)

If you're not sure how to:

Import Settings.apk or

Import framework-res or

Decompile Settings.apk or

Recompile Settings.apk or

Push modified apk back to your device, Click Here. Ticklefish is very kind to explain all this stuff in his tool's thread.

Part: 1 Now let's come to 'Adding informative text in Settings'

I'll be adding text to the About Phone menu. Most common. You can add it anywhere you wish... Just edit the respective xml

*Install your framework-res

*Decompile your Settings.apk

*In working folder of TMA, you'll now have a folder Settings.apk

*Navigate to Settings.apk/xml/device_info_settings.xml

*Open it with Notepad++

*Add the line at the end

<Preference android:title="@string/sample_one" android:key="sample_one" android:summary="@string/credits_name" style="?android:preferenceInformationStyle" />

*It should look like this

*Save it

*Now go to Settings.apk/values/strings.xml

*Add the lines at the end:

<string name="sample_one">Heading of the Field here</string>

followed by

<string name="sample_one_summary">Your Text Here</string>

It should now look like this

*Save it

*Now recompile with original signature and flash it.

Done!

You’ll see Settings.apk in /out folder of TMA. Now use TMA to generate a flashable zip file and place the apk in /system/app(if you’re on JB or below) or in/system/priv-app if you’re on KitKat. Just it then! You’ll have your modified Settings.apk :)

Part: 2

​

Here we'll rename Menus in settings:

*Install your framework-res

*Decompile your Settings.apk

*In working folder of TMA, you'll now have a folder Settings.apk

*Navigate to Settings.apk/xml/settings_header.xml

*Open it with Notepad++

*Check out the android:id for the menu whose name you want to change, like for Sounds it is sound_settings. Copy it.

​

*Now navigate to values/strings.xml

*Open it with Notepad++

*Press Ctrl+F and paste what you copied earlier, sound_settings in our case.

*Find it and edit the name.

*Save, recompile, flash and Done!

Part 3: Rearranging menus

This is most simple! Just copy and paste!

*Open either the settings_headers.xml or a submenu, the process is the same

*Cut and paste the different options to your desired order

*That's all! Save, recompile, flash and enjoy!

Credits:

*ashishdubey

*Ticklefish(for TMA)

If you want to learn how to change Setting's background to white, check out my next post.

If you like it, press thanks and rate this thread 5 stars :)