{"id":13719192,"url":"https://github.com/ddvk/remarkable2-framebuffer","last_synced_at":"2025-04-12T03:53:01.956Z","repository":{"id":37754756,"uuid":"306735938","full_name":"ddvk/remarkable2-framebuffer","owner":"ddvk","description":"remarkable2 framebuffer reversing","archived":false,"fork":false,"pushed_at":"2024-10-07T19:28:38.000Z","size":12134,"stargazers_count":295,"open_issues_count":14,"forks_count":24,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-12T03:52:53.008Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ddvk.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}},"created_at":"2020-10-23T20:04:38.000Z","updated_at":"2025-04-10T16:09:02.000Z","dependencies_parsed_at":"2024-01-06T21:46:36.427Z","dependency_job_id":"895557d5-73db-46e6-8675-d3ea51a6526d","html_url":"https://github.com/ddvk/remarkable2-framebuffer","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddvk%2Fremarkable2-framebuffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddvk%2Fremarkable2-framebuffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddvk%2Fremarkable2-framebuffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddvk%2Fremarkable2-framebuffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddvk","download_url":"https://codeload.github.com/ddvk/remarkable2-framebuffer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514209,"owners_count":21116899,"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":[],"created_at":"2024-08-03T01:00:44.046Z","updated_at":"2025-04-12T03:53:01.927Z","avatar_url":"https://github.com/ddvk.png","language":"C","funding_links":[],"categories":["C","Disclaimer"],"sub_categories":["Take special care if you are using a reMarkable 2."],"readme":"## remarkable2-framebuffer\n\nThis repo contains code for drawing to the rM2's framebuffer.\n\n## Status\n\nquality: beta\n\nrm2fb can open the framebuffer and draw to it. rm2fb-server exposes a simple\nAPI for other processes to draw to the framebuffer using shared mem and message\nqueues. rm2fb-client is a shim that creates a fake framebuffer device for apps\nto use, allowing rM1 apps to seamlessly draw to the display of the rM2.\n\n## Installation\n\nBefore installing, be sure that your xochitl version is supported: https://github.com/ddvk/remarkable2-framebuffer/blob/master/src/shared/config.cpp.\n\nrm2fb is available as a package in [toltec](https://github.com/toltec-dev/toltec) which\nsets up the server and client parts for you. Otherwise, the instructions below can be used\nfor manual installation.\n\n## Set up build environment\n\n[set up remarkable toolchain](https://remarkable.guide/devel/toolchains.html)\n\n## Building\n\nSource the remarkable toolchain (example below) and run the following (replacing ${GITROOT} with the directory you have checked the repository out to)\n\n```\nsource /usr/local/oecore-x86_64/environment-setup-cortexa9hf-neon-oe-linux-gnueabi\ncd ${GITROOT}\nqmake\nmake\n```\n\n\n### Framebuffer Server\n\nbuild `src/server/librm2fb_server.so.1.0.1`.  Copy it to your\nremarkable and run:\n\n```\nLD_PRELOAD=/path/to/librm2fb_server.so.1.0.1 /usr/bin/xochitl\n```\n\n### Framebuffer Client Shim\n\nbuild `src/client/librm2fb_client.so.1.0.1`.  Copy it to your\nremarkable and run: `LD_PRELOAD=/path/to/librm2fb_client.so.1.0.1 \u003crm1app\u003e` to\nrun your app.\n\nThe client intercepts interactions with `/dev/fb0` and forwards them to the\nrm2fb server.\n\n## Configuration\n\nTo do their job, both the client and the server need to know the address at which a number of functions reside in the Xochitl binary.\nThese addresses change from one release to the next.\n\nXochitl function name | Xochitl function role | Notes\n--------------|---------------|----------\n`update` | Sends an update request. This function is replaced by the client shim to talk to our server instead. | Uses the string `Unable to complete update: invalid waveform (`. Prior to version 2.9, the signature of this function was `void (*)(void*, int, int, int, int, int, int)`. Starting from version 2.9, it changed to `void (*)(void*, QRect\u0026, int, int)`.\n`create` | Start the threads that handle update requests. This function is replaced by the client shim with a no-op to avoid conflicting with the server. | Uses the string `Unable to start generator thread\\n`.\n`wait` | Waits until the update-handling threads have started. This function is replaced by the client shim with a no-op to avoid conflicting with the server. | Calls `usleep(1000)`.\n`shutdown` | Stops the update-handling threads. This function is replaced by the client shim with a no-op to avoid conflicting with the server. | Uses the string `Shutting down...`.\n`getInstance` | Retrieves the instance of the singleton SWTCON class. This function is used by the server to interact with the screen. | Calls a function that itself calls `create` and `wait`.\n`notify` | Called when the framebuffer has been updated, used for the Qt signal/slot connections needed for ScreenShare to work | \n\nThe client and the server both ship the [hardcoded addresses](https://github.com/ddvk/remarkable2-framebuffer/blob/master/src/shared/config.cpp#L13) for these functions for various releases.\nIf you get a message saying `Missing address for function […]`, it means that the release you’re running is not yet supported. Please report this in [this dedicated thread](https://github.com/ddvk/remarkable2-framebuffer/issues/18).\n\nYou can manually locate the addresses of the functions listed above by [looking at the disassembly and then add a configuration entry to make remarkable2-framebuffer work with your release](tutorial).\nIn addition to the hardcoded configuration entries, the client and the server will look for addresses in configuration files in the following locations:\n\n* `/usr/share/rm2fb.conf`\n* `/opt/share/rm2fb.conf`\n* `/etc/rm2fb.conf`\n* `/opt/etc/rm2fb.conf` (best option for Toltec users)\n* `rm2fb.conf` (relative to the current working directory, best option for manual installs)\n\n## [Demo](https://imgur.com/gallery/zGMn7Qs)\n\n## Contributing\n\nPlease look at the open github issues and add a new one for any work you are planning\non doing so people can see ongoing progress.\n\nThings that can use help:\n\n* writing documentation\n* testing apps and packages\n* understanding the waveforms used by SWTCON\n* writing our own implementation of SWTCON\n* adding support for new OS releases\n\n## FAQ\n\n* will this brick my rM2?\n\nprobably not, but no guarantees\n\n* [what apps are supported?](https://github.com/ddvk/remarkable2-framebuffer/issues/14)\n\n* [how does rm2fb work?](https://github.com/ddvk/remarkable2-framebuffer/issues/5#issuecomment-718948222)\n\n* [how do I port my existing app to rM2?](https://github.com/ddvk/remarkable2-framebuffer/issues/13)\n\n* [what's up with server/client API?](https://github.com/ddvk/remarkable2-framebuffer/issues/4)\n\n* [where can i find more information on the framebuffer?](https://web.archive.org/web/20230619082431/https://remarkablewiki.com/tech/rm2_framebuffer)\n\n* [what about implementing an open source SWTCON?](https://github.com/timower/rM2-stuff/)\n\n* how can I get in touch?\n\nuse github issues or ping on the discord in one of the homebrew developer\nchannels. if you mention this repo, someone will probably respond\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddvk%2Fremarkable2-framebuffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddvk%2Fremarkable2-framebuffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddvk%2Fremarkable2-framebuffer/lists"}