Hello everyone..
I made some mods for the stock apps for galaxy y. Like settings app with tabs , Jellybean like statusbar ICS like Dialer and caller ID (You can see them Links are in my sign). Many people were asking me to make these for them so I decides to make a guide so everyone can do it.
Note : These guides are only for gingerbread samsung apps but these mods may or may not work with your apps.
What you need to have is.. Experience of compiling/decompiling apk's with ApkTool. Deodexed ROM.
So I am starting with How to modify settings.apk to have tabs
File to be modified is Settings.apk
This may work with ICS, JB ,Cyanogenmods settings.apk also
1. Pull settings.apk from system/app/ and decompile it with apktool. ( I wont cover how to compile, decompile and sign apks.)
2. Download the Settings.zip from attachments.
3. Extract downloaded zip it to the decompiled folder.
4. Now open res/values/strings.xml and add these lines at the end..
5. Now open res/values/ids.xml and add these lines at the end..
6. Now compile Settings.apk.... Wait Its not done yet you have to decompile it again. So decompile the settings.apk you just compiled
7. Now the part where you have to modify some smali files. Its not hard you just have to change some values in smali files I added. These are Ids of layouts and xml files.
8. Open smali/com/android/settings/TabbedSettings.smali and also open res/values/public.xml. Now you have to find the Ids given below and change them according to your public.xml. You will find lines like this in public.xml <public type="anim" name="slide_out_left" id="0x7f0c0002" /> underlined part is the ID for the name ("slide out left" here..) given. So find the ids below and replace them with the ids of names given below..
9. Now open AndroidManifest.apk and under these lines
add these lines (Ignore if you dont have line <uses-library android:name="touchwiz" /> its for samsung phone)
Now find these lines
and replace with
10. Now you are done with modifications. Recompile+sign the settings.apk and push it to system/app/ ................ ENJOY :highfive:
NOTE. If the apps shortcuts gives you force close or you want to add some other apps shortcut there then do the following..
1. Open personal_settings.xml(for Actions TAB) or program_settings.xml(For Google apps Tab) there you will see the shortcuts defined.
If your phone is different then Samsung then shortcut to phone will give you forceclose so to fix it do this,
2. change the android:targetPackage from "com.sec.android.app.dialertab" to whichever app you want. You can find package name in app's AndroidManifest.xml file or you can see it in Logcat while you launch the app.
3. change the android:targetClass from "com.sec.android.app.dialertab.DialerTabActivity" to the launcher activity of the app. You can find launcher activity name in app's AndroidManifest.xml file (add package name before it) or you can see it in Logcat while you launch the app.
4. Compile+sign and push settings.apk to system/app/
Note.. Look for the DeviceInfoSettings.smali in smali/com/android/settings/ if it doesn't exist then You have to change it with correct activity in TabbedSettings.smali. Find DeviceInfoSettings in TabbedSettings.smali and change it to another activity name.
I will do other Guides later.. Have Fun :victory:
Images and layouts in Zip files are for ldpi devices so they may look ugly on your high res devices.
I made some mods for the stock apps for galaxy y. Like settings app with tabs , Jellybean like statusbar ICS like Dialer and caller ID (You can see them Links are in my sign). Many people were asking me to make these for them so I decides to make a guide so everyone can do it.
Note : These guides are only for gingerbread samsung apps but these mods may or may not work with your apps.
What you need to have is.. Experience of compiling/decompiling apk's with ApkTool. Deodexed ROM.
So I am starting with How to modify settings.apk to have tabs
File to be modified is Settings.apk
This may work with ICS, JB ,Cyanogenmods settings.apk also
1. Pull settings.apk from system/app/ and decompile it with apktool. ( I wont cover how to compile, decompile and sign apks.)
2. Download the Settings.zip from attachments.
3. Extract downloaded zip it to the decompiled folder.
4. Now open res/values/strings.xml and add these lines at the end..
Code:
<string name="personal_settings_tab">Actions</string>
<string name="settings_ics_actions">APPLICATIONS</string>
<string name="program_settings_tab">Google</string>
<string name="settings_ics_google">GOOGLE APPS</string>
5. Now open res/values/ids.xml and add these lines at the end..
Code:
<item type="id" name="tabHost">false</item>
<item type="id" name="tabsLayout">false</item>
<item type="id" name="tabsText">false</item>
6. Now compile Settings.apk.... Wait Its not done yet you have to decompile it again. So decompile the settings.apk you just compiled
7. Now the part where you have to modify some smali files. Its not hard you just have to change some values in smali files I added. These are Ids of layouts and xml files.
8. Open smali/com/android/settings/TabbedSettings.smali and also open res/values/public.xml. Now you have to find the Ids given below and change them according to your public.xml. You will find lines like this in public.xml <public type="anim" name="slide_out_left" id="0x7f0c0002" /> underlined part is the ID for the name ("slide out left" here..) given. So find the ids below and replace them with the ids of names given below..
Code:
[COLOR="Blue"] Find ------------------- Replace with ID of name [/COLOR]
[COLOR="PaleGreen"]IN smali/com/android/settings/TabbedSettings.smali[/COLOR]
0x7f0c0002 ------------------- slide_out_left (anim)
0x7f0c0003 ------------------- slide_out_right (anim)
0x7f03005c ------------------- type="layout" name="tab_indicator"
0x7f0b011b ------------------- type="id" name="tabsText"
0x7f03005b ------------------- type="layout" name="tab_content"
0x7f0b0119 ------------------- type="id" name="tabHost"
[COLOR="PaleGreen"]IN smali/com/android/settings/TabbedSettings$1.smali[/COLOR]
0x7f0c0001 ------------------- type="anim" name="slide_in_right"
0x7f0c ------------------- type="anim" name="slide_in_left" ([COLOR="Red"]Only first 4 digits[/COLOR])
[COLOR="PaleGreen"]IN smali/com/android/settings/PersonalSettings.smali[/COLOR]
0x7f040039 ------------------- type="xml" name="personal_settings"
0x7f03005a ------------------- type="layout" name="speed_container"
[COLOR="PaleGreen"]IN smali/com/android/settings/ProgramSettings.smali[/COLOR]
0x7f04003a ------------------- type="xml" name="program_settings"
0x7f03005a ------------------- type="layout" name="speed_container"
9. Now open AndroidManifest.apk and under these lines
Code:
<application android:label="@string/settings_label" android:icon="@drawable/ic_launcher_settings" android:taskAffinity="">
<uses-library android:name="touchwiz" />
add these lines (Ignore if you dont have line <uses-library android:name="touchwiz" /> its for samsung phone)
Code:
<activity android:theme="@android:style/Theme.NoTitleBar" android:label="@string/settings_label_launcher" android:name="TabbedSettings" android:taskAffinity="com.android.settings" android:clearTaskOnLaunch="true" android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.settings.SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="PersonalSettings" />
<activity android:name="ProgramSettings" />
Now find these lines
Code:
<activity android:label="@string/settings_label_launcher" android:name="Settings" android:taskAffinity="com.android.settings" android:clearTaskOnLaunch="true" android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.settings.SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
and replace with
Code:
<activity android:label="@string/settings_label_launcher" android:name="Settings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
10. Now you are done with modifications. Recompile+sign the settings.apk and push it to system/app/ ................ ENJOY :highfive:
NOTE. If the apps shortcuts gives you force close or you want to add some other apps shortcut there then do the following..
1. Open personal_settings.xml(for Actions TAB) or program_settings.xml(For Google apps Tab) there you will see the shortcuts defined.
Code:
<com.android.settings.IconPreferenceScreen android:title=" Phone" settings:icon="@drawable/app_phone">
<intent android:targetPackage="com.sec.android.app.dialertab" android:action="android.intent.action.MAIN" android:targetClass="com.sec.android.app.dialertab.DialerTabActivity" />
If your phone is different then Samsung then shortcut to phone will give you forceclose so to fix it do this,
2. change the android:targetPackage from "com.sec.android.app.dialertab" to whichever app you want. You can find package name in app's AndroidManifest.xml file or you can see it in Logcat while you launch the app.
3. change the android:targetClass from "com.sec.android.app.dialertab.DialerTabActivity" to the launcher activity of the app. You can find launcher activity name in app's AndroidManifest.xml file (add package name before it) or you can see it in Logcat while you launch the app.
4. Compile+sign and push settings.apk to system/app/
Note.. Look for the DeviceInfoSettings.smali in smali/com/android/settings/ if it doesn't exist then You have to change it with correct activity in TabbedSettings.smali. Find DeviceInfoSettings in TabbedSettings.smali and change it to another activity name.
I will do other Guides later.. Have Fun :victory:
Images and layouts in Zip files are for ldpi devices so they may look ugly on your high res devices.
Attachments
Last edited: