Monday, September 7, 2015

The NVidia Kill Switch

So after receiving the replacement NVidia Shield Tablet for the battery recall, I started searching the forums and found a way to defeat the "Kill Switch" for the old tablet after the replacement has been activated.

The TL;DR is that the old tablet has a program called TegraOTA.apk which automatically downloads an "urgent" OTA and applies it without any user permissions.  This OTA would effectively thrash critical files and then reboot itself into a bricked state.  Then at a later date, NVidia is supposed to send out a return kit to retrieve the "dangerous tablet".

However, it looks like there is a way to defeat the "Kill Switch" by effectively disabling or deleting the TegraOTA.apk.  The following is the simple procedure which I used to disable the OTA. [Refer to http://forum.xda-developers.com/shield-tablet/general/kill-kill-switch-shield-tablet-xx-t3179489]

The NVida Kill Switch:
To defeat this with a custom recovery like TWRP, do the following:

  1. Hold "Power" + "Vol Down"
  2. Use Vol Button to select "Recovery" then press "Power" to confirm and enter recovery
  3. For TWRP and from the "Home" menu:
    1. Press "Mount" -> Select "System" -> Return
    2. Press "Advance" -> "File Manager" -> select /system/app/TegraOTA -> Press "Select" and "Delete" folder.

For now this should prevent the OTA download with the kill switch.  Not sure what the future will hold though as NVidia may have a way to bypass this.  But until that Return Kit comes, I'll be enjoying my 2 tablets



How to Unlock, Root and Custom Recovery for the NVidia Shield

NVidia had a battery recall for the NVidia Shield Tablet a month back.  I received my Shield two weeks ago but I never got the time to migrate over to the new shield until now.  So I have rooted this device before, but I seemed to have lost my notes to do so.  So today I'm going to document my process for my future reference and those TL;DR peeps.  You can also refer to this excellent link:
[Refer to http://forum.xda-developers.com/shield-tablet/general/stock-recovery-images-ota-library-guides-t2988881]

NOTE: Use these instructions at your own risk, I am not responsible for any damages to your device

Step 1: Backup your Old Shield
Unfortunately my device was unrooted during the last OTA update (the battery recall check image), so I was not able to utilize Titanium Backup without re-rooting.  Fortunately most of my data is the external 32GB SD card, so I had a few files to migrate over from internal flash to my external SD card.  I just noted my file organization and installed applications list (this is already saved in your google account).

Step 2: Download the necessary files for your host system(windows)
  1. ADB Drivers - Install for the NVidia Shield (choose one):
  2. Minimal ADB and Fastboot - Install these tools for unlocking and flashing: 
  3. SuperSU - Install this on the Shield to get root: 
  4. TWRP (or CWM) Custom Recovery - Easy way to manage your images: 
  5. [Optional] SD Card to copy SuperSU and OTA image (for updates)
Step 3: Install the following downloaded files from Step 2
  • ADB Drivers
  • Minimal ADB and Fastboot
Step 4: Enable Developer Mode
  1. On the tablet, go to "Settings" -> "About tablet"
  2. Tap "Build Number" 10 times
  3. Plug your Shield Tablet to the your computer (Note: you may need to manually update the drivers via Device Manager)
  4. Go to "Settings" -> "Developer options" -> Click on "USB debugging" and on "Always USB Debugging" select OK 
Step 5: Boot into Fastboot Mode
  1. Fully power off your Shield Tablet by holding down the power button then select "Power Off"
  2. Power on your device by simultaneously holding "Power" button + "Down / Vol-" Button and release when it powers on.
  3. Select "Fastboot Protocol"
Step 6: Unlock the Bootloader (WARNING: May void your warranty and ALL OF YOUR DATA WILL BE DELETED)
  1. Open "Minimal ADB and Fastboot" shell
  2. Enter "fastboot devices" and verify that your device is listed
  3. Enter "fastboot oem unlock"
  4. Select "Unlock Bootloader" with Vol+/- and press "Power" to select
  5. You should now be unlocked
Step 6: Install TWRP Recovery
  1. Copy the TWRP image to your "Minimal ADB and Fastboot" directory
    • e.g. "twrp-2.8.7.1-shieldtablet.img" to "C:\Program Files (x86)\Minimal ADV and Fastboot>"
  2. Enter "fastboot flash recovery twrp-2.8.7.1-shieldtablet.img"
  3. Select "Recovery" on tablet using Vol+/- buttons and press power to boot your new recovery partition TWRP
  4. It will prompt you to "Keep System Read Only", just proceed to Allow Modification
Step 7: Root/ReRoot Shield Tablet
  1. Copy "UPDATE-SuperSU-v2.46.zip" to your SD card and install SD into Shield Tablet
  2. Tap "Install", navigate to the "external_sd" and select "UPDATE-SuperSU-v2.46.zip" to install
Step 8: [Optional] Install latest OTA:
  1. Download OTA from NVidia or from:
  2. Copy image to SD Card
  3. Tap "Install", navigate to the "external_sd" and select "OTA Image" to install

NOTE: If you have trouble booting, Go to recovery (TWRP) and wipe the cache partition