{"id":19754963,"url":"https://github.com/androidideofficial/platform-tools","last_synced_at":"2025-04-30T11:31:53.905Z","repository":{"id":189108286,"uuid":"402740815","full_name":"AndroidIDEOfficial/platform-tools","owner":"AndroidIDEOfficial","description":"Android Platform Tools","archived":false,"fork":false,"pushed_at":"2024-01-04T04:21:01.000Z","size":474,"stargazers_count":27,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-01T18:21:12.173Z","etag":null,"topics":["android","build-tools","platform-tools"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndroidIDEOfficial.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}},"created_at":"2021-09-03T11:05:12.000Z","updated_at":"2024-04-27T03:12:02.000Z","dependencies_parsed_at":"2024-01-12T23:42:33.001Z","dependency_job_id":null,"html_url":"https://github.com/AndroidIDEOfficial/platform-tools","commit_stats":null,"previous_names":["itsaky/platform-tools","androidideofficial/platform-tools"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidIDEOfficial%2Fplatform-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidIDEOfficial%2Fplatform-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidIDEOfficial%2Fplatform-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidIDEOfficial%2Fplatform-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndroidIDEOfficial","download_url":"https://codeload.github.com/AndroidIDEOfficial/platform-tools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224208101,"owners_count":17273674,"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","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":["android","build-tools","platform-tools"],"created_at":"2024-11-12T03:07:04.499Z","updated_at":"2024-11-12T03:07:04.939Z","avatar_url":"https://github.com/AndroidIDEOfficial.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Android Platform Tools\n\nAndroid Platform Tools for Android. This is based on [android-sdk-tools](https://github.com/lzhiyong/android-sdk-tools) by @lzhiyong.\n\n# Building\n\nFollow the steps below to build the tools.\n\n## Before we start\n\nYou need `Android NDK r26` in order to build this project. Earlier versions may not work. Also, you'll need to install the following packages if you're building directly\non your local machine, instead of using the `Dockerfile`` :\n\n```bash\nsudo apt-get update\nsudo apt-get install -y python3 python3-pip git golang build-essential cmake ninja-build bison flex wget nano zip unzip tar\n```\n\n## Get the source\n\nUse the `get_source.py` Python script to fetch the sources for required repositories :\n\n```bash\npython get_source.py --tag=platform-tools-34.0.0\n```\n\nPlease note that the `get_source.py` script clones only the specified tag to avoid cloning the entire repository. The cloned repositories are in a `DETACHED HEAD` state. This is enough for 'just building the tools'. However, in some cases, you might want to clone the entire repositories which can be done by editing the `get_source.py` script (you can prefer @lzhiyong's repo in this case which uses git submodules).\n\n## Apply the patches\n\nMost of the patches that are available in the `patches` directory should be compatible with `git apply`. You could run `git apply patches/\u003cfilename\u003e.patch` for every `.patch` file to patch the source. If any of the patches fail, you'll have to manually apply the patches.\n\n\u003e NOTE : Prefer applying the patches one by one over applying all of them at once.\n\n## Build protoc\n\nWe need to build `protobuf` for the host OS which will be used to generate the required sources. To do this, `cd` into protobuf directory :\n```bash\ncd src/protobuf\n```\n\nCreate a symlink to the `googletest` directory :\n```bash\n# Skip this if you do not want to build tests\nln -sf $(realpath ../googletest) third_party/googletest\n```\n\nExecute `cmake` to generate the build files :\n```bash\ncmake -GNinja\n\n# or if you want to skip tests\ncmake -GNinja -Dprotobuf_BUILD_TESTS=OFF\n```\n\nStart building `protoc` with :\n```bash\nninja -j$(nproc --all)\n```\n\nOnce the build process succeeds, you should have the `protoc` executable in your working directory.\n\n## Setup boringssl\n\nWe need to create a symlink in the `src/boringssl/src/third_party` directory which should point to the `googletest` directory. To do this, execute the following command from THIS project's root directory :\n\n```bash\nln -sf $(realpath ./src/googletest/googletest) ./src/boringssl/src/third_party/googletest\n```\n\n## Start the build\n\nUse the `build.py` script to build the tools :\n```bash\n# To build for aarch64\n# Generated executables will be located in build/aarch64/bin\npython build.py \\\n    --ndk=/path/to/android-ndk-r26 \\\n    --api=30 \\\n    --abi=arm64-v8a \\\n    --protoc=$PWD/src/protobuf/protoc \\\n    --build=build/aarch64\n\n# To build for arm\n# Generated executables will be located in build/arm/bin\npython build.py \\\n    --ndk=/path/to/android-ndk-r26 \\\n    --api=30 \\\n    --abi=armeabi-v7a \\\n    --protoc=$PWD/src/protobuf/protoc \\\n    --build=build/arm\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroidideofficial%2Fplatform-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandroidideofficial%2Fplatform-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroidideofficial%2Fplatform-tools/lists"}