[Motorola Droid X2] Moon Shadow - NM:
Grumble, grumble, grumble...

ARGH! I have just spent the last 3 hours farting around with this and I am good and stuck... Here is what I have done so far using Apk_Manager_5.0.1:

1. Downloaded and unpacked both 2.3.4-X2_toggle_overload_part_2_of_2.zip and 2.3.4-DroidX2_pulldown-toggles_part_2_of_2.zip for the Stock ROM from Hedwig.

2. Using APKManager, decompiled SystemUI.apk from the pulldown toggles and renamed the folder to SystemUI_toggles.apk (since I need it for reference).

3. Decompiled SystemUI.apk from overload.

4. Compared both status_bar_expanded.xml files since I want to remove brightness and sound and add rotation.

5. Changed status_bar_expanded.xml in ../SystemUI.apk/res/layout/ folder to:

<com.android.systemui.statusbar.quickpanel.QuickSettingsView android:orientation="horizontal" android:id="@id/quickpanel_quick_settings" android:background="@drawable/quickpanel_quick_settings_background" android:layout_width="fill_parent" android:layout_height="wrap_content">
<FrameLayout android:layout_width="wrap_content" android:layout_height="65.32999dip" android:layout_weight="1.0">
<ImageView android:layout_gravity="center_horizontal" android:id="@id/quickpanel_wifi_btn_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="3.0dip" android:src="@drawable/quickpanel_icon_wifi_off" />
<com.android.systemui.statusbar.quickpanel.WifiSettingButton android:textSize="10.0dip" android:textStyle="bold" android:textColor="@android:color/white" android:gravity="center_horizontal" android:id="@id/quickpanel_wifi_btn_text" android:paddingTop="35.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_wifi_text" android:shadowDx="1.0" android:shadowDy="1.0" />
<ImageView android:layout_gravity="bottom|center" android:id="@id/quickpanel_wifi_btn_status_icon" android:paddingLeft="2.2999878dip" android:paddingRight="2.2999878dip" android:layout_width="fill_parent" android:layout_height="5.299988dip" android:layout_marginBottom="4.0dip" android:src="@drawable/quickpanel_icon_off" android:scaleType="fitXY" />
</FrameLayout>
<FrameLayout android:layout_width="wrap_content" android:layout_height="65.32999dip" android:layout_weight="1.0">
<ImageView android:layout_gravity="center_horizontal" android:id="@id/quickpanel_bt_btn_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="3.0dip" android:src="@drawable/quickpanel_icon_bluetooth_off" />
<com.android.systemui.statusbar.quickpanel.BluetoothSettingButton android:textSize="10.0dip" android:textStyle="bold" android:textColor="@android:color/white" android:gravity="center_horizontal" android:id="@id/quickpanel_bt_btn_text" android:paddingTop="35.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_bluetooth_text" android:shadowDx="1.0" android:shadowDy="1.0" />
<ImageView android:layout_gravity="bottom|center" android:id="@id/quickpanel_bt_btn_status_icon" android:paddingLeft="2.2999878dip" android:paddingRight="2.2999878dip" android:layout_width="fill_parent" android:layout_height="5.299988dip" android:layout_marginBottom="4.0dip" android:src="@drawable/quickpanel_icon_off" android:scaleType="fitXY" />
</FrameLayout>
<FrameLayout android:layout_width="wrap_content" android:layout_height="65.32999dip" android:layout_weight="1.0">
<ImageView android:layout_gravity="center_horizontal" android:id="@id/quickpanel_gps_btn_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="3.0dip" android:src="@drawable/quickpanel_icon_gps_off" />
<com.android.systemui.statusbar.quickpanel.GpsSettingButton android:textSize="10.0dip" android:textStyle="bold" android:textColor="@android:color/white" android:gravity="center_horizontal" android:id="@id/quickpanel_gps_btn_text" android:paddingTop="35.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_gps_text" android:shadowDx="1.0" android:shadowDy="1.0" />
<ImageView android:layout_gravity="bottom|center" android:id="@id/quickpanel_gps_btn_status_icon" android:paddingLeft="2.2999878dip" android:paddingRight="2.2999878dip" android:layout_width="fill_parent" android:layout_height="5.299988dip" android:layout_marginBottom="4.0dip" android:src="@drawable/quickpanel_icon_off" android:scaleType="fitXY" />
</FrameLayout>
<FrameLayout android:layout_width="wrap_content" android:layout_height="65.32999dip" android:layout_weight="1.0">
<ImageView android:layout_gravity="center_horizontal" android:id="@id/quickpanel_flashlight_btn_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="3.0dip" android:src="@drawable/quickpanel_icon_flashlight_off" />
<com.android.systemui.statusbar.quickpanel.FlashlightSettingButton android:textSize="10.0dip" android:textStyle="bold" android:textColor="@android:color/white" android:gravity="center_horizontal" android:id="@id/quickpanel_flashlight_btn_text" android:paddingTop="35.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_flashlight_text" android:shadowDx="1.0" android:shadowDy="1.0" />
<ImageView android:layout_gravity="bottom|center" android:id="@id/quickpanel_flashlight_btn_status_icon" android:paddingLeft="2.2999878dip" android:paddingRight="2.2999878dip" android:layout_width="fill_parent" android:layout_height="5.299988dip" android:layout_marginBottom="4.0dip" android:src="@drawable/quickpanel_icon_off" android:scaleType="fitXY" />
</FrameLayout>
<FrameLayout android:layout_width="wrap_content" android:layout_height="65.32999dip" android:layout_weight="1.0">
<ImageView android:layout_gravity="center_horizontal" android:id="@id/quickpanel_mobiledata_btn_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="3.0dip" android:src="@drawable/quickpanel_icon_mobile_data_off" />
<com.android.systemui.statusbar.quickpanel.MobileDataSettingButton android:textSize="10.0dip" android:textStyle="bold" android:textColor="@android:color/white" android:gravity="center_horizontal" android:id="@id/quickpanel_mobiledata_btn_text" android:paddingTop="35.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_mobiledata_text" android:shadowDx="1.0" android:shadowDy="1.0" />
<ImageView android:layout_gravity="bottom|center" android:id="@id/quickpanel_mobiledata_btn_status_icon" android:paddingLeft="2.2999878dip" android:paddingRight="2.2999878dip" android:layout_width="fill_parent" android:layout_height="5.299988dip" android:layout_marginBottom="4.0dip" android:src="@drawable/quickpanel_icon_off" android:scaleType="fitXY" />
</FrameLayout>
<FrameLayout android:layout_width="wrap_content" android:layout_height="65.32999dip" android:layout_weight="1.0">
<ImageView android:layout_gravity="center_horizontal" android:id="@id/quickpanel_flight_btn_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="3.0dip" android:src="@drawable/quickpanel_icon_flight_mode_off" />
<com.android.systemui.statusbar.quickpanel.FlightSettingButton android:textSize="10.0dip" android:textStyle="bold" android:textColor="@android:color/white" android:gravity="center_horizontal" android:id="@id/quickpanel_flight_btn_text" android:paddingTop="35.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_flight_text" android:shadowDx="1.0" android:shadowDy="1.0" />
<ImageView android:layout_gravity="bottom|center" android:id="@id/quickpanel_flight_btn_status_icon" android:paddingLeft="2.2999878dip" android:paddingRight="2.2999878dip" android:layout_width="fill_parent" android:layout_height="5.299988dip" android:layout_marginBottom="4.0dip" android:src="@drawable/quickpanel_icon_off" android:scaleType="fitXY" />
</FrameLayout>
<FrameLayout android:layout_width="wrap_content" android:layout_height="65.32999dip" android:layout_weight="1.0">
<ImageView android:layout_gravity="center_horizontal" android:id="@id/quickpanel_rotation_btn_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="3.0dip" android:src="@drawable/quickpanel_orientation_off" />
<com.android.systemui.statusbar.quickpanel.AutoRotationSettingButton android:textSize="10.0dip" android:textStyle="bold" android:textColor="@android:color/white" android:gravity="center_horizontal" android:id="@id/quickpanel_rotation_btn_text" android:paddingTop="35.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_rotation_text" android:shadowDx="1.0" android:shadowDy="1.0" />
<ImageView android:layout_gravity="bottom|center" android:id="@id/quickpanel_rotation_btn_status_icon" android:paddingLeft="2.2999878dip" android:paddingRight="2.2999878dip" android:layout_width="fill_parent" android:layout_height="5.299988dip" android:layout_marginBottom="4.0dip" android:src="@drawable/quickpanel_struct_off" android:scaleType="fitXY" />
</FrameLayout>
</com.android.systemui.statusbar.quickpanel.QuickSettingsView>

6. Checked both public.xml and ids.xml in ../SystemUI.apk/res/values/ to ensure they had the correct values for what I wanted and that there were no duplicate hex values in public.xml.

7. Attempted to compile (several times and after several rechecks and tweaks of the above files). Never completed compile. Always gave an error.

8. Went in and made sure there was a AutoRotationSettingButton.smali and AutoRotationSettingButton$AutoRotationObserver.smali files in the ../SystemUI.apk/smali/com/android/systemui/statusbar/quickpanel/ folder.

9. I also checked the smali file and made sure the hex codes in there mapped to the correct ones in my modified public.xml.

The error(s) I am receiving now are:

--------------------------------------------------------------------------
|Wed 11/09/2011 -- 21:17:31.20|
--------------------------------------------------------------------------
java version "1.7.0_01"
Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot(TM) Client VM (build 21.1-b02, mixed mode, sharing)
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\Documents and Settings\MaryLou\Desktop\Motorola\apkmanager\Apk_Manager_5.0.1\other\..\projects\SystemUI.apk\res\values\public.xml:243: error: Public resource drawable/quickpanel_orientation_on has conflicting type codes for its public identifiers (0x2 vs 0x7).
C:\Documents and Settings\MaryLou\Desktop\Motorola\apkmanager\Apk_Manager_5.0.1\other\..\projects\SystemUI.apk\res\values\public.xml:257: error: Public resource drawable/quickpanel_struct_off has conflicting type codes for its public identifiers (0x2 vs 0x9).
C:\Documents and Settings\MaryLou\Desktop\Motorola\apkmanager\Apk_Manager_5.0.1\other\..\projects\SystemUI.apk\res\values\public.xml:258: error: Public resource drawable/quickpanel_struct_on has conflicting type codes for its public identifiers (0x2 vs 0x9).
C:\Documents and Settings\MaryLou\Desktop\Motorola\apkmanager\Apk_Manager_5.0.1\other\..\projects\SystemUI.apk\res\values\public.xml:347: error: Public entry identifier 0x7f090037 entry index is larger than available symbols (index 55, total symbols 54).
C:\Documents and Settings\MaryLou\Desktop\Motorola\apkmanager\Apk_Manager_5.0.1\other\..\projects\SystemUI.apk\res\values\public.xml:347: error: Public symbol id/quickpanel_flashlight_btn_icon declared here is not defined.
C:\Documents and Settings\MaryLou\Desktop\Motorola\apkmanager\Apk_Manager_5.0.1\other\..\projects\SystemUI.apk\res\values\public.xml:349: error: Public entry identifier 0x7f090039 entry index is larger than available symbols (index 57, total symbols 54).
C:\Documents and Settings\MaryLou\Desktop\Motorola\apkmanager\Apk_Manager_5.0.1\other\..\projects\SystemUI.apk\res\values\public.xml:349: error: Public symbol id/quickpanel_flashlight_btn_status_icon declared here is not defined.
C:\Documents and Settings\MaryLou\Desktop\Motorola\apkmanager\Apk_Manager_5.0.1\other\..\projects\SystemUI.apk\res\values\public.xml:348: error: Public entry identifier 0x7f090038 entry index is larger than available symbols (index 56, total symbols 54).
C:\Documents and Settings\MaryLou\Desktop\Motorola\apkmanager\Apk_Manager_5.0.1\other\..\projects\SystemUI.apk\res\values\public.xml:348: error: Public symbol id/quickpanel_flashlight_btn_text declared here is not defined.
C:\Documents and Settings\MaryLou\Desktop\Motorola\apkmanager\Apk_Manager_5.0.1\other\..\projects\SystemUI.apk\res\values\public.xml:352: error: Public entry identifier 0x7f090036 entry index is larger than available symbols (index 54, total symbols 54).
C:\Documents and Settings\MaryLou\Desktop\Motorola\apkmanager\Apk_Manager_5.0.1\other\..\projects\SystemUI.apk\res\values\public.xml:352: error: Public symbol id/quickpanel_rotation_btn_status_icon declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\MaryLou\LOCALS~1\Temp\APKTOOL5975962859555341703.tmp, -I, C:\Documents and Settings\MaryLou\apktool\framework\1.apk, -S, C:\Documents and Settings\MaryLou\Desktop\Motorola\apkmanager\Apk_Manager_5.0.1\other\..\projects\SystemUI.apk\res, -M, C:\Documents and Settings\MaryLou\Desktop\Motorola\apkmanager\Apk_Manager_5.0.1\other\..\projects\SystemUI.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\MaryLou\LOCALS~1\Temp\APKTOOL5975962859555341703.tmp, -I, C:\Documents and Settings\MaryLou\apktool\framework\1.apk, -S, C:\Documents and Settings\MaryLou\Desktop\Motorola\apkmanager\Apk_Manager_5.0.1\other\..\projects\SystemUI.apk\res, -M, C:\Documents and Settings\MaryLou\Desktop\Motorola\apkmanager\Apk_Manager_5.0.1\other\..\projects\SystemUI.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more

Attached to this message is a zip of my decompiled SystemUI.apk... Either Matt or Hedwig, please help! ARGH! I'm frustrated... It pisses me off more that I don't know enough to figure this out. I'm tired and shouldn't really be coding at this hour...

Thank you from a frustrated Moon Shadow... Wait, it's a new moon, isn't it??? :p

Ciao!