Rooting an Android Device

Rooting an Android Device (Android 6.0)

This method is specifically for non-rooted Nexus 5 and Nexus 6 devices running Android 6. NowSecure Lab version 3.5.2 or higher is required. Please backup all necessary data and root your device with caution.

Requirements:

  • Nexus 5 or 6 device running Android 6.0 (Marshmallow)

  • A Linux Host/VM (not specifically required, but these instructions are best followed using Linux (Santoku))

Steps:

  1. Connect the device to the Linux environment using the USB cable.  If you are using a VM, ensure that the device has been properly passed through.

  2. Ensure USB Debugging is enabled. To do so: ​​

  • On Device, go to Settings->About Phone.

  • Scroll to the bottom and tap “Build Number” 7 times.

  • Go back to the previous screen (Settings), and you should now see “Developer Options.”

  • Go there and check “USB Debugging” to enable the setting.

  • You should receive an RSA Fingerprint prompt on the device.

  • Click allow to continue

  1. Download Open TWRP Recovery for the correct device: https://twrp.me/ (“hammerhead” for Nexus 5, for example)

  2. Copy the openrecovery-twrp-{device}.img file to /usr/share/vialab/data/bin/files

  3. From a terminal, change the directory to /usr/share/vialab/data/bin/files

  4. Run the root linux script to root your device: sudo ./root-nexus6.sh

The script will complete with following dialog:

Done processing script file
Device will reboot into stock recovery. Please perform a factory reset from stock recovery:
1\. Press and hold the power button, then press volume up. A menu will appear.
2\. Select 'Wipe data/factory reset' in the menu
3\. When the factory reset is performed, you can reboot into system normally. DONE!

  • On the device, perform option 1.  Press and hold the power button, then press volume up.  A menu will appear on the device, “Reboot system now” is selected by default

  • Press the Power button to select

  • The device will reboot.  The SuperSU app should be installed. You are now ready for provisioning.

Rooting an Android Device (Android 4.x/5.x)

This method utilizes the Chainfire Auto-Root method for gaining root access and installing SuperSU. If you are not using a Google Device (Nexus series), then rooting your device may get a little more complicated. This method is intended to keep things simple, and is provided as a way to easily root the standard NowSecure Lab devices. NowSecure Lab Workstation version 3.5.2 is required for Android 5 and up.

Requirements:

  • Non-Rooted Android Device that is compatible with the CF-Auto-Root method.

  • A Linux Host/VM (not specifically required, but these instructions are best followed using Linux (Santoku))

  • Internet Connection (to download the auto-root utility)

Steps:

  1. Download the CF-Auto-Root utility for your specific device: http://autoroot.chainfire.eu/

  2. If this is your first time using this utility, you may want to take the time to read through the initial instructions. When you are ready, scroll all the way to the bottom for Google devices.

  3. Connect the device to the Linux environment using the USB cable. If you are using a VM, ensure that the device has been properly passed through.

  4. Start the device in fastboot mode with one of the following methods:

  • Using adb: With the device powered on, execute: adb reboot bootloader

  • Using a key combo: Turn the device off, then turn it on and immediately hold down the relevant key combination for your device. For example, to put a Nexus 5 (“hammerhead”) into fastboot mode, press and hold Volume Up + Volume Down + Power as the device begins booting up.

  1. You will need to extract the downloaded zip file, and navigate to that directory using a terminal window. From there you can run this command: sudo ./root-linux.sh

  2. A red android pirate should appear on the screen. Once the process completes, the device will reboot, and will be successfully rooted.