[Q] ADB while phone is turned off - Nexus 5 Q&A, Help & Troubleshooting

Hi,
I just flashed a 5.0.1 custom build (I used the "eng" variant), and I was surprised to see that if I plug a USB cable connected to my PC into the phone while it is turned off I see enumeration and I can connect to the phone (presumably OFF) via adb.
it is important to mention that while in adb the screen is off and I can only see the charging icon.
the task list is somewhat limited compared to an active phone but still it is alive.
attached is the output of "ps" and "getprop"
does anyone know why the phone is alive while it need to be turned off?
can it transmit information? record information?
Thanks

Related

How to accept adb connection w/ broken touch (display works) - USB debugging enabled

Hi,
I hope this is not a cross-post; I've read a few other guides and suggestions on this forum already but my problem seems to be the opposite of what many people have.
I've got an Xperia Z5 Compact (not rooted) with a chipped screen. Touch does not work at all, but the display works fine.
I plugged in a mouse via OTG adapter and enabled USB debugging, then plugged it into my PC to attempt connecting with ADB. However, once I plug in a new device the phone wants me to confirm to "allow" the connection coming from my PC. But since my mouse is no longer plugged in, I can't accept the popup.
I tried to connect with AirDroid as well to try to accept the popup via screen share, but in order to allow WiFi screen sharing, it needs root (or an adb connection).....which makes the problem kind of circular.
Any suggestions or tips (or resources I might have overlooked?)
Thanks,
Rafael

Activate Debug usb with broken screen ? and adb connection without first connexion ?

Hi everyone,
Yesterday I broke my Galaxy S7 screen in the building's stairs while leaving home.
I want to save all the stuff I have on it, but recently I installed a new stock rom and forgot to tick in the developer menu "usb debug".
I tried an adb connection but the phone is unauthorized...
I read on some french board that I could flash a special kernel (with debug usb ON) to be able to get an adb connection. but that I will be blocked because I never accept any adb connection while having my screen working....
Is there any solution ?
I need help to hopefully resolve my issue.
Have a nice end of day.
You can connect an USB keyboard/mouse. Maybe an USB-hub works too so you can connect a PC and keyboard at the same time.
I was able to unlock my screen but I can’t access to my storage because I have to enable the sharing storage...
It seems there is no solution.

Unable to connect to PC in any mode

Hi all, I'm afraid I already know the answer to my question but I'll still ask if there's even a slight chance to get this fixed on my own.
I had this issue on Android 8.1 where my Pixel kept saying "Supplying power to connected device via USB" even without anything connected to it, (it started doing that one day without any reason) tapping the notification allowed me to switch to "Charge this device" and then turn on MTP mode, battery life was terrible but I wasn't that much bothered by it because I am an Android developer so I kept it connected in USB Debugging mode most of the time anyway.
When I got the notification for Android 9 update I decided to update hoping it'd fix the USB issue but after the update it now always says "Charging connected device" and tapping the notification does bring up the "USB Preference" screen and it allows me to switch to "USB Controlled by this device" and it starts charging but there's no way to switch "Charge only" mode to anything else, ADB does not see it, fastboot does not see it and there's no persistent notification on the phone about it being connected via USB at this point (in any mode). My understanding is that this is a hardware issue but Oreo still allowed me to workaround this and get the USB debugging connected.
Is there anyway I can get back to Oreo without using fastboot flash or any other solution to this?
Thanks for reading.
PS. I'm on Ubuntu but I can access a Windows machine if required and bootloader is already unlocked.
I'm curious if you're able to connect to a USB OTG storage device.
I'm having this issue connecting it to my windows 10 laptop.. the cable recognizes it.. starts charging.. shows option on phone to change type of connection.. but not matter which one i change it too, the computer will not pull lit up as a drive to see the files..
Jaws4God said:
I'm having this issue connecting it to my windows 10 laptop.. the cable recognizes it.. starts charging.. shows option on phone to change type of connection.. but not matter which one i change it too, the computer will not pull lit up as a drive to see the files..
Click to expand...
Click to collapse
Same here! I plug the cable into the Windows 10 computer, I even can change the mode from charging to MTP file transfer, but the device won't show up in the Windows Explorer. It appears under connected devices though.
My Pixel 2 XL would not connect to PC for file browsing if USB debugging of Android Apps was enabled in developer settings. Didn't matter which option I chose to connect. IDK if that is expected or not, but it took me a while to figure out. Happened Spring 2018, idk if Google fixed it.
pyro226 said:
My Pixel 2 XL would not connect to PC for file browsing if USB debugging of Android Apps was enabled in developer settings. Didn't matter which option I chose to connect. IDK if that is expected or not, but it took me a while to figure out. Happened Spring 2018, idk if Google fixed it.
Click to expand...
Click to collapse
I don't think i've tried to turn that mode off.. i'm so used to needing it on for the computer to recognize and connect to all my previous Android Devices.. thanks for the recommendation...
post-mortem said:
I'm curious if you're able to connect to a USB OTG storage device.
Click to expand...
Click to collapse
Couldn't find any OTG cable to try that but strangely enough a few days back I connected it to PC for charging and Nautilus popped up, same cable, same USB port and it started working all of sudden. Did verify with a couple of other cables and different ports and everything is working fine since.
"Charging connected device" notification never appeared again, only thing different (when it started working again) was that I was out of the air conditioned room most of those days, might it be moisture or something like that?
I'm back to my normal routine for a few days now and it's still 100% normal, will have to see if it stays that way.
Sorry for late response.
Here's an update in case someone else runs into this situation, I can say this with 99% certainty that is caused by the blackish residue build-up around the USB port over time. It's not too much that it's visible just by looking into the port but it's enough to make the device behave like this.
Here's what I did to get rid of it, took a match stick (don't use anything metal) and broke it in half making a sharp edge on both broken pieces, took the non coated piece and inserted sharp edge in the bottom side of the port and gently wiggled it around while applying some pressure towards the connector (just a little bit, make sure you don't break anything), did this for about 45 seconds then took out the match stick and the part that was touching the connector had turned blackish (I guess this is when you know you have 'cleaned' it enough?), repeated the same process on the top side of the port with a new match stick piece (guess you can use the same one after cleaning it with a tissue), the only difference was that this time applied the pressure in opposite side (other side of connector), device was on during all this time.
It builds up again after a while (~3 months) so I had to repeat the entire process again when it started doing that again at the start of December but it wasn't that annoying this time because I knew exactly what was wrong and how to get rid of it, device is still working fine 100%.
I'm simply sharing my experience and not encouraging anyone to do this but if you do decide to try this be sure not to use anything metal and don't break the connector inside the port (turning the device off would be a good idea too) and you'll be fine and if something does go wrong I won't be responsible.

Debugging authorized but not enabled (broken screen/digitizer)

I believe this topic should be mostly device agnostic but for details I'm working with a Fire Tablet 10, a year or two old or so, not sure exact revision but OS and recovery are stock and it is not rooted.
In the past I have connected to this tablet over ADB from my PC (device/connection authorized). The screen and digitizer recently broke. I was still able to connect via ADB and I could even use scrcpy to remote in from my PC. I was having trouble inputting the screen unlock because the digitizer was constantly registering inputs all over the screen nonstop. I was able to unlock the screen with adb input text but as soon as I did, the tablet started opening apps, swiping the top panel, etc. I disconnected a few seconds later but in that short time something happened and now I can't get back in with ADB. My PC does recognize the tablet as being connected but can not even access typical files and folders (no files or folders show up at all). I suspect that one of the registered inputs was in the top panel like changing the usb mode to charge-only or even worse; disabled usb debugging. I have since opened it up and disconnected the screen and digitizer to prevent this from happening again.
I know the topic is asked a million times 'can I get back in if I never enabled usb debugging' but I can't find any answers for my situation where my computer should still be in the authorized devices list on the tablet, just lacking the debug interface being enabled (or something similar). I am not against buying some hardware/adapter to connect to an external display but I haven't found anything yet that will be plug-and-play out-of-the-box (all I've found so far need ADB or an app installed).
My question is: Can I do anything to re-enable standard ADB/USB debugging (or maybe ADB over IP) to get back in if I have a computer that should still be authorized?
Thank you all in advance for any advice or suggestions.
you could try to inject init.rc service
Code:
settings put global adb_enabled 1
or edit default.prop in boot (if not symlink to /system)
Code:
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
you can modify boot with AIK and flash with mtkclient or SP Flash Tool.
In any case, do a full ROM dump first. Do not try to unlock bootloader, encryption keys are bonded to bootloader lock state (some people claim it's possible to unlock bootloader without data loss, I don't believe).

No otg, no adb usb, nor adb wifi connection; barely, it charges

Hi everyone. I post this topic in here, because I don't know where else I could do it, because my device is of a not much known brand. I own a Krono Net 1032, chinese tablet, is rooted via magisk, and everything was going ok with it, until several days ago, when I tried to connect from pc, to adb via wifi, but it didn't connect (adb debugging was enabled and adb returned me 10061 error); action that was performed right without any issue till that day. Uneasied, I tried to connect it via usb, but not only won't connect to adb, but it won't be detected as mass storage... even is not detected as anything. Now, really worried, I tried to connect it by changing usb cable... the same; tried connecting on another usb ports...the same; tried connecting tablet on another pc... the same; tried connecting any peripheral via otg... peripherals won't work; I disabled and reenabled adb debugging... the same. It barely charges, but if I move the tablet, stops charging.
The alarming behavior is that, for I could get root access, it should be connected on preloader mode, for can flash it; so if I told you that this tablet is already rooted, is because in the past I could connect it on that mode and my pc did recognize it with such mode. But now, not even pc recognize such connection.
I suspect that is a hardware issue, but I don't know if that could be happening because of usb port solderings or an usb controller ic issue; and I don't want to open it and try to repair, without before read your opinions.
So please ¿What can be happening there?
Thanks in advance for your answers.
Do a Factory Reset.
xXx yYy said:
Do a Factory Reset.
Click to expand...
Click to collapse
I would do, if my device would be detected on fastboot mode or preloader mode, but none of those usb connection modes are detected by pc. So I don't guess it's an operating system issue; or better said, i'm afraid of doing that, and find that it remains the same. But I'll consider it as my last resort (because i've made many customizations that I don't want to lose -root, gravity box, lsposed, etc-). Anyway I think the reason of what could be happening, would be maybe worst than that (I think is a tablet's usb port issue). Thanks for your opinion.
PS: I forgot to say something that confuses me too much but at the same time, gives me hope that this isn't a hardware issue: Wifi adb isn't working too,and something weird, remote control from pc (eg. via teamviewer or anydesk) doesn't work also.
Don't think device's USB-port is defective, that of all things the lanes are broken, but not the power related connections.
I rather think that USB is not configured correctly in Android's build.prop file, expected USB- setting in build.prop always should be
Code:
persist.sys.usb.config=mtp,adb
xXx yYy said:
Don't think device's USB-port is defective, that of all things the lanes are broken, but not the power related connections.
I rather think that USB is not configured correctly in Android's build.prop file, expected USB- setting in build.prop always should be
Code:
persist.sys.usb.config=mtp,adb
Click to expand...
Click to collapse
I tried adding that line, and rebooted the device, but nothing happened, is still without usb support... But wait a moment, about it ¿is there any specific place to paste that line, or can be pasted wherever inside this file
Did you verify that buld.prop got changed?
Not already existing key-value pairs typically are added to end of build.prop file.
Ckeck for existence of these 2 key-value pairs too:
persist.service.adb.enable=1
persist.service.debuggable=1
Does the USB work properly in fastboot?
Renate said:
Does the USB work properly in fastboot?
Click to expand...
Click to collapse
No, is not recognized in fastboot or preloader. That's why I suspect of tablet's usb port, which would be probably the worst scenary to me. The weird thing is, if the suspected problem is related to hardware ¿Why adb via wifi is not working too? ¿Isn't that a routine separated from usb adb? or definitely ¿if usb adb is not working, wifi adb also stops working?
xXx yYy said:
Ckeck for existence of these 2 key-value pairs too:
persist.service.adb.enable=1
persist.service.debuggable=1
Click to expand...
Click to collapse
Yes, they are already written there, but none of the expected happened (which comes alive again its usb port).
If my problem would be hardware related, I mean, if the problem is at the usb port (i think it is, because, despite it charges when cable is plugged, if I move a little the tablet, it loses charge connection. I tried several cables and happens the same), if sadly i'm right, I think that, being positivist, it would be just solderings retouch on the usb port. But investigating, I can see that micro USB type C (female) connector, is not so easy (even is complicated to not say hard) to resolder, so ¿is there any technique?¿Do i need a hot air gun or something like that?¿or is that only solvable by swapping its main board?
Anyway, If my problem is of hardware, none of the options could be nice.
Often the USB connector is on its own little board connected by a flex printed circuit to the main board.
I Googled "Krono Net 1032 USB connector board" and got https://www.aliexpress.com/i/2255799845922187.html
Yeah, it would be great if they were related, but at least you can see what I mean and how cheap it would be if you could find the right one.
Renate said:
Often the USB connector is on its own little board connected by a flex printed circuit to the main board.
I Googled "Krono Net 1032 USB connector board" and got https://www.aliexpress.com/i/2255799845922187.html
Yeah, it would be great if they were related, but at least you can see what I mean and how cheap it would be if you could find the right one.
Click to expand...
Click to collapse
That board seems to be a spare part of a nokia device. It would be very good if only was disconnecting the suspected bad component, and connecting the new one. But I opened this tablet and what I saw, is that seems, that usb port is integrated with the mainboard.
If it were micro USB 2.0 I'd do it myself.
USB Type C on a motherboard I'm sure that I'd destroy somwthing.
Renate said:
If it were micro USB 2.0 I'd do it myself.
USB Type C on a motherboard I'm sure that I'd destroy somwthing.
Click to expand...
Click to collapse
That's my worry, because it's USB type C.
There are two types of Type C connector:
Real, USB 3.0 24 pin
Lite, USB 2.0 12 pin
I'm not sure that I'd even want to tangle with the 12 pin.
I have an update about this topic. Well, I took courage and disassembled as much carefully I could, I tried to get as much tools I could (besides solder iron, magnifying glass, focal illumination, soldering paste, etc.). I could saw that usb socket pins were tiny but accessible, so, also as much carefully I could, I resoldered them, I cleaned them, and reassembled the tablet.
To be brief, after that treatment, the battery charging was more consistent, more stable (now I can move the tablet without losing charging connection) but it still, doesn't want to be recognized by the pc, wheter if it's on fastboot mode, or normal mode (with tablet on). I must clear that my pc, recognizes other android devices that are plugged into it, but this one doesn't. So, that's very wird to me. My only explanation for that, is that its usb controller IC is working bad or could be broken, but if it would be broken, how could be possible, that tablet still can charges its battery? What do you think about it?
PS: I didn't see too much pins, so I think it has 12 pins.
Renate said:
There are two types of Type C connector:
Real, USB 3.0 24 pin
Lite, USB 2.0 12 pin
I'm not sure that I'd even want to tangle with the 12 pin.
Click to expand...
Click to collapse
I was seized by a big doubt since this problem happened. ¿Is wifi ADB bound to usb adb? I mean, if USB ADB isn't working, ¿Does wifi adb stop working too?
Another question is: Before this, I remember remote control worked on this tablet (control tablet remotely), but now there's no way to make it work ¿Can be this related to the original issue?
Even worst ¿Can the initial issue, be related to a ROM corruption issue? I say "worst" because if it is, I don't know how to reflash it without usb support.
No, WiFi ADB should work even if USB is broken.
You should be able to switch to WiFi ADB using a non-rooted terminal app.
You should be able to do this without root.
Code:
$ setprop service.adb.tcp.port 5555
But adbd has to be stopped and restarted. I'm not sure that this works without rooting.
Code:
$ stop adbd
$ start adbd
But you should be able to go to Settings > Developer options > Enable USB debugging and turn it off then on.
Then:
Code:
C:\>adb connect 192.168.1.12345:5555
Of course 192.168.1.12345 must be the actual IP of the Android on your router.
Renate said:
No, WiFi ADB should work even if USB is broken.
You should be able to switch to WiFi ADB using a non-rooted terminal app.
You should be able to do this without root.
Code:
$ setprop service.adb.tcp.port 5555
But adbd has to be stopped and restarted. I'm not sure that this works without rooting.
Code:
$ stop adbd
$ start adbd
But you should be able to go to Settings > Developer options > Enable USB debugging and turn it off then on.
Then:
Code:
C:\>adb connect 192.168.1.12345:5555
Of course 192.168.1.12345 must be the actual IP of the Android on your router.
Click to expand...
Click to collapse
Ok, I did all that, with a terminal emulator. Without root permission, those commands do nothing. So I invocated root access by typing "su" command; then root request appeared, I gave it to the app root access, and then all those commands worked ok. After corroborate the right wifi adb connection (after enable on developer options "usb debbugging" and all those stuff). I tried a remote control program called "scrcpy", and it worked as expected in a normal condition, I mean, I can see on my pc, the tablet's screen and also i can control the tablet from it, but after that , I'm still wondering, why all other remote control programs, like team viewer and anydesk, don't want to control this tablet, hmmm... ¡anyway!
That news in general to me, is an advance, and is good, but i'm still wondering why usb connection isn't responding (mtp, adb, fastboot nor preloader mode) , not even its OTG support and I'm pretty sure this tablet has it, because with it, came additional an OTG adapter, so why would do they add an otg adapter if tablet wouldn't support it?

Categories

Resources