Day: July 27, 2019

How to recover your data from Android when your LCD screen damage

Few days ago my Moto Z Play fell to the floor and the LCD screen became black. I couldn’t see the screen anymore.

Unfortunately when I plug my phone over USB cable to computer, nothing appears. It is because Android wait for user to select what USB function it needs to use (MTP, ADB, etc). Because I can’t see the screen it is not possible to select any option.

Searching in the internet for some tips how to solve this issue I found a nice tip from Olivia Henry:

Again I cannot use her suggestion because ADB is not enabled when I plug the cable to computer.

Then I remembered that I have an antitheft software called Cerberus installed on my phone. I just when to and did the login in the system.

I selected the “Start Shell” and pressed Volume Down + Power button on the phone and listened the “take pictures” click sound.

Let see if we got some donuts:

$ cd /sdcard/Pictures/Screenshots

u0_a138@addison:/sdcard/Pictures/Screenshots $

u0_a138@addison:/sdcard/Pictures/Screenshots $ ls


u0_a138@addison:/sdcard/Pictures/Screenshots $ mv Scree* screen.png

u0_a138@addison:/sdcard/Pictures/Screenshots $ ls


u0_a138@addison:/sdcard/Pictures/Screenshots $ od -t x1 -v screen.png > screen.txt

u0_a138@addison:/sdcard/Pictures/Screenshots $ cat screen.txt

0000000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52
0000020 00 00 04 38 00 00 07 80 08 02 00 00 00 a4 03 70
0000040 5d 00 00 00 03 73 42 49 54 08 08 08 db e1 4f e0

Then I selected all the text starting from “0000000 89…” until the last line at bottom, copied and paste it on text editor on computer and saved it as screenshot.txt.

Because I don’t want offset at beginning of each line, I removed it:

$ sed -i ‘s/^(.){8}//g’ screenshot.txt

And finally converted the text bytes to binary using this command:

$ for i in $(cat screenshot.txt) ; do printf “\x$i” ; done > screen.png

So using this trick I could access my phone again to backup some important files.