On latest LG OG there is MSL block on ##DIAG# ie ##3424#. On recent phones we are getting a "service code" prompt before we toggle anything. Once DIAG mode is achieved we can easily configure it.
To remove this block with simple command terminal. It may help to set "charge only" mode first and not the "MTP". We need to root it. Here is a link to root your phone
Be sure that LG drivers are installed- Download
Command:- 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
If u want to script this then use script manager from play store then using widgets add a shortcut to homescreen. On app, menu button>new script and write the below script.
before launching the script be sure to toggle the SU button in the appthen hit save.
and while making a shortcut you may have to try twice.
Dont unplug the phone if using script. If it doesnt toggle diag for some reasons try running it again
STOCK ENABLE
Code:
margin: 0px; padding: 6px; border: 1px inset; width: 640px; height: 98px; text-align: left; overflow: auto">#!/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:
margin: 0px; padding: 6px; border: 1px inset; width: 640px; height: 98px; text-align: left; overflow: auto">#!/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:
margin: 0px; padding: 6px; border: 1px inset; width: 640px; height: 242px; text-align: left; overflow: auto">#!/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
How to Toggle SU button?
Special Thanks to MIKEex.