Skip to content

[Android] Add initial AccessKit support. - #117785

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
bruvzg:ac_android
Sep 26, 2026
Merged

Repiteo merged 1 commit into
godotengine:masterfrom
bruvzg:ac_android

Conversation

@bruvzg

@bruvzg bruvzg commented Mar 24, 2026 •

Copy link
Copy Markdown
Member

Adds support for screen reader on Android using AccessKit.

Screen.Recording.2026-08-12.at.11.09.48.mov

Comment thread doc/classes/DisplayServer.xml Outdated
Comment thread platform/android/display_server_android.cpp Outdated
Comment thread platform/android/display_server_android.cpp Outdated
Comment thread platform/android/display_server_android.cpp Outdated
Comment thread platform/android/java/lib/src/main/java/org/godotengine/godot/GodotLib.java Outdated
Comment thread platform/android/java/lib/src/main/java/org/godotengine/godot/GodotLib.java Outdated
@bruvzg

bruvzg commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

When enabling talkback while the Android editor is running, the editor crashes with the following errors

Should be fixed now.

@bruvzg
bruvzg force-pushed the ac_android branch 2 times, most recently from fadcf2b to 7f1c68f Compare August 13, 2026 07:03
@Repiteo
Repiteo requested a review from m4gr3d August 13, 2026 16:33

@Repiteo Repiteo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A great start!

Comment thread drivers/accesskit/accessibility_server_accesskit.cpp Outdated
@m4gr3d

m4gr3d commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

@bruvzg I got another crash testing your latest changes, this time after turning off talkback while the Android editor was still running.

Screen_Recording_20260813_105655_Settings.mp4
10:50:51.956 20276-20276 libc                    org.godotengine.editor.v4.debug      A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 20276 (editor.v4.debug), pid 20276 (editor.v4.debug)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A  Cmdline: org.godotengine.editor.v4.debug
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A  pid: 20276, tid: 20276, name: editor.v4.debug  >>> org.godotengine.editor.v4.debug <<<
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #01 pc 000000000c1cfc18  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #02 pc 000000000c1b205c  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #03 pc 000000000c1d05b4  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #04 pc 000000000c1abb90  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #05 pc 000000000c1b20a0  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #06 pc 000000000c1b1b3c  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #07 pc 000000000c1d0164  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #08 pc 000000000c1d0120  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #09 pc 000000000c1d05d4  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #10 pc 000000000c19df10  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #11 pc 000000000c1a10a0  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #12 pc 000000000c18bdc0  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #13 pc 000000000c18b2cc  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #14 pc 000000000c183cac  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (accesskit_android_queued_events_raise+52) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #15 pc 0000000007e2d150  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (AccessibilityServerAccessKit::native_on_hover(int, void*, int, float, float)+340) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)
10:50:52.967 21822-21822 DEBUG                   crash_dump64                         A        #16 pc 00000000050a8de8  /data/app/~~0Fxt82k1HuvNssQinVEtKQ==/org.godotengine.editor.v4.debug-BohXf38iT-X6P-xaJIgESg==/base.apk!libgodot_android.so (offset 0x1510000) (Java_org_godotengine_godot_GodotLib_onAccessibilityHoverEvent+96) (BuildId: c11566bfb8015d1fe5d98e8674f40d0fae0db3c7)

@bruvzg

bruvzg commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

I got another crash testing your latest changes, this time after turning off talkback while the Android editor was still running.

I was not able to reproduce it on the phone interface, might be specific to multi-window environment (or inconsistent), I will check it on weekend.

@m4gr3d

m4gr3d commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

I got another crash testing your latest changes, this time after turning off talkback while the Android editor was still running.

I was not able to reproduce it on the phone interface, might be specific to multi-window environment (or inconsistent), I will check it on weekend.

From the log, the crash occurs after a hover event so that may be hard to reproduce on a phone without a connected mouse or stylus to generate a hover event.
It may be easier to reproduce on the emulator.

@bruvzg

bruvzg commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

Still was not able to reproduce the crash on any device (neither with touch, not with scrcpy emulated mouse, nor with directly connected mouse). Will try emulator later.

@m4gr3d

m4gr3d commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@bruvzg Any updates on this PR? Were you able to reproduce the crash?

@bruvzg

bruvzg commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

I was not able to reproduce the crash, neither on simulator nor on real devices.

@m4gr3d

m4gr3d commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

@bruvzg The issue is replicable on the Android simulator, however you need to use the Desktop AVD instead of the regular Phone / Tablet because those ones don't dispatch hover events.

You can check out these instructions for how to setup the Desktop AVD.

repro_accesskit_crash_desktop_avd.webm

@DataTriny

Copy link
Copy Markdown

Actually the latest crash experienced by @m4gr3d is probably a bug in the AccessKit Android adapter. See the fix here.

@m4gr3d

m4gr3d commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Actually the latest crash experienced by @m4gr3d is probably a bug in the AccessKit Android adapter. See the fix here.

@bruvzg will you be able to apply the fix ahead of the feature freeze?

@bruvzg

bruvzg commented Sep 24, 2026

Copy link
Copy Markdown
Member Author

will you be able to apply the fix ahead of the feature freeze?

Nothing in this PR should need changing, we use separate repo for custom AccessKit builds - https://github.com/godotengine/godot-accesskit-c-static

I'll test it on Saturday (and update our custom build repo).

# Conflicts:
#	.github/workflows/android_builds.yml

# Conflicts:
#	platform/linuxbsd/detect.py

# Conflicts:
#	main/main.cpp
@bruvzg

bruvzg commented Sep 26, 2026

Copy link
Copy Markdown
Member Author

I have tested it with desktop AVD, and was able to reproduce the crash. I can confirm it is fixed by AccessKit/accesskit#803

To avoid version mismatches, I'll probably wait for next official accesskit-c release before updating our custom build repo. It will also require a tiny, non-platform specific change to the main repo due to API renames, I will do a separate follow-up PR once it is updated. Should not really matter if this part is done before freeze or not, since AccessKit version update is not a new feature.

@Repiteo
Repiteo merged commit a69a4ed into godotengine:master Sep 26, 2026
20 checks passed
@Repiteo

Repiteo commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Thanks!

@DataTriny

Copy link
Copy Markdown

accesskit-c 0.23.1 released. It contains a few fixes and improvements for Android, including the one discussed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants