Control and manage Android and iOS devices directly from your browser. Real-time screen viewing, res
10K+
VK DeviceHub is a fork of the DeviceFarmer/stf project developed by members of VK Company.
If you have ideas, suggestions, or would like to participate in development, we welcome you to join our development chat (link).
You can watch a presentation about our product at the Heisenbug 2024 conference by following this link:
Presentation at Heisenbug 2024 conference

Run docker compose -f docker-compose-prod.yaml --env-file scripts/variables.env up and a local production-like installation of DeviceHub will be launched on your computer on port 8082. See docker-compose-prod.yaml for more information.
And for MacOS you can use docker compose -f docker-compose-macos.yaml --env-file scripts/variables.env up. You also need adb server on host. Start it with adb start-server
Note: some features require direct access to the provider instance from the browser, so if you are running the provider on a different machine - make sure you pass accessible url to the --public-ip or configure location properly
If you also want to add an iOS device see this document
.apk files with drag-and-drop functionality.Originally, STF was an internal project without robust security measures and encryption. However, we have addressed different issues and Common Vulnerabilities and Exposures (CVEs). Additionally, we have updated dependencies that had CVEs.
We welcome contributions to further enhance the security of the project.
Once you have installed all the requirements, you can proceed to fetch the remaining dependencies.
Start by fetching all NPM and Bower modules:
npm install
Additionally, you may want to link the module so that you can access the stf command directly from the command line:
npm link
With these steps completed, you should have a functional installation ready for local development.
STF consists of several independent processes that typically need to be launched separately. In our setup, each of these processes is its own unit. Refer to DEPLOYMENT.md and Setup Examples for more details.
However, for development purposes, there's a handy command to quickly launch all the required processes along with a mock login implementation. Please note that you must have MongoDB running beforehand.
docker run --rm -d -p 27017:27017 -h 127.0.0.1 --name mongo mongo:6.0.10 --replSet=test && sleep 4 && docker exec mongo mongosh --eval "rs.initiate();"
This command will start MongoDB locally.
In addition to native user accounts, STF provides an administrator level with increased rights on certain features (e.g., booking & partitioning systems, management of users & devices, etc.). The built-in administrator user has the following default credentials:
administrator[email protected]Another built-in object is the root standard group to which users and devices belong the first time they register with the STF database. Its default name is Common.
These built-in objects are created in the STF database if they do not already exist.
You can override the default values of these built-in objects by setting the following environment variables before initializing the STF database through the stf local or stf migrate commands:
STF_ROOT_GROUP_NAMESTF_ADMIN_NAMESTF_ADMIN_EMAILOnce configured, you're ready to start up STF itself:
stf local
After the webpack build process has finished (which may take a moment), your private STF instance should be accessible at http://localhost:7100. If you had devices connected before running the command, those devices should now be available for use. Otherwise, check your console for any errors. You can plug in or unplug devices at any time.
If you need to access STF from other machines, you can use the --public-ip option for quick testing:
stf local --public-ip <your_internal_network_ip_here>
To update your development version, simply pull the repository and run npm install again.
You need to set up MongoDB and then run:
stf migrate-to-mongo
Yes, please refer to DEPLOYMENT.md and Setup Examples for deployment instructions.
Battery packs in devices that are in constant use typically last from 4 to 8 months. After this period, they begin to swell. Expanded batteries should be replaced as soon as possible. Note that this issue isn't specific to STF; it's a common occurrence over time. If you have come up with an interesting solution for running devices without batteries, please let us know.
Ensure that your devices are set up to allow the display to turn off entirely after a short timeout, around 30 seconds or so. STF will wake it up when necessary. Otherwise, you risk reducing the lifetime of your device.
Note that you may encounter a problem if your USB hubs cannot both provide enough power for charging and support a data connection at the same time (data connections require power too). This can cause a device to stop charging when being used, resulting in many charging cycles. If this happens, you will need to get a better USB hub.
In our experience, the system runs smoothly most of the time, with occasional issues mostly related to USB connections. Typically, you'll need to intervene about once a week.
The most common issue is when a device loses all its active USB connections momentarily. While errors may appear in the logs, the worker process will usually recover or get respawned automatically, requiring no action from your side.
However, there are some common errors that do require manual intervention:
One device worker keeps getting respawned all the time
adb reboot.A whole group of devices keeps dying at once
A device that should be online is not showing up in the list or is showing up as disconnected
When you unplug your device, all STF utilities except STFService stop running automatically. There's no harm in force stopping or uninstalling it.
To uninstall the STFService, run the following command:
adb uninstall jp.co.cyberagent.stf
You may also want to remove our support binaries, although they won't run unless the device is connected to STF. You can do this as follows:
adb shell rm /data/local/tmp/minicap \
/data/local/tmp/minicap.so \
/data/local/tmp/minitouch \
/data/local/tmp/minirev
Your device is now clean.
If you want use scrcpy instead minicap run app with next command(Scrcpy functionality is in unstable state yet):
stf local --need-scrcpy true
Refer to TESTING.md for testing instructions.
To contribute, please read the guidelines outlined in CONTRIBUTING.md.
If you still have questions try to or contact us in discussions
For licensing information, please see LICENSE.
Copyright © 2024 V Kontakte LLC. All Rights Reserved.
Content type
Image
Digest
sha256:1aab68e82…
Size
325.1 MB
Last updated
8 months ago
docker pull vkcom/devicehub