iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🐅

Remote Access to Android Devices Behind a Router from a Windows PC

に公開

General Flow

The steps are explained below:

  1. Install a remote access server on the target Android device.
  2. Configure the router settings.
  3. Install client software on the source Windows PC.
  4. Access using SORACOM Napter.

Prerequisite Configuration

A setup for remote access from a Windows PC to an Android device located behind a router.

Devices and Software Used

Remote Access Method

I chose VNC as it is a method that can be used for free even for commercial purposes.

Although I won't go into detail here, I understand the following are available as paid software/services:

  • AirDroid
  • TeamViewer
  • ApowerMirror
  • MirrorTo
  • Vysor

VNC Server

I used the following software as the VNC server to be installed on the Android side.

DroidVNC-NG
https://play.google.com/store/apps/details?id=net.christianbeier.droidvnc_ng&hl=ja&gl=US

https://github.com/bk138/droidVNC-NG

The following have been confirmed:

VNC Client

I will use the Tiger VNC client.
https://github.com/TigerVNC/tigervnc

Router

Use a router that supports Port Forwarding.
This time, I used the Teltonika RUT 240.

Procedure

1. Install a remote access server on the target Android device

Search for "droidvnc-ng" in the Play Store and install it.

After configuring the necessary settings and tapping "START," the device will be ready for VNC access.

The number in the Port field is the port number used by this device for VNC, which will be the destination port number for the router settings later.
The "START" button will change to "STOP" immediately after being tapped.

2. Configure the router settings

Access the router's configuration screen.
If connecting locally, join the router's Wi-Fi,

Access the web UI configuration screen via a browser (e.g., http://192.168.1.1)

Configure the router
Set up port forwarding to redirect traffic incoming on port 55900 on the WAN side to port 5900 (the port number from the app settings) on the Android device.

This configuration process varies depending on the router.
For the UD-LT2, the screen looks like this.

The port number set on the WAN side (55900 in this case) will be used in the subsequent Napter configuration.

3. Install client software on the source Windows PC

Download "vncviewer" from the Tiger VNC download site https://sourceforge.net/projects/tigervnc/files/stable/1.13.1/ .
(If you are using Windows 10 or later, vncviewer64 should be fine.)


An exe file will be downloaded, so save it in an appropriate location.

4. Access using SORACOM Napter

Provision a global IP and port number for accessing port 55900 on the WAN side.
Select the line corresponding to the router's SIM from the SIM management screen (check the checkbox on the left).

Click "On-demand remote access" from the Action button.

Allow access to port 55900 of the router for the next 30 minutes.

Copy the "IP address:port" listed in the IP address field to the clipboard.

Launch the vncviewer downloaded earlier.

Enter the IP address:port copied to the clipboard.

Successfully accessed.

GitHubで編集を提案

Discussion