Skip to content

pmos_install_functions: always try findfs first

On some recoveries, the mountpoint name may be different to the device by-name, so when installing to a partition other than system, the second awk in get_fstab_device won't work:

For example, the recovery.fstab on LineageOS recovery of Xiaomi MIX 2S:

#<src>                                      <mnt_point>             <type>  <mnt_flags and options>                                                                           <fs_mgr_flags>
/dev/block/bootdevice/by-name/userdata       /data                   ext4    noatime,nosuid,nodev,barrier=0,noauto_da_alloc                                                    latemount,wait,check,fileencryption=ice,quota

that awk won't return anything and the install will fail, while findfs can actually return the correct device path for userdata.

Also, I think we don't need to treat the system partition specifically, while the two branches are almost identical. But I'm not sure here, any ideas?

Merge request reports