Android - Flashing CM 11, I get `set_metadata_recursive: some changes failed`:

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.


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.