diff --git a/ADB-Tricks,-DIY-Launcher-App.md b/ADB-Tricks,-DIY-Launcher-App.md new file mode 100644 index 0000000..27bf525 --- /dev/null +++ b/ADB-Tricks,-DIY-Launcher-App.md @@ -0,0 +1,79 @@ + + +### Open settings via commandline + +``` +adb shell am start -a android.settings.SETTINGS +``` + +### Switch language + +Only three are supported: Chinese, English, and Japanese + +``` +adb shell am start -a android.settings.LOCALE_SETTINGS +``` + +### Switch input method + +``` +adb shell am start -a android.settings.INPUT_METHOD_SETTINGS +``` + +If you saw error dialog `Unfortunately, the iWnn IME keyboard has stopped`, this is (potentially) due to the language switch that enables an extra input method. Just go in the `Keyboard & input methods` and only enable `iWnnkbd IME`. + +### Launcher app + +DPT Launcher is funny. It uses `ExtensionManagerService` that scans through `/etc/dp_extensions`. Ideally we shall have an automated tool to add/remove icons (not a plan), but for now, a commandline approach is the following: + +Re-mount your system to be writable (requiring sudo), and then use `NoteCreator` as a template: + +``` +> adb shell +$ su +# mount -o rw,remount /system +# cd /etc/dp_extensions +# cp -R NoteCreator MyTemplate +# cd MyTemplate +``` + +Then we need to change the filenames: +``` +mv NoteCreator_extension.xml MyTemplate_extension.xml +mv NoteCreator_strings-en.xml MyTemplate_strings-en.xml +mv NoteCreator_strings-ja.xml MyTemplate_strings-ja.xml +mv NoteCreator_strings-zh_CN.xml MyTemplate_strings-zh_CN.xml +mv ic_homemenu_createnote.png ic_homemenu_mytemplate.png +``` + +Finally, we need to edit each file (use `busybox vi file/path/filename`): +1. For MyTemplate_extension.xml (`****` is the Android app intent name, e.g., `com.android.browser/.BrowserActivity`): +``` + + + + + +``` +2. For each `****_strings-****.xml`: +``` + + + MyTemplate + +``` +3. You can upload a different png for icon `ic_homemenu_mytemplate.png` (must be 220x120 size) +4. Make sure the files under `MyTemplate` are all permission `0644` (`ls -la /etc/dp_extensions/MyTemplate/*` and `chmod 0644 /etc/dp_extensions/MyTemplate/*`). +5. Remove the database (cache) from the Extension Manager and allow it to rebuid the database: +``` +cd /data/system +mv ExtMgr.db ExtMgr.db_bak +mv ExtMgr.db-journal ExtMgr.db-journal_bak +``` +6. Reboot + +### Guide to use Taobao PKG + +(FYI, I personally prefer a clean system with changes I know, over using their PKGs with unknown changes.) + +People have shared their system.img with the extracted apps from taobao pkg. Check [#37](https://github.com/HappyZ/dpt-tools/issues/37) out. \ No newline at end of file