How to Connect to Your Android Phone or Tablet

Moderator: Forum moderators

user1111

Re: How to Connect to Your Android Phone or Tablet

Post by user1111 »

mouldy wrote: Wed Apr 27, 2022 9:37 pm
rufwoof wrote: Wed Apr 27, 2022 9:16 pm

I swapped out for https://f-droid.org/en/packages/org.primftpd/ primitive ftp server

I saw that one but noticed in "permissions"

run at startup
Allows the app to have itself started as soon as the system has finished booting. This can make it take longer to start the phone and allow the app to slow down the overall phone by always running.

Battery drainer?

Start after bootup is a option in its configuration settings, but by default that's set off
Default configuration was for both ftp and sftp, I disabled sftp to leave just ftp and not having to bother with encryption/keys. I also set it to permit anonymous logins i.e. use a userid of anonymous and enter just rubbish text as the password. Mostly I just want to transfer music from the laptop to the phone and any pictures/videos taken using the phone to the laptop. Otherwise similar to you, mostly just used as a phone and as means to get the laptop net connected when out and about.

User avatar
mouldy
Posts: 446
Joined: Tue Dec 08, 2020 3:53 pm
Has thanked: 27 times
Been thanked: 111 times

Re: How to Connect to Your Android Phone or Tablet

Post by mouldy »

Thats good that its an opt in option, sure lot people not interested in having it run by default.

I still havent found any more mention on running samba on an unrooted phone. Odd that no linux user did a workaround since apparently you can use non standard samba ports on a Mac. Oh looked and nobody has sucessfully rooted my Kyocera. And imagine at this point its old enough nobody is going to root it. Seems resistant to all usual methods. Usually the more popular phones are ones that get most effort in rooting them. I had never even heard of the brand until I went on hunt for cheapest used whitelisted ATT phone. If one wanted a rooted phone might be better to buy one known to be easy to root. Pay a little more for lot less banging head against nearest big rock. I am still not sure why Android devices dont come with root access. Big brotherism at its finest. Bit like linux apps that insist on not being run as root rather than leaving it up to the owner of the system.

User avatar
mouldy
Posts: 446
Joined: Tue Dec 08, 2020 3:53 pm
Has thanked: 27 times
Been thanked: 111 times

Re: How to Connect to Your Android Phone or Tablet

Post by mouldy »

Just heard the rain starting outside so looks like another day inside. Oh and fresh search found really useful article on samba. https://www.techrepublic.com/article/us ... rom-linux/ Also found article how to do this from windows though that is truly a hail Mary end run maneuver.

Yes you can use non-standard ports, but the commandline way to do samba has so many options, its easy to miss. Harder yet to figure proper way to use it. They mention gui frontend called LinNeighborhood that I am going to look at next. Either command line smbmount/smbumount or this LinNeighborhood probably only options. The file managers with smb networking not going to have this option I think.

User avatar
mouldy
Posts: 446
Joined: Tue Dec 08, 2020 3:53 pm
Has thanked: 27 times
Been thanked: 111 times

Re: How to Connect to Your Android Phone or Tablet

Post by mouldy »

Ok, LinNeighborhood is ancient history. When I started seeing mention of Mandrake Linux and such.... Replaced with pyNeighborhood which is python2, but MX-19 still does python2 so installed it. It wants nautilus, so installed that. The older versions wanted MC but that too is ancient history apparently. Too bad, already had MC. Here is link to download it: http://ftp.udc.es/debian/pool/main/p/pyneighborhood/

I still havent tried setting up network running samba on phone and trying to find it. But will give it a try. If it doesnt work, then I get to figure out specifying port on smbmount. Be so nice if pyNeighborhood works though. Seems like nice clean interface, though dont see option to specify a port.

EDIT: It tries, doesnt just act stupid with "malformed url" and that nonsense, but progress bar stops and spins its wheels half way through. I assume it runs into the non-standard port thing. I cant find a way to specify a port in pyNeighborhood. Too bad.

EDIT2: Ok tried nmap. It did finally see the "host is up" with "1445/tp filtered proxima-lm" Not most useful info. Oh and pyNeighborhood uses cifs rather than smbclient. Anyway I added port=1445 in configuration mount options since that is option in cifs. Still just spins its wheels without mounting. I would assume somthing is in way on the phone, possibly blocking this port. Nmap had dickens of time finding host.

Clarity
Posts: 3277
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1350 times
Been thanked: 438 times

Re: How to Connect to Your Android Phone or Tablet

Post by Clarity »

Although possible for a SAMBA-like server on a phone, I dont recommend. Reasons are numerous.

Use of file-manager(s) with the smb-client built-in is much more rational, IMHO.

As mentioned before, SMB server functions (aka SAMBA in Linux) are built in all major operating systems, so not much thought necessary for any home user's use and NO installations necessary.

And it makes it ALL-TOO-EASY to assist users in this wireless arrangement.

FWIW

Clarity
Posts: 3277
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1350 times
Been thanked: 438 times

Re: How to Connect to Your Android Phone or Tablet

Post by Clarity »

I will try to find some simple drawings to provide a pictorial of what it looks like, although for those looking at this thread, WE already know how this looks and works.

User avatar
mouldy
Posts: 446
Joined: Tue Dec 08, 2020 3:53 pm
Has thanked: 27 times
Been thanked: 111 times

Re: How to Connect to Your Android Phone or Tablet

Post by mouldy »

$ sudo mount.cifs 10.66.161.130 /sdcard -o port=1445 vers=1.0
Couldn't chdir to /sdcard: No such file or directory

Oh, sdcard doesnt refer to actual sdcard (dont have one in the phone), thats directory android uses to store personal files like DCIM. The smb server app let me pick directory to use as share. I tried setting other directories as share and same result. But at least its seeing the phone now. Just cant mount the share directory on the phone.

It sucks that so much out of date info concerning samba out there. I try something only to find its deprecated or whatever. mount.cifs seems most recent way to do this. Its what pyNeighborhood is gui front end.

User avatar
mouldy
Posts: 446
Joined: Tue Dec 08, 2020 3:53 pm
Has thanked: 27 times
Been thanked: 111 times

Re: How to Connect to Your Android Phone or Tablet

Post by mouldy »

Clarity wrote: Thu Apr 28, 2022 7:29 pm

Although possible for a SAMBA-like server on a phone, I dont recommend. Reasons are numerous.

So it would seem. But already have tried FTP server both on phone and on linux. Works fine either way though lot easier on eyes to have client on linux. And I have gotten it working with SAMBA on linux side and client on the phone side. So wanted to figure out how to get it working with SMB server on phone and linux client. This is obviously the hardest to configure. Especially with all the deprecated info online for doing this.

user1111

Re: How to Connect to Your Android Phone or Tablet

Post by user1111 »

With primitive ftpd installed on phone, running in ftp mode only and with anonymous logins permitted, running cloud-disk.sh on Fatdog (Filesystem/Cloud Disk in the menu system) requires that the port number to be included as part of the URL box value IP:port format. I initially just entered the IP in that and put the port number in the 'Port' box, but that didn't work.

Nice having the phones ftp server presented as just another desktop folder within Fatdog that you can use ROX filer to drag files to/from

sc.png
sc.png (84.09 KiB) Viewed 1523 times

With anonymous ftp the password expected is usually a email address, however you can type in anything, I just typed in 'me' as the password ... twice (has to be replicated in the second password box).

Right click and 'Detach from Cloud' when done.

At the core of FTP mounting in such a manner is fuse and curlftpfs. So if your kernel is built to support fuse and you have curlftpfs installed then, for example, you can mount a FTP to a local mount point using ...

# mkdir /mnt/ftp
# curlftpfs ftp.example.com /mnt/ftp/ -o user=username:password

and thereafter be able to access that using whatever preferred filemanager you use.

Puppy/Fatdog are most likely to already have fuse built into the kernel by default.

User avatar
mouldy
Posts: 446
Joined: Tue Dec 08, 2020 3:53 pm
Has thanked: 27 times
Been thanked: 111 times

Re: How to Connect to Your Android Phone or Tablet

Post by mouldy »

$ sudo mount.cifs //10.66.161.130/sdcard /home/user/my-documents -o port=1445 vers=3
Password for root@//10.66.161.130/sdcard: *****
mount error(101): Network is unreachable
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Ok, I was doing it wrong. Finally figured out correct syntax, wants me to direct back to directory on linux computer, BUT mount.cifs wants root access to phone. The app I used shows username=admin password=admin

Thats fine, but since phone not rooted, this isnt root access. Now maybe a workaround. Always a workaround, just depends how much time one wants to spend. And since this isnt that important, think thats the end of that experiment. Unless somebody has a suggestion. Documentation for this SMB app on phone is very marginal. Though it said rooted phone better that it wasnt absolutely necessary. Without telling me how to do this without root access, that statement plus $1 buy cheap cup of coffee.

EDIT: Ok, hmm...

$ sudo mount.cifs //10.66.161.130/sdcard /home/user/my-documents -o username=admin,noauto,user 0 0, port=1445 vers=3
Password for admin@//10.66.161.130/sdcard: *****
mount error(101): Network is unreachable
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Seems there is an option, but also doesnt seem to work.... Maybe more futzing, commandline can be tedious, especially when there oodles of options.

User avatar
mouldy
Posts: 446
Joined: Tue Dec 08, 2020 3:53 pm
Has thanked: 27 times
Been thanked: 111 times

Re: How to Connect to Your Android Phone or Tablet

Post by mouldy »

I watched some youtube video of guy that installed an SMB server app on a cheap android tv box and connected to it from win10. Ok this looked stupid simple, only to discover this app needs a rooted android device. Well gee whiz, where is the challenge in that.

But just out of curiousity booted my old Sonim XP5700 phone that is no longer usable in USA as a phone, far as I know. By gosh it has wifi, who knew, not something I ever used it. But does mean it can connect to local adhoc wifi network. It has very minimal install of android 4.4 but probably could sideload server/client app. Then could test if android running SMB client can see SMB server/share on another android device. Both unrooted. That would tell me if its a port problem with linux being able to mount share on unrooted android phone.

Also brings up question of whether a defunct phone with wifi capabilities can make a call over wifi without a SIM..... I vaguely remember reading of people out of work managed to do this and making a call not a problem. Establishing a phone number to receive calls is lot harder. Interesting enough might have to investigate though useless to me since my only internet is tething to a cell phone.

Anyway this might be interesting use of outdated cell phones with wifi capabilities.

EDIT: Yea, apparently you can make calls via wifi, but you need SIP/voip account I think. SIP to SIP free but I think small charge to use it to call regular phone. Or one of those apps like Google voice or whatever they call it anymore.

User avatar
greengeek
Posts: 1200
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 340 times
Been thanked: 145 times

Re: How to Connect to Your Android Phone or Tablet

Post by greengeek »

sfein1000 wrote: Sat Apr 02, 2022 10:20 pm

I plug my phone in. The camera scanner pops up and displays the phone. I tell it to mount the phone as a camera and then open it. My phone asks to allow and I say yes. I close the ROX window that opens and click unmount.

It then tries to open camera again, I say Quit

It then probes MTP and I choose Mount and then Open. I now have full access to my phone's files.

If I skip the camera part, MTP Mount never works. If I run pupmtp, it never works. But if I open camera that first time, it works.

The downside, besides doing the whole camera thing, is when I am done and choose unmount, I then get into a mini-loop with probing cameras and mtp. First camera probes and opens 3 windows. I quit all of them. Then MTP probes, I quit that, then camera probes again and opens 3 windows. I close all of them and then the computer is done playing with me.

But it works and I can connect my phone every time.

Thanks for this method. I would be interested if the following link offered an option that might improve the PupCamera behaviour you describe? It seems to prevent the first popup of PupCamera in my case. Would be interested to know what happens for you if you combine this with your method:
viewtopic.php?p=57040#p57040

sfein1000
Posts: 96
Joined: Fri Mar 25, 2022 1:38 am
Been thanked: 4 times

Re: How to Connect to Your Android Phone or Tablet

Post by sfein1000 »

@greengeek I tried out the change you mentioned. Other than replacing my drive icons with a single drive icon (which displayed the mount app when clicked) I did not see any change infunctionality of using my phone. I still had to select the camera first and when exiting I still got the 3 windows I had to exit. At first it seemed to work better, but then a second attempt reverted me back to the way it was working.

Post Reply

Return to “Network/Server”