26-03-2018, 01:38 PM
Some tools require you to enable Diag connection mode in order to fix null / invalid IMEI or flash QCN / EFS. This guide will explain how to enable Diagnostic Mode (Diag Mode) on an Android phone.
Requirements
- Enable USB Debugging on the phone
- Setup ADB on the PC
- Root the phone (you could use Magisk )
- Install Qualcomm USB drivers
- Install Qualcomm Diag QD Loader driver @ https://mega.nz/#!9PoDCQTS!ju0z93k2pS9uS...67DPkPVYaU
Steps to enable Diag Mode
Follow the steps below to enable Diagnostic mode (Diag) on an android device
See the video below or @ https://youtu.be/_bEWuzfO2AwConnect the phone to the PC (via a USB cable) while powered on. Launch and run the following commands in adb:
Code:
adb devices
adb shell
su
setprop sys.usb.config diag,adb
![[Image: How-to-enable-and-disable-Diag-Mode.jpg]](https://www.hovatek.com/blog/bpyeki/uploads/2018/03/How-to-enable-and-disable-Diag-Mode.jpg)
ADB command to boot into Qualcomm Android Diag Mode
Steps to disable Diag Mode
Follow the steps below to disable Diagnostic (diag) mode on an android device
Launch and run the following commands in adb:Code:
adb devices
adb shell
su
setprop sys.usb.config mtp,adb
on some devices like Sony Xperia, try
Code:
setprop sys.usb.configfs 1
setprop persist.sys.usb.config diag,serial_cdev,rmnet,adb
setprop sys.usb.config diag,serial_cdev,rmnet,adb
setprop sys.usb.ffs.ready 1
Important Notice
- Enabling Diag mode means you might be looking to make a modification to your device. Its recommended you backup your firmware before making any modification in case it gets bricked
- Upon your first attempt at gaining root shell access, your phone might prompt you whether or not to grant ADB root access so ensure to keep an eye on your phone (remove lock screen)
- Some phone might use USSD code to enable Diag mode without root access. e.g Infinix X623 uses ####8789# . You can search online for any such USSD code for your device model
- Some boxes / dongles have the boot into Diag Mode feature
Video Transcript
Quote:In this video tutorial, I'll be explaining how to enable and disable Diag mode or diagnostic mode on a Qualcomm Android device using ADB. Diag mode enables you perform advanced functions like writing or restoring qcn, it can also allow you to backup qcn. Writing IMEI etc. For you to enable diag mode, your phone needs to be rooted. We have a guide on how to root using magisk. You also need to have installed your Qualcomm USB drivers. We have a guide on how to do that also. You need to have setup ADB on the PC, we have a guide for that. You need to have the Qualcomm Android device and USB cord.
Now, once you have these in place, you launch device manager and then you leave the phone powered on once in device manager you connect the phone to the PC don't forget the phone should be powered on and take note of what it gets detected as. I have a detection under Portable Devices (Pi Pro). Now, to enable diag mode, you launch command prompt. This is how I'm going to launch command prompt and then you jump to the adb directory although for some devices / laptops you just hold down shift and then right-click and then select open command prompt but I have power shell here so I'm not going to go through that approach. I don't have command prompt here so I'm going to go through this method.
Now, I'm going to copy my adb address folder by right-clicking, selecting copy address then come here (to type) cd *space* right-click to paste the address I'm going to run that again... and then I press ENTER so now I'm in ADB directory so I'm going to run this command adb devices to be sure I have a connection so I've list of device detected. Now I run adb shell and then su . Now at this point, if you are doing it for the first time, you might get a prompt on your device to either allow ADB or to allow shell root access. Either ways, you grant okay. Now, you're going to run this command to boot into diag mode. I'll just copy it here; setprop sys.usb.config diag,adb alright then you tap enter so that is going to enable diag mode.
To confirm, you go back to device manager. Its going to refresh and then you should have an entry like this Qualcomm HS USB Android DIAG 901D so this is your device in diagnostic mode. Now to revert, that is to take the device out of diagnostic mode, you run the same commands if you're starting afresh but if you are where I am currently, you just paste the same command but instead of diag, you change to mtp. it's the same command / procedure. The only difference is mtp or diag. Since I'm in diag mode, I want to revert back to the previous setting which was mtp (just change diag to mtp) and tap Enter oh sorry, I have to run the commands afresh so adb devices adb shell su and then I paste the command but change to mtp and then enter so I check device manager again.
I'm good, I have my device detected under portable devices once again so that's how to enable or disable diag mode or diagnostic mode on a Qualcomm Android device using adb
Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.