Looking for an insecure boot image (with ro.secure = 0) for your Google Nexus S after updating it with the latest Android 4.1.1 Jelly Bean JRO03E OTA, to be able to use adb remount and get full root access from ADB shell to your internal memory with ADB commands? You are at the right place. For details and the download link, read on.
When I recently updated my Nexus S to Jelly Bean using Google’s OTA update JRO03E, one of the next things I did was to try pulling the framework-res.apk file via ADB to edit the gradient background in settings and make it full black. The only problem: ADB didn’t let me do that. Having been a user of custom ROMs previously (coming from AOKP ROM as my last one), I had pretty much forgotten that stock firmware ships with a secure boot image. I looked around on XDA to find one but couldn’t; the latest one available there was for the ICS 4.0.4 firmware, so I decided to look further into it.
Technical Nitty Gritty:
At first, I looked into the OTA’s zip file to pull out the latest boot image in order to make it insecure, but turns out Google didn’t ship one directly with the ROM. I thought perhaps the one from ICS is being retained but upon looking into the flashable zip’s updater-script file, it turns out Google decided to directly patch the previous one with the OTA, rather than retaining it or flashing a new one from scratch. Here is the code, for those interested:
ui_print(“Patching boot image…”);
“-”, fec1df0a112859197baf6ecf4c204608c157d88b, 4059136,
So apparently, the old ICS one won’t do. I just extracted the boot image from my Nexus S using cat, pulled it to the PC, unpacked it, changed ro.secure=1 to 0 in default.prop of the ramdisk, repacked it and viola – the insecure boot image was read.
I tried booting into it from fastboot first without flashing it, using fastboot boot insecure-boot.img, and it worked, so I rebooted into bootloader again to flash it, and it’s been working great ever since. I can use adb remount, adb pull system files and pretty much everything through adb without any restrictions. Being my first time meddling with any operating system at this core level, I must say it was quite exciting.
Had enough of the details? Let’s get the insecure boot image up and running on your Nexus S.
Proceed entirely at your own caution. HQTech will NOT be responsible if your device gets harmed in any way or to any extent by following these instructions or using this insecure boot image.
- Google Nexus S International version (aka soju and crespo) running Android 4.1.1 Jelly Bean
- Insecure Android 4.1.1 Jelly Bean boot image for Nexus S. (Download link provided at the end of this post)
- Android SDK installed for fastboot. I recommend adding the tools and platform-tools folders of SDK to your PATH environment variable, if you haven’t already done so.
- USB drivers for your Nexus S installed on your PC and phone properly recognized in fastboot mode.
- Download the insecure boot image from the link given above.
- If you haven’t added tools and platform-tools folder of the SDK to your PATH environment variable, copy the boot image file to platform-tools inside your Android SDK folder (or to tools, if you have an older version of the SDK that had fastboot in the tools folder).
- Put your phone into fastboot/bootloader mode and connect it to your PC via USB.
- On your computer, launch a command prompt window and browse to the location of the insecure boot image file on your PC.
- Enter this command:
fastboot boot insecure-boot.img
- This will attempt to boot your phone with this insecure boot image without flashing it. If it boots fine, everything is OK and you should reboot into bootloader again to flash it. If it doesn’t boot fine, download the image again and retry.
- Once you have rebooted your phone back into the fastboot mode, enter this command:
fastboot flash boot insecure-boot.img
- Once the image has been successfully flashed, just reboot your phone.
You now have the insecure boot image flashed on your phone, and can use adb as root from your PC. Enjoy!