[mod][guide] miui style setting for jb 4.1.2 touchwiz

syaeful

Senior Member
Jul 31, 2013
130
87
0
Purbalingga
Hello xda'ers,
This guide is not original made by me, I just compare from @dikulbahrian MOD, and bring from original guide :
here : http://forum.xda-developers.com/showthread.php?t=2273807
and here : http://forum.xda-developers.com/showthread.php?t=2103158
so thanks to sir Adi Aisiteru Reborn and BigSplit, and my Buddy Joni Eka Saputra for tested :highfive:
just little different on smali code, so this guide should work on Stock JB 4.1.2 GT-I8190 and maybe can be adapt to any samsung JB firmware

OK Let's go to gide
FIRST
You need to Decompile your SecSettings.apk
go to res/values/ids.xml and add the following to the end (ignore some if already present)
Code:
	<item type="id" name="personalized_tab">false</item>
    <item type="id" name="device_tab">false</item>
    <item type="id" name="app_tab">false</item>
    <item type="id" name="cursor">false</item>
    <item type="id" name="vPager">false</item>
    <item type="id" name="linearLayout1">false</item>
    <item type="id" name="international_roaming_setting">false</item>
    <item type="id" name="torchlight_settings">false</item>
    <item type="id" name="dmr_settings">false</item>
go to res/values/bools.xml and add the following to the end (ignore some if already present)
Code:
<bool name="config_customized_keys">false</bool>
go to res/values/strings.xml and add the following to the end (ignore some if already present)
Code:
<string name="personalized_setting">Personal</string>
    <string name="device_setting">System</string>
    <string name="app_setting">Applications</string>
download some resources from HERE and merged to your settings.
Recompile your Settings and decompile again

NEXT
go to smali/com/android/Settings.smali

find this method :
Code:
.method private updateHeaderList(Ljava/util/List;)V
delete all line until .end method and replace with this :
Code:
.method private updateHeaderList(Ljava/util/List;)V
    .locals 8
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Landroid/preference/PreferenceActivity$Header;",
            ">;)V"
        }
    .end annotation

    .prologue
    const/4 v4, 0x1

    const/4 v2, 0x0

    .line 560
    move v1, v2

    .line 561
    :goto_0
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    if-ge v1, v0, :cond_2e

    .line 562
    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/preference/PreferenceActivity$Header;

    .line 564
    iget-wide v5, v0, Landroid/preference/PreferenceActivity$Header;->id:J

    long-to-int v5, v5

    .line 565
    const v3, 0x7f0b0429

    if-ne v5, v3, :cond_3

    .line 566
    invoke-direct {p0}, Lcom/android/settings/Settings;->needsDockSettings()Z

    move-result v3

    if-nez v3, :cond_0

    .line 567
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    .line 825
    :cond_0
    :goto_1
    invoke-static {}, Landroid/os/UserId;->myUserId()I

    move-result v3

    if-eqz v3, :cond_2c

    iget-object v3, p0, Lcom/android/settings/Settings;->SETTINGS_FOR_RESTRICTED:[I

    invoke-static {v3, v5}, Lcom/android/internal/util/ArrayUtils;->contains([II)Z

    move-result v3

    if-nez v3, :cond_2c

    .line 827
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    .line 838
    :cond_1
    :goto_2
    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    if-ne v3, v0, :cond_2f

    .line 840
    iget-object v3, p0, Lcom/android/settings/Settings;->mFirstHeader:Landroid/preference/PreferenceActivity$Header;

    if-nez v3, :cond_2

    invoke-static {v0}, Lcom/android/settings/Settings$HeaderAdapter;->getHeaderType(Landroid/preference/PreferenceActivity$Header;)I

    move-result v3

    if-eqz v3, :cond_2

    .line 842
    iput-object v0, p0, Lcom/android/settings/Settings;->mFirstHeader:Landroid/preference/PreferenceActivity$Header;

    .line 844
    :cond_2
    iget-object v0, p0, Lcom/android/settings/Settings;->mHeaderIndexMap:Ljava/util/HashMap;

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-virtual {v0, v3, v5}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 845
    add-int/lit8 v0, v1, 0x1

    :goto_3
    move v1, v0

    .line 847
    goto :goto_0

    .line 568
    :cond_3
    const v3, 0x7f0b0404

    if-eq v5, v3, :cond_4

    const v3, 0x7f0b0414

    if-ne v5, v3, :cond_5

    .line 569
    :cond_4
    invoke-static {p0, p1, v0}, Lcom/android/settings/Utils;->updateHeaderToSpecificActivityFromMetaDataOrRemove(Landroid/content/Context;Ljava/util/List;Landroid/preference/PreferenceActivity$Header;)Z

    goto :goto_1

    .line 570
    :cond_5
    const v3, 0x7f0b03fd

    if-ne v5, v3, :cond_6

    .line 572
    invoke-virtual {p0}, Lcom/android/settings/Settings;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v3

    const-string v6, "android.hardware.wifi"

    invoke-virtual {v3, v6}, Landroid/content/pm/PackageManager;->hasSystemFeature(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_0

    .line 573
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto :goto_1

    .line 583
    :cond_6
    const v3, 0x7f0b03fe

    if-ne v5, v3, :cond_7

    .line 586
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto :goto_1

    .line 588
    :cond_7
    const v3, 0x7f0b03ff

    if-ne v5, v3, :cond_8

    .line 602
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto :goto_1

    .line 604
    :cond_8
    const v3, 0x7f0b0402

    if-ne v5, v3, :cond_a

    .line 606
    const-string v3, "LGT"

    const-string v6, "ro.csc.sales_code"

    invoke-static {v6}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v3, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_9

    invoke-static {p0}, Lcom/android/settings/Utils;->isWifiOnly(Landroid/content/Context;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 608
    :cond_9
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 610
    :cond_a
    const v3, 0x7f0b0403

    if-ne v5, v3, :cond_b

    .line 611
    iput-object v0, p0, Lcom/android/settings/Settings;->mInternationalRoaming:Landroid/preference/PreferenceActivity$Header;

    .line 613
    const-string v3, "CTC"

    const-string v6, "ro.csc.sales_code"

    invoke-static {v6}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v3, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_0

    .line 614
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 616
    :cond_b
    const v3, 0x7f0b0400

    if-ne v5, v3, :cond_c

    .line 618
    invoke-virtual {p0}, Lcom/android/settings/Settings;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v3

    const-string v6, "android.hardware.bluetooth"

    invoke-virtual {v3, v6}, Landroid/content/pm/PackageManager;->hasSystemFeature(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_0

    .line 619
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 621
    :cond_c
    const v3, 0x7f0b040d

    if-ne v5, v3, :cond_d

    .line 622
    invoke-static {}, Lcom/sec/android/app/CscFeature;->getInstance()Lcom/sec/android/app/CscFeature;

    move-result-object v3

    const-string v6, "CscFeature_Setting_EnableMenuBlockCallMsg"

    invoke-virtual {v3, v6}, Lcom/sec/android/app/CscFeature;->getEnableStatus(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_0

    .line 624
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 626
    :cond_d
    const v3, 0x7f0b0401

    if-ne v5, v3, :cond_e

    .line 628
    const-string v3, "network_management"

    invoke-static {v3}, Landroid/os/ServiceManager;->getService(Ljava/lang/String;)Landroid/os/IBinder;

    move-result-object v3

    invoke-static {v3}, Landroid/os/INetworkManagementService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/INetworkManagementService;

    move-result-object v3

    .line 631
    :try_start_0
    invoke-interface {v3}, Landroid/os/INetworkManagementService;->isBandwidthControlEnabled()Z

    move-result v3

    if-nez v3, :cond_0

    .line 632
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    goto/16 :goto_1

    .line 634
    :catch_0
    move-exception v3

    goto/16 :goto_1

    .line 637
    :cond_e
    const v3, 0x7f0b0422

    if-eq v5, v3, :cond_0

    .line 641
    const v3, 0x7f0b0423

    if-ne v5, v3, :cond_f

    .line 643
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 645
    :cond_f
    const v3, 0x7f0b0424

    if-ne v5, v3, :cond_10

    .line 647
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 649
    :cond_10
    const v3, 0x7f0b0408

    if-eq v5, v3, :cond_0

    .line 653
    const v3, 0x7f0b0410

    if-ne v5, v3, :cond_11

    .line 655
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 657
    :cond_11
    const v3, 0x7f0b0420

    if-ne v5, v3, :cond_12

    .line 664
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 684
    :cond_12
    const v3, 0x7f0b0411

    if-ne v5, v3, :cond_13

    .line 686
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 688
    :cond_13
    const v3, 0x7f0b041f

    if-ne v5, v3, :cond_14

    .line 690
    add-int/lit8 v1, v1, 0x1

    .line 691
    invoke-direct {p0, p1, v1}, Lcom/android/settings/Settings;->insertAccountsHeaders(Ljava/util/List;I)I

    move-result v1

    goto/16 :goto_1

    .line 693
    :cond_14
    const v3, 0x7f0b0427

    if-ne v5, v3, :cond_15

    .line 695
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 697
    :cond_15
    const v3, 0x7f0b041b

    if-ne v5, v3, :cond_16

    .line 699
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 701
    :cond_16
    const v3, 0x7f0b0425

    if-ne v5, v3, :cond_17

    .line 705
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 707
    :cond_17
    const v3, 0x7f0b0426

    if-ne v5, v3, :cond_18

    .line 710
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 712
    :cond_18
    const v3, 0x7f0b0416

    if-ne v5, v3, :cond_1a

    .line 713
    iget-boolean v3, p0, Lcom/android/settings/Settings;->mEnableUserManagement:Z

    if-eqz v3, :cond_19

    invoke-static {}, Landroid/os/UserId;->myUserId()I

    move-result v3

    if-nez v3, :cond_19

    invoke-virtual {p0}, Lcom/android/settings/Settings;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v6, 0x7f0c0007

    invoke-virtual {v3, v6}, Landroid/content/res/Resources;->getBoolean(I)Z

    move-result v3

    if-eqz v3, :cond_19

    invoke-static {}, Lcom/android/settings/Utils;->isMonkeyRunning()Z

    move-result v3

    if-eqz v3, :cond_0

    .line 717
    :cond_19
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 719
    :cond_1a
    const v3, 0x7f0b041d

    if-ne v5, v3, :cond_1b

    .line 724
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 726
    :cond_1b
    const v3, 0x7f0b0431

    if-ne v5, v3, :cond_1c

    .line 727
    const-string v3, "ro.csc.sales_code"

    invoke-static {v3}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 728
    const-string v6, "ro.product.model"

    invoke-static {v6}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    .line 730
    const-string v7, "SPR"

    invoke-virtual {v7, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-nez v7, :cond_0

    const-string v7, "BST"

    invoke-virtual {v7, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_0

    const-string v3, "SCH-S960L"

    invoke-virtual {v3, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_0

    .line 732
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 734
    :cond_1c
    const v3, 0x7f0b0430

    if-ne v5, v3, :cond_1d

    .line 737
    :try_start_1
    invoke-virtual {p0}, Lcom/android/settings/Settings;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v3

    const-string v6, "com.sprint.dsa"

    const/4 v7, 0x0

    invoke-virtual {v3, v6, v7}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
    :try_end_1
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_1 .. :try_end_1} :catch_1

    move v3, v4

    .line 743
    :goto_4
    if-nez v3, :cond_0

    .line 744
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 738
    :catch_1
    move-exception v3

    move v3, v2

    .line 739
    goto :goto_4

    .line 746
    :cond_1d
    const v3, 0x7f0b040e

    if-ne v5, v3, :cond_1e

    .line 748
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 750
    :cond_1e
    const v3, 0x7f0b0415

    if-ne v5, v3, :cond_20

    .line 751
    const-string v3, "DCM"

    const-string v6, "ro.csc.sales_code"

    invoke-static {v6}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v3, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_1f

    .line 752
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 756
    :cond_1f
    :try_start_2
    invoke-virtual {p0}, Lcom/android/settings/Settings;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v3

    const-string v6, "com.nttdocomo.android.docomoset"

    const/4 v7, 0x1

    invoke-virtual {v3, v6, v7}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
    :try_end_2
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_2 .. :try_end_2} :catch_2

    goto/16 :goto_1

    .line 757
    :catch_2
    move-exception v3

    .line 758
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 761
    :cond_20
    const v3, 0x7f0b042e

    if-ne v5, v3, :cond_21

    .line 763
    invoke-direct {p0}, Lcom/android/settings/Settings;->isOrangeCustomer()Z

    move-result v3

    if-eqz v3, :cond_0

    .line 764
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 766
    :cond_21
    const v3, 0x7f0b042f

    if-ne v5, v3, :cond_22

    .line 768
    invoke-direct {p0}, Lcom/android/settings/Settings;->isOrangeCustomer()Z

    move-result v3

    if-nez v3, :cond_0

    .line 769
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 771
    :cond_22
    const v3, 0x7f0b040a

    if-ne v5, v3, :cond_23

    .line 774
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 778
    :cond_23
    const v3, 0x7f0b041a

    if-ne v5, v3, :cond_25

    .line 779
    invoke-virtual {p0}, Lcom/android/settings/Settings;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v3

    iget v3, v3, Landroid/content/res/Configuration;->keyboard:I

    if-eq v3, v4, :cond_24

    invoke-virtual {p0}, Lcom/android/settings/Settings;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v6, 0x7f0c001e

    invoke-virtual {v3, v6}, Landroid/content/res/Resources;->getBoolean(I)Z

    move-result v3

    if-nez v3, :cond_0

    .line 780
    :cond_24
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 784
    :cond_25
    const v3, 0x7f0b03fc

    if-ne v5, v3, :cond_26

    .line 785
    const-string v3, "VZW"

    sget-object v6, Lcom/android/settings/Settings;->sSalesCode:Ljava/lang/String;

    invoke-virtual {v3, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_0

    .line 786
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 789
    :cond_26
    const v3, 0x7f0b03fb

    if-ne v5, v3, :cond_27

    .line 792
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 794
    :cond_27
    const v3, 0x7f0b03fa

    if-ne v5, v3, :cond_28

    .line 797
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 799
    :cond_28
    const v3, 0x7f0b0412

    if-eq v5, v3, :cond_0

    .line 803
    const v3, 0x7f0b0406

    if-ne v5, v3, :cond_29

    .line 805
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 807
    :cond_29
    const v3, 0x7f0b0405

    if-eq v5, v3, :cond_0

    .line 811
    const v3, 0x7f0b042a

    if-ne v5, v3, :cond_2a

    .line 813
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 815
    :cond_2a
    const v3, 0x7f0b0428

    if-ne v5, v3, :cond_2b

    .line 817
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 819
    :cond_2b
    const v3, 0x7f0b0407

    if-ne v5, v3, :cond_0

    .line 821
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 828
    :cond_2c
    const v3, 0x7f0b042b

    if-ne v5, v3, :cond_2d

    .line 829
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_2

    .line 830
    :cond_2d
    const v3, 0x7f0b0409

    if-ne v5, v3, :cond_1

    .line 831
    const-string v3, "VZW"

    sget-object v6, Lcom/android/settings/Settings;->sSalesCode:Ljava/lang/String;

    invoke-virtual {v3, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_1

    .line 833
    invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    goto/16 :goto_2

    .line 848
    :cond_2e
    return-void

    :cond_2f
    move v0, v1

    goto/16 :goto_3
.end method
find this method :
Code:
.method protected onCreate(Landroid/os/Bundle;)V
scrool down and delete RED LINE

Code:
	iget-object v0, p0, Lcom/android/settings/Settings;->mParentHeader:Landroid/preference/PreferenceActivity$Header;

    iget-object v0, v0, Landroid/preference/PreferenceActivity$Header;->title:Ljava/lang/CharSequence;

    new-instance v1, Lcom/android/settings/Settings$1;

    invoke-direct {v1, p0}, Lcom/android/settings/Settings$1;-><init>(Lcom/android/settings/Settings;)V

    invoke-virtual {p0, v0, v4, v1}, Lcom/android/settings/Settings;->setParentTitle(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/view/View$OnClickListener;)V

    .line 233
    :cond_5
[COLOR="Red"]    invoke-virtual {p0}, Lcom/android/settings/Settings;->getActionBar()Landroid/app/ActionBar;[/COLOR]

[COLOR="Red"]    move-result-object v0[/COLOR]

[COLOR="Red"]    const/high16 v1, 0x7f03[/COLOR]

[COLOR="Red"]    invoke-virtual {v0, v1}, Landroid/app/ActionBar;->setIcon(I)V[/COLOR]

    .line 237
    invoke-virtual {p0}, Lcom/android/settings/Settings;->onIsMultiPane()Z

    move-result v0

    if-eqz v0, :cond_6

    .line 238
    invoke-virtual {p0}, Lcom/android/settings/Settings;->getActionBar()Landroid/app/ActionBar;

    move-result-object v0

    invoke-virtual {v0, v3}, Landroid/app/ActionBar;->setDisplayHomeAsUpEnabled(Z)V

    .line 239
    invoke-virtual {p0}, Lcom/android/settings/Settings;->getActionBar()Landroid/app/ActionBar;

    move-result-object v0

    invoke-virtual {v0, v3}, Landroid/app/ActionBar;->setHomeButtonEnabled(Z)V

    .line 241
    :cond_6
    return-void
.end method
save and don't close

NEXT
for for the method that you just added (.method private updateHeaderList(Ljava/util/List;)V) you will find 46 id 0x7fxxxxxx.
Compare with my public :
Code:
<public type="id" name="dock_settings" id="0x7f0b0429" />
<public type="id" name="operator_settings" id="0x7f0b0404" />
<public type="id" name="manufacturer_settings" id="0x7f0b0414" />
<public type="id" name="wifi_settings" id="0x7f0b03fd" />
<public type="id" name="wifi_ap_settings" id="0x7f0b03fe" />
<public type="id" name="wifi_sprinthotspot_settings" id="0x7f0b03ff" />
<public type="id" name="global_roaming_settings" id="0x7f0b0402" />
<public type="id" name="international_roaming_setting" id="0x7f0b0403" />
<public type="id" name="bluetooth_settings" id="0x7f0b0400" />
<public type="id" name="block_settings" id="0x7f0b040d" />
<public type="id" name="data_usage_settings" id="0x7f0b0401" />
<public type="id" name="motion_settings" id="0x7f0b0422" />
<public type="id" name="s_motion_settings" id="0x7f0b0423" />
<public type="id" name="finger_air_view_settings" id="0x7f0b0424" />
<public type="id" name="easy_mode_settings" id="0x7f0b0408" />
<public type="id" name="power_saving_mode" id="0x7f0b0410" />
<public type="id" name="bua_plus" id="0x7f0b0420" />
<public type="id" name="power_settings" id="0x7f0b0411" />
<public type="id" name="account_settings" id="0x7f0b041f" />
<public type="id" name="pen_settings_menu" id="0x7f0b0427" />
<public type="id" name="onehand_settings" id="0x7f0b041b" />
<public type="id" name="dualmode_settings" id="0x7f0b0425" />
<public type="id" name="dualSlot_settings" id="0x7f0b0426" />
<public type="id" name="user_settings" id="0x7f0b0416" />
<public type="bool" name="enable_user_management" id="0x7f0c0007" />
<public type="id" name="scloud_settings" id="0x7f0b041d" />
<public type="id" name="system_update" id="0x7f0b0431" />
<public type="id" name="activate_this_device" id="0x7f0b0430" />
<public type="id" name="customizable_key" id="0x7f0b040e" />
<public type="id" name="docomoservice_settings" id="0x7f0b0415" />
<public type="id" name="development_settings" id="0x7f0b042e" />
<public type="id" name="development_settings_orange" id="0x7f0b042f" />
<public type="id" name="simcard_management" id="0x7f0b040a" />
<public type="id" name="customizedkey_settings" id="0x7f0b041a" />
<public type="bool" name="config_customized_keys" id="0x7f0c001e" />
<public type="id" name="airplane_mode" id="0x7f0b03fc" />
<public type="id" name="home_settings" id="0x7f0b03fb" />
<public type="id" name="home_settings_category" id="0x7f0b03fa" />
<public type="id" name="battery_settings" id="0x7f0b0412" />
<public type="id" name="header_nearby_settings" id="0x7f0b0406" />
<public type="id" name="wireless_settings" id="0x7f0b0405" />
<public type="id" name="hdmi_settings" id="0x7f0b042a" />
<public type="id" name="torchlight_settings" id="0x7f0b0428" />
<public type="id" name="dmr_settings" id="0x7f0b0407" />                   
<public type="id" name="usb_settings" id="0x7f0b042b" />
<public type="id" name="dormant_mode" id="0x7f0b0409" />
go to smali/com/android/settings/MainSetting.smali
open your public.xml and replace id on MainSettings.smali with your id public
Code:
	Line 98:     const v3, 0x7f0b0445		<public type="id" name=""
	Line 182:     const v0, 0x7f0b0442		<public type="id" name="personalized_tab"
	Line 193:     const v0, 0x7f0b0443		<public type="id" name="device_tab"
	Line 204:     const v0, 0x7f0b0444		<public type="id" name="app_tab"
	Line 263:     const v0, 0x7f0b0446		<public type="id" name="vPager"
	Line 466:     const v0, 0x7f040143		<public type="layout" name="mainsetting"
eg : replace 0x7f0b0445 with <public type="id" name="cursor" id="0x7fxxxxxx" />
 

syaeful

Senior Member
Jul 31, 2013
130
87
0
Purbalingga
NEXT

go to smali/com/android/settings/

Copy in any place :
Settings.smali
Settings$1.smali
Settings$2.smali
Settings$HeaderAdapter$HeaderViewHolder.smali
Settings$HeaderAdapter.smali

rename to :
AppSettings.smali
AppSettings$1.smali
AppSettings$2.smali
AppSettings$HeaderAdapter$HeaderViewHolder.smali
AppSettings$HeaderAdapter.smali

again Copy :
Settings.smali
Settings$1.smali
Settings$2.smali
Settings$HeaderAdapter$HeaderViewHolder.smali
Settings$HeaderAdapter.smali

rename to :
DeviceSettings.smali
DeviceSettings$1.smali
DeviceSettings$2.smali
DeviceSettings$HeaderAdapter$HeaderViewHolder.smal i
DeviceSettings$HeaderAdapter.smali

again Copy :
Settings.smali
Settings$1.smali
Settings$2.smali
Settings$HeaderAdapter$HeaderViewHolder.smali
Settings$HeaderAdapter.smali

rename to :
PersonalSettings.smali
PersonalSettings$1.smali
PersonalSettings$2.smali
PersonalSettings$HeaderAdapter$HeaderViewHolder.sm ali
PersonalSettings$HeaderAdapter.smali

NOTE : if your settings have Settings$3.smali, you need too copy these and rename to AppSettings$3.smali, DeviceSettings$3.smali, and PersonalSettings$3.smali

Open :
AppSettings.smali
AppSettings$1.smali
AppSettings$2.smali
AppSettings$HeaderAdapter$HeaderViewHolder.smali
AppSettings$HeaderAdapter.smali

edit all lines in that all smali from :
if the line is, Lcom/android/settings/Settings edit it to become Lcom/android/settings/AppSettings
if the line is, Lcom/android/settings/Settings$1 edit it to become Lcom/android/settings/AppSettings$1
if the line is, Lcom/android/settings/Settings$2 edit it to become Lcom/android/settings/AppSettings$2
if the line is, Lcom/android/settings/Settings$HeaderAdapter$HeaderViewHolder edit it to become Lcom/android/settings/AppSettings$HeaderAdapter$HeaderViewHolder
if the line is, Lcom/android/settings/Settings$HeaderAdapter edit it to become Lcom/android/settings/AppSettings$HeaderAdapter

and so is edit all lines in
DeviceSettings.smali
DeviceSettings$1.smali
DeviceSettings$2.smali
DeviceSettings$HeaderAdapter$HeaderViewHolder.smal i
DeviceSettings$HeaderAdapter.smali

if the line is, Lcom/android/settings/Settings edit it to become Lcom/android/settings/DeviceSettings
if the line is, Lcom/android/settings/Settings$1 edit it to become Lcom/android/settings/DeviceSettings$1
if the line is, Lcom/android/settings/Settings$2 edit it to become Lcom/android/settings/DeviceSettings$2
if the line is, Lcom/android/settings/Settings$HeaderAdapter$HeaderViewHolder edit it to become Lcom/android/settings/DeviceSettings$HeaderAdapter$HeaderViewHolder
if the line is, Lcom/android/settings/Settings$HeaderAdapter edit it to become Lcom/android/settings/DeviceSettings$HeaderAdapter

and so is edit all lines in
PersonalSettings.smali
PersonalSettings$1.smali
PersonalSettings$2.smali
PersonalSettings$HeaderAdapter$HeaderViewHolder.sm ali
PersonalSettings$HeaderAdapter.smali

if the line is, Lcom/android/settings/Settings edit it to become Lcom/android/settings/PersonalSettings
if the line is, Lcom/android/settings/Settings$1 edit it to become Lcom/android/settings/PersonalSettings$1
if the line is, Lcom/android/settings/Settings$2 edit it to become Lcom/android/settings/PersonalSettings$2
if the line is, Lcom/android/settings/Settings$HeaderAdapter$HeaderViewHolder edit it to become Lcom/android/settings/PersonalSettings$HeaderAdapter$HeaderViewHolder
if the line is, Lcom/android/settings/Settings$HeaderAdapter edit it to become Lcom/android/settings/PersonalSettings$HeaderAdapter

NOTE : there is an exception of editing all line, that you must not edit or not allowed to edit All lines on annotation section

Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
	.............
	..............
	}
.end annotation
NEXT
Search : <public type="xml" name="settings_headers" id="0x????????" />

and search this id on AppSettings.smali, DeviceSettings.smali, PersonalSettings.smali
Code:
in PersonalSettings.smali -> replace with  <public type="xml" name="personal_settings_headers" id="0x????????" />

in DeviceSettings.smali   -> replace with <public type="xml" name="device_settings_headers" id="0x????????" />

in AppSettings.smali      -> replace with  <public type="xml" name="app_settings_headers" id="0x????????" />
open AndroidManifest.xml

find similiar line like this :
Code:
<activity android:label="@string/settings_label_launcher" android:name="Settings" android:taskAffinity="com.android.settings" android:launchMode="singleTask" android:configChanges="keyboardHidden|orientation|screenSize">
            <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 this :
Code:
<activity android:theme="@*android:style/Theme.NoTitleBar" android:name="MainSetting" android:taskAffinity="com.android.settings" android:launchMode="singleTask">
            <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:label="@string/settings_label_launcher" android:name="PersonalSettings" android:taskAffinity="com.android.settings" android:launchMode="singleTask">
            <intent-filter>
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity android:label="@string/settings_label_launcher" android:name="DeviceSettings" android:taskAffinity="com.android.settings" android:launchMode="singleTask">
            <intent-filter>
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity android:label="@string/settings_label_launcher" android:name="AppSettings" android:taskAffinity="com.android.settings" android:launchMode="singleTask">
            <intent-filter>
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity android:label="@string/settings_label_launcher" android:name="Settings" android:taskAffinity="com.android.settings" android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
Recompile, Sign, Push to Your Device, It should work with blank tab
 
Last edited:

syaeful

Senior Member
Jul 31, 2013
130
87
0
Purbalingga
NEXT
go to res/xml and open app_settings_headers.xml, device_settings_headers.xml, personal_settings_headers.xml

copy this code and replace to your 3 xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<preference-headers
  xmlns:android="http://schemas.android.com/apk/res/android">
  
</preference-headers>
open your settings_header.xml from res/xml folder, place code to 3 xml wherever you want
for reference you can see this post
http://forum.xda-developers.com/showpost.php?p=55932748&postcount=3
 

Sami Kabir

Senior Member
Oct 3, 2012
2,233
1,406
0
It doesn't work. I didn't even add anything to App, Device and PersonalSettings.xml yet :(

Code:
10-23 17:02:46.244  2855  2855 E MenuItemImpl: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.SETTINGS }

10-23 17:02:50.949  2910 22303 E Drive.UninstallOperation: Package still installed com.android.settings

10-23 17:04:17.453 23088 23384 E copresGcore: Couldn't load settings: /data/data/com.google.android.gms/files/copresence_settings: open failed: ENOENT (No such file or directory)

10-23 17:04:36.912 22804 22804 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.MainSetting}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.PersonalSettings}: java.lang.NullPointerException

10-23 17:04:36.912 22804 22804 E AndroidRuntime: Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.PersonalSettings}: java.lang.NullPointerException

10-23 17:04:36.912 22804 22804 E AndroidRuntime: 	at com.android.settings.MainSetting.InitViewPager(MainSetting.java:114)

10-23 17:04:36.912 22804 22804 E AndroidRuntime: 	at com.android.settings.MainSetting.onCreate(MainSetting.java:52)

10-23 17:04:36.912 22804 22804 E AndroidRuntime: 	at com.android.settings.PersonalSettings.onCreate(Settings.java:239)

10-23 17:04:47.542 22589 22623 E ActivityManager: App already has crash dialog: ProcessRecord{41ff1f50 22804:com.android.settings/1000}

10-23 17:04:59.343 24214 24214 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.MainSetting}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.PersonalSettings}: java.lang.NullPointerException

10-23 17:04:59.343 24214 24214 E AndroidRuntime: Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.PersonalSettings}: java.lang.NullPointerException

10-23 17:04:59.343 24214 24214 E AndroidRuntime: 	at com.android.settings.MainSetting.InitViewPager(MainSetting.java:114)

10-23 17:04:59.343 24214 24214 E AndroidRuntime: 	at com.android.settings.MainSetting.onCreate(MainSetting.java:52)

10-23 17:04:59.343 24214 24214 E AndroidRuntime: 	at com.android.settings.PersonalSettings.onCreate(Settings.java:239)

10-23 17:05:06.785 22589 22623 E ActivityManager: App already has crash dialog: ProcessRecord{42328018 24214:com.android.settings/1000}
 

syaeful

Senior Member
Jul 31, 2013
130
87
0
Purbalingga
It doesn't work. I didn't even add anything to App, Device and PersonalSettings.xml yet :(

Code:
10-23 17:02:46.244  2855  2855 E MenuItemImpl: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.SETTINGS }

10-23 17:02:50.949  2910 22303 E Drive.UninstallOperation: Package still installed com.android.settings

10-23 17:04:17.453 23088 23384 E copresGcore: Couldn't load settings: /data/data/com.google.android.gms/files/copresence_settings: open failed: ENOENT (No such file or directory)

10-23 17:04:36.912 22804 22804 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.MainSetting}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.PersonalSettings}: java.lang.NullPointerException

10-23 17:04:36.912 22804 22804 E AndroidRuntime: Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.PersonalSettings}: java.lang.NullPointerException

10-23 17:04:36.912 22804 22804 E AndroidRuntime: 	at com.android.settings.MainSetting.InitViewPager(MainSetting.java:114)

10-23 17:04:36.912 22804 22804 E AndroidRuntime: 	at com.android.settings.MainSetting.onCreate(MainSetting.java:52)

10-23 17:04:36.912 22804 22804 E AndroidRuntime: 	at com.android.settings.PersonalSettings.onCreate(Settings.java:239)

10-23 17:04:47.542 22589 22623 E ActivityManager: App already has crash dialog: ProcessRecord{41ff1f50 22804:com.android.settings/1000}

10-23 17:04:59.343 24214 24214 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.MainSetting}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.PersonalSettings}: java.lang.NullPointerException

10-23 17:04:59.343 24214 24214 E AndroidRuntime: Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.PersonalSettings}: java.lang.NullPointerException

10-23 17:04:59.343 24214 24214 E AndroidRuntime: 	at com.android.settings.MainSetting.InitViewPager(MainSetting.java:114)

10-23 17:04:59.343 24214 24214 E AndroidRuntime: 	at com.android.settings.MainSetting.onCreate(MainSetting.java:52)

10-23 17:04:59.343 24214 24214 E AndroidRuntime: 	at com.android.settings.PersonalSettings.onCreate(Settings.java:239)

10-23 17:05:06.785 22589 22623 E ActivityManager: App already has crash dialog: ProcessRecord{42328018 24214:com.android.settings/1000}
What tools do you use?
I recomended use apk multitool sir
 

Sami Kabir

Senior Member
Oct 3, 2012
2,233
1,406
0
What tools do you use?
I recomended use apk multitool sir
I use APKTOOL for all my works and I use this tool for signing my edited apps. I don't think this is causing the problem, it has something to do with my smali files. If only I was good in smali editing and logcat reading, I too could successfully use MIUI style or S4 style Settings app on my phone :(

Anyways, thanks for the guide and for your reply.
 
  • Like
Reactions: syaeful

syaeful

Senior Member
Jul 31, 2013
130
87
0
Purbalingga
I use APKTOOL for all my works and I use this tool for signing my edited apps. I don't think this is causing the problem, it has something to do with my smali files. If only I was good in smali editing and logcat reading, I too could successfully use MIUI style or S4 style Settings app on my phone :(

Anyways, thanks for the guide and for your reply.
maybe you can use mainsettings.smali from sir Adi Aisiteru from here sir : http://forum.xda-developers.com/showthread.php?t=2273807