Also, adding the semi-colon to the end enables multiple lines on the same line. frivolous example
cd ~/android; ls -l; cd ~/;
I adopted it since I ran into problems where newlines weren't always carried over in a copy/paste into adb shell or Terminal Emulator or wherever, but if I terminated with ; (which many coding languages enforce, though shell does not) then things always copy/pasted in a working format.
There's also a debate of whether the loop mounted ext4 .img is better than using a tmpfs mount instead (e.g. `mount -t tmpfs -o size=400M,noatime tmpfs $TMP`), but that depends on whether your devices might have a bottleneck on free space on /data to hold the ext4 .img vs. free RAM to hold the tmpfs. I went with ext4 .img since that should help on low-end devices (provided they have the space). switchroot uses tmpfs; AIK-mobile will continue to use ext4 .img since people need to be able to pick up where they left off.
From reading the code, it's not clear to me why you create and mount an ext4 image at all. Is this just for AnyKernel? I have no familiarity with that, hence the question. Because a normal updater script is simply going to do its work on the root file-system that you just remounted r/w. I don't really see why you go to the trouble of creating the ext4 image, because nothing obviously writes to it, although I suppose most updater scripts will use /tmp as a scratchpad.
Anyway, if you could clarify, I'd be grateful.
|automation, batch, flashable zip, script, tool|
|Thread Tools||Search this Thread|