My phone (Xiaomi Redmi 4X) is faulty since last week, it's restarting itself in every 30 seconds (this time starts when the home screen appears). This little time is not enough for copying everything to my PC because it disconnects before even the thumbnails are loaded.

It doesn't work with the MI PCSuite, it says "Connect your device". Not working in recovery mode neither in fastboot mode.

I downloaded the android sdk so I have fastboot and adb. 'fastboot devices' command lists my device (I guess it is), but 'adb devices' doesn't list it. (I guess it only works when the phone and USB Debugging are on)

Do you have ANY idea how to save my pictures and videos. They're invaluable to me. I don't care about the phone, but I don't want to lose my data.

Any help is appreciated!

  • Is it possible that the data you want is stored on your SD Card ? if not then your best option is to try and install a custom recovery on the device and then copy out the data with the custom recovery Mar 27, 2018 at 1:45
  • I would focus on finding why the phone is restarting. Something is making the phone to restart and you need to find what it is and disable it . Seems easier than trying to save images in this situation.
    – papakias
    Mar 27, 2018 at 12:21
  • @Zillinium it's restarting in every 30 seconds, there's no chance to install an application to it. Mar 27, 2018 at 20:00
  • You don't need to install any application when installing a custom recovery... Mostly you can use Fastboot to install a recovery with the command fastboot flash recovery recovery.img This is before the bootloader and shouldn't require fully turning it on, therefore it won't restart until you boot the system Mar 27, 2018 at 21:52
  • Oh, and where can I get this recovery.img file? Mar 27, 2018 at 21:59

1 Answer 1


Whew, it was a tough round but under 5 hours I figured out and finally managed how to save images and videos in this situation.

First I had to make some kind of connection between the phone and my PC. The best option for this was the platform-tools in the Android SDK. Then went into the shell with:

C:\platform-tools> adb shell

Next thing was to find out the path of the Dcim folder and list files in that folder:

ls /storage/emulated/0/Dcim/

there is a folder in it called Camera. After I got all the filenames in that folder I managed to copy them with the adb pull command: I copied all the filenames into an excel document and prepared them with the full command which was:

adb pull /storage/emulated/0/Dcim/Camera/video1.mp4 C:\media\
adb pull /storage/emulated/0/Dcim/Camera/video2.mp4 C:\media\
adb pull /storage/emulated/0/Dcim/Camera/video3.mp4 C:\media\

It contained 450 files. That is impossible to copy within 30 seconds, so I had to divide them into chunks. First I divided them into videos and pictures and copied 50 pictures at once per 30 seconds session. With videos, I could copy only 5-8 at once.

And one last but an important thing: on the phone the USB Debugging must be enabled (under the Developer options) in order to make use of the adb tool. And all the above mentioned only work when the phone is on!

  • How did you enable USB Debugging without turning on the device ? Mar 27, 2018 at 21:54
  • Yeah, it had to be turned on for that. 30 seconds is enough to navigate there and enable that. Mar 27, 2018 at 21:59
  • Ok, that's really strange... It seemed like you couldn't turn your device on at all without it restarting, it's usually called a boot loop and doesn't go any further than looping at the boot screen. Mar 27, 2018 at 22:01
  • It's another type of boot loop. The 30 seconds starts when I get to see the home screen. Mar 27, 2018 at 22:21
  • I updated the post. Mar 27, 2018 at 22:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .