Brainstorming: adapting lcd.py to android

Hi everyone!😁
I've made some progress adapting pyboy to android using kivy/buildozer.
It works perfectly on some games, but unfortunately not on the one im interested, which is pokemon crystal.

I get consistent crashes on the same frames everytime. For example, on the loading screen when suicune is running and you have to press start.

The logs point to pyboy/core/lcd.so everytime, probably because it is trying to access memory which doesnt exist.

It is really difficult to debug because i havent found the way to make a print which i can see while running on android. It doesnt crash on desktop.

I feel really stuck on this, i was hoping you could give me some ideas to either fix it (i can addapt lcd.py) or either debugging it. Every bit of help is welcome! ❤️

Here are the crashing logs:

07-20 15:33:15.749 18477 18477 F DEBUG : NOTE: /data/data/org.test.myapp/files/
app/_python_bundle/site-packages/kivy/_clock.so
07-20 15:33:15.749 18477 18477 F DEBUG : NOTE: /data/data/org.test.myapp/files/
app/_python_bundle/site-packages/numpy/random/bit_generator.so
07-20 15:33:15.749 18477 18477 F DEBUG : NOTE: /data/data/org.test.myapp/files/
app/_python_bundle/site-packages/pyboy/core/lcd.so
07-20 15:33:15.749 18477 18477 F DEBUG : NOTE: /data/data/org.test.myapp/files/
app/_python_bundle/site-packages/pyboy/core/mb.so
07-20 15:33:15.749 18477 18477 F DEBUG : NOTE: /data/data/org.test.myapp/files/
app/_python_bundle/site-packages/pyboy/pyboy.so
07-20 15:33:15.749 18477 18477 F DEBUG : #00 pc 000000000001c9ac /data/data/
org.test.myapp/files/app/_python_bundle/site-packages/pyboy/core/lcd.so
07-20 15:33:15.749 18477 18477 F DEBUG : #01 pc 000000000001c228 /data/data/
org.test.myapp/files/app/_python_bundle/site-packages/pyboy/core/lcd.so
07-20 15:33:15.749 18477 18477 F DEBUG : #
07-20 ... And more, but im on the word limit already 😆
Screenshot_2025-07-20-15-36-42-956_org.test.myapp.jpg
Was this page helpful?