HOMEPhone Monitoring AppUsing Android mobile phone for remote monitoring and shooting

Using Android mobile phone for remote monitoring and shooting

Monitoring Phone Software - Free Remote Monitoring App for Android
Using Android mobile phone for remote monitoring and shooting
Mobile Phone Spy App
Monitor calls, SMS, Gps, Camera, Photos, Videos, Whatsapp, Facebook, etc.
Download AppView Demo

Technology is developing faster and faster, and mobile phones are replaced more and more frequently. Many old mobile phones have been eliminated. These old mobile phones are generally of no use and cannot be sold. After all, there may still be some private data in the mobile phone that may not have been cleared. Therefore, these old mobile phones can only be left at home to collect dust.

For most people, these old mobile phones cannot be used. Although there are many tutorials on the Internet for using old mobile phones, the operation is difficult and requires strong hands-on ability. Now I will teach you how to quickly and cheaply turn an old Android phone into a remotely accessible camera.

Build a LAN camera

Building a LAN camera requires a software, which is ip-webcam. Users who can access the Google Store can directly search for "ip-webcam" in the store and download it. Users who cannot access can go to https://www.appsapk.com /ip-webcam/ to download.

Since we will put this camera on the public network later, we need to set an account and password, otherwise it will be very unsafe. But if you only need to use it on the local area network, the account password can be left blank. After configuring the account and password, other content can be adjusted according to your own needs. It should be noted that if the uplink bandwidth of the home network is relatively low, the video resolution and frame rate can be appropriately lowered, otherwise access to the external network It will always freeze. After the settings are completed, scroll to the last item and click to start the server. After the service is turned on, the video connection address will be displayed on the interface. Enter the address on any computer or mobile phone in the current network to access the camera. Click on the browser option to see the video content.

Using Android mobile phone for remote monitoring and shooting
Mobile Phone Spy App
Monitor calls, SMS, Gps, Camera, Photos, Videos, Whatsapp, Facebook, etc.
Download AppView Demo

As you can see, in addition to viewing videos, it also has many functions, such as: motion detection (automatic capture), turning the flash on and off, loop recording, etc. There are also more advanced functions, such as working with tasker to develop more functions, which you can explore on your own.

When using a mobile phone as a camera, you need to pay attention to the heating problem. Due to design problems of some mobile phones, turning on the camera for a long time will cause the phone to heat up seriously. If it heats up for a long time, the device may be damaged. As for whether your device is suitable for use as a camera, you can test it yourself first. Generally Generally speaking, if it runs for more than one or two hours at room temperature without any problems such as shutting down due to overheating, it can be used as a camera that is always on. But you still need to be careful not to place it in a place where the temperature is too high or exposed to direct sunlight. If it is always on, it should be placed near the power source, or buy a longer data cable to charge it.

Connect to public network

The camera enabled above can only be used on the LAN. If it needs to be used on the public network, it will be a little more troublesome. If the broadband you handle has a static public IP, you can set up port mapping on the router to access it from the outside. However, the broadband handled by most users is a dynamic public IP or a shared public IP, so setting up port mapping will not work, so some other solutions need to be considered.

Free plan

If you don't want to spend money, you can directly search for dynamic domain name resolution and intranet penetration to find relevant software. There are many commercial software available. These commercial software have detailed instructions for use, so I won't go into details. If necessary, you can search for usage plans by yourself. For users who are not very capable or have little demand, just register and use the free package., relatively speaking, the installation is simpler. However, free services generally have many restrictions, such as traffic restrictions, mapping number restrictions, domain name restrictions, etc. And generally real-name authentication is required. Therefore, after personally trying this solution for a period of time, I felt that it was very uncomfortable, so I gave up.

(Since the shooting location of home cameras may involve privacy areas, individuals are very distrustful of some commercial cameras that directly upload unencrypted video data to the company server. In addition, many commercial cameras are installed to facilitate remote debugging. All have certain remote control solutions. I believe that employees of commercial companies will not view video information privately, but this method will leave opportunities for some hackers with bad intentions, so I built a set of services myself.)

The solution I use requires a public network server as a proxy, because the server does not host the main computing services, but only forwards traffic, so it does not require high performance or a large amount of storage space. The most important thing is that a service can do many things, including but not limited to the following: private cloud disk, personal website, Git warehouse, proxy service, game server, download service, and crawler.

The principle is actually very simple. It is a reverse proxy service that uses a public network proxy server (proxy-server) as a springboard. This server can be accessed from anywhere on the public network, and then the server will forward the received information to the corresponding The proxy client (peoxy-client) uses the proxy client to access services on the intranet. After the intranet service responds, it is passed back along the opposite path. Finally, you can access the intranet service from any location. The schematic diagram is as follows:

Implementation plan

I found an open source reverse proxy tool on GitHub. This tool has a packaged version and is very simple to deploy. It is lanproxy.

GitHub address: https://github.com/ffay/lanproxy

Lanproxy is an intranet penetration tool that proxies LAN personal computers and servers to the public network. Currently, it only supports TCP traffic forwarding and can support any TCP upper layer protocol (access to intranet websites, local payment interface debugging, SSH access, remote desktop. ). To use a third-party public network server, you must pay for the third party, and these services have various restrictions. In addition, since data packets will flow through the third party, it is also a major hidden danger to data security.

Upload the server to your own server

I use the CentOS 7.4 system myself, so I will use this system as the basis for the introduction. Of course, other systems are also supported (including various types of Linux and WIndows). What needs to be noted here is that you need to be familiar with some basic Linux related commands. It is assumed that everyone knows some basic Linux commands.

If you are familiar with text editing commands such as vi (vim), you can directly upload the original server-side compressed package to the service, and then use these commands to edit the configuration file (proxy-server-20171116/conf/config.propertoes) after decompression. If you are not familiar with text editing related commands on Linux, you can unzip it on your computer now, find the corresponding configuration file (proxy-server-20171116/conf/config.propertoes), edit it, and then compress it again and upload it to the server.

Note: Modify the username and password fields.

Then upload the server to the server through the scp command. Log in with the previously configured username and password. After logging in, add a client, as shown below. Just write the name as you like and use a randomly generated key. After that, you will see an additional entry G-IPCam in the configuration management. Click on the entry and then click Add Configuration to add port mapping (add a camera mapping, and fill in the backend proxy information with the IP address previously displayed on the camera): After clicking submit, a piece of mapping data is added.

You need to set up a security group configuration to open port 8080. If it is a server on other platforms, you need to set up a firewall to open the port. The specific setting method needs to be set according to the type of server system. You can search for it yourself.

The following paragraph is taken from the lanproxy documentation.

So far, the server has been built. As long as the client connection is successful, it can be accessed through the Internet. Install the client on any computer host in the LAN where the mobile phone is located. There are A cross-platform client based on Java, the configuration method is as follows:

The configuration file of Java client is placed in the conf directory and configured with config.properties. If no errors occur, after the connection is successful, you can see on the web page that the client's connection status changes to online.

View on the public network
If the above steps are normal and the client finally displays online status, you can go to the web page to view the camera, visit http://proxy-server-ip:8080 (for example: :8080) to see if the display is normal. If it cannot be displayed normally, please check the following issues in order:

Independent camera
The above communication between the camera and the public network server uses a host in the LAN as a springboard. One needs to be turned on to ensure the normal connection of the camera, but this will cause some other problems, such as the host fan The noise is too loud, the power consumption is relatively high, etc. After all, we only need a small transfer service, so this will seem wasteful.

Later, I discovered that the master Meefik had developed a related application that could directly deploy the Linux system on Android devices. So I thought, since the Linux system can be deployed, wouldn't it be possible to directly transfer traffic on the mobile phone where the camera is located? So I fiddled around for a while, and finally it was confirmed that the solution was feasible, but the process was quite troublesome. Let's share the main process below.

Although the steps seem simple, there are indeed many pitfalls. As the Android system becomes more and more perfect, root is no longer required in most cases, resulting in many root tools becoming unusable. After trying almost all root tools,, in the end I relied on root permissions obtained by flashing the phone. The device I used was an old Huawei phone. I first went to the official website to apply for unlocking the bootloader, then flashed a third-party recovery, and finally found a system with built-in root permissions on the Internet and flashed it into it. It should be noted that if it is a main phone, it is better not to flash the phone at the moment, because the flash packages that can be found on the Internet are basically bundled with some junk applications. Most of those that provide pure packages have not been updated since they are not profitable., so you need to be careful when flashing.

There is basically no need to write code to deploy cameras using this solution. You only need to fill in some configuration files according to a fixed format. Therefore, you do not need to have an in-depth understanding of programming. The only troublesome thing may be the selection of the server. and some Linux-related instructions. I believe that everyone who reads this article has some knowledge of Linux. Even if they don't know much, it is very easy to learn. After all, there are only a few commonly used instructions that can be used here. Even if they don't Yes, it's not a waste to spend an hour or two learning it.