Question Diag port for QPST not working - Motorola Edge 20 Pro

Can someone please help enable diagnostic port for a rooted XT2153-1 Android 12? The command setprop sys.usb.config diag,diag_mdm,adb does do anything and QPST(or Device Manager) is not able to detect the port.

WTBmoto said:
Can someone please help enable diagnostic port for a rooted XT2153-1 Android 12? The command setprop sys.usb.config diag,diag_mdm,adb does do anything and QPST(or Device Manager) is not able to detect the port.
Click to expand...
Click to collapse
Try:
Code:
$ adb shell "su -c 'setprop sys.usb.config diag,serial_cdev,rmnet,dpl,qdss,adb'"
This code works on the Motorola Edge 40 Pro (XT-2301-4) to open USB DIAG port for QPST. You may still need Qualcomm drivers to access EFS, etc.

Related

[GUIDE] ADB For Beginners (Setup, Use, and More!)

Hello All!
After much frustration with setting up ADB i finally got it working. Everyone said its simple and takes minimal knowledge but when things dont work, nothing really worked. Anyways after 2 hours of research trying to get ADB to work i finally got it all working and wanted to share my knowledge to anyone else that needed help.
This Guide is for windows only. If you are using Mac OS X please go here: ADB For Dummies
If you are using Linux please go here: [HOW-TO]Set up Android SDK/ADB/Fastboot on Ubuntu Linux
Like My Guide(s)? Donate
--------------------------------------------------------------------------
Things you need:
Android SDK - Download
Winrar - Download (32bit) Download (64bit)
Windows PC
USB Cable
A Rooted HTC Dream (Google G1)
--------------------------------------------------------------------------
Setting up the Android SDK
Download the file from above
Unzip to your desktop
Take the "android-sdk-windows" folder and move it to the root of your hard drive (C:\)
Right click on My Computer and click properties
Select the Advanced Tab or Advanced System Setting (Vista/Windows 7)
Select Environment Variables...
Press New
For Variable Name type: adb
For Variable Value type: C:\android-sdk-windows\tools
Now, [Get new sdk (1.5r3) to work]
1. Run SDK Setup.exe
2. If it gives you an error go to settings and click on "Force http//....."
3. Select all options and let it download and install
If you cant get the setup to work, Download the USB-DRIVERS folder - HERE (Windows XP/Vista/Windows 7)
--------------------------------------------------------------------------
Preparing your phone for ADB
Go to Settings on your phone
Select Applications
Select Development
Make sure 'USB Debugging' is checked
--------------------------------------------------------------------------
Installing Drivers
Plug in your phone through USB and DO NOT MOUNT IT!!!!!
Your computer should see a new device and try to install Android 1.0 driver (If it doesnt, scroll down to the "Im not getting a notification of Android ADB when i plug in my USB" section)
Let it load
Once it cant find them select "Install drivers from my pc"
The drivers you need are in the Android SDK 1.5r2 folder (C:\android-sdk-windows\usb_driver)
Depending on your OS pick x86 or amd64
You ADB Android Device should now be installed! Good Job
For Android SDK 1.5r3+
1. Run SDK Setup.exe
2. If it gives you an error go to settings and click on "Force http//....."
3. Select all options and let it download and install
If you cant get the setup to work, Download the USB-DRIVERS folder - HERE (Windows XP/Vista/Windows 7)
--------------------------------------------------------------------------
Check if your phone is detected by ADB
Open up Command Prompt (Go to run, type in cmd, press enter)
Type in
Code:
cd C:\android-sdk-windows\tools === Press Enter
adb devices === You should see your device listed
adb shell === you should see # in the next line
Now you are all set to run adb commands
Note: for a list of commands type in 'adb' in cmd
CONGRATS YOU NOW HAVE ADB FULLY RUNNING!
--------------------------------------------------------------------------
Droid Explorer by Camalot
Droid Explorer is a Windows software that will download, install, and setup the android SDK for you all in under a minute so you are ready to go. I use this on a daily basis. This amazing piece of software has tons of plugins and a built in file explorer for all your files on your phone! All you gotta do is download, install, and go!
Download Droid Explorer - Here
Install the program, and let it setup the SDK files for you
Connect your phone
Enjoy!
--------------------------------------------------------------------------
"Im not getting a notification of Android ADB when i plug in my USB"
Why: Your computer has detected your phone but as a protable device and as a storage device.
Fix: This took me a lot of research and time to figure out so this is what your are going to do.
First download USBDeview - Here
Unzip it
Run USBDeview.exe as Administrator
You will see all drivers being used on your computer
Highlight and Uninstall all drivers with the description have HTC Android (Should be 3 of them)
Right Click on the driver and press uninstall
Once done, Unplug your phone and plug it back in
You should now get the notification of the ADB device
Follow the steps above to install the drivers
--------------------------------------------------------------------------
When Typing just adb in cmd you will get whats called a "usage doc" which gives you a lits of commands that you can use:
Code:
-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <serial number> - directs command to the USB device or emulator w
ith
the given serial number
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> <local> - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] <file> - push this package file to the device and instal
l it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb root - restarts adb with root permissions
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PDP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be u
pdated.
- If it is "system" or "data", only the corresponding partition
is updated.
--------------------------------------------------------------------------
Commands that you should know
adb push - Insert file to phone such as Stock.apk to /data/app_s
Code:
adb push <pathtofile.apk> <file system location> - Example: adb push c:\app.apk /data/app
adb pull - Remove file from phone such as Stock.apk from /data/app_s
Code:
adb pull <pathtofile.apk> - Example: adb pull /data/app_s/Stock.apk
adb install - Install app to phone
Code:
adb install <path to file> - Example: adb install c:/apps/apps2sd.apk
adb uninstall - Uninstall app from phone
Code:
adb uninstall <name of application> - Example: adb uninstall linda.apk
For more ADB Commands go - Here
--------------------------------------------------------------------------
Thats it for ADB! Congrats and if you have any questions please ask me or if anything is missing or not correct please tell me. I got all of this from research and personal experience.
-------bump------
Good guide, pretty simple... Ill bookmark this, so I can send people that needs help here.
i have attached a zip that has the files i use to get basic use like for doing root to stock to upgrading 2.1-2.2 and other small things.
extract to C:\fastboot
in C:\fastboot you will find a "cmd" batch file. just run it and it should be ready for you to type in adb commands or fastboot. just make sure your in debug mode by doing all in the first post for installing drivers and all that.
U seriously bumped this thread? Lmfao
help?
i was trying adb and i got!
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
K:\>adb devices
List of devices attached
HT07YHL02294 offline
HT07YHL02294 device
K:\>adb remount
error: more than one device and emulator
Click to expand...
Click to collapse
ADB
i have this message Permission Denied what should i do?
thank you D200P13 soo much. i got it working thanks to your files
X10 adb issues
Can't get it to work for my X10.
ADB does not see my X10 when connected, have tried all mentioned above several times, no luck.
USB drivers seem not to install.
Do i need something special for my X10 to connect via ADB ?
p2dewit said:
Can't get it to work for my X10.
ADB does not see my X10 when connected, have tried all mentioned above several times, no luck.
USB drivers seem not to install.
Do i need something special for my X10 to connect via ADB ?
Click to expand...
Click to collapse
Turn telephone i debug mode.
when i type adb it says that it's an unrecognized command.
That's because you haven't navigated to the folder where the adb file is located...
Sent from my Nexus One using XDA App
danger-rat said:
That's because you haven't navigated to the folder where the adb file is located...
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Isn't it in the android-sdk-windows folder?
EDIT
nvm found it. it's in another folder....thanks
when i run adb shell, it doesn't give me a # it gives me $. what do i do?
What are you trying to do?
Sent from my Nexus One using XDA App
Trying to flash a rom on my phone (x10) and was making sure adb is working properly before i do anything. When flashing the new rom there's some bugs that require adb to fix. From my understanding "$" means i don't have su access. Thanks for the help btw. Sorry for bothering you. Just taking proper precautions.
EDIT
Sorry again. Found my answer. I forgot to unlock my device to accept superuser permissions. Thanks for your help
to check ur phone is detected by adb....
i type "adb shell" in cmd,and according 2 u i should show #.....but it shows $ to me......why?
To check connection, type "adb devices"
"adb shell" will allow you to work remotely on your device. If the $ doesn't change to #, then you don't have root access.
Sent from my Nexus One using XDA App
If your just trying to set up adb to riot your device, I put this together to make things much easier...
http://www.nexusoneforum.net/forum/...mple-sdk-setup-manual-root-guide-windows.html
Sent from my Nexus One using XDA App
Where is the Mac Specific version. Everything you posted is for windows mate!

GUIDE: connect OP3 with MTP on Linux (ubuntu)

I got my OP3 today and my laptop, running ElementaryOS (ubuntu based) didn't recognize the OP3 as MTP,
Here is a guide how to fix this, I based this guide on this guide for the OP2.
steps:
Do NOT connect your OP3 to your pc
run the command "lsusb" from your terminal
Connect your OP3 to your pc with original cable
run the command "lsusb" again
You will see a new device, my OP3 is called " Bus 001 Device 012: ID 05c6:900e Qualcomm, Inc. "
You see that it has an ID, in my case "05c6:900e".
the first value is the vendor-id, the second the product-id, you need those so write them down!
so in my case it's :
vendor id: 05c6
product id: 900e
Install the MTP drivers: "sudo apt-get install libmtp-dev mtpfs"
edit the following file with the command: "sudo gedit /lib/udev/rules.d/69-libmtp.rules"
if you don't have gedit installed use the command: "sudo nano /lib/udev/rules.d/69-libmtp.rules"
Add the following line to the file:
Code:
ATTR{idVendor}=="[COLOR="Blue"]vendor-id[/COLOR]", ATTR{idProduct}=="[COLOR="blue"]product-id[/COLOR]", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
make sure you change the blue values to your own values found in the step above.
safe the file
restart the service: "sudo service udev restart"
If you did it correct you will see a popup on your OP3, select "File Transfers (MTP)", select that and now you can transfer files between your OP3 and linux
I don't know if the vendor-id and/or product-id are always the same, if some people can confirm that then I will edit the post.
Hey, I got the same vendor id and product id as you did.
However, even after following the procedure step-by-step, I am unable to transfer files between my OP3 and my laptop running Ubuntu 12.04 LTS.
The OnePlus drivers folder gets loaded as a CD(though I'm connecting the phone using USB) when I change the "Use USB for" setting to "File Transfer(MTP)," and the file named "adb_config_Linux_OSX.sh" doesn't do anything when run in terminal either.
Could you help me out with this?
I run Ubuntu 16.04 and needed to install any drivers. simply connect op and I was able to access it.
Sent from my ONEPLUS A3003 using XDA-Developers mobile app
krankyvampire25 said:
Hey, I got the same vendor id and product id as you did.
However, even after following the procedure step-by-step, I am unable to transfer files between my OP3 and my laptop running Ubuntu 12.04 LTS.
The OnePlus drivers folder gets loaded as a CD(though I'm connecting the phone using USB) when I change the "Use USB for" setting to "File Transfer(MTP)," and the file named "adb_config_Linux_OSX.sh" doesn't do anything when run in terminal either.
Could you help me out with this?
Click to expand...
Click to collapse
update: In "设置" -"其他设置" - "内部设备和USB" - "USB计算机连接", select -- "File Transfers (MTP)", everything is ok.
14.04 can't transfer file. a folder cant write anything(not cd image folder).
hi....... i have a other problem with the same OS (Ubuntu 16.04)
MTP works
fastboot works
ADB DON'T !!!
do you know why ?????
ADB and fastboot are working at the same device with Win 10
OK, thanks, forget it, i found a file named "adb_config_Linux_OSX.sh" on the phone and run it...... now it works
ty, it worked after two reboots and a system update. btw, i have the OP3 soft gold with ID 2a70:f003
cheers!
washichi said:
I got my OP3 today and my laptop, running ElementaryOS (ubuntu based) didn't recognize the OP3 as MTP,
Here is a guide how to fix this, I based this guide on this guide for the OP2.
steps:
Do NOT connect your OP3 to your pc
run the command "lsusb" from your terminal
Connect your OP3 to your pc with original cable
run the command "lsusb" again
You will see a new device, my OP3 is called " Bus 001 Device 012: ID 05c6:900e Qualcomm, Inc. "
You see that it has an ID, in my case "05c6:900e".
the first value is the vendor-id, the second the product-id, you need those so write them down!
so in my case it's :
vendor id: 05c6
product id: 900e
Install the MTP drivers: "sudo apt-get install libmtp-dev mtpfs"
edit the following file with the command: "sudo gedit /lib/udev/rules.d/69-libmtp.rules"
if you don't have gedit installed use the command: "sudo nano /lib/udev/rules.d/69-libmtp.rules"
Add the following line to the file:
Code:
ATTR{idVendor}=="[COLOR="Blue"]vendor-id[/COLOR]", ATTR{idProduct}=="[COLOR="blue"]product-id[/COLOR]", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
make sure you change the blue values to your own values found in the step above.
safe the file
restart the service: "sudo service udev restart"
If you did it correct you will see a popup on your OP3, select "File Transfers (MTP)", select that and now you can transfer files between your OP3 and linux
I don't know if the vendor-id and/or product-id are always the same, if some people can confirm that then I will edit the post.
Click to expand...
Click to collapse
I just now happened upon this forum because my OP3 wasn't connecting for file transfers over USB. This worked like a charm for me; the vendor and product IDs were different (as I'm sure others have commented already), thank you for putting this out there, I definitely hit that 'thanks' button!!!!!!!
It's also possible to use this script (Vendor & Product id can differ).
Code:
#!/bin/sh
# adb configuration script
PATH=$PATH:/bin:/sbin:/usr/sbin
ANDROID_HOME=~/.android
ANDROID_CONFIG=~/.android/adb_usb.ini
CUST_VID="0x2a70"
if [ -e $ANDROID_HOME ] ; then
echo "android home is exist!"
else
echo "creat android home!"
mkdir $ANDROID_HOME
fi
grep $CUST_VID $ANDROID_CONFIG 2>/dev/null
if [ $? -eq 0 ] ; then
echo VID $CUST_VID is already configured..
echo "adb should be OK!"
exit 0
else
echo config adb ...
echo $CUST_VID >> $ANDROID_CONFIG
fi
adb kill-server
if [ $? -eq 0 ] ; then
echo "OK! You can use adb now!"
exit 0
else
echo "try sudo exec adb.."
sudo adb kill-server
if [ $? -eq 0 ] ; then
echo "OK! You can use adb now!"
exit 0
else
echo "Please do command \"adb kill-server\""
fi
fi
exit 0
Useful link: https://wiki.archlinux.org/index.php/android#Android_Debug_Bridge_.28ADB.29
Thanks a lot washichi It worked liked a charm on my OnePlus3T. Thanks a ton

[Pixel5][DIAG port] How to open DIAG port on Pixel5 to connect to QXDM/QPST

Hello all, I read through some old Pixel forums on how this was achieved on older Pixels. This is what I have tried so far, but all in vain.
Pixel5 (Build: RD1A.200810.022.A4)
1. I have unlocked Pixel5 (USA) bought directly from Google. I extracted boot.img and patched with Magisk to gain root access. Once rooted, I tried "setprop sys.usb.config diag,usb" but didn't see any impact on ports.
2. Found out that I will need userdebug vendor.img from https://developers.google.com/android/drivers for my build. I extracted it and flashed it "adb reboot fastboot" & "fastboot flash vendor vendor.img". Once did this, the phone gets stuck in bootloop.
3. I used factory images from https://developers.google.com/android/images for the above build and did "flash_all.bat". Phone came up fine with stock image and lost root access. Tried to flash the same vendor.img in fastbootd mode, and again got bricked. "your device is corrupted and cannot be trusted" and stuck in bootloop.
4. Restored the device again with factory image "flash_all.bat".
I need to access the QPST/QXDM ports on this phone. I have found most my answers on xda forums and was wondering if someone ran into these issues with Pixel5.
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) once it starts to "hang" at failed to open diag socket
change usb config (file transfer, no file transfer)
wait
open qpst
Worked like a charm. Thank you @Obeid Allah
Obeid Allah said:
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) once it starts to "hang" at failed to open diag socket
change usb config (file transfer, no file transfer)
wait
open qpst
Click to expand...
Click to collapse
@Obeid Allah How do I revert my phone back to the original state it was in before issuing the adb shell commands?
I figured it out and it worked
Obeid Allah said:
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) once it starts to "hang" at failed to open diag socket
change usb config (file transfer, no file transfer)
wait
open qpst
Click to expand...
Click to collapse
I typed adb shell but nothing appears
encryptttt said:
I typed adb shell but nothing appears
Click to expand...
Click to collapse
You need to open cmd in the same directory as the adb tools folder.
You can download adb tools here: https://developer.android.com/studio/releases/platform-tools.
Check regularly to make sure your adb tools are up to date.
Obeid Allah said:
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) once it starts to "hang" at failed to open diag socket
change usb config (file transfer, no file transfer)
wait
open qpst
Click to expand...
Click to collapse
MOD TRANSLATION
"brother my dear pixel 5 diag port is not enabled plz help"
***********************************************
bhai jan mera be pixel 5 ka diag port enable nhi ho raha plzz help
Waqasdurrani, Greetings, and welcome to XDA. As a friendly reminder, we ask all members to please post in English as stipulated by Forum Rule 4 (quoted below) -- that you just agreed to when you first registered your account; feel free to include your original message under the English message if you wish. If you do not know English, I encourage you to use any of the resources in the quote below. Your post has been translated as a one-time courtesy.
Thank you for your cooperation, and have a good one!
simplepinoi177 FSM (Forum Specific Moderator)
XDA Developers Forum Rules said:
4. Use the English language.
We understand that with all the different nationalities, not everyone speaks English well, but please try. If you're really unable to post in English, use an online translator. You're free to include your original message in your own language, below the English translation. (This rule covers your posts, profile entries and signature). You could try :- https://translate.google.com/ , https://www.babelfish.com/ or https://fanyi.baidu.com/#auto/en or use one of your choice.
Click to expand...
Click to collapse

Question ccswe app manager (device owner)

i need the command to set device owner on ccswe app manager using wireless adb
adb shell dpm set-device-owner com.ccswe.appmanager.deviceowner/com.ccswe.appmanager.receivers.DeviceAdminReceiver ...dont i need to remove adb shell at the beginning of this command for it to work with wireless adb in android 11?

Question What should I do after created install session with adb

Thank you
Snowcone12 said:
What should I do after created install session with adb​Thank you
Click to expand...
Click to collapse
You didn't provide all that much information to go on, but a LOT of times adb loses the connection you just have to restart it properly.
If you're connected via USB or Wi-Fi, then "kill-server" can help get you back to square one.
Here's a sample session that I often do when my adb loses the connection.
Code:
1. With the phone _not_ connected over USB but only over Wi-Fi to your LAN.
2. On the PC, kill the adb server (to get to a known good starting point).
C:\> adb kill-server
3. On the phone, wipe out existing credentials (for a good start point).
Android 12 Developer options > Revoke USB debugging authorizations
4. C:\> adb tcpip 5555
error: no devices/emulators found
5. C:\> adb connect 192.168.0.2:5555
failed to authenticate to 192.168.0.2:5555
But, after about 30 seconds, this pops up a query
"Allow USB debugging?" on your phone, and
(o)Always allow from this computer
6. C:\> adb tcpip 5555
restarting in TCP mode port: 5555
7. C:\> adb devices
List of devices attached
192.168.0.2:5555 device
Note that if you're using Wi-Fi exclusively (no USB cable) then you have to make sure "wireless debugging" is turned on.
This is what I tried
Do you think disabling the package verifyiner will work around that error message of "INSTALL_FAILED_REJECTED_BY_BUILDTYPE"?
Code:
$ adb shell settings put global verifier_verify_adb_installs 0
$ adb shell settings put global package_verifier_enable 0
Other than that, it's all I can think of to help you.
Maybe others can pitch in to help you as that's been my experience.

Categories

Resources