Script to mount CIFS and share on boot - TouchPad Development

I have been trying to get a few winodws shares to auto mount at boot on the Touchpad for my kids. I have tried CIFS Manager, but the mounts are not remounted at boot.
I looked into alternative options and saw the Script Manager option floating around. I figured this could work since I am somewhat handy with code.
So here is what I would like to do. Set a script to run at boot to do the following:
1. Pause for a number of seconds to allow wifi to connect successfully and completely (say 60).
2. Load the CIFS modules (i think this would work):
Code:
insmod /system/lib/modules/cifs.ko
insmod /system/lib/modules/nls_utf8.ko
3. Pause if needed to allow them to load successfully and completely.
4. Mount the shares as needed (prob not correct, but maybe close):
Code:
mount -t cifs -o user="your username",password="your pass" //192.168.10.4/Video /sdcard/Video
5. Exit
I would like to see if I can do this without user intervention and without the user noticing (no tray notification, etc.). If anyone else has any other ideas I am certainly open to them (such as CIFS Manager doing this somehow for me.)
Thanks in advance for any input.
Any additions here would be welcome as well. For instance, being Wifi SSID aware to unmount and remount upon connect would be gravy.

Can the "at" command be used in Android to run something at a future time?
Code:
at now + 15 minutes -f your_script

Mount Manager seems to work. Can also reconnect and disconnect on wifi connection events

HI Mate!
Short Question:
You are mounting CIFS from NAS or else?
Is it working smooth and in an acceptable speed?
Tried many apps and mount managers but network speed is so whorse that even little mp3 files over the network stutter...........
A chead Hawaii Phone or a Galaxy S Plus does the Job like a charm in the same Network. So it must belong to the TP! Maybe the cifs.ko is not working well......
Hoping for a nfs.ko to mount NFS Share but.............
I tried rootzwiki.............IRC.......... dalingrins tweet but it seems that all DEVS are mute...........
Without a good working Network the Touchpad worthless, sorry...........

I abandoned this b/c of wifi flakiness. However I think some of it may be due to Adfree (wierd...). Not sure yet, haven't had enough time to really troubleshoot.

Related

[Support Thread] ArchLinux on the TF300T(G)

Hi everyone,
If you have any questions relating to Arch on the TF300, please post them here and not in the dev thread
I'll do my best (as well as others, I'm sure) to answer them, but bear in mind that you should have some basic Linux knowledge before flashing!
this is awesome!
cb22 said:
Hi everyone,
If you have any questions relating to Arch on the TF300, please post them here and not in the dev thread
I'll do my best (as well as others, I'm sure) to answer them, but bear in mind that you should have some basic Linux knowledge before flashing!
Click to expand...
Click to collapse
I can't thank you enough for this, it's been fantastic so far! I only have a few questions, as I am extremely new to arch linux...as in this is the first time I've used anything aside from debian in the linux world.
To start, how would we go about changing DE's? I've downloaded a couple, but i get errors every time i try to start one saying that another window manager is already running. With ubuntu one just logged out and chose from the log in screen, but there doesn't appear to be a log out process for this, i get a black screen every time i do. Other than that, are there any general programs/settings/tweaks that you would suggest applying? While this is very nice, it still seems to be missing some basic functions, such as putting the screen to sleep and having a set system time.
Despite all of that, this has breathed new life into my tablet, you're doing fantastic work and I hope you only continue to make it more amazing!
fankuan19 said:
To start, how would we go about changing DE's? I've downloaded a couple, but i get errors every time i try to start one saying that another window manager is already running. With ubuntu one just logged out and chose from the log in screen, but there doesn't appear to be a log out process for this, i get a black screen every time i do. Other than that, are there any general programs/settings/tweaks that you would suggest applying? While this is very nice, it still seems to be missing some basic functions, such as putting the screen to sleep and having a set system time.
Click to expand...
Click to collapse
Take a look at the .xinitrc file in the home directory. It's a hidden file so you may need to "show hidden" or give an editor the full path (/home/user/.xinitrc)
The file runs the following by default:
Code:
exec startxfce4 --with-ck-launch
You can change everything after `exec` to the script for a different DE, such as `startkde`. If you don't know the command, there should be a list of session templates in /usr/share/xsessions/. Inside each .desktop file there's an "Exec=" line, everything after that is the command to sub in.
My crappy bash skills threw together a quick command to get a list of installed xsessions:
Code:
grep "Exec=" /usr/share/xsessions/*.desktop | sed -E 's/^Exec=(.+)$/\1/'
The output on the default rootfs will just be "startxfce4". If you have KDE another line should output "startkde", and so on. Put the command in your .xinitrc (making sure to replace the current one) and then reboot as there's no proper way to log out.
whoops
timothyb89 said:
Take a look at the .xinitrc file in the home directory. It's a hidden file so you may need to "show hidden" or give an editor the full path (/home/user/.xinitrc)
The file runs the following by default:
Code:
exec startxfce4 --with-ck-launch
You can change everything after `exec` to the script for a different DE, such as `startkde`. If you don't know the command, there should be a list of session templates in /usr/share/xsessions/. Inside each .desktop file there's an "Exec=" line, everything after that is the command to sub in.
My crappy bash skills threw together a quick command to get a list of installed xsessions:
Code:
grep "Exec=" /usr/share/xsessions/*.desktop | sed -E 's/^Exec=(.+)$/\1/'
The output on the default rootfs will just be "startxfce4". If you have KDE another line should output "startkde", and so on. Put the command in your .xinitrc (making sure to replace the current one) and then reboot as there's no proper way to log out.
Click to expand...
Click to collapse
First of all, thanks for the help! Unfortunately, I appear to have done something incorrectly, as the Linux partition will no longer boot. That code didn't return anything but a ">", although as I type this i realize I may have needed to be root...haha, regardless, I tried to edit the .xinitrc file with "exec /bin/usr/startlxde", which is what was after "exec=" in the xsessions directory, nothing happened after waiting quite a while after boot.
I suppose I'll have to reflash the entire partition, considering i can't access the filesystems to change it back. Ah, the wonders of linux!
Sorry if I repeat my question,but how can i activate the keyboard without using a pc with linux ?
fankuan19 said:
First of all, thanks for the help! Unfortunately, I appear to have done something incorrectly, as the Linux partition will no longer boot. That code didn't return anything but a ">", although as I type this i realize I may have needed to be root...haha, regardless, I tried to edit the .xinitrc file with "exec /bin/usr/startlxde", which is what was after "exec=" in the xsessions directory, nothing happened after waiting quite a while after boot.
I suppose I'll have to reflash the entire partition, considering i can't access the filesystems to change it back. Ah, the wonders of linux!
Click to expand...
Click to collapse
You should be able to gain access easily via Recovery. Just adb shell in, mount /dev/mmcblk0p8 /mnt and look in /mnt/linux - that's your root file system...
Razorbacktrack5535 said:
Sorry if I repeat my question,but how can i activate the keyboard without using a pc with linux ?
Click to expand...
Click to collapse
Without using a PC... Hmm, that could be tricky. If you're in Android, and you add this line to the top of /data/linux/home/user/.xinitrc
Code:
maliit-server &
(before the exec line)
It should give you the virtual keyboard when you restart into Linux.
cb22 said:
You should be able to gain access easily via Recovery. Just adb shell in, mount /dev/mmcblk0p8 /mnt and look in /mnt/linux - that's your root file system...
Click to expand...
Click to collapse
I was actually able to just use the terminal emulator in android to navigate back to the .xinitrc file, turns out i wasn't supposed to leave the "--with-yadda-yadda" bit, so i got lxde working...and as it turns out, i don't like it nearly as much as the DE you included, so i'll be switching back to that!
First off: thank you SO much for your hard work at this! My tab has never browsed the web this well. It's better than the desktop I'm sitting next to. Arch is amazing!
Just a few questions. Do we have basic tab controls yet? I'm looking for, specifically:
Brightness Control
Enable/Disable Touchpad
Volume Control
Sleep/Suspend/Hibernate
Especially that last one! As far as I can tell, if I'm not going to use the tab for more than a couple minutes, it's apparently best to shut it down or reboot back into Android so it can "sleep". Or plug it in. I know we're rough around the edges yet, but is this stuff in, or no?
koiulpoi said:
First off: thank you SO much for your hard work at this! My tab has never browsed the web this well. It's better than the desktop I'm sitting next to. Arch is amazing!
Just a few questions. Do we have basic tab controls yet? I'm looking for, specifically:
Brightness Control
Enable/Disable Touchpad
Volume Control
Sleep/Suspend/Hibernate
Especially that last one! As far as I can tell, if I'm not going to use the tab for more than a couple minutes, it's apparently best to shut it down or reboot back into Android so it can "sleep". Or plug it in. I know we're rough around the edges yet, but is this stuff in, or no?
Click to expand...
Click to collapse
I don't think sleep/suspend/hibernate is implemented at all quite yet. The backlight seems to turn off completely when the screen times out though so you can fake having a low power mode, though obviously true sleep would be nice.
As for volume control, use pavucontrol. You may need to install it with `pacman -S pavucontrol`.
For brightness ... there's no good way to do this as far as I can tell. XFCE has a brightness control applet you can add to the bottom panel but it doesn't seem to work, and most of the usual packages (e.g. xbacklight, etc) don't detect the backlight device. Oddly enough I gave e17 a try and its builtin brightness applet worked fine, I wonder what they do differently ...
At any rate you can control it manually: the file /sys/class/backlight/pwm-backlight/brightness has a 0-255 value which controls the screen brightness. Note that you need to run the echo command as root
Code:
# echo "1" > /sys/class/backlight/pwm-backlight/brightness # minimum brightness
# echo "255" > /sys/class/backlight/pwm-backlight/brightness # maximum brightness
# echo "0" > /sys/class/backlight/pwm-backlight/brightness # completely turns off backlight. use with care
Setting it to zero makes it next to impossible to see the screen. I ended up having to ssh into the device (or reboot) to get it back.
I modified the file through a PC and It works ! Thanks, no problems with wifi
Sleep / Suspend isn't implemented yet.
But, I did a bit of testing, and the TF should last for about ~40 hours with the screen off, and the processor in the Low Power mode (which it does automatically. Obviously, it's still wasteful compared to proper suspend, but it's not too bad.
Really liking this so far, other than managing to break wifi once, which I fixed by doing a quick re(install I guess is the proper term). Any chance of a future release having SLiM or something setup out of the box(I'd do it but looking at some of the guides, we are missing some files(?) :s) either that or is there a way to autologin a new user other than the default one named user?
(edit for more info) I've tried following a guide I found on the arch wiki which had me modify [email protected], but it didn't boot so I had to edit it back to the default.
Thanks for all your work cb22, and thanks for taking my advice and switching file hosts
This may be a dumb question
But I can't for the life of me find out how to flash the hybridkernel.blob, I've already done every other thing, but i'm lost as to what to do there. Can I get a bit of guidance please?
:Nevermind: Silly me forgot to go to fastboot, I was trying to do it with adb, for any others though, reboot to fastboot on your tf300t and then run go to the location of fastboot on your pc and hold shift and right click and select open comand line here. Then move the hybridkernel.blob to the same location as the fastboot and run fastboot -i 0x0B05 flash staging blob
Shingaling said:
But I can't for the life of me find out how to flash the hybridkernel.blob, I've already done every other thing, but i'm lost as to what to do there. Can I get a bit of guidance please?
:Nevermind: Silly me forgot to go to fastboot, I was trying to do it with adb, for any others though, reboot to fastboot on your tf300t and then run go to the location of fastboot on your pc and hold shift and right click and select open comand line here. Then move the hybridkernel.blob to the same location as the fastboot and run fastboot -i 0x0B05 flash staging blob
Click to expand...
Click to collapse
Disregard, didn't see the edit until after you posted essentially the same thing I did.
So, does Adobe Flash support work at all in Chromium? I haven't gotten it to recognize the plugin at all. Any way to get this working, or is it just gonna keep bugging me to install it?
koiulpoi said:
So, does Adobe Flash support work at all in Chromium? I haven't gotten it to recognize the plugin at all. Any way to get this working, or is it just gonna keep bugging me to install it?
Click to expand...
Click to collapse
I don't think it works at all, I've tried every permutation sudo pacman -S flash-plugin that I could think of and I've gotten notwhere.
They is no flash for ARM for pure Linux.
Wysyłane z mojego ASUS Transformer Pad TF300T za pomocą Tapatalk 2
Itege said:
Any chance of a future release having SLiM or something setup out of the box(I'd do it but looking at some of the guides, we are missing some files(?) :s) either that or is there a way to autologin a new user other than the default one named user?
(edit for more info) I've tried following a guide I found on the arch wiki which had me modify [email protected], but it didn't boot so I had to edit it back to the default.
Click to expand...
Click to collapse
In theory you should be able to install a proper display manager without too many issues:
Code:
# pacman -S lightdm lightdm-gtk-greeter
# systemctl enable lightdm
...though when I tried this the DM would never actually be run. I was able to run it manually over SSH without issues (both lightdm and slim worked, more or less). I'm in the process of investigating why it isn't run at startup like it should be, whatever the issue is doesn't seem to be related to the display manager itself.
I have an issue with wifi.
1: The WLAN do not find any Network with Channel 12 or 13.. I think I must change the region in germany, but where?
2. The WLAN do not connect, they search for an network adress and after 30seconds they ask for wlan key again.. the key is correct and my router shows the connection.. but archlinux means the key is wrong.. testet with router und smartphone wlan hotspot..
3. 3G not connecting, i have create a profile for BASE Germany, but they do not connect.
UPDATE:
for 2: Sometimes they connect and I can surf. But the ping are more then 600ms.. After few seconds the connection lost, sometimes they connect again, sometimes say ask for wlan key again.
Maybe you can help me. Sorry for my bad english.
Yours Sincelery
Robert
Could any of you guys find out if you have a process running in "interruptible" state named "kinteractive_lo"?
You can check that using "top" in CLI or installing gnome-system-monitor. I guess the standard xfce task manager works as well.
It's driving me nuts and I believe is one of the reasons why I have to hard-reboot my tablet, since invoking reboot with --force works perfectly.
Thanks in advance!

[Q] ubuntu on galaxy s2! no vnc. anyone interested in helping?

Hello All,
Another ubuntu project here..
its a chroot jail free looped native framebuffered something?
one folder on sdcard called linux /sdcard/linux with the .img
your mount point..i use /data/local/mnt/linux
the scripts i use /data/local/mnt
simple you will need to edit the scripts if u edit ur paths..
ill share my stuffs if theres any interest in this.
dunno if this has been done on sgs2 using just scripts but yh
ive managed to get ubuntu13.04 running with full multitouch support using mtrack i use lxde/2d-unity
this approach uses android framebuffer instead of using a vncserver.
Concept/Goal: use android hardware to run linux without vnc and full hardware support...its christmas soon!
so we go a safe way and mount a img file and loop and chroot and mount necessary android stuff i.e /dev /proc /tmp-to help speed up system! and mount all sdcards.
then we kill android-the-framebuffer-hog
and start our xsession,
anyone interested in helping me?
i have the scripts and image, just need more nuerons!
to do is (alot)
Working:
EDIT>> now have unity working but takes forever to load..used alot of mesa stuff for opengl.
The GL_OES_EGL_IMAGE error has gone and unity starts from terminal. I know its a big claim but yh
Framebuffer >> full gamma and .mhz settings safe
Wifi
Bluetooth
Reboot to andoid and umount rootfs on log out
Mouse
Multitouch tap is click, double tap is ?grab window to move it, two fingers for right click, three to scroll
Screenshots
Charging
Sdcard
MicroSd
Keyboard >> virtual
Theres alot but its hard to summerise lol
Not Working (WIP)
get sound working completely (evrythings working except last output part) alsamixer, pulseaudio all work..just the last bit..so no sound.
figure out why system_bus_socket connection refused?
why dbus isnt being used but starting ok?
Landscape mode mouse axis. (i can rotate the display but the mouse axis are wrong.. up=right down=left) (portrait is fine)
camara
gpio-keys (hardware buttons)
calls
text messaging.
OTG USB (i made one so im assuming its that that doesnt work simply tweak to the xorg.conf to swap from touch to mouse..)
DRI & DRI2
GL_OES_EGL_image for 3d
have to use a virtual keyboard until running android apps in linux is figured out--ahem (i use matchbox-keyboard)
logon screen works but the keyboard is a issue. (virtual keyboard only starts once logged in. so no logon yet just auto logon)
you can still use ssh and vncserver if you wanted to..
any interest ill share my scripts...
as i said im not the only person to chroot imgs, but i havent seen a thread on getting it running natively on sgs2 without uboot or repartioning anything.
unless u completely recompile the linux os whilst inside of it, i.e adding vmlinux.img should be safe enough. works for me
anyway been a busy with this and im not a pro developer just a seasoned addict, thus the call for arms!
peace!

Cifs support in Android 4.3

Hi all,
Have any of you been able to get a Cifs share mounted under android 4.3 on the N10.
I've tried various kernels and managers like Cifs manager but with no joy, they complain of invalid argument.
It seems like there has been success on the N7 according to this thread http://forum.xda-developers.com/showthread.php?t=2107224&page=7 but I can't see anything for the N10.
If it does work for you could you let me know what ROM / Kernel combo you use?
Not only 4.3. I haven't managed to make it work on 4.2.2 either
Sent from my GT-I9505 using Tapatalk 4
http://forum.xda-developers.com/showthread.php?t=2430056
^^^^^^^ What zod said. Working fine for me
I tried several combinations to mount CIFS shares with mountmanager:
Trinity + Carbon Rom, Sentinel, CM10.2 = works without problems
Flaming Monkey + Carbon Rom, Sentinel, CM10.2 = works - but without UTF-8 (for special characters like öäü...)
KTManta + Carbon Rom, Sentinel, CM10.2 = doesnt work.
Any Kernel + Purity Rom, AOKP, PA = doesn't work.
Could someone please confirm if CIFS is finally dead on Android? I haven't seen a single user manage to make it work. I even asked kernel developers to patch their kernel with this only solution provided here and even though they were happy in the beginning they never wanted to talk about it later which makes me think it was a hell or them.
I'd really like to know if I should just uninstall all CIFS related staff and just forget about it.
Edit:
Sorry I think it's wrong threat
andreasy said:
Could someone please confirm if CIFS is finally dead on Android? I haven't seen a single user manage to make it work. I even asked kernel developers to patch their kernel with this only solution provided here and even though they were happy in the beginning they never wanted to talk about it later which makes me think it was a hell or them.
I'd really like to know if I should just uninstall all CIFS related staff and just forget about it.
Edit:
Sorry I think it's wrong threat
Click to expand...
Click to collapse
Google sure seems to be trying really hard to kill CIFS (and any network filesystems for that matter) on Android. As it stands now (in 4.3) there is no possible way to get CIFS working properly on the stock ROMs with a stock kernel. This is because the geniuses at Google removed loadable module support from the stock kernel and because of the way they implemented the multi-user stuff (using filesystem namespaces). The thing that kills me is that there is absolutely no reason for Google to make this so difficult. They could have simply compiled support for network filesystems into the kernel if they wanted to remove modules for "security". It would also be trivial for them to add a mount point which propagates to the user namespaces. They did this crap on purpose. And that is exactly the reason why my next tablet will not be an Android one. You shouldn't have to hack your tablet to get basic functionality that should just work out of the box. I'm done being scroogled.
Anyhow, I did manage to get CIFS working on my Nexus 7 which is running 4.3. See my post here for details. Now, I don't think my kernel will work on your Nexus 10. But, if you flash someone else's custom kernel (or compile your own) for the Nexus 10 which does have CIFS support/modules you should be able to use my update.zip which does not contain the kernel. I don't have a Nexus 10 to test on, so I can't promise anything but I don't see why it wouldn't work.
With new 4.3.1 Rom Versions I have troubles with CIFS Mount.
I can mount my NAS without problems with Terminal command, and I can see all mounted Files and Folders in Terminal.
But any App (like ES Fileexplorer, Solidexplorer, Power-Amp....) can't see any files. The Folder always keeps empty.
I have tried several mount points: /sdcard/cifs, storage/emulated/legacy/cifs, /data/media/cifs. Always the mount is visible in Terminal but not in all apps.
I have tried many mount options like: noperm, rw, file_mode, dir_mod, gid.....
cien12 said:
With new 4.3.1 Rom Versions I have troubles with CIFS Mount.
I can mount my NAS without problems with Terminal command, and I can see all mounted Files and Folders in Terminal.
But any App (like ES Fileexplorer, Solidexplorer, Power-Amp....) can't see any files. The Folder always keeps empty.
I have tried several mount points: /sdcard/cifs, storage/emulated/legacy/cifs, /data/media/cifs. Always the mount is visible in Terminal but not in all apps.
I have tried many mount options like: noperm, rw, file_mode, dir_mod, gid.....
Click to expand...
Click to collapse
Hi there, could you post the command line you use to mount your NAS drive ? I keep getting "Invalid argument", this is what I've tried
Code:
mount -t cifs //192.168.1.3/music /mnt/music
pkfox said:
Hi there, could you post the command line you use to mount your NAS drive ? I keep getting "Invalid argument", this is what I've tried
Code:
mount -t cifs //192.168.1.3/music /mnt/music
Click to expand...
Click to collapse
You have to get su access first with "su"
mount -r -o noperm,rw,file_mode=0777,dir_mode=0777,uid=1000,gid=1000,unc=\\\\192.168.0.10\\music,username=***,password=*** -t cifs none /sdcard/cifs
Thanks that worked, do you know of a way to mount automatically at boot time on Android ? I notice there is no /etc/fstab
Thanks again.
Hi all, if your goal is simply to play music and video from your NAS to your android device, you can use Kodi (xbmc) that can access cifs path directly!

[Q] Empty CIFS-mounted directories

I'm currently running an OMNI build for everest, which is working delightfully well. The only thing I can't seem to achieve is to mount a CIFS directory. Actually, it can be mounted, but its contents are only visible to root.
While doing some research I found this thread. For what the description says, I assume this fix has been applied in CM, since I was able to mount CIFS (outside of /storage) before switching from CM to OMNI.
Would these patches be applicable for OMNI? If so, I would try to ask the everest ROM creator to apply them, or even try myself. But I'm afraid I may be lacking the knowledge to judge whether it'd just be a waste of time.
Thanks in advance for any tips on this matter.
Any update on the topic? I've tried Omni on my Nexus 10 and it runs perfectly well but this is the last thing that stops me from using the ROM. After mounting the data from my CIFS or NFS share the data is only available from the app performing the mount. The patches in the link from the previous post seems to work around this issue, is there any chance it could be applied to OmniROM?
Try to mount your folders manually (or by GScript) with Superusers --mount-master switch to make the mounts available to all processes. Something like this.
The su binary now also has a "--mount-master" option that connects you to a su session in the main mount namespace. Mount commands in this session should affect all processes. This is still a bit experimental, and getting it working requires a reboot after upgrading the binaries from a pre-1.93 version. This feature has been asked for a lot by devs, and it escapes the need to hijack system services to affect system-wide mounts, which is becoming more complicated with every Android release. A new version of StickMount will be released in a few days as well, taking advantage of this feature, and thus avoiding a number of issues some are seeing.
https://plus.google.com/+Chainfire/posts/hLKytCwUm6k
Click to expand...
Click to collapse
Alternatively, there is still the possibility to hijack a system service (like SSH one) to point to a script instead that will bring up your mounts. I'm personally using this so i haven't checked the SU method yet.
Good Luck!
DualJoe said:
Try to mount your folders manually (or by GScript) with Superusers --mount-master switch to make the mounts available to all processes. Something like this.
Alternatively, there is still the possibility to hijack a system service (like SSH one) to point to a script instead that will bring up your mounts. I'm personally using this so i haven't checked the SU method yet.
Good Luck!
Click to expand...
Click to collapse
Thanks, --mount-master works like a charm!

How can I get write access to smb network shares mounted via Shield Experience 7.2.2?

The option to mount network shares is nice but only grants read permissions to the shares.
I know it's because of security concerns, I also know there's some api and app whitelisting allowing Plex app write permissions.
I don't use the Plex app.
My Shield is rooted through Magisk.
I want all my installed apps to have write permissions to the shares. Imho Shield Experience should allow the user to make this decision.
Without write permissions, for me the mount option is useless.
Can anyone help me to get write permissions to my mounted shares?
ABSOLUTELY ++++++1000000 for this.
Did you get this working @trohn_javolta !??!
That's exactly my problem !! I have two ShieldTV (2017 / 16GB / 8.0.1). Both successfully rooted with Magisk.
How can I give all my installed apps WRITE RIGHTS to my network drive (NAS)?!? Or even specific apps I CAN CHOOSE !!!
It is very annoying that eg RetroArch can not save the scores, savestats, controller settings, ...
Or even xFile Explorer can not write to the my NAS.
IMHO, as long as i am rootet, i should decide by my own how "secure" i want my system !!
Please help us to write on a network drive as normal.
On my Phone i can write to my NAS (ES File explorer) without any problems... So why is the shield not allowed?!
Thank you
Kamikaze01 said:
ABSOLUTELY ++++++1000000 for this.
Did you get this working @trohn_javolta !??!
That's exactly my problem !! I have two ShieldTV (2017 / 16GB / 8.0.1). Both successfully rooted with Magisk.
How can I give all my installed apps WRITE RIGHTS to my network drive (NAS)?!? Or even specific apps I CAN CHOOSE !!!
It is very annoying that eg RetroArch can not save the scores, savestats, controller settings, ...
Or even xFile Explorer can not write to the my NAS.
IMHO, as long as i am rootet, i should decide by my own how "secure" i want my system !!
Please help us to write on a network drive as normal.
On my Phone i can write to my NAS (ES File explorer) without any problems... So why is the shield not allowed?!
Thank you
Click to expand...
Click to collapse
Hi, yes I managed to do so Idk if I recall all required steps but I'll try. Let me know if it worked.
First in Magisk Manager Settings under "mount namespace" set "global namespace".
Then under Download, search and install the Busybox module and restart your shield.
Now open up a terminal, I prefer Termux. Type su, enter.
Now you create the folder where you'll mount your smb share to. Make sure it's in /mnt/cifs:
mkdir -p /mnt/cifs
mkdir -p /mnt/cifs/hdd
chmod -R 777 /mnt/cifs
mount -t cifs -o username=<username>,password=<pw>,rw,dir_mode=0777,file_mode=0666,iocharset=utf8,noperm,sec=ntlmssp,rsize=32768,wsize=32768 "//<ip>/<path to share>" /mnt/cifs/hdd
Since this has to be executed after every reboot, I set up a profile in Tasker App that does this automatically after a reboot. Hope this works for you :good:
trohn_javolta said:
Hi, yes I managed to do so Idk if I recall all required steps but I'll try. Let me know if it worked.
First in Magisk Manager Settings under "mount namespace" set "global namespace".
Then under Download, search and install the Busybox module and restart your shield.
Now open up a terminal, I prefer Termux. Type su, enter.
Now you create the folder where you'll mount your smb share to. Make sure it's in /mnt/cifs:
mkdir -p /mnt/cifs
mkdir -p /mnt/cifs/hdd
chmod -R 777 /mnt/cifs
mount -t cifs -o username=<username>,password=<pw>,rw,dir_mode=0777,file_mode=0666,iocharset=utf8,noperm,sec=ntlmssp,rsize=32768,wsize=32768 "//<ip>/<path to share>" /mnt/cifs/hdd
Since this has to be executed after every reboot, I set up a profile in Tasker App that does this automatically after a reboot. Hope this works for you :good:
Click to expand...
Click to collapse
WoW !! Thank you thausand times !!
I will give it a try at home later and report back
Kamikaze01 said:
WoW !! Thank you thausand times !!
I will give it a try at home later and report back
Click to expand...
Click to collapse
No problem, hope it works.
It's a shame that this still isn't possible without root on latest Shield Experience!
Btw: Are you on latest Shield Experience 8.0.1 (Android Pie) or did you also stay on 7.2.3?
trohn_javolta said:
No problem, hope it works.
It's a shame that this still isn't possible without root on latest Shield Experience!
Btw: Are you on latest Shield Experience 8.0.1 (Android Pie) or did you also stay on 7.2.3?
Click to expand...
Click to collapse
Many thanks for the help !! I am already at 8.0.1 ... Hopefully your workaround will still work: - /
Yes, it is really a shame for nvidia that it is still not possible to have write access to its own network drives.
Above all, this restriction is not widely publicized. I had to deal with it for a long time and I've been looking for the bug for a very long time ON MY SIDE, until I read on the Internet that this problem (write permission on network) is caused by the shield.
Anyway thank you very much for your tips - I'll try it that way and maybe later in the evening i can report.
Currently i am at work and come home later... :good:
Okay... I just tried your tips but got an error from Terminux, that my NAS is read only
So same problem as before... Damn.
Terminux output:
https://imgur.com/a/8gTQYWe
Kamikaze01 said:
Okay... I just tried your tips but got an error from Terminux, that my NAS is read only
So same problem as before... Damn.
Terminux output:
https://imgur.com/a/8gTQYWe
Click to expand...
Click to collapse
Hmmm.. and you did use username and password? Cause it's not in the command on the screenshot.
The message suggests that the share you're trying to mount is read only.
Hello and thanks for the answer.
I have entered the commands exactly as you told.
Terminux does not display the complete command, but I entered PW and USER correctly
I had to do it with controller, because I had no keyboard and mouse available. But i don't think i did any mistakes.
At the moment I use the app "FolderSync" and matched the required folder directly under the two shields.
That's an ugly workaround, but it works ...
Anyway, I thank you very much for the tips and the hint. I will try again with keyboard later maybe...
Still find it very sad from nVidia that they does not give us the freedom (write on NAS) on our own devices
Kamikaze01 said:
Hello and thanks for the answer.
I have entered the commands exactly as you told.
Terminux does not display the complete command, but I entered PW and USER correctly
I had to do it with controller, because I had no keyboard and mouse available. But i don't think i did any mistakes.
At the moment I use the app "FolderSync" and matched the required folder directly under the two shields.
That's an ugly workaround, but it works ...
Anyway, I thank you very much for the tips and the hint. I will try again with keyboard later maybe...
Still find it very sad from nVidia that they does not give us the freedom (write on NAS) on our own devices
Click to expand...
Click to collapse
Make sure to hit the "reply button" under my post, this way I get notified upon your answer :good:
Did you unmount the share via the offcial way before trying to mount in terminal? I mean go to settings -> storage and unmount the share there?
I'll take the leap shortly and will update to latest shield experience version...I just have to decide whether to wait for another update or not.
I'll report back but I see no reason why it shouldn't work on pie.
trohn_javolta said:
Make sure to hit the "reply button" under my post, this way I get notified upon your answer :good:
Did you unmount the share via the offcial way before trying to mount in terminal? I mean go to settings -> storage and unmount the share there?
I'll take the leap shortly and will update to latest shield experience version...I just have to decide whether to wait for another update or not.
I'll report back but I see no reason why it shouldn't work on pie.
Click to expand...
Click to collapse
Hello and thank u for your answer.
I tried again WITH keybord *g* and unmount my NAS before.
THIS time something seem to work, cause Terminux Output sais "Operation beeing performed..." (or beeing executed or something like this).
But another 2 hourl later nothing changed... i restart my shield but only the cifs folder disapeared.
No write access
Did you tried with Shield experience 8.0.1
Thank you
Kamikaze01 said:
Hello and thank u for your answer.
I tried again WITH keybord *g* and unmount my NAS before.
THIS time something seem to work, cause Terminux Output sais "Operation beeing performed..." (or beeing executed or something like this).
But another 2 hourl later nothing changed... i restart my shield but only the cifs folder disapeared.
No write access
Did you tried with Shield experience 8.0.1
Thank you
Click to expand...
Click to collapse
Hmm.. ok. It is expected behaviour that the cifs folder is gone after reboot, that's why I use Tasker to automatically create it and execute mount command after every reboot.
Is it possible that maybe Termux didn't get root rights? You can check that by opening Magisk Manager app and going to "Superuser" tab. There should be Termux entry and root rights enabled, if not do so and try again. I always go to the settings in Magisk Manager first and set "automatically grant root rights".
trohn_javolta said:
Hmm.. ok. It is expected behaviour that the cifs folder is gone after reboot, that's why I use Tasker to automatically create it and execute mount command after every reboot.
Is it possible that maybe Termux didn't get root rights? You can check that by opening Magisk Manager app and going to "Superuser" tab. There should be Termux entry and root rights enabled, if not do so and try again. I always go to the settings in Magisk Manager first and set "automatically grant root rights".
Click to expand...
Click to collapse
Yeah... I remember - you already told me about this problem at reboot.
Is it possible to get your Tasker Profile for that *g*
I know Tasker and already use it on my phone...
Kamikaze01 said:
Yeah... I remember - you already told me about this problem at reboot.
Is it possible to get your Tasker Profile for that *g*
I know Tasker and already use it on my phone...
Click to expand...
Click to collapse
It's a really simple one. As event I chose "booting device" and as task I use a simple execute shell task.
I did more digging and maybe can give more info. Just as a quick checklist:
You installed busybox magisk module? (maybe not required for mount command)
SE Linux mode is set to permissive? (maybe not required anymore, if successfull can be disabled later)
In Magisk Manager settings set "global mount namespace"?
By having magisk flashed, you should already get su and mount commands..
You can try changing the mount command a bit, I found sth. that might work:
su -mm -c mount -t cifs -o username=<username>,password=<pw>,rw,dir_mode=0777 ,file_mode=0666,iocharset=utf8,noperm,sec=ntlmssp, rsize=32768,wsize=32768 "//<ip>/<path to share>" /mnt/cifs/hdd
mm means mount master and should force everything to run in the global mount namespace (so the share can be accessed by every app with read/write permissions, not only with Termux)

Categories

Resources