Skip to content

Instantly share code, notes, and snippets.

@makenova
Last active February 12, 2024 23:21
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makenova/dba94f69e8f11d9e0eb4 to your computer and use it in GitHub Desktop.
Save makenova/dba94f69e8f11d9e0eb4 to your computer and use it in GitHub Desktop.
How to access files in the Android root file system without root

Access root file system with custom recovery

This describes how to access files and directories on the Android OS that are usually not accessible with a file explorer. All my machines are running OSX so these instructions should work similarly for *nix derivatives. Windows users will require a bit more research on their own. A lot of assumptions are made, so if you require clarification on anything, ask and I'll do my best to answer and update this gist.

Download appropriate Android system tools

You are going to need adb and fastboot commands, you can either install Android Studio or get just the SDK. I suggest just getting the SKD tools because it is a much smaller payload and has everything that you need.

Unzip/Extract the contents of the SKD directory

Execute the android command in the tools directory, it will start the SDK Manager. Uncheck all boxes except the "Android SDK Platform-tools" and click "Install packages...", accept the terms and let the installer run. Close it when it's finished and check the platform-tools directory, it should now contain, among others, the adb and fastboot commands. If you know how to add the commands to your PATH, that will make things a little bit easier but it's not absolutely necessary.

Download custom recovery

TeamWin aka TWRP is my custom recovery of choice but you can use whatever you're comfortable with. Search for your device and follow the instructions to install the appropriate version. I prefer getting a direct download. Take note of where it is saved, this will be the /path/to/recovery.img I will refer to later.

Load custom recovery

Connect your Android device to your computer and run ./adb devices from the "platform-tools" directory, your device should be listed.

Run,

./adb reboot-bootloader

and wait for your device to load the bootloader, then run,

```./fastboot boot /path/to/recovery.img````

The above commands should load the custom recovery. TWRP and any other custom recovery should have a file explorer/explorer, use that to find and copy and the directory or file you need to a location that is accessible by a regular file explorer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment