Skip to content

Do Android 13 emulators not have ARM emulation anymore? #54

Open

Description

@baltpeter

I just noticed that I couldn't install an app with native ARM libraries into my Android 13 emulator created as per our README:

Error: Command failed with exit code 1: adb install-multiple /home/benni/Downloads/single-apks/de.tk.tkapp_168_apps.evozi.com.apk
adb: failed to finalize session
Failure [INSTALL_FAILED_NO_MATCHING_ABIS: INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
    at makeError (file:///home/benni/coding/JS/tweasel/appstraction/node_modules/execa/lib/error.js:59:11)
    at handlePromise (file:///home/benni/coding/JS/tweasel/appstraction/node_modules/execa/index.js:119:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.installApp (/home/benni/coding/JS/tweasel/appstraction/dist/src/android.ts:342:9)
    at <anonymous> (/home/benni/coding/JS/tweasel/cyanoacrylate/examples/multiple-apps.ts:39:9) {
  shortMessage: 'Command failed with exit code 1: adb install-multiple /home/benni/Downloads/single-apks/de.tk.tkapp_168_apps.evozi.com.apk',
  command: 'adb install-multiple /home/benni/Downloads/single-apks/de.tk.tkapp_168_apps.evozi.com.apk',
  escapedCommand: 'adb install-multiple "/home/benni/Downloads/single-apks/de.tk.tkapp_168_apps.evozi.com.apk"',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: 'adb: failed to finalize session\n' +
    'Failure [INSTALL_FAILED_NO_MATCHING_ABIS: INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

The app has native ARM libraries:

❯ aapt dump badging /home/benni/Downloads/single-apks/de.tk.tkapp_168_apps.evozi.com.apk | grep native-code
native-code: 'arm64-v8a' 'armeabi-v7a'

And indeed:

❯ adb shell getprop | grep ro.product.cpu.abi
[ro.product.cpu.abi]: [x86_64]
[ro.product.cpu.abilist]: [x86_64]
[ro.product.cpu.abilist32]: []
[ro.product.cpu.abilist64]: [x86_64]

Whereas in an Android 11 emulator, I get:

❯ adb shell getprop | grep ro.product.cpu.abi
[ro.product.cpu.abi]: [x86_64]
[ro.product.cpu.abilist]: [x86_64,x86,arm64-v8a,armeabi-v7a,armeabi]
[ro.product.cpu.abilist32]: [x86,armeabi-v7a,armeabi]
[ro.product.cpu.abilist64]: [x86_64,arm64-v8a]

To make sure this isn't a problem with how we're creating the emulator, I created a new one using Android Studio. Same problem.

Activity

  1. baltpeter commented on Mar 28, 2023

    @baltpeter
    MemberAuthor

    To test this further, I also created an Android 12 x64_86 emulator using Android Studio. This one at least supports x86_64 but none of the 32-bit architectures:

    ❯ adb shell getprop | grep ro.product.cpu.abi
    [ro.product.cpu.abi]: [x86_64]
    [ro.product.cpu.abilist]: [x86_64,arm64-v8a]
    [ro.product.cpu.abilist32]: []
    [ro.product.cpu.abilist64]: [x86_64,arm64-v8a]
    

    How odd.

    Just to make sure, I also created a fresh Android 11 x86_64 emulator. That does indeed support all relevant architectures:

    ❯ adb shell getprop | grep ro.product.cpu.abi
    [ro.product.cpu.abi]: [x86_64]
    [ro.product.cpu.abilist]: [x86_64,x86,arm64-v8a,armeabi-v7a,armeabi]
    [ro.product.cpu.abilist32]: [x86,armeabi-v7a,armeabi]
    [ro.product.cpu.abilist64]: [x86_64,arm64-v8a]
    
    

    Here are the supported architectures for an Android 11 x86 emulator:

    ❯ adb shell getprop | grep ro.product.cpu.abi
    [ro.product.cpu.abi]: [x86]
    [ro.product.cpu.abilist]: [x86,armeabi-v7a,armeabi]
    [ro.product.cpu.abilist32]: [x86,armeabi-v7a,armeabi]
    [ro.product.cpu.abilist64]: []
    

    That makes sense at least.

  2. baltpeter commented on Mar 28, 2023

    @baltpeter
    MemberAuthor

    Meanwhile, I can't run an Android 13 arm64-v8a emulator on my machine:

    INFO    | Android emulator version 31.3.10.0 (build_id 8807927) (CL:N/A)
    emulator: INFO: Found systemPath /home/benni/android/system-images/android-33/google_apis_playstore/arm64-v8a/
    PANIC: Avd's CPU Architecture 'arm64' is not supported by the QEMU2 emulator on x86_64 host.
    
  3. baltpeter commented on Mar 28, 2023

    @baltpeter
    MemberAuthor

    I tried to look for any announcements or similar regarding this but came up empty. The only thing I found was a StackOverflow question with no answers where the user seems to have noticed the same thing.

    In terms of official documentation, I only found:

  4. baltpeter commented on Mar 28, 2023

    @baltpeter
    MemberAuthor

    Can someone else please verify my findings? If this is true, we should mention in the README that an Android 11 emulator is recommended for best app compatibility.

  5. zner0L commented on Nov 27, 2024

    @zner0L
    Contributor

    I can confirm this. This is extremely unfortunate.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions