Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
baltpeter opened this issue Mar 28, 2023 · 4 comments
Open

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

baltpeter opened this issue Mar 28, 2023 · 4 comments
Labels

Comments

@baltpeter
Copy link
Member

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.

@baltpeter
Copy link
Member Author

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.

@baltpeter
Copy link
Member Author

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.

@baltpeter
Copy link
Member Author

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:

@baltpeter baltpeter reopened this Mar 28, 2023
@baltpeter
Copy link
Member Author

baltpeter commented Mar 28, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant