[Q] how to enable usb debugging - screen broken - Galaxy S 4 Q&A, Help & Troubleshooting

My s4 display is broken, so, there's nothing that I can do with the phone. When I connect phone via usb, I'm able to browse through folders on my s4, but in adb, on "adb devices" command, none of devices is listed.
Phone is rooted with CM11 ROM installed.
When I connect phone in recovery mode on bootup, and open adb, all commands are working, and device is recognised.
Is there any way to enable usb debugging from recovery mod, so device would be recognised in adb when it boot up normally?

You could try this:
Run an ADB shell in ClockworkMod
Remount /system in readwrite mode.
Add this to /system/build.prop: persist.service.adb.enable=1
Save the file.
Warning: Some people reported that this causes their device to not boot anymore.

hi... i have sme problems...
adc say me that phone is "unauthorized"
can you say exactly tha command that i must use with adb?

Related

No ADB function in recovery mode?

I need to pull, edit and push back /data/data/com.htc.android.htcime/shared_prefs/com.htc.android.htcime_preferences.xml which is not accessible through 'normal' adb so I tried booting the phone into recovery mode but I couldn't connect adb, basically when I go to devices and printers>android phone>hardware, there's no ADB listed as in normal mode. Any ideas?
PS the USB debugging option is on.
Anyone?

Does fastboot work properly?

Windows 10 Home on host computer, and ADB tools installed.
USB debug mode on and host computer allowed.
USB PTP mode.
LG Unified Driver installed.
I opened command prompt, locate adb platform-tools. Ran the following commands
Code:
adb reboot bootloader.
The phone rebooted to bootloader.
On the bootloader mode on the phone, I typed
Code:
fastboot reboot
The phone rebooted properly
Does it work right?
Currently the phone is not ready to unlock bootloader until there's no problem, especially speaker problem, found.

Windows 10 laptop can't detect softbricked Nexus 4, TWRP, no OS

I've checked other threads but other similar threads were able to get the phone detected in Device Manager so...
I went to factory reset my old Nexus 4 after using it whilst my LG G4 was being repaired. Instead of wiping the data, I accidentally wiped the entire phone, OS included. I wasn't paying attention to what i was doing due to working at the same time and as a result the phone now only boots into TWRP and fastboot mode, but nothing else.
I tried to connect it to my windows 10 laptop so I could flash a new ROM but my laptop can't find the nexus 4 at all. Not when in recovery or when in fastboot.
Opening device manager shows that it is not there at all. There is no ACER usb device driver, nothing that resembles the nexus 4 at all. I've attached an image showing what device manager shows when the nexus 4 is connected and in recovery mode.
As you can see, there are no drivers I can uninstall. I have installed the google USB drivers from Android SDK manager. Still doesn't show. ADB doesn't work either.
I have tried multiple USB cables and every USB port. The phone charges when using an AC adaptor and charges when connected to the laptop. I can't try a different computer because I do not have access to one. Frankly I'm at a loss as to what to do.
When my nexus 4 was previously unable to connect I was able to see the device and just had to uninstall/reinstall/update drivers to get it working. This time, I can't seem to do anything. My LG G4 connects fine and without issue.
Anyone able to help?
The only way to really tell if it is a software or hardware issue would be to try another computer with Win7.
You may be able to flash a custom ROM with a OTG drive as well.
I had the same problem. When using adb and fastboot I get errors about like "error: device '(null)' not found".
Youtube video with id t0pV2pSw2N0 (sorry I am not yet allowed to post external urls) was helpfull and now I can see Android Composite ADB Interface again in the device manager. I still can not use commands adb and fastboot with exception of adb sideload. Unfortunately I have not yet succeeded to flash an image succesfully with sideload.
first try 2 remove any current drivers that are installed.
then u should experiment with different drivers.
the SkipSoft ToolKit have a huge selection, try each one of them (one of them should work).
begin with the ULTIMATE drivers and Adb/Fastboot Installer and if it don't work use the toolkit drivers.
https://skipsoft.net/download-page/
For me it turned out that MTP was enabled by default. After each restart MTP was enabled again. Now I have disabled MTP and my device is found by normal adb command.
Steps:
1) Start your device in twrp recovery mode
2) In main menu go to mount and tap "Disable MTP"
3) In main menu go to advanced -> adb sideload. Wipe caches and slide to start sideload
4) On your pc go to the command shell
5) Start "adb sideload <image_name.zip>" (replace image_name.zip with a valid image). It does not matter whether this fails or succeeds. Only thing important is that adb connects to your device.
6) Start "adb shell getprop persist.sys.usb.config". As result you will see the actual setting of the USB configuration your device when starting up. In my case it responded with "mtp,adb".
7) Start "adb shell setprop persist.sys.usb.config adb" to enable only "adb" configuration
8) Repeat step 6 to check result
9) Restart your device in recovery mode
10) Start "adb devices" to check if your device is now listed.
i_need_some_help said:
For me it turned out that MTP was enabled by default. After each restart MTP was enabled again. Now I have disabled MTP and my device is found by normal adb command.
Steps:
1) Start your device in twrp recovery mode
2) In main menu go to mount and tap "Disable MTP"
3) In main menu go to advanced -> adb sideload. Wipe caches and slide to start sideload
4) On your pc go to the command shell
5) Start "adb sideload <image_name.zip>" (replace image_name.zip with a valid image). It does not matter whether this fails or succeeds. Only thing important is that adb connects to your device.
6) Start "adb shell getprop persist.sys.usb.config". As result you will see the actual setting of the USB configuration your device when starting up. In my case it responded with "mtp,adb".
7) Start "adb shell setprop persist.sys.usb.config adb" to enable only "adb" configuration
8) Repeat step 6 to check result
9) Restart your device in recovery mode
10) Start "adb devices" to check if your device is now listed.
Click to expand...
Click to collapse
Thanks, I will give this a try!
elad.g said:
first try 2 remove any current drivers that are installed.
then u should experiment with different drivers.
the SkipSoft ToolKit have a huge selection, try each one of them (one of them should work).
begin with the ULTIMATE drivers and Adb/Fastboot Installer and if it don't work use the toolkit drivers.
https://skipsoft.net/download-page/
Click to expand...
Click to collapse
I tried removing all USB drivers and then using the toolkit and tried installing each driver. None of them allowed my PC to detect the nexus 4. As you can see in the attachment, nothing in device manager remotely resembling my nexus 4. This is after uninstalling and reinstalling and also updateing the LG G4 drivers (it makes no difference).
i_need_some_help said:
I had the same problem. When using adb and fastboot I get errors about like "error: device '(null)' not found".
Youtube video with id t0pV2pSw2N0 (sorry I am not yet allowed to post external urls) was helpfull and now I can see Android Composite ADB Interface again in the device manager. I still can not use commands adb and fastboot with exception of adb sideload. Unfortunately I have not yet succeeded to flash an image succesfully with sideload.
Click to expand...
Click to collapse
Alas, this did not work.
audit13 said:
The only way to really tell if it is a software or hardware issue would be to try another computer with Win7.
You may be able to flash a custom ROM with a OTG drive as well.
Click to expand...
Click to collapse
Unfortunately I don't have access to any other PC for this purpose. I can't connect download software or connect USB devices to the PCs at work due to security. I tried an OTG drive but TWRP wouldn't let me mount it, apparently OTG is not enabled by default for the nexus 4.
I've tried all 3 USB ports, several different cables but no luck. I guess that's it for this nexus 4 then?
If the phone is not booted into its ROM, ADB commands won't work. You need to use "fastboot devices" with the phone in bootloader mode.
You android device will reboot in several different boot modes (fastboot, recovery, normal). For each of these boot modes a separate device drive might be installed on your Windows. So check the device drive after each change of boot mode. If needed uninstall and reinstall the correct device driver.

Push adb rsa key via sideloading zip file to authorize USB debugging mode?

I figured it makes sense to break this out into it's own thread. Dealing with a dead screen/digitizer situation. Phone is rooted with safetrap, usb debugging is enabled but unauthorized. I'm not able to boot into recovery (no screen, not sure whats happening), closest thing I get to is booting into sideload mode and adb recognizes my phone.
Not sure if that means anything, is it possible to write some script, that executes pushing the new key, zip it and sideload it via adb? Will it autorun somehow?

adb unauthorized device and adb_keys not saved

Hi, this is my first post here.
I have a rooted Samsung S4 with a broken screen, that I can put in recovery mode and send commands with adb.
I would like to activate USB Debugging and I found on the forum the adb commands to do it.
I have a problem: when I restart the phone to exit the recovery mode and try "adb devices" I always find it "unauthorized".
I noticed that when I run in recovery mode "adb push adbkey.pub /data/misc/adb/adb_keys", the command seems to work. In fact, if I try immediately with "cat /data/misc/adb/ adb_keys" I see the content correctly.
But if I restart the phone still in recovery mode and I try again immediately "cat /data/misc/adb/adb_keys", the file is non-existent.
I guess this is not correct.
How can I try to solve?

Categories

Resources