赞
踩
先转过来,慢慢看。。。
标题: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
------------------------
adb pull /system/app/Settings.apk
<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>
adb remount adb push Settings.apk /system/app/Settings.apk adb shell chmod 644 /system/app/Settings.apk adb reboot
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!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。