Friday, November 1, 2013

[GUIDE]Awesome Guide For Making Tabbed Settings.Apk

HI all, Here is a guide
  How to add TABS to Settings with swipe gesture



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.Decompile your settings.apk

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..

Quote
<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..

Quote
<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..

Quote
Find -------------------  Replace with ID of name 

IN smali/com/android/settings/TabbedSettings.smali

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"

IN smali/com/android/settings/TabbedSettings$1.smali

0x7f0c0001 -------------------  type="anim" name="slide_in_right"
0x7f0c     -------------------  type="anim" name="slide_in_left" (Only first 4 digits)

IN smali/com/android/settings/PersonalSettings.smali

0x7f040039 -------------------  type="xml" name="personal_settings"
0x7f03005a -------------------  type="layout" name="speed_container"

IN smali/com/android/settings/ProgramSettings.smali

0x7f04003a -------------------  type="xml" name="program_settings"
0x7f03005a -------------------  type="layout" name="speed_container"

9. Now open AndroidManifest.xml and under these lines

Quote
<application android:label="@string/settings_label" android:icon="@drawable/ic_launcher_settings" android:taskAffinity="">

add these lines(do not replace anything of this just add this line)

Quote
<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

Quote
<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

Quote
<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 and sign the settings.apk  with kitchen


Here is the last step
you have to disable signature check otherwise settings will not work

Here is My Guide

Decompile /system/framework/services.jar, open com/android/server/packagemanagerservice.smali, look for

Quote
.method checkSignaturesLP([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
    .registers 10
    .parameter "s1"
    .parameter "s2"

    .prologue
    .line 1921

and add the red part

Quote
method checkSignaturesLP([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
    .registers 10
    .parameter "s1"

    .parameter "s2"

    .prologue
    .line 1921
    const/4 v6, 0x0
    return v6

That's it, now you can resign system apps
That's it.

credit goes  to Mr. CoD.<D.J.>
   His Original thread [GUIDE] How to add TABS to Settings with swipe gesture... \m

And


Mr.loSconosciuto
   His Original thread [HOW-TO] Disable signature check

Also Suraj Kumar For Writing this guide. 

admin

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.
unsecured loans mortgage us bank mortgage rates business plan auto insurance quote online auto loans mortgage refinance holiday insurance company personal loans auto accident financial business opportunitues management accounting canon camera dell laptops toshiba hp pavillion laptop deals. investment opportunities immigration lawyers insurance coverages data recovery denver data recovery los angeles student loans. conference calling companies loan consolidation rates los angeles criminal defense attorney car insurance online lung asbestos affordable insurance home refinance term insurance quotes samsung android nokia android phone sony android iphone 5 new iphone samsung galaxy sony experia iphone air hp laptop dell laptop sony laptop asus laptop hp pavillion dell inspiron touch screen ultrabox cheap laptop best laptop hd laptop android mobile phones tecno android phones android smart phones virgin mobile android phones android tablet best android tablet pc 10 inch android tablet android tablet computer capacitive touch android tablet verizon iphone 4 discount laptops computer laptops best laptops for college students laptops notebooks lenovo laptops ideapad acer laptops touchscreen laptops computers apple laptops best buy laptops laptops reviews business laptops ultrabooks laptops computers tablets cheap mini laptops toshiba laptops best buy sony vaio laptops best buy best small business laptops buy global business opportunities small business opportunities business opportunities online business opportunities internet business opportunities mortgage and insurance business career opportunities candidates job business exact

 

Copyright @ 2013 Droid Area.