Smb client mount using cifs library and cifsmanager - Galaxy Tab 10.1 Q&A, Help & Troubleshooting

Hello everybody, I'm new and I'm a noob
Yesterday night i have root my samsung galaxy tab 10.1, then i mount cifs module with the aim to moun a smb share on my tablet. In the end all works but i can't browse folder without root privileges. For example
Using root file manager or terminal i can browse read, edit or write any file
using another app i can't because it has no privileges.
Probably there'll be three solution
1- Run all app as root (i can't do that please help me)
2- Change permission to all folder (i don't like this way)
3- Resolve problem using other ways ( change cifs.ko or something like that)
Please help me, consider that i use cifs file taken from this thread
http://forum.xda-developers.com/showthread.php?t=1058713&page=2

Maybe you should set the mount point under /mnt/sdcard/
e.g. /mnt/sdcard/yourdir

I've tried but it doesn't work. I have red on the forum to put in the options
uid=1000 (system), gid=1015. You can read at the post 368 of this thread
http://forum.xda-developers.com/showthread.php?t=756158&page=37
But i can't get the solution

everything solved mountin on sdcard using option
uid=0,gid=1015

Solve a problem band another one will come. I have mounted a share and i can't write on it. Any ideas? I think that the problem is the same, on the privileges. I have red about cifs but i can't understand. First or all cifs privileges on android discard the server rule when i write a new file or edit a old one? Second when i use privileges what is the user that execute apps on android? Third i have to use it and what is its code? Thank you

up ^ up ^ up ^ up ^

Well everything works. I write what i did probably it'll be useful for anyone.
First of all android use a series of user each for subsistem ( gps,bluetooth, radio ecc) and app ( music player, contact ecc). When you mount a share any app have access to it only if it has all privileges, so you have to specify in option the uid of the app that should open or write the share. The uid of all apps can be found in /data/system/packages.xml.
That's all folks

Sorry for digging this up, but I just wanted to thank the OP.
I had exactly the same problem on my SGS and manually overriding uid and gid did the trick.
I wonder why only some people seem to have this problem, though.

Related

[Q] Superuser Permissions - how to add new app

Hi,
I have the app "superuser permissions" on my rooted Dell Streak.
Some apps request superuser permission and when they request, I can add them to the allowed apps list.
But some apps do not request permission.
How can I add superuser permission to those apps ?
For example, there is a web server named PAW. I want to run it on port 80 which requires root.
However, I can't add that to the list...
Also, some file managers do not request permission. How can I make them root ?
Hi mrmrmrmr
Well if an app doesn't request superuser permissions obviously it means it doesn't have that functionality in it so you can't just add it to it just by granting it permission it just doesn't work like that.
Again with File Managers they need to be written to need Root access and be granted permission you can't just grant them access as again thats just not how it works take Astro a great file manager but it doesn't have root access because it's not designed to do that. If you want a File manger with Root access that will on first use request superuser permission you need to look at Root Explorer that will do what you want as thats what it has been built to do.
But i would advise exercising extreme caution when doing anything with Root access as changing or deleting something without understanding exactly what you are doing can have seriously bad consequences. Seeing as you have asked these two questions i would really question if you should go messing around in Root unless you are really sure you know what you are doing or able or prepared to fix any mistakes you may make.
Marc
thank you for the clarifying post and the warnings.
well, actually being a user of Linux based OSs for more than 15 years, I know what "root" user is and what it can do.
I just didn't know how Android applications gain root access. (Thought they would all use it if somehow they were granted)
Now, for the filemanager , I'll install root explorer as you recommend.
But for the PAW webserver:
This application is listening on port 8080 by default.
For listeningon port 80 , it says it needs root access on the documentation.
But I couldn't find how to give root access.
Any idea ?
@mrmrmrmr
Well it sounds like you have a far better and greater knowledge and understanding then i do as prior to Android i have had no exposure to a Linux based OS. Although i believe Android is slightly different but sorry but i have no idea about the Web sever stuff as thats just not my thing at all and wouldn't know where to even start with it.
Marc
thank you Dogmann.
anyone else whou could give an idea ?
I tried the PAW webserver, and it didn't work for me either when i set it to port 80 - even though I have root access. I would suggest sending the developer an email, because that functionality is obviously broken.
An alternative would be to get iptables working (it's not installed on my device!) and run:
iptables -t nat -I PREROUTING --dport 8080 -m
state --state NEW -p tcp --sync -j DNAT --to
127.0.0.1:80
(got that from google: http://www.google.com/search?q=local+port+forwarding)
Dogmann said:
Hi mrmrmrmr
Well if an app doesn't request superuser permissions obviously it means it doesn't have that functionality in it so you can't just add it to it just by granting it permission it just doesn't work like that.
Again with File Managers they need to be written to need Root access and be granted permission you can't just grant them access as again thats just not how it works take Astro a great file manager but it doesn't have root access because it's not designed to do that. If you want a File manger with Root access that will on first use request superuser permission you need to look at Root Explorer that will do what you want as thats what it has been built to do.
But i would advise exercising extreme caution when doing anything with Root access as changing or deleting something without understanding exactly what you are doing can have seriously bad consequences. Seeing as you have asked these two questions i would really question if you should go messing around in Root unless you are really sure you know what you are doing or able or prepared to fix any mistakes you may make.
Marc
Click to expand...
Click to collapse
thank you thank you thank you and again tanks thanks thanks
what if you want to add ROM Manager or grant permission to it but ROM Manager won't ask for the permission?
ROM Manager doesn't currently work on the Streak. This might explain it not asking for permissions.
I have the same problem!
When I typed "updatebb" in emulator, it said "permisson denied". But the emulator didn't ask the permisson! So how can I give permission to it?

[Q] xperia x10 cifs

I want to mount some cifs or even better nfs mounts. I Found the cool cifs app, but I'm having no luck loading the cifs driver.
I have a rooted x10a
firmware 1.6
Kernel 2.6.29-rel semc-android semc 2
Build r1fa014
so what do I have to do? I have looked high and low for a x10 cifs.ko, and tried a ton of others with the app and insmod. Do I need to upgrde the kernel? build?
Current links to what I have to do would be apreciated.
Thanks
check the kernel compiling topic, I posted cifs kernel module for X10 there.
Thanks for the info
I have found your main post: # 716360, Compiling X10 kernel sources.
And I have downloaded your cifs.zip, put it on my x10. I can insmod or use the cifsmanager gui to load the module, and it appears to be running with no errors, lsmod even shows it.
But when I go to mount I still get the "No Such Device" error. Do i need to upgrade my phone first from the above specs?
I don't want to hijack the other post, so ill reply here.
Thanks
bango123 said:
Thanks for the info
I have found your main post: # 716360, Compiling X10 kernel sources.
And I have downloaded your cifs.zip, put it on my x10. I can insmod or use the cifsmanager gui to load the module, and it appears to be running with no errors, lsmod even shows it.
But when I go to mount I still get the "No Such Device" error. Do i need to upgrade my phone first from the above specs?
I don't want to hijack the other post, so ill reply here.
Thanks
Click to expand...
Click to collapse
use the same command line i used on the kernel topic,
also the destination directory must exists.
last but not least, busybox mount instead of the native android mount
if you succeed, please provide compiled module
After some work, I got it to work, and in the end it was not to complicated at all.
1. Get the CIFS module (driver) for the X10, I have attached a copy I am now using for version 1.6. It was compiled by alx5962 and put on these forums in another thread "Compiling X10 kernel sources". There is more info there. I just added "X10" to the name of his file to avoid confusion and posted it here in case of a search engine brought others here for help.
Unpack and save the file somewhere on your SD card, write down where it is at.
2. Install the CIFS Manager from apps, it will need root access to load the cifs module ("Superuser Permissions" app manages this very well), there is lots of info and this is a easy fix. Should be easy to find.
In settings:
Check "Load cifs module"
Check "Load via insmod"
the under path point it to where you saves the cifs modile (something like /sdcard/cifsx10/cifs.ko)
Then setup your share, for example:
Share Path:
192.168.0.1/Share
Mount Point:
/mnt/cifs/Share
Username"
me
Password:
mepassword
Don't worry about any of the options
And that should do it. I did try the command line mounting in the shell, that worked well too, I even made some scripts with a script app. But the CIFS Manager once i figured out my problem(read my note below), worked very well and very easy.
*NOTE* My big problem was an error when mounting "invalid argument". What I found is even if I have the share open to anyone with no password, it will spit out an error if you leave the username and password blank. I just put in "me" and "pw" (or anything really) and i was up and running in one foul swoop!
can i ask what is the point to all this?
mootmaina said:
can i ask what is the point to all this?
Click to expand...
Click to collapse
CIFS also called SMB is the network file sharing used by windows mostly, this would then let you share a folder on you sdcard over you wifi to your home pc leting you copy files to and from your phone without connectinig USB
I haven't tried to share any folders on the sdcard, but I use it to mount shares that are on the network on my pc. ES File Explorer is a nice app to browse the network, but some files wont open well using this.
My main use is to play media, mainly DIVX movies that are stored on my pc. By mounting a share on cifs ( smb - samba, or windows file sharing, both more or less same thing) I can open my DIVX movies with rockplayer and they play like a charm. I have heard of some other apps that have the same issue.
But now I can have access to all of my media stuff when i want.
you can also use webdrive - windows program for mounting ssh filesystems, and launch ssh daemon on android.
Anyone tried this on 2.1? Do we need a new cifs.ko?
Bump.
Anyone got any info on cifs and 2.1? Id like to upgrade but don't want to lose this use.
[sorry] Bump [/sorry]
I tries some of the cifs.ko files i found trying to use the same kernel version (2.6.29), but insmod gave me errors.
Please, if anyone found a working version of cifs.ko for X10 2.1 kernel, post it - or give us a hint ...
(yes i know, compiling it myself would be a way, ... - i promise i will try, but why reinvent the wheel?)
THANKS,
Bax
Bumpito
Still no news about the new cifs.ko ?
Thanks !
Sony Ericsson haven't released the sources for 2.1 yet, so no "cifs.ko" until then. (It seems SE are breaking the GPL license by not releasing their Linux kernel source code)
And is there a way without using cifs.to to play files (such as mp3 or avi) directly from a samba share on 2.1 or we have to wait ?
Bump
Anyone have any luck with 2.1 yet?
hhave we gotten this yet?
cifs.ko experia x10 2.1 rooted
dutchschultz said:
hhave we gotten this yet?
Click to expand...
Click to collapse
In this thread,
http://forum.xda-developers.com/showthread.php?t=716360&highlight=cifs&page=12
Many thanks to alx5962
goto page 1 for instruction, or just use cifsmanager for market

[Q] Backtrack 5 no longer working on Atrix. HELP

Hello all,
I recently put backtrack 5 on my atrix and was really enjoying having a pentesting suite on my mobile phone.
I used the method and image from this thread
http://forum.xda-developers.com/showthread.php?t=1074169&page=26
Everything worked perfectly for a while until...
I updated to 4.5.91 GB OTA and now it no longer works.
When attempting to start BT I get this
Code:
#startbt
losetup:applet not found
mount: applet not found
mount :no such file or directory
mount :no such file or directory
mount :no such file or directory
net.ipv4.ip_forward=1
Setting /etc/resolv.conf to Google open DNS 8.8.8.8 and 8.8.8.4
startbt cannot create /data/local/bt/etc/resolve.conf: directory non-existent
startbt cannot create /data/local/bt/etc/resolve.conf: directory non-existent
startby cannot create /data/local/bt/etc/hosts directory non-existent
It looks to me like the backtrack image is not getting mounted, thus the directories cannot be found.
Can someone please explain to me what in the world happened, and perhaps how I can go about fixing this?
I am rooted and do have busybox installed. Both are confirmed through the rootcheck app.
Also I apologize for not posting this in the thread in the thread I mentioned before, but post count prevents me from posting in dev forums.
If someone successfully solves my issue I would be glad to donate a a few bucks to the dev of their choice.
EDIT***
Nevermind It is fixed. Just in case others are having similar issues I will explain what was wrong...
After I updated to GB and re-rooted, I ran rootcheck to verify that I had root access. One thing I noticed is that my rootcheck claimed I didnt have busybox installed. So I reinstalled it. Like a dummy I installed it /system/xbin instead of /system/bin. Simply installing it to the correct place fixed things. I feel silly. Mods feel free to delete this.

How to fix the "invalid download uri" problem

Hi
"Invalid download uri" is a bad ass error that is the biggest flaw (IMHO) You can encounter. Solutions are (as far as I can tell):
- cache clear
- factory reset
But for those, who did this and still have the same problem (or don't wanna try the factory reset) there might be some hope. (I was searching for solutions and found none like this, so I hope I don't duplicate someone's ideas)
I was fighting with this for a longer time and I guess I finally managed to fix it. I tried to clear cache, Google Store and Services, I even removed and reinstalled Google Play. But as logcat said, there was still problem with access to the file that was downloaded (something about JaveException:FileAccessInvalid - or something similar).
So, to make the long story short:
- connect phone
- adb shell
- cd /data/data/com.android.providers.downloads
- ls -al
There should be 4 directories:
- one of them (install) is a link (not visible in CM File Manager, but visible in shell)
- app_sslcache, cache, databases
Those three should have similar attributes (drwxrwx--x), in my case, cache had ony drwx--x--x.
So an easy fix: chmod 771 cache (You should be root) and voila, everything works (You don't need reboot or to stop google play or anything) and no more "invalid download uri".
Please, if You have this problem try this fix and if it works for You, let others know (maybe even in the comment section below)...
PS: It's not dangerous, but anyway... You do this at Your own risk.
It WORKED!
What a life saver, I was able to change the permissions through FX Root Explorer.
Thank YOU.
Thanks!!!
Old thread but throwing a thank you out there. Was having this issue after rooting my VZW M8 and this solved the problem. Thanks! I also shared this link over on AndroidForums.com as I found a similar thread with no solution while googling this issue.
So thanks!
Thank you, for the inspiration, by looking at the logs, it was some permission pbl in com.android.vending and after some try, it was com.android.vending itself that was with bad permission.
771 on com.android.vending fix it for me!
Hi, was reading your suggestion how to fix problem"invalid dowload url' problem, followed your guide but no luck.
You wrote:
There should be 4 directories:
- one of them (install) is a link (not visible in CM File Manager, but visible in shell)
- app_sslcache, cache, databases
I have galaxy S5, rooted, using root explorer(everything visible) and within data/data/androidproviders.downloads I have only 3 files.
cache,databeses and lib.
but in another directory data/data/com.android.vending I do have files you mentioned and some more.
All of my files as well directories have same set of permissions, which is
rwxrwx-x
I know you mentioned we should have drwxrwx--x and I don't know how to change it(if my permissions are wrong).
IF you can help pls I would appreciate.
sweetmango said:
Hi, was reading your suggestion how to fix problem"invalid dowload url' problem, followed your guide but no luck.
You wrote:
There should be 4 directories:
- one of them (install) is a link (not visible in CM File Manager, but visible in shell)
- app_sslcache, cache, databases
I have galaxy S5, rooted, using root explorer(everything visible) and within data/data/androidproviders.downloads I have only 3 files.
cache,databeses and lib.
but in another directory data/data/com.android.vending I do have files you mentioned and some more.
All of my files as well directories have same set of permissions, which is
rwxrwx-x
I know you mentioned we should have drwxrwx--x and I don't know how to change it(if my permissions are wrong).
IF you can help pls I would appreciate.
Click to expand...
Click to collapse
Must be the "new" Android version... I don't have enough info to help You. the pesmissions are correct. That "d" in the beginning says it's a directory. After that there are rwx (means: Read, Write, eXecute) three times. These permissions are for Owner, Group and Others. That means the owner (the app that created this directory/file) should have full rights:rwx. He can read, write and execute the file/directory. Group is just a group of owners that can share some data. Like, You can put pictures into a directory and have all apps in group "viewers" access them. And then Others. Others are all other apps that are there. So basically drwxrwxrwx means anyone can do anything with that file/directory. drwx------ means only the owner has full access, all others cannot do anything. That's the permission system in linux/android in a really really fast lesson.
Now what You need to do is to find where S5 puts the things it downloads from App Store. Maybe You are missing that folder I have found. Dunno. Try to google it out and maybe someone can help You better. Or try to find it Yourself.
What I would do is to connect S5 with a cable to a PC, run adb shell logcat and then I would try to install something from the App Store. You will see all that crap that's going on and if there will be an error, You can see it, read it, think about it and solve it
Ot put it here and I will think for You
"invalid dowload url' problem
Thank you very much for super fast response. BTW, besides this post about 'invalid dowload url' problem there is nothing on the net, not one single word. I resolved my issue with reseting my phone and everything is fine now(it was easy since I have back up of everything). Will re search more and let you know if find any answers. Anyway, was looking at permissions in same folder after reseting my phone and everything is same as before but works. Thank you again, for your effort.
ntn_labs said:
Must be the "new" Android version... I don't have enough info to help You. the pesmissions are correct. That "d" in the beginning says it's a directory. After that there are rwx (means: Read, Write, eXecute) three times. These permissions are for Owner, Group and Others. That means the owner (the app that created this directory/file) should have full rights:rwx. He can read, write and execute the file/directory. Group is just a group of owners that can share some data. Like, You can put pictures into a directory and have all apps in group "viewers" access them. And then Others. Others are all other apps that are there. So basically drwxrwxrwx means anyone can do anything with that file/directory. drwx------ means only the owner has full access, all others cannot do anything. That's the permission system in linux/android in a really really fast lesson.
Now what You need to do is to find where S5 puts the things it downloads from App Store. Maybe You are missing that folder I have found. Dunno. Try to google it out and maybe someone can help You better. Or try to find it Yourself.
What I would do is to connect S5 with a cable to a PC, run adb shell logcat and then I would try to install something from the App Store. You will see all that crap that's going on and if there will be an error, You can see it, read it, think about it and solve it
Ot put it here and I will think for You
Click to expand...
Click to collapse
Try without an SD card in your device.
I don't have install in either place (com.android.provides.downloads or com.android.vending) on my PadFone X and keep running into this issue
EDIT: In my case it won't download the whole app.
EDIT: Downgrading Play Store fixed it!
Thanks, it worked
I didn't try changing permissions but just cleared the Download Manager data and it did work
Did this with Root Explorer, just want to mention, permission 771 should be granted not only for cache folder, but to every sub-folder.
Anyway thanx, this is really working solution.
Just a quick note: Noticed this error after installing the Xposed Module "Root Cloak". Since this error only showed up for root apps I figured that was the problem. Was able to update (TiBU and Greenify) by disabling Root Cloak - rebooting - updating - re-enabling Root Cloak.
Not sure what item I added to Root Cloak that is causing this issue, but for now this "solved" the problem for me.
Merman1983 said:
Just a quick note: Noticed this error after installing the Xposed Module "Root Cloak". Since this error only showed up for root apps I figured that was the problem. Was able to update (TiBU and Greenify) by disabling Root Cloak - rebooting - updating - re-enabling Root Cloak.
Not sure what item I added to Root Cloak that is causing this issue, but for now this "solved" the problem for me.
Click to expand...
Click to collapse
Dead or not I have ran into the exact same thing twice. First time was right after root cloak, and this time its been a while. That and a bad memory had me end up here. Root Cloak or not a simple fix permissions in something as old as ROM Manager or just do it in custom recovery fixed it for me. Android 4.3. Galaxy Note 10.1 2014 rooted stock with multi user. I note multi user because it has also caused me some grief due to knox magically appearing in the second user even though completely removed from ROM and also must enable multi user root in supersu. Thanks for making me chase permissions instead of go after the old sd card mount issues.
Fixing permissions worked for me thanks!
Solution to "Invalid download URI."
After some time of troubleshooting this issue, and performing all the previously recommended steps, we believe we found a really easy solution. In fact, I feel really frustrated that I didn't do this to begin with, but hey, live and learn.
This solution will typically work for folks who are getting this on almost every app, with a few exceptions. You may notice that some apps will install while others throw this "Invalid download URI." When an app is downloaded, the installer will then look to see where the app wants to install. Most of the time, these apps request to use the "SD Card" mount point. On most Android devices, even if you do not have a SD card installed, you will still have a SD Card mount point, which simply points to another location within the phones storage. It turns out that in this case, the S4 we were working on, had a SD card installed, but it was defective. So the installer would attempt to perform the installation step, but since the SD card wasn't responding appropriately, we would get this "Invalid download URI" error. After the card was removed, the Play store began functioning normally and apps would install without any issues.
Hopefully this helps everyone who had no success with the cache clearing and permission change solutions.
I wanna bump this to say thanks to the op and xda in general I been fighting with the aopen Opensign tablet10s that uses some hacked apon version of ics trying to get gapps working this thread was the final piece of the puzzle
THANK YOU

Wi-Fi does not work and system directories stuck on "read only" in RemixOS 3.0

Wi-Fi does not work and system directories stuck on "read only" in RemixOS 3.0
Hello to all the community Xda RemixOS.
Updating my macbook to RemixOS 3.0 version of the wi-fi does not work properly. In practice, the only way is to connect the LAN cable. On external forums I found the solution: change some strings of code init.sh files located within /system/etc/init.sh. To my great surprise, however, despite the root permissions I can not edit files in this directory because only mode "reading." I tried to mount terminal system even in writing, but the result is: "/ dev / loop1 / system is read-only mode." I have root permissions in theory I could not do what I want in those directories ??
Anyone able to help me places urgently, thank you!
Luke_99 said:
Hello to all the community Xda RemixOS.
Updating my macbook to RemixOS 3.0 version of the wi-fi does not work properly. In practice, the only way is to connect the LAN cable. On external forums I found the solution: change some strings of code init.sh files located within /system/etc/init.sh. To my great surprise, however, despite the root permissions I can not edit files in this directory because only mode "reading." I tried to mount terminal system even in writing, but the result is: "/ dev / loop1 / system is read-only mode." I have root permissions in theory I could not do what I want in those directories ??
Anyone able to help me places urgently, thank you!
Click to expand...
Click to collapse
look in the remix forum for the tutorial on how to enable system rw capability. after that you should be good to go.
look here: http://forum.xda-developers.com/remix/remix-os/guide-modify-remix-3-0-101-t3428553
Yes, read the above guide, it's all you need + the wifi guide you've already found.
Please use search or simply check the top threads.
Every day too much stuff is duplicated, we must avoid it in order too keep the forum clean.
Sent from [email protected] 4
excuse me but I was not able to find anything. I probably had not looked good. Thank you
Wrong topic
Luke_99 said:
Hello to all the community Xda RemixOS.
Updating my macbook to RemixOS 3.0 version of the wi-fi does not work properly. In practice, the only way is to connect the LAN cable. On external forums I found the solution: change some strings of code init.sh files located within /system/etc/init.sh. To my great surprise, however, despite the root permissions I can not edit files in this directory because only mode "reading." I tried to mount terminal system even in writing, but the result is: "/ dev / loop1 / system is read-only mode." I have root permissions in theory I could not do what I want in those directories ??
Anyone able to help me places urgently, thank you!
Click to expand...
Click to collapse
http://forum.xda-developers.com/remix/remix-os/guide-modify-remix-3-0-101-t3428553

Categories

Resources