PSA for Devs regarding mounting system in updater-scripts

Code: run_program("/sbin/busybox", "mount", "/system");

Code: run_program("/sbin/mount", "-t", "ext4", "/dev/block/bootdevice/by-name/system", "/system");

Code: run_program("/sbin/mke2fs", "-t", "ext4", "-m", "0", "/dev/block/bootdevice/by-name/system");

In order for ROM zips to function properly, ROM devs may need to change the way they're used to performing mount commands in their updater-scripts. Many ROM devs like to use busybox to mount system, like this:However, on newer HTC devices, this will not always be effective, due to the variable state of system when booting into TWRP (more information in the above post). The most reliable way to mount system in TWRP is to use the below command:Since this calls the mount binary and specifies the proper filesystem of /system, it will work regardless of the mount state of /system within TWRP.The reason people are having issues booting ROMs flashed without the above command is because custom ROMs typically include a command to format system within the updater-script, like this one:Notice that this calls the mke2fs binary directly and specifies the filesystem, so this command will run properly and format system. However, when the script attempts to mount system using the busybox mount command, it's unsuccessful, resulting in a failed ROM install (even though there likely isn't an error message) and an empty system partition.So, the solution is easy - replace your busybox mount commands with the direct version noted above. Running it that way should work regardless of the update-binary used, since it's not running mount directly but calling it (this makes a difference to some binaries for some reason). This will even work in situations where system has been mounted read-only by TWRP (more on that in the below post).- please consider making this change going forward. The above method will ALWAYS WORK. Please use this and discontinue whatever other methods to mount system that you have previously used, as they will have inconsistent results, leading people to flash old versions of TWRP or blame TWRP for their errors.I know HTC is changing how they do things, and it's different than we're all used to. Let's all adapt to the change together. :).