21

ClockworkMod Recovery v6.0.2.3 gives me the folling error when I try to update my Samsung Galaxy Tab 2 (GT-P5113) to Cyanogenmod 11:

Restarting adbd...
Finding update package...
Opening update package...
Installing update...
set_metadata_recursive: some changes failed
E:Error in /tmp/update.zip
(status 7)
Installation aborted.

Being desperate I tried the same thing with Team Win Recovery Project (TWRP) v2.6.3.0 -- also the latest for my platofrm,

Checking for MD5 file...
Skipping MD5 check: no MD5 file file found.
set_metadata_recursive: some changes filed
E:Error: executing updater binary in zip '/data/media/0/sideload.zip'

7 Answers 7

16

In short, if you want to flash KitKat Android 4.4, you'll have to upgrade to a version of CWM greater than v6.0.4.5. Or, use an alternate bootloader. For the Galaxy Tab 2 GT-P5113 or GT-p5110 you can find the instructions here.

2
  • Any references or links about why does this happen, please? Commented Aug 19, 2014 at 16:06
  • @SopalajodeArrierez I provided an explanation on the link to further instructions. This is an error message (if you try first without knowing), the other question is a tutorial-answer with more details. Commented Apr 3, 2015 at 20:31
7

A zip package that contains a firmware update always includes two files in META-INF/com/google/android: updater-script and update-binary. updater-script is a text file containing commands required to install the update. update-binary translates the commands into binary code.

In Android 4.4 KitKat, Google has changed the interface that updater-script uses for setting up permissions. The previously used set_perm method was deprecated and replaced by set_metadata. This causes old versions of custom recovery software to fail with Android 4.4 packages (e.g. CyanogenMod 11) and display the error message "set_metadata_recursive: some changes failed".

The best solution is to update the custom recovery software. I haven't found a new enough version of ClockworkMod compiled for my device, but I have found the newest version of TWRP to work.

Second option is to fix the updater-script by replacing any set_metadata and set_metadata_recursive calls with the old syntax, i.e. set_perm and set_perm_recursive. I haven't done this so I'm not sure how easy this would be.

Third option is to replace the update-binary with a patched one created by XDA member daniel_hk: http://forum.xda-developers.com/showthread.php?t=2532300 . I have done this and it worked fine, but the binary is compiled for ARMv7 and won't work in any other architecture.

2
  • Replacing the update-binary worked on my Oppo Find 5 for both the ROM and gapps. Thanks!
    – Qwerty
    Commented Oct 29, 2014 at 1:04
  • Indeed: upgrading TWRP from 2.6.3 to 2.8 did the trick for me. After that the set_metadata_recursive error when flashing new ROMs disappeared. Thanks a lot for the tip!
    – Dimitri C.
    Commented Jun 7, 2020 at 16:34
1

In addition to jmullee's answer, made by comparison of cm-10.1.3 and cm-11 updater-script. After this replacement, I successfully flashed cm-11-20141110-NIGHTLY-n7000.zip with recovery 5 (built-in in ICS speedmod kernel).

set_metadata => set_perm
set_metadata_recursive => set_perm_recursive

sed -i "s|set_metadata(\(\"[^\"]*\"\), \"uid\", \([0-9]*\), \"gid\", \([0-9]*\), \"mode\", \([0-9]*\).*);|set_perm(\2, \3, \4, \1);|" updater-script
0

I have solved that modifiying the \META-INF\com\google\android\updater-script file in a text editor, and replacing all the set_metadata_recursive by its old version set_param_recursive (the signature of the functions are relatively equivalent), after that you have to re-zip the pack and sign the file. For replacing and figure it out how to do it: search in google "replace set_metadata_recursive by set_param_recursive phyton" somebody has created a phyton script but if you understand the functions signatures you can doit manually. - then repack and sign the zip.

-1

I wrote this search/replace pattern that munges the new format into the old, and it worked for me:

$ sed -i "s|set_metadata_recursive(\\(\"[^\"]\*\"\\), \"uid\", \\([0-9]\*\\), \"gid\", \\([0-9]\*\\), \"dmode\", \\([0-9]\*\\), \"fmode\", \\([0-9]\*\\),.*);|set_perm_recursive(\2, \3, \4, \5, \1);|" META-INF/com/google/android/updater-script

In the end the google-play app wouldn't install either, so I bit the bullet and flashed an updated recovery (recovery-clockwork-6.0.4.6-i9300.img with heimdal) and was then able to flash an unmodified CM11. Aside, Google Play had errors until I disabled 3G (forcing IPv4 over WiFi), it seems there were (temporary?) issues connecting to Play Servers via IPv6.

2
  • 3
    A bit more information would be useful. Did you get this from a forum? Or did you write it yourself? In either case, random piece of code isn't all that helpful without some comments (especially in the case of regular expressions).
    – Stephen S
    Commented Nov 6, 2014 at 19:40
  • ok sorry - it's just a search/replace pattern I wrote that munges the new format into the old. In the end the google-play app wouldn't install either, so I bit the bullet and flashed an updated recovery (recovery-clockwork-6.0.4.6-i9300.img, with heimdal ) and was then able to flash an unmodified cm11. Aside, google play had errors until I disabled 3G (forcing IPv4 over wifi), it seems there were (temporary?) issues connecting to play servers via IPv6
    – jmullee
    Commented Nov 14, 2014 at 13:11
-1

ERROR STATUS 7 is because of you will have to upgrade CWM version to greater than or equal to the version CWM v 6.0.4.4 to install kitkat and lollipop on samsung Galaxy Tab 2 GT-P5113 or GT-p5110

1
  • 1
    That may be true, but can you back your claim with source(s)?
    – Firelord
    Commented Jun 26, 2015 at 5:32
-2

Make sure you enable "USB Debugging" under "Developer options" on your rooted phone. That worked for me.

3
  • What do developer options have to do with recovery? When booted into CWM/TWRP, those play no role at all. Especially not for flashing ROMs.
    – Izzy
    Commented Jan 5, 2016 at 12:51
  • They are completely unrelated.
    – SarpSTA
    Commented Jan 7, 2016 at 18:53
  • I believe this answer is referring to the "USB Debugging" setting, which on some devices/versions can set a flag in nvram that is indeed readable from Recovery. Commented Jan 7, 2016 at 22:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .