2

I'd like to move Termux/Nix-on-droid on my SD card as I lack space on internal storage. Unfortunately, SD cards are formatted in extFat so they can't deal with stuff that are common on ext4 systems, notably symlinks. I was thinking to use for that a .img file formatted in ext4 using mkfs, and mount it somewhere. But since my device is not rooted (and I don't want to root it for various reasons) I can't mount the file, even via adb:

/sdcard $ mount DCIM/virtualfs test_mount/                                                                                                                                                              
mount: bad /etc/fstab: No such file or directory

Is there any trick I can do to do that? For instance using some fakechroot-like tools?

2
  • 1
    Write access to the sdcard is on recent devices not possible using native Linux programs. Apps have to use the MediaStore service using it's Java API. Therefore I don't think Termux will work on an sd-card without root permissions.
    – Robert
    Commented Oct 28, 2022 at 14:08
  • Ok too bad, thanks. I was hoping that it would be possible maybe to fake that by using LD_PRELOAD to replace the system calls when a file is read/written: for instance I think that some tools like fake-chroot exploits tricks like that.
    – tobiasBora
    Commented Oct 28, 2022 at 15:54

0

You must log in to answer this question.

Browse other questions tagged .