Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Thread Deleted

How to Port Lidroid Toggles to JB 4.2 MTK / STOK BASE / NON CM / JB 4.2/ JB 4.3 / KK

OP Adi Aisiteru Reborn

Prev Previous Post   Next Post Next
10th June 2014, 05:41 AM   |  #1  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,589
 
1,666 posts
Join Date:Joined: Apr 2013
HOW TO PORT JB 4.2 HORIZONTAL LIDROID TOGGLES
TO MTK / STOK BASE / NON CM / JB 4.2 /JB 4.3 / KK



Oke guys, I am back again here, I want to share how to port Lidroid toggle for Jelly Bean 4.2 up. : MTK / STOK BASE / NON CM / JB 4.2 / JB 4.3 / KK
do not try this on CM Base rom, or you will ended with SystemUI force closes



Credit & Thank you very much , to
- lidroid, and Wanam for Guide [MOD][Android 4.1.2] Add Customizable 23 Statusbar Toggles To Samsung Jelly bean Roms,. and Thanks too to peetr_I learn some code from his thread [MOD][JB][ICS] Xperia T/TX/V port of Lidroid power widget,. and also thanks to
XDA.AGM
I learn some code from his thread too [ JB ] [ A.0.400/1.100 ] [ XP-XU ]SystemUI with Lidroid Custom 18 Toggles [version 6], and you must thanks them too

- Recognized contributor @BOND1987

- Denny Mbol , Device Lenovo a316i MTK 6572

- CyanogenMod

- and also Thanks to Recognized Developer/themer @serajr for some toggles created by him


- [Unofficial Community] Galaxy Wonder CyanogenMod Indonesia



so we are going to port 21 Lidroid toggles :
( -Lock screen/screen-off action, -Reboot action, -Shutdown action, -Bluetoth, -GPS, -Flashlight, -Lockscreen, -MobileData, -Orientation, -ScreenTimeOut, -Sound, -Sync, -Wi-fi, -Wi-fi Hotspot, Battery info, USB Connection mode, USB Debugging, PlayPause, Next track, Previous track, Network mode 2G/3G )

ok lets go to Guide:
first of all need some requirement for this MOD-GUIDE

REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk file
- Know how to decompile/recompiling jar Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else[/B]


STEP - 1
Decompile your SystemUI.apk

- Download attached Merge_to_SystemUI.apk exstract it and merge to your decompiled systemUI.apk

- SystemUI.apk/res/layout/gemini_status_bar_expanded.xml
add the red line
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NotificationPanelView android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/notification_panel_margin_left"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <View android:id="@id/handle" android:background="@drawable/status_bar_close" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" />
    <include android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height" layout="@layout/gemini_carrier_label" />
    <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/close_handle_underlap" android:animateLayoutChanges="false">
        <include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
        <com.adi.systemui.powerwidget.PowerWidget android:id="@id/adi_widget" android:layout_width="fill_parent" android:layout_height="wrap_content" />
        <FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="103.0dip">
            <include layout="@layout/toolbar_view" />
            <include layout="@layout/toolbar_indicator" />
            <include layout="@layout/toolbar_divider" />
        </FrameLayout>
        <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
            <ViewStub android:id="@id/flip_settings_stub" android:layout="@layout/flip_settings" android:layout_width="fill_parent" android:layout_height="wrap_content" />
            <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>
        </FrameLayout>
    </LinearLayout>
</com.android.systemui.statusbar.phone.NotificationPanelView>



- SystemUI.apk/res/values/arrays.xml
add the red lines, to end of it before </resources>
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <array name="navbar_search_targets">
        <item>@null</item>
        <item>@*android:drawable/ic_action_assist_generic</item>
        <item>@null</item>
        <item>@null</item>
    </array>
    <array name="navbar_search_target_descriptions">
        <item>@null</item>
        <item>@*android:string/description_target_search</item>
        <item>@null</item>
        <item>@null</item>
    </array>
    <array name="navbar_search_direction_descriptions">
        <item>@null</item>
        <item>@*android:string/description_direction_up</item>
        <item>@null</item>
        <item>@null</item>
    </array>
    <string-array name="shutdown_reboot_options">
        <item>@string/reboot</item>
        <item>@string/reboot_recovery</item>
        <item>@string/reboot_download</item>
    </string-array>
    <string-array name="shutdown_reboot_actions">
        <item></item>
        <item>recovery</item>
        <item>download</item>
    </string-array>
    <string-array name="usb_connection_mode_options">
        <item>@string/usb_mpt_mode</item>
        <item>@string/usb_msc_mode</item>
    </string-array>
    <string-array name="usb_connection_mode_actions">
        <item>mtp</item>
        <item>mass_storage</item>
    </string-array>
    <string-array name="battery_info_options">
        <item>@string/battery_info_info</item>
        <item>@string/battery_info_usage</item>
    </string-array>
    <string-array name="battery_info_actions">
        <item>battery_info</item>
        <item>battery_usage</item>
    </string-array>
</resources>


- SystemUI.apk/res/values/ids.xml
add the red lines, to end of it before </resources>
Code:
    <item type="id" name="sim_name">false</item>
    <item type="id" name="sim_switch">false</item>
    <item type="id" name="tool_bar_view">false</item>
    <item type="id" name="close">false</item>
    <item type="id" name="title">false</item>
    <item type="id" name="bottom">false</item>
    <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>
    <item type="id" name="adi_widget">false</item>
    <item type="id" name="power_widget_button_text">false</item>
    <item type="id" name="power_widget_button_indic">false</item>
    <item type="id" name="power_widget_button">false</item>
    <item type="id" name="power_widget_button_image">false</item>
</resources>


- SystemUI.apk/res/values/integers.xml
add the red lines, to end of it before </resources>
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <integer name="config_maxNotificationIcons">5</integer>
    <integer name="config_show_search_delay">200</integer>
    <integer name="config_vibration_duration">0</integer>
    <integer name="config_search_panel_view_vibration_duration">20</integer>
    <integer name="one_finger_pop_duration_ms">10</integer>
    <integer name="status_bar_recents_bg_gradient_degrees">90</integer>
    <integer name="navigation_bar_deadzone_hold">333</integer>
    <integer name="navigation_bar_deadzone_decay">333</integer>
    <integer name="config_recent_item_min_alpha">3</integer>
    <integer name="quick_settings_num_columns">3</integer>
    <integer name="quick_settings_user_time_settings_tile_span">1</integer>
    <integer name="quick_settings_brightness_dialog_short_timeout">2000</integer>
    <integer name="quick_settings_brightness_dialog_long_timeout">4000</integer>
    <integer name="blinds_pop_duration_ms">10</integer>
    <integer name="notification_panel_layout_gravity">0x37</integer>
    <integer name="settings_panel_layout_gravity">0x37</integer>
    <integer name="quickpanel_scroll_threshold_port">5</integer>
    <integer name="quickpanel_scroll_threshold_land">8</integer>
</resources>


- SystemUI.apk/res/values/strings.xml
add the red lines, to end of it before </resources>
Code:
    <string name="status_bar_help_text">"Access them anytime by swiping down.
Swipe down again for system controls."</string>
    <string name="shutdown_prompt_title">Shutdown</string>
    <string name="shutdown_prompt_message">Low battery and then will be auto shutdown</string>
    <string name="shutdown_prompt_message_before">Low battery ! Your phone will shutdown in</string>
    <string name="shutdown_prompt_message_after">seconds</string>
    <string name="quickpanel_wifi_text">Wi-Fi</string>
    <string name="quickpanel_dc_text">Data</string>
    <string name="quickpanel_network_mode_text">Network</string>
    <string name="quickpanel_sound_text">Sound</string>
    <string name="quickpanel_sound_vibration_text">Ring.vibrate</string>
    <string name="quickpanel_silent_text">Silent</string>
    <string name="quickpanel_vibration_text">Vibration</string>
    <string name="quickpanel_rotation_text">Rotation</string>
    <string name="quickpanel_bluetooth_text">Bluetooth</string>
    <string name="quickpanel_gps_text">GPS</string>
    <string name="quickpanel_autosync_text">Auto Sync</string>
    <string name="quickpanel_brightness_text">Brightness</string>
    <string name="quickpanel_screen_timeout_text">Timeout</string>
    <string name="quickpanel_lockscreen_text">Lockscreen</string>
    <string name="quickpanel_airplane_text">Flightmode</string>
    <string name="quickpanel_flashlight_text">Flashlight</string>
    <string name="quickpanel_reboot_text">Reboot</string>
    <string name="quickpanel_shutdown_text">Shutdown</string>
    <string name="airplane_mode">In Flight mode</string>
    <string name="shutdown_confirm">Your phone will shut down.</string>
    <string name="screen_timeout_seconds">Screen timeout set to: %d second(s)</string>
    <string name="screen_timeout_minutes">Screen timeout set to: %d minute(s)</string>
    <string name="screen_timeout_hours">Screen timeout set to: %d hour(s)</string>
    <string name="hamster">Phone Options</string>
    <string name="yes">OK</string>
    <string name="no">Cancel</string>
    <string name="reboot">Reboot</string>
    <string name="reboot_recovery">Recovery</string>
    <string name="reboot_download">Download</string>
    <string name="quickpanel_nfc_text">NFC</string>
    <string name="quickpanel_wifi_ap_text">Wifi AP</string>
    <string name="quickpanel_lockscreen_action_text">Sleep</string>
    <string name="quickpanel_androidbeam_text">Android Beam</string>
    <string name="brightness_settings_automatic">AUTO</string>
    <string name="brightness_settings_title" />
    <string name="quickpanel_usb_debugging_text">Debugging</string>
    <string name="quickpanel_usb_connection_mode_text">USB Mode</string>
    <string name="quickpanel_usb_current_mtp_title">Current mode: MPT</string>
    <string name="quickpanel_usb_current_msc_title">Current mode: MSC</string>
    <string name="usb_mpt_mode">MPT - Media Transfer</string>
    <string name="usb_msc_mode">MSC - Mass Storage</string>
    <string name="quickpanel_stay_awake_plugged_text">Stay Awake</string>
    <string name="quickpanel_battery_info_text">Battery</string>
    <string name="battery_info_info">Battery Information</string>
    <string name="battery_info_usage">Battery Power Usage</string>
    <string name="quickpanel_playpause_text">Play-Pause</string>
    <string name="quickpanel_next_text">Next</string>
    <string name="quickpanel_previous_text">Previous</string>
    <string name="quickpanel_screenshots_text">Screenshot</string>
</resources>


- Done and recompile your systemUI.apk

NOTE :
if you are using Apk Tool 2.0 or newer, and gettings error recompiling in the smali file,. check this explanation by :
- Recognized Themer @lacoursiere18 , here http://forum.xda-developers.com/show...7&postcount=34

and by Recognized Themer @Ticklefish, here http://forum.xda-developers.com/show...3&postcount=37

Credits and Thanks to them
Attached Files
File Type: zip Merge_to_SystemUI.apk.zip - [Click for QR Code] (166.0 KB, 1086 views)
Last edited by Adi Aisiteru Reborn; 2nd July 2014 at 06:55 AM.
The Following 17 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes