Skip to content

Android template #2233

Open

Description

@andrewdavidwong

Over the years, many Qubes users on the mailing lists have expressed the desire to be able to run some kind of Android VM (e.g., HVM) under Qubes OS.

Activity

  1. added
    help wantedWe're looking for help from community contributors for this issue.
    C: otherNo other component ("C:") label applies to this issue, or the relevant component is not yet known.
    on Aug 7, 2016
  2. added this to the milestone on Aug 7, 2016
  3. JohnnyCalavera commented on Sep 18, 2016

    @JohnnyCalavera

    Did someone try to create an android-x86 VM on qubes? I was planning on doing it myself in the near future. (by the way: the stable Marshmallow release is out now)

  4. grote commented on Sep 18, 2016

    @grote

    I tried running RemixOS, but without success. There might be a general problem of running Android as a guest in a Xen hypervisor.

  5. Jeeppler commented on Sep 20, 2016

    @Jeeppler

    @andrewdavidwong can you reference to those mailing list entries?

  6. andrewdavidwong commented on Sep 21, 2016

    @andrewdavidwong
    MemberAuthor

    @Jeeppler: This is based on my memory of the mailing lists over the years, so I don't have an exhaustive list. However, here are some examples:

  7. Jeeppler commented on Sep 23, 2016

    @Jeeppler

    According to the posts, people want to run Android x86 to do application development.

    However, it seems the Android emulator uses the CPU virtualization extension. The problem could also be solved by using nested virtualization on Xen.

  8. andrewdavidwong commented on Nov 8, 2016

    @andrewdavidwong
    MemberAuthor
  9. entr0py commented on Nov 8, 2016

    @entr0py

    @grote I have not had any issues running RemixOS under Qubes. But it suffers from the same Android-x86 mouse issue mentioned in the thread that Andrew just linked.

    Qubes is actually a convenient platform for running Android emulators because most of them don't allow static IP addresses. Qubes' mini-DHCP server works just fine.

  10. grote commented on Nov 8, 2016

    @grote

    @3n7r0p1 which version did you use? Could you send me the link to the download?

    Please also let me know if you find a solution for the mouse issue.

  11. entr0py commented on Nov 9, 2016

    @entr0py

    I used an older version of RemixOS so I checked again with the latest release and it also installs and boots fine.

    version: 3.0.206, 64-bit
    filename: Remix_OS_for_PC_Android_M_64bit_B2016101201.zip
    download: http://www.jide.com/remixos-for-pc#downloadNow
    https://www.fosshub.com/Remix-OS.html

    when booting iso, add INSTALL=1 to kernel parameters
    create partition, gpt: no, efi: no
    if boot hangs, add vga=ask to kernel parameters (may need debug mode on)
    allow 10-15 mins for first boot, 10-15 mins for desktop after setup

    Confirmed mouse behavior hasn't changed. Not all functionality can be replicated from keyboard. Unusable without mouse fix.

    IMO, RemixOS is more resource-heavy than Android-x86 (especially graphics).
    I've Googled the heck out of the mouse issue. Don't have the expertise to take it any further. :(

  12. Wikinaut commented on Jun 26, 2017

    @Wikinaut

    👍 yes, please

  13. micahflee commented on Jul 17, 2017

    @micahflee

    I just tried android-x86 in an HVM, and it actually works great (the only change I had to do was increase the RAM -- I'm using 4GB, but it probably will work with less). It doesn't have the same mouse issues as RemixOS (which, as of today, is a discontinued project).

    screenshot_2017-07-17_13-28-13

    I downloaded an Android 4.4.4 iso from https://sourceforge.net/projects/android-x86/ -- but the more I look into it, it appears there are later versions of android-x86 available, including 7.1: http://www.android-x86.org/releases/releasenote-7-1-rc1

  14. 92 remaining items

  15. thestinger commented on Apr 8, 2024

    @thestinger

    That is very much true. To use a trivial example, “The OS can only boot from this disk image, which it doesn’t have write access to,” is a valid verified boot implementation! It isn’t interesting on real hardware because it doesn’t allow updates, but in Qubes OS updates are handled out of band. Similarly, a separate VM running cryptographic software counts as a TEE where Android is concerned.

    In a sense, yeah, although it would need a different attestation root and it's not clear if it should really pretend that it's hardware backed but that might be required for app compatibility.

    @thestinger: How bad would it be to allow all third-party applications (untrusted_app and isolated_app IIUC) the ability to make memory executable? The reason I ask is that apps users want to run will likely have native code compiled for Arm, and this code must be emulated. The emulation will likely make use of a JIT for performance reasons.

    They can already normally do that but the JIT would presumably be external to the VM if not using an x86_64 Android OS. It would be too much work to make it possible to run arm64 apps on an x86_64 OS.

    Houdini and libndk are both extremely performant libraries for arm to x86 translation, so this isn't much of an issue in practice

    The only information I can find about houdini is that it is a closed-source interpreter, which I would not consider performant. qemu-user would likely be much faster if NDK support was added.

    Wouldn't this just be done externally? Modifying the OS to have multiple architectures complicates things a lot. A lot of apps do run on x86 since the developers test in the x86 emulator but not all.

  16. DemiMarie commented on Apr 8, 2024

    @DemiMarie

    That is very much true. To use a trivial example, “The OS can only boot from this disk image, which it doesn’t have write access to,” is a valid verified boot implementation! It isn’t interesting on real hardware because it doesn’t allow updates, but in Qubes OS updates are handled out of band. Similarly, a separate VM running cryptographic software counts as a TEE where Android is concerned.

    In a sense, yeah, although it would need a different attestation root and it's not clear if it should really pretend that it's hardware backed but that might be required for app compatibility.

    @thestinger: How bad would it be to allow all third-party applications (untrusted_app and isolated_app IIUC) the ability to make memory executable? The reason I ask is that apps users want to run will likely have native code compiled for Arm, and this code must be emulated. The emulation will likely make use of a JIT for performance reasons.

    They can already normally do that but the JIT would presumably be external to the VM if not using an x86_64 Android OS.

    QEMU full system emulation is far too slow and is also completely unsupported security-wise. I don’t consider it a feasible option except for testing or demonstration uses.

    It would be too much work to make it possible to run arm64 apps on an x86_64 OS.

    android-x86 and Waydroid already support it using the aforementioned interpreter.

    Houdini and libndk are both extremely performant libraries for arm to x86 translation, so this isn't much of an issue in practice

    The only information I can find about houdini is that it is a closed-source interpreter, which I would not consider performant. qemu-user would likely be much faster if NDK support was added.

    Wouldn't this just be done externally? Modifying the OS to have multiple architectures complicates things a lot. A lot of apps do run on x86 since the developers test in the x86 emulator but not all.

    Google’s emulator images come with this support (source: https://chgans.design.blog/2021/05/23/adding-arm-native-bridge-to-the-aosp11-x86-emulator/). The question is how to provide an open source implementation that can be used here.

  17. unman commented on Apr 11, 2024

    @unman
    Member
  18. DemiMarie commented on Apr 11, 2024

    @DemiMarie

    For context: I think it is reasonable to assume that the apps being run are not trusted, and that each app is in a separate VM.

  19. emanruse commented on Aug 30, 2024

    @emanruse

    A more recent discussion which referenced the current issue:

    https://forum.qubes-os.org/t/android-template-qubes/28271/

  20. changed the title [-]Consider support for Android VMs[/-] [+]Android template[/+] on Apr 6, 2025
  21. added
    community devThis is being developed by a member of the community rather than a core Qubes developer.
    S: planningStatus: planning. Issue being discussed to determine scope and goals. Development has not yet begun.
    community templateThis issue pertains to a community-maintained template.
    C: AndroidThis issue pertains to Android templates or standalones.
    and removed
    C: otherNo other component ("C:") label applies to this issue, or the relevant component is not yet known.
    community devThis is being developed by a member of the community rather than a core Qubes developer.
    S: planningStatus: planning. Issue being discussed to determine scope and goals. Development has not yet begun.
    on Apr 6, 2025
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

    C: AndroidThis issue pertains to Android templates or standalones.P: majorPriority: major. Between "default" and "critical" in severity.community templateThis issue pertains to a community-maintained template.help wantedWe're looking for help from community contributors for this issue.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions