If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Somehow I managed to get CIFS working with latest 4.2 kernel for TV Sticks. I hope this helps @d33 to fix CIFS problem.
1. To get a successfull mount I used hints from here and issued a Terminal command (as 'su'):
Code:
mount -o unc=\\\\192.168.X.X\\ShareName,username=guest,password=guest -t cifs none /sdcard/cifs/ShareName
This actually got me a successfull errorless mount of my share. The next problem was this mounted share was only visible to root, e.g. when I did "ls" command as 'su' in Terminal I could see the folders inside the mount, but when I tried to see the share using filexplorers ES and RootBrowsers folders were empty.
2. The I stumbled uppon this post.
So I did excatly what that user has done. I masqueraded mount command inside '/system/bin/start-ssh' script, with endless loop added at the end:
Code:
#!/system/bin/sh
mount -o unc=\\\\192.168.X.X\\ShareName,username=guest,password=guest -t cifs none /sdcard/cifs/ShareName
while :; do echo 'Hit CTRL+C'; sleep 1; done
I got my share mounted and also it was visible to all users.
3. The next challenge is to see how I could issue this command and startup using init.d script, but late enough at boot to have wireless first connected.
I guess this is somewhat of a temporary solution...
I had given up on getting CIFS mounts to work after asking for help and receiving either none or one-word replies. After falling behind in keeping up with the forum, I came across the post above by milanj which reignited my desire to get it working. Armed with this and some new search terms for google, I found the following...
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.
So using 'su --mount-master' and then executing the mount command will allow non-root processes to access mounted directories and files. I've tested this on my 4.4.2 stick and it works.
I haven't yet automated it into a boot script, but I think I've found a bit of code that I can use to do that. Will keep you updated.
FIRST THINGS FIRST!! - Thank you! I just only register to say that and to put my 2cents maybe.
In the long way to make my MK809II work with Android 4.4.2 I had countless failures including bricking my MK809II and bringing it back to life making a bridge on pins 6 and 7 of the nand flash with a video from youtube.
...I flashed roms back and forth.... and never got CIFS working till NOW! ...... (mixing kernels from 4.2 to 4.4 broke my android stick by the way)
Almost one week fingering and reading ...... ing .... ing.....ing..... about the new permisions system etc bla .
I DID IT!!! got CIFs working LIKE i WANTED!
Here is the whole matter to do it: the "--mount-master" su command, and there is no need to use "unc////" adress.
THIS IS THE RIGHT SYNTAX: (btw: you need a rooted device and the "supersu" app dont know if works with the "superuser" app, and i recomend the "terminal emulator" app because we can make an icon (widget) to launch the comand and make it aviable fast.
on the terminal emulator:
Code:
su --mount-master -c mount -rw -o [COLOR=#3E3E3E][I]username=YOURS,password=YOURS, -t cifs //IP-ADRESS/SHARE [/I][/COLOR] //mnt/SHARE
Unfortunately that mount wont be writteable even if we set that. because of the new permisions.... but if you mount in other folder you create and sets propers permisions example //data/SHARE you could make it writeable.
NOW the last mile you want (an easy script to set up):
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity. We may share certain information about our users with our advertising and analytics partners. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment