[SHARE][TUTORIAL][HOWTO]disabling/Enabling option for system APP - Sony Cross-Device General

hi,
in different customization of the same device for region or operator , we find some option in system configuration enabled in some and other no then we can do it by changing variable value in application files in system by decompiling and recompiling after modifying ( bools or arrays...etc ) it take a lot of time
so customization Sony has choose to make a little files for a region customization or enabling or disabling option in system app without modifying the original app file by using {real_application_name}-res.apk what will be adding in /system/vendor/overlay
in 4.0.4 and before sony ericsson used /system/etc/customization/ folder for enabling and parameterizing apps, so in JB 4.2 and 4.3or 4.4 these files are incompatible only 4.3 and 4.4 are compatible (attached files)
for JB 4.2
4.3 and 4.4
How to use ??
example :
for enabling data traffic notification and status icon in status bar we must change in or semcphone.apk phone.apk this line after decompiling Phone.apk or SemcPhone.apk in res/value/bools/xml we find a default value of application :
Code:
<bool name="data_connection_except_mms_can_clear_icon">true</bool>
<bool name="data_connection_except_mms_show_icon_when_disabled">true</bool>
<bool name="data_connection_except_mms_show_icon_when_enabled">false</bool>
Click to expand...
Click to collapse
they must be change to :
Code:
<bool name="data_connection_except_mms_can_clear_icon">false</bool> ----->[COLOR="red"] icon always visible can't be removed[/COLOR]
<bool name="data_connection_except_mms_show_icon_when_disabled">true</bool>
<bool name="data_connection_except_mms_show_icon_when_enabled">true</bool>
Click to expand...
Click to collapse
then it can be inserted in com.phone-res.apk and injected in system/vendor/overlay and rebooting after that the options are activated.
just know what value to want be activated in the main application apk
Another exemple :
in this post http://forum.xda-developers.com/showthread.php?t=2703113 to have mod for activating low cost in conversations.apk but with decompiling main apk conversations.apk but the simple one is using -res.apk
default value are :
Code:
<bool name="character_conversion">false</bool>
<bool name="character_conversion_visibility">false</bool>
Click to expand...
Click to collapse
and must be changed to
Code:
<bool name="character_conversion">true</bool>
<bool name="character_conversion_visibility">true</bool>
Click to expand...
Click to collapse
then modifing com.sonyericsson.conversations-res.apk
after decomiling
we have
Code:
[CODE]
[/CODE]
res
|-------> bools.xml -------------> to be modified
|-------> public.xml ---------------important contains all variable defined
bools.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="three_digit_number_linkify">true</bool>
<bool name="delivery_report">true</bool>
<bool name="mms_retrieval_during_roaming_visibility">true</bool>
[COLOR="Red"]<bool name="character_conversion">true</bool>
<bool name="character_conversion_visibility">true</bool>[/COLOR]
</resources>
public.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<public type="bool" name="three_digit_number_linkify" id="0x7f020000" />
<public type="bool" name="delivery_report" id="0x7f020001" />
<public type="bool" name="mms_retrieval_during_roaming_visibility" id="0x7f020002" />
[COLOR="red"]<public type="bool" name="character_conversion" id="0x7f020003" />
<public type="bool" name="character_conversion_visibility" id="0x7f020004" />[/COLOR]
<public type="bool" name="enable_send_empty_message" id="0x7f020005" />
<public type="integer" name="max_recipients" id="0x7f030000" />
<public type="integer" name="mms_max_size" id="0x7f030001" />
<public type="integer" name="sms_max_segments" id="0x7f030002" />
<public type="integer" name="mms_trigger_sms_segments" id="0x7f030003" />
</resources>
and recompile , push it in system/vendor/overlay and done.

Related

[GUIDE] How to change the number of stock launcher screens of JB ROM [Launcher2.apk]

Hello guys,
I received quite some messages / requests to write a guide on how to change the number of screens of JB ROM for team EOS by modifying the launcher2.apk;
So, I decided to share with you what I did with thanks go first to runandhide05 for his valuable help...
This guide is not only applicable to EOS ROM, but also to any JB ROM for XOOM and other devices with /system/app/launcher2.apk.
Tools Required:
APKTOOL: http://dl.dropbox.com/u/65414192/apktoo_8.15.12.zip
7zip
Notepad++: for file editing
GUIDE:
1) grap /system/app/launcher2.apk: To be modded.
2) grap /system/framework/framework-res.apk: Needed for apktool environment
3) download apktool and extract it. Say: C:/
4) open command line, cmd, and navigate to where you extracted apktool
5) place framework-res.apk in the apktool folder where it was extracted.
6) install the framework-res.apk by typing: apktool if framework-res.apk
7) place the launcher2.apk in the apktool folder where it was extracted.
7) decompile launcher2.apk by typing: apktool d Launcher2.apk
8) after successful decompilation, the output folder will be :\were\extracted\zip\is\Launcher2\
9) Make the below changes:
Here are the files you need to modifiy:
res/layout-port/launcher.xml
res/layout-land/launcher.xml
res/layout-sw720dp/workspace.xml
res/values/public.xml
res/values/ids.xml
To decrease the number of screens; example from 5 to 3:
- change launcher:defaultScreen="2" to launcher:defaultScreen="1" where 1 is the middle screen of the 3 screens. numbers convension are 0,1,2.
- From:
<include android:id="@id/cell1" layout="@layout/workspace_screen" />
<include android:id="@id/cell2" layout="@layout/workspace_screen" />
<include android:id="@id/cell3" layout="@layout/workspace_screen" />
<include android:id="@id/cell4" layout="@layout/workspace_screen" />
<include android:id="@id/cell5" layout="@layout/workspace_screen" />
- To:
<include android:id="@id/cell1" layout="@layout/workspace_screen" />
<include android:id="@id/cell2" layout="@layout/workspace_screen" />
<include android:id="@id/cell3" layout="@layout/workspace_screen" />
- And public.xml in res/values in which I had to delete
<public type="id" name="cell4" id="hex val xxxxx" />
<public type="id" name="cell5" id="hex val xxxxx" />
To increase the number of screens; example from 5 to 7
- change launcher:defaultScreen="2" to launcher:defaultScreen="2" where 3 is the middle screen of the 7 screens. numbers convension are 0,1,2,3,4,5,6
- From:
<include android:id="@id/cell1" layout="@layout/workspace_screen" />
<include android:id="@id/cell2" layout="@layout/workspace_screen" />
<include android:id="@id/cell3" layout="@layout/workspace_screen" />
<include android:id="@id/cell4" layout="@layout/workspace_screen" />
<include android:id="@id/cell5" layout="@layout/workspace_screen" />
- To:
<include android:id="@id/cell1" layout="@layout/workspace_screen" />
<include android:id="@id/cell2" layout="@layout/workspace_screen" />
<include android:id="@id/cell3" layout="@layout/workspace_screen" />
<include android:id="@id/cell4" layout="@layout/workspace_screen" />
<include android:id="@id/cell5" layout="@layout/workspace_screen" />
<include android:id="@id/cell6" layout="@layout/workspace_screen" />
<include android:id="@id/cell7" layout="@layout/workspace_screen" />
- And public.xml in res/values in which I had to add
<public type="id" name="cell6" id="hex val xxxxx" />
<public type="id" name="cell7" id="hex val xxxxx" />
xxx is the hex code for the vale id. You have to make sure that this code is unique and it is not present anywhere. You cannot use an existing value. So, to make it easy,
you open the pulic.xml file and check the last code used; increment by 1 for each added configuration; example: if the last hex code used in the file is 0x7f0d0017, you use 0x7f0d0018 and 0x7f0d0019
Hex codes are from 0 -- F [0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f] if the last digit of the code is 9 and you want to increase, then 9 + 1 = a;
- Note: ids.xml
if you are adding more screens, then in ids.xml you have to add instances.
<item type="id" name="cell6">false</item>
<item type="id" name="cell7">false</item>
if you are decreasing the number of screens, no need to add, just keep them 5, they are false anyway.
10) compile the apk: in cmd type
apktool b Launcher2
11) now navigate to :\were\extracted\zip\is\Launcher2\build\apk\
12) copy the original Launcher2.apk from :\were\extracted\zip\is\ to :\were\extracted\zip\is\Launcher2\build\apk\
13) OPEN not extract the apk with 7zip
14) and now click and highlight from the :\were\extracted\zip\is\Launcher2\build\apk\ the res folder the classes.dex file and the resouces.arsc and drag them into the root of the Launcher2.apk that is open in 7zip
15) close 7zip and the file is now ready to be pushed / flashed in device.
Attached is a ready flashable script that can be used to flash your modded file through recovery.
Installation:
1) download the sample flashable zip
2) extract it and put your modded launcher2.apk in \system\app\
3) rezip
4) put your flashable zip in SD CARD.
5) boot into recovery and flash it.
6) reboot.
I have made stock launcher screens ready (1,3,5,7,9 screens) ready in here:
http://forum.xda-developers.com/showthread.php?t=1836783
ENJOY

How to correct change APK background

hello everybody
I have a problem
I want change my apk background but have trouble
i edit style.xml
original
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="RE_Main" parent="@*android:style/Theme.DeviceDefault.Light">
<style name="RE_Dialog" parent="@*android:style/Theme.DeviceDefault.Light.Dialog" />
</resources>
Change
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="RE_Main" parent="@*android:style/Theme.DeviceDefault.Light">
<item name="android:background">@drawable/semc</item>
</style>
<style name="RE_Dialog" parent="@*android:style/Theme.DeviceDefault.Light.Dialog" />
</resources>
Can not be used after changing

[Q] Menu Icons with different themes

Hello,
in the settings of my App the users can switch between Holo.Light and Holo theme.
But I show some Menu options in the ActionBar. I've copied the icons for Holo.Light into my App.
When I switch to Holo theme, the icons looks not really good.
How can I implement the icons for the dark theme?
I've tried the following: http://stackoverflow.com/a/12339924
But it dont work..
values/attrs.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="main">
<attr name="search_icon" format="reference" />
</declare-styleable>
</resources>
values/styles.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="MyTheme" parent="android:Theme.Holo">
<item name="search_icon" [user=3944923]@drawab[/user]le/ic_action_search</item>
</style>
<style name="MyTheme.Light" parent="android:Theme.Holo.Light">
<item name="search_icon" [user=3944923]@drawab[/user]le/ic_action_search_light</item>
</style>
</resources>
menu/main.xml
Code:
<item
android:id="@+id/action_search"
android:icon="?search_icon"
.....
manifest:
Code:
<application
android:theme="@style/MyTheme"
wheres the error? it does always show the @drawable/ic_action_search_light icon..

[TUTORIAL][KK]JB style quick settings for KitKat

Inspired by AndroPlus's True Quick Settings, in this thread, I'll show you how to mod your KitKat SystemUI to get JellyBean style Quick Settings.
Files you need to edit
Code:
res/layout/somc_quick_settings_tab.xml
res/layout/somc_notifications_tab.xml
res/layout/somc_tabs_status_bar_expanded.xml
res/layout/status_bar_notification_tools_button.xml
res/values/dimens.xml
res/values/integers.xml
Requirements:
- ApkTool (I use this)
- Notepad++
- Patience
1. Decompile your SystemUI.apk
2. We must move the quick settings tab to notifications tab. So, go to somc_quick_settings_tab.xml and copy the Linear layout
Code:
<LinearLayout android:orientation="vertical" android:id="@id/tools_rows" android:layout_width="fill_parent" android:layout_height="wrap_content" />
3. Next edit the somc_notifications_tab.xml and add the above code and now it looks something like this
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:id="@id/notifications_tab" android:layout_width="fill_parent" android:layout_height="wrap_content" android:animateLayoutChanges="false"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
[COLOR="Red"]<LinearLayout android:orientation="vertical" android:id="@id/tools_rows" android:layout_width="fill_parent" android:layout_height="wrap_content" />[/COLOR]
4. To add the divider line which divides the quick settings and the time, copy this and paste it in somc_notifications_tab.xml below the Linear layout we copied earlier
Code:
<View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_divider_height" />
It looks like this
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:id="@id/notifications_tab" android:layout_width="fill_parent" android:layout_height="wrap_content" android:animateLayoutChanges="false"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<LinearLayout android:orientation="vertical" android:id="@id/tools_rows" android:layout_width="fill_parent" android:layout_height="wrap_content" />
[COLOR="Red"]<View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_divider_height" />[/COLOR]
5. Now to move the clock below the quick settings, go to somc_tabs_status_bar_expanded.xml and cut this line
Code:
<include layout="@layout/status_bar_expanded_header" />
Paste it to somc_notifications_tab.xml below the divider line code. Like this
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:id="@id/notifications_tab" android:layout_width="fill_parent" android:layout_height="wrap_content" android:animateLayoutChanges="false"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<LinearLayout android:orientation="vertical" android:id="@id/tools_rows" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_divider_height" />
[COLOR="Red"]<include layout="@layout/status_bar_expanded_header" />[/COLOR]
<include layout="@layout/status_bar_expanded_stylus_actions" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:overScrollMode="ifContentScrolls">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
</ScrollView>
</LinearLayout>
6. Make another copy of somc_notifications_tab.xml and rename it to somc_quick_settings_tab.xml and replace it with the original somc_quick_settings_tab.xml. So that both these files are the same.
7. To remove the top tabs [Notifications Quick settings], edit somc_tabs_status_bar_expanded.xml. Change this
Code:
<com.sonymobile.systemui.statusbar.tools.ToolsTabWidget android:orientation="horizontal" android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" />
to
Code:
<com.sonymobile.systemui.statusbar.tools.ToolsTabWidget android:orientation="horizontal" android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="[COLOR="Red"]0.0dip[/COLOR]" />
Also delete this line from somc_tabs_status_bar_expanded.xml
Code:
<include layout="@layout/somc_quick_settings_tab" />
8. To remove top space above quick settings icons, change these lines in status_bar_notification_tools_button.xml.
From
Code:
<FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content">
to
Code:
<FrameLayout [COLOR="Red"]android:layout_marginTop="@dimen/qs_tile_margin_above_icon"[/COLOR] android:layout_width="wrap_content" android:layout_height="wrap_content">
For single line text, change this
Code:
<TextView android:textSize="@dimen/status_bar_tools_button_label_text_size" android:gravity="top|center" android:id="@id/tools_button_text" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/status_bar_tools_button_margin_bottom" android:lines="2" android:scrollHorizontally="false" android:includeFontPadding="false" />
to
Code:
<TextView [COLOR="Red"]android:layout_marginBottom="@dimen/qs_tile_margin_below_icon"[/COLOR] android:textSize="@dimen/status_bar_tools_button_label_text_size" android:gravity="top|center" android:id="@id/tools_button_text" android:layout_width="fill_parent" android:layout_height="fill_parent" android:lines="[COLOR="Red"]1[/COLOR]" android:scrollHorizontally="false" android:includeFontPadding="[COLOR="Red"]true[/COLOR]" [COLOR="Red"]android:singleLine="true"[/COLOR]/>
9. Edit dimens.xml.
From
Code:
<dimen name="notification_panel_tools_row_height">100.0dip</dimen>
<dimen name="status_bar_tools_button_label_text_size">12.0dip</dimen>
<dimen name="qs_tile_margin_above_icon">27.0dip</dimen>
<dimen name="qs_tile_margin_below_icon">17.0dip</dimen>
to
Code:
<dimen name="notification_panel_tools_row_height">[COLOR="Red"]57.0dip[/COLOR]</dimen>
<dimen name="status_bar_tools_button_label_text_size">[COLOR="Red"]10.0dip[/COLOR]</dimen>
<dimen name="qs_tile_margin_above_icon">[COLOR="Red"]-22.0dip[/COLOR]</dimen>
<dimen name="qs_tile_margin_below_icon">[COLOR="Red"]-12.0dip[/COLOR]</dimen>
10. Edit integers.xml
From
Code:
<integer name="config_maxToolItemsInARow">4</integer>
<integer name="config_maxToolItemsInGrid">16</integer>
to
Code:
<integer name="config_maxToolItemsInARow">[COLOR="Red"]5[/COLOR]</integer>
<integer name="config_maxToolItemsInGrid">[COLOR="Red"]15[/COLOR]</integer>
11. Recompile and Enjoy
About the top space above quick settings icons, niaboc79 said it was his code, hence I had removed that. Also it had some bugs (for me at least) that I could not edit the SystemUI again. Even if I did, it would force close. And I have changed it so that when you decompile SystemUI again, mod it, and recompile, it can be used without any force close.
So what's the difference between niaboc79's JB style SystemUI and my tutorial?
-With my tutorial, you can use "Clear" button if you swipe the statusbar with one finger, and you can use "Edit" button for editing quick settings if you swipe the statusbar with two fingers. And he uses other file (com.android.settings-res.apk) to achieve this JB style SystemUI.
And why this comparison?
-Because he asked me to close the thread saying I used his methods. So I deleted his method and changed it with my own.
This mod has been tested on Xperia Z and Xperia ZL KitKat firmwares. Should work on other Sony KitKat devices (I doubt if it works on Z3 and new Z2 firmware). Test and report.
Always take a backup of original files so that you can replace it when something goes wrong
Credits:
AndroPlus
anagramgenius(myself )
XDA Portal
http://www.xda-developers.com/bring-back-jelly-bean-quick-toggles-to-your-kitkat-xperia-rom/
Thanks my friend.. Great work..
Cool Bro! But you know how to move the clock above the toggles?
Naufal Sidik said:
Cool Bro! But you know how to move the clock above the toggles?
Click to expand...
Click to collapse
In step 5, copy the code and place it above the linear layout of somc notification tab and somc quicksettings tab.
Good tutorial! Thanks!
Trimis de pe al meu D2303 folosind Tapatalk
i have a few questions:
1. does it work for Z1c?
2. can anybody tell me how to center clock in statusbar?
thx
m.
moonryder said:
i have a few questions:
1. does it work for Z1c?
2. can anybody tell me how to center clock in statusbar?
thx
m.
Click to expand...
Click to collapse
Haven't tested. It might work.
moonryder said:
i have a few questions:
1. does it work for Z1c?
2. can anybody tell me how to center clock in statusbar?
thx
m.
Click to expand...
Click to collapse
It will work all Kitkat 4.4+ Sony Devices without any problems..
Thanks for this! How did you get that really awesome-looking blur on the notification panel?
epic118 said:
Thanks for this! How did you get that really awesome-looking blur on the notification panel?
Click to expand...
Click to collapse
Its an xposed module. Blurred SystemUI by serajr.
Congrats for the XDA Portal
http://www.xda-developers.com/android/bring-back-jelly-bean-quick-toggles-to-your-kitkat-xperia-rom/
Rajeev said:
Congrats for the XDA Portal
http://www.xda-developers.com/android/bring-back-jelly-bean-quick-toggles-to-your-kitkat-xperia-rom/
Click to expand...
Click to collapse
Thanks:victory:
thanks so much sir.....!!! :good: :good: :good: working on t2 ultra 4.4.3
hazikh said:
thanks so much sir.....!!! :good: :good: :good: working on t2 ultra 4.4.3
Click to expand...
Click to collapse
Thanks for confirmation:good:
May I ask how you have the "USB Storage Connected - Tap here to safely remove " prompt , I would like to have it on my Sony Xperia M Dual to quickly unmount the usb device I connect.
sorry to ask, how to replace colors on a divider according to the theme ?
solonxpl said:
May I ask how you have the "USB Storage Connected - Tap here to safely remove " prompt , I would like to have it on my Sony Xperia M Dual to quickly unmount the usb device I connect.
Click to expand...
Click to collapse
If USB OTG function is present in your device, it appears. It was present in my device. I didn't mod anything to get that.
hazikh said:
sorry to ask, how to replace colors on a divider according to the theme ?
Click to expand...
Click to collapse
Dunno about that. Will find and tell you.
Hey i have edited the SystemUi.apk bt now i am not getting how to install that apk...when i install the apk it is not installed....
I had replaced the SystemUi.apk with edited one by es file explorer bt it didnt worked my status bar and navigation bar was gone after that....i had to flash my phone again to get in better position...help me!!

speed dial enable

All,
steps to enable speed dial on Sony Xperia Z1 compact
Speeddial is enabled on D5503_14.4.A.0.157_R4C_RU
But disabled on D5503_14.4.A.0.157_Baltic
After I have copied "com.sonyericsson.android.socialphonebook-res.apk" to system/vendor/overlay folder I got speeddial with 99 positions.
This apk file must have the following files:
\res\values\bools.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="enable_speed_dial">true</bool>
</resources>
and \res\values\public.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<public type="bool" name="enable_speed_dial" id="0x7f020000" />
</resources>

Categories

Resources