Simple wireless transmission solution for mobile phones and computers @Fixed android generated ftp IP address (android@windows)

abstract

  • Perform wirelessly without using a data cable:

    • windows access android files

    • android access files on desktop system

  • This article will involve the application of two protocols: ftp and http

  • Advanced root user:

    • Android phones also fix the generated ftp address by installing the lsposed framework and modules, thereby avoiding the subsequent manual entry of IP and achieving the convenient effect of one-click access to mobile phone resources.

Windows browse android files

Environmental preparation

client software

wireless network link

  • As long as the two types of devices can be linked to the same wireless network , it does not need to be able to access the public network. A local area network is sufficient.
  • It does not necessarily require the participation of a router, as long as one of the mobile phones/computers can create a hotspot for the other party to connect to

step

  • The specific operations of different clients may be slightly different.
  • But the overall process is the same
  • Here we take MTthe manager as an example. Any android that is not outdated can be installed.
  • Open MTthe remote management, click to start the service, and a message will be given <ftp地址>. For example ftp://192.168.137.41:2121, you should focus on your own display.
    • This shows that the role of the mobile phone has become a ftpserver at this time, and the file resources on Android can be accessed by Windows as a client.
  • Open Windows cmdor powershelltype: explorer <ftp地址>and press Enter (here <ftp地址>)
  • Insert image description here

Other methods

  • On Windows, you can also directly enter the file in the resource manager <ftp地址>to open the mobile phone file browser.
  • However, I still recommend using the command line to enter.
    • Because you input directly into the resource manager ftp地址, if you make a mistake, the resource manager and even the system may be stuck for a while, which is not a good experience.
    • If you enter the wrong address using the command line, an unresponsive resource manager may run in the background, but it will not affect the previous

Browse computer files on mobile phone

public net

  • With the help of Tencent QQ (remote via public network)

local area network

everything

  • Recommended (relatively simple) LAN method: Use everything to open the ftp server (baidu.com)
    • For everything on the Windows side, if there is no router, you need a computer (laptop) to turn on a hotspot (mobile hotspot)
    • The ES file manager on Android can scan FTP servers on Windows
  • The steps that come with Windows are more complicated and not recommended.

python http.server

  • Download python installation on computer

    • Execute python -m http.serverthe desktop system (common to windows/linux) to establish an http server

      • If the operation is successful, the port will be given, usually port 8000.

      • manual

        PS D:\repos\scripts> python -m http.server -h
        usage: server.py [-h] [--cgi] [--bind ADDRESS] [--directory DIRECTORY] [port]
        
        positional arguments:
          port                  specify alternate port (default: 8000)
        
        options:
          -h, --help            show this help message and exit
          --cgi                 run as CGI server
          --bind ADDRESS, -b ADDRESS
                                specify alternate bind address (default: all interfaces)
          --directory DIRECTORY, -d DIRECTORY
                                specify alternate directory (default: current directory)
        
      • You can specify the port port, usually the default is fine, unless it cannot be created or needs to be retained.

      • --directoryYou can specify the root directory to be shared, the default is the current directory, for example:

        • python.exe -m http.server --directory C:\Users\xxx\desktop\Set the computer as the http server root directory
  • The mobile terminal can be accessed using a browser, and the effect is similar to that of accessing via a browser on a computer.

    • Note that the address accessed by the mobile phone needs to be queried through ipconfig
    • For example http://192.168.97.165:8000, you can usually omit the protocol http://and enter directly<ip>地址:端口
  • http.server

Configure static IP

  • Assuming that the computer is connected to the hotspot of the mobile phone, the mobile phone will not be able to access the computer (windwos) with a static IP, but the DHCPassigned address can be accessed.

  • It should be possible through router configuration, but I haven't tried it

Advanced: Fixed android device IP

  • This part is a reference for advanced root users (if you don’t know how to obtain it or don’t just need it, you can skip it)

  • But if you happen to have this permission, after some configuration below, it is really convenient. From now on, if you want to wirelessly transfer files, you only need to click a few switches to establish a channel. It's wonderful.

  • Android phones also fix the generated ftp address by installing the lsposed framework and modules, thereby avoiding the subsequent manual entry of IP and achieving the convenient effect of one-click access to mobile phone resources.

Prepare

  1. Required permissions: root permissions (can be obtained by flashing magisk or magisk-patched boot.img or init_boot.img)
  2. Required framework software: LSposed-release
  3. 模块:GitHub - XhyEax/SoftApHelper: SoftAp static server IP(v4) for Android P-T (Xposed)
    • The website provides 2 types of packages, one fixes the ap to 192.168.43.1; the other fixes it to 192.168.1.1 (I chose this one)
  4. Install the above software (module) and correctly turn on the switch to activate the module
  5. Restart (or soft restart) the android system to make the module effective

Check whether the module is valid

  • Self-check on mobile phone:

    • Use MTthe manager's simulated terminal input ifconfigto check whether it appears 192.168.1.1; if so, it is successful.
    • Or MTthe manager can open remote management and see if the IP is 192.168.1.1; if so, it is successful (the default port is 2121, this port can be modified directly through MT, the subsequent discussion assumes that the port is 2121, if it is changed, it shall be subject to your own)
  • Computer ping:

    • PS C:\Users\cxxu\Desktop> ping 192.168.1.1
      
      Pinging 192.168.1.1 with 32 bytes of data:
      Reply from 192.168.1.1: bytes=32 time=5ms TTL=64
      Reply from 192.168.1.1: bytes=32 time=6ms TTL=64
      Reply from 192.168.1.1: bytes=32 time=6ms TTL=64
      Reply from 192.168.1.1: bytes=32 time=6ms TTL=64
      
      

windows access ftp server shortcut

  • There are many ways to create a quick access ftp resource server. This method is suitable for situations where the accessed ftp server IP is fixed.
  • The following methods are all very convenient. They are all configured once and will not be configured later, once and for all.

Command line mode

  • Write a script or function (command line): For example, you can configure a powershell function,explorer ftp://192.168.1.1:2121

    • function ftpAndroid{
              
              
      	explorer ftp://192.168.1.1:2121
      }
      

Double click startup method

Common shortcut
  • Create a shortcut icon: Creating a shortcut icon can be started by double-clicking it. There are many ways. The simplest is
    • Right-click on the desktop and select New Shortcut
    • enterexplorer ftp://192.168.1.1:2121
    • Just keep confirming. The icon will be an explorer icon, which can be opened by double-clicking it.
Map new network location
  • Add network location (map new location)
    • refs links
    • Right-click My Computer, add a new network location (add Network Location); or right-click the network icon in the explorer, map network drive, and enter (connect to a web site) to add a new network. Location
    • Fill ftp://192.168.1.1:2121in the complete link and keep clicking to confirm.

Guess you like

Origin blog.csdn.net/xuchaoxin1375/article/details/132970514