Nexus S (GSM) android 4.0.4 Official update (with download links !!)

Search This thread

mtothearkus

Senior Member
Nov 4, 2011
106
95
I was able to update with stock recovery,was on 2.3.6 and did the incremental update to 4.0.3 and 4.0.4 in one step with stock recovery (2.3.6)

Sent from my Nexus S using XDA
 

qorron

Member
Dec 5, 2011
27
32
Excellent post! I'll bet you dollars to doughnuts that if you flash the OTA update manually, it re-mounts cache RO, causing the OTA to fail. If you go from the OTA software in the ROM, it probably sets some flag that causes the stock recovery to keep the cache partition RW so the flash will succeed.

The OTA update works fine as long as you wait for the popup, then tap "restart and install". If you try to flash it manually, it will fail in the ICS stock recovery 100% of the time. Works fine if you flash it from CWM or a stock Gingerbread recovery though.

Your post pretty much cements that there was some kind of change in the ICS stock recovery images that makes it impossible to manually flash OTA images anymore. I can understand the reasoning for this on Google's part...but I don't agree with it. I'm sure in the end, they figure people like us probably aren't using stock recovery anyway, so we'll get the updates installed no matter what. At the same time, it keeps not-so-technical users in check and stops them from doing something potentially dangerous.

I haven't found any evidence in the updater-script, that it checks something and umounts the /cache if something isn't right just to cause an error.

The only 'mount' line in there is the first one which mounts /system

Also, the problem only exists for incremental updates for there are no checks what so ever in the full update. Thats why it is possible to flash a full 2.3.6 or 4.0.3 over the 4.0.3.

If I where asked to make any guesses, I would suspect a bug in the stock recovery of 4.0.3 or of all ICS roms that just prevents the /cache to be mounted.

I've studied the source a little bit to understand whats going on.
If there is a bug, I haven't found it yet.

I've searched the commit messages for a hint that this behavior is intentional.
I've found nothing so far.

Maybe someone wants to downgrade to a 2.3.3 version just to get an OTA link for a full 4.0.4, which should work just fine on the ICS recoveries. ;-)
(I assume that it exists, but just no one who cares has has a version old enough to get a full OTA)

I'm very sure, that this is a bug in in the recovery. Because if it would be intentional, it's implemented in a very bad way, and it is even flawed.
They could have just removed the option if they don't want that.

Just thinking of Occam's razor.
 

Jygar

Senior Member
Dec 25, 2006
426
31
Gloucester
Manage to do it by unlocking the boot loader and installing CWM.

Then flashed 4.0.3 full, followed immediately by 4.0.4.

Then relock the boot loader.

That way it restore the default recovery.

Sent from my Nexus S using xda premium
 

mindwalkr

Senior Member
Jun 6, 2011
109
8
I seem to be having a problem... it keeps popping up (like every 10 mins) a small triangle notification on the notification bar claiming that I changed my account or my password is wrong. However it is right.. I am authenticated in Google Play and so on.. however the Google webpage in the stock Browser has a link to sign in..

If I authenticate on the triangle as requested, it goes away and comes back in 10 mins... the browser keeps showing all the time "Sign In" on google's home page...

bananas!

maybe I'll delete my account and create it again... anyone else experiencing the same ?
 

jurvyx

Senior Member
Nov 8, 2011
71
5
Zagreb
We have a Winner!! :)

I was about to post the exact same after I finished my updated. I'll provide the exact steps that I did

Prior to trying this I too had this show up when I tried to update manually:

"assert failed: apply_patch_space(15916988)
E:Error in /tmp/sideload/package.zip
(Status 7)"



OK so here goes the steps:

Notes:
*My phone's model is GT-I9020T from WIND
*I was running the previously leaked 4.0.3 that was freshly installed
*My Phone was rooted and had the bootloader unlocked
*I tried this on my windows system
*Make sure that your phone is plugged into your computer

1. Get a hold of the hR7QFEtn.zip(the leaked 4.0.4 update) and place it in the root of your phone's SD Card( in the / directory of the Sdcard)
2. Download recovery-clockwork-touch-5.8.0.2-crespo.img from the clockworkmod website and place it in the following directory "C:\Program Files (x86)\Android\android-sdk\platform-tools"
3. open up your command prompt and go to the "C:\Program Files (x86)\Android\android-sdk\platform-tools" directory
4. Run the following command: adb reboot-bootloader
5. Once your phone is in the bootloader screen run the following command in your command prompt: fastboot flash recovery recovery-clockwork-touch-5.8.0.2-crespo.img

You will get a "Finished" message on your command prompt informing you that it flashed the recovery image

6. selected recovery option on your phone's bootloader screen and clockworks will do the update automatically for you

I did not have to apply root access again at all. My root privilege stayed the same after the upgrade and I am now on 4.0.4!!

I hope this helps someone out because I was frustrated to no end last night and this morning because of that status 7 error.

I would also have to agree that using google's default recovery is no longer viable for manual updates as they seem to have secured that portion and we have to resort to using our own means.

Same steps for i9023? Or I need to do something different?:eek:
 

demo23019

Senior Member
Dec 9, 2007
2,216
613
USB transfer still slow app drawer still micro stutter but I use apex
just as fast and smooth as 4.0.3 I see no difference

Any idea on changes?
 

Flash05

Senior Member
Jul 13, 2010
815
54
We have a Winner!! :)

I was about to post the exact same after I finished my updated. I'll provide the exact steps that I did

Prior to trying this I too had this show up when I tried to update manually:

"assert failed: apply_patch_space(15916988)
E:Error in /tmp/sideload/package.zip
(Status 7)"



OK so here goes the steps:

Notes:
*My phone's model is GT-I9020T from WIND
*I was running the previously leaked 4.0.3 that was freshly installed
*My Phone was rooted and had the bootloader unlocked
*I tried this on my windows system
*Make sure that your phone is plugged into your computer

1. Get a hold of the hR7QFEtn.zip(the leaked 4.0.4 update) and place it in the root of your phone's SD Card( in the / directory of the Sdcard)
2. Download recovery-clockwork-touch-5.8.0.2-crespo.img from the clockworkmod website and place it in the following directory "C:\Program Files (x86)\Android\android-sdk\platform-tools"
3. open up your command prompt and go to the "C:\Program Files (x86)\Android\android-sdk\platform-tools" directory
4. Run the following command: adb reboot-bootloader
5. Once your phone is in the bootloader screen run the following command in your command prompt: fastboot flash recovery recovery-clockwork-touch-5.8.0.2-crespo.img

You will get a "Finished" message on your command prompt informing you that it flashed the recovery image

6. selected recovery option on your phone's bootloader screen and clockworks will do the update automatically for you

I did not have to apply root access again at all. My root privilege stayed the same after the upgrade and I am now on 4.0.4!!

I hope this helps someone out because I was frustrated to no end last night and this morning because of that status 7 error.

I would also have to agree that using google's default recovery is no longer viable for manual updates as they seem to have secured that portion and we have to resort to using our own means.

sir can you post the url to download the "recovery-clockwork-touch-5.8.0.2-crespo.img". i check the clockworkmod website. only rom manager and tether...

thanks.
 

damengual

Member
Aug 30, 2010
38
1
NS i09092t

was running 4.0.3 that I had updated cleanly from CM7

backed up with CWM touch...so i originally tried updating to the 4.0.4 leaked OTA release. this caused a dead phone, restored my 4.0.3,

downloaded IMM76D_deodexed. wiped data, etc. flashed IMM76....flashed superuser just in case. booted into clean 4.0.4!

rebooted into CWMT and did a nandroid advanced restore of my data. after reboot phone updated all my apps from 4.0.3-4.0.4 was running a little choppy. rebooted.

phone is running amazing now, been enjoying ICS for all it's bugs since 4.0.3 leak, speed of interface and battery performance are amazing.

Ice cream win
 

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    Yes here it is the nexus s official android 4.0.4 from google :)
    this needs to be flashed over the stock 4.0.3 official rom from google it's a 17.8 mb update not a full rom so you can only flash it over stock 4.0.3 i repeat only over stock or else it will fail.
    i managed to get the download link from google servers here it is http://android.clients.google.com/packages/ota/google_crespo/hR7QFEtn.zip as you can see an official google link.
    so far i noticed that the recovery is fixed (no longer disappear on i9023 devices)
    and battery problems solved too.

    ONLY FLASHABLE VIA CWM
    the reason is here:http://xdaforums.com/showpost.php?p=24198556
    5
    Solution (well maybe...)

    So.. from what I read in this thread I derive some more or less useful observations:
    It works and fails on slightly modified roms.
    It works and fails on unmodified roms.
    It tends to fail more often with the stock recovery.

    Here is my story: 9023, cwm5023, manually flashed 4.0.3 in december, rooted, rom slightly modified (hosts file, some extra ogg files in the notifications dir, root, rootkeeper, and deleted recovery-overwrite-script).

    What I did: put the file from the first post in /sdcard/, reboot, recovery, apply update.zip, first the 404, then root (just to be sure), fix permissions (don't know if necessary), reboot, got 404.

    But the reports of failed updates made me curios.

    (at this point this analysis may get a little bit above the level of understanding of a regular Joe android user)

    So, I had a look at the source.
    (extract the zip, searched for something that looks like an update script)
    got this one:
    Code:
    /META-INF/com/google/android/updater-script

    And right here at the end of this little code block in line 652:
    Code:
    assert(apply_patch_check("/system/vendor/lib/libwvm.so", "6f03d4b266d99f2e79a617786d4ba4981a2bc4e5", "aa466817fc702b7764ac442452aea2c4593503e3"));
    set_progress(0.983189);
    assert(apply_patch_check("MTD:boot:3526656:40d819a22242be448d36e61b1ad42501e88838cb:3526656:877503a77928e449c8bff451ea7a3e783a4b607f"));
    set_progress(1.000000);
    assert(apply_patch_space(15916988));

    Here is the feared apply_patch_space call.
    Still no real clue what it does.

    So, I googled and found:
    http://www.freeyourandroid.com/guide/introdution_to_edify

    The interesting part:
    Function Name: apply_patch_space

    Function Syntax: apply_patch_space(bytes)

    Parameter Details: bytes = number of bytes to check for

    Action: Checks the cache to verify that there is enough space to write the patched files to it and returns something. Need to test this function to verify.

    Ok.. so, the problem is not a modified file (files are checked too, you can see which ones by reading the script) but more a lack of free space on a 'cache' (who's location is yet to be determined).

    So, thats about 15MB of free space required.
    Looking at /cache with root explorer: 466MB free

    Found a lead to the source files here:
    http://tjworld.net/wiki/Android/UpdaterScriptEdifyFunctions

    Again, use the source Luke!

    I had the android source lying around somewhere from the time I wrote this (completely unrelated) post: http://xdaforums.com/showthread.php?p=20017514#post20017514

    I had to jump through quite a bunch of C-source files (I'll spare you the story) until i got the answer:
    Code:
    size_t free_now = FreeSpaceForFile("/cache");
    So, it really is /cache
    There may be many reasons why this fails:
    • There is not enough space left on /cache (obvious)
    • /cache is not mounted but it should be (it failed to mount somehow? maybe a prior wipe or backup unmounted it?)
    • It is mounted read only and it should be mounted rw.

    To be sure, I had a quick look at the situation right after the device enters the (cwm) recovery:
    Code:
    ~ # mount
    rootfs on / type rootfs (rw)
    tmpfs on /dev type tmpfs (rw,relatime,mode=755)
    devpts on /dev/pts type devpts (rw,relatime,mode=600)
    proc on /proc type proc (rw,relatime)
    sysfs on /sys type sysfs (rw,relatime)
    /dev/block/mtdblock4 on /cache type yaffs2 (rw,nodev,noatime,nodiratime)
    ~ #

    if you are there, you can check the free space with the df command:
    Code:
    ~ # df
    Filesystem           1K-blocks      Used Available Use% Mounted on
    tmpfs                   176532        32    176500   0% /dev
    /dev/block/mtdblock4    480768      2588    478180   1% /cache
    ~ #

    The expected situation right before the update should be:
    /cache is mounted read/write and has plenty of free space.
    (note: df displays capacities in numbers of 1k blocks)

    I have no idea what all you guys did before the update, but this may help if you have this 'apply_patch_space' error:
    • Ensure a working 4.0.3 is on the device.
    • After entering the recovery, immediately apply the update.
    • If you have the urge to backup, wipe, whatever, do it and then reboot once more for the update to ensure all effects of that actions on the /cache are gone.

    Again: I have no idea if this solves your case, but it is my best guess and I think it has a good chance of success.
    3
    guys can you post instruction on how to do it blind using 4.0.3 stock and not rooted.

    THanks.
    2
    I do believe I've got to the bottom of the Error 7 and there doesn't appear to be a damn thing we can do about it. It appears as though Google has made it so that we can't flash OTA updates manually in stock recovery anymore.

    The guys over on the Xoom thread were having the exact same problem with the Xoom WiFi 4.0.4 OTA. Same package.zip error status 7. My friend with a WiFi Xoom got an OTA update on his, so I told him not to install it. Instead we downloaded the OTA update manually and attempted to flash it through stock recovery. It errored out with the package.zip error status 7. So I had him reboot the tablet, go into the OTA software and tap "reboot and install". It flashed without problem.

    I have a feeling this will be the exact same thing with the Nexus S. So it looks like we all either wait for the OTA popup on our phones, or we have to unlock our bootloaders, install either a stock Gingerbread or ClockworkMod recovery, then flash the OTA manually.
    2
    Thats the error I'm getting. It then comes up:

    E:Error in /tmp/sideload/package.zip
    (Status 7)
    Installation aborted.

    I've tried to find that file in the 4.0.4 update and the full 4.0.3 update but cant find it

    I tried outputting the contents of /cache/recovery/log-* and it appears that the /cache partition is full or not mounted (0 bytes free). The stock recovery even tried to delete old files, but failed. My guesses are:
    1) bug in stock recovery (not mounting /cache correctly). It's strange though that after rebooting the logs are correctly placed in /cache/recovery/log-*
    2) bug on the 4.0.4 update (or incompability with the ROM)

    The update successfully completes the validation/checksum verification phase. It's also possible that Google added some kind of verification to prevent people from downloading the ROM without before getting a notification.