Post Reply

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

10th June 2014, 04:41 AM   |  #1  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,461
 
1,648 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, 617 views)
Last edited by Adi Aisiteru Reborn; 2nd July 2014 at 05:55 AM.
The Following 15 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
10th June 2014, 04:41 AM   |  #2  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,461
 
1,648 posts
Join Date:Joined: Apr 2013
Arrow
STEP - 2
 

- Decompile the newly Recompiled APK again

Next go to
res/values/public.xml
open it with Notepad++
leave it, but keep it open

- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
add the red lines :
Code:
.field private mOldPlmn:Ljava/lang/String;

.field mPixelFormat:I

.field private mPlmnLabel:Landroid/widget/TextView;

.field mPositionTmp:[I

.field mPostCollapseCleanup:Ljava/lang/Runnable;

.field mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;

.field private mPreviousConfigFontScale:F

.field private mPrevioutConfigOrientation:I

.field mQS:Lcom/android/systemui/statusbar/phone/QuickSettings;

.field mQueueLock:Ljava/lang/Object;

.field private mRecentsClickListener:Landroid/view/View$OnClickListener;

Code:
    .end local v6           #signal:Landroid/view/View;
    .end local v7           #systemIcons:Landroid/view/View;
    :cond_0
    iget-object v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOutAnimation:Landroid/animation/Animator;

    invoke-virtual {v8}, Landroid/animation/Animator;->cancel()V

    .line 2213
    iget-object v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOnAnimation:Landroid/animation/Animator;

    invoke-virtual {v8}, Landroid/animation/Animator;->cancel()V

    .line 2215
    if-eqz p1, :cond_1

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOutAnimation:Landroid/animation/Animator;

    .line 2216
    .local v0, a:Landroid/animation/Animator;
    :goto_0
    invoke-virtual {v0}, Landroid/animation/Animator;->start()V

    .line 2218
    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setAreThereNotifications()V

    .line 2219
    return-void

    .line 2215
    .end local v0           #a:Landroid/animation/Animator;
    :cond_1
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOnAnimation:Landroid/animation/Animator;

    goto :goto_0
.end method

.method private setupPowerWidget()V
    .locals 2

    .prologue
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

    const v1, 0x7f08012a

    invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/adi/systemui/powerwidget/PowerWidget;

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;

    invoke-virtual {v0}, Lcom/adi/systemui/powerwidget/PowerWidget;->setupWidget()V

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;

    invoke-virtual {v0}, Lcom/adi/systemui/powerwidget/PowerWidget;->updateWidget()V

    return-void
.end method

.method private showAlwaysAskOrInternetCall(J)V
    .locals 3
    .parameter "simId"

    .prologue
    const/4 v2, 0x0

    .line 3231
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIconShow:Z

    .line 3232
    const-wide/16 v0, -0x2

    cmp-long v0, p1, v0

    if-nez v0, :cond_0

    .line 3233
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIcon:Landroid/widget/ImageView;

    const v1, 0x7f020137

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    .line 3239
    :goto_0
    iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAirplaneMode:Z

    if-nez v0, :cond_2

    .line 3240
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIcon:Landroid/widget/ImageView;

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 3245
    :goto_1
    return-void

    .line 3234
    :cond_0
    const-wide/16 v0, -0x3

    cmp-long v0, p1, v0

    if-nez v0, :cond_1

    .line 3235
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIcon:Landroid/widget/ImageView;

    const v1, 0x7f020136

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    goto :goto_0

    .line 3237
    :cond_1
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIcon:Landroid/widget/ImageView;

    const v1, 0x7f020135

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    goto :goto_0
change this, 0x7f08012a according to the value you got in your own public.xml
Code:
<public type="id" name="adi_widget" id="0x7f??????" />

search this method
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
scroll down in that method and add the red line
Code:
 move-object/from16 v0, p0

    iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v11, v1, v12}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 772
    invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->resetUserSetupObserver()V

    invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V

    .line 774
    new-instance v20, Landroid/content/IntentFilter;

    invoke-direct/range {v20 .. v20}, Landroid/content/IntentFilter;-><init>()V

    .line 775
    .local v20, simInfoIntentFilter:Landroid/content/IntentFilter;
    const-string v1, "android.intent.action.SIM_SETTING_INFO_CHANGED"

OR
you can put the line here
Code:
   iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMediaEjectBroadcastReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v11, v1, v15}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 800
    move-object/from16 v0, p0

   invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V


    iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

    return-object v1

    .line 440
    .end local v12           #filter:Landroid/content/IntentFilter;
    .end local v14           #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
    .end local v15           #mediaEjectFilter:Landroid/content/IntentFilter;
    .end local v19           #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
    .end local v20           #simInfoIntentFilter:Landroid/content/IntentFilter;
    .end local v21           #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
    :cond_d
    const/4 v1, 0x0

    goto/16 :goto_0
NOTE !! if your device / os
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
doesn't have this line
Code:
 move-object/from16 v0, p0
change this
Code:
 invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V
to like this
Code:
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V
Last edited by Adi Aisiteru Reborn; 10th June 2014 at 05:20 AM.
The Following 9 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
10th June 2014, 04:41 AM   |  #3  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,461
 
1,648 posts
Join Date:Joined: Apr 2013
STEP -3
 

Next : Download attached Powerwidget_public, and open it with Notepad++
so you have two public.xml now which is opened in the Notepad++
1. secondly decompiled public.xml
2. Powerwidget_public.xml

- go to , smali/com/adi/systemui/powerwidget/here...
there are a lot of smalis there

FIND ALL IDS in all that smalis THAT'S STARTED WITH
Code:
0x7fxxxxxx
EXAMPLE :
AutoRotateButton.smali

Code:
.method protected getText()I
    .locals 1

    const v0, 0x7f0b00f9

    return v0
.end method
find this const v0, 0x7f0b00f9 in PowerWidget_public.xml what is calling for
and we find that is for
Code:
 <public type="string" name="quickpanel_rotation_text" id="0x7f0b00f9" />
the IDS can be strings, ids, integer, arays, drawable, or layout, so you have to pay attention to this

next go to your own public.xml search for the value you got
Code:
 <public type="string" name="quickpanel_rotation_text" id="0x7f0??????" />
and change the IDS in the smali with your own value
Code:
.method protected getText()I
    .locals 1

    const v0, 0x7f0??????

    return v0
.end method
Do it too, to all
Code:
0x7fxxxxxx
in all smalis in the Powerwidget folder.

Attached Files
File Type: zip PowerWidget_public.zip - [Click for QR Code] (14.5 KB, 294 views)
Last edited by Adi Aisiteru Reborn; 10th June 2014 at 05:30 AM.
The Following 8 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
10th June 2014, 04:42 AM   |  #4  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,461
 
1,648 posts
Join Date:Joined: Apr 2013
Arrow
STEP - 4

 

- Disable signature check
here : http://forum.xda-developers.com/show....php?t=1698352
or in here : http://forum.xda-developers.com/show...01&postcount=3

- AndroidManifest.xml
add the red line
Code:
<manifest android:sharedUserId="android.uid.system" android:process="system" android:versionCode="17" android:versionName="4.2.2-eng.njdbuild03.1389868812" package="com.android.systemui" coreApp="true"
Code:
 <uses-permission android:name="android.permission.ACCESS_ALL_DOWNLOADS" />
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.REBOOT" />
    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <application android:label="@string/app_label" android:icon="@*android:drawable/platlogo" android:allowClearUserData="false" android:persistent="true" android:allowBackup="false">
        <service android:name="SystemUIService" android:exported="true" />
        <service android:name=".screenshot.TakeScreenshotService" android:exported="false" android:process=":screenshot" />
Code:
   <service android:label="@string/jelly_bean_dream_name" android:name=".BeanBagDream" android:enabled="false" android:exported="true">
            <intent-filter>
                <action android:name="android.service.dreams.DreamService" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </service>
        <activity android:theme="@*android:style/Theme.Wallpaper.NoTitleBar" android:label="@string/start_dreams" android:icon="@mipmap/ic_launcher_dreams" android:name=".Somnambulator" android:exported="true" android:excludeFromRecents="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.DESK_DOCK" />
            </intent-filter>
        </activity>
        <receiver android:name="com.adi.systemui.powerwidget.NetworkModeReceiver" android:process="com.android.phone">
            <intent-filter>
                <action android:name="com.serajr.powertoggles.POWERTOGGLES_CHANGE_NETWORK_MODE" />
                <action android:name="com.serajr.powertoggles.POWERTOGGLES_NEW_NETWORK_MODE" />
            </intent-filter>
        </receiver>
    </application>
</manifest>
- Done and recompile it , don't forget to sign it,
I ussually use ApkMultitools to decompile/recompile/sign APK
so if you use ApkMultitools, you can use my signer keys
download attached file, exstract it and merge to your ApkMultitools / other / here

- Download Attached Powerwidget.apk and Torch.apk, push it to your system/app/reboot

- edit your build.prop , to make USB connection mode toggle working properly
Code:
ro.sys.usb.storage.type=mtp,mass_storage



Additional :
- if the Flashlight toggle force closes, try to use this Torch.apk by raffie_archildz http://d-h.st/n99

- But if still force closes try to use this guide

 

if the Flashlight toggle from the guide doesn't work, try to use this smali http://d-h.st/mgb
- and don't forget to match the IDS too,.
- AndroidManifest.xml
Code:
 <uses-permission android:name="android.permission.ACCESS_ALL_DOWNLOADS" />
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.REBOOT" />
    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <application android:label="@string/app_label" android:icon="@*android:drawable/platlogo" android:allowClearUserData="false" android:persistent="true" android:allowBackup="false">
        <service android:name="SystemUIService" android:exported="true" />
Attached Files
File Type: zip Signer_CM11-KK.zip - [Click for QR Code] (5.4 KB, 115 views)
File Type: apk Torch.apk - [Click for QR Code] (160.7 KB, 183 views)
File Type: apk New_PowerWidget.apk - [Click for QR Code] (161.0 KB, 236 views)
Last edited by Adi Aisiteru Reborn; 10th June 2014 at 11:44 AM.
The Following 10 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
10th June 2014, 04:42 AM   |  #5  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,461
 
1,648 posts
Join Date:Joined: Apr 2013
Screenshots




Attached Thumbnails
Click image for larger version

Name:	IMG_20140610_113810.jpg
Views:	674
Size:	10.4 KB
ID:	2790251   Click image for larger version

Name:	IMG_20140610_113816.jpg
Views:	568
Size:	16.3 KB
ID:	2790252   Click image for larger version

Name:	IMG_20140610_113821.jpg
Views:	414
Size:	19.5 KB
ID:	2790253   Click image for larger version

Name:	IMG_20140610_113826.jpg
Views:	381
Size:	19.9 KB
ID:	2790254   Click image for larger version

Name:	IMG_20140610_113831.jpg
Views:	315
Size:	20.6 KB
ID:	2790255  

Last edited by Adi Aisiteru Reborn; 10th June 2014 at 05:52 AM.
The Following 13 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
10th June 2014, 05:58 AM   |  #6  
dugeriss's Avatar
Senior Member
Flag Gunung Pati,Semarang
Thanks Meter: 219
 
214 posts
Join Date:Joined: Apr 2013
More
fertamax om !!
The Following 5 Users Say Thank You to dugeriss For This Useful Post: [ View ]
11th June 2014, 08:45 PM   |  #7  
shevchovski's Avatar
Member
Flag Toyamas - Banyuwangi
Thanks Meter: 53
 
88 posts
Join Date:Joined: Oct 2013
More
awesome guide suhu sangat sangat Thanks
10th June 2014, 10:45 PM   |  #8  
Senior Member
Flag Tanjungpandan
Thanks Meter: 54
 
109 posts
Join Date:Joined: Apr 2013
More
your awesome...another great guides from u... sungkem dulu ama guru... _/|\_
thanks...Click image for larger version

Name:	uploadfromtaptalk1402436722670.jpg
Views:	48
Size:	35.1 KB
ID:	2791477

Sent from my GT-I9152 using Tapatalk
11th June 2014, 12:18 AM   |  #9  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,461
 
1,648 posts
Join Date:Joined: Apr 2013
It's touchwiz 4.2

Quote:
Originally Posted by budi78

work ...thx teacher

Quote:
Originally Posted by sitifire

your awesome...another great guides from u... sungkem dulu ama guru... _/|\_
thanks...Attachment 2791477

Sent from my GT-I9152 using Tapatalk

The Following User Says Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
28th June 2014, 04:27 PM   |  #10  
Ticklefish's Avatar
Recognized Themer
Flag UK
Thanks Meter: 3,496
 
3,943 posts
Join Date:Joined: Oct 2011
More
This might be precisely what I'm looking for. Thanks!

Got a slight request though.. Any chance you can upload smali that's compatible with apktool 2?
The Following User Says Thank You to Ticklefish For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Android Themes by ThreadRank