Data Recovery from your broken Android phone

Overview

Broken Phone Recovery

a guide how to backup data from your locked android phone if you broke your screen (and more)

you can skip some steps depending on your situation

You need:

  • usb otg adapter for your phone
  • usb keyboard
  • raspberry pi zero
  • a second device to run adb and backup data
  • a bluetooth input device (like a joystick controller) or some app to remote control your phone(e.g teamviewer)

0. Preparation:

1. Unlock:

A) Password Lock:

  • connect keyboard via otg.
  • press ENTER, then SPACE.
  • type in your password and hit enter.
  • if your password contains y/z and it does not work, your keyboard layout could be different, try switching y/z in your password.
  • wait for the click sound to verify its unlocked.

B) Pattern lock:

  • open unlock.py in your favorite editor.
  • if your pattern does not start in the top left corner, add move_right(), move_left(), move_up() or move_down() after line 118, to navigate to your starting point.
  • if your pattern is not the small v, edit the lines after 141 to implement your pattern. Look at the examples in the script.
  • make sure to copy the modified unlock.py to the pi.
  • connect the raspberry's otg port to your phone, if your sound does work and you hear the charging sound, remove the cable you connected to your phones otg adapter and reconnect, until you hear a different sound.
  • execute python3 unlock.py.
  • if you get IOError: [Errno 108] Cannot send after transport endpoint shutdown, then the raspberry is not connected properly via otg.
  • wait for the script to finish and hear the unlock sound, if your sound works.
  • if you are lucky and your phone automatically connects to your adb device, you can proceed with step 5.

2. Talkback

the easiest way to control your broken phone is Talkback. Once its enabled, you can use your keyboard to navigate and your phone will read out the screen content

  • if you are lucky and your volume buttons still work, you can enable talkback by holding down vol+ and vol- for 3 seconds.
  • keep in mind that to unlock your phone with unlock.py, you need to disable talkback again.
  • if your volume buttons dont work or the shortcut is disabled, you can use talkback.py
  • run python talkback.py and it will ask you if you want to use google assistant to open settings
  • if you type y, say open settings in your phone language, once the script asks you to do
  • using google assistant is more reliable to open apps, but if you type n the script will try to open settings with the mouse
  • wait for the script to enable talkback

3. Prepare adb connection

if your phone does not automatically enables the adb connection, or you did not authenticate your device with your phone before, you need another input method to enable the connection, because you probably can not connect an usb keyboard and your adb device at the same time.

A) connect bluetooth controller:

if you have some bluetooth controller or keyboard, you can use it to control your phone while it should connect to your adb device.

  • if you are lucky you already connected the controller and only need to enable bluetooth if disabled.
  • otherwise you can use your keyboard and talkback to open settings, enable bluetooth and connect the controller.
  • because initial connection is not always straightforward with cheap controllers, you can also use the play store or your favorite app store to install Screen Stream
  • if you are lucky and your phone is connected with your google account, you can login to the playstore on your browser and install the app on your phone without any interaction
  • launch the app and navigate with talkback to enable screen sharing. Use TAB to select the button after 'exit' which is probably unnamed, press ENTER, TAB, TAB, ENTER to enable the sharing. Then you can watch your screen on http://phone_ip:8080.
  • next steps will be more comfortable, because you do not need talkback anymore
  • finally connect your bluetooth controller/keyboard

B) connect remote control app:

if you dont have a bluetooth device, you need to setup a remote control app like teamviewer

  • install teamviewer host on your phone with talkback, your keyboard and your favorite play store
  • if you are lucky and your phone is connected with your google account, you can login to the playstore on your browser and install the app on your phone without any interaction
  • install teamviewer on your second device and connect your phone

4. Connect adb

  • connect your phone to your adb device
  • use your bluetooth controller or remote control app to enable developer settings and MTP
  • authenticate your device

5. Backup your data

  • use other tutorials to backup your app data
  • some apps like banking or OTP apps set android:allowBackup=False, then you can only backup app data if your boot loader is unlocked
  • install scrcpy to open OTP apps like Aegis and copy your backup code. Most of them disable screen sharing with teamviewer or Screen Stream, but scrcpy works anyway.

6. Contribution

  • feel free to create an issue if something does not work, or you have a use case that is not covered in this tutorial
  • also any other contributions are welcome

todo:

  • update unlock.py so user can pass pattern string and doesnt need to edit the script
  • add script to start screen sharing
  • look for foss screen sharing and remote controlling apps
You might also like...
Android Malware (Analysis | Scoring) System
Android Malware (Analysis | Scoring) System

An Obfuscation-Neglect Android Malware Scoring System Quark-Engine is also bundled with Kali Linux, BlackArch. A trust-worthy, practical tool that's r

This is an injection tool that can inject any xposed modules apk into the debug android app

This is an injection tool that can inject any xposed modules apk into the debug android app, the native code in the xposed module can also be injected.

A python script to decrypt media files encrypted using the Android application 'Decrypting 'LOCKED Secret Calculator Vault''. Will identify PIN / pattern.

A python script to decrypt media files encrypted using the Android application 'Decrypting 'LOCKED Secret Calculator Vault''. Will identify PIN / pattern.

We protect the privacy of the data on your computer by using the camera of your Debian based Pardus operating system. 🕵️

Pardus Lookout We protect the privacy of the data on your computer by using the camera of your Debian based Pardus operating system. The application i

Generate your own NFTs and their metadata based on your desired probabilities.

Generate your own NFTs and their metadata based on your desired probabilities. Use your own art assets too! Perfect for use with Candy Machine.

PrivateRoom - Make your work private by building a system using arduino which instantly kills a program when someone enters your room/cabin

privateRoom Make your work private by building a system using arduino which instantly kills a program when someone enters your room/cabin STEPS: Uploa

Acc-Data-Gen - Allows you to generate a password, e-mail & token for your Minecraft Account

Acc-Data-Gen Allows you to generate a password, e-mail & token for your Minecraft Account How to use the generator: Move all the files in a single dir

Safety checks your installed dependencies for known security vulnerabilities
Safety checks your installed dependencies for known security vulnerabilities

Safety checks your installed dependencies for known security vulnerabilities. By default it uses the open Python vulnerability database Safety DB, but

Vulnerability Scanner & Auto Exploiter You can use this tool to check the security by finding the vulnerability in your website or you can use this tool to Get Shells
Vulnerability Scanner & Auto Exploiter You can use this tool to check the security by finding the vulnerability in your website or you can use this tool to Get Shells

About create a target list or select one target, scans then exploits, done! Vulnnr is a Vulnerability Scanner & Auto Exploiter You can use this tool t

Owner
v1nc
v1nc
Windows Server 2016, 2019, 2022 Extracter & Recovery

Parsing files from Deduplicated volumes. It can also recover deleted files from NTFS Filesystem that were deduplicated. Installation git clone https:/

null 0 Aug 28, 2022
Yesitsme - Simple OSINT script to find Instagram profiles by name and e-mail/phone

Simple OSINT script to find Instagram profiles by name and e-mail/phone

null 108 Jan 7, 2023
Arbitrium is a cross-platform, fully undetectable remote access trojan, to control Android, Windows and Linux and doesn't require any firewall exceptions or port forwarding rules

About: Arbitrium is a cross-platform is a remote access trojan (RAT), Fully UnDetectable (FUD), It allows you to control Android, Windows and Linux an

Ayoub 861 Feb 18, 2021
Pupy is an opensource, cross-platform (Windows, Linux, OSX, Android) remote administration and post-exploitation tool mainly written in python

Pupy Installation Installation instructions are on the wiki, in addition to all other documentation. For maximum compatibility, it is recommended to u

null 7.4k Jan 4, 2023
Android Malware Behavior Deleter

Android Malware Behavior Deleter UDcide UDcide is a tool that provides alternative way to deal with Android malware. We help you to detect and remove

null 27 Sep 23, 2022
SARA - Simple Android Ransomware Attack

SARA - Simple Android Ransomware Attack Disclaimer The author is not responsible for any issues or damage caused by this program. Features User can cu

Termux Hackers 99 Jan 4, 2023
adb - A tool that allows you to search for vulnerable android devices across the world and exploit them.

adb - An exploitation tool for android devices. A tool that allows you to search for vulnerable android devices across the world and exploit them. Fea

null 136 Jan 2, 2023
this keylogger is only for pc not for android but it will only work on those pc who have python installed it is made for all linux,windows and macos

Keylogger this keylogger is only for pc not for android but it will only work on those pc who have python installed it is made for all linux,windows a

Titan_Exodous 1 Nov 4, 2021
Dumps the payload.bin image found in Android update images.

payload dumper Dumps the payload.bin image found in Android update images. Has significant performance gains over other tools due to using multiproces

Rasmus 7 Nov 17, 2022
Web3 Pancakeswap Sniper & honeypot detector Take Profit/StopLose bot written in python3, For ANDROID WIN MAC & LINUX

?? Pancakeswap BSC Sniper Bot web3 with honeypot detector (ANDROID WINDOWS MAC LINUX) ?? ⭐️ ⭐️ ⭐️ First SNIPER BOT for ANDROID & WINDOWS with honeypot

Mayank 12 Jan 7, 2023