# Upgrading to Android 4.0.4 on Encrypted Galaxy Nexus



## cynewulf (Oct 1, 2011)

Haven't seen this technique posted anywhere, I derived it on my own this morning. Apologies if this is posted somewhere else.

These instructions are intentionally vague in places on purpose as the procedure is very low level and fraught with peril. Those who know what they are doing should be able to follow along. I am sharing what worked for me to help others.

I offer no support for this technique. Only about 1 hour of testing, but so far my phone on 4.0.4 is running better than ever.

I have only tested this on CDMA Galaxy Nexus upgrading from rooted stock 4.0.2, it may work for others. This will not work with ROMs or updates that change files in the encrypted /data or sdcard area. Check your update.zip to see what files it updates. And check the update-script to see what actions it performs.

Your phone's bootloader must be unlocked.
You must have a working fastboot setup and a working adb setup.

Required Files:
A: ClockworkMod img file. I used Koush's new CWM touch, version 5.8.0.2 found at http://www.clockworkmod.com/rommanager .
B: P3droid's full Android 4.0.4 update ZIP found here at http://www.mydroidworld.com/

Procedure:
1. Use adb to reboot into bootloader mode.
2. Use fastboot to boot into the ClockworkMod img file over fastboot. Use the "boot" parameter.
3. Once CWM loads, "adb shell" into the phone
4. Create a tmpfs mounted on /sdcard. I used 300MB for the size. "mount -t tmpfs -o size=300M,mode=0777 tmpfs /sdcard"​5. (May not be needed) Rename P3droid's ZIP to "update.zip".
6. adb push the update.zip file to /sdcard
7. Extract the update-binary and updater-script from update.zip to /sdcard.
8. Execute "update-binary 2 stdout /sdcard/update.zip"
9. Should see the update progress on your terminal window. The last step takes about a minute and will exit you back to the shell.
10. adb reboot. I removed the USB cable after this point.
11. Android will boot, enter your encryption password, and you will get the notification box once the OS loads that Android is reoptimizing packages. Done, enjoy Android 4.0.4 goodness.

I used this as a reference for using update-binary: https://github.com/CyanogenMod/android_bootable_recovery/blob/ics/install.c

Hope this helps folks.


----------



## bunklung (Sep 7, 2011)

Did you use the OTA (30mb) or http://www.mydroidworld.com/topic/10341-full-imm30b-update-not-the-ota/ (186mb)?

I'm very interested in this. It boggles my mind how OTA updates would be blocked when you encrypted a phone. Seems regressive.


----------



## bunklung (Sep 7, 2011)

I was able to apply the OTA to an encrypted phone:

http://forum.xda-developers.com/showthread.php?p=22473196#post22473196


----------

