[Android Themes] nd0ut:
Trying to port MIUI-style settings to cyanogenmod.

I'm decompile the framework-res.apk from both roms using apk-manager 4.9.

Then I copied these files from miui to cyanogen:

[color]
preference_category_text.xml
preference_primary_text.xml
preference_secondary_text.xml

[drawable]
arrow_right.xml

[drawable-hdpi]
ic_arrow_right.png
ic_arrow_right_disable.png
ic_preference_first_normal.9.png
ic_preference_first_pressed.9.png
ic_preference_last_normal.9.png
ic_preference_last_pressed.9.png
ic_preference_normal.9.png
ic_preference_one_normal.9.png
ic_preference_one_pressed.9.png
ic_preference_pressed.9.png
ic_preference_single_normal.9.png
ic_preference_single_pressed.9.png
ic_preference_title.9.png
ic_preference_top_normal.9.png
ic_preference_top_pressed.9.png

[layout]
preference.xml
preference_category.xml
preference_child.xml
preference_dialog.xml
preference_dialog_edittext.xml
preference_information.xml
preference_list_content.xml
preference_widget_checkbox.xml
preference_widget_next.xml
preference_widget_radiobutton.xml
preferences.xml

Then I added to values\attrs.xml

<attr name="drawSelectorOnNothing" format="boolean" />

And to values\public.xml next lines:

<public type="color" name="preference_primary_text" id="0x01060039" />
<public type="color" name="preference_secondary_text" id="0x0106003a" />
<public type="color" name="preference_category_text" id="0x0106003b" />
<public type="drawable" name="arrow_right" id="0x010803be" />
<public type="drawable" name="ic_preference_title" id="0x010803bf" />
<public type="drawable" name="ic_arrow_right" id="0x010803c0" />
<public type="drawable" name="ic_arrow_right_disable" id="0x010803c1" />
<public type="attr" name="drawSelectorOnNothing" id="0x010102d0" />

Then I compile apk, check "for system apk", then enter "y" and deleted keep\resources.arsc

After that I pushed apk to phone. But it's FC when I open settings.

LogCat log:

01-16 18:57:23.085: WARN/WindowManager(1670): HistoryRecord{464ca5a8 com.android.settings/.Settings} failed creating starting window
01-16 18:57:23.085: WARN/WindowManager(1670): android.content.res.Resources$NotFoundException: File %2$s %3$s ?????? %8$s ??? from xml type layout resource ID #0x109005c
01-16 18:57:23.085: WARN/WindowManager(1670): at android.content.res.Resources.loadXmlResourceParser(Resources.java:1984)
01-16 18:57:23.085: WARN/WindowManager(1670): at android.content.res.Resources.loadXmlResourceParser(Resources.java:1939)
01-16 18:57:23.085: WARN/WindowManager(1670): at android.content.res.Resources.getLayout(Resources.java:773)
01-16 18:57:23.085: WARN/WindowManager(1670): at android.view.LayoutInflater.inflate(LayoutInflater.java:318)
01-16 18:57:23.085: WARN/WindowManager(1670): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
01-16 18:57:23.085: WARN/WindowManager(1670): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2165)
01-16 18:57:23.085: WARN/WindowManager(1670): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2220)
01-16 18:57:23.085: WARN/WindowManager(1670): at com.android.internal.policy.impl.PhoneWindow.getDecorView(PhoneWindow.java:1407)
01-16 18:57:23.085: WARN/WindowManager(1670): at com.android.internal.policy.impl.PhoneWindowManager.addStartingWindow(PhoneWindowManager.java:1014)
01-16 18:57:23.085: WARN/WindowManager(1670): at com.android.server.WindowManagerService$H.handleMessage(WindowManagerService.java:9051)
01-16 18:57:23.085: WARN/WindowManager(1670): at android.os.Handler.dispatchMessage(Handler.java:99)
01-16 18:57:23.085: WARN/WindowManager(1670): at android.os.Looper.loop(Looper.java:123)
01-16 18:57:23.085: WARN/WindowManager(1670): at com.android.server.WindowManagerService$WMThread.run(WindowManagerService.java:581)
01-16 18:57:23.085: WARN/WindowManager(1670): Caused by: java.io.FileNotFoundException: %2$s %3$s ?????? %8$s ???
01-16 18:57:23.085: WARN/WindowManager(1670): at android.content.res.AssetManager.openXmlAssetNative(Native Method)
01-16 18:57:23.085: WARN/WindowManager(1670): at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:485)
01-16 18:57:23.085: WARN/WindowManager(1670): at android.content.res.Resources.loadXmlResourceParser(Resources.java:1966)
01-16 18:57:23.085: WARN/WindowManager(1670): ... 12 more
01-16 18:57:23.132: DEBUG/AndroidRuntime(1932): Shutting down VM
01-16 18:57:23.132: WARN/dalvikvm(1932): threadid=1: thread exiting with uncaught exception (group=0x400207d0)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): FATAL EXCEPTION: main
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.Settings}: android.content.res.Resources$NotFoundException: File %2$s %3$s ?????? %8$s ??? from xml type layout resource ID #0x109005c
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.os.Handler.dispatchMessage(Handler.java:99)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.os.Looper.loop(Looper.java:123)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.app.ActivityThread.main(ActivityThread.java:4627)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at java.lang.reflect.Method.invokeNative(Native Method)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at java.lang.reflect.Method.invoke(Method.java:521)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at dalvik.system.NativeStart.main(Native Method)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): Caused by: android.content.res.Resources$NotFoundException: File %2$s %3$s ?????? %8$s ??? from xml type layout resource ID #0x109005c
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.content.res.Resources.loadXmlResourceParser(Resources.java:1984)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.content.res.Resources.loadXmlResourceParser(Resources.java:1939)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.content.res.Resources.getLayout(Resources.java:773)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.view.LayoutInflater.inflate(LayoutInflater.java:318)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2165)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2220)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:194)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.app.Activity.setContentView(Activity.java:1647)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.preference.PreferenceActivity.onCreate(PreferenceActivity.java:107)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at com.android.settings.Settings.onCreate(Settings.java:43)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): ... 11 more
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): Caused by: java.io.FileNotFoundException: %2$s %3$s ?????? %8$s ???
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.content.res.AssetManager.openXmlAssetNative(Native Method)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:485)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): at android.content.res.Resources.loadXmlResourceParser(Resources.java:1966)
01-16 18:57:23.155: ERROR/AndroidRuntime(1932): ... 23 more
01-16 18:57:23.202: DEBUG/dalvikvm(1932): GC_FOR_MALLOC freed 3297 objects / 248920 bytes in 42ms
01-16 18:57:23.312: DEBUG/dalvikvm(1670): GC_FOR_MALLOC freed 13489 objects / 994304 bytes in 93ms
01-16 18:57:23.312: WARN/ActivityManager(1670): Force finishing activity com.android.settings/.Settings
01-16 18:57:23.820: WARN/ActivityManager(1670): Activity pause timeout for HistoryRecord{464ca5a8 com.android.settings/.Settings}
01-16 18:57:33.893: WARN/ActivityManager(1670): Activity destroy timeout for HistoryRecord{464ca5a8 com.android.settings/.Settings}

The keyline is

01-16 18:57:23.085: WARN/WindowManager(1670): android.content.res.Resources$NotFoundException: File %2$s %3$s ?????? %8$s ??? from xml type layout resource ID #0x109005c

I had only next in public.xml

<public type="layout" name="screen_progress" id="0x0109005c" />

But I didn't touched it and anything else. I'm only added a few lines.

I think that it's something wrong while apk compiling, but what?

//sorry for my eng :)