[GUIDE][4.x] Add items to Settings.apk / Change Layout

Search This thread

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
9,427
8,752
26
Salford, Greater Manchester, UK
quinny898.co.uk
i get lots of this kind errors when i decompile the app

Code:
W: Could not decode attr value, using undecoded value instead: ns=android, name=widgetLayout, value=0x02030015W: Could not decode attr value, using unadecoded value instead: ns=android, name=widgetLayout, value=0x02030015
plz help :S

Install your device's framework-res to it

Sent from my Archos G9 using Tapatalk HD
 
  • Like
Reactions: CosTuMe

CosTuMe

Senior Member
Jun 27, 2013
91
16
Sony Xperia Z2
Xiaomi Mi 5s
Install your device's framework-res to it

Sent from my Archos G9 using Tapatalk HD

it worked! but now when i recompile the error is:


Code:
C:\Users\Pinat-Avoda\Downloads\apktool1.5.2>java -jar apktool.jar b SecSettings
I: Copying classes.dex file...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 17, --target-sdk-version, 17, -F, C:\Users\PINAT-~1\AppData\Local\T
emp\APKTOOL4054981324411249649.tmp, -0, arsc, -I, C:\Users\Pinat-Avoda\apktool\f
ramework\1.apk, -I, C:\Users\Pinat-Avoda\apktool\framework\2.apk, -S, C:\Users\P
inat-Avoda\Downloads\apktool1.5.2\SecSettings\res, -M, C:\Users\Pinat-Avoda\Down
loads\apktool1.5.2\SecSettings\AndroidManifest.xml]
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
        at brut.androlib.Androlib.buildResources(Androlib.java:283)
        at brut.androlib.Androlib.build(Androlib.java:206)
        at brut.androlib.Androlib.build(Androlib.java:176)
        at brut.apktool.Main.cmdBuild(Main.java:228)
        at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
 exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, C:
\Users\PINAT-~1\AppData\Local\Temp\APKTOOL4054981324411249649.tmp, -0, arsc, -I,
 C:\Users\Pinat-Avoda\apktool\framework\1.apk, -I, C:\Users\Pinat-Avoda\apktool\
framework\2.apk, -S, C:\Users\Pinat-Avoda\Downloads\apktool1.5.2\SecSettings\res
, -M, C:\Users\Pinat-Avoda\Downloads\apktool1.5.2\SecSettings\AndroidManifest.xm
l]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
        ... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 17, --target-sdk-version, 17, -F, C:\Users\PINAT-~1\AppData\Local\Tem
p\APKTOOL4054981324411249649.tmp, -0, arsc, -I, C:\Users\Pinat-Avoda\apktool\fra
mework\1.apk, -I, C:\Users\Pinat-Avoda\apktool\framework\2.apk, -S, C:\Users\Pin
at-Avoda\Downloads\apktool1.5.2\SecSettings\res, -M, C:\Users\Pinat-Avoda\Downlo
ads\apktool1.5.2\SecSettings\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:93)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
        ... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2
, ???????? ??? ?????? ???? ?? ?║??? ?????
        at java.lang.ProcessBuilder.start(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at brut.util.OS.exec(OS.java:84)
        ... 7 more
Caused by: java.io.IOException: CreateProcess error=2, ???????? ??? ?????? ????
?? ?║??? ?????
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(Unknown Source)
        at java.lang.ProcessImpl.start(Unknown Source)
        ... 11 more
 

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
9,427
8,752
26
Salford, Greater Manchester, UK
quinny898.co.uk
it worked! but now when i recompile the error is:


Code:
C:\Users\Pinat-Avoda\Downloads\apktool1.5.2>java -jar apktool.jar b SecSettings
I: Copying classes.dex file...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 17, --target-sdk-version, 17, -F, C:\Users\PINAT-~1\AppData\Local\T
emp\APKTOOL4054981324411249649.tmp, -0, arsc, -I, C:\Users\Pinat-Avoda\apktool\f
ramework\1.apk, -I, C:\Users\Pinat-Avoda\apktool\framework\2.apk, -S, C:\Users\P
inat-Avoda\Downloads\apktool1.5.2\SecSettings\res, -M, C:\Users\Pinat-Avoda\Down
loads\apktool1.5.2\SecSettings\AndroidManifest.xml]
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
        at brut.androlib.Androlib.buildResources(Androlib.java:283)
        at brut.androlib.Androlib.build(Androlib.java:206)
        at brut.androlib.Androlib.build(Androlib.java:176)
        at brut.apktool.Main.cmdBuild(Main.java:228)
        at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
 exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, C:
\Users\PINAT-~1\AppData\Local\Temp\APKTOOL4054981324411249649.tmp, -0, arsc, -I,
 C:\Users\Pinat-Avoda\apktool\framework\1.apk, -I, C:\Users\Pinat-Avoda\apktool\
framework\2.apk, -S, C:\Users\Pinat-Avoda\Downloads\apktool1.5.2\SecSettings\res
, -M, C:\Users\Pinat-Avoda\Downloads\apktool1.5.2\SecSettings\AndroidManifest.xm
l]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
        ... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 17, --target-sdk-version, 17, -F, C:\Users\PINAT-~1\AppData\Local\Tem
p\APKTOOL4054981324411249649.tmp, -0, arsc, -I, C:\Users\Pinat-Avoda\apktool\fra
mework\1.apk, -I, C:\Users\Pinat-Avoda\apktool\framework\2.apk, -S, C:\Users\Pin
at-Avoda\Downloads\apktool1.5.2\SecSettings\res, -M, C:\Users\Pinat-Avoda\Downlo
ads\apktool1.5.2\SecSettings\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:93)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
        ... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2
, ???????? ??? ?????? ???? ?? ?║??? ?????
        at java.lang.ProcessBuilder.start(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at brut.util.OS.exec(OS.java:84)
        ... 7 more
Caused by: java.io.IOException: CreateProcess error=2, ???????? ??? ?????? ????
?? ?║??? ?????
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(Unknown Source)
        at java.lang.ProcessImpl.start(Unknown Source)
        ... 11 more

There seems to be a problem with aapt. Try updating it with the latest version from your SDK install

Sent from my GALAXY NEXUS using Tapatalk 4 (VIP)
 

CosTuMe

Senior Member
Jun 27, 2013
91
16
Sony Xperia Z2
Xiaomi Mi 5s
There seems to be a problem with aapt. Try updating it with the latest version from your SDK install

Sent from my GALAXY NEXUS using Tapatalk 4 (VIP)

I only started dealing with apk's..
I moved the aapt.exe to the apktool folder and it fixed all the errors.
but when I opened cmd again and installed the frameworks, ran the recompile line againand then it just says:
Code:
I: Checking whether resources has changed...
I: Building resources...
opens aapk
closing it and moving on. (there is no apk)
 

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
9,427
8,752
26
Salford, Greater Manchester, UK
quinny898.co.uk
I only started dealing with apk's..
I moved the aapt.exe to the apktool folder and it fixed all the errors.
but when I opened cmd again and installed the frameworks, ran the recompile line againand then it just says:
Code:
I: Checking whether resources has changed...
I: Building resources...
opens aapk
closing it and moving on. (there is no apk)
It's not finished building yet. Wait for it to finish and return to the command line, then check the "dist" folder
 

codexc

Senior Member
Jan 30, 2010
3,056
8,102
Beirut
www.probam.net
@Quinny899
i using android-apktool 1.5.2
When try compile it i have this errors,
if delete public.xml and compile i have FC or app not showing or works with sign and without


/home/icode/apktool/Settings/res/values/public.xml:360: error: Public symbol drawable/stat_navbar_edit_on declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:361: error: Public entry identifier 0x7f020194 entry index is larger than available symbols (index 404, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:361: error: Public symbol drawable/stat_sys_phone_call declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:141: error: Public entry identifier 0x7f020195 entry index is larger than available symbols (index 405, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:141: error: Public symbol drawable/status_bar_hr declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:142: error: Public entry identifier 0x7f020196 entry index is larger than available symbols (index 406, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:142: error: Public symbol drawable/tether declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:362: error: Public entry identifier 0x7f020197 entry index is larger than available symbols (index 407, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:362: error: Public symbol drawable/twitter_birdy declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:143: error: Public entry identifier 0x7f020198 entry index is larger than available symbols (index 408, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:143: error: Public symbol drawable/vib_button declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:144: error: Public entry identifier 0x7f020199 entry index is larger than available symbols (index 409, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:144: error: Public symbol drawable/vib_button_disabled declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:145: error: Public entry identifier 0x7f02019a entry index is larger than available symbols (index 410, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:145: error: Public symbol drawable/vib_button_normal declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:146: error: Public entry identifier 0x7f02019b entry index is larger than available symbols (index 411, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:146: error: Public symbol drawable/vib_button_pressed declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:428: error: Public entry identifier 0x7f02019c entry index is larger than available symbols (index 412, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:428: error: Public symbol drawable/widget_add declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:429: error: Public entry identifier 0x7f02019d entry index is larger than available symbols (index 413, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:429: error: Public symbol drawable/widget_delete declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:430: error: Public entry identifier 0x7f02019e entry index is larger than available symbols (index 414, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:430: error: Public symbol drawable/widget_left declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:431: error: Public entry identifier 0x7f02019f entry index is larger than available symbols (index 415, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:431: error: Public symbol drawable/widget_na declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:432: error: Public entry identifier 0x7f0201a0 entry index is larger than available symbols (index 416, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:432: error: Public symbol drawable/widget_reset declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:433: error: Public entry identifier 0x7f0201a1 entry index is larger than available symbols (index 417, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:433: error: Public symbol drawable/widget_right declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:147: error: Public entry identifier 0x7f0201a2 entry index is larger than available symbols (index 418, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:147: error: Public symbol drawable/wifi_signal declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:148: error: Public entry identifier 0x7f0201a3 entry index is larger than available symbols (index 419, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:148: error: Public symbol drawable/wifi_signal_lock declared here is not defined.
/home/icode/apktool/Settings/res/values/public.xml:149: error: Public entry identifier 0x7f0201a4 entry index is larger than available symbols (index 420, total symbols 365).
/home/icode/apktool/Settings/res/values/public.xml:149: error: Public symbol drawable/wifi_signal_open declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, /tmp/APKTOOL9013216784521938156.tmp, -I, /home/icode/apktool/framework/1.apk, -S, /home/icode/apktool/Settings/res, -M, /home/icode/apktool/Settings/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, /tmp/APKTOOL9013216784521938156.tmp, -I, /home/icode/apktool/framework/1.apk, -S, /home/icode/apktool/Settings/res, -M, /home/icode/apktool/Settings/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, /tmp/APKTOOL9013216784521938156.tmp, -I, /home/icode/apktool/framework/1.apk, -S, /home/icode/apktool/Settings/res, -M, /home/icode/apktool/Settings/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
 
Last edited:

brando56894

Senior Member
Dec 16, 2010
1,881
257
Jersey City
Awesome tutorial! I've always wondered how this was done but never really cared to research it that much. I usually just let the rom chefs do what they do best!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 206
    Welcome to this mini guide of how to add items and change the layout of the Settings.apk

    Each part of this guide will be rated on how hard it is for the general person. (Out of 5 stars, 5 being hardest)

    So, without further ado, here we go:

    Stuff You'll Need for the guide
    Apktool (And therefore Java too)
    A suitable Text Editor for your OS. For Windows, Notepad++ is best, for Linux I recommend Geany In this guide I will be using Geany on Ubuntu
    Zipsigner on your device (for ease of use)
    adb
    NOTE: If you are using Linux, run everything, including apktool and your text editor/file manager as ROOT/SUDO

    Do this first: Decompiling Settings.apk
    Difficulty: ★★☆☆☆
    1.) Open a command window in a suitable location, where apktool.jar is also located
    1.) Pull your apk from your device
    Code:
    adb pull /system/app/Settings.apk
    2.) Pull and install the framework from your device to apktool
    Code:
    adb pull /system/framework/framework-res.apk
    Code:
    java -jar apktool.jar if framework-res.apk
    3.) Decompile your Settings.apk
    Code:
    java -jar apktool.jar d -s Settings.apk
    (No source is needed)

    Editing the Strings of your Settings apk
    Difficulty: ★★☆☆☆

    1.) Open a file manager and go to where the Settings has decompiled to
    2.) Locate and open res/xml/settings_headers.xml in your text editor
    3.) Now you can find the header you wish to edit. In this one we will change "Developer settings" to "Noobs keep out"
    We need to change the string referenced in this code:
    Code:
    <header android:icon= [user=3944923]@drawab[/user]le/ic_settings_development" android:id="@id/development_settings" android:title="@string/development_settings_title" android:fragment="com.android.settings.DevelopmentSettings" />
    The android:title reference is what we need to change, so open your Strings.xml, for your language (if it's not in there, open the default one)
    Find (use Ctrl+F) the string that we earlier found, so I would search for "development_settings_title"
    Code:
    <string name="development_settings_title">Developer options</string>
    Change the bit between the > and the < to what you want:
    Code:
    <string name="development_settings_title">Noobs keep out</string>
    4.) Save and proceed to recompiling


    Editing the Settings option's icon
    Difficulty: ★★★☆☆

    1.) Open a file manager and go to where the Settings has decompiled to
    2.) Locate and open res/xml/settings_headers.xml in your text editor
    3.) Locate the header you wish to change. In this one we will edit the "Development Settings" to have the "ic_settings_advanced" icon (included in CM based ROMs only)
    4.) Find the header you want to edit, we want to edit this one:
    Code:
    <header android:icon= [user=3944923]@drawab[/user]le/ic_settings_development"  android:id="@id/development_settings"  android:title="@string/development_settings_title"  android:fragment="com.android.settings.DevelopmentSettings" />
    5.) Edit the android:icon location to the icon you wish to have. The icons are in res/drawable-hdpi, mdpi, ldpi and xhdpi (depending on ROM)
    We want to change it to ic_settings_advanced, so ours will look like:
    Code:
    <header android:icon= [user=3944923]@drawab[/user]le/ic_settings_advanced" android:id="@id/development_settings" android:title="@string/development_settings_title" android:fragment="com.android.settings.DevelopmentSettings" />
    6.) If you don't want to add icons, proceed to recompiling
    7.) Adding icons:
    To get icons that fit, see this zip from Google: Download
    i) Find the icon you wish to add, make sure it fits your screen's icon resolution (can be found with the dimension of current ic_settings icons in the apk)
    ii) Copy it to the correct folder (hdpi, mdpi, xhdpi, ldpi)
    iii) Name it something similar (ic_settings_<name>)
    iv) Refer to it in the xml, using @drawable/ic_settings_<name>
    8.) Proceed to recompiling


    Adding options to the settings headers
    Difficulty: ★★★★☆

    Note: In adding settings you can open things such as GooManager for updates quickly and easily from the menu with "About phone" and "Developer settings" in it
    1.) Open your decompiled settings_headers.xml
    2.) Locate where you want to add an option, and add a new line:
    Add this code:
    Code:
    <header android:icon= [user=3944923]@drawab[/user]le/ic_settings_name" android:id="@id/id" android:title="@string/title">
            <intent android:targetPackage="pkgName" android:action="android.intent.action.MAIN" android:targetClass="pkgName.Activity" />
        </header>
    3.) What to change:
    Change android:icon to the icon you want (for more info see "adding/changing icons")
    Add a title to values/strings.xml and reference it in android:title
    Change the android:targetPackage to the package name of the app you want to open. This can be found in the AndroidManifest of that particular app
    Change the android:targetClass to the package name, followed by the activity you want to open, again found in that particular app's AndroidManifest
    Change the android:id to an id that you can add in values/ids.xml (or delete it if you want)
    4.) Proceed to recompiling


    Adding dividers to settings
    Difficulty: ★★★☆☆

    Adding to the main settings screen:
    1.) Open your settings_headers.xml
    2.) Locate where you want to add a divider
    3.) Add the following code:
    Code:
    <header android:id="@id/id" android:title="@string/title" />
    Stuff to change:
    Change the android:id to one that you added in values/ids.xml (or delete it if you want)
    Change the android:title to your title in strings.xml
    4.) If that's all you want, proceed to recompiling
    Adding to the submenus:
    1.) Open the submenu that you want to edit's xml (they're quite obvious of which one is which)
    2.) Locate where you want to add a divider
    3.) Add the following code:
    At the start of where you want to have the divider
    Code:
    <PreferenceScreen android:title="@string/title" android:key="key">
    Just before the next divider:
    Code:
    </PreferenceScreen>
    Stuff to change:
    Change the android:title to your title in strings.xml
    Change the key to whatever you want
    4.) Proceed to recompiling

    Reordering Settings
    Difficulty: ★★☆☆☆

    1.) Open either the settings_headers.xml or a submenu, the process is the same
    2.) Cut and paste the different options to your desired order
    3.) That's all, proceed to recompiling


    Adding items to submenus
    Want to add a "Credits" option to your "About device" menu? This is what you need
    Difficulty: ★★★☆☆

    1.) Open your submenu xml you want (device_info_settings.xml is the about device submenu)
    2.) Find your desired location of your new option and make a new line
    3.) Paste the following code:
    Code:
    <Preference android:title="@string/title" android:key="key" android:summary="@string/summary" style="?android:preferenceInformationStyle" />
    Stuff to change:
    Change android:title to the title you added in values/strings.xml
    Change android:key to whatever you want
    Change android:summary to the longer text that you want that you added to values/strings.xml
    4.) Proceed to recompiling


    Bonus: Forcing "Developer settings" to be available by default on 4.2
    Difficulty: ★★☆☆☆

    1.) Open the settings_headers.xml
    2.) Locate the following code:
    Code:
    <header android:icon= [user=3944923]@drawab[/user]le/ic_settings_development" android:id="@id/development_settings" android:title="@string/development_settings_title" android:fragment="com.android.settings.DevelopmentSettings" />
    3.) Change the id from development_settings to development_settings_force
    Code:
    <header android:icon= [user=3944923]@drawab[/user]le/ic_settings_development"  android:id="@id/development_settings_force"  android:title="@string/development_settings_title"  android:fragment="com.android.settings.DevelopmentSettings" />
    4.) Open values/ids.xml
    5.) Add the following line:
    Code:
    <item type="id" name="development_settings_force">false</item>
    6.) Proceed to recompiling


    Do this last: Recompiling
    Difficulty: ★★☆☆☆
    1.) Re-open the command window that you used to decompile, in the same location
    2.) Run the following code:
    Code:
    java -jar apktool.jar b Settings
    3.) Push the new, unsigned apk to your device:
    Code:
    adb push Settings/dist/Settings.apk /sdcard/
    4.) On the device, open Zipsigner and select the Settings.apk using the in/out button
    5.) On the dropdown, select "platform"
    6.) Press sign
    7.) When it's done, run the following codes in the command window on the PC:
    (Note: Some people might need to run 'adb root' first)
    Code:
    adb remount
    Code:
    adb shell cp /system/app/Settings.apk /system/app/Settings.bak
    Code:
    adb shell cp /sdcard/Settings-signed.apk /system/app/Settings.apk
    8.) Reboot your device, you are done

    Troubleshooting:
    My apk doesn't recomplile!
    Look in the command window, it should tell you where the error is, and try to fix it. If you can't, post the error log here and I/someone else will try to help

    My new settings doesn't appear!
    Did you sign it properly? Try that again. Else, you're out of luck

    Something else is wrong!!!!1111
    Leave a reply and wait, don't spam, and someone (if not me) will try to help

    Screenshots for inspiration:

    attachment.php

    What I did:
    Added an option to update, opens GooManager, using ic_action_mark from the zip from Google
    Added an option that opens SuperSU, icon from the newer Settings.apk in ParanoidAndroid
    Changed the title and icon of Developer Settings, as well as forcing it to always be there
    Reordered the developer settings, and added different dividers
    4
    Re: [GUIDE][4.0+] Add items to Settings.apk / Change Layout

    Nice write up :)

    TEAM MiK
    MikROMs Since 3/13/11
    4
    @OP, here's what I've done

    Anyway big thanks to you, sometimes pressing Thanks button it not enough :)

    via XDA for Timescape™
    2
    Re: [GUIDE][4.0+] Add items to Settings.apk / Change Layout

    What the heck does this mean?


    Code:
    Plays2s-iMac:Folder Plays2$ java -jar apktool.jar b Settings
    Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: java.util.zip.ZipException: error in opening zip file
    at brut.androlib.Androlib.readMetaFile(Androlib.java:164)
    at brut.androlib.Androlib.build(Androlib.java:183)
    at brut.androlib.Androlib.build(Androlib.java:176)
    at brut.apktool.Main.cmdBuild(Main.java:228)
    at brut.apktool.Main.main(Main.java:79)
    Caused by: brut.directory.DirectoryException: java.util.zip.ZipException: error in opening zip file
    at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:55)
    at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:38)
    at brut.androlib.res.util.ExtFile.getDirectory(ExtFile.java:55)
    at brut.androlib.Androlib.readMetaFile(Androlib.java:160)
    ... 4 more
    Caused by: java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:127)
    at java.util.zip.ZipFile.<init>(ZipFile.java:143)
    at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:53)
    ... 7 more

    I'm on mac btw

    It can't open the apk for some reason, check it's there and not corrupted

    Sent from my ARCHOS 80G9 using Tapatalk HD
    2
    Either of works fine, I see a couple people prefer adb, I did it both ways and as you can see I'm trying to make it work. I'm sure the I'm missing something that's causing it rather than it being the different extraction methods

    ATTN.

    Alex A.
    Thanks for the reply. I asked because grabbing it straight from my rom's zip didn't seem to work for me. I hope pulling via adb produces a different result. I feel like I'm doing something wrong when decompiling and recompiling, but I don't think so since I don't get any errors.

    ---------- Post added at 11:29 PM ---------- Previous post was at 10:53 PM ----------

    Is this normal for recompiling an AOSP Settings.apk? I pulled directly from system/priv-app/ on my phone with adb.
    Code:
    c:\Windows>apktool b Settings
    I: Using Apktool 2.0.3
    I: Copying Settings classes.dex file...
    I: Checking whether resources has changed...
    I: Building resources...
    warning: string 'cell_broadcast_settings_summary' has no default translation.
    warning: string 'experimental_webview' has no default translation.
    warning: string 'experimental_webview_summary' has no default translation.
    warning: string 'nfc_payment_ask' has no default translation.
    warning: string 'print_services_title' has no default translation.
    warning: string 'wifi_display_available_devices' has no default translation.
    warning: string 'wifi_display_disconnect_text' has no default translation.
    warning: string 'wifi_display_disconnect_title' has no default translation.
    warning: string 'wifi_display_paired_devices' has no default translation.
    warning: string 'wifi_display_search_for_devices' has no default translation.
    warning: string 'wifi_display_searching_for_devices' has no default translation.
    warning: string 'wifi_display_settings_empty_list_wifi_display_disabled' has no default translation.
    warning: string 'wifi_display_settings_empty_list_wifi_display_off' has no default translation.
    warning: string 'wifi_display_status_available' has no default translation.
    warning: string 'wifi_display_summary_disabled' has no default translation.
    warning: string 'wifi_display_summary_off' has no default translation.
    warning: string 'wifi_display_summary_on' has no default translation.
    warning: string 'wimax_settings_summary' has no default translation.
    I: Building apk file...
    
    c:\Windows>


    ---------- Post added 9th March 2016 at 12:18 AM ---------- Previous post was 8th March 2016 at 11:29 PM ----------

    I found out what I've been doing wrong now. First off, for all of you reading this, don't sign the Settings.apk. What you need to do is when you recompile your Settings.apk open up the original apk and the modified one with 7-Zip and copy over the AndroidManifest.xml and META-INF folder from the original apk over to the modified one. After that, adb push over to your phone into /system/priv-app/, and make sure you set the permissions to -rw-r--r-- After that just reboot and you should be all set.