{"id":13604052,"url":"https://github.com/uber/nanoscope","last_synced_at":"2025-05-16T15:03:49.137Z","repository":{"id":41575307,"uuid":"123988708","full_name":"uber/nanoscope","owner":"uber","description":" An extremely accurate Android method tracing tool.","archived":false,"fork":false,"pushed_at":"2020-05-18T18:43:41.000Z","size":7311,"stargazers_count":1260,"open_issues_count":31,"forks_count":68,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-04-03T11:11:21.923Z","etag":null,"topics":["android","performance","profiler","tracing"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-05T22:45:39.000Z","updated_at":"2025-03-24T03:25:31.000Z","dependencies_parsed_at":"2022-08-10T02:50:41.923Z","dependency_job_id":null,"html_url":"https://github.com/uber/nanoscope","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber%2Fnanoscope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber%2Fnanoscope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber%2Fnanoscope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber%2Fnanoscope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uber","download_url":"https://codeload.github.com/uber/nanoscope/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248564942,"owners_count":21125412,"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","performance","profiler","tracing"],"created_at":"2024-08-01T19:00:38.959Z","updated_at":"2025-04-12T11:50:02.281Z","avatar_url":"https://github.com/uber.png","language":"HTML","readme":"# Nanoscope\n\nAn extremely accurate Android method tracing tool.\n\n![](images/nanoscope.gif?raw=true)\n\n## Overview\n\nNanoscope is a method tracing tool optimized for extreme accuracy. The tool's overhead has been measured at around ~20 nanoseconds per method (on a Nexus 6P). To achieve this performance, the interesting pieces of Nanoscope are implemented as a [fork of AOSP](https://github.com/uber/nanoscope-art). For this reason, **you'll need to use the Nanoscope Emulator or a device running the Nanoscope OS in order to make use of this tool**. The entrypoint for launching the Nanoscope emulator, provisioning a device with the custom OS, and starting/stopping tracing is the `nanoscope` command-line tool described below.\n\nFor more information on motivation and architecture, check out our [blog post](https://eng.uber.com/nanoscope/) and the [wiki](https://github.com/uber/nanoscope/wiki).\n\n## Installation\n\n**Install the `nanoscope` command**\n\n```bash\n$ brew tap uber/nanoscope\n$ brew install nanoscope\n```\n\n## Nanoscope Emulator / Devices\n\nNanoscope only works with the Nanoscope Emulator or with a device that's running the Nanoscope OS.\n\n**Launch Nanoscope Emulator**\n\n```bash\n# Prerequisites\n#   - $ANDROID_HOME environment variable is set\n#   - macOS\n\n$ nanoscope emulator\n```\n\n**Flash ADB-connected phone with the Nanoscope OS**\n\nIf you want to use Nanoscope with a real device, you can execute the following command to replace your stock Android OS with the Nanoscope OS.\n\n*IMPORTANT: This will only work with a Nexus 6P - do not attempt to flash any other device*\n\n*IMPORTANT: This command installs a custom operating system onto the device. There is no way to undo this operation.*\n\n```bash\n# Prerequisites\n#   - Nexus 6p is the only supported device at this time\n#   - OEM Unlocking is enabled (Settings -\u003e Developer Options -\u003e OEM unlocking)\n#   - Device is connected via ADB\n\n$ nanoscope flash\n```\n\n## Usage\n\n**Start tracing on ADB-connected device**\n```bash\n$ nanoscope start\nTracing... (Press ENTER to stop)\n```\n\n**Startup tracing**\n```bash\n$ nanoscope start --package=com.example.app\nTracing... (Press ENTER to stop)\n```\nIt's necessary to specify the application package if you want to start tracing before running the app.\n\n**Extensions**\n\nIn addition to method tracing, Nanoscope can generate additional\ninformation about executing application (e.g. CPU utilization for a\ngiven thread, number of page faults, object allocation\ninformation). You can enable this additional functionality by using\n`--ext` parameter with `nanoscope start` command. It is also necessary\nto change the kernel setting of Nexus 6P as follows:\n\n```bash\n$ adb shell \"echo -1 \u003e/proc/sys/kernel/perf_event_paranoid\"\n```\n\nPlease note that extended functionality DOES NOT work on emulators\n(and is therefore not included in our emulator release). Additional\ninformation about this Nanoscope extension can be found\n[here](https://github.com/uber/nanoscope/wiki/Trace-Extensions).\n\n\n\n\n## Upgrade\n\n**Client**\n```\n$ brew update \u0026\u0026 brew upgrade nanoscope\n```\n\n**OS**\n```\n$ brew update \u0026\u0026 brew upgrade nanoscope\n$ nanoscope flash\n```\n\n## License\n\n```\nCopyright (C) 2017 Uber Technologies\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":[],"categories":["HTML"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuber%2Fnanoscope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuber%2Fnanoscope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuber%2Fnanoscope/lists"}