Skip to content

Commit

Permalink
Added restore info to ReadMe
Browse files Browse the repository at this point in the history
  • Loading branch information
Walkman100 committed May 24, 2017
1 parent 7668074 commit 25b4ca9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 12,7 @@ A complete guide to rooting the Google Pixel
### ABE (Android Backup Extractor)
- Only used for extracting the backup file, if you don't need to be able to restore a backup then don't bother.
- Download from: https://sourceforge.net/projects/adbextractor/
- easiest is to extract the `*.jar`s and `*.sh`s to this repo, or you could edit the commands to where you put it
- easiest is to extract the `*.jar`s and `*.sh`s to this repo folder, or you could edit the commands to where you put it

## Bootloader
First off, if you have not already, you will have to unlock the bootloader. This wipes the device, so make sure you make a backup first!
Expand All @@ -26,7 26,7 @@ First off, if you have not already, you will have to unlock the bootloader. This
- Run `fastboot oem unlock` while in bootloader, then accept prompt on phone to wipe & unlock

## Rooting
first, make sure you have a terminal open in this repo folder
First, make sure you have a terminal open in this repo folder

If you have just followed the steps above:
- reboot into the bootloader after the phone has finished starting up
Expand All @@ -35,6 35,26 @@ If you have just followed the steps above:

If you have tried to get root working with some other method or Android isn't booting properly:
- run `bash set-up.sh` once-off to download and extract the official firmware
- run `bash root.sh` to flash bootloaders, system image e.t.c. (pretty much everything) and boot into TWRP. it also tells you what to do in TWRP
- run `bash root.sh` to flash bootloaders, system image e.t.c. (pretty much everything) and boot into TWRP. It also tells you what to do in TWRP

## Restoring the backup made from `adb backup`
The most simple command/process is to simply run this after setting up the phone (and enabling USB debugging again):
- `adb restore backup.ab`

However, in my experience this doesn't work completely, so another thing to try:
- run `bash adb-split-no-extraction.sh backup.ab` (from ABE), this will split the backup into smaller backups, one per app
- then run `bash adb-restore.sh`, this simply `adb restore`s all the backups individually

That didn't work for me either, next try:
- run `bash helium-ise.sh` which copies the backups to a folder called `carbon` and puts them in a format that Helium can recognise
- move/copy `carbon` to /sdcard on your phone, then use the app Helium (on Google Play) to restore the backups

That didn't work for me either, next try:
- run `java -jar abe.jar unpack backup.ab backup.tar` (self-explanatory)
- run `tar -xvf backup.tar` (unpacks the tar archive), and `rm backup.tar` (removes it)
- next step is to start ADBD (the adb process on the phone) as root:
- try running `adb root`, if this completes successfully then you're set
- if `adb root` returns `adbd cannot run as root in production builds` as it did on my device, you will need to start ADBD in root mode some other way:
- There is an app: "adbd insecure": https://stackoverflow.com/a/28070414/2999220
- if that app doesn't work (didn't for me), use `bash adb-remount-insecure.sh` after extracting the proper ADBD from the app apk and pushing it to /sdcard
- run `bash "adb push extracted apps.sh"` to forcefully push the data to the phone, then set the proper permissions on the files so they can be accessed by apps
3 changes: 0 additions & 3 deletions adb push extracted apps.sh
Original file line number Diff line number Diff line change
@@ -1,9 1,6 @@
#!/bin/bash
## Based on https://www.semipol.de/2016/07/30/android-restoring-apps-from-twrp-backup.html
## and my own findings on the ADB backup structure
## Also, if `adb root` returns "adbd cannot run as root in production builds"
## as it did on my device, you will need to start ADBD in root mode some other way
## There is an app: "adbd insecure": https://stackoverflow.com/a/28070414/2999220

export adb="~/bin/platform-tools/adb"
export packages=`ls apps`
Expand Down
File renamed without changes.

0 comments on commit 25b4ca9

Please sign in to comment.