[Android Software Development] lukakas:
Step 4 - Decompile SystemUI.apk

1 - Open AndroidManifest.xml

Add these lines:

<uses-permission android:name="com.sonymobile.permission.XSSM_PROVIDER" />
<uses-permission android:name="com.sonymobile.permission.XSSM" />
<uses-permission android:name="android.permission.BIND_APPWIDGET" />
<uses-permission android:name="com.sony.smallapp.app.widget.permission.BIND_SMALLAPP_WIDGET_MANAGER" />
<uses-permission android:name="com.sony.smallapp.permission.SMALLAPPMANAGER_CONTROL" />
<uses-permission android:name="com.sony.smallapp.launcher.permission.ACCESS_DATABASE" />
<uses-permission android:name="android.permission.DELETE_PACKAGES" />
<permission android:name="com.sonymobile.permission.TASK_SWITCHER_PLUGIN_VIEW" android:protectionLevel="signatureOrSystem" />

Like this marked in blue:

<uses-permission android:name="android.permission.SET_ORIENTATION" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.READ_DREAM_STATE" />
<uses-permission android:name="android.permission.WRITE_DREAM_STATE" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
[COLOR="blue"]<uses-permission android:name="com.sonymobile.permission.XSSM_PROVIDER" />
<uses-permission android:name="com.sonymobile.permission.XSSM" />
<uses-permission android:name="android.permission.BIND_APPWIDGET" />
<uses-permission android:name="com.sony.smallapp.app.widget.permission.BIND_SMALLAPP_WIDGET_MANAGER" />
<uses-permission android:name="com.sony.smallapp.permission.SMALLAPPMANAGER_CONTROL" />
<uses-permission android:name="com.sony.smallapp.launcher.permission.ACCESS_DATABASE" />
<uses-permission android:name="android.permission.DELETE_PACKAGES" />
<permission android:name="com.sonymobile.permission.TASK_SWITCHER_PLUGIN_VIEW" android:protectionLevel="signatureOrSystem" />[/COLOR]
<application android:label="@string/app_label" android:icon="@*android:drawable/platlogo" android:allowClearUserData="false" android:persistent="true" android:allowBackup="false" android:hardwareAccelerated="true">
<service android:name="SystemUIService" android:exported="true" />
<service android:name=".screenshot.TakeScreenshotService" android:exported="false" android:process=":screenshot" />
<service android:name=".LoadAverageService" android:exported="true" />
<service android:name=".ImageWallpaper" android:permission="android.permission.BIND_WALLPAPER" android:exported="true" />
<receiver android:name=".BootReceiver" androidprv:primaryUserOnly="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>

Add this line in 'RecentsActivity' activity:

<action android:name="com.android.systemui.recent.action.OPEN_RECENTS_INTENT_FROM_SMALL_APP_LAUNCHER" />

Like this below of "<action android:name="com.android.systemui.TOGGLE_RECENTS" />" marked in red:

<activity android:theme="@style/RecentsStyle" android:label="@string/accessibility_desc_recent_apps" android:name=".recent.RecentsActivity" android:exported="true" android:excludeFromRecents="true" android:launchMode="singleInstance">
<intent-filter>
<action android:name="com.android.systemui.TOGGLE_RECENTS" />
[COLOR="Red"]<action android:name="com.android.systemui.recent.action.OPEN_RECENTS_INTENT_FROM_SMALL_APP_LAUNCHER" />[/COLOR]
</intent-filter>
</activity>

2 - Go to res/values/attrs.xml

Add this line:

<attr name="lookupKey" format="string" />

Like this marked in blue:

<resources>
<attr name="keyCode" format="integer" />
<attr name="keyRepeat" format="boolean" />
<attr name="glowBackground" format="reference" />
<attr name="text" format="string" />
<attr name="insetLeft" format="dimension" />
<attr name="rowHeight" format="dimension" />
<attr name="recentItemLayout" format="reference" />
<attr name="minSize" format="dimension" />
<attr name="maxSize" format="dimension" />
<attr name="holdTime" format="integer" />
<attr name="decayTime" format="integer" />
<attr name="orientation">
<enum name="horizontal" value="0" />
<enum name="vertical" value="1" />
</attr>
[COLOR="Blue"]<attr name="lookupKey" format="string" />[/COLOR]
</resources>

3 - Go to res/values/ids.xml

Add these lines at the end:

<item type="id" name="recents_inject_custom_view">false</item>
<item type="id" name="recents_layout">false</item>
<item type="id" name="recents_pluginview_container">false</item>

Like this marked in red:

<resources>
...
<item type="id" name="notification_inspect_item">false</item>
<item type="id" name="recent_remove_item">false</item>
<item type="id" name="recent_inspect_item">false</item>
[COLOR="red"]<item type="id" name="recents_inject_custom_view">false</item>
<item type="id" name="recents_layout">false</item>
<item type="id" name="recents_pluginview_container">false</item>
[/COLOR]
</resources>

4 - Open res/values/public.xml

ATTENTION: Don't duplicate "hex id", create always next "hex id" from the last type of the name, it's for previne duplicate.

Where's hex id?

For example:

<public type="attr" name="lookupKey" id="[COLOR="Blue"]0x7f01000c[/COLOR]" />

"Hex id" is: 0x7f01000c marked in blue

Save all hex id yours created because we need it later:

For example, where's the last type of 'attr'? See in public.xml, the last type of 'attr' marked in green and name is"orientation" like this marked in red:

<resources>
<public type="attr" name="keyCode" id="0x7f010000" />
<public type="attr" name="keyRepeat" id="0x7f010001" />
<public type="attr" name="glowBackground" id="0x7f010002" />
<public type="attr" name="text" id="0x7f010003" />
<public type="attr" name="insetLeft" id="0x7f010004" />
<public type="attr" name="rowHeight" id="0x7f010005" />
<public type="attr" name="recentItemLayout" id="0x7f010006" />
<public type="attr" name="minSize" id="0x7f010007" />
<public type="attr" name="maxSize" id="0x7f010008" />
<public type="attr" name="holdTime" id="0x7f010009" />
<public type="attr" name="decayTime" id="0x7f01000a" />
[COLOR="Red"]<public type="[COLOR="SeaGreen"]attr[/COLOR]" name="orientation" id="[COLOR="blue"]0x7f01000b[/COLOR]" />[/COLOR]
<public type="drawable" name="bugdroid" id="0x7f02000e" />
<public type="drawable" name="cid_angry" id="0x7f02000f" />
<public type="drawable" name="cid_confused" id="0x7f020010" />
<public type="drawable" name="cid_normal" id="0x7f020011" />
<public type="drawable" name="cidlogo" id="0x7f020012" />

It comes with an id=0x7f01000b marked in blue, it's like hex numeral. Then, the next id should be 0x7f01000c like this marked in blue:

<resources>
<public type="attr" name="keyCode" id="0x7f010000" />
<public type="attr" name="keyRepeat" id="0x7f010001" />
<public type="attr" name="glowBackground" id="0x7f010002" />
<public type="attr" name="text" id="0x7f010003" />
<public type="attr" name="insetLeft" id="0x7f010004" />
<public type="attr" name="rowHeight" id="0x7f010005" />
<public type="attr" name="recentItemLayout" id="0x7f010006" />
<public type="attr" name="minSize" id="0x7f010007" />
<public type="attr" name="maxSize" id="0x7f010008" />
<public type="attr" name="holdTime" id="0x7f010009" />
<public type="attr" name="decayTime" id="0x7f01000a" />
<public type="attr" name="orientation" id="0x7f01000b" />
[COLOR="Red"]<public type="attr" name="lookupKey" id="[COLOR="Blue"]0x7f01000c[/COLOR]" /> [/COLOR]
<public type="drawable" name="bugdroid" id="0x7f02000e" />
<public type="drawable" name="cid_angry" id="0x7f02000f" />
<public type="drawable" name="cid_confused" id="0x7f020010" />
<public type="drawable" name="cid_normal" id="0x7f020011" />
<public type="drawable" name="cidlogo" id="0x7f020012" />

Easy way for everybody to get next HEX ID by [MENTION=5153662]Android-Andi[/MENTION] can be found here: http://xdaforums.com/showpost.php?p=46131055&postcount=103

You'll add this line with next id marked in blue that you find the last attr type in your public.xml (Don't duplicate "hex ids"):

<public type="attr" name="lookupKey" id="[COLOR="Blue"]NEXT HEX ID PUT HERE[/COLOR]" />

You will do the same with others types, add these lines as instructed below marked in red and put your next id marked in blue:

...lines to skip until last layout type... (Don't copy this line)
[COLOR="Red"]<public type="layout" name="plugin_view" id="[COLOR="Blue"]NEXT HEX ID PUT HERE[/COLOR]" />[/COLOR]
...much lines to skip until last id type...(Don't copy this line)
[COLOR="red"]<public type="id" name="recents_inject_custom_view" id="[COLOR="Blue"]NEXT HEX ID PUT HERE[/COLOR]" />[/COLOR]
[COLOR="red"]<public type="id" name="recents_layout" id="[COLOR="Blue"]NEXT HEX ID PUT HERE[/COLOR]" />[/COLOR]
[COLOR="red"]<public type="id" name="recents_pluginview_container" id="[COLOR="Blue"]NEXT HEX ID PUT HERE[/COLOR]" />

[/COLOR]

5 - Go to res/layout/ (Check Resources files attached in OP for copy necessary files.)

plugin_view.xml - paste this file from resource/res-files/layout/

status_bar_recents_panel.xml - paste and replace this file from resource/res-files/layout/

6 - Go to res/layout-land

status_bar_recents_panel.xml - paste and replace this file from resource/res-files/layout-land/.

7 - Go to smali/com/android/systemui/ - paste and replace all files from 'resources/smali-files/R/' folder.

8 - Go to smali/com/android/systemui/recent/ - paste and replace all files from 'resources/smali-files/RecentsActivity/' folder.

10 - Go to smali/com/android/systemiu/recent/ and open RecentsActivity.smali

Find these names below:

recents_pluginview_container

recents_layout

plugin_view

status_bar_recent_panel

recents_root

config_recent_item_min_alpha

recents_pluginview_container

recents_return_to_launcher_enter

recents_return_to_launcher_exit

You'll replace these names with "hex id" from res/values/public.xml, it need to match the same name for replace "hex id", for example recents_pluginview_container is marked in blue that you find in RecentsActivity.smali:

.line 310
invoke-static {}, Lcom/android/systemui/recent/RecentsActivity;->detachPluginView()V

.line 311
const v3, [COLOR="Blue"]recents_pluginview_container[/COLOR]

invoke-virtual {p0, v3}, Lcom/android/systemui/recent/RecentsActivity;->findViewById(I)Landroid/view/View;

move-result-object v0

check-cast v0, Landroid/view/ViewGroup;

Find for recents_pluginview_container in res/values/public.xml and copy your hex id:

[COLOR="blue"]<public type="id" name="recents_pluginview_container" id="[COLOR="Red"]COPY YOUR ID HEX[/COLOR]" />
[/COLOR]

Replace recents_pluginview_container with your hex id that you find in public.xml, like this:

.line 310
invoke-static {}, Lcom/android/systemui/recent/RecentsActivity;->detachPluginView()V

.line 311
const v3, [COLOR="Blue"]"PASTE YOUR ID HEX"[/COLOR]

invoke-virtual {p0, v3}, Lcom/android/systemui/recent/RecentsActivity;->findViewById(I)Landroid/view/View;

move-result-object v0

check-cast v0, Landroid/view/ViewGroup;

You'll do the same with others names:

recents_layout

plugin_view

status_bar_recent_panel

recents_root

config_recent_item_min_alpha

recents_pluginview_container

recents_return_to_launcher_enter

recents_return_to_launcher_exit

11 - Go to smali/com/android/systemui/ and open R$styleable.smali

Find for lookupKey like this marked in blue:

.line 2536
new-array v0, v3, [I

const v1, [COLOR="Blue"]lookupKey[/COLOR]

aput v1, v0, v2

sput-object v0, Lcom/android/systemui/R$styleable;->RemotePluginView:[I

Find lookupKey in res/values/public.xml and copy your hex id:

<public type="attr" name="lookupKey" id="[COLOR="Red"]COPY YOUR ID HEX[/COLOR]" />

Replace lookupKey with your hex id that you find in public.xml, like this:

.line 2536
new-array v0, v3, [I

const v1, [COLOR="Blue"]"PASTE YOUR ID HEX"[/COLOR]

aput v1, v0, v2

sput-object v0, Lcom/android/systemui/R$styleable;->RemotePluginView:[I

Save all modifications and recompile SystemUI.apk!

Step 5 -

For CM10.2

Now add these files recompiled in flashable zip attached

SystemUI.apk to system/app

android.policy.jar, framework.jar, framework-res.apk to system/framework

For CM10.1

Now add these files recompiled in flashable zip attached

SystemUI.apk to system/app

android.policy.jar, framework.jar, framework-res.apk to system/framework

Done! Your ROM already support small apps Z1 with taskswitcher working!

Changelog:

If you have difficulty to port SystemUI.apk follow this video guide, it will help you to mod :)

(Recommended to use Virtuous Ten Studio)​

[YOUTUBE]8CFHp5uVqA4[/YOUTUBE]

Part 2:

[YOUTUBE]FVbN5KbGItM[/YOUTUBE]

​

Video-Tutorial on How to port SONY Small Apps/Taskswitcher plugin to CM10.1/4.2.2 using "Android Multitool" from [MENTION=4642185]Flextrick[/MENTION] by [MENTION=5153662]Android-Andi[/MENTION]

http://xdaforums.com/showpost.php?p=46058006&postcount=75
​

Screenshots:

If you liked my work, just click on Thanks button.:laugh:

Xperia 2011 port thread: http://xdaforums.com/showthread.php?t=2421678

Addons:

If anyone got working, please post screenshots in this thread!

Working reports with screenshot:

Confirmed for working by [MENTION=4532929]chotu222[/MENTION] from Xperia T and Galaxy Grand DUOS screenshots:

Confirmed for working by [MENTION=5017116]CressKH[/MENTION] from Xperia ZR C5503:

Confirmed for working by [MENTION=5153662]Android-Andi[/MENTION] from Galaxy Tab 2 - P3110 and others screenshots (Tablet UI working too):

Working on some stock 4.2.2 Roms by [MENTION=4194545]Koloses[/MENTION]