Voice Access Back to main page

Voice Access, modified: technical notes.

What the patch changes, the firmware bug behind it, and how to install it with adb.

voiceaccess-autosave-v8.apk · 5.8 MB · Voice Access 4.0.304676510
sha256 09e76259bcaa2b0b6187febad9a296fcf55dd082627b11970e248347f6ee1547

PressThe popup records the key.
Let goIt saves and closes by itself.
DoneHold that key to start Voice Access.

The problem

In Voice Access settings, Configure activation key opens a popup. It records every key you press, then waits for you to tap OK. On a keypad-only phone, that fails two separate ways.

You can't reach OK

Keypad phones move popup buttons to the soft-key bar. Pressing "OK" sends a key press, and the popup records it as your new key. Every attempt to save overwrites your choice.

OK wouldn't save anyway

On the Sonim XP3900 we tested, a firmware bug makes the OK button on this kind of settings popup quietly throw your choice away. More on that below.

A USB mouse doesn't help either. The phone turns clicks into key presses too.

What the patch changes

Three things: the activation key popup, a shorter settings screen, and defaults suited to a keypad phone.

The key popup saves itself

The key that opens the popup can't save itself by accident. The popup only saves on a release when the press also started inside it.

Settings removed

Tutorial, Help & feedback, and Privacy policy are gone from the settings screen (res/xml/preferences.xml). The code that looked those entries up was removed too, so settings still opens. If anything else launches the tutorial, it closes right away (TutorialActivity.onCreate calls finish()).

Defaults changed

Activation key behaviorclick → hold (pref_key_behavior_value_default)
Number labelsfull → partial (pref_number_mode_value_default)
Feedbackall → none (pref_verbosity_value_default)
Grid colornormal → light (pref_grid_color_default)
Start during callson → off (pref_activate_on_call_default)
Restart by itselfon → off (pref_auto_reactivation_default)
Start on lock screenon → off (pref_lockscreen_auto_activate_default)
Pop-up text feedbackon → off (pref_toast_text_feedback_default)
Floating activation buttonsetup wizard forced it on; now forces it off (SetupWizardActivity)

New defaults only apply to a fresh install or cleared app data. Updating over an earlier copy keeps whatever settings are already saved. Resources were decoded and rebuilt; version number and permissions are unchanged.

The bug hiding in the firmware

The first version of this patch was correct and still didn't save. Logging showed the key was captured and the save ran every time. The phone threw the value away at the last step.

Android settings popups remember which button you clicked, then check it when the popup closes. OK sets the value to -1. Stock Android checks for -1. This phone's firmware checks for -3, the "neutral" button:

# android.preference.DialogPreference.onDismiss, pulled from the phone
iget p1, p0, ...DialogPreference;->mWhichButtonClicked:I
const/4 v0, -0x3        # stock Android uses -0x1 here
if-ne p1, v0, :cancelled

So OK sets -1, the check looks for -3, and every save gets treated as a cancel. The popup closes and looks like it worked. This hits every settings popup of this type on the phone, not only Voice Access.

Why the patch works either wayThe patch skips the button check and calls the app's save step directly. It works on this firmware, on stock Android, and on any update that fixes the bug.

Install

You need a computer with Android platform-tools (adb) and USB debugging turned on in the phone's developer options.

1. Remove the original Voice Access

The modified app is signed with a different key than the original, so the original has to come off first. Its settings go with it.

adb uninstall com.android.cts.apps.accessibility.voiceaccess

Already have an earlier copy from this page? Skip this step. It's signed with the same key, so step 2 with -r updates it in place and keeps your settings. Android may switch Voice Access off in Accessibility afterward; turn it off and on again.

adb install -r voiceaccess-autosave-v8.apk

2. Install the modified app

adb install voiceaccess-autosave-v8.apk

3. Set it up on the phone

  1. Settings, Accessibility, Voice Access: turn it on.
  2. Allow the microphone and finish setup.
  3. In Voice Access settings: Configure activation key, then Activation key.
  4. Press and release the key you want. The popup closes by itself.

Turn Voice Access on from the phone itself. Don't flip accessibility settings over adb.

Check that it saved

The line under "Activation key" should now show your key, for example KEYCODE_SPEAKER. "No key assigned" means nothing saved.

If the key saves but holding it doesn't start Voice Access, the phone is using that key for something else first. Pick a different key. That's not a problem with the patch.

Will it work on my phone?

Check the app, not the phone model.

Tested onSonim XP3900 (TMO_XP3900), Android 11, 32-bit
Packagecom.android.cts.apps.accessibility.voiceaccess
Version4.0.304676510 (unchanged)
Buildv8, 2026-09-24
ChangedKeyComboPreference (auto-save). JustSpeakPreferencesActivity, TutorialActivity and SetupWizardActivity. preferences.xml (three entries removed). Nine defaults (above). No new permissions.
Original sha25691c07fd24999f1ca12f6cc24715451d5bf451370c7151ff08d84915651e51f71
Modified sha25609e76259bcaa2b0b6187febad9a296fcf55dd082627b11970e248347f6ee1547

Going back

Keep your original APK. To undo, uninstall the modified app and install the original. The two are signed with different keys, so one can't install over the other. You'll set up Voice Access again either way.