Welcome to the Android Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 25 of 25
  1. Thread Author  Thread Author    #1  

    Default Does anyone know how to edit Settings.apk? [Solved!]

    I've been trying to do this for some time, but I've hit a wall. I want to take the Settings.apk from my current rom (which ever one it happens to be). Decompile it. Edit some entries. Then recompile and sign it, so that I can use it with said rom.

    I've tried using apktool (and a few automated versions of it). It works great to decompile and recompile. I then use signapk.jar to sign the apk using a test key. But when I copy Settings.apk over to my /system/app folder, change the permissions, and reboot, the settings menu fails to load and my wallpaper disappears.

    I thought that it might be edits I am making. So I tried decompiling, recompiling, and signing with no edits and I still get the same problem where the settings menu fails to load.

    I even tried following this crazy guide: [HOW-TO] Modify the Keyboard and Screen Timeouts Settings
    But I had the same problem.

    I have successfully used apktool and my signing tool to edit and use other apk files. So I know that they work. Can anyone (probably a dev) explain what I'm doing wrong?

    Thanks!

    Update: Solution
    Last edited by mmarz; 06-05-2011 at 01:39 PM.
  2. #2  
    JerryScript's Avatar
    Daydream Believer

    Posts
    2,058 Posts
    ROM
    Victorious

    Default

    Have you tried apk_manager, which I believe uses akptool? It has an option to decompile with dependencies. Perhaps you can track down which other files you need with it?
  3. #3  

    Default

    Try resigning all the system apks. You'll probably also need to wipe dalvik-cache before rebooting.
  4. Thread Author  Thread Author    #4  

    Default

    I tried signing all the system apps and clearing the dalvik cache but the system refuses to boot. I'll give apk_manager a try thanks!
  5. Thread Author  Thread Author    #5  

    Default

    I figured out the problem! Oddly enough, it was the signing that broke it. When I didn't sign the Settings.apk it worked fine. I used apk manager 4.9. I then decompiled the apk. Did my edits. Compiled it and told the program it was a system apk. I deleted the files I changed from the keep folder along with resources.arsc. I then DIDN'T sign it, and pushed it to my /system/app folder. Rebooted and everything worked.

    If anyone is interested in it, here is my Settings.apk from the Nameless rom v1: Settings.apk

    It has the privacy menu removed and it has the tether settings added to the wireless menu. No need to have a tether app or launcher pro, and no chance of accidentally doing a factory reset.

    Thanks guys!
    Last edited by mmarz; 06-05-2011 at 01:40 PM.
    Thanked by:
  6. #6  
    rockneo's Avatar

    Posts
    183 Posts
    Global Posts
    184 Global Posts
    ROM
    Ath3nos CM7

    Default

    Make a cm7 one without privacy<3

    Sent from my Optimus V
  7. Thread Author  Thread Author    #7  

    Default

    Quote Originally Posted by rockneo View Post
    Make a cm7 one without privacy<3

    Sent from my Optimus V
    Here is how you can do it yourself:
    1. Download: Apk Manager 4.9 - Makes Modifying Ur Apk A Breeze (Windows/Linux) - xda-developers
    2. Get your Settings.apk off of your phone either with root explorer or adb:
      Code:
      adb pull /system/app/Settings.apk
    3. Keep a copy of Settings.apk somewhere safe.
    4. Place one copy into the "place-apk-here-for-modding" folder in apk manager.
    5. Run Script.bat.
    6. Enter option 22.
    7. Select the Settings.apk
    8. Enter option 9.
    9. Open folder projects\Settings.apk\res\xml\
    10. Open settings.xml in notepad or any other simple text editor.
    11. Remove these lines:
      Code:
         <com.android.settings.IconPreferenceScreen android:title="@string/privacy_settings" android:key="privacy_settings" settings:icon="@drawable/ic_settings_privacy">
              <intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.PrivacySettings" />
        </com.android.settings.IconPreferenceScreen>
    12. Save the file.
    13. Enter option 11 in app manager.
    14. Enter "y" (yes) for if this is a system apk.
    15. Enter "y" for the next option too.
    16. Open the newly created "keep" folder inside of your app manager folder.
    17. Delete resources.arsc
    18. Then delete keep\res\xml\settings.xml
    19. Go back to app manager and hit enter to continue.
    20. Look inside "place-apk-here-for-modding" and find your newly created "unsignedSettings.apk"
    21. I used this file and it worked great. Signing it broke it for some reason.
    22. Copy "unsignedSettings.apk" to the folder that contains adb.exe and rename it to "Settings.apk"
    23. Open command prompt and enter:
      Code:
      adb remount
      adb push Settings.apk /system/app/Settings.apk
      adb shell chmod 644 /system/app/Settings.apk
      adb reboot


    If everything went right, your settings should load like normal but privacy should be gone now. If something went wrong, your wallpaper will be gone and settings will not load. Retrace your steps in that event. Maybe try signing the apk. Who knows why only the unsigned version works for me?
    Last edited by mmarz; 06-17-2011 at 08:20 PM.
  8. #8  
    JerryScript's Avatar
    Daydream Believer

    Posts
    2,058 Posts
    ROM
    Victorious

    Default

    Hmmm, I've been trying to mod the Swype keyboard with no luck, and I always signed it too. Maybe leaving it unsigned will work for Swype as well. Thanks!
  9. #9  

    Default

    is there ANYWAY 2 port the lg Camera.apk? that is WAYYYYYYYYYYYYY better than the 1's that come in most roms



    EXCEPT CM7 lol
  10. Thread Author  Thread Author    #10  

    Default

    Quote Originally Posted by 00damedash View Post
    is there ANYWAY 2 port the lg Camera.apk? that is WAYYYYYYYYYYYYY better than the 1's that come in most roms



    EXCEPT CM7 lol
    Can you link me to it?
  11. #11  

    Default

    Quote Originally Posted by mmarz View Post
    Can you link me to it?
    im not sure where 2 point u to but im sure its in the stock optimus t roms
  12. Thread Author  Thread Author    #12  

    Default

    Quote Originally Posted by 00damedash View Post
    im not sure where 2 point u to but im sure its in the stock optimus t roms
    That camera app is actually not created by lge. It is a proprietary program made by Olaworks.

    I've gotten it to load and open on my phone, but it's not made to work with our camera drivers. I can't get any sort of image to load. It'll require the work of one of the devs to make it work. It is not a simple task.


    on a side note, their official camera looks interesting: https://market.android.com/details?i...=search_result
    Thanked by:
  13. #13  

    Exclamation

    Quote Originally Posted by mmarz View Post
    That camera app is actually not created by lge. It is a proprietary program made by Olaworks.

    I've gotten it to load and open on my phone, but it's not made to work with our camera drivers. I can't get any sort of image to load. It'll require the work of one of the devs to make it work. It is not a simple task.


    on a side note, their official camera looks interesting: https://market.android.com/details?i...=search_result
    PLEASE I HOPE HIS EFFORT ENCOURAGES A DEV 2 PORT THIS .APK


    p.s thanks 4 trying
  14. Thread Author  Thread Author    #14  

    Default

    Here is an Engrish translation of that Olaworks app I found: com.olaworks.scansearcheng.apk

    It's kind of interesting. It is a location based camera app. You can take pictures of books, buildings, people..etc. and then search through your pictures using names. It'll also scan barcodes, locate businesses around you, and show you online prices for items you are looking at.
  15. #15  

    Default

    Quote Originally Posted by 00damedash View Post
    is there ANYWAY 2 port the lg Camera.apk? that is WAYYYYYYYYYYYYY better than the 1's that come in most roms



    EXCEPT CM7 lol
    You can try the MIUI camera. This apk installs fine along side the other camera.
    Here: MIUI Camera

    Also Camera 360 has a few cool options.

    There is a way to mod the camera to use a higher resolution i.e. 480x320. You'd have to mess with the internals but it should be able to be done. As it was done on the HTC Hero CDMA.

    If VM/LG drops GB source updated libs should help.
    Thanked by:
    mmarz 
  16. Thread Author  Thread Author    #16  

    Default

    Quote Originally Posted by dburg View Post
    You can try the MIUI camera. This apk installs fine along side the other camera.
    Here: MIUI Camera

    Also Camera 360 has a few cool options.

    There is a way to mod the camera to use a higher resolution i.e. 480x320. You'd have to mess with the internals but it should be able to be done. As it was done on the HTC Hero CDMA.

    If VM/LG drops GB source updated libs should help.
    Thanks! That is a nice camera app, and it does video too. Is there any native way to make the camera button launch it?

    I figured out a work around by using Tasker, but this is not ideal.
  17. #17  

    Default

    Quote Originally Posted by dburg View Post
    You can try the MIUI camera. This apk installs fine along side the other camera.
    Here: MIUI Camera

    Also Camera 360 has a few cool options.

    There is a way to mod the camera to use a higher resolution i.e. 480x320. You'd have to mess with the internals but it should be able to be done. As it was done on the HTC Hero CDMA.

    If VM/LG drops GB source updated libs should help.
    THANKS!!!! its fire
    Last edited by 00damedash; 05-17-2011 at 02:59 AM.
  18. #18  

    Default Re: Does anyone know how to edit Settings.apk? [Solved!]

    Quote Originally Posted by mmarz View Post
    Here is how you can do it yourself:
    1. Download: Apk Manager 4.9 - Makes Modifying Ur Apk A Breeze (Windows/Linux) - xda-developers
    2. Get your Settings.apk off of your phone either with root explorer or adb:
      Code:
      adb pull /system/app/Settings.apk
    3. Keep a copy of Settings.apk somewhere safe.
    4. Place one copy into the "place-apk-here-for-modding" folder in apk manager.
    5. Run Script.bat.
    6. Enter option 22.
    7. Select the Settings.apk
    8. Enter option 9.
    9. Open folder projects\Settings.apk\res\xml\
    10. Open settings.xml in notepad or any other simple text editor.
    11. Remove these lines:
      Code:
         <com.android.settings.IconPreferenceScreen android:title="@string/privacy_settings" android:key="privacy_settings" settings:icon="@drawable/ic_settings_privacy">
              <intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.PrivacySettings" />
        </com.android.settings.IconPreferenceScreen>
    12. Save the file.
    13. Enter option 11 in app manager.
    14. Enter "y" (yes) for if this is a system apk.
    15. Enter "y" for the next option too.
    16. Open the newly created "keep" folder inside of your app manager folder.
    17. Delete resources.arsc
    18. Then delete keep\res\xml\settings.xml
    19. Go back to app manager and hit enter to continue.
    20. Look inside "place-apk-here-for-modding" and find your newly created "unsignedSettings.apk"
    21. I used this file and it worked great. Signing it broke it for some reason.
    22. Copy "unsignedSettings.apk" to the folder that contains adb.exe and rename it to "Settings.apk"
    23. Open command prompt and enter:
      Code:
      adb remount
      adb push Settings.apk /system/app/Settings.apk
      adb shell chmod 644 /system/app/Settings.apk
      adb reboot


    If everything went right, your settings should load like normal but privacy should be gone now. If something went wrong, your wallpaper will be gone and settings will not load. Retrace your steps in that event. Maybe try signing the apk. Who knows why only the unsigned version works for me?
    Thank you so much for posting this walk-through. I was trying to change the icons in the settings menu to the ICS icons and for some reason it wasn't working. After reading the walk-through (and testing) I realized it was because I was entering "n" on the second question after compiling. Now my settings menu looks awesome!
  19. #19  

    Default Re: Does anyone know how to edit Settings.apk? [Solved!]

    Hello.

    Thanks you for this walk-through but the procedure seems to be different on linux, with apk manager 5.0

    The Apk Mananger menu look like this:
    Code:
    ****************************** Apk Manager *******************************
    ------------------Simple Tasks Such As Image Editing----------------------
      0    Adb pull
      1    Extract apk
      2    Optimize images inside (Only if "Extract Apk" was selected)
      3    Zip apk
      4    Sign apk (Dont do this if its a system apk)
      5    Zipalign apk (Do once apk is created/signed)
      6    Install apk (Dont do this if system apk, do adb push)
      7    Zip / Sign / Install apk (All in one step)
      8    Adb push (Only for system apk)
    -----------------Advanced Tasks Such As Code Editing-----------------------
      9    Decompile apk
      10   Compile apk
      11   Sign apk
      12   Install apk
      13   Compile apk / Sign apk / Install apk (All in one step)
    ---------------------------------------------------------------------------
      14   Batch Optimize Apk (inside place-apk-here-to-batch-optimize only)
      15   Sign an apk        (inside place-apk-here-for-signing folder only)
      16   Batch optimize ogg files (inside place-ogg-here only)
      17   Quit
    ****************************************************************************
    So, I've tried to modify my Settings.apk (to include french translations removed in my chinese roms ...), simply with options 9 and 10 but it doesn't work.

    In my android log I've this:
    Code:
    06-06 11:36:44.083: W/PackageManager(1249): Failed verifying certificates for package:com.android.settings
    06-06 11:36:46.504: E/PackageManager(1249): Package com.google.android.backup has no signatures that match those in shared user android.uid.system; ignoring!
    06-06 11:36:48.590: E/PackageManager(1249): Package com.google.android.location has no signatures that match those in shared user android.uid.system; ignoring!
    06-06 11:36:50.700: W/PackageManager(1249): System package com.android.settings no longer exists; wiping its data
    If you've any idea of what I can do, I take
    Thanks.

    EDIT: Got it working with apktool and 7z
    I've followed (a good part of) this tuto:
    http://forum.xda-developers.com/show....php?t=1576565
    Now my settings are in french ... awesome
    Last edited by tuxfamily; 06-06-2012 at 05:46 AM.
  20. #20  

    Default Re: Does anyone know how to edit Settings.apk? [Solved!]

    Please i need to remove the Item " Bluetooth " from settings => wireless & networks . please can someone help me . i edit wirelesssettings.xml and wirelesssettings.smali but when i install the application i found an error " application not installed " .i try to sign my application but also the same error . Thanks
  21. #21  

    Default Re: Does anyone know how to edit Settings.apk? [Solved!]

    Quote Originally Posted by nouhaghribi View Post
    Please i need to remove the Item " Bluetooth " from settings => wireless & networks . please can someone help me . i edit wirelesssettings.xml and wirelesssettings.smali but when i install the application i found an error " application not installed " .i try to sign my application but also the same error . Thanks
    i solved it now if you change .smali you must also delete classes.dex from file "keep" .
  22. #22  

    Default Re: Does anyone know how to edit Settings.apk? [Solved!]

    Laslie Roms Samsung galaxy MoD
  23. #23  

    Default Re: Does anyone know how to edit Settings.apk? [Solved!]

    there is no 22 option in apk_manager_linux_5.0 version, help please
  24. #24  
    flapjack.fiasco's Avatar

    Posts
    776 Posts
    ROM
    JBC/Squid's Kernel

    Default Re: Does anyone know how to edit Settings.apk? [Solved!]

    Quote Originally Posted by vamsikracha View Post
    there is no 22 option in apk_manager_linux_5.0 version, help please
    Post #19 in this very thread addresses that issue. There's a link to this here thread: [GUIDE] ICS Style 'Settings.apk' - Make it Yourself

    According to post #19, the linked to thread lead to a solution.
    This space intentionally left blank.
  25. #25  

    Default Re: Does anyone know how to edit talking tom pic at resource or other app pic

    please help me i tried but i am failed i edited android app resource on adobe photo shop i packed the android file on apk manager but failed to install if i edit background pic to tom

Posting Permissions