I'm writing a script to mount my NAS on the router when it gets unmounted by it (NAS it's phisically damaged, and I guess bad sectors cause some read operation to fail leading to the drive unmounting)
The thing is, how can I let the script insert my credentials for me?
telnet 192.168.100.1
###USERNAME AND PASSWORD PROMPT####
mount -t ext3 -o rw /dev/sdb1 /mnt/TrekStor
exit
I just got a clean install of CM10 on MB860 (no restore of any previous settings or apps) and tried Linux On Mobile. When I downloaded the Ubuntu Small image and tried to launch, I got the below error:
Code:
[email protected]:/ $
[email protected]:/ $ cd /sdcard
[email protected]:/sdcard $ su
[email protected]:/storage/sdcard0 # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /sdcard/ubuntu-13.10.SMALL.ext2.img
Checking loop device... FOUND
mount: mounting /storage on /data/local/mnt/external_sd failed: Invalid argument
No user defined mount points
net.ipv4.ip_forward = 1
Segmentation fault
Shutting down Linux ARM
umount: can't umount /data/local/mnt/external_sd: Invalid argument
umount: can't umount /data/local/mnt/dev: Invalid argument
I found one post on linux thread about a similar problem (invalid argument during mount) and the response suggested that the kernel might not support loopback devices. Has anyone been able to run linux on this combination? I would really appreciate any help on this.
Please help guys stuck here....
I've tried to delete malwarebytes apk from the /system folder (why it was in there is beyond me but.. it was) successfully un-mounted /system folder and deleted the .apk but i am unable to remount the /system folder again.
I checked it was not running before deleting although it would not working crash back to home screen run hence reason for deleting it in the first place and because of location I was unable to just uninstall or update it normally. now trying to remount the system folder It keeps saying mount: Device or resource busy
output from putty:-
login as: root
SSHD Server
[email protected]'s password:
[email protected]:/storage/emulated/legacy # mount -o remount,rw /system
[email protected]:/storage/emulated/legacy # mount -o remount,ro /system
mount: Device or resource busy
255|[email protected]:/storage/emulated/legacy # su
[email protected]:/storage/emulated/legacy # mount -o remount,ro /system
mount: Device or resource busy
tried:
login as: root
SSHD Server
[email protected]'s password:
[email protected]:/storage/emulated/legacy # adb remount
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
remount failed: Permission denied
[email protected]:/storage/emulated/legacy #
also tried from pc command line adb root and adb mount get same error/permission denied
any command I can run to force it or any command to find out whats stopping it, don't mind reflashing it after just don't want to brick the dam thing
I know that as soon as I reboot the box it will brick it, so I am desperate to try and force mount it if possible or anything at this stage
hopefully you guys can help me as I am not really an expert with androids and about run out of ideas how to fix this problem
thanks
Sorted now thanks anyway..
Hello,
does somebody know, how to mount network shares on a phone running Android 6? Its rooted using SuperSU, Busybox installed and the Kernel supports CIFS, its listed in /proc/filesystems. Methods that seemed to work on Lollipop are failing with the error "mounting //192.168.x.x/xxx on /mnt/nas failed: Invalid argument"
Maybe someone knows a solution.
Thanks,
Witti
CyanogenMod 13.0 (cm-13.0-20160712-NIGHTLY-acclaim.zip)
su
setenforce 0
or
echo 0 > /sys/fs/selinux/enforce
getenforce
>Permissive
After that I mounted with success:
busybox mount -o rw,nolock,hard,intr,vers=3 -t nfs 192.168.1.1:/nfs4_share /storage/emulated/0/cifs/nfs4_share
But folder is empty in file managers.
"busybox mount" show two mounting points:
192.168.1.1:/nfs4_share on /storage/emulated/0/cifs/nfs4_share type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,nolock,proto=tcp,port=2049,timeo=70,retrans=3,sec=sys,local_lock=all,addr=192.168.1.1)
192.168.1.1:/nfs4_share on /mnt/runtime/default/emulated/0/cifs/nfs4_share type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,nolock,proto=tcp,port=2049,timeo=70,retrans=3,sec=sys,local_lock=all,addr=192.168.1.1)
"adb logcat" show:
07-13 09:37:23.461 458 458 I Binder_1: type=1400 audit(0.0:1119): avc: denied { ioctl } for path="socket:[43380]" dev="sockfs" ino=43380 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=1
I changed mounting point to /mnt/media_rw/nfs4_share, and now I have one line in "busybox mount":
192.168.1.1:/nfs4_share on /mnt/media_rw/nfs4_share type nfs (rw,relatime,vers=3,rsize=32768,wsize=32768,namlen=255,hard,nolock,proto=udp,port=2049,timeo=70,retrans=3,sec=sys,local_lock=all,addr=192.168.1.1)
And when I executed mount command over "adb shell && su", files became accessible. But I have wrong user:group on Android /mnt/media_rw/nfs4_share (uid:gid of user on PC), so some programs can't read files. But I think this must be fixed on server side in /etc/exports.
Look like root rights required to access this mount folder, can't figure out where and how properly mount it.
Same problem when I trying to mount /storage/media:
/dev/block/mmcblk0p10
/dev/block/platform/omap/omap_hsmmc.1/by-name/media
So this is more general problem with proper mounting.
Dirty hack.
mount -o remount,rw /
mkdir -p /emmc; chown -R sdcard_r:everybody /emmc
mount -o remount,ro /
busybox mount -o rw,nolock,hard,intr,vers=3,rsize=32768,wsize=32768,proto=udp,timeo=70 -t nfs 192.168.1.1:/nfs4_share /emmc
For "media" disk (/dev/block/mmcblk0p10) mounting to /emmc working too:
busybox mount -t vfat /dev/block/platform/omap/omap_hsmmc.1/by-name/media /emmc -o rw,seclabel,nosuid,nodev,noatime
Files accessible by manages and payers without root access.
On another device with CM 11 I made additional steps:
Load nfs module on Android:
modprobe nfs
Executed on "server" (my PC), to match user:group on client "sdcard_r:media_rw":
chown -R 1028:1015 /nfs4_share
And for test only:
chmod -R 0777 /nfs4_share
And what is more important executed command over SuperSu with "--mount-master" argument:
su --mount-master -c "busybox mount -o rw,nolock,hard,intr,vers=3,rsize=32768,wsize=32768,proto=udp,timeo=70 -t nfs 192.168..1:/nfs4_share /emmc"
Details: http://forum.xda-developers.com/showthread.php?t=718719&page=6
So now on this devise all programs can see files in this share too.
Hey everyone,
I have pulled a block of encrypted userdata partition ".img" and trying to mount it on unecnrypted device (same device with encryption set to off). My device is rooted
I have tried these steps
1. Pulled the block on local system using adb pull - userdata_block.img
2. mounted the block on an unencrypted device over CIFS using busybox mount command - userdata_block is virtually present on /sdcard/temp/userdata_block.img
3. Want to mount this img file on device to check the directory status on Android 11 if all the directories are encrypted or not.
/system/bin/losetup /dev/block/loop2 /sdcard/temp/userdata_block.img
/system/bin/mount -o ro /dev/block/loop2 /sdcard/dummy
Getting below error on Android 11, same command works fine on Android 10.
mount: /dev/block/loop2: need -t
Does anyone has any idea how to fix this?