Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,728,180 Members 47,131 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] ICS Style 'Settings.apk' - Make it yourself !! !!

Tip us?
 
balamu96m
Old
(Last edited by balamu96m; 13th May 2012 at 07:27 PM.) Reason: uploaded icons !!
#1  
balamu96m's Avatar
Senior Member - OP
Thanks Meter 931
Posts: 1,015
Join Date: May 2011
Location: Chennai
Talking [GUIDE] ICS Style 'Settings.apk' - Make it yourself !! !!


Hi all !! This is a guide on how to mod your Settings.apk to make it like an ICS's one !!

My sincere credits to iiandskater. He is the one who FIRST made MODS like this. I learnt these by comparing his MOD !!
He hasn't come up with a guide because he doesn't have time . (I think so!)

If you have completed modding and posting it ( on any website/forum), then please give credits and give a link to this thread !! This helps it reaching more people !! Thanks.


Pre-requisites:
-7zip
-Notepad++

This guide helps you to mod your settings' main screen only. If you want mod even other screens, then you need to read - why this/that step is done.
If you want to know 'Why is this/that step done?' , then read the post completely !!

I'll start from the basics.


Starting with basics:

1. Decompile your Settings.apk with 'apktool' (or) Apk Multi-tool (or) anything like that of your comfort !
Why is this/that step done?: It is done in order to decode .xml files the apk.
I decompiled with apktool.



2. Now navigate to Decompiled_Folder\res\values

3. There, open 'strings.xml' with notepad++


4. Go to the very end of the file, there above </resources>, add the following:
Code:
 <string name="location_settings_title">Location service</string>
    <string name="settings_ics_system">SYSTEM</string>
    <string name="settings_ics_radio">WIRELESS &amp; NETWORKS</string>
    <string name="settings_radio_more">More...</string>
    <string name="settings_ics_device">DEVICE</string>
    <string name="settings_ics_personal">PERSONAL</string>
    <string name="settings_ics_system_cap">SYSTEM</string>
    <string name="power_usage_summary_text">Battery</string>
It should look like this:


Now save the file and close it.

Why is this/that step done?: This is for the 'text' that appear at different places. For example:



5. Now navigate to decompiled_folder\res\xml\

6. There open 'settings.xml' with notepad++


Any phone's user can follow upto this blindly, but from here you should do similar things for your phone.

HTC users, read this


7. Your 'settings.xml' will look like this (may not be exact)(this is my modded settings.xml - i'll explain what i have modded):


Now i have separated different 'things'/tags with an empty line between them, so that you won't get confused:



Here, i will explain every different 'things'/tags with only one example, other things, you yourself will have try because others will be similar to what i explain.

Preference screen:
From the above picture, i am taking only the circled (can't 'define' its radius lol ).


Now lets zoom it:


On reading it, you yourself can understand that:

---android:title="@string/wifi_quick_toggle_tittle" refers to a TEXT registered under the string name "wifi_quick_toggle_tittle" in the 'strings.xml'.
Now check in your 'strings.xml', which is located at res/values/, by searching for "wifi_quick_toggle_tittle". There you will find this line/line similar to this:
Code:
 <string name="wifi_quick_toggle_title">Wi-Fi</string>
You can very well understand that the TEXT between the tags here(in strings.xml) will appear on the screen !!

---settings:icon="@drawable/ic_settings_wireless"> refers to the icon located at res/drawable-ldpi (or) res/drawable-xxxx(that of your phone).

You can leave other things as it is but except for android:targetClass="com.android.settings.wifi.Wif iSettings". This is because according to this only, you are directed to another screen on selecting it !!

Here, i need to go to Wi-Fi settings on selecting it directly from the main screen. So i need to change it.
To change, i opened res/xml/wireless_settings.xml

There, like what we have seen earlier, many preference screens will be defined. There i found the preference screen of Wi-Fi settings
I copied the android:targetClass="xxxxxxxxxxxx"(something given there) to Settings.xml file.

If you want to do it for Bluetooth, then copy any of the preference screen completely [from <com.android.settings...... to </com.android.settings.IconPreferenceScreen>
Then make changes in the title , icon, and target classs.

Not yet over, last thing:
Adding custom categories like Device, Personal, System etc.
It is this line that makes it:
Place it anywhere above (or) in-between any two preference screens !!
Code:
<PreferenceCategory android:title="@string/settings_ics_radio" />


About icons, I'll tell after re-compiling.


8. Re-Compiling it:

After making all necessary changes and saving the 'xml' files, re-compile (or) build the apk. You should not get any error.

9. After building it, you'll find the new 'Settings.apk' in decompiled_folder/dist. Do NOT use it.

Now Go the folder where you have ORIGINAL/STOCK Settings.apk. Now simply extract it to any folder, say "settings-new", using 7zip.

8. Now go to decompiled_folder/build/apk
From there copy the 'resources.arsc' file and paste it in "Settings-new" folder. Replace it.

9. Now again, go to decompiled_folder/build/apk/res/xml. There copy 'settings.xml'
Paste it in Settings-new/res/xml folder. Replace if asked.

10. ICONS:
After downloading the icons.zip, you'll find the icons in 'drawable-ldpi' folder. Copy everything and paste it in Settings-new/res/drawable-xxxx (that of your phone). [If you do not know what is that 'xxxx' for your phone, then paste it in every 'drawable-ldpi/mdpi' folder]
Replace if asked.

11. Now come back and open "Settings-new" folder. You'll find 6 objects there, including folders. Now select them all --> "7zip" --> "Add to archive...". There, select 'Archive format as 'zip'and 'compression level' as 'Store' and then select 'ok'.

12.Now rename the newly formed 'xxxx.zip' file to 'xxxx.apk'.
Before copying to system/app rename it to Settings.apk instead some xxxx.apk !!

Now your apk is ready to be put in system/app !!


If you have completed everything and would like to distribute it, then download the 'Pre-scripted-update.zip' from attachments.
Open the archive with 7zip (no need to extract) go to system/app. Just drag and drop your modded 'Settings.apk'.
Thats all !! Close it and flash it via recovery !!

Thats all....i believe........still can refine it.......!
Icons-uploaded........!!

If you have completed modding and posting it ( on any website/forum), then please give credits and give a link to this thread !! This helps it reaching more people !! Thanks.

If you like this thread, the hit THANKS !!
Attached Files
File Type: zip Icons.zip - [Click for QR Code] (528.7 KB, 4901 views)
File Type: zip Pre-scripted-update.zip - [Click for QR Code] (254.7 KB, 3556 views)

The Following 254 Users Say Thank You to balamu96m For This Useful Post: [ Click to Expand ]
 
Ron G
Old
#2  
Account currently disabled
Thanks Meter 3937
Posts: 3,374
Join Date: Feb 2012
Location: Mumbai

 
DONATE TO ME
thanks for this guide i'm searching from 5 days to but i can't find.
The Following 6 Users Say Thank You to Ron G For This Useful Post: [ Click to Expand ]
 
balamu96m
Old
#3  
balamu96m's Avatar
Senior Member - OP
Thanks Meter 931
Posts: 1,015
Join Date: May 2011
Location: Chennai
You're welcome !!

The Following 10 Users Say Thank You to balamu96m For This Useful Post: [ Click to Expand ]
 
aarrun
Old
#4  
aarrun's Avatar
Recognized Themer
Thanks Meter 290
Posts: 627
Join Date: Jan 2011
Location: Mumbai
again good work bro....nice tut... u r going great man! cheers!!!!


PHONE: SAMF**KED....GALAXY 3
ROM: GingerDX(Modded as for my needs)
KERNEL:CM7 apollo#889 OC
THEME: My Modded Achep's Theme


MY THEME WORK FOR G3:

Antonda Design Blue for Froyo
Antonda Design Green for Froyo
AOSP Gingerbread for Froyo
ICS Theme for Froyo
Sensation Crysis for Froyo
Theme Elegance for Froyo
Hi-Tech Sense for Froyo
The Following 4 Users Say Thank You to aarrun For This Useful Post: [ Click to Expand ]
 
SpaceCaker
Old
#5  
SpaceCaker's Avatar
Recognized Themer / Contributor
Thanks Meter 10483
Posts: 13,102
Join Date: Mar 2011
Location: netherlands
Thank you :d
 

My Github Click Here
Github BroadcomCM Click Here
Github CyanoSpaceMod Click Here
Github MSR-Roms Click Here
Check My SoundCloud for my music remakes,mixes etc Click Here
Linux HP-Pavilion-G7 3.11.0-23-generic #40-Ubuntu SMP Wed Jun 4 21:05:23 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
 
prince9030
Old
#6  
prince9030's Avatar
Member
Thanks Meter 2
Posts: 30
Join Date: Mar 2012
great guide and keep up the good work
The Following User Says Thank You to prince9030 For This Useful Post: [ Click to Expand ]
 
balamu96m
Old
#7  
balamu96m's Avatar
Senior Member - OP
Thanks Meter 931
Posts: 1,015
Join Date: May 2011
Location: Chennai
Thanks everyone !!

The Following 4 Users Say Thank You to balamu96m For This Useful Post: [ Click to Expand ]
 
Bilgets
Old
#8  
Senior Member
Thanks Meter 82
Posts: 945
Join Date: Oct 2011
Location: Jakarta

 
DONATE TO ME
nice, this is my first walk maybe if i want to be a dev

looking forward for the icons
The Following 3 Users Say Thank You to Bilgets For This Useful Post: [ Click to Expand ]
 
+Vidar+
Old
#9  
+Vidar+'s Avatar
Junior Member
Thanks Meter 2
Posts: 18
Join Date: Mar 2012
Thanks it's a nice tut.
The Following User Says Thank You to +Vidar+ For This Useful Post: [ Click to Expand ]
 
SpaceCaker
Old
(Last edited by SpaceCaker; 26th May 2012 at 09:59 AM.)
#10  
SpaceCaker's Avatar
Recognized Themer / Contributor
Thanks Meter 10483
Posts: 13,102
Join Date: Mar 2011
Location: netherlands
EDIT :::: saw what i did wrong XD

now working correctly
Attached Files
File Type: apk Settings.apk - [Click for QR Code] (3.91 MB, 945 views)
File Type: apk 1.apk - [Click for QR Code] (6.48 MB, 439 views)
File Type: apk 2.apk - [Click for QR Code] (532.2 KB, 385 views)
 

My Github Click Here
Github BroadcomCM Click Here
Github CyanoSpaceMod Click Here
Github MSR-Roms Click Here
Check My SoundCloud for my music remakes,mixes etc Click Here
Linux HP-Pavilion-G7 3.11.0-23-generic #40-Ubuntu SMP Wed Jun 4 21:05:23 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

The Following 6 Users Say Thank You to SpaceCaker For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes