FORUMS
Remove All Ads from XDA

[GUIDE] How to add extra option in settings.apk

1,119 posts
Thanks Meter: 600
 
By hnkotnis, Senior Member on 8th November 2013, 01:44 PM
Post Reply Email Thread
EXTRA APPLICATION OPTION IN SETTINGS MENU

This is my first thread, so please ignore my errors.
We have seen custom ROMs having some extra options in settings. This is a guide of adding these options.
This guide is for Galaxy y, but also can work for devices with similar settings.apk (like Ace, duos etc.)

Prerequisites:-
1) A rooted phone (I can't strech how important this is :D)
2) Backup your orginal settings.apk
3) Basic knowledge of decompiling and recompiling.

Procedure:-
1)Decompile settings.apk and apk of the app you want to put. (I am decompiling Proximity Actions)
2) Go to decompiled app folder and open AndroidManifest.xml. Note Package and Target Class. (Marked with red circle Attachment # 1)

3) Open decompiled folder of settings. Go to /res/values/strings.xml. Open with Notepad++.
Enter code <string name="prxt_ctrl">Proximity Control</string> in the end before /resources>. You can edit red coloured text to anything which you want to appear in settings. You can also give any string name, but remember it.
4) You need an icon to put in settings(You can get it from that decompiled app). Resize it to 24x24 pixels (FOR GALAXY Y ONLY)
5) Put that icon in settings/res/drawable-Idpi with any name(remember it). I have given name ic_settings_prxt
6) Go to settings/res/xml/settings.xml. Open with Notepad++
7) Add code <com.android.settings.IconPreferenceScreen android:title="@string/prxt_ctrl" settings:icon="@drawable/ic_settings_prxt">
<intent android:targetPackage="novum.inceptum.proximity" android:action="android.intent.action.MAIN" android:targetClass="novum.inceptum.proximity.PA_A ctivity" />
</com.android.settings.IconPreferenceScreen>


Here string is used from step 3. Use icon from step 4. Package and targetClass from step 2.

8) Save and compile Settings.apk and complete formalities of recompiling.
9) Push Settings.apk to /system/app and set permissions to rw-r--r--.
10) Enjoy



PRESS THANKS IF HELPED. I REALLY NEED IT.
The Following 10 Users Say Thank You to hnkotnis For This Useful Post: [ View ] Gift hnkotnis Ad-Free
 
 
8th November 2013, 06:07 PM |#2  
burak144's Avatar
Senior Member
Flag Kırklareli
Thanks Meter: 315
 
More
there is a similar thread. plz search before post. mods plz close this thread.

Galaxy Pop Plus'ımdan Tapatalk 2 ile gönderildi.
9th November 2013, 01:50 AM |#3  
hnkotnis's Avatar
OP Senior Member
Flag Sangli, Maharashtra, India, Asia, Earth, Solar System, Milky Way Galaxy, Local Galaxy Group,Universe
Thanks Meter: 600
 
More
That guide you are talking about by PinapleOwl is different method. It is just how to add extra ACTIVITY with smali editing. Here you dont have to edit smali. Please note the difference before comment. Also this has detailed screenshots for noobs.

Sent from my GT-S5360 using xda-app
Using CWM........Busybox Commands........No I use my hands
9th November 2013, 08:44 AM |#4  
TheFixItMan's Avatar
Senior Member
Flag London
Thanks Meter: 3,834
 
More
Think the thread being referred to is
http://forum.xda-developers.com/show....php?t=2341389

Which has more options such as sub directory

Anyway it's a clear guide for anyone who needs simple directions
9th November 2013, 10:04 AM |#5  
hnkotnis's Avatar
OP Senior Member
Flag Sangli, Maharashtra, India, Asia, Earth, Solar System, Milky Way Galaxy, Local Galaxy Group,Universe
Thanks Meter: 600
 
More
Quote:
Originally Posted by marcussmith2626

Think the thread being referred to is
http://forum.xda-developers.com/show....php?t=2341389

Which has more options such as sub directory

Anyway it's a clear guide for anyone who needs simple directions

No. That guide has different Settings structure. It is for Xperia Arc where menus are classified by category.
In our Galaxy y, we don't have settings_header.xml.

Indeed both guides are similar, but I think a set of simple instructions would be helpful, so I have written this thing.
16th December 2013, 09:04 AM |#6  
Account currently disabled
Flag Delhi
Thanks Meter: 125
 
More
i cannot find android:targetPackage android:action etc
16th December 2013, 11:42 AM |#7  
TheFixItMan's Avatar
Senior Member
Flag London
Thanks Meter: 3,834
 
More
Quote:
Originally Posted by shadman0

i cannot find android:targetPackage android:action etc

its the name of the apk in its manifest - decompile the target apk and look
17th December 2013, 01:33 AM |#8  
Account currently disabled
Flag Delhi
Thanks Meter: 125
 
More
Thumbs up I have Problem
Quote:
Originally Posted by marcussmith2626

its the name of the apk in its manifest - decompile the target apk and look

Marcussmith2626 I have Build The App And Sign App After I have Place System/app and givr it permissions r w r r after reboot The Settings is Not Come in Launcher
17th December 2013, 07:52 AM |#9  
hnkotnis's Avatar
OP Senior Member
Flag Sangli, Maharashtra, India, Asia, Earth, Solar System, Milky Way Galaxy, Local Galaxy Group,Universe
Thanks Meter: 600
 
More
Quote:
Originally Posted by shadman0

Marcussmith2626 I have Build The App And Sign App After I have Place System/app and givr it permissions r w r r after reboot The Settings is Not Come in Launcher

If you have not edited Manifest of your SETTINGS APP (IMPORTANT), then you don't have to sign that APK. Just open both apks (newly compiled and original) in 7zip 7zip ONLY (Right click on apk ====> 7zip ====> Open archive)

Then drag META-INF of original apk to compiled apk and push to /system/app and change permission to 644 (rw-r--r--)
17th December 2013, 09:16 AM |#10  
Account currently disabled
Flag Delhi
Thanks Meter: 125
 
More
Same problem
18th October 2015, 08:05 AM |#11  
Shujath's Avatar
Senior Member
Flag Hyderabad
Thanks Meter: 2,024
 
More
A BIG Thanks for your help
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes