CM12S and adb device on Windows 7 - ONE Q&A, Help & Troubleshooting

My setup used to work
Windows 7
CM11S
MTP work just fine. Can browse OPO /sdcard from windows 7
adb device work just fine. I can run all adb commands without problem: devices, shell, push, pull, etc
Now that I have upgraded to CM12S
MTP still work. I can browse OPO /sdcard from windows 7
adb device does not work.
adb devices report nothing. No error, just nothing. As if the phone is not plugged into the computer [see attached screenshot].
But I already installed usb driver, both google's latest and koush's universal adb driver, and tried ADB Interface and ADB Composite Interface
Currently, phone is setup as follow
Setting -> Storage -> USB Computer Connection : MTP
Setting -> Developer Option -> Android Debugging : on
With Android Debugging on, adb device won't show my phone serial when USB Computer Connection is MTP or PTP
When USB Computer Connection is set to charge only, Android Debugging is disabled
With Android Debugging off, I can browse the whole /sdcard when USB Computer Connection is set to MTP
With Android Debugging off, I can browse only DCIM and Pictures from /sdcard when USB Computer Connection is set to PTP
Back in CM11S
When USB Computer Connection is set to MTP, and Android Debugging off, I can browse the whole /sdcard from PC
When USB Computer Connection has NOTHING selected (no MTP, no PTP), and Android Debugging is on, I can use adb.exe on command line: devices, shell, push, pull, etc all work just fine
On CM12S, one of these options MUST be selected in USB Computer Connection: MTP, PTP, Charge Only. This is changed from CM11S
Does anyone have any success with adb.exe on command line on Windows 7 and CM12S (stock kernel)?
If yes, what is your phone setup for adb.exe to work, and which usb driver you installed on your winodws 7?
Thanks!
EDIT: fastboot work just fine

When you're on CM12S you can't have MTP enabled if you want to use adb. Disable MTP temporarily and adb should work.
Transmitted via Bacon

timmaaa said:
When you're on CM12S you can't have MTP enabled if you want to use adb. Disable MTP temporarily and adb should work.
Transmitted via Bacon
Click to expand...
Click to collapse
timmaaa, this is what i could figure out
my only problem is: how do I disable MTP on CM12S?
On CM11S, I can
On CM12S, I must choose one of the options: MTP, PTP, Charge Only
If I am on MTP, and I press it again, the screen just grey out
and then I push back button to go back to main storage screen
and now I choose USB Computer Connection again, and MTP is still selected/enabled
Have you tried to do adb devices on windows on CM12S?
If you can, did you ever enable MTP or PTP?
Thanks

animefans said:
timmaaa, this is what i could figure out
my only problem is: how do I disable MTP on CM12S?
On CM11S, I can
On CM12S, I must choose one of the options: MTP, PTP, Charge Only
If I am on MTP, and I press it again, the screen just grey out
and then I push back button to go back to main storage screen
and now I choose USB Computer Connection again, and MTP is still selected/enabled
Have you tried to do adb devices on windows on CM12S?
If you can, did you ever enable MTP or PTP?
Thanks
Click to expand...
Click to collapse
Instead of pressing MTP again, select PTP.
Transmitted via Bacon

timmaaa said:
Instead of pressing MTP again, select PTP.
Transmitted via Bacon
Click to expand...
Click to collapse
I will try to reconfirm, but I believe I tried that already
regardless of MTP or PTP, adb devices does not find my phone
EDIT: yup, regardless of MTP or PTP, when adb debug is on in developer tools, adb device does not show serial number, so can't connect to phone via adb shell

Same exact problem here, adb worked fine until I turned on MTP now I can't turn it back off and thus adb not working.
No matter what I select or disable I always end up with MTP back on and no ADB working. Someone else who just got their OPO yesterday having same issue and what caused me to mess with MTP setting breaking my ability to ADB :/
Also another new behavior to me is that I cannot access "USB Computer Connection" screen unless I am plugged into PC. When not connected to PC it just rescans internal storage and go's nowhere.
Quick dirty screencast showing how MTP can't be turned off (sorry rushed and kid in background)
https://drive.google.com/file/d/0Bwwwt8cZbp9rYXRGa0Y1dFBfY1k/view?usp=sharing

Good to hear, in a way...
Good is that it's not just me
Bad is that this problem exist
BTW, created this problem in jira
https://jira.cyanogenmod.org/browse/BACON-3358
Hopefully this is a bug in the setting app where USB Computer Connection option is not required. Right now options are required
PS: and yes, I notice the same thing where USB Computer Connection is not even available until you plugged it into PC
PPS: I wonder what is the behavior of USB Computer Connection under OxygenOS and Stock Android (ie Nexus 5/6/etc). Having this data point can narrow down if issue is cyanogenmod OS specific issue, or it's a general Lollipop AOSP issue

is this can be problem why I couldn't install custom recovery?? I try install TWRP, device have unlocked bootloader

if running adb devices on your PC can not see the phone (ie phone serial), then yes you can't install TWRP this way
However, I believe there are other ways to install custom recovery onto your phone without PC
Try TWRP Manager on play store
I used this to update my TWRP recently in order to update to CM12S without going through OTA

Yeah I have the same issue as well and now i don't have Twerp or root . and i can confirm i never had the issue on my nexus 4 with stock LP and Dirty unicorns so it looks like a CM bug to me my phone feels incomplete without root

Solodude said:
Yeah I have the same issue as well and now i don't have Twerp or root . and i can confirm i never had the issue on my nexus 4 with stock LP and Dirty unicorns so it looks like a CM bug to me my phone feels incomplete without root
Click to expand...
Click to collapse
Thank you for the data Solodude!

Quick update on my current situation on this issue
http://forum.xda-developers.com/showpost.php?p=61975450&postcount=4

Related

can access phone in PTP but not MTP

hey guys
not really sure what the hell is wrong
i finished rooting an unlocking my pohne with WugFresh - and obviously doing the first driver steps means my drivers are functional.
when i connect my phone to my pc (win7) nothing comes up while its on MTP, first time i chose MTP it installed drivers but there is no popup window on my PC to choose an action, nor can i see the phones SD on my computer.
if i switch to camera mode (PTP) i instnatly get the Autoplay menu and can access two folders DCIM and Pictures.
i tried:
doing the initial installation (and uninstallation) of drivers in WUG a few times
turning MTP/PTP on off
turning usb debut on/off
plugging to another pc - WORKED INSTANTLY
so why wont my dumb PC be able to do this?
Caniv said:
hey guys
not really sure what the hell is wrong
i finished rooting an unlocking my pohne with WugFresh - and obviously doing the first driver steps means my drivers are functional.
when i connect my phone to my pc (win7) nothing comes up while its on MTP, first time i chose MTP it installed drivers but there is no popup window on my PC to choose an action, nor can i see the phones SD on my computer.
if i switch to camera mode (PTP) i instnatly get the Autoplay menu and can access two folders DCIM and Pictures.
help!
i also did the first steps in WUG like 10 times.
Click to expand...
Click to collapse
Buddy , check if USB debugging mode is active
Ajaykumar21066 said:
Buddy , check if USB debugging mode is active
Click to expand...
Click to collapse
sorry forgot to mention, its off, i even tried turning it on and off also MTP..
no dice.
Keep it on an then try , may one restart will help but keep debugging on
Try manually uninstalling the drivers from device manager and reboot both phone and computer. Connect in ptp then switch to mtp
-----------------------
Sent via tapatalk.
I do NOT reply to support queries over PM. Please keep support queries to the Q&A section, so that others may benefit
wow im not sure why but this did it:
connected to PC (AGAIN) with MTP and PTP and DEBUT off
turned on debug and removed driver from device manager
turned off debug
turned on MTP and removed driver
turned off MTP
turned on PTP and removed driver
turned off PTP
and then i activated to install drivers (and after install deactivated) in this order
PTP
MTP
DEBUG
now all is installed and working
no idea why.
ty!

adb devices just won't show anything

adb devices doesn't show anything. I have tried it with linux and windows (with Motorola drivers installed), it doesn't work. I can access the phone when I have enabled MTP, but it just won't show in adb. I have killed and started adb server so many times, it's frustrating.
The thing is, the first time (yesterday) it worked! I could reboot into fastboot with adb but then nothing worked anymore.
Any ideas?
Maybe silly question, but: is USB debugging activated on the phone? If yes, try to switch between MTP and Camera (PTP) under "USB computer connection" option. You should get the authorization prompt on your phone when everything is fine.
Yes, USB debugging is activated. I already tried both MTP, PTP, and neither, but I don't get any authorzation prompts. I revoked all previos prompts, but still nothing. Thanks for the suggestion though!
Are you on bootloader or recovery or normally on os
I tried all three.
Try playing with the USB cable - change it, change the USB slot on the PC that it's connected to, etc.
I only have one USB cable, but I already tried it on several USB slots.
It worked! I had to put sudo in front of my adb commands! Yay! :victory:

[Q] [CM11] Can't find my Moto G via USB, ADB, Fastboot

Hello there,
I'm running CM11 20141223 NIGHTLY on my XT1033, and everything is working fine so far, with the exeception of USB communication. I develop my stuff on my desktop, which is running W7. Consider the following scenarios:
1) If I plug it in MTP mode (debugging deactivated), it won't find. Windows tries to install a USB Composite Device driver and fails.
2) If I plug it in PTP mode (debugging still deactivated), Windows installs a Moto G driver and access the DCIM camera folder normally (that's what I've been using to "push" files into it, and then move it with file manager with temp su access).
3) In both MTP and PTP mode, but with debugging activated, Windows detects it as a USB Composite Device. On Device Manager it shows up with the yellow triangle warning icon, but I can't seem to update it (tried with the extra Android drivers that comes with ADT).
4) Neither adb nor fastboot can detect the device. Which is weird because on my notebook, running windows 8.1, I got the same situation but adb (only, fastboot still can't) can detect it.
5) I also installed Koush universal ADB Drivers on both machines.
Does anyone have some insight on the matter? Should I get rid of Koush?
I don't intend on upgrading to CM12 anytime soon. In fact, I did it some weeks ago, but I'm more confortable with CM11 so I rolled back to it.
Hoping it's okay to bump my thread after a month.
Does anyone know what to do in this situation?
Thanks!
jorge_quintanilha said:
Hello there,
I'm running CM11 20141223 NIGHTLY on my XT1033, and everything is working fine so far, with the exeception of USB communication. I develop my stuff on my desktop, which is running W7. Consider the following scenarios:
1) If I plug it in MTP mode (debugging deactivated), it won't find. Windows tries to install a USB Composite Device driver and fails.
2) If I plug it in PTP mode (debugging still deactivated), Windows installs a Moto G driver and access the DCIM camera folder normally (that's what I've been using to "push" files into it, and then move it with file manager with temp su access).
3) In both MTP and PTP mode, but with debugging activated, Windows detects it as a USB Composite Device. On Device Manager it shows up with the yellow triangle warning icon, but I can't seem to update it (tried with the extra Android drivers that comes with ADT).
4) Neither adb nor fastboot can detect the device. Which is weird because on my notebook, running windows 8.1, I got the same situation but adb (only, fastboot still can't) can detect it.
5) I also installed Koush universal ADB Drivers on both machines.
Does anyone have some insight on the matter? Should I get rid of Koush?
I don't intend on upgrading to CM12 anytime soon. In fact, I did it some weeks ago, but I'm more confortable with CM11 so I rolled back to it.
Click to expand...
Click to collapse
Have you tried Motorola's drivers? It installs separate drivers for adb, fastboot, mtp. https://motorola-global-portal.custhelp.com/app/answers/prod_detail/a_id/97326/p/30,6720,9050

[Q] CM 12 MTP missing

I updated to cm 12 by OTA a few days ago. Today I want to copy some files between my Oneplus and computer, only to find that I can't turn on MTP. I went to settings -> storage, top-left menu, and the only item in the menu is 'USB computer connection', but press it only seems to refresh the storage panel (all values of space gets re-calculated), but nothing else. Any suggestions?
mrmathematica said:
I updated to cm 12 by OTA a few days ago. Today I want to copy some files between my Oneplus and computer, only to find that I can't turn on MTP. I went to settings -> storage, top-left menu, and the only item in the menu is 'USB computer connection', but press it only seems to refresh the storage panel (all values of space gets re-calculated), but nothing else. Any suggestions?
Click to expand...
Click to collapse
similar to you, but my problem is i can't get adb device to recognize my OPO, also on CM12S
I know what you mean, as I seen it as well
But if you get out, make sure adb debugging is off, and go back to USB computer connection menu, you should see 3 items
MTP
PTP
Charge only
My issue is
MTP with no adb debugging will let me access full /sdcard on windows, but adb device command does not see OPO thru USB
PTP with no adb debugging will let me access only pictures on OPO, and adb device command does not see OPO thru USB
Charge only will block out adb debugging completely
MTP or PTP with adb debugging will not present OPO storage to windows, and at the same time adb device command does not see OPO thru USB
This same computer that have problem with my OPO CM12S was working fine with OPO CM11
Back in CM11, the only way for adb device to see my phone via USB is to NOT select MTP AND PTP
With CM12S, I must select one of the 3 options in USB computer connection menu: MTP, PTP, Charge only
In another word, CM11 the options are not required. In CM12S, one option must be active/selected
To make it more "interesting", fastboot work just fine. Only adb device doesn't work
I installed latest android SDK google USB driver already, both ADB interface and ADB composite interface
EDIT: and Koush's universal adb driver as well
I am really at my wits end now.
For those of you who has CM12S installed (stock kernel if matter), do you have adb device working (ie can see your CM12S OPO thru usb)? If yes, can you let me know which usb driver you installed?
Thanks!
Thanks for the reply. After turn ADB on and off, it seems I get MTP working too. Not sure about your case. Also I should mention previously on CM 11S, usb connection works fine with my Oneplus.
mrmathematica said:
Thanks for the reply. After turn ADB on and off, it seems I get MTP working too. Not sure about your case. Also I should mention previously on CM 11S, usb connection works fine with my Oneplus.
Click to expand...
Click to collapse
I have been meaning to come back and update this thread...
I went on to CM12.1 nightly after I got fed up with COS12S
CM12.1 nightly is very stable, despite the nightly naming, but this specific issue (no adb on PC) still exist
Eventually, I switched to Sultanxda's Omni ROM with his tuned CAF kernel http://forum.xda-developers.com/showpost.php?p=61801883&postcount=850
and I can now run adb on my PC, and connect to OPO
and I did not change anything on my PC
My opinion is that CM 12 made some changes that prevent adb from PC to connect to the phone.
Still, I am surprise that there are not a lot of people who report this issue on CM 12.x based ROM, so I have to make assumption that something is wrong on my end as well
Still, I am now sticking with this custom Omni build
Please be aware that Sultanxda is no longer maintaining is custom Omni build. You use it at whatever state it's on now
Compare to CM12.x based ROM, this custom Omni ROM is pretty bare.
Still, it suits my need
For those of you who is still having problem with adb on PC connecting to OPO, you should try a non CM based custom ROM and see how that might work for you
Hope this help
mrmathematica said:
I updated to cm 12 by OTA a few days ago. Today I want to copy some files between my Oneplus and computer, only to find that I can't turn on MTP. I went to settings -> storage, top-left menu, and the only item in the menu is 'USB computer connection', but press it only seems to refresh the storage panel (all values of space gets re-calculated), but nothing else. Any suggestions?
Click to expand...
Click to collapse
MTP only works when you enable ADB Debugging for 5.X ROMs.
Qrze said:
MTP only works when you enable ADB Debugging for 5.X ROMs.
Click to expand...
Click to collapse
Thats not true. I have adb debugging turned off and yet I can access my phone from my mac using MTP. Using BlissPop 5.1 on my bacon,1+

Question Phone can't recognize USB or ADB

Hello all,
My OnePlus 7 Pro, can't recognize USB through my Windows PC, I don't get the prompt to connect to my Win PC.
Also I enabled ADB with Developter Options. I go to fastboot and also after adb devices and fastboot devices command, he can't recognize my device.
My OnePlus 5T is working with ADB and normal USB Win PC, tried two cables and laptops.
I did an run Android 10, now 11, beta etc nothing works! The phone can charge etc.
Please help. Reset etc tried also.
it is known issue ADB don't work on USB 3.0 ports
just goto BIOS > Advanced > USB > XHCI and change the setting to Disabled.
This will make the ports run in USB 2 mode, and fastboot and ADB works as usual.
ineedroot69 said:
it is known issue ADB don't work on USB 3.0 ports
Click to expand...
Click to collapse
Can't confirm this. At least latest version of ADB works at me with USB 3.x ports.
Nvm I didn't read the thread well if the PC can detect the other phone on ADB perhaps you can try "revoking USB debugging authorization" so it would ask for permission again

Categories

Resources