Skip to content

Instantly share code, notes, and snippets.

@insertokname
Last active August 4, 2026 19:21
Show Gist options
  • Select an option

  • Save insertokname/bab6641b07d7cae29a0961e7bf551659 to your computer and use it in GitHub Desktop.

Select an option

Save insertokname/bab6641b07d7cae29a0961e7bf551659 to your computer and use it in GitHub Desktop.
Fix BT Pay SMS OTP autofill on GrapheneOS
Română

BT Pay nu completează codul SMS pe GrapheneOS

Dacă BT Pay nu completează automat codul OTP pe GrapheneOS, rămâne blocat la „Validare număr de telefon” sau câmpul pentru codul primit prin SMS nu poate fi apăsat, problema poate fi accesul Google Play services la mesajele de verificare. Soluția de mai jos activează READ_OTP_SMS prin ADB și repară autofill-ul codului SMS pentru autentificarea, înregistrarea și validarea numărului de telefon în aplicația BT Pay.

BT Pay blocat pe ecranul Validare număr telefon

1. Requirement-uri

  • Un cablu USB (care permite transferul de date)
  • Calculator
  • adb

Acest tutorial explică foarte bine cum să instalezi adb și cum să dai setup la usb debugging https://www.xda-developers.com/install-adb-windows-macos-linux/

2. Permisiune SMS

Pe telefon, intră pe:

Setări → Aplicații → Vezi toate aplicațiile → Google Play services → Permisiuni → SMS → Permite

Aceasta este permisiunea SMS vizibilă. READ_OTP_SMS este un acces Android separat și ascuns, deci nu apare în ecranul Toate permisiunile.

3. Activează accesul la SMS-urile OTP

windows (powershell)

$userId = (adb shell am get-current-user).Trim()
$gmsLine = (adb shell pm list packages --user $userId -U | Select-String '^package:com.google.android.gms uid:').Line
$gmsUid = ($gmsLine -replace '^.*uid:', '').Trim()
$gmsUid
adb shell cmd appops set $gmsUid READ_OTP_SMS allow
adb shell cmd appops get $gmsUid READ_OTP_SMS

Linux/macOS (bash)

user_id=$(adb shell am get-current-user | tr -d '\r')
gms_uid=$(adb shell pm list packages --user "$user_id" -U | sed -n 's/^package:com.google.android.gms uid://p' | tr -d '\r')
echo "$gms_uid"
adb shell cmd appops set "$gms_uid" READ_OTP_SMS allow
adb shell cmd appops get "$gms_uid" READ_OTP_SMS

Ultima comandă trebuie să afișeze READ_OTP_SMS: allow, posibil după textul Uid mode:.

Termină logarea

Intră pe bt pay si terminal logarea. Ar trebui să-și dea autofill codu.

Cleanup

Dupa ce ai terminat poti rula comenzile astea sa stergi permisiunea respectivă

windows (powershell)

adb shell cmd appops set $gmsUid READ_OTP_SMS default

Linux/macOS (bash)

adb shell cmd appops set "$gms_uid" READ_OTP_SMS default
English

BT Pay Does Not Autofill the SMS Code on GrapheneOS

If BT Pay does not automatically fill in the OTP code on GrapheneOS, remains stuck on the Phone number verification screen, or does not let you tap the SMS code field, Google Play services may not have access to verification messages. The solution below enables READ_OTP_SMS through ADB and restores SMS code autofill for signing in, registering, and verifying your phone number in the BT Pay app.

BT Pay stuck on the Phone number verification screen

1. Requirements

  • A USB cable (that supports data transfer)
  • A computer
  • ADB

This guide explains how to install ADB and enable USB debugging: https://www.xda-developers.com/install-adb-windows-macos-linux/

2. Allow SMS access

On your phone, go to:

Settings → Apps → See all apps → Google Play services → Permissions → SMS → Allow

This is the visible SMS permission. READ_OTP_SMS is a separate, hidden Android app-op, so it does not appear on the All permissions screen.

3. Enable access to OTP messages

Windows (PowerShell)

$userId = (adb shell am get-current-user).Trim()
$gmsLine = (adb shell pm list packages --user $userId -U | Select-String '^package:com.google.android.gms uid:').Line
$gmsUid = ($gmsLine -replace '^.*uid:', '').Trim()
$gmsUid
adb shell cmd appops set $gmsUid READ_OTP_SMS allow
adb shell cmd appops get $gmsUid READ_OTP_SMS

Linux/macOS (Bash)

user_id=$(adb shell am get-current-user | tr -d '\r')
gms_uid=$(adb shell pm list packages --user "$user_id" -U | sed -n 's/^package:com.google.android.gms uid://p' | tr -d '\r')
echo "$gms_uid"
adb shell cmd appops set "$gms_uid" READ_OTP_SMS allow
adb shell cmd appops get "$gms_uid" READ_OTP_SMS

The final command should display READ_OTP_SMS: allow, possibly after the text Uid mode:.

Finish the signing in flow

Return to BT Pay and complete the sign-in process. The app should now autofill the SMS code.

Cleanup

After you have finished, reset the app-op to its default value.

Windows (PowerShell)

adb shell cmd appops set $gmsUid READ_OTP_SMS default

Linux/macOS (Bash)

adb shell cmd appops set "$gms_uid" READ_OTP_SMS default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment