[EVO 4G Android Development] vboyz103:
Sup everyone -

So I was looking into how to decompile an APK and got it the info. Basically, it is just a zip archive in a sense. Now, within the APK, there are resources in binary XML. A little digging, I found that you can get tools to basically reverse-engineer those XML files almost to the original form. That tools is called "android-apktool" (link: https://code.google.com/p/android-apktool/downloads/list).

So fast forward to MIUI. I wanted to create a few more folders beside the System Tools folder upon the initial flash/boot up. Using the tool above, I was able to find where it does that in the res/xml/default_workspace.xml file in Launcher2.apk. This is the file to tell Launcher2 to create what on each screen initially.

It's all and good but now how do I package the modified XML back to binary format? Any ideas?

TIA.

EDIT: Got it did some research and apparently apktool can also build, but now I need to sign the APK which is easy to do. (link: http://www.youtube.com/watch?v=1Aa9zsh6F7A)

Here's the content of 11.5 default_workspace.xml:

<?xml version="1.0" encoding="UTF-8"?>
<favorites
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher">
<folder launcher:screen="2" launcher:x="2" launcher:y="2" launcher:title="System Tools" />
<favorite launcher:className="com.android.voicedialer.VoiceDialerActivity" launcher:packageName="com.android.voicedialer" launcher:container="1" launcher:x="0" launcher:y="0" />
<favorite launcher:className="com.android.quicksearchbox.SearchActivity" launcher:packageName="com.android.quicksearchbox" launcher:container="1" launcher:x="0" launcher:y="0" />
<favorite launcher:className="com.android.contacts.TwelveKeyDialer" launcher:packageName="com.android.contacts" launcher:container="-101" launcher:x="0" launcher:y="0" />
<favorite launcher:className="com.android.contacts.DialtactsContactsEntryActivity" launcher:packageName="com.android.contacts" launcher:container="-101" launcher:x="0" launcher:y="0" />
<favorite launcher:className="com.android.calculator2.Calculator" launcher:packageName="com.android.calculator2" launcher:container="1" launcher:x="0" launcher:y="0" />
<favorite launcher:className="com.android.updater.MainActivity" launcher:packageName="com.android.updater" launcher:screen="2" launcher:x="3" launcher:y="2" />
<appwidget launcher:className="com.android.updater.Widget" launcher:packageName="com.android.updater" launcher:screen="1" launcher:x="0" launcher:y="1" launcher:spanX="4" launcher:spanY="1" />
<favorite launcher:className="com.sohu.inputmethod.sogou.SogouIMESettings" launcher:packageName="com.sohu.inputmethod.sogou" launcher:screen="3" launcher:x="1" launcher:y="0" />
<favorite launcher:className="com.android.calendar.LaunchActivity" launcher:packageName="com.android.calendar" launcher:screen="2" launcher:x="2" launcher:y="3" />
<favorite launcher:className="com.android.browser.BrowserActivity" launcher:packageName="com.android.browser" launcher:container="-101" launcher:x="0" launcher:y="0" />
<favorite launcher:className="com.android.music.MusicBrowserActivity" launcher:packageName="com.android.music" launcher:screen="2" launcher:x="0" launcher:y="3" />
<favorite launcher:className="com.google.android.talk.SigningInActivity" launcher:packageName="com.google.android.talk" launcher:screen="3" launcher:x="2" launcher:y="0" />
<favorite launcher:className="com.cooliris.media.Gallery" launcher:packageName="com.cooliris.media" launcher:screen="2" launcher:x="0" launcher:y="2" />
<favorite launcher:className="com.android.mms.ui.MmsTabActivity" launcher:packageName="com.android.mms" launcher:container="-101" launcher:x="0" launcher:y="0" />
<favorite launcher:className="com.android.settings.Settings" launcher:packageName="com.android.settings" launcher:screen="2" launcher:x="3" launcher:y="3" />
<favorite launcher:className="com.android.vending.AssetBrowserActivity" launcher:packageName="com.android.vending" launcher:screen="3" launcher:x="3" launcher:y="0" />
<favorite launcher:className="com.android.speechrecorder.SpeechRecorderActivity" launcher:packageName="com.android.speechrecorder" launcher:container="1" launcher:x="0" launcher:y="0" />
<favorite launcher:className="com.google.android.gm.ConversationListActivityGmail" launcher:packageName="com.google.android.gm" launcher:screen="2" launcher:x="1" launcher:y="3" />
<favorite launcher:className="com.android.development.Development" launcher:packageName="com.android.development" launcher:container="1" launcher:x="0" launcher:y="0" />
<favorite launcher:className="com.android.camera.Camera" launcher:packageName="com.android.camera" launcher:screen="2" launcher:x="1" launcher:y="2" />
<favorite launcher:className="com.android.email.activity.Welcome" launcher:packageName="com.android.email" launcher:screen="3" launcher:x="0" launcher:y="0" />
<favorite launcher:className="com.android.deskclock.DeskClock" launcher:packageName="com.android.deskclock" launcher:container="1" launcher:x="0" launcher:y="0" />
<search launcher:screen="1" launcher:x="0" launcher:y="0" launcher:spanX="4" launcher:spanY="1" />
<clock launcher:screen="2" launcher:x="1" launcher:y="0" launcher:spanX="2" launcher:spanY="2" />
</favorites>