• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Enable diag mode without MSL?

cuisinart

Newbie
Jun 13, 2012
23
4
While searching around, I recently found these instructions on how to enable diag mode on a recent LG device (LS970) without having the MSL. This seems to partially work on the V4 rom for the Volt - a serial port comes up in device manager, but the Diag window does not show 'enable' via ##diag# after this is done. Can someone who still is using the V3 firmware test this to see if it works for them? This would be a step toward recovering the MSL as the usual avenues do not work (getprop ril.MSL, alogcat)

From:
http://forum.xda-developers.com/showthread.php?t=2049701

*NO PROMPT WHEN YOU HIT ##DIAG#? THIS INFO IS NOT FOR YOU (BUT STILL WORKS)*

*updated thread to add AOSP scripts*

On newer LS970's there is a MSL block on ##DIAG# mode. Normally you can hit ##DIAG# and flip the toggle. On recent phones you are given a "Service Code" prompt before we can toggle anything. Once DIAG mode is achieved we can connect the phone to a Windows computer to write a PRL or flash our phones to other carriers or read our MSL. See the tutorial here for how-to on that. The tutorial I have linked assumes your Optimus G does not have this MSL block... so replace step 2 with the information in this thread. That sums up this entire thread.. this thread is another way for step 2 in that tutorial.

You can get around this block with a simple command in terminal. (You must have root!) It may help to set "charge only" mode first and not MTP. Be sure to have the LG drivers installed before doing any of this.


su
echo 1 > /sys/devices/platform/lg_diag_cmd/diag_enable


If your phone was plugged into the computer already.. unplug it and plug it back in. You will now be in DIAG mode.
Your Windows Device Manager should look like this...

EQ7zc.png


fiGIl.png
0PsSz.png


If you wanted to script this, I suggest script manager from the play store then using the widgets to add a shortcut to the homescreen. Open app, menu button > new script and write the script from below. Before launching the script.. be sure to toggle the SU button in the app, then hit save. And when making a shortcut you may have to try twice. You'll see what I mean when you get there. You do not have to unplug your phone if using the script. If it does not toggle diag for some reason, try running it again. I've never had to try more than twice.

8wrBF.png


STOCK ENABLE
Code:
Code:
#!/system/bin/sh

echo 0 > /sys/class/android_usb/android0/enable
echo 1 > /sys/devices/platform/lg_diag_cmd/diag_enable
echo 1 > /sys/class/android_usb/android0/enable
STOCK DISABLE
Code:
Code:
#!/system/bin/sh

echo 0 > /sys/class/android_usb/android0/enable
echo 0 > /sys/devices/platform/lg_diag_cmd/diag_enable
echo 1 > /sys/class/android_usb/android0/enable
AOSP ENABLE
Code:
Code:
#!/system/bin/sh

stop adbd
echo 0 > /sys/class/android_usb/android0/enable
echo 1004 > /sys/class/android_usb/android0/idVendor
echo 631B > /sys/class/android_usb/android0/idProduct
echo 239 > /sys/class/android_usb/android0/bDeviceClass
echo 2 > /sys/class/android_usb/android0/bDeviceSubClass
echo 1 > /sys/class/android_usb/android0/bDeviceProtocol
echo tty > /sys/class/android_usb/android0/f_acm/acm_transports
echo diag,diag_mdm > /sys/class/android_usb/android0/f_diag/clients
echo acm,diag,mtp,adb > /sys/class/android_usb/android0/functions
echo 1 > /sys/class/android_usb/android0/enable
start adbd


Thanks to MikeEx and everyone else in IRC that helped me look at files and test my script. I did not have my MSL and was unable to toggle anything.. making the script blind.. and eventually found something much easier than what I was previously trying.
 
If i were to buy the msl code from ebay, would i have had to activate my phone at one point, or can i still get the msl without having activated it. (I'm trying to get my lg volt to work with pageplus)
without activating , when you ##DIAG# it asks SPC/MSL so it for that
MSL/SPC is also used to flash other carriers , thats another point but you don't require the device to be activated on any carrier to use SPC/MSL
 
Upvote 0
without activating , when you ##DIAG# it asks SPC/MSL so it for that
MSL/SPC is also used to flash other carriers , thats another point but you don't require the device to be activated on any carrier to use SPC/MSL
Actually, more than anything else, your MSL (master subsidy lock number) is to a carrier what your VIN number is on a car to Detroit.

It takes far, far more to move from carrier to carrier than an MSL change. ;)

The MSL number certainly is the key to unlocking service menus.
 
Upvote 0
koduku, you are correct, that's what I get as well, it doesn't fully work. I was hoping that this info would spur an idea from someone whom then could solve the method for us. For example, perhaps disassembling/decompiling the dialer app would let us know how it now enables diag mode, and then we could manually do it with a method similar to that described here..
 
Upvote 0
koduku, you are correct, that's what I get as well, it doesn't fully work. I was hoping that this info would spur an idea from someone whom then could solve the method for us. For example, perhaps disassembling/decompiling the dialer app would let us know how it now enables diag mode, and then we could manually do it with a method similar to that described here..
went and bought SPC from eaby.com so issue resolved
yes but the method of enabling diag without spc doesn't work on Volt
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones