Recovering Data Off Shattered Android Phone

repair

I recently helped a friend recover files off of his shattered Samsung Galaxy s5. Having been run over by a car, the screen was black and the touchscreen entirely unresponsive. The volume, power, and home button still worked.

Here are some tips for getting data off Android phones like this one. The goal is to get a screen mirror or valid USB connection going.

If your phone simply needs to be unlocked to use USB, try these:

  • Connect a USB OTG cable and use a mouse to enter your pattern code. Hold a pencil to the mouse while trying to find the 9 dots for the pattern. I held the phone in one hand to feel vibrations so I could map out the dots. First drag the mouse all the way to one corner, then slowly move it to where you think the dots are, holding the pencil down. Dots will produce a faint vibration when you click and drag lines between them, just like using the touchscreen. Mark each dot location you find, and enter your pattern.
  • If you have a PIN or password, simply plug in a keyboard and type it in, hit enter when done.
  • If you have a pattern, but your phone locks you out after to many incorrect tries, use the mouse to click the “enter backup PIN” button in the lower right area of the screen. Then plug in the keyboard and type your code in. Once in, the phone will ask for a new lock screen setup, simply hit the home button to get out of this (or Esc on keyboard). Feel for vibration while typing to get an idea if you’re close to getting in (short vib for each keypress, long vib when incorrect PIN entered).

Here are Android Mouse and Keyboard shortcuts from http://paperlined.org

Back Esc
Home Alt+Esc
Windows+Esc
Menu Context Menu key
Ctrl+Esc
Search hold Context Menu key
Windows+Space
Quick Launch Windows key + <letter>
Volume multimedia keys

Additional shortcuts:

  • Alt+Tab — switch between recently-run apps
  • Ctrl+Alt+Del — forcible ungraceful reboot

PC mouse equivalents to Android keys

screen tap Left click
Back Right click
Left side button
Home Middle click

 

Try using the volume keys (or inline volume control on a pair of Samsung earbuds), if the ringtone volume increases, you’re in! Try plugging in to a computer to get your files.

If your phone needs more permissions to see it as a drive on a computer, and you have no idea where to click onscreen to allow them, keep reading.

TalkBack

The holy grail of shattered screen use is to get TalkBack turned on. This built in Android feature will speak everything onscreen, and allow easy control with a keyboard using arrow keys and enter.

If the phone is new enough, hold down the home button to active Google Assistant (unless disabled, it is on by default). Say “Open Accessibility Settings”. Use keyboard and navigate to Vision->Talkback. Flip TalkBack switch. Press OK on both popup screens, phone should speak something like “TalkBack on”.

Ideally, practice going through these menus on a second working phone to get a feel for keyboard navigation. When selecting an area to click with the arrow keys, the selection does not cycle back to the top when it hits the bottom of the menu, which is great.

USB Debugging

With TalkBack on, navigating settings to turn on developer mode and USB debugging is trivial. To turn on developer mode go to settings->about device. You can access settings by navigation, or open Assistant (hold down home) and say “Open Settings”. Hit “build number” area at least 7 times quickly (use enter key). Now developer mode should be on. Navigate to it (right above “about device”) and turn on USB debugging. When you first turn it on, there will be a popup, click OK. USB debugging is now on!

Screen Mirror

Download a screen mirror application on your computer. I use the Chrome extension called “Vysor”. With Vysor installed and USB debugging turned on, Vysor should recognize the phone being plugged in. One last step is to click the OK button on the authorization prompt on the phone. This will allow Vysor full access so it can screen mirror and control the phone.

Unfortunately, you can’t use a keyboard to click the button as the phone is connected to the computer! You will need to connect a bluetooth keyboard.

First reconnect your OTG cable and regular keyboard to the phone, navigate to settings->bluetooth, turn it on, and connect your bluetooth keyboard. This should be easy if you have TalkBack turned on! Practice on a working phone.

Now plug the phone back into the computer and wait for Vysor to detect it. Using the bluetooth keyboard hit the right arrow a couple times, then hit enter. Vysor should start mirroring the screen. You can now control the phone on your computer through Vysor!

Have fun getting your files back!

Leave a comment if you have any questions or tips.

 

Future: Remote Control Roomba Cam over WiFi!

future

Currently in the works… A remote control Roomba, with a pan/tilt camera mount and possibly a simple arm to hit handicapped buttons (to enter doors). Project goal: Use websocket protocol to communicate between a computer and Arduino microcontroller, using an Android phone as the USB/WiFi link.

Using javascript on an HTML page, the computer will send out commands depending on keys pressed on keyboard. The Android phone will take these commands and send them through USB On The Go (OTG) to the Arduino, which will finally control the Roomba through its serial port.  The Arduino can also connect to pretty much anything else, such as lights, motors, or sensors. The video feed is simply IP Camera app running on the Android phone in the background. Nothing super new here, but a fun challenge for me to get my feet wet in internet connectivity. 🙂 Stay tuned! I hope to be done before April 2016

How to unhide your files after a virus attack

repair

The most common virus I see here in NZ is one that makes all the files/folders on the root of the drive hidden system files. Then it makes a bunch of shortcuts with the same file names as the hidden files. But all the shortcuts lead to a virus. It’s very simple to fix. It runs rampant among flash drives as they are plugged into many different computers.

Please note this virus is easily blocked if antivirus software is already on the computer you plug the infected drive into.

To unhide your files, pick an option below.

1st option:
Just download this file UnhideFiles.bat and put it on the root of the flash drive or hard drive you are trying to fix.
You may get a security warning, ignore it. If you are unsure of the cleanliness of the file, use the option below.

2nd option (little harder, but safer):
Open a notepad text document.
Type

attrib -h -r -s /s /d *?

then save as a .bat file.
-h is for not hidden
-r for not read only

-s for not system file

NOTE: Requires Administrator Privileges to run this file!

Double click to open it, a command prompt window will open.

When the window closes, every file is unhid and back to normal, then just delete the viruses.

Best to have an antivirus program on the computer you’re using as well.
I recommend Avira Free Antivirus