[Sony Cross-Device General] venkat kamesh:
Tut on how to Add Bravia/ X-reality/ Super-vivid​

Hello Guys

Every one asked me on how to add These engines to settings

SO here i got a very small tut on how to add these settings to you app as shown in the Picture below

[IMG="edit"]http://s29.postimg.org/bb7v8ggyv/123.jpg[/IMG]

Requirements :-

1. Apktool or you can try one of my tool here

2. Java jdk installed

3. Framework-res.apk, SemcGenericUxpRes.apk and Settings.apk

4. Patience with good mind

Now lets start work mates

Step;-1

Download the Apk tool and place as per your requirement

install the Framework first . ( if you are using the tool then place at the location as provided and run script )

If you dont have a script then follow this code

apktool if framework-res.apk
and
apktool if SemcGenericUxpRes.apk

Now Your Framework got installed and you need to proceed for Step :-2

Step;-2

Now you need to De-compile the SEttings.apk

If you have tool then there is no need of code. If you Dont have try this

apktool d Settings.apk

After the settings.apk got extracted

move to res->xml->somc_add_display_settings.xml

open it using NotePad++

You will find something like this

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<com.sonymobile.settings.preference.CheckBoxPreference android:title="@string/swiqi_strings_swiqi2_txt" android:key="swiqi2" android:summary="@string/swiqi_strings_swiqi_desc_txt" android:defaultValue="true" settings:dependOnSystemProperty="ro.service.swiqi2.supported" settings:before="first" settings:valueOfSettingsSystem="com.sonymobile.swiqi2_mode" />
<com.sonymobile.settings.preference.CheckBoxPreference android:title="@string/swiqi_strings_swiqi3_txt" android:key="swiqi3" android:summary="@string/swiqi_strings_swiqi_desc_txt" android:defaultValue="true" settings:dependOnSystemProperty="ro.service.swiqi3.supported" settings:before="first" settings:valueOfSystemProperty="persist.service.swiqi3.enable" />
<com.sonymobile.settings.preference.CheckBoxPreference android:title="@string/glove_mode_checkbox_title" android:key="glove_mode" android:summary="@string/glove_mode_checkbox_summary" android:defaultValue="false" settings:dependOnResource="@android:bool/config_enable_glove_mode" settings:before="brightness" settings:valueOfSystemProperty="persist.sys.touch.glove_mode" settings:valueOfSettingsSystem="com.sonymobile.touch.glove_mode" />
<com.sonymobile.settings.preference.IntentPreference android:key="white_balance" settings:dependOnIsValidIntent="true" settings:after="brightness" settings:hasMetaData="true">
<intent android:targetPackage="com.sonymobile.whitebalance" android:action="android.intent.action.MAIN" android:targetClass="com.sonymobile.whitebalance.WhiteBalanceActivity" />
</com.sonymobile.settings.preference.IntentPreference>
<com.sonymobile.settings.preference.RemovePreference settings:targetKey="wallpaper" />
<com.sonymobile.settings.preference.RemovePreference settings:dependOnIsValidIntent="true" settings:targetKey="wifi_display">
<intent android:targetPackage="com.sonymobile.tvout.wifidisplay" android:targetClass="com.sonymobile.tvout.wifidisplay.WfdStarterActivity" />
</com.sonymobile.settings.preference.RemovePreference>
</PreferenceScreen>

So all you need is to add these lines

<com.sonymobile.settings.preference.IntentPreference android:key="image_enhancer" settings:dependOnIsValidIntent="true" settings:dependOnSystemProperty="ro.service.xrfm.supported" settings:before="first" settings:hasMetaData="true" settings:valueOfSystemProperty="persist.service.xrfm.mode">
<intent android:targetPackage="com.sonymobile.imageenhancer" android:targetClass="com.sonymobile.imageenhancer.ImageEnhancerSettings" />
</com.sonymobile.settings.preference.IntentPreference>

If you add you will view something like this (Red Lines Are added one )

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
[COLOR="Red"]	<com.sonymobile.settings.preference.IntentPreference android:key="image_enhancer" settings:dependOnIsValidIntent="true" settings:dependOnSystemProperty="ro.service.xrfm.supported" settings:before="first" settings:hasMetaData="true" settings:valueOfSystemProperty="persist.service.xrfm.mode">
<intent android:targetPackage="com.sonymobile.imageenhancer" android:targetClass="com.sonymobile.imageenhancer.ImageEnhancerSettings" />
</com.sonymobile.settings.preference.IntentPreference>
[/COLOR] <com.sonymobile.settings.preference.RemovePreference settings:dependOnSystemProperty="ro.service.xrfm.supported" settings:targetKey="swiqi3" />
<com.sonymobile.settings.preference.CheckBoxPreference android:title="@string/swiqi_strings_swiqi2_txt" android:key="swiqi2" android:summary="@string/swiqi_strings_swiqi_desc_txt" android:defaultValue="true" settings:dependOnSystemProperty="ro.service.swiqi2.supported" settings:before="first" settings:valueOfSettingsSystem="com.sonymobile.swiqi2_mode" />
<com.sonymobile.settings.preference.CheckBoxPreference android:title="@string/swiqi_strings_swiqi3_txt" android:key="swiqi3" android:summary="@string/swiqi_strings_swiqi_desc_txt" android:defaultValue="true" settings:dependOnSystemProperty="ro.service.swiqi3.supported" settings:before="first" settings:valueOfSystemProperty="persist.service.swiqi3.enable" />
<com.sonymobile.settings.preference.CheckBoxPreference android:title="@string/glove_mode_checkbox_title" android:key="glove_mode" android:summary="@string/glove_mode_checkbox_summary" android:defaultValue="false" settings:dependOnResource="@android:bool/config_enable_glove_mode" settings:before="brightness" settings:valueOfSystemProperty="persist.sys.touch.glove_mode" settings:valueOfSettingsSystem="com.sonymobile.touch.glove_mode" />
<com.sonymobile.settings.preference.IntentPreference android:key="white_balance" settings:dependOnIsValidIntent="true" settings:after="brightness" settings:hasMetaData="true">
<intent android:targetPackage="com.sonymobile.whitebalance" android:action="android.intent.action.MAIN" android:targetClass="com.sonymobile.whitebalance.WhiteBalanceActivity" />
</com.sonymobile.settings.preference.IntentPreference>
<com.sonymobile.settings.preference.RemovePreference settings:targetKey="wallpaper" />
<com.sonymobile.settings.preference.RemovePreference settings:dependOnIsValidIntent="true" settings:targetKey="wifi_display">
<intent android:targetPackage="com.sonymobile.tvout.wifidisplay" android:targetClass="com.sonymobile.tvout.wifidisplay.WfdStarterActivity" />
</com.sonymobile.settings.preference.RemovePreference>
</PreferenceScreen>

Now you are done adding these things just compile now

apktool b Settings

If you have my tool it will compile/ zipalign/ sign

So now you are finally done with settings and you got ready to replace

Here is the main thing you need to do

:-

Download the Bravia zip Provided at bottom

Place Your compiled Settings.apk at this zip (*.zip->system->priv-app->)

and Flash the Zip now you are done

Never mind That Your Rom is Odexed Or Deodexed This flash script will delete the *.odex file

If you use this mod just Mention me ;) have fun

For F.A.Q just follow this thread Click here