Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,785,670 Members 44,651 Now Online
XDA Developers Android and Mobile Development Forum

[HOWTO] Enable 2G/3G Toggle from Statusbar/Launcher

Tip us?
 
vandieutot
Old
(Last edited by vandieutot; 24th July 2014 at 01:08 PM.)
#1  
vandieutot's Avatar
Senior Member - OP
Thanks Meter 488
Posts: 303
Join Date: Aug 2013
Location: Hà Nội

 
DONATE TO ME
Thumbs up [HOWTO] Enable 2G/3G Toggle from Statusbar/Launcher

* ARTICLES MADE IN MACHINE LG G3 ANDROID 4.4.2 MACHINE DO THE SAME AND FLEXIBLE THINKING.

Preparation:
computers
Preset apktool
You must know how to use apktool okay.
File LGPhone.apk and LGSystemUI.apk was taken in Rom deodex you want Mod okay.
Begin.
A. Working with files this most important LGPhone.apk okay.
1. Decompile LGPhone.apk out
2. Navigate to the path LGPhone / smali / com / android / phone
Find PhoneGlobals.smali open in Notepad + +
> Find the following keywords.

Code:
.field private final mMediaButtonReceiver:Landroid/content/BroadcastReceiver;
> Add the following line immediately below it.

Code:
.field private final mModeReceiver:Landroid/content/BroadcastReceiver;
> Find Next line after.

Code:
mReceiver:Landroid/content/BroadcastReceiver;
> Add the following line immediately below it.

Code:
.line 236
new-instance v0, Lcom/android/phone/NetworkModeReceiver;

invoke-direct {v0}, Lcom/android/phone/NetworkModeReceiver;-><init>()V

iput-object v0, p0, Lcom/android/phone/PhoneGlobals;->mModeReceiver:Landroid/content/BroadcastReceiver;
> Find next keyword.

Code:
registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
> Add the following line immediately below it.

Code:
.line 633
new-instance v0, Landroid/content/IntentFilter;

const-string v1, "com.android.phone.CHANGE_NETWORK_MODE"

invoke-direct {v0, v1}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

iget-object v1, p0, Lcom/android/phone/PhoneGlobals;->mModeReceiver:Landroid/content/BroadcastReceiver;

invoke-virtual {p0, v1, v0}, Lcom/android/phone/PhoneGlobals;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
> Save PhoneGlobals.smali

3. NetworkModeReceiver Download this file to extract and copy all the files in the path LGPhone smali / smali / com / android / phone
4. Recompile the LGPhone.
5. Fixing what replaces it back old LGPhone.apk file.

-------- 2G/3G toggle mod Guide --------- Choimobile

B. How on LGSystemUI.apk
1. Decompile LGSystemUI.apk out
2. Navigate to the path LGSystemUI/smali/com/lge/quicksettings/
> Open QuicksettingsItemList.smali using Notepad + +
> Find and fix all the 2GOnlyHandler EcoHandler
> Save QuicksettingsItemList.smali back
3. Find LGsystemUI/res/values-xx/
> Open strings.xml by Notepad + +
> Sp_quicksettings_eco_mode_NORMAL edit> Eco mode <a> The 2G <
> Save the strings.xml
4. Find LGSystemUI/res/values
> Open bools.xml using Notepad + +
> Find eco edit keywords >false< >true< save.
5. Download the file, unzip
> Copy smali in LGSystemUI/smali/com/lge/quicksettings/handlers
> Copy image to LGSystemUI/res/drawable-xxhdpi
6. Recompile the LGSystemUI
Replace the following items in LGSystemUI/build/apk file into the root LGSystemUI.apk
- 2 image file in res/drawable-xxhdpi on LGSystemUI.apk/res/drawable-xxhdpi
- Resources.arsc on LGSystemUI.apk
- Classes.dex into LGSystemUI.apk

C. Copy LGPhone.apk and LGSystemUI.apk have to edit the system/app and set 644 memory and delete files LGPhone.odex LGSystemUI.odex go. Reboot the machine and see the results.

Note: The tutorial is done on LG G3 Android 4.4.2 on another machine thinking you have flexibility with each release and each code.
Mod Guide Choimobile 2G/3G toggle.

-Thank: chuc by choimobile.vn/forums
- source: http://choimobile.vn/threads/huong-d...roid-lg.27391/
Technology Playground: http://vandieutot.com/
The Following 3 Users Say Thank You to vandieutot For This Useful Post: [ Click to Expand ]
 
pendroz
Old
#2  
pendroz's Avatar
Senior Member
Thanks Meter 4,069
Posts: 1,389
Join Date: Jun 2012
Location: Istanbul

 
DONATE TO ME
Great guide

Thanks

Device History

Galaxy S2 Galaxy S3

LG G2 ( D802 )

Project

S2 ( Turkbey Rom Team ) S3 ( Pardus HD RoM™ )

LG G2 Pardus HD RoM™
 
adulfo
Old
#3  
adulfo's Avatar
Senior Member
Thanks Meter 754
Posts: 1,125
Join Date: Apr 2012
Location: Pagadian City

 
DONATE TO ME
Seems not the same lines can be found on KK.

Also, LGPhone.apk is LGTeleService.apk on my ROM.

Also the lines on smali files are not totally the same.

Thanks for the guide though.
Press "Thanks" if I helped you and liked my work and consider donating to UNICEF...

Devices:

Xperia Ray - gone with the wind
Xperia SP - Screen broken, not bootable
LG G2 - recent
Tags
enable 2g/3g toggle, vandieutot, vdt -rom, vdt rom lg g2
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes