[AT&T Samsung Galaxy S 4 Android Development] Aou:
How can I make my own neutered version of the OTA patch?

With lots of careful snipping. But first, you need a copy of the original OTA patch. You can download this from my post above, or you can download one yourself straight from AT&T.

To download your own copy, the process is not terribly complicated - just risky. Here's the steps I performed to obtain the original update file from AT&T:

Make sure you have root before continuing. If you screw this up and allow the update to install, you're pretty much SOL.

If you are running the stock MDL rom, you can simply launch the updater in Settings -> More... -> About device -> Software update and let it download. Just don't reboot your phone until you've then frozen the AT&T update applications (all 3 of them) from performing the update. Keep in mind that your device will eventually reboot on its own, thanks to AT&T and their way of forcing updates.

Pull the update file from /cache/fota/2400258.cfg, and put it somewhere on your computer that you can work with it. It's just a .zip file in disguise, so you can simply rename it appropriately.

Delete the original .cfg from the device.

As mentioned, freeze or disable the updater applications.

You now have your own copy of the OTA update.

Great - you've got the file. Time to grab the scissors and perhaps something to steady the hands and numb the pain. A keyboard works too in this case. Here's what to do:

Save a backup copy of your update file. One copy for safekeeping (in case you want to start over) and another to work on. Do it now.

Open the update file using basically any .zip editor. I used 7zip because it performed quickly, whilst Win7's zip capabilities were VERY SLOW dealing with this file.

[*]From the root directory of the file, delete:

aboot.mbn

sbl2.mbn

sbl3.mbn

tz.mbn

The entire "recovery" directory.

Within the file, browse to META-INF\com\google\android and pull a copy of the updater-script. This file does all the magic.

Edit the updater-script using a text editor, preferably something like Notepad++ (great program! I recommend it). Make the following changes:

Remove the following line:

assert(getprop("ro.secure")=="1");

Edit the following line from:

"/system/tts/lang_SVOX/svox-lh0pt2en-US22.pil",

to

"/system/tts/lang_SVOX/svox-lh0pt2en-US22.pil");

Remove the following line (it's right after the last one you edited):

"/system/recovery.img");

Remove the following lines:

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

and remove:

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

and remove:

set_perm(0, 0, 0544, "/system/etc/install-recovery.sh");

and remove:

ui_print("Update sbl2 ota");
assert(write_backup_fota("/dev/block/mmcblk0p4", "/dev/block/mmcblk0p22"));
assert(package_extract_file("sbl2.mbn", "/dev/block/mmcblk0p4"));
assert(erase_backup_fota("/dev/block/mmcblk0p22"));
ui_print("Package sbl2 Done.");
ui_print("Update sbl3 ota");
assert(write_backup_fota("/dev/block/mmcblk0p5", "/dev/block/mmcblk0p22"));
assert(package_extract_file("sbl3.mbn", "/dev/block/mmcblk0p5"));
assert(erase_backup_fota("/dev/block/mmcblk0p22"));
ui_print("Package sbl3 Done.");
ui_print("Update aboot ota");
assert(write_backup_fota("/dev/block/mmcblk0p6", "/dev/block/mmcblk0p22"));
assert(package_extract_file("aboot.mbn", "/dev/block/mmcblk0p6"));
assert(erase_backup_fota("/dev/block/mmcblk0p22"));
ui_print("Package aboot Done.");

and remove:

ui_print("Update tz ota");
assert(write_backup_fota("/dev/block/mmcblk0p8", "/dev/block/mmcblk0p22"));
assert(package_extract_file("tz.mbn", "/dev/block/mmcblk0p8"));
assert(erase_backup_fota("/dev/block/mmcblk0p22"));
ui_print("Package tz Done.");

Save it, and put the modified updater-script back inside the update file where you found it, replacing the old one.

Upload it to your SDCard and flash. See all the warnings here in this post and in the original post about what to do with this thing.

NOTES and WARNINGS

:

A careful reader will be able to easily tell what each part of the updater-script does, and you can choose whether or not to keep it, modify it, or delete it.

Keep in mind that the update will fail if it does not pass all of those integrity checks. You can technically remove all of the integrity checks, and the update will still process, patching files left-and-right. However, depending on how heavily you have modified your system, you will probably run into extreme problems (soft brick most likely).

CRITICAL WARNING ABOUT BOOTLOADERS: At this time, do NOT allow the update package to only partially update your bootloader! Failure to update the entire bootloader will result in a

hard brick

. For example, if you were to include the parts that update sbl2 and sbl3, but not include tz and aboot... your chain of trust will be violated, and the device will refuse to boot normally (a.k.a. QDL Mode or Emergency Boot). The only theoretically known way out of this is JTAG. You don't want to go there. So, simply put: regarding bootloaders, it's all or nothing. The bootloader updates included in this package are: sbl2.mbn sbl3.mbn aboot.mbn tz.mbn. It's like any good D&D campaign - if you separate these party members, the campaign is toast.

REMINDER: At this time, it appears that flashing the new bootloader will trip an e-fuse. This is a hardware device that is only capable of incrementing a number. If the number on the e-fuse is higher than the bootloader you are trying to flash (with Odin, for example), the device will refuse to take the update. In other words, if you flash the MF3 bootloader, there is no known way to return to the MDB or MDL bootloaders at this time.