Tuesday, January 14, 2020

Can't connect to the device with ADB when it's in recovery mode


I am having some problems with my Samsung Galaxy S2 and I want to start an fschk session on the device.


So, I installed Android SDK with platform-tools. I can access to the device when it's normally rebooted but I couldn't list and connect to the device when it's in recovery mode.


How can I connect via ADB when the device is in recovery mode?



Answer



adb is not available in the bootloader, try using fastboot instead


for a quick and dirty rundown of flashing your device with a new image using fastboot:


adb reboot bootloader
use fastboot devices to verify your device is visible, if not, you're probably running windows, and you have to install some funky drivers. if you don't see 'unlocked' at the bottom of the screen, use the command fastboot oem unlock then just:

fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash userdata userdata.img
fastboot flash recovery recovery.img


If you feel super confident you could just:
adb reboot bootloader && fastboot oem unlock && fastboot flash boot boot.img && fastboot flash system system.img && fastboot flash userdata userdata.img && fastboot flash recovery recovery.img && fastboot reboot


PS You should only use the flash commands if the referenced files are present, if not you may or may not brick your phone (haven't tried flashing a non-existent file to the device yet)


Warning: Unlocking bootloader wipes off data in your phone.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...