Giter Club home page Giter Club logo

Comments (6)

tausiq avatar tausiq commented on August 17, 2024 5

I have resumed the experiment and using physical machine.

Yes I can boot and run emulator using Android Studio. My user is in both kvm and libvrt

Yes, m command took a lot longer time to run.

I have been able to boot the emulator with following command,
emulator -writable-system -gpu swiftshader_indirect
It uses graphics: software

Thanks!

from crylogger.

lucapiccolboni avatar lucapiccolboni commented on August 17, 2024

I'm not sure I've seen this error before. Do you see something on the emulator or does it show a black screen and then crash? When you start the emulator does it report warnings or errors on the terminal? Are you using an Ubuntu virtual machine or a physical machine? My guess is that there might be issues with kvm or libvrt.

I've always worked on Ubuntu. I've never tried running the emulator on macOS.

Thanks!

from crylogger.

tausiq avatar tausiq commented on August 17, 2024

The emulator shows a black screen and then crash. Sometime emulator shows the launcher briefly and then crash.

I have tried Ubuntu virtual + physical machine and macOS physical machine. I have enabled virtualization and kvm, without enabling kvm, the emulator couldn't be started at all, even Android Studio generated emulator.

Emulator reports warning and error on the terminal. Which warning/error messages would be more helpful, physical/virtual Ubuntu? Asking because I can try to get you the error messages from same configured machine that you have. Thanks!

from crylogger.

tausiq avatar tausiq commented on August 17, 2024

One important observation, I was never able to run emulator by this command set,

cd android-emu
source build/envsetup.sh
lunch sdk_phone_x86-userdebug
emulator -writable-system

When I execute the command, emulator -writable-system, I got an error asking me to build android before starting emulator.

I know you have already built Android in setup_emu.py and the script executed successfully. I am not sure why I need to build again. So I used the following sequence,

cd android-emu
source build/envsetup.sh
lunch sdk_phone_x86-userdebug
m       # Building Android, ref: https://source.android.com/setup/build/building
emulator -writable-system

Now the emulator attempts to start but crashes with a black screen as I mentioned. Assuming executing build command again won't cause any issues, is this a valid assumption?

from crylogger.

lucapiccolboni avatar lucapiccolboni commented on August 17, 2024

Thanks for the information. I've only used a physical machine. In the past someone tried to run the Android emulator on a VM and switching to a physical machine solved some issues. I recommend using a physical machine first, if it is possibile.

Regarding the black screen, were you able to boot and use one of the emulators generated with Android Studio? See this link for example. Try to double check that your user is in the groups kvm and libvrt. The warnings / errors I'm referring to are the ones reported on the terminal when you launch the command emulator -writable-system. This command reports errors related to virtualization and other issues.

Regarding the compilation issue, after running setup_emu.py I was able to start the emulator without running other commands. Perhaps something failed during the compilation with the script compile_emu.sh, but this failure was not reported by setup_emu.py. Does the m command that you added compile something and take a long time to run? I think it is safe to assume that recompiling shouldn't cause issues.

Thanks!

from crylogger.

ticketapp avatar ticketapp commented on August 17, 2024

I use a Debian physical machine and I used -writable-system -gpu swiftshader_indirect and my emulator has still not crashed for one day (and it's usually every hour).
I tried a lot of things but it seems to be a working solution!
Thanks!

from crylogger.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.