FORUMS
Remove All Ads from XDA

How to Port Lidroid Toggles to non Samsung ICS 4.0 roms

1,770 posts
Thanks Meter: 5,046
 
By Adi Aisiteru Reborn, Senior Member on 30th July 2013, 12:07 AM
Post Reply Email Thread
HOW TO PORT LIDROID TOGGLES
TO NON SAMSUNG ICS ROMS



for JB you can go here : http://forum.xda-developers.com/show....php?t=2381290

Credit & Thank you :
- @lidroid
- Recognized themer @serajr for some additional toggles created by him.

and we are going to port 21 Lidroid toggles :
( -Lock screen/screen-off action, -Reboot action, -Shutdown action, -Airplane mode, -Bluetoth, -Brightness, -GPS, -Flashlight, -Lockscreen, -MobileData, -Orientation, -ScreenTimeOut, -Sound, -Sync, -Wi-fi, -Wi-fi Hotspot, Battery info, Stay awake, USB Connection mode, USB Debugging, Network mode )


NOTE !! , for CyanogenMod 9 do not follow this guide, you can just flash my mod for CM9 in here http://forum.xda-developers.com/show....php?t=2334200
many users from different devices reported work on their phone

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
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else




1. Decomple SystemUI.apk
- res/values/ids.xml
add this to the end :
Code:
    <item type="id" name="quickpanel_button">false</item>
    <item type="id" name="quickpanel_button_image">false</item>
    <item type="id" name="quickpanel_button_text">false</item>
    <item type="id" name="quickpanel_button_indic">false</item>
    <item type="id" name="adi_quickpanel">false</item>
- res/values/strings.xml
add this to the end :
Code:
    <string name="quickpanel_wifi_text">WiFi</string>
    <string name="quickpanel_dc_text">Data</string>
    <string name="quickpanel_network_mode_text">Network</string>
    <string name="quickpanel_sound_text">Ring</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">Orientation</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">Airplane</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">CWM recovery</string>
    <string name="reboot_download">Download</string>
    <string name="quickpanel_usb_debugging_text">USB Debugging</string>
    <string name="quickpanel_usb_connection_mode_text">USB Conn. 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 Info</string>
    <string name="battery_info_info">Battery Information</string>
    <string name="battery_info_usage">Battery Power Usage</string>
    <string name="quickpanel_wifi_ap_text">Wifi AP</string>
    <string name="quickpanel_lockscreen_action_text">Lock Now</string>
- res/layout/status_bar_expanded.xml
add the red code :
MEDIATEK device
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="103.0dip">
        <include layout="@layout/zzz_toolbar_view" />
        <include layout="@layout/zzz_toolbar_indicator" />
    </FrameLayout>
    <View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
    <RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
        <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
        <ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
        <ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
    </RelativeLayout>
    <com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/adi_quickpanel" 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="2.0dip" />
    <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
        <TextView android:textAppearance="@*android:style/TextAppearance.Large" android:gravity="left" android:layout_gravity="top" android:id="@id/noNotificationsTitle" android:padding="8.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
        <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="ifContentScrolls">
            <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_height" />
            </LinearLayout>
        </ScrollView>
        <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
    </FrameLayout>
</com.android.systemui.statusbar.phone.ExpandedView>

AOSP / XPERIA
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
        <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
        <ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
        <ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
    </RelativeLayout>
    <com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/adi_quickpanel" 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="2.0dip" />
    <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
        <TextView android:textAppearance="@*android:style/TextAppearance.Large" android:gravity="left" android:layout_gravity="top" android:id="@id/noNotificationsTitle" android:padding="8.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
        <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="ifContentScrolls">
            <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_height" />
            </LinearLayout>
        </ScrollView>
        <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
    </FrameLayout>
</com.android.systemui.statusbar.phone.ExpandedView>

- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali

add the blue code :
Code:
.field mPixelFormat:I

.field mPositionTmp:[I

.field mPostCollapseCleanup:Ljava/lang/Runnable;

.field mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

.field private mPreviousConfigFontScale:F

.field mQueueLock:Ljava/lang/Object;

.field private mRecentTasksLoader:Lcom/android/systemui/recent/RecentTasksLoader;
NEXT still in the same smali

Quote:

for MEDIATEK devices
find this method

Code:
# virtual methods
.method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
scroll down and add the blue code
Code:
 invoke-virtual {v1, v0, p3, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V

    iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->updateWidget()V

    .line 601
    return-void
.end method
next find this method :
Code:
.method protected makeStatusBarView()Landroid/view/View;
scroll down and add the blue code
Code:
 const v11, 0x7f0e0041

    invoke-virtual {v2, v11}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

    move-result-object v11

    check-cast v11, Landroid/widget/ScrollView;

    iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;

	const v11, 0x7f0e0096

    invoke-virtual {v2, v11}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

    move-result-object v11

    check-cast v11, Lcom/lidroid/systemui/quickpanel/PowerWidget;

    iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    .line 375
    new-instance v11, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;

    invoke-direct {v11, p0, v1, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/content/Context;Landroid/view/View;)V

    iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTicker:Lcom/android/systemui/statusbar/phone/Ticker;
pay attention on the red code in the part of blue code, it has to be written the same like above it/previous part
and also every mediatek device may be have diferent code,. see my another example in here : http://forum.xda-developers.com/show...35&postcount=7


next still in the same method, scroll down , and add the blue code
Code:
const-string v11, "android.intent.action.SIM_INFO_UPDATE"

    invoke-virtual {v9, v11}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 450
    iget-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSIMInfoReceiver:Landroid/content/BroadcastReceiver;

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

   
    iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V

    .line 454
    return-object v6

    .line 312
    .end local v3           #filter:Landroid/content/IntentFilter;
    .end local v4           #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
    .end local v6           #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
    .end local v8           #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
    .end local v9           #simInfoIntentFilter:Landroid/content/IntentFilter;
    .end local v10           #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;

Quote:

for AOSP / XPERIA
find this method

Code:
# virtual methods
.method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
scroll down and add the blue code

Code:
 const-string v8, "android.intent.action.SCREEN_OFF"

    invoke-virtual {v2, v8}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 373
    iget-object v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v8, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;

    const v6, 0x7f0e0096

    invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;

    iput-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    invoke-virtual {v6}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V

    .line 375
    return-object v4

    .line 306
    .end local v2           #filter:Landroid/content/IntentFilter;
    .end local v6           #signalCluster:Lcom/android/systemui/statusbar/SignalClusterView;
    .end local v7           #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
    :catch_0
    move-exception v8

    goto/16 :goto_0
.end method

CONTINUE TO POST #2
The Following 19 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ] Gift Adi Aisiteru Reborn Ad-Free
 
 
30th July 2013, 12:08 AM |#2  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 5,046
 
More
2. Download source_ICS_Lidroid_SytemUI.apk
Exstract it and merge to your decompiled SystemUI.apk
NOTE !! if your device has arrays.xml in res/values/here
please do check again the source_ICS_Lidroid_SytemUI.apk and adapt the arrays.xml code in it with yours

done and Recompile your SystemUI.apk

3. Decompile the newly Recompiled APK again and go to
res/values/public.xml
open it with Notepad++
leave it, but keep it open

next
- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
with Notepad++ , control+F

Quote:

MEDIATEK DEVICES

Code:
iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;

	const v11, 0x7f0e0096

    invoke-virtual {v2, v11}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

    move-result-object v11

    check-cast v11, Lcom/lidroid/systemui/quickpanel/PowerWidget;

    iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    .line 375
    new-instance v11, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;

Quote:

AOSP/XPERIA

Code:
invoke-virtual {v0, v8, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;

    const v6, 0x7f0e0096

    invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;

    iput-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    invoke-virtual {v6}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V

    .line 375
    return-object v4

Replace 0x7f0e0096 with the new ids from second decompiled public.xml
Code:
<public type="id" name="adi_quickpanel" id="0x7fxxxxxx" />
NEXT CONTINUE IN POST #3
The Following 14 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ] Gift Adi Aisiteru Reborn Ad-Free
30th July 2013, 12:10 AM |#3  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 5,046
 
More
4. Download ICS_Lidroid_public.xml
and open it with Notepad++
so now you have two public.xml which is opened in the Notepad++
1. second decompiled public.xml
2. ICS_Lidroid_public.xml

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

FIND ALL IDS in all that smalis THAT'S STARTED WITH
Code:
0x7fxxxxxx
EXAMPLE :
AirplaneButton.smali
find this :
Code:
const v0, 0x7f080089
find 0x7f080089 in ICS_Lidroid_public.xml

Code:
     <public type="string" name="quickpanel_lockscreen_text" id="0x7f080088" />
    <public type="string" name="quickpanel_airplane_text" id="0x7f080089" />
    <public type="string" name="quickpanel_flashlight_text" id="0x7f08008a" />
we find that 0x7f080089 is for string .... quickpanel_airplane_text
Next, find string .... quickpanel_airplane_text new ids in your
public.xml of second decompiled SystemUI.apk
Code:
 <public type="string" name="quickpanel_airplane_text" id="0x7fxxxxxx" />
change the ids in AirplaneButton.smali with your new ids from public.xml of second decompiled systemui.apk.

Do it too, to all
Code:
0x7fxxxxxx
in all smalis in the lidroid folder.

6. Download this QuickPanel_Settings.apk and push to system/app with right permission

Done
The Following 15 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ] Gift Adi Aisiteru Reborn Ad-Free
30th July 2013, 12:11 AM |#4  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 5,046
 
More
Additional Guide
[HOWTO] Enable 2G/3G, 2G, 3G Toggle

only for devices that support 3G/HSDPA


Go to this thread [HOWTO] Enable 2G/3G Toggle from Statusbar/Launcher
But don't follow the lidroid step, coz we have it already

or Without patching Phone.apk , but with editing Lidroid and Android.manifest
go here : http://forum.xda-developers.com/show...6&postcount=30




[Porting Guide][ICS] Mod 4.2 Statusbar tilesview (TABS, Slider, Flip Anim, Lidroid )
http://forum.xda-developers.com/show....php?t=2423398




Guide How to full screen Expanded Pulldown JB style
http://forum.xda-developers.com/show...7#post45130177
The Following 8 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ] Gift Adi Aisiteru Reborn Ad-Free
30th July 2013, 05:01 AM |#5  
Junior Member
Thanks Meter: 0
 
More
I think that should be done before step 2 because I have the error code in PhoneStatusBar.smali 0x7f0e0096 in step 1


Click image for larger version

Name:	uploadfromtaptalk1375153267381.jpg
Views:	990
Size:	54.6 KB
ID:	2152085


I made 2 previous steps then get the code received from <public type="id" name="adi_quickpanel" id="0x7fxxxxxx" /> instead PhoneStatusBar.smali then recompile and it's ok


Click image for larger version

Name:	uploadfromtaptalk1375153292741.jpg
Views:	888
Size:	16.4 KB
ID:	2152086


My device is Lenovo A390



Sorry for my bad English!

Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2
30th July 2013, 06:16 AM |#6  
Member
Flag Jaipur
Thanks Meter: 2
 
More
I get errors while recompiling the apk. Here's the full error http://pastebin.com/EKEVsGQh. I'm attaching my SystemUI and framework-res for reference. Please do not just mod it and give it to me, explain if you can so I can know what exactly is the problem
SystemUI.apk
framework-res.apk
30th July 2013, 07:24 AM |#7  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 5,046
 
More
try this @grvrulz
add the blue code, but don't add <-- adi_quickpanel
Code:
    const v13, 0x7f0e0042

    invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

    move-result-object v13

    check-cast v13, Landroid/widget/ScrollView;

    move-object/from16 v0, p0

    iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;

    blue lines below is basically a copy from above red lines

    const v13, 0x7f0e0042  <-- adi_quickpanel

    invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

    move-result-object v13

    check-cast v13, Lcom/lidroid/systemui/quickpanel/PowerWidget;

    move-object/from16 v0, p0

    iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
The Following 3 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ] Gift Adi Aisiteru Reborn Ad-Free
30th July 2013, 11:11 AM |#8  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 5,046
 
More
Quote:
Originally Posted by dafuqChicken

I think that should be done before step 2 because I have the error code in PhoneStatusBar.smali 0x7f0e0096 in step 1


Attachment 2152085


I made 2 previous steps then get the code received from <public type="id" name="adi_quickpanel" id="0x7fxxxxxx" /> instead PhoneStatusBar.smali then recompile and it's ok


Attachment 2152086


My device is Lenovo A390



Sorry for my bad English!

Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2

oke , how is the result now ?, is there any I can help
The Following 2 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ] Gift Adi Aisiteru Reborn Ad-Free
30th July 2013, 12:27 PM |#9  
x-dira's Avatar
Senior Member
Thanks Meter: 128
 
More
How to Port Lidroid Toggles to CM7
Thanks
30th July 2013, 12:40 PM |#10  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 5,046
 
More
Quote:
Originally Posted by x-dira

How to Port Lidroid Toggles to CM7
Thanks

I cannot experimenting on CM7 , coz we don't have CM7 roms on my device,.
but CM7 is Gingerbread, so I think it will be same guide like for Stok GB too
The Following 2 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ] Gift Adi Aisiteru Reborn Ad-Free
30th July 2013, 06:10 PM |#11  
Member
Flag Jaipur
Thanks Meter: 2
 
More
Still doesn't work
Quote:
Originally Posted by Adi Aisiteru Reborn

try this @grvrulz
add the blue code, but don't add <-- adi_quickpanel

Code:
    const v13, 0x7f0e0042

    invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

    move-result-object v13

    check-cast v13, Landroid/widget/ScrollView;

    move-object/from16 v0, p0

    iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;

    below is a copied from above

    const v13, 0x7f0e0042  <-- adi_quickpanel

    invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

    move-result-object v13

    check-cast v13, Lcom/lidroid/systemui/quickpanel/PowerWidget;

    move-object/from16 v0, p0

    iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

Thank you. I completed the whole guide with this, but the quickpanel doesn't show up. I tried rebooting a couple of times and placing the quickpanel widget at different points in the layout, but it still doesn't show up. I took a logcat with 'adb logcat -d > logcat2.txt' and I'm attaching it here for reference.
Attached Files
File Type: txt logcat2.txt - [Click for QR Code] (348.3 KB, 54 views)
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes