[Nexus 4 General] Blockberd:
So. First of all, I have no experience with updater scripts what-so-ever but following things I could gather from scrolling through the script (and with some basic knowledge):

- Till line 462 only checksum checks on all files which will be patched (and mounting \system). Checks only.

I left out this chunk of the script as it really contains just checks + the system mount.

- Line 466 + 467:

ui_print("Removing unneeded files...");
delete("/system/recovery.img");

Looks like it just tries to delete the image file of the recovery from the system folder. I assume it's kept here for the "reflashing at every system boot" purpose and maybe moved back freshly patched later by the actual recovery. There is no following line moving the complete recovery.img back to that place!

- Starting at line 469 till 1373 it actually applies each patch file for every APK affected. I assume that the patch files only contain instructions on what to change instead of replacing the whole APK and/or ODEX

- Line 1374 and 1375:

delete("/system/recovery-from-boot.p",
"/system/etc/install-recovery.sh");

These files are not moved to the device by the script at this point. It seems it just tries to make sure everything is clean for the next steps.

- Line 1377 and 1378:

ui_print("Unpacking new recovery...");
package_extract_dir("recovery", "/system");

It is not actually unpacking the whole recovery here. Only the following files/folders:

\recovery\etc\install-recovery.sh

\recovery\recovery-from-boot.p

The files which do not exist in efrant's ZIP.

- Line 1379 - 1409 (basically applying permissions):

ui_print("Symlinks and permissions...");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 0, 0755, "/system/bin/ping");
set_perm(0, 2000, 0750, "/system/bin/run-as");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
---> set_perm(0, 0, 0544, "/system/etc/install-recovery.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm(0, 2000, 0755, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/etc");
set_perm(0, 0, 0644, "/system/vendor/etc/audio_effects.conf");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/firmware/discretix");
set_perm(0, 2000, 0755, "/system/vendor/firmware/keymaster");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/firmware/wlan");
set_perm(0, 0, 0644, "/system/vendor/firmware/wlan/prima/WCNSS_cfg.dat");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/drm");
set_perm(0, 0, 0644, "/system/vendor/lib/drm/libdrmwvmplugin.so");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/mediadrm");
set_perm(0, 0, 0644, "/system/vendor/lib/mediadrm/libwvdrmengine.so");
set_perm(0, 2000, 0755, "/system/vendor/media");
set_perm(0, 2000, 0755, "/system/vendor/pittpatt");
set_perm(0, 2000, 0755, "/system/vendor/pittpatt/models");
set_perm(0, 2000, 0755, "/system/vendor/pittpatt/models/detection");
set_perm(0, 2000, 0755, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7");
set_perm(0, 2000, 0755, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/pittpatt/models/recognition");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/recognition/face.face.y0-y0-22-b-N.bin");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");

I marked the problematic line here. Also removed/commented in efrant's ZIP. This [marked line] is actually the part where most users experience problems right now. Also note that these files do not exist in any way in the factory image of JWR66Y - as [MENTION=1566190]efrant[/MENTION] already mentioned. Maybe the files will be placed by the stock recovery image but I am unable to open that one - yet.

Keep in mind that at this point all APKs should be already patched by the previous steps! Someone with a set_perm issue would have patched APKs but still old build number (assumption!).

As this is an assumption:

Is anyone willing to do some checks together with me to compare some checksums of some of the patched files? I would need a person with

- N4 on JWR66V

- Rooted

- No yet tried to apply OTA at all (important)

- A little bit knowledge about creating checksums and stuff (actually ES File Explorer can do that pretty easily)

- Line 1410 - 1415 (last lines):

ui_print("Patching remaining system files...");
apply_patch("/system/build.prop", "-",
e336e937ec01a4e2fcb60d3659e296a30701ebf9, 2742,
b14efd4ddb55a476ba46fb51df7a230d829cab1d, package_extract_file("patch/system/build.prop.p"));
set_perm(0, 0, 0644, "/system/build.prop");
unmount("/system");

Just patching the build.prop (problematic line for those with LTE enabler) and unmounting the system partition again (was mounted in the very first line).

If someone knows how to properly open the .p files I could have an actual look into the files in question.

But still my opinion is that someone with CWM or TWRP would not need these files as they are related to the stock recovery.

If one OTA will fail because of the recovery then you have to flash stock recovery anyway.

The set_perm issue is 99% related only to the way how SuperSU (and maybe others) will work since 4.3.

All current OTAs since 4.3 leak (JWR66N) have that issue with root (SuperSU and co) and those only. Nobody can predict the future.

Again:

If I actually know how to disassemble the *.p files, I will try to cut them down, too. At least for the files in question.

---------- Post added at 11:54 PM ---------- Previous post was at 11:45 PM ----------

Grab it from here:

http://xdaforums.com/showpost.php?p=45038271&postcount=1890

Note: This build.prop is taken from JWR66V factory image. The direct build before JWR66Y! Make sure you have JWR66V. If not, come back and tell me your build. I will try to grab the build.prop of that build for you from the factory image.

- Copy the content of the ZIP to your sdcard folder of the phone (basically just copy it to the phone).

- Now you open any root explorer you have (I use ES File Explorer), go to the /system/ folder and make copy/backup of the current build.prop.

- Go to folder /sdcard/ and copy the build.prop from the first step.

- Move back to /system/ and past in the file and replace the current one.

That SHOULD work. I never tested it, though, as I don't have a changed build.prop or other things like that.