oufm / UMS-Interface

config the USB mass storage for android to use the phone as usb disk, provide mount function and simple file explorer.
GNU General Public License v3.0
100 stars 21 forks source link

Can't find lun file ? #12

Open rexackermann opened 10 months ago

rexackermann commented 10 months ago
+ dirname /data/data/com.termux/files/home/usb_mass_storage.sh
+ cd /data/data/com.termux/files/home
+ pwd
+ basename /data/data/com.termux/files/home/usb_mass_storage.sh
+ script_path=/data/data/com.termux/files/home/usb_mass_storage.sh 
+ basename /data/data/com.termux/files/home/usb_mass_storage.sh
+ log_path=/sdcard/usb_mass_storage.sh.log 
+ termux_bin=/data/data/com.termux/files/usr/bin 
+ mount=/data/data/com.termux/files/usr/bin/mount 
+ umount=/data/data/com.termux/files/usr/bin/umount 
+ losetup=/data/data/com.termux/files/usr/bin/losetup 
+ find=/data/data/com.termux/files/usr/bin/find 
+ truncate=/data/data/com.termux/files/usr/bin/truncate 
+ toast=/data/data/com.termux/files/usr/bin/termux-toast 
+ mkfs='' 
+ lun_file='' 
+ default_size_mb=2048 
+ src=/storage/emulated/0/mass_storage.img 
+ dst=/sdcard/mass_storage 
+ '[' namespace '=' root ']'
+ '[' namespace '=' namespace ']'
+ run_with_namespace
+ typeset block
+ '[' -z '' ']'
+ search_lun_file
+ typeset configfs_mount
+ typeset config_path
+ /data/data/com.termux/files/usr/bin/mount
+ grep configfs
+ configfs_mount=$'none on /config type configfs (rw,nosuid,nodev,noexec,relatime)\nnone on /debug_ramdisk/.magisk/mirror/config type configfs (rw,nosuid,nodev,noexec,relatime)\n/dev/block/dm-14 on /system/etc/init/hw/init.usb.configfs.rc type ext4 (ro,seclabel,relatime,discard)' 
+ '[' -n $'none on /config type configfs (rw,nosuid,nodev,noexec,relatime)\nnone on /debug_ramdisk/.magisk/mirror/config type configfs (rw,nosuid,nodev,noexec,relatime)\n/dev/block/dm-14 on /system/etc/init/hw/init.usb.configfs.rc type ext4 (ro,seclabel,relatime,discard)' ']'
+ echo $'none on /config type configfs (rw,nosuid,nodev,noexec,relatime)\nnone on /debug_ramdisk/.magisk/mirror/config type configfs (rw,nosuid,nodev,noexec,relatime)\n/dev/block/dm-14 on /system/etc/init/hw/init.usb.configfs.rc type ext4 (ro,seclabel,relatime,discard)'
+ awk '{print $3}'
+ config_path=$'/config\n/debug_ramdisk/.magisk/mirror/config\n/system/etc/init/hw/init.usb.configfs.rc' 
+ /data/data/com.termux/files/usr/bin/find $'/config\n/debug_ramdisk/.magisk/mirror/config\n/system/etc/init/hw/init.usb.configfs.rc' -type f -name file
find: ‘/config\n/debug_ramdisk/.magisk/mirror/config\n/system/etc/init/hw/init.usb.configfs.rc’: No such file or directory
+ lun_file='' 
+ '[' -e '' ']'
+ /data/data/com.termux/files/usr/bin/termux-toast 'can'\''t find lun file'
+ exit 1

What's going on ?

oufm commented 10 months ago

You can try this: https://github.com/oufm/UMS-Interface/commit/2bf52895330c50d35f57ffd276fe894de56cd33a

rexackermann commented 10 months ago

Doesn't work. I guess mass storage doesn't work on recent android anymone. Thanks for the help though.

You can try this: 2bf5289