qualcommrooted-devicedm

Serial port '/dev/diag' does not exist in my Galaxy phone


I have a rooted Galaxy SM-A52 Mobile phone (Android 14) based on Qualcomm Snapdragon chipset. I connect to my phone using adb and run the following command:

ls -l /dev/diag

But '/dev/diag' port does not exist. I need to connect to this port to get Qualcomm QXDM diag message. How I can enable '/dev/diag' port? How I can connect to it?


Solution

  • This is likely due to the fact that the /dev/diag device has disappeared over recent Android 10+ phone firmwares, due to the diagchar kernel module being disabled by default in AOSP Linux 5.14+ kernels. In this case, a folder named /dev/ffs-diag is present on the filesystem (it is used internally to the phone to have the USB gadget that is able to expose Diag over USB work), but /dev/diag is not.

    You can try to look at the source of my answer to find a workaround.