The server consists of:
- Express.js web server (port 22533)
- Socket.IO server (port 22222)
- Device management system
- Web interface
Edit includes/const.js:
exports.web_port = 22533; // Web interface
exports.control_port = 22222; // Socket.IOCreate .env file:
NODE_ENV=production
WEB_PORT=22533
CONTROL_PORT=22222.\scripts\start-server.ps1npm install
node index.jscd docker
docker-compose up -dindex.js - Main server
includes/
├── const.js - Constants (ports, paths)
├── clientManager.js - Client management
├── databaseGateway.js - Database (lowdb)
└── expressRoutes.js - Web interface routes
assets/
└── views/ - EJS templates
- Start server
- Install APK on device
- Device should appear in web interface list
- You can manage device through web interface
Change ports in includes/const.js or stop conflicting service.
- Check that server is running
- Check that URL in APK is correct
- Check firewall - port 22222 must be open
- Ensure device and server are on the same network
- Check server logs
- Check that MainService is running on device:
adb shell ps | grep device-control