Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

OTA update JWR66Y ends up in an error

OP dbenyakar

28th August 2013, 06:07 AM   |  #1  
OP Senior Member
Thanks Meter: 14
 
142 posts
Join Date:Joined: Nov 2010
Hi All

Yesterday I received the update via OTA. When it rebooted into the TWRP recovery is started with the patch install process.
Then it failed.
After that it offered to fix the root, nice of him, which I did, and rebooted. Build version was still JWR66V.
This is what I got from the recovery log file:

Code:
Unpacking new recovery...
minzip: Can't create target file "/system/etc/install-recovery.sh": Permission denied
minzip: Extracted 0 file(s)
Symlinks and permissions...
set_perm: chown of /system/etc/install-recovery.sh to 0 0 failed: Operation not permitted
set_perm: chmod of /system/etc/install-recovery.sh to 544 failed: Operation not permitted
script aborted: set_perm: some changes failed
set_perm: some changes failed
E:Error executing updater binary in zip '/cache//8b2531d9d9a686c7dcf347513ce8141d59a251c6.signed-nakasi-JWR66Y-from-JWR66V.8b2531d9.zip'
E:Error installing zip file '/cache//8b2531d9d9a686c7dcf347513ce8141d59a251c6.signed-nakasi-JWR66Y-from-JWR66V.8b2531d9.zip'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Switching packages (TWRP)
I:Set page: 'advanced'
I:Set page: 'confirm_action'
I:Set page: 'action_page'
I:Copying file /tmp/recovery.log to /data/media/0/recovery.log
Has anyone ran into this issue with the update?
Any solution to this?
28th August 2013, 07:13 AM   |  #2  
megabiteg's Avatar
Senior Member
Flag USA
Thanks Meter: 238
 
1,136 posts
Join Date:Joined: Apr 2010
More
Quote:
Originally Posted by dbenyakar

Hi All

Yesterday I received the update via OTA. When it rebooted into the TWRP recovery is started with the patch install process.
Then it failed.
After that it offered to fix the root, nice of him, which I did, and rebooted. Build version was still JWR66V.
This is what I got from the recovery log file:

Code:
Unpacking new recovery...
minzip: Can't create target file "/system/etc/install-recovery.sh": Permission denied
minzip: Extracted 0 file(s)
Symlinks and permissions...
set_perm: chown of /system/etc/install-recovery.sh to 0 0 failed: Operation not permitted
set_perm: chmod of /system/etc/install-recovery.sh to 544 failed: Operation not permitted
script aborted: set_perm: some changes failed
set_perm: some changes failed
E:Error executing updater binary in zip '/cache//8b2531d9d9a686c7dcf347513ce8141d59a251c6.signed-nakasi-JWR66Y-from-JWR66V.8b2531d9.zip'
E:Error installing zip file '/cache//8b2531d9d9a686c7dcf347513ce8141d59a251c6.signed-nakasi-JWR66Y-from-JWR66V.8b2531d9.zip'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Switching packages (TWRP)
I:Set page: 'advanced'
I:Set page: 'confirm_action'
I:Set page: 'action_page'
I:Copying file /tmp/recovery.log to /data/media/0/recovery.log
Has anyone ran into this issue with the update?
Any solution to this?

You need to have stock recovery to run ota update. Plus your Rom has to be stock unmodified there that it checks for everything that comes factory with it.

Sent from my HTC One using Tapatalk 2
28th August 2013, 07:35 AM   |  #3  
OP Senior Member
Thanks Meter: 14
 
142 posts
Join Date:Joined: Nov 2010
My Nexus 7 was rooted since day 1 and with a custom recovery, and always got the OTAs.
Why is this a problem now?
Are other people with rooted devices encountered the same issue?
The Following User Says Thank You to dbenyakar For This Useful Post: [ View ]
28th August 2013, 07:50 AM   |  #4  
Junior Member
Thanks Meter: 0
 
2 posts
Join Date:Joined: Jul 2012
Same Issue !!
Quote:
Originally Posted by dbenyakar

Hi All

Yesterday I received the update via OTA. When it rebooted into the TWRP recovery is started with the patch install process.
Then it failed.
After that it offered to fix the root, nice of him, which I did, and rebooted. Build version was still JWR66V.
This is what I got from the recovery log file:

Code:
Unpacking new recovery...
minzip: Can't create target file "/system/etc/install-recovery.sh": Permission denied
minzip: Extracted 0 file(s)
Symlinks and permissions...
set_perm: chown of /system/etc/install-recovery.sh to 0 0 failed: Operation not permitted
set_perm: chmod of /system/etc/install-recovery.sh to 544 failed: Operation not permitted
script aborted: set_perm: some changes failed
set_perm: some changes failed
E:Error executing updater binary in zip '/cache//8b2531d9d9a686c7dcf347513ce8141d59a251c6.signed-nakasi-JWR66Y-from-JWR66V.8b2531d9.zip'
E:Error installing zip file '/cache//8b2531d9d9a686c7dcf347513ce8141d59a251c6.signed-nakasi-JWR66Y-from-JWR66V.8b2531d9.zip'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Switching packages (TWRP)
I:Set page: 'advanced'
I:Set page: 'confirm_action'
I:Set page: 'action_page'
I:Copying file /tmp/recovery.log to /data/media/0/recovery.log
Has anyone ran into this issue with the update?
Any solution to this?

I've got the same issue... it rebooted into the TWRP recovery, but the screen just freezed and touch didin't worked. Had to remove battery and reboot. After that, JWR66V was still there! And now, it doesn't prompt the update again. I'm thinking about flashing 4.3 again, root but not to install TWRP recovery, only 4.3 stock and root !! As @dbenyakar asked "any solution to this" ?

In time, mine is a Galaxy Nexus I9250...
Last edited by chakme; 28th August 2013 at 08:24 AM. Reason: Forgot to mention my phone model !!
28th August 2013, 08:20 AM   |  #5  
GedBlake's Avatar
Senior Member
Flag Ashton-under-Lyne, Manchester, UK
Thanks Meter: 399
 
662 posts
Join Date:Joined: Jan 2013
More
Quote:
Originally Posted by dbenyakar

My Nexus 7 was rooted since day 1 and with a custom recovery, and always got the OTAs.
Why is this a problem now?
Are other people with rooted devices encountered the same issue?

Hi, dbenyakar...

The reason why the OTA that updates from JWR66V to JWR66Y fails if you are rooted concerns a file call /system/etc/install-recovery.sh and the different way that root now works under Jellybean 4.3.

Root uses the file install-recovery.sh to launch sudaemon that provides root, and during the process of gaining root, this file is set as 'immutable' to prevent root from being accidently lost. But this also prevents the OTA from modifying it, including the setting of permissions during the last stage of the OTA... therefore the OTA fails. See also this.

There are several different ways this problem can be resolved...

1) There is a slightly modified version of the OTA here, which 'rems out' the setting of permissions for /system/etc/install-recovery.sh, and allows the OTA to successfully complete. This modified OTA can be flashed in TWRP and was the method I used to upgrade.

2) Before allowing the OTA, unroot by going to SuperSU>>settings>>Full Unroot. Allow the OTA, and then re-root by flashing Chainfires SuperSu 1.51 in TWRP.

In any event, you'll probably need to re-root after the OTA anyway. I certainly had to.

Hope this helps.

Rgrds,
Ged.
Last edited by GedBlake; 28th August 2013 at 08:33 AM.
The Following 10 Users Say Thank You to GedBlake For This Useful Post: [ View ]
28th August 2013, 09:11 AM   |  #6  
threi_'s Avatar
Senior Member
Flag Vaughan
Thanks Meter: 161
 
462 posts
Join Date:Joined: Dec 2011
More
So based on that is this something that will occur every OTA (i.e. you will have to unroot every OTA to avoid problems)?
28th August 2013, 09:38 AM   |  #7  
OP Senior Member
Thanks Meter: 14
 
142 posts
Join Date:Joined: Nov 2010
Quote:
Originally Posted by GedBlake

Hi, dbenyakar...

The reason why the OTA that updates from JWR66V to JWR66Y fails if you are rooted concerns a file call /system/etc/install-recovery.sh and the different way that root now works under Jellybean 4.3.

Root uses the file install-recovery.sh to launch sudaemon that provides root, and during the process of gaining root, this file is set as 'immutable' to prevent root from being accidently lost. But this also prevents the OTA from modifying it, including the setting of permissions during the last stage of the OTA... therefore the OTA fails. See also this.

There are several different ways this problem can be resolved...

1) There is a slightly modified version of the OTA here, which 'rems out' the setting of permissions for /system/etc/install-recovery.sh, and allows the OTA to successfully complete. This modified OTA can be flashed in TWRP and was the method I used to upgrade.

2) Before allowing the OTA, unroot by going to SuperSU>>settings>>Full Unroot. Allow the OTA, and then re-root by flashing Chainfires SuperSu 1.51 in TWRP.

In any event, you'll probably need to re-root after the OTA anyway. I certainly had to.

Hope this helps.

Rgrds,
Ged.

OK great. Thanks for that. Will try it tonight.
I tried to use the OTA Root Keeper to temporarily unroot my device, only to realize it does not support 4.3.
So I guess I will have to unroot, update and re-root using your method. No shortcuts here. Once the OTA Root Keeper application will be compatible with 4.3 then it will be easier.
28th August 2013, 12:00 PM   |  #8  
GedBlake's Avatar
Senior Member
Flag Ashton-under-Lyne, Manchester, UK
Thanks Meter: 399
 
662 posts
Join Date:Joined: Jan 2013
More
Quote:
Originally Posted by threi_

So based on that is this something that will occur every OTA (i.e. you will have to unroot every OTA to avoid problems)?

Hi, threi_...

It's speculation, obviously, as one cannot know the contents of future OTAs beyond the current one which updates to build JWR66V... but it seems likely you will have to unroot, and then re-root again after the OTA.

But there may be workarounds... as I've indicated in my previous post, somebody has already posted a modified version of the current OTA that skips setting permissions for install-recovery.sh, and allows the OTA to complete successfully.

And to elaborate on my previous comments, here's why...

Root modifies /system/etc/install-recovery.sh in order to launch the su root daemon, and it contains the following lines...

Code:
#!/system/bin/sh

# If you're implementing this in a custom kernel/firmware,
# I suggest you use a different script name, and add a service
# to launch it from init.rc

# Launches SuperSU in daemon mode only on Android 4.3+.
# Nothing will happen on 4.2.x or older.
# If you want to force loading the daemon, use "--daemon" instead

/system/xbin/daemonsu --auto-daemon &

# Some apps like to run stuff from this script as well, but the
# installer will have done "chattr +i" on this file to prevent
# accidental modification and deletion. In your code, just search 
# this file for "install-recovery-2.sh", and if present, write
# there instead.

/system/etc/install-recovery-2.sh
And during flashing Chainfires SuperSU root updater, the following operation is performed...

Code:
chattr +i /system/etc/install-recovery.sh
This 'locks' the file, using the +i flag ('immutable'), and prevents even system updates from modifying it.

You should be able to reverse this with...

Code:
su
mount -o rw,remount /system
chattr -i /system/etc/install-recovery.sh
mount -o ro,remount /system
...in Android Terminal Emulator, but you will need Busybox installed.

So it's probably just easier to unroot... allow the OTA as normal (or flash the OTA .zip in recovery)... and then re-root again. And I can't see this changing with future OTA's... but as I stated at the beginning of this post, this is just speculation on my part.

Rgrds,
Ged.
Last edited by GedBlake; 28th August 2013 at 12:47 PM. Reason: typos and clarification
The Following User Says Thank You to GedBlake For This Useful Post: [ View ]
28th August 2013, 02:34 PM   |  #9  
Member
Flag SAVA
Thanks Meter: 18
 
80 posts
Join Date:Joined: Jul 2012
Donate to Me
More
Hi. I am on 4.3 stock rooted with m kernel a61 and with advanced power menu mod and awesome beats. Cant update .read everything about this new update and also opened a thread but still cant find a way to update.flashing failed.tried full unroot and faild again.trid modified grouper.zip and that also failed.


Any ideas???


Sent from my Nexus 7 using xda premium
28th August 2013, 03:01 PM   |  #10  
GedBlake's Avatar
Senior Member
Flag Ashton-under-Lyne, Manchester, UK
Thanks Meter: 399
 
662 posts
Join Date:Joined: Jan 2013
More
Quote:
Originally Posted by dobrun.franjo

Hi. I am on 4.3 stock rooted with m kernel a61 and with advanced power menu mod and awesome beats. Cant update .read everything about this new update and also opened a thread but still cant find a way to update.flashing failed.tried full unroot and faild again.trid modified grouper.zip and that also failed.


Any ideas???


Sent from my Nexus 7 using xda premium

Hi, dobrun.franjo...

Any modifications to system (including kernel) need to be removed before any OTA can proceed... and I suspect 'advanced power menu mod and awesome beats' have modified system.

This is because OTAs run a checksum on all files in system BEFORE 'patching' (meaning updating) them, to ensure they haven't been removed or changed in anyway. After all, an official OTA can't be expected to update files it has no knowledge of, that have been added by the user. If even one fails this checksum test, the OTA will abort, with no changes made.

So... remove advanced power menu, remove awesome beats and fastboot flash the factory stock kernel for Jellybean 4.3. Even then, there are no guarantees the OTA will work, without knowing (and being able to reverse) EXACTLY what files where changed as a consequence of your modifications... but it's worth a shot.

Good luck.

Rgrds,
Ged.

The Following User Says Thank You to GedBlake For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes