{"id":23940234,"url":"https://github.com/ecobee/webrtc-android","last_synced_at":"2025-10-05T18:43:02.223Z","repository":{"id":65653531,"uuid":"596614241","full_name":"ecobee/webrtc-android","owner":"ecobee","description":"Public repo to host a compiled webrtc binary for Android","archived":false,"fork":false,"pushed_at":"2024-02-09T15:44:42.000Z","size":580,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-02-24T04:20:04.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ecobee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-02-02T15:14:10.000Z","updated_at":"2023-12-06T16:18:46.000Z","dependencies_parsed_at":"2024-02-05T16:43:55.316Z","dependency_job_id":"61c8582d-ed8c-47ca-869b-d0d4359d72a5","html_url":"https://github.com/ecobee/webrtc-android","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ecobee/webrtc-android","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecobee%2Fwebrtc-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecobee%2Fwebrtc-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecobee%2Fwebrtc-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecobee%2Fwebrtc-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecobee","download_url":"https://codeload.github.com/ecobee/webrtc-android/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecobee%2Fwebrtc-android/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278501872,"owners_count":25997708,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-06T03:13:03.822Z","updated_at":"2025-10-05T18:43:02.206Z","avatar_url":"https://github.com/ecobee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webrtc-android\nPublic repo to host a compiled webrtc binary for Android\n\n\n## 📃 License\n* WebRTC License: https://webrtc.org/support/license\n\n\n## Building\n\nNote: in order to build successfully you should make sure you have about 20GB of free space on your primary hard drive.\n\n### Docker setup\n\nThis repository includes a [Dockerfile](Dockerfile) used to build a [Docker container](https://docs.docker.com/get-started/#what-is-a-container) that provides the Linux environment needed to build webrtc-android. To get started you will need to install [Docker Desktop](https://docs.docker.com/get-docker/). (Needed for Windows and macOS. Linux users may install [Docker engine](https://docs.docker.com/engine/install/) instead and use it directly if they want.)\n\n#### MacOS performance settings\n\nFor Mac users, particularly those with Apple silicon, there are huge performance improvements from using the correct settings (i.e. going from 1 hour to checkout and 10 hours to build to just 10 and 35 minutes respectively).\n\nFirst, the OS must be [Ventura or higher](https://en.wikipedia.org/wiki/MacOS_version_history)\n\nSecond, rosetta2 must be installed:\n\n```bash\nsoftwareupdate --install-rosetta\n```\n\nFinally, the [Docker Desktop](https://docs.docker.com/desktop/settings/mac/) settings must be configured to \"Use Virtualization framework\" and \"Use Rosetta for x86/amd64 emulation on Apple Silicon\":\n\n![Docker Desktop for MacOS settings](img/docker-desktop-mac-settings.png)\n\n### Create Docker container\n\nOpen a terminal/command prompt in this projects directory. Run the following commands to\n\n1. Build the Dockerfile into an image and give it a tag with the name `webrtc-android:latest`\n2. Create a [volume](https://docs.docker.com/get-started/05_persisting_data/#container-volumes) named `webrtc-src` that can be used to persist the source directory.\n3. Create a container from the image you just built, give it the name `webrtc-android`, and configure the `webrtc` volume to be mounted at `/webrtc-android`\n\n```bash\ndocker build -t webrtc-android .\ndocker volume create webrtc-src\ndocker create -it --name webrtc-android -v webrtc-src:/webrtc-android webrtc-android:latest\n```\n\nThe `webrtc-android` container is now a small Ubuntu 22.04 environment that should have all the required dependencies to build webrtc-android. It also contains the [build.py](build.py) script, which will be used to actually build the code.\n\nNext, to make sure everything is working as expected, run the following command to run the container and attach to its stdin and stdout. The container's \"entrypoint\" is the bash shell, which will allow you to execute commands inside the container environment.\n\n```bash\ndocker start -ia webrtc-android\n```\n\nYou should see a bash prompt which you can type commands into. To try it out, try running `python3 build.py`. It should print an error message due to not being given any arguments, and short usage summary of the script:\n\n```\nbuild@e88a835beec4:/webrtc-android$ python3 build.py\nusage: build.py [-h] [--dir DIR] [--logfile LOGFILE] {fetch,build} ...\nbuild.py: error: the following arguments are required: {fetch,build}\nbuild@e88a835beec4:/webrtc-android$\n```\n\n### Fetching the code\n\nWith the container created, the next step is to checkout the code. If you were doing this manually, you would probably be following the \"Getting the code\" part of [these instructions](https://webrtc.github.io/webrtc-org/native-code/android/). However, build.py will handle this for you, with the added ability to checkout the code at a specific revision, which allows you ensure you're building a stable branch.\n\n#### Choosing a revision\n\nWe've been building off of the revisions used in stable Chromium milestones. You can see the latest milestones at https://chromiumdash.appspot.com/branches. There is a table showing the latest `beta`, `stable` and `extended-stable` branches for each of the major components of Chromium, including WebRTC. You probably want to choose whatever is the latest of the `stable` and `extended-stable` WebRTC.\n\nIn the image below, you can see that at the time this image was created, milestone 119 was the latest non-beta milestone, so we want to find the revision of WebRTC that corresponds to that. To do so, click on the branch number under the WebRTC column (circled in red).\n\n![Chromium milestones page](img/milestones.png)\n\nIf you click, you should see the Googlesource repository for WebRTC, showing the branch used for the milestone. The branch name is at the top, prefixed by `refs/`. In the image below, you see that the branch name is `branch-heads/6045`. This can be passed to the build.py `fetch` command using the parameter `--revision branch-heads/6045`.\n\n![WebRTC branch](img/webrtc-branch.png)\n\n#### Running fetch in the container\n\nStart the container and run the following command in the bash prompt to execute build.py with the `fetch` command, which will setup the gclient configuration and checkout the source code at the revision you want to build:\n\n```bash\npython3 build.py fetch --revision branch-heads/6045\n```\n\n**NOTE** running fetch on branch-heads 5481 (for v110) has an issue with installing `snapcraft` in docker containers. \nOne way to get through this is when checking the build log, when you see something similar to this \n\n```\n==\u003e Checking connectivity with the snap store\nConfiguring snapcraft\n---------------------\n\nYour system is unable to reach the snap store, please make sure you're\nconnected to the Internet and update any firewall or proxy settings as needed\nso that you can reach the snap store.\n\nYou can manually check for connectivity by running \"snap info snapcraft\"\n\nAborting will cause the upgrade to fail and will require it to be re-attempted\nonce snapd is functional on the system.\n\nSkipping will let the package upgrade continue but the Snapcraft commands will\nnot be functional until the Snapcraft snap is installed.\n\n  1. Retry  2. Abort  3. Skip\n```\n\nYou can input 3 into the shell to skip the snapcraft installation. This allows the rest of the fetch step to proceed.\n\nFrom branch heads 5790 and onwards, at some point the `src/build/install-build-deps.sh` simply became a wrapper for a python script `src/build/install-build-deps.py` which removed snapcraft from the list. You can see it under the `backwards_compatible_list` function that lists snapcraft as a removed package.\n\nThe script will output a list of the commands it is executing. It also prints the name of a log file to which it writes all the output of each of those commands, to help with debugging if something goes wrong. The full fetch may take a little while. To view the log file afterward, you can use the `less` command.\n\n### Building the code\n\nStill inside the container's bash shell, run the following command to build the source code into an Android .aar library:\n\n```bash\npython3 build.py build\n```\n\nAgain, the full output will be written to a log file. The .aar file will be placed at the `/webrtc-android/src/libwebrtc.aar` path. To extract it and the license file from the docker container, run the following commands:\n\n```bash\ndocker cp webrtc-android:/webrtc-android/src/libwebrtc.aar .\ndocker cp webrtc-android:/webrtc-android/src/LICENSE.md .\n```\n\nThey will be saved in the directory where you are running the command. Then you can simply create a release in https://github.com/ecobee/webrtc-android and upload these files as artifacts. The release tag should be `v\u003cmilestone\u003e.0.0`, and the .aar file should be renamed to `libwebrtc-\u003cmilestone\u003e.0.0.aar`, e.g. for milestone 119 the tag will be `v119.0.0` and the file name will be `libwebrtc-119.0.0.aar`. It's important to match these naming conventions so the ecobee android app build can fetch the library.\n\n### Clean up\n\nOnce you have successfully updated WebRTC, you may want to clean up the docker container, image, and volume, both to reclaim the disk space used and to ensure the next time you build you are using a completely fresh environment. To do this, run these commands:\n\n```bash\ndocker container rm webrtc-android\ndocker volume rm webrtc-src\ndocker image rm webrtc-android\ndocker image prune\n```\n\n## Building with the Github Action\n\nThe Github Action takes two inputs, the milestone number, and the branch number of the WebRTC revision to be build. For example, for milestone 119, the inputs would be 6045 for the branch number, and 119.0.0 for the milestone number.\n\nFor local testing, [act](https://github.com/nektos/act) can be used. First, follow the instructions in the act repository to install act and Docker as needed. To run the steps for creating and uploading files for a release locally, you will need to provide a GITHUB_TOKEN. See the instructions to do so [here](https://github.com/nektos/act?tab=readme-ov-file#github_token). If you'd like to obtain the files locally, follow the instructions below without providing a token.\n\nOnce you have installed act and have checked out this repository, create a json file called events.json with the contents:\n```\n{\n    \"action\": \"workflow_dispatch\",\n    \"inputs\": {\n        \"branch_number\": \"6045\",\n        \"milestone\": \"119.0.0\"\n    }\n}\n```\n\nThen to run act to dispatch this workflow,\n```bash\nact workflow_dispatch -e events.json\n```\n\nAct will create a docker container for this workflow and another will be created for the webrtc build. If no GITHUB_TOKEN is provided, then the workflow should fail on the Create Release step. To extract the build files from the Docker container, use the commands, replacing act container id and milestone number as needed.\n\n```bash\ndocker cp {act container id}:$(pwd)/libwebrtc-{milestone number}.aar .\ndocker cp {act container id}:$(pwd)/LICENSE.md .\n```\n\n### Clean up\n\nTo clean up the act Docker container, image and volume, use docker container ls, docker volume ls, and docker image ls to obtain the names and ids of them. Then use docker container rm, docker image rm, docker image prune, and docker volume rm, to remove them. Alternatively, you can use the Docker Desktop to remove them.\n\n### NOTE\n\nThe Github action removes /usr/share/dotnet and \"$AGENT_TOOLSDIRECTORY\" to allocate space for the build files to be able to run on Github.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecobee%2Fwebrtc-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecobee%2Fwebrtc-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecobee%2Fwebrtc-android/lists"}