Running Mobile Automation Scripts with Android Emulators on top of Docker #126535
Replies: 3 comments
-
Hey there! 👋 Thanks for posting in the GitHub Community, @sekharpadala333 ! We're happy you're here. You are more likely to get a useful response if you are posting your question in the applicable category. In this case - your best bet would be Programming Help Also, you are more likely to get a useful response if you are posting your question(s) in the applicable category and are explicit about what your project entails--giving a few more details might help someone give you a nudge in the right direction. I've gone ahead and moved this to the correct category for you. Good luck! |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
@mranv mranv Thank you for the input i have tried adding this to my dockerfile and i was able to bypass the error regarding the hardware acceleration . However i am now getting the below error : arm64 is not supported by the QEMU2 emulator on *86_64 host . I have researched a bit on using waydroid , however unable to add it and start the session within the container while running the created image , I am currently using an dockerfile with Ubuntu as base image . Let me know if you have any suggestions for the same . Appreciate your help with this . |
Beta Was this translation helpful? Give feedback.
-
We are currently trying to run Android mobile automation scripts on top of dockers with ubuntu as base image , so i created need a dockerfile with the below configurations :
Android Studio: Android Studio Dolphin | 2021.3.1 Patch 1
Appium: App Version 1.19.1
Node.js: v18.12.1
Java: openjdk 17.0.2 2022-01-18 LTS
OpenJDK Runtime Environment Corretto-17.0.2.8.1 (build 17.0.2+8-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.2.8.1 (build 17.0.2+8-LTS, mixed mode, sharing)
Python: 3.10.5
RobotFramework
Below Are the configuration which we have used to create the AVD
hw.ramSize=4096
vm.heapSize=1024
image.sysdir.1=system-images/android-33/google_apis/x86_64/
hw.internalStorage.path=/root/.android/avd/Incident_AVD.avd/sdcard.img
hw.internalStorage.size=16384MB
sdcard.size=16384MB
And copied our mobile scripts which are based on Robotframework into the container
While running the dockerfile , i am getting the below error
Waiting for emulator to start...
INFO | Storing crashdata in: /tmp/android-unknown/emu-crash-34.2.14.db, detection is enabled for process: 58
INFO | Android emulator version 34.2.14.0 (build_id 11834374) (CL:N/A)
INFO | Found systemPath /opt/android-sdk/system-images/android-33/google_apis/x86_64/
INFO | Storing crashdata in: /tmp/android-unknown/emu-crash-34.2.14.db, detection is enabled for process: 58
INFO | Duplicate loglines will be removed, if you wish to see each individual line launch with the -log-nofilter flag.
INFO | Increasing RAM size to 2048MB
WARNING | File System is not ext4, disable QuickbootFileBacked feature
ERROR | x86_64 emulation currently requires hardware acceleration!
CPU acceleration status: KVM requires a CPU that supports vmx or svm
More info on configuring VM acceleration on Linux:
https://developer.android.com/studio/run/emulator-acceleration#vm-linux
General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration.
Emulator not found. Exiting...
Q&A:
I am currently running this docker on an T3a.large
I have reached a bit on running the android emulators on linux dockers , Is there any way we can bypass this hardware acceleration and run the tests as iam ok to take a hit on performance.
Is it must that we need hardware acceleration to run this on *86-64 architecture .
Thanks
Beta Was this translation helpful? Give feedback.
All reactions