Skip to content

Latest commit

 

History

History
120 lines (99 loc) · 4.01 KB

modes.md

File metadata and controls

120 lines (99 loc) · 4.01 KB

bindhosts operating modes

  • These are currently defined operating modes that are either probed at auto or available as opt-in
  • You can change operating mode by accessing to developer option.

Glossary of terms

  • magic mount - mounting method primarily used by magisk
  • susfs - shorthand for susfs4ksu, advanced root-hiding framework provided as a kernel patchset

mode=0

default mode

  • APatch
    • OverlayFS / magic mount
    • magic mount is Adaway compatible, OverlayFS is NOT
    • Hiding: for OverlayFS mode, none.
    • Hiding: for magic mount zygisk-assistant
  • Magisk
  • KernelSU
    • OverlayFS + path_umount, (magic mount? soon?)
    • No Adaway compatibility
    • Hiding: umount modules (for non-GKI, please backport path_umount)

mode=1

ksu_susfs_bind mode

  • susfs assisted mount --bind
  • KernelSU only
  • Requires susfs-patched kernel and userspace tool
  • Adaway compatible
  • Hiding: best in its class as SuSFS handles the unmount

mode=2

plain bindhosts

  • mount --bind
  • Highest compatibility
  • Actually works on all managers, but not really preferable
  • leaks a bind mount, leaks a globally modified hosts file
  • selected when APatch is on OverlayFS (default mode) as it offers better compatibility.
  • Adaway compatible
  • Hiding: essentially no hiding, needs assistance

mode=3

apatch_hfr, hosts_file_redirect

  • in-kernel redirection of /system/etc/hosts for uid 0
  • APatch only, requires hosts_file_redirect KPM
  • Doesn't seem to work on all setups, hit-and-miss
  • No Adaway compatibility
  • Hiding: best method for APatch, no mounts at all

mode=4

zn_hostsredirect

  • zygisk netd injection
  • usage is encouraged by the author (aviraxp) - "Injection is much better than mount in this usecase"
  • should work on all managers
  • Requires:
  • No Adaway compatibility
  • Hiding: good method as there’s no mount at all, but it depends on other modules

mode=5

ksu_susfs_open_redirect

  • in-kernel file redirects for uid below 2000
  • KernelSU only
  • OPT-IN only
  • Requires susfs-patched kernel and userspace tool
  • usage is discouraged by author (simonpunk) - "openredirect will take more CPU cycle as well.."
  • Requires SuSFS 1.5.1 or later
  • Adaway compatible
  • Hiding: good method but will likely waste more cpu cycles

mode=6

ksu_source_mod

  • KernelSU try_umount assisted mount --bind
  • Requires source modification: reference
  • Supported on KernelSU NEXT 12183+ reference
  • WARNING: Conflicts with SuSFS. You don’t need this if you can implement SuSFS.
  • Adaway compatible
  • Hiding: good method but you can probably just implement susfs.

mode=7

generic_overlay

  • generic overlayfs rw mount
  • should work on all managers
  • OPT-IN only due to awfully high susceptability to detections
  • leaks an overlayfs mount (with /data/adb upperdir), leaks globally modified hosts file
  • Adaway compatible
  • Hiding: essentially no hiding, needs assistance

mode=8

ksu_susfs_overlay

  • susfs-assisted overlayfs rw mount
  • KernelSU only
  • Requires susfs-patched kernel and userspace tool
  • Adaway compatible
  • Hiding: good method but ksu_susfs_bind is easier