Search code examples
androidshellmountunmountedify

Difference between these similar Edify commands to mount and unmount


I made a custom boot animation for my Android smartphone running Android 9 (Pie) and since my phone is not rooted it appears the only way to install the animation is through a flashable zip.
Inside this zip file, other than the files to install themselves, there is a file called updater-script which contains the instructions to install the content of the flashable zip.
Now, I learned that in order to extract the boot animation into its directory, the filesystem needs to be mounted, and then unmounted.
After this brief introduction, here is the actual question: there are at least three different ways to do so. What is the difference between:

  • run_program("/sbin/mount", "/system");
  • run_program("/sbin/busybox", "mount", "/system");
  • mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system");

?
And which is the correct one to use?


Solution

  • At the end I went with solution #2 because #3 didn't work.