Enable Qualcomm Diagnostic Mode on various UEs
This guide assumes you are already familiar with QPST/EFS Explorer, the process of unlocking your bootloader, magisk, adb shell, and how to install drivers (you may have to manually force install if your PID/VID is missing from the .inf).
Download drivers from here
You can find a mirror of QPST from here
Qualcomm Smartphone for Snapdragon Insiders
In adb shell:
$ su
$ setprop sys.usb.config diag,serial_cdev,rmnet,dpl,qdss,adb
then launch qpst
Samsung (Qualcomm)
Tested with: N20U, S21U, Fold3, Flip3, S22+, S22U
In the dialer app:
dial *#0808#
select DM+MODEM
then launch qpst
Moto Edge+ (2023)
In adb shell:
$ su
$ setprop sys.usb.config diag,serial_cdev,rmnet,dpl,qdss,adb
then launch qpst
OnePlus
Tested with OP7TP5GMCL, OPN, OP8, OP8UW, OP8P, OP9, OP9P
In the dialer app:
dial *#8011#
then launch qpst
Sony Xperia
Tested with: 1 III
In adb shell:
$ su
$ setprop persist.usb.eng 1
then launch qpst
Sony Xperia
Tested with: 1 IV
In adb shell, preferred method:
$ su
$ setprop sys.usb.ffs.ready 1
$ setprop vendor.usb.use_ffs_mtp 0
switch USB mode to "file transfer"
$ setprop sys.usb.config diag,diag_mdm,adb
then launch qpst
or, alternative method:
$ su
$ setprop vendor.usb.diag.func.name diag
$ setprop vendor.usb.use_gadget_hal 0
$ setprop sys.usb.config diag,diag_mdm,adb
then launch qpst
Sonim
Tested with: XP5800, XP5900
In the dialer app:
dial *#*#0701#*#*
then launch qpst
Google Pixel
Tested with: Pixel 5
In adb shell:
$ su
$ resetprop ro.bootmode usbradio
$ resetprop ro.build.type userdebug
$ setprop sys.usb.config diag,diag_mdm,adb
$ diag_mdlog
cancel (ctrl+c) the process once it starts to "hang" at failed to open diag socket
change usb config (file transfer, no file transfer)
wait
then launch qpst
Bonus: enable NSG on Pixel by doing the following:
Install the “MagiskHide Props Config” from the Magisk repo then reboot. An older version of Magisk <v23 is required, since this module has Magisk Hide as a prerequisite.
In adb shell:
$ su
$ props
Choose "Add/edit custom props"
Choose "new custom prop"
Type in ro.vendor.build.type then press enter
Type in userdebug then press enter
Enter "Y" to select the default boot state
Reboot