{"id":18951810,"url":"https://github.com/neteasegame/airinput","last_synced_at":"2026-03-13T19:02:51.170Z","repository":{"id":24408405,"uuid":"27809020","full_name":"NetEaseGame/airinput","owner":"NetEaseGame","description":"Like android /system/bin/input, but use Golang and C and can use in many android phones.","archived":false,"fork":false,"pushed_at":"2015-01-13T11:23:51.000Z","size":22680,"stargazers_count":42,"open_issues_count":0,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-12-18T22:58:02.337Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NetEaseGame.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}},"created_at":"2014-12-10T08:12:55.000Z","updated_at":"2025-11-03T13:20:07.000Z","dependencies_parsed_at":"2022-09-19T13:51:33.268Z","dependency_job_id":null,"html_url":"https://github.com/NetEaseGame/airinput","commit_stats":null,"previous_names":["netease/airinput"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NetEaseGame/airinput","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetEaseGame%2Fairinput","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetEaseGame%2Fairinput/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetEaseGame%2Fairinput/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetEaseGame%2Fairinput/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NetEaseGame","download_url":"https://codeload.github.com/NetEaseGame/airinput/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetEaseGame%2Fairinput/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30472986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T17:15:31.527Z","status":"ssl_error","status_checked_at":"2026-03-13T17:15:22.394Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-11-08T13:29:32.033Z","updated_at":"2026-03-13T19:02:51.146Z","avatar_url":"https://github.com/NetEaseGame.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"airinput\n=====================\nSimulate touch,drag,pinch for Android phone.\n\n### The lib of go-airinput\n[![GoDoc](https://godoc.org/github.com/NetEase/airinput/go-airinput?status.svg)](https://godoc.org/github.com/NetEase/airinput/go-airinput)\n\n### Distribution\nI put a pre compiled file in **dist** folder\n\nAbout the usage:\n\n1. use `run.bat` to push file to your phone.\n2. open browser `http://\u003cphone ip addr\u003e:21000`\n\n![IMG](images/browser-airinput.png)\n\nSupport post js code to `http://\u003cphone ip addr\u003e:21000/runjs`\n\nExample js code:\n\n\texec(\"input\", \"keyevent\", \"ENTER\")\n\ttap(20, 30, 100) // position: (20, 30), duration: 100ms\n\tdrag(10, 12, 50, 60, 10, 100) // start(10, 12), end(50, 60), steps: 10, duration: 100ms\n\t// pinch(ax0, ay0, ax1, ay1, bx0, by0, bx1, by1, steps, duration)\n\nAlso support use adb to run js\n\n\tadb shell /data/local/tmp/air-native -i /dev/input/event1 -runjs='tap(400, 400, 2000)'\n\n### Snapshot performance\n* PNG has best quality and file is small, but compress use lot of time.\n* BMP file is big, but donnot use compress time.\n* JPG quality no good than PNG, but fast also very small.\n\nUse `screencap -p` is very very slow, about 4~5s. but `screencap` is fast, only take about 500ms.\n\nI develop the pngdiff lib \u003chttps://github.com/codeskyblue/pngdiff\u003e. Diff is fast, only about 70ms. But encoding still take a lot of time(about 400ms). `^_|`\n\nSo the total time is about 1s.\n\n### About\nStill in develop, but the code is healthy. \n\nThis code need Go1.4, follow [offical instruction](http://code.google.com/p/go/source/browse/README?repo=mobile) to setup environment.\n\nA lot code is from \u003chttps://github.com/wlach/orangutan\u003e, orangutan you are a great people.\n\nuse `sh build.sh` to build.\n\nSample code is in `main.go` now. \n\nLicence is under [MIT](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneteasegame%2Fairinput","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneteasegame%2Fairinput","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneteasegame%2Fairinput/lists"}