1

Is it possible to connect PC to laptop with Android phone to share files between PC and laptop? I don't have a LAN cable, all I have is:

A PC without WiFi adapter.
An Android USB cable.
An Android phone.
A laptop with built-in WiFi.
Both PC and laptop have Windows 7.

What I'm trying to do is:
1. Connect Android to PC with USB tethering.
2. Then connect Android to laptop with WiFi tethering.
3. Then I want to share files between PC and laptop.

I don't know much about networking stuff.
Please tell me if you know.

  • I've set it up to use MTP (with USB) and also am running a ssh server on the phone. It is quite convenient to sync over ssh. Disclaimer: I don't know anything about Android. – Faheem Mitha May 10 '15 at 17:22
  • What is mtp and ssh? – imassassin124 May 10 '15 at 17:30
  • MTP is Media Transfer Protocol. And SSH is Secure Shell. Do a search for "mtp android". What is your OS/ distribution? – Faheem Mitha May 10 '15 at 18:12
0

The best way (IMO) is to bridge the network of USB tethering(192.168.42.x) and the Wifi hotspot(192.168.43.x), but I don't have any solution to bridge them.

That said, I do have a solution to transfer files between PC and Laptop within the constraints mentioned in the question (with "no internet" exclusively).


The common point of interaction in our current setting is the Android device itself, which means the device can access both systems, if required. If only I can access the content of Laptop as well as PC from Android, then using some File manager the data transfer can be done.

Note that I didn't try this method on Windows 7 but the instructions shouldn't be different for other platforms.

Instructions:

  1. Connect PC to Android via USB tethering, and Laptop to Android via Wifi hotspot. Note down the IP address for both the machines.

    • Windows users see this to know the IP address; click here Linux(Ubuntu) users for the same.
    • The IP address to be noted would be similar to 192.168.42.xyz and 192.168.43.abc, where xyz and abc are (+ve) integers, i.e. note the local IP address and not IP address from your ISP.
  2. Setup an FTP server at both PC and Laptop.

    • Windows users see this answer, Linux(Ubuntu) users see these answers : 1, 2. I advise Gadmin-Proftpd for GUI in the latter platform.
    • While not necessary, run the server on port 21 (requires administrative/superuser privileges).
    • While configuring, create an FTP user for your FTP server. e.g. User: u1 and Password:password1. Otherwise, if your program allows anonymous FTP session, then go ahead with it.
    • Google is your friend in need, remember it since you might need it.
  3. Install a file manager in Android that can browse network storage. I recommend ES File Explorer File Manager.

  4. Launch ES File Explorer, swipe right from left edge to access NetworkFTP → choose ftp.

  5. For PC :

    • Fill IP address (from step 1) in Server field.
    • Leave port default to 21.
    • Choose Active under Mode.
    • Fill Username and Password that you created in Step 2. If you selected anonymous in step 2 then choose Anonymous and leave the credentials fields blank.
    • Tap OK.

    For Laptop :

    • Repeat aforementioned steps for PC in this step with the exception of IP address and FTP credentials which has to be replaced with the ones for FTP server on Laptop.
  6. If your FTP server is accessible and working fine, then ES File Explorer will create an entry with the name (probably) of local IP address of your PC/Laptop.

  7. In FTP tab of ES File Explorer, select any entry and you'll be able to see the content of the running FTP server.

  8. You can use cut-copy-paste-delete (subject to FTP server configuration) features of ES File Explorer on the content of these two network entries.

Done! :-)


Notes:

1. The data transfer speed is subjected to the resources available to Android.

2. You can run a server other than FTP. Make sure that server you decide can be mapped (supported) in a file manager in Android.

3. If your machine is running a firewall (most PC's either runs Windows Firewall, or an Antivirus does the same), then explicitly allow your FTP program to make and accept connections (it will be a great hassle if you don't). If it's feasible, temporarily disconnect both machines (disable Mobile data on Android as well) from Internet and disable firewall/Antivirus on both for that time being.

4. If your Android device is running a firewall (AFwall+ in my case), allow your file manger in it. It is something one might miss to do.


Unsuccessful method with reason unknown as of now:

1) I think the objective can be achieved by port forwarding at one interface. I found that the machine under USB-tethered network can access the wifi hotspot gateway (192.168.43.1) but could not ping a machine behind the latter. Vice versa wasn't true either. I planned to port-forward on hotspot interface so that a custom request to this gateway IP address would be forwarded to a machine behind it. An e.g. would be: A Laptop connected to wifi hotspot is running a FTP server with IP address 192.168.43.32. I then do port-forwarding(Android rooted) as 192.168.43.1:21 → 192.168.43.32:21 i.e. the machine behind USB-tethered network with IP address 192.168.42.143 would be able to see 192.168.43.32:21 via 192.168.43.1:21. Looks easy to me. But Port-forwarding apps on Play Store didn't yield satisfactory results. Let me know via comments if somebody tries this method and achieves success.

|improve this answer|||||
  • Yes!! That's good. It can solve my problem, i will surely try this and tell you. – imassassin124 May 11 '15 at 5:30
  • @imassassin124 If the answer works for you, consider upvoting or accepting the answer, so that the other readers may benefit(trust) from it as well. Here, you can know more about this. android.stackexchange.com/help/accepted-answer :-) – Firelord May 11 '15 at 5:33
  • Sorry i dont vote any of you because i dont have enough reputation :) – imassassin124 May 11 '15 at 5:36
  • I've tried and it works hurray..., thanks again for the help and i create ftp server using filezilla server which is easy to use. It would be good if i access files directly on pc but still this also works great. – imassassin124 May 11 '15 at 13:32
  • @imassassin124 Good to hear that it worked out. Would you mind telling me the data transfer speed you're getting? My device is kinda old, so the speed was around 200 KB/s. Kinda disappointing HW, I know. :-) – Firelord May 11 '15 at 15:47
1

It's possible if you are using Cyanogenmod even without any 3rd party software:

Connect the phone to the PC and enable USB tethering. Then create a hotspot on your laptop and connect your phone to it.

After that, your phone shares it's WiFi connection to your PC, so you can transfer files and use internet.

If you're not a CM user then try using PdaNet+

https://play.google.com/store/apps/details?id=com.pdanet

|improve this answer|||||
  • I ve tried pdanet+ but that not work for me, but i haven't tried using cynogenmode. – imassassin124 May 11 '15 at 5:34
  • @imassassin124 I'm using CM ROM and it actually works :) – outOfHeap May 11 '15 at 9:23
  • Your idea is also good but it need root and installing rom, i will sure vote you up but I've low reputation. Anyway thanks. :-) – imassassin124 May 11 '15 at 13:39
0

I suspect it's not possible because Android will unmount the SD card (real or emulated) when plugged in via USB. This means that no apps on the phone will be able to read or write the SD card while the phone is plugged in, including whatever WiFi tethering app you're using.

If both laptop and desktop have Bluetooth, you might be able to send files through Bluetooth from laptop to phone to desktop or vice versa, which would be fairly painless.

If there's no other way you could always plug the phone into the laptop, transfer files onto the phone, then plug into the desktop and transfer files off the phone; it's awkward, but it works.

|improve this answer|||||
  • I m doing usb tether, it does not unmount my sd ! – imassassin124 May 10 '15 at 17:28
  • 1
    UMS will prevent the Android device from accessing the SD card, but MTP will not. – Matthew Read May 10 '15 at 19:46
0

Yeah, its simple. Create a gmail account and use google cloud drive. Put all files that you need there , open your laptop go to your gmail account and download your files .

|improve this answer|||||
  • 1
    OP can't access the internet on his desktop, so he can't access Google. – user43185 May 11 '15 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.