Display Broken, How do I backup my photos and data? - Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe

I have a Redmi K20 Pro, not rooted, my display screen broke and has gone all blue black.
I can access phone with adb though. But cannot access the file system from my PC.
Is there anyway I can backup my photos and files to my PC, using adb or some other command ?
I have to give phone to replace screen at service center and they factory reset phone without backing up anything.
I just need to get hold of my photos and videos.
Please help. TIA !

Try the adb pull command.
If you don't know the exact location of your data try the adb shell command to start a shell session, then you can use the ls and cd commands to browse the file system first. After exiting the shell you can use the adb pull command to download specific folders to the PC.

If only the screen is broken and the device is still working, then you can try scrcpy ( have both 32 and 64 bit version ). As long as your device is enable USB Debugging, then the device's creen will be mirrored to PC, from there u can see and do what u wanna do!

Related

Broken Screen, Not Rooted, Lockscreened.

SOLVED
(No success for me personally, but I'd still like to explain how I realised there's no hope left - description is at the bottom of this post)
Hi, not a regular poster in the S3 mini section, but a friend of mine has had his entire screen smashed. Somehow though, the phone is still breathing and can be turned on/off.
The problem is: My friend has asked me to extract his photos and similar media from the device's memory.
The device isn't rooted and I'm not sure if there's a default recovery mode or something like that built in the device.
I've tried connecting the device to my PC and it gets recognized and the drivers install themselves, but the device is empty. Moreover, I've downloaded KIES which also recognized the device, but says that there's a lockscreen and he can't go any further.
Any advices? Most of the other xda answers are for rooted phones so they haven't been very helpful, unfortunately.
There's a picture of the device in the attachments below, and KIES interface aswell.
<<EDIT>>
I'm using this http://forum.xda-developers.com/showthread.php?t=2339530 Recovery operation but it keeps saying "adb.exe" not found. I've installed ADB via the 15sec install ( http://forum.xda-developers.com/showthread.php?t=2588979 ) and entered the path correctly, but it still can't detect it. Any tips? perhaps i'm using the wrong ADB - I don't have c:\android\platform-tools folder - it's simply c:\adb\adb.exe.
SOLVED PROBLEM:
After messing with this for 2-3 days, I've decided to go with the simplest method - find a way to list all directories on the device and then see if there's anything in "sdcard" or a similar folder. To do this, after ADB recognizes your device, type : adb shell ls -R
adb shell ls -R will list a zillion directories so you may want to save the data into a .txt file. to do this, type adb shell ls -R > output.txt (or any other name).
After that, open the output.txt file and then use ctrl-f to find the sdcard folders and check if there's any data left in them.
IMPORTANT:
I've read that, without root permission, one cannot access the data or sdcard directories. The device I was working on had USB debugging OFF so there was no way I could root the phone in order to access the data directories.
Silly question, but did you use option 2 in RecoverData to change the path of ADB to c:\adb\?
aumedina said:
Silly question, but did you use option 2 in RecoverData to change the path of ADB to c:\adb\?
Click to expand...
Click to collapse
Yup, but it still can't find it. That's why I think the ADB-15sec install might be flawed.
There's a screencap of the Recovery + TotalCMD in the background in the attachments.
<EDIT>
Alright so I've followed an ADB tutorial (http://forum.xda-developers.com/showthread.php?t=2266638), installed all the SDK packages just to be sure.
ADB now recognizes the device after I've booted it into recovery mode. I've tried doing adb pull /data and it says 0 files pulled, 0 files skipped. Does this mean the device's internal memory is blank? No it doesn't, only the folder "data" is blank, other system data is present.
<EDIT 2> Can anyone please tell me the path to the internal camera storage folder? I may have fixed the problem if only I knew the correct path. SOLVED: The correct path is one of 4 combinations, usually these: /mnt/sdcard0/ /mnt/sdcard/ /storage/sdcard0/ /storage/sdcard/

[Recovery][GUIDE] Moto X 2014 Broken Screen Recovery Guide

So, after owning my beautiful Moto X for 1 month, I found that the screen is not nearly as shatter resistant as my old iPhone 4S. After managing to completely shatter it, I called Motorola up for a replacement (which for a customized Pure cost $125) and it was on its way, but before that I needed to get my old data off. Luckily I have unlocked my bootloader and rooted my phone in advance, but i had turned off USB debugging and had a passcode lock. All of the guides for making a full backup assume that you have screen access. After messing around for a few days, I finally managed to make a full backup of my phone. I thought I'd put together this guide for anyone else who has the same issue.
Assumptions
Your bootloader is unlocked and phone rooted (do not try to unlock it now or it will wipe the phone)
Your phone is not encrypted (there's still a way around this which I'll cover but I did not have to use)
You have ADB/fastboot set up on your computer (and have tested it at least once)
Required files/guides
CWM recovery file - http://motoxroot.com/cwmtwrp-recovery-for-moto-x/
Lock Screen removal guide - http://forum.xda-developers.com/showthread.php?t=1409304
SQLite DB editor (I'm on Windows) - http://sqliteadmin.orbmu2k.de/
Androidscrencast - https://code.google.com/p/androidscreencast/
ADB keystroke events - http://thecodeartist.blogspot.com/2011/03/simulating-keyevents-on-android-device.html
Steps
The first thing I did was download the customer CWM image for the 2014 Moto X which can be found here:
Code:
http://motoxroot.com/cwmtwrp-recovery-for-moto-x/
Next I went rebooted the phone into bootloader mode by holding "Volume Down + Power" for about 15 seconds. I could not see images on the screen but I could tell when it lit up.
Note: If you have an encrypted phone, you can use an OTG cable and a standard USB keyboard to type in the password blind. I used something similar for the PIN code, however this guide does not actually need to worry about that
Test that you have fasboot access by running
Code:
fastboot devices
You should see your device listed
Boot the CWM recovery image (you do not have to flash it which is nice)
Code:
fastboot boot XT1095recovery.img
Wait a few seconds and verify that you can now access your phone via ADB
Code:
adb devices -l
If this works, you now have a shell to be able to do the next part which is removing the passcode and enabling USB Debugging I followed the guide at http://forum.xda-developers.com/showthread.php?t=1409304 to do remove the lock screen
Mount the data partition of your phone by running
Code:
adb shell mount data
adb shell mount system
Grab the settings DB from the phone and copy it locally (Other guides say to copy to an intermediary, but since you're using a recovery ROM the files can be directly accessed)
Code:
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
Open the file in your SQLite editor of choice and run the following statements
Code:
UPDATE secure SET value=65536 WHERE name='lockscreen.password_type';
UPDATE secure SET value=0 WHERE name='lock_pin_autolock';
While we have the settings DB open, it's also a good time to enable ADB Debugging by running the following statements (credits to http://stackoverflow.com/questions/13326806/enable-usb-debugging-through-clockworkmod-with-adb though I had to mod some more stuff)
Code:
UPDATE global SET value=1 WHERE name='adb_enabled';
UPDATE global SET value=1 WHERE name='development_settings_enabled';
Push the file back to it's original location
Code:
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
From here, the next set of commands should be run within the shell. You can access it by running
Code:
adb shell
Remove some existing property files
Code:
rm /data/property/persist.service.adb.enable
rm /data/property/persist.sys.usb.config
Add in the ADB settings
Code:
echo "persist.service.adb.enable=1" >>/system/build.prop
echo "persist.service.debuggable=1" >>/system/build.prop
Correct the permissions for the settings.db file
Code:
chown system:system /data/data/com.android.providers.settings/databases/settings.db
chmod 660 /data/data/com.android.providers.settings/databases/settings.db
At this point, everything is ready to go and we're ready to reboot to your real install with no pin code and ADB enabled.
Reboot your phone
Code:
adb reboot
Run androidscreencast (don't worry about the keyboard/mouse instructions they don't work). Chances are the screen will be blank, press the Power button your phone and wait (it's got a *very* slow refresh rate)
Once you see your desktop, you can now run an ADB backup. I like getting everything, but this will take a while because it grabs all images, music, SD card stuff, etc.
Code:
adb backup -apk -shared -all -f backup.ab
On the screencast you'll see the prompt pop up asking you to enter a password and confirm. This was the part that took me a while and you have to do it fairly quickly otherwise it'll time out. In a separate windows run
Code:
adb shell input text <yourpassword>
adb shell input keyevent 61
adb shell input keyevent 61
adb shell input keyevent 66
At this point, you should see a full backup kicking off and running. You can run a logcat to watch the process of it. In some cases a full backup may hang if a resource has a file open, the two commands to work with this are:
Code:
adb shell logcat | grep BackupManagerService
To kill a process the backup is hanging on, enter the shell
Code:
su
ps | grep <nameOfProcess>
am force_stop <nameOfProcess> (the clean way)
kill <pid> (the dirty way)
Hope this helps! This took me a little while to figure out but now I have a full backup and my new Moto X will be here within the
week.
Okay so an ADB full backup sucks for a restore. Luckily I got a nandroid backup instead and that worked much better. There's some stuff you have to do with mapping /sdcard for it to work on the Moto X. I'll update this post soon with that information.
Thanks a lot for this! Helped me recover all my data from a Moto X with a completely broken blank screen!
This is an awesome Guide! Congrats!! I have a different situation. My Moto X 2014 is the XT1097 variant. The phone was neither rooted nor had an unlocked bootloader before the screen died. I downloaded the stock rom for my device, and flashed it with RSD Lite, since the program sees the phone connected in fastboot mode. Do you think I could use this method to reach the desktop? Also, the recovery.img in your guide is for the XT1095. Would it work for the XT1097? I know I can unlock the bootloader via fastboot, but what about rooting? Thanks in advance!!

[Q] Getting data from the phone

Hello,
the phones lcd was changed and something went wrong when we did the assembly. The phone "doesn't" turn on, it does but the screen is blank. I would like to know how can I get the files down.
If there is any way. Thanks for the support!
Daichisan said:
Hello,
the phones lcd was changed and something went wrong when we did the assembly. The phone "doesn't" turn on, it does but the screen is blank. I would like to know how can I get the files down.
If there is any way. Thanks for the support!
Click to expand...
Click to collapse
if you can somehow blind navigate your way to recovery then you can just pull the contents of the internal storage to your adb / fastboot folder on your computer.
adb pull /sdcard/0/ ------- (thats a zero)
or
adb pull /sdcard/0/Music to just pull your Music folder etc, change to Pictures or DCIM etc, the first command above will pull everything.
Seanie280672 said:
if you can somehow blind navigate your way to recovery then you can just pull the contents of the internal storage to your adb / fastboot folder on your computer.
adb pull /sdcard/0/ ------- (thats a zero)
or
adb pull /sdcard/0/Music to just pull your Music folder etc, change to Pictures or DCIM etc, the first command above will pull everything.
Click to expand...
Click to collapse
Was thinking about that, but it's hard to get to recovery. The guy who changed the screen somehow damaged the buttons but when I connect the phone to the laptop, I get an bip, that the phone is connected.
But the problem is that I get an uknown device notice and when I wan't to update drivers, I get an error. Is it maybe the problem USB 3.0? Should try with USB 2.0?
Hmm...will go mad .)
Any idea?

{HELP} OnePlus 3 smashed on wedding day. Trying to recover data. Failing badly.

Hey guys,
My phone got smashed on my wedding day, and I'm trying to save the data on it.
Already bought myself a Soft Gold to replace it, as the screen is about £160 on eBay.
So: not rooted, USB debugging enabled, screen locked via 4 digit number, can't unlock as screen smashed
I can adb into it, and it sees it as a device, but I can't get anything off it.
Below is the dialogue from the command window.
C:\Users\Alex\AppData\Local\Android\android-sdk>adb pull /storage C:/
adb server is out of date. killing...
* daemon started successfully *
pull: building file list...
skipping special file 'sdcard0'
0 files pulled. 0 files skipped.
C:\Users\Alex\AppData\Local\Android\android-sdk>adb pull /storage/DCIM
remote object '/storage/DCIM' does not exist
C:\Users\Alex\AppData\Local\Android\android-sdk> adb pull /storage/emulated
remote object '/storage/emulated' does not exist
C:\Users\Alex\AppData\Local\Android\android-sdk>adb pull /storage
pull: building file list...
skipping special file 'sdcard0'
0 files pulled. 0 files skipped.
C:\Users\Alex\AppData\Local\Android\android-sdk>adb pull /sdcard
remote object '/sdcard' not a file or directory
C:\Users\Alex\AppData\Local\Android\android-sdk>adb pull /internal
remote object '/internal' does not exist
C:\Users\Alex\AppData\Local\Android\android-sdk>adb pull /storage/
pull: building file list...
skipping special file 'sdcard0'
0 files pulled. 0 files skipped.
C:\Users\Alex\AppData\Local\Android\android-sdk>adb root
adbd cannot run as root in production builds
C:\Users\Alex\AppData\Local\Android\android-sdk>adb backup -all
Now unlock your device and confirm the backup operation.
C:\Users\Alex\AppData\Local\Android\android-sdk>
Any help greatly appreciated.
At this stage I don't care about the device as I've already got another, I just want the pics/ data off it.
use a USB-C OTG + USBmouse and click the pin code?
2x4 said:
use a USB-C OTG + USBmouse and click the pin code?
Click to expand...
Click to collapse
Screen LTD is completely black, doesn't show anything at all.
get in contact with oneplus and ask them if your device gets wiped when repaired, maybe they can do a special request. but they may need to unlock it to test the screen, i dunno. my second idea is if your boatloader is unlocked, which personally i think it should always be since it doesnt void warrenty, then you can flash a custom recovery like twrp. then boat into the recovery using hardware button, MTP mounts automagically, drag everything off
merewood bebox said:
get in contact with oneplus and ask them if your device gets wiped when repaired, maybe they can do a special request. but they may need to unlock it to test the screen, i dunno. my second idea is if your boatloader is unlocked, which personally i think it should always be since it doesnt void warrenty, then you can flash a custom recovery like twrp. then boat into the recovery using hardware button, MTP mounts automagically, drag everything off
Click to expand...
Click to collapse
Spoke to Oneplus today, there is no way of repairing it unless they wipe it.
Bootloader isn't unlocked, unfortunately
USB-C hub + external monitor + USB mouse + USB keyboard
Alex,
You should try Android Control. It's a program that uses [email protected] access your phone through your computer. Since you have USB Debugging on, just plug your OP3 in, start the program, and it should show you your screen. From there, you can use the window with the keyboard to swipe up on the lockscreen, and then enter your password. You should be able to extract your data from there.
Android Control: http://forum.xda-developers.com/showthread.php?t=2786395
Contact me if you need any help, and congratulations on your marriage!
R55770
Checkout an app called vysor. I used it with my Alcatel one touch idol 3 because it's screen was busted. It mirrors your phones screen onto your desktop computer. You might have to find away to disable the password through adb first I'm not sure. But vysor worked perfectly for me! One you connect it it installs the app file onto your device via USB.
[Edit]
Its a desktop program you have to install first in case I wasn't clear in the text above
create a bat file
create a folder on ur pc, go into folder, create .txt file, open put code below and save as filename.bat, double click bat file
adb devices
adb pull /sdcard/ %cd%
that wil backup ur whole internal storage, or u can just do /sdcard/DCIM or fold specific
assuming u can pull via adb
@OnePlus_Alex
1. Install latest ADB. Download Here
2. the code is "pull C:/ /sdcard/DCIM/ "
This should get all your photos to 'C' drive on your PC.
Prince Chandela said:
@OnePlus_Alex
1. Install latest ADB. Download Here
2. the code is "pull C:/ /sdcard/DCIM/ "
This should get all your photos to 'C' drive on your PC.
Click to expand...
Click to collapse
No dice I'm afraid.
I think it might be the other way around, as remote object C: doesn't exist.
rykanator said:
Checkout an app called vysor. I used it with my Alcatel one touch idol 3 because it's screen was busted. It mirrors your phones screen onto your desktop computer. You might have to find away to disable the password through adb first I'm not sure. But vysor worked perfectly for me! One you connect it it installs the app file onto your device via USB.
[Edit]
Its a desktop program you have to install first in case I wasn't clear in the text above
Click to expand...
Click to collapse
Vysor doesn't seem to be able to install the APK, as I have to allow it on the screen
R55770 said:
Alex,
You should try Android Control. It's a program that uses [email protected] access your phone through your computer. Since you have USB Debugging on, just plug your OP3 in, start the program, and it should show you your screen. From there, you can use the window with the keyboard to swipe up on the lockscreen, and then enter your password. You should be able to extract your data from there.
Android Control: http://forum.xda-developers.com/showthread.php?t=2786395
Contact me if you need any help, and congratulations on your marriage!
R55770
Click to expand...
Click to collapse
Thanks for the reply!
It seems that I have to allow the computer's RSA fingerprint on the screen, as it won't let me hook into it.
Tried it in recovery mode, normal screen mode and sideload mode.
Thanks for the wedding congrats

I dropped my rooted Note 5 with TWRP, now I want to back up the data. What do I do?

I have a Galaxy Note 5 and I have important data in it. The screen is broken so I can't do anything, but I see recovery listed with a bunch of characters when I do
Code:
adb devices
. I can run some adb commands, adb root tells me I have root, I can do "id" inside of adb shell. Though, whenever I try running any twrp commands inside adb shell, it says "TWRP does not appear to be running. Waiting for TWRP to start."
What can I do here? I also see SAMSUNG Android under devices on this linux distro I'm running but I am getting an mtp error whenever I try connecting to it.
If the important data you mean are pictures, documents, videos or just files in general then you can try
Pressing the volume down + power off buttons simultaneously until the phone shuts down
Press on volume up and power off to open twrp
Connect your phone to a pc
Internal storage should be accessible like a normal usb.

Categories

Resources