Skip to main content


Google Play SDK Index: For more info see and the announcement.

Debugging in Android Studio -

Inspect apk

APK Analyzer -

Apktool - - - Install: brew install apktool - Use: apktool d myapp.apk

Change package name (application id) -



List emulators: emulator -list-avds

List emulators running ('List of devices attached'): adb devices

Launch emulator: ${ANDROID_HOME}/emulator/emulator -avd Nexus_5X_API_27_-_Google_Play &

Wipe emulator data with -wipe-data, eg: emulator -avd Nexus_6_API_28_-_Google_APIs_-_14440_x_2560_560dpi -wipe-data &

Force cold boot emulator with -no-snapshot-load, eg: emulator -avd Pixel_4_API_30_R_-_Google_Play_-_5.7_1080x2280_xxhdpi -no-snapshot-load &

Emulator show touches: adb shell settings put system show_touches 1

Emulator hide touches: adb shell settings put system show_touches 0

List installed and available versions of SDK, NDK, emulators, build tools etc: sdkmanager --list

Install apk: adb install path/to/the/file.apk

Install app bundle aab:

View logs: adb logcat --pid=$(adb shell pidof -s com.example.myapp) -v color. See logcat docs for more options. (Note that the app needs to be running on the phone or emulator, otherwise pidof will return nothing.)

adb shell am start -W -a android.intent.action.VIEW -d "scheme://" com.example.debug

If you have multiple emulators then add '-s emulator-name', like this:

adb -s emulator-5554 shell am start -W -a android.intent.action.VIEW -d "scheme://" com.example.debug

Modify the emulator hosts file

Note: you need to use the ${ANDROID_SDK_ROOT}/emulator/emulator, like this:

${ANDROID_SDK_ROOT}/emulator/emulator -avd Pixel_2_API_19_4.4_KitKat_-_1080x1920_5inch_xxhdpi -writable-system &

where ANDROID_SDK_ROOT is /Users/albert/Library/Android/sdk source

Get the SHA-1

There is a gradle task: ./gradlew signingReport. It will use the keystores set on signingConfigs in app/build.gradle. To avoid seeing the output for all the tasks, prepend the :app task: ./gradlew :app:signingReport

  • keytool -list -v -keystore release.keystore (asks for password)
  • My ~/.android key: keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
  • React Native debug key: keytool -list -v -keystore ./android/app/debug.keystore -alias androiddebugkey -storepass android -keypass android

App signing

Answers to common questions about Play App Signing:

App Bundles: Everything to know about Play App Signing:

About Android App Bundles:

Sign your app:

Use Play App Signing:

Play App Signing :

Opcions app signing key

Play App Signing utilitza 2 keys: el 'app signing key' i el 'upload key'.

La signing key es pot generar de varies maneres:

  1. La genera Google al seu servidor. Nunca se puede perder. Esta es la opción recomendada ahora. Importante: no se puede descargar. Por tanto, si quieres firmar siempre tienes que pasar por Google Play y luego descargar el apk firmado o usar internal app sharing (un enlace) o beta (Google Play).
  2. La generamos nosotros y la subimos. En este caso la key la podemos guardar (así podemos firmar en local) o no (puesto que Google ya la tiene). Tampoco se puede perder.
  3. La generamos nosotros y no se sube; se firma en local y se sube el apk firmado. Esta opción va a desaparecer, puesto que el nuevo formato app bundle requiere que Google tenga la key para generar apk optimizados (por ejemplo solo con la traducción al idioma del dispositivo). Hay el riesgo de que se pierda la key.

En los casos 1 y 2 (Play App Signing) hay el upload key que se puede re-generar cuando quieras, de tal modo que nadie puede subir un apk sin el upload key, pero que si lo pierdes puedes contactar a Google y te generan otro

Opcions upload key

You may generate an upload key in one of the following ways:

  • If you choose for Google to generate the app signing key for you when you opt in, then the key you use to sign your app for release is designated as your upload key.
  • If you provide the app signing key to Google when opting in your new or existing app, then you have the option to generate a new upload key during or after opting in for increased security.
  • If you do not generate a new upload key, you continue to use your app signing key as your upload key to sign each release.

Generate upload key

Es pot fer amb Android Studio: Build → Generate Signed Bundle / APK → Next → Create new...

Android 12 changed that root launcher activities are no longer finished on the Back press

SDK API levels

Target API level requirements for Google Play apps

Email 2022-04-06 'Google Play Developer Program Policy Update':

To provide users with a safe and secure experience, we are expanding on Google Play’s target API level requirements to include existing apps that aren’t updated. Apps that don’t target an API level within two years of the latest major Android version release will not be available on Google Play to new users whose devices run the latest versions of Android. Developers can request a six-month extension if more time for migration is needed. learn more

Email 2022-12-15 'Target API Level policy changes and deadline extension':

We’re also extending the deadline to give you more time to adjust to these changes. Now, apps that target API level 29 or below will start experiencing reduced distribution starting Jan 31, 2023 instead of Nov 1, 2022. If you need more time to update your app, you can request an extension to keep your app discoverable to all users until May 1, 2023.

$ANDROID_SDK_ROOT is deprecated


ANDROID_SDK_ROOT, which also points to the SDK installation directory, is deprecated. If you continue to use it, Android Studio and the Android Gradle plugin will check that the old and new variables are consistent.

Use $ANDROID_HOME from now on.