HowTo - Reset Android Nexus 6, Update, and Re-Root

Clear out cruft and get OTA updates - this whole process takes a few hours

First - Backup

Check that Android backup is enabled

Settings > Backup & reset
Back up my data: On
Backup account: “<my email>“
Automatic restore: On

Backup Tasker data

Backup to file

(Using backup to Android cloud didn’t work for me last time, and I lost everything)

Data > Backup
Save as “Download/Tasker-backup-<timestamp>.xml”

Upload that file:

Open Dropbox
Click “(+)”
Click “Upload files”
Click “Nexus 6”
Click “Download” folder
select the Tasker-backup-<timestamp>.xml file
Upload to backup/

Backup Nova Launcher settings to Google drive

Nova Settings > Backup & import settings > Backup
Use the auto-generated name (timestamp)
Select “Document Storage”
OK
Save in “Backups” folder in Google Drive

Backup Firefox Bookmarks

Just take a screenshot, I only have a few bookmarks

Backup Photos

Menu > Device Folders

Review which folders are synced, make sure that includes:

Backup Pocket Casts Subscriptions

Settings > Import & Export > Send email

and send to my gmail account

Backup Download Folder

Use “Wifi File Transfer” app to download files to computer

Backup SMS Messages

Use “SMS Backup+” app

(this should already be setup - if not see here)

Flash Updated Stock Image

Download the image

Get the newest stock image from here:
https://developers.google.com/android/images#shamu
I downloaded the latest 7.1.1 image: “7.1.1 (N6F27M, Oct 2017)”

(must have at least this version, or it will not be able to restore the Apps & Settings from the previous backup)

This is ~1GB file. Once that is downloaded, verify the SHA-1 hash:

$ shasum -a 256 shamu-n6f27m-factory-bf5cce08.zip
bf5cce08f62344d79d5b533875c3485a03accf45bd28f45a4455154a2d83618c  shamu-n6f27m-factory-bf5cce08.zip

unzip it:

$ cd ~/Downloads/
$ unzip shamu-n6f27m-factory-bf5cce08.zip
Archive:  shamu-n6f27m-factory-bf5cce08.zip
   creating: shamu-n6f27m/
  inflating: shamu-n6f27m/radio-shamu-d4.01-9625-05.45+fsg-9625-02.117.img
  inflating: shamu-n6f27m/flash-all.bat
  inflating: shamu-n6f27m/flash-base.sh
  inflating: shamu-n6f27m/flash-all.sh
 extracting: shamu-n6f27m/image-shamu-n6f27m.zip
  inflating: shamu-n6f27m/bootloader-shamu-moto-apq8084-72.04.img

Enable USB debugging (if not already enabled):

Settings > About phone > Tap “Build number” 7 times (this enables Dev options)
Settings > Developer Options > Enable “USB Debugging” OK

Get the Android Command Line Tools

Download the commands line tools here, under “Get just the command line tools” (this is like 1/10th the size of the full Android Studio install)

unzip that:

$ cd ~/Downloads/
$ unzip sdk-tools-darwin-3859397.zip -d ~/Android/

(prints a lot of stuff)

Then download the platform-tools:

$ cd ~/Android/tools/
$ ./bin/sdkmanager "platform-tools"

(prints out a lot of license legalese)

Accept? (y/N): y
done

Which should install that into ~/Android/platform-tools/

Flash the stock image

Connect phone to laptop via USB
Click “OK” if there is a popup to enable USB debugging

setup my PATH (since these aren’t there normally):

$ export PATH=$PATH:$HOME/Android/platform-tools

Check connection

$ adb devices
List of devices attached
ZX1G2264PB device

reboot into fastboot/bootloader:

$ adb reboot bootloader

(Phone should reboot to fastboot screen)

$ fastboot devices
ZX1G2264PB fastboot

Finally, flash the stock image

$ cd ~/Downloads/shamu-n6f27m/
$ ./flash-all.sh

(writes a lot of stuff to the screen)

rebooting...

finished. total time: 436.926s

(that total time is a lie - it actually took about 16 minutes this last time I ran it)

After it finishes writing everything it will reboot and start the setup process.

Setup Phone

Welcome

Select “English (United States)”
LET’S GO

Welcome to your Nexus 6

Select “Copy your data”

Get connected

Select WiFi network and sign in

It will show “Checking for updates…”

Bring your data from…

Select “A backup from the cloud”

It will show “Just a sec…”

Verify your account

Sign in with my email, that has all the backup stuff and apps and whatever

(I have 2FA setup with this phone, and it should be able to verify that automatically)

It will show “Checking info…”

click YES to add the account

It will show “Getting account info…”

Which device?

Select “Nexus 6”

Restore apps from Nexus 6

Select “Restore all XXX apps”
RESTORE

It will show “Just a sec…”

Protect your phone

Choose “PIN”

Secure start-up

Select “Require PIN to start device”
NEXT

Choose your PIN

Select a PIN, and confirm it

Google Services

[x] Automatically back up device data
[x] Let Google’s location service help apps
[ ] Improve location accuracy
[ ] Help improve your Android experience
NEXT

Anything else?

(nope)

ALL SET

It will show “Adding finishing touches…”

Setup Apps

Nova Launcher

In the Apps screen, click “Nova Launcher Prime” to download Nova Launcher

Open it after downloading, it will show “Welcome to Nova!”
SELECT BACKUP…

Click “Browse…” under “Document Storage”

Drive > My Drive > Backups

Select the most recent *.novabackup file

Delete current layout?
OK

Click the Nova Launcher icon on the home screen

Click the home button at the bottom of the screen
Use Nove Launcher as Home
ALWAYS

Click the home button again to get to settings

“Select Default Home”
Use Nove Launcher as Home
ALWAYS

Dropbox

Once this is installed, sign in

KeePass

This should already be configured to pull from Dropbox - verify that I can sign in

Import settings for Tasker

In Dropbox:
Files > backup click the menu next to Tasker-backup-<timestamp>.xml file
Export > Save to device
save in “Downloads”

In File Manager:
Create sdcard/Tasker/configs/user directories
Select the Tasker-backup-<timestamp>.xml file
Move to
Select sdcard/Tasker/configs/user

In Tasker:
Data > Restore > User Local Backup
Select Tasker-backup-<timstamp>.xml file
OK

Import Pocket Casts subscriptions

(This should already be there as part of the restored settings)

Setup SMS Backup

Open “SMS Backup+” app
Click “Connect”
Allow access to contacts
Select my google account
OK
Backup or skip? BACKUP
Allow to send and view SMS
enable “Auto backup”
click “Auto backup settings”
Regular schedule: 6h
Incoming schedule: 1h
Require Wifi [x]
3rd party integration []

Re-Root

Note: I didn’t do this last time, because I don’t really need CF.Lumen anymore

Connect phone to laptop

Enable USB debugging (if not already enabled):
Settings > About phone > Tap “Build number” 7 times (this enables Dev options)
Settings > Developer Options > Enable “USB Debugging” OK

Connect phone to laptop via USB,
Click “OK” if there is a popup to enable USB debugging

setup the PATH

$ export PATH=$PATH:/Users/mikrostew/Library/Android/sdk/platform-tools/
$ adb devices
List of devices attached
ZX1G2264PB device

Get SuperSU zip on phone storage

Download the latest supersu zip:
http://www.supersu.com/download#zip
(2.8.2 as of this)

Transfer that to the phone (still connected via USB)

$ adb push ~/Downloads/SuperSU-v2.82-201705271822.zip /sdcard/supersu.zip
[100%] /sdcard/supersu.zip

Install TWRP

Download the latest TWRP for the Nexus 6 (shamu)
https://dl.twrp.me/shamu/
(3.1.1-0 as of this)

Then use the instructions here for fastboot install method
https://twrp.me/devices/motorolanexus6.html
(reproduced and modified below)

reboot into fastboot/bootloader:

$ adb reboot bootloader

(phone reboots into fastboot)

$ fastboot devices
ZX1G2264PB fastboot

Flash TWRP and SuperSU

$ fastboot flash recovery ~/Downloads/twrp-3.1.1-0-shamu.img
(bootloader) has-slot:recovery: not found
target reported max download size of 536870912 bytes
sending 'recovery' (11757 KB)...
OKAY [ 0.371s]
writing 'recovery'...
OKAY [ 0.158s]
finished. total time: 0.528s

Then, use arrow-down twice to get into recovery

Enter PIN to get into TWRP

[x] Never show this screen during boot again
Swipe to allow modification

Tap “Install”
Select supersu.zip file
Swipe to confirm flash
Wipe cache/dalvik
Reboot System
[ ] Prompt to install TWRP app if not installed
[ ] Install as a System App
tap “Do Not Install”

(phone will reboot, maybe a couple times)

SuperSU app should be available now

Get CF.Lumen Working

This is the only reason I root my phone

launch CF.Lumen app, and grant superuser priviledges

Setup settings:

Location

[x] auto-update location

Master filter mode

Automatic
SAVE

Daytime color filter

Disabled

Sundown color filter

Temperature
3200K
OK
Click the brightness icon in upper right corner
[ ] Adjust brightness
[ ] Automatic brightness
Darken filter: 0.400
OK
SAVE

Sleep color filter

Red
Click the brightness icon in upper right corner
[ ] Adjust brightness
[ ] Automatic brightness
Darken filter: 0.850
OK
SAVE

Sleep: Start time

00:00
DONE

Sleep: End time

06:00
DONE

Wake from alarm [ ]
Sleep in the dark [ ]
Wake from sleep [ ]
Bright light [ ]
Calibrate (doesn’t matter)

Notification mode: Always
Notification icon mode: When active

Launch on boot [x]
Filter fade speed: whatever’s there is fine
Theme: Holo Dark
Driver: CF.Lumen (best quality) - only possible with root
Driver: CF.Lumen: Mode: Compatibility