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
Owner
v1nc
v1nc
✨ Powerfull & Universal Link Bypasser ✨

✨ Powerfull & Universal Link Bypasser ✨

Vodkarm06 4 Jun 03, 2022
A kAFL based hypervisor fuzzer which fully supports nested VMs

hAFL2 hAFL2 is a kAFL-based hypervisor fuzzer. It is the first open-source fuzzer which is able to target hypervisors natively (including Hyper-V), as

SafeBreach Labs 115 Dec 07, 2022
Solución al reto BBVA Contigo, Hack BBVA 2021

Solution Solución propuesta para el reto BBVA Contigo del Hackathon BBVA 2021. Equipo Mexdapy. Integrantes: David Pedroza Segoviano Regina Priscila Ba

Gabriel Missael Barco 2 Dec 06, 2021
Confluence Server Webwork OGNL injection

CVE-2021-26084 - Confluence Server Webwork OGNL injection An OGNL injection vulnerability exists that would allow an authenticated user and in some in

Fellipe Oliveira 295 Jan 06, 2023
CVE-2021-40346 integer overflow enables http smuggling

CVE-2021-40346-POC CVE-2021-40346 integer overflow enables http smuggling Reference: https://jfrog.com/blog/critical-vulnerability-in-haproxy-cve-2021

donky16 34 Nov 15, 2022
Extensive Python3 network scanner, simplified.

Snake Map Extensive Python3 network scanner, simplified. _,.--. --..,_ .'`__ o `;__, `'.'. .'.'` '---'` '

Miss Bliss 4 Apr 16, 2022
IDA Frida Plugin for tracing something interesting.

IDAFrida A simple IDA plugin to generate FRIDA script. Edit template for functions or you can use the default template. Select functions you want to t

PandaOS 133 Dec 24, 2022
Fast Fb Cracking Tool

fb-brute Fast Fb Cracking Tool 🏆

Aryan 8 Jun 29, 2022
Laravel RCE (CVE-2021-3129)

CVE-2021-3129 - Laravel RCE About The script has been made for exploiting the Laravel RCE (CVE-2021-3129) vulnerability. This script allows you to wri

Joshua van der Poll 21 Dec 27, 2022
EMBArk - The firmware security scanning environment

Embark is being developed to provide the firmware security analyzer emba as a containerized service and to ease accessibility to emba regardless of system and operating system.

emba 175 Dec 14, 2022
This is tools hacking for scan vuln in port web, happy using

Xnuvers007 PortInjection this is tools hacking for scan vuln in port web, happy using view/show python 3.9 solo coder (tangerang) 19 y/o installation

XnuxersXploitXen 6 Dec 24, 2022
Send CVE information to the specified mailbox (from Github)

Send CVE information to the specified mailbox (from Github)

91 Nov 08, 2022
2022-bridge - Example code belonging to the Bridge pattern video

Let's Take The Bridge Pattern To The Next Level This video covers how the bridge

11 Jun 14, 2022
Pre-Auth Blind NoSQL Injection leading to Remote Code Execution in Rocket Chat 3.12.1

CVE-2021-22911 Pre-Auth Blind NoSQL Injection leading to Remote Code Execution in Rocket Chat 3.12.1 The getPasswordPolicy method is vulnerable to NoS

Enox 47 Nov 09, 2022
Get related domains / subdomains by looking at Google Analytics IDs

DomainRelationShips ██╗ ██╗ █████╗ ██╗██████╗ ██║ ██║██╔══██╗ ██║██╔══██╗ ██║ ██║█████

Josué Encinar 161 Jan 02, 2023
PoC for CVE-2021-26855 -Just a checker-

CVE-2021-26855 PoC for CVE-2021-26855 -Just a checker- Usage python3 CVE-2021-26855.py -u https://mail.example.com -c example.burpcollaborator.net # C

Abdullah AlZahrani 17 Dec 22, 2022
The best Python Backdoor👌

Backdoor The best Python Backdoor Files Server file is used in all of cases If client is Windows, the client need execute EXE file If client is Linux,

13 Oct 28, 2022
Automated tool to exploit basic buffer overflow remotely and locally & x32 and x64

Automated tool to exploit basic buffer overflow (remotely or locally) & (x32 or x64)

5 Oct 09, 2022
test application for the licence key web app.

licence_software_test_app Make sure you set your database values in a .env file to the folder. Install MYSQL connector: pip install mysql-connector-py

Carl Beattie 1 Oct 28, 2021
A Python Tool that uses Shodan API's to perform quick recon for vulnerabilities

Shodan Quick Recon A Python Tool that uses Shodan API's to perform quick recon for vulnerabilities Configuration You must edit the python code, and in

Black Hat Ethical Hacking 5 Aug 09, 2022