ddvk / remarkable2-framebuffer

remarkable2 framebuffer reversing
MIT License
284 stars 22 forks source link

Add Beta 2.11.0.433 support #82

Closed ljrk0 closed 2 years ago

ljrk0 commented 2 years ago

Custom launchers such as Oxide or Remux don't seem to work however:

Dec 04 17:13:51 reMarkable systemd[1]: Started reMarkable 2 Framebuffer Server.
Dec 04 17:13:51 reMarkable xochitl[194]: STARTING RM2FB
Dec 04 17:13:51 reMarkable xochitl[194]: getInstance() at address: 0x3a9f80
Dec 04 17:13:51 reMarkable xochitl[194]: REPLACING THE IMAGE with shared memory
Dec 04 17:13:55 reMarkable xochitl[194]: Reading waveforms from /usr/share/remarkable/320_R382_AF5F11_ED103TC2M1_VB3300-KCD_TC.wbf
Dec 04 17:13:55 reMarkable xochitl[194]: Running INIT (135 phases)
Dec 04 17:13:55 reMarkable xochitl[194]: 1404 1872 16
Dec 04 17:16:59 reMarkable xochitl[194]: Pan failed: Invalid argument
raisjn commented 2 years ago

what do you mean launchers don't work? with these addresses, the launchers aren't working?

ljrk0 commented 2 years ago

xochitl works, rm2fb launches, oxide displays startup logo but that's it.

Eeems commented 2 years ago

xochitl works, rm2fb launches, oxide displays startup logo but that's it.

Sounds like something is missing. Third party applications should not require any changes to continue to work. It could be that one of the addresses is slightly off, or something was changed under the covers that needs to be accounted for.

rotech commented 2 years ago

I think the problem might be the offsets. I have different ones for wait and getInstance.

!20211202111519 version str 2.11.0.433 update addr 0x3a9ccc updateType str QRect create addr 0x3ac124 shutdown addr 0x3ac0c8 wait addr 0x3ab604 getInstance addr 0x3a041c

ljrk0 commented 2 years ago

@rotech These do look better, thanks! However, I still get:

$ journalctl -u rm2fb
Dec 05 10:39:37 reMarkable systemd[1]: Started reMarkable 2 Framebuffer Server.
Dec 05 10:39:37 reMarkable xochitl[197]: STARTING RM2FB
Dec 05 10:39:37 reMarkable xochitl[197]: getInstance() at address: 0x3a041c
Dec 05 10:39:37 reMarkable xochitl[197]: REPLACING THE IMAGE with shared memory
Dec 05 10:39:42 reMarkable xochitl[197]: Reading waveforms from /usr/share/remarkable/320_R382_AF5F11_ED103TC2M1_VB330
0-KCD_TC.wbf
Dec 05 10:39:42 reMarkable xochitl[197]: Running INIT (159 phases)
Dec 05 10:39:42 reMarkable xochitl[197]: 1404 1872 16
Dec 05 10:40:23 reMarkable xochitl[197]: Pan failed: Invalid argument
Dec 05 10:40:23 reMarkable xochitl[197]: Pan failed: Invalid argument
Dec 05 10:40:23 reMarkable xochitl[197]: Pan failed: Invalid argument
Dec 05 10:40:23 reMarkable xochitl[197]: Pan failed: Invalid argument
Dec 05 10:40:23 reMarkable xochitl[197]: Pan failed: Invalid argument
Dec 05 10:40:23 reMarkable xochitl[197]: Pan failed: Invalid argument
Dec 05 10:40:23 reMarkable xochitl[197]: Pan failed: Invalid argument
Dec 05 10:40:23 reMarkable xochitl[197]: Pan failed: Invalid argument
Dec 05 10:40:23 reMarkable xochitl[197]: Pan failed: Invalid argument
Dec 05 10:40:23 reMarkable xochitl[197]: Pan failed: Invalid argument
Dec 05 10:40:23 reMarkable xochitl[197]: Pan failed: Invalid argument
Dec 05 10:40:25 reMarkable xochitl[197]: Pan failed: Invalid argument
Dec 05 10:40:25 reMarkable xochitl[197]: Pan failed: Invalid argument

And this for tarnish.service: https://pastebin.com/903U7sG5, notably many instances of

ERROR: ld.so: object '/opt/lib/librm2fb_client.so.1' from LD_PRELOAD cannot be preloaded (internal error): ignored.

This is my config now:

$ cat /opt/etc/rm2fb.conf 
!20211102143141
version str 2.10.3.379
update addr 0x398acc
updateType str QRect
create addr 0x39aee0
shutdown addr 0x39ae84
wait addr 0x39a404
getInstance addr 0x38f3b4

!20211202111519
version str 2.11.0.433
update addr 0x3a9ccc
updateType str QRect
create addr 0x3ac124
shutdown addr 0x3ac0c8
wait addr 0x3ab604
getInstance addr 0x3a041c
Eeems commented 2 years ago

The LD_PRELOAD errors from the tarnish service are normal and can be ignored as they are actually only warnings.

matteodelabre commented 2 years ago

Testing on 2.11.0.433 with the offsets proposed in this PR works fine. I can’t reproduce the Pan failed: Invalid argument errors on my side @ljrk0 (tested running Xochitl and Oxide and the calculator app from Oxide).

raisjn commented 2 years ago

thanks for the updates offsets, @ljrk0 and @rotech