S
S
sanek20052021-07-15 15:13:00
Emulators
sanek2005, 2021-07-15 15:13:00

Why are android emulators based on virtual machines?

Is this really the only way to run android applications on a PC? I just read that most emulators (bluestak for example) are based on virtualbox. This whole android works, it turns out. Isn't it possible to just translate the dex code, for example, into a regular jvm bytecode?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Developer, 2021-07-15
@samodum

translate into regular jvm bytecode

Now go and read what is JVM - Java Virtual Machine.
Do you want to move from a virtual machine to a JVM?
UPD
Android is an operating system. With its own structure, scheme for working with memory and other services ...
So you want to run an android application on a PC with ANOTHER operating system. Ok, let's say. The application starts to request access to the camera, address book, location and at the same time wants to work in the background. At the same time, it downloads some files from the Internet and saves them on the SD card.
How will you accept push notifications from Firebase?
How do you propose to solve this problem without a virtual machine?

R
rPman, 2021-07-15
@rPman

What does why mean? Because windows is from sax?
On linux, you can run it using the lxc container, for example (lxc is a native execution of code with rights differentiation through cgroups, a kind of chroot on steroids)
ps using WSL and LXC in theory can allow you to do a similar feint on windows, but the graphical mode was not brought there, those. it makes no sense

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question