{"id":38855081,"url":"https://github.com/bzi-han/androidsurfaceimgui","last_synced_at":"2026-01-17T14:17:33.009Z","repository":{"id":191129280,"uuid":"656847772","full_name":"Bzi-Han/AndroidSurfaceImgui","owner":"Bzi-Han","description":"Example for Android Dear ImGui, support the remote draw.","archived":false,"fork":false,"pushed_at":"2025-11-07T15:18:51.000Z","size":349,"stargazers_count":227,"open_issues_count":10,"forks_count":69,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-11-07T17:22:13.422Z","etag":null,"topics":["android","android-imgui","imgui","remote"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"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/Bzi-Han.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-06-21T19:08:45.000Z","updated_at":"2025-11-07T15:18:55.000Z","dependencies_parsed_at":"2023-08-28T09:06:15.400Z","dependency_job_id":"d41cd3d7-ec28-45f7-9a56-a58cc8af962d","html_url":"https://github.com/Bzi-Han/AndroidSurfaceImgui","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":0.06666666666666665,"last_synced_commit":"74af331fb1bb0b86766fc9f7872ce63663c2fc5a"},"previous_names":["bzi-han/androidsurfaceimgui"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Bzi-Han/AndroidSurfaceImgui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bzi-Han%2FAndroidSurfaceImgui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bzi-Han%2FAndroidSurfaceImgui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bzi-Han%2FAndroidSurfaceImgui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bzi-Han%2FAndroidSurfaceImgui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bzi-Han","download_url":"https://codeload.github.com/Bzi-Han/AndroidSurfaceImgui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bzi-Han%2FAndroidSurfaceImgui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28509941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"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":["android","android-imgui","imgui","remote"],"created_at":"2026-01-17T14:17:26.578Z","updated_at":"2026-01-17T14:17:32.999Z","avatar_url":"https://github.com/Bzi-Han.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AndroidSurfaceImgui\n\n## 介绍\n\n+ 支持RPC进行多进程/远程绘制。\n+ 支持鼠标滚轮\n+ 支持物理键盘输入\n+ 支持横/竖屏自动切换\n+ 支持防录屏\n\n在Android使用上API创建Surface并进行[Dear ImGui](https://github.com/ocornut/imgui.git)的绘制。\n\n**注意**：如果拥有Surface的进程的用户权限在`shell`之下，则你的Surface不会被系统添加到根视图，也就是不会显示出来，详情请看：[SurfaceFlinger.cpp](https://cs.android.com/android/platform/superproject/main/+/main:frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp;l=4769)\n\n## 支持系统版本\n\n仅标注大版本，小版本没特别说明的都是支持的。\n\n| 古董版本 | 过渡版本 | 中间版本 | 新版本 |\n| ------------ | ----------- | ------------ | ------------ |\n| ✅ Android5 | ✅ Android8 | ✅ Android9 | ✅ Android12 |\n| ✅ Android6 |              | ✅ Android10 | ✅ Android13 |\n| ✅ Android7 |              | ✅ Android11 | ✅ Android14 |\n|              |              |              | ✅ Android15 |\n|              |              |              | ✅ Android16 |\n\n目前所有版本都能正常被录屏，如果有发现不兼容的版本请提交 issue。\n\n## 编译\n\n0. 确保在项目根目录打开命令行终端 。\n1. 执行`git submodule init` 。\n2. 执行`git submodule update` 。\n3. 执行`cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-23 -DANDROID_ABI=${PLATFORM} -S . -B build -G Ninja`，其中`${NDK_PATH}`需要替换为你的NDK路径，`${PLATFORM}`替换成你想要编译出的目标平台。\n4. 执行`cmake --build build --config Release`。\n5. 编译完成。\n\n你也可以直接使用`build.bat`来进行批量编译，默认编译`armeabi-v7a arm64-v8a x86 x86_64`四个版本，可修改脚本中的`ANDROID_ABIS`变量来进行更改。\n\n脚本有三个可选参数分别为：NDK路径、最低支持SDK版本、CMake程序路径，不设置则脚本自动检测`NDK_PATH`与CMake工具链，如果都没有则使用脚本默认内置路径。\n\n## 使用\n\n例子请看：[src/test-ui/main.cc](https://github.com/Bzi-Han/AndroidSurfaceImgui/blob/main/src/test-ui/main.cc)\n\n\u003cimg src=\"https://github.com/Bzi-Han/AndroidSurfaceImgui/blob/main/screenshot.jpg\" height=\"500px\" /\u003e\n\n## RPC使用\n\n1. Server：[src/test-ui/canvas.cc](https://github.com/Bzi-Han/AndroidSurfaceImgui/blob/main/src/test-ui/canvas.cc)\n2. Client：[src/test-ui/render.cc](https://github.com/Bzi-Han/AndroidSurfaceImgui/blob/main/src/test-ui/render.cc)\n\n[screenshot.webm](https://github.com/Bzi-Han/AndroidSurfaceImgui/assets/75075077/7b6f7adc-2b68-44d1-bf7a-53bcf0a151a3)\n\n## TODO\n\n+ [ ] 重构 `AImGui` 与 `ATouchEvent`，完全分离事件处理逻辑并规范导入与 `include_directories`。\n+ [ ] 整理一下`Android`在`PC(Windows)`上的远程绘制Demo。\n\n## 特别鸣谢赞助\n\n感谢以下赞助者对本项目的支持(不分先后)：\n\n+ [不解释](https://github.com/Dasongzi1366)\n+ [barry-ran](https://github.com/barry-ran)\n\n谢谢大家的支持！❤️\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbzi-han%2Fandroidsurfaceimgui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbzi-han%2Fandroidsurfaceimgui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbzi-han%2Fandroidsurfaceimgui/lists"}