one day of code

Mount network folder to android

April 04, 2021

You have an android device (Raspberry Pi or some other) and you want a NAS folder mounted on it?

# Connect to the device and authenticate as root
adb connect <IP>
adb shell
su root
# Create foler to mount the target
mkdir /mnt/<SOURCE>
# Mount the network location
mount -o username=<USER>,password=<PASS>,file_mode=0777,dirmode=0777 \
-t cifs //<NAS_IP>/<TARGET> /mnt/<SOURCE>

Written by Milan Miljkovic — a tech enthusiast and design system practitioner.