Robert Foss
April 01, 2019
Reading time:
It's now possible to run Android applications in the same graphical environment as regular Wayland Linux applications with full 3D acceleration.
Running Android has some advantages compared to native Linux applications, for example with regard to the availability of applications and application developers.
For current non-Android systems, this work enables a path forward to running Android applications in the same graphical environment as traditional non-Android applications are run.
SPURV is our experimental containerized Android environment, and this is a quick overview of what it is.
It's aptly named after the first robotic fish since a common Android naming scheme is fish-themed names. Much like its spiritual ancestor Goldfish, the Android emulator.
This means that Anbox which is LXC based, is different from SPURV in terms of how hardware is accessed. The hardware access that Anbox provides in indirect, and through the Qemu Pipes functionality, which is something it adopted from the Android (goldfish) emulator.
Shashlik and Genimobile are Android on Linux integration layers both based on Qemu, which means even better security properties than Anbox and certainly SPURV, but at the cost of an even larger performance penalty.
SPURV is different from other Linux desktop integrations for Android since it offers direct hardware access to the Android application. This is a choice we made for performance reasons. But has drawbacks, especially when it comes to security.
Using direct hardware access does however grant us increased GPU and CPU performance, which is important since we're targeting embedded platforms which can have very limited resources.
SPURV consists of a few different parts, all living in the same project.
An overview of the SPURV stack. |
This component integrates SPURV into Android, and it does so by using the device
infrastructure that the Android codebase provides.
Devices are normally used to customize an Android build to the specific needs of a given hardware platform, like a new smartphone SOC. In the case of SPURV, we're targeting being run inside of a systemd-nspawn
container.
This component bridges the Android Audio Hardware Abtraction Layer (HAL) to the host PulseAudio stack.
Integrates Android windows into Wayland. It does so by implementing a HWC-to-Wayland bridge.
HWC is the Android API for implementing display & buffer management, and what it essentially does in interpret all of the different display buffers that Android applications produce, and organizes them into one cohesive Desktop.
This protocol is conceptually not unlike the Wayland protocol, which allows for the HWC to be translated into Wayland. This is essentially what the SPURV HWComposer does.
Additionally it deals with input, like touch screen events and passes them along from Wayland to Android, this however is unrelated to the HWC API.
The SPURV Android target device behaves as a faux Android device, and tailors the Android build to our requirements.
Functions SPURV performs:
Full build instructions as can be found on our GitLab for the SPURV project.
An overview of setting up:
The next few steps will be adding support for more hardware platforms in our build scripts, but also optimizing the experience.
In no particular order, this is what we would like to look at next:
The way SPURV is implemented means that a full OS is being run in a container, which has implications both positive and negative.
One of the positive effects is increased isolation of Android applications, which means improved security and privacy for potentially untrusted applications.
Additionally, this approach allows for Android applications to be run next to Wayland based applications in a desktop environment.
The downsides relate to hardware access and performance. All hardware access that is needed by Android has to be passed into the container. Besides manually having to configure such access using systemd-nspawn
, there are also performance costs associated with running a container. One part of this is the static cost of having to load an entire OS on top of the base OS, but there are also additional runtime performance penalties for applications in the container.
Visit Robert's blog.
08/10/2024
Having multiple developers work on pre-merge testing distributes the process and ensures that every contribution is rigorously tested before…
15/08/2024
After rigorous debugging, a new unit testing framework was added to the backend compiler for NVK. This is a walkthrough of the steps taken…
01/08/2024
We're reflecting on the steps taken as we continually seek to improve Linux kernel integration. This will include more detail about the…
27/06/2024
With each board running a mainline-first Linux software stack and tested in a CI loop with the LAVA test framework, the Farm showcased Collabora's…
26/06/2024
WirePlumber 0.5 arrived recently with many new and essential features including the Smart Filter Policy, enabling audio filters to automatically…
12/06/2024
Part 3 of the cmtp-responder series with a focus on USB gadgets explores several new elements including a unified build environment with…
Comments (79)
Linas:
Apr 02, 2019 at 08:12 AM
This seems very interesting. Would it be possible to run SPURV on a regular desktop Linux like Ubuntu? What is the ultimate goal of the project?
Reply to this comment
Reply to this comment
Robert Foss:
Apr 02, 2019 at 02:36 PM
Hey Linas,
This could indeed be run on a desktop, as long as you desktop is Wayland powered.
The AOSP build would however have to be built against the CPU architecture of your desktop.
Rob.
Reply to this comment
Reply to this comment
mikhailnov:
Apr 02, 2019 at 03:55 PM
Can't wayland be ran in a separate window of top of Xorg session?
Reply to this comment
Reply to this comment
Robert Foss:
Apr 02, 2019 at 04:02 PM
Well, you can do it the other way around, and run X applications on top of Wayland using XWayland.
In the video I'm running kolourpaint using XWayland in this way actually.
Reply to this comment
Reply to this comment
mikhailnov:
Apr 05, 2019 at 11:32 AM
I know about this, but the question was about running Wayland on top of Xorg. In Xorg, it is possible to mount --bind X socker and set $DISPLAY variable.
Reply to this comment
Reply to this comment
BirdZhang:
Apr 02, 2019 at 10:19 AM
https://gitlab.collabora.com/spurv/android_manifest.git is not opensource
Reply to this comment
Reply to this comment
Robert Foss:
Apr 02, 2019 at 02:33 PM
Hey BirdZhang!
That repo and the others are indeed open source.
The repo you pointed out was however missing a license file, which has been fixed now.
Thanks for pointing it out!
Rob.
Reply to this comment
Reply to this comment
BirdZhang:
Apr 03, 2019 at 02:30 AM
Sorry for the mistake, i mean the source code cannot be accessed.
bird@ubuntu:~$ git clone https://gitlab.collabora.com/spurv/android_manifest.git .repo/local_manifests/
Cloning into '.repo/local_manifests'...
Username for 'https://gitlab.collabora.com':
Reply to this comment
Reply to this comment
Robert Foss:
Apr 03, 2019 at 10:50 AM
Hey again!
You're correct about that too! I've now marked that repo as public (it was mistakenly listed as internal).
Thanks for pointing it out!
Rob.
Reply to this comment
Reply to this comment
BirdZhang:
Apr 04, 2019 at 03:02 AM
Sorry again, some repos still not public
Needed repos:
curl -s https://gitlab.collabora.com/spurv/android_manifest/raw/master/linaro.xml |grep 'remote="collabora"'|awk '{print $3}'|awk -F'"' '{print $2}'|tr -d "\.git"|sort
alsa-lb
alsa-pluns
androd-o-sensors-hal
bm_ralloc
devce_freedeskop
drm
frameworks_base
frameworks_nave
json-c
lbpcaccess
lbsndfle
mesa
mnjal
pulseaudo
sysem_b
sysem_core
sysem_ned
sysem_vold
Public repos:
curl -s https://gitlab.collabora.com/groups/spurv/-/children.json|jq ".[] |.name" |tr -d '"'|sort
alsa-lib
alsa-plugins
android-iio-sensors-hal
android_manifest
device_freedesktop
frameworks_base
gbm_gralloc
json-c
libpciaccess
libsndfile
linux
pulseaudio
Reply to this comment
Reply to this comment
Robert Foss:
Apr 04, 2019 at 02:45 PM
Thanks for listing them out, I uploaded (hopefully the last missing ones) a few hours ago.
Reply to this comment
Reply to this comment
John:
Apr 02, 2019 at 01:11 PM
Instead of having to go the build process of building android and the kernel can all this packaged into flatpak?
Reply to this comment
Reply to this comment
Robert Foss:
Apr 02, 2019 at 02:37 PM
Hey John,
Yep, using flatpak for this seems very feasible to me.
It is however beyond the scope of our current project.
Rob.
Reply to this comment
Reply to this comment
AOSP:
Apr 02, 2019 at 05:55 PM
Can the Android container run on AMD/Intel weston + mainline x86_64 Linux kernel plus ashmem and binder modules? Or does it require other patches?
Also, video is showing only one apk. Is that a limitation? Would GSF/MicroG work in the background?
Reply to this comment
Reply to this comment
Robert Foss:
Apr 03, 2019 at 10:55 AM
Hey,
Good questions!
The host kernel has to be built with the CONFIG_ANDROID kconfig option, which pulls in most of the dependencies you should need.
Spurv has been run with different APKs, but has not been verified to work with multiple applications rendering at the same time.
To be clear, multiple APKs are running in the background, but only one is rendering. There isn't a fundamental limitation about, but it hasn't been our focal point.
Reply to this comment
Reply to this comment
Genx Ster:
Apr 03, 2019 at 11:39 PM
How is multiple windows sessions rendered by Wayland passed by hwcomposer on desktop ,how about integration with other host wm on rendering multiple windows instances similar to chrome os .
As we can see it has similar feature as arc++ , does it spawn whole desktop in Android subsystem ?
You can find such flaws when using a floating widget app in Anbox
How about more hw peripherals supports by binding dev/* addresses or enabling better hal support layer for accessing same hardwares binded in Android subsystem.
Thanks
Reply to this comment
Reply to this comment
Robert Foss:
Apr 04, 2019 at 11:44 AM
Hey Genx Ster,
While I can't comment on ARC++, SPURV does indeed spawn an entire Android desktop subsystem.
I can see floating widgets presenting a marginally larger challenge than running a single app in fullscreen mode,
due to more HWComposer layers being required. This isn't something we've tested for, but it should work or at least be simple to fix.
If you look at [1], you can see how resources are bound to the container.
Rob.
Reply to this comment
Reply to this comment
Robert Foss:
Apr 04, 2019 at 02:46 PM
[1] https://gitlab.collabora.com/spurv/device_freedesktop/blob/master/spurv/launch-container.sh#L55
Reply to this comment
Reply to this comment
MarkDubya:
Apr 02, 2019 at 07:55 PM
It asks for a username and password when cloning the repo. I don't see anywhere to register for Phabricator. I already have a GitLab account, but I was not able to sign in with it.
Reply to this comment
Reply to this comment
Robert Foss:
Apr 03, 2019 at 10:56 AM
Hey MarkDubya,
This was pointed out by another commenter too, and has been fixed now.
The manifest repo was wrongly marked as internal.
Rob.
Reply to this comment
Reply to this comment
Iurii Lunev:
Apr 03, 2019 at 12:13 PM
This repo seems to be open: https://gitlab.collabora.com/spurv/device_freedesktop
Reply to this comment
Reply to this comment
Robert Foss:
Apr 03, 2019 at 03:02 PM
They all should be by now, tell me if something isn't.
Reply to this comment
Reply to this comment
MarkDubya:
Apr 03, 2019 at 04:04 PM
During the repo sync, I got this:
Fetching project device_freedesktop.git
The authenticity of host 'gitlab.collabora.com (46.235.227.192)' can't be established.
ECDSA key fingerprint is SHA256:FVDKBUF1Cx04+VyCF4uAUa1BgKfrKuZ3rZZNYiqvnv4.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Please type 'yes' or 'no': yes
Please type 'yes' or 'no': yes
Please type 'yes' or 'no': yes
Please type 'yes' or 'no': no
Please type 'yes' or 'no': no
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Reply to this comment
Reply to this comment
Robert Foss:
Apr 03, 2019 at 04:42 PM
Don't use SSH if you don't have an account on the gitlab instance.
Reply to this comment
Reply to this comment
MarkDubya:
Apr 03, 2019 at 05:15 PM
How do I not use SSH? I just used "repo sync -j15" per the instructions. I'm using repo 1.13.2-1 on Manjaro.
Reply to this comment
Reply to this comment
Thomas:
Apr 03, 2019 at 07:34 PM
In local_manifests/linaro.xml, change `fetch="ssh://git@gitlab.collabora.com/spurv/"` to `fetch="https://gitlab.collabora.com/spurv/"`. That let me continue with syncing with everything.
Reply to this comment
Reply to this comment
MarkDubya:
Apr 03, 2019 at 11:21 PM
Thanks, it's continuing now.
Reply to this comment
Reply to this comment
Robert Foss:
Apr 04, 2019 at 11:52 AM
Thanks Thomas, I've fixed this in the repo now.
Reply to this comment
Reply to this comment
Jean:
Apr 03, 2019 at 03:45 PM
this one is still private : frameworks_base.git
Reply to this comment
Reply to this comment
Robert Foss:
Apr 03, 2019 at 04:45 PM
Good find, thanks for pointing it out.
I'm currently uploading that repo.
Reply to this comment
Reply to this comment
John:
Apr 03, 2019 at 11:17 PM
The linaro.xml manifest is broken. I think there's a space at the beginning of the xml file.
Reply to this comment
Reply to this comment
Robert Foss:
Apr 04, 2019 at 11:53 AM
Hey John,
I've fixed this in the repo now, thanks for telling me!
Rob.
Reply to this comment
Reply to this comment
John:
Apr 04, 2019 at 12:02 AM
The step to copy the file below was omitted from readme.md:
sudo cp /usr/bin/qemu-arm-static rootfs/usr/bin
Reply to this comment
Reply to this comment
Robert Foss:
Apr 04, 2019 at 12:20 PM
Hey again John,
I actually didn't need to do this step, but rather used these instructions:
https://wiki.debian.org/QemuUserEmulation
Rob.
Reply to this comment
Reply to this comment
MarkDubya:
Apr 04, 2019 at 12:48 AM
It got stuck here:
From https://android.googlesource.com/platform/tools/test/connectivity
c36d1e492..2a72edf07 master -> aosp/master
I finally gave up & hit Ctrl C:
error: Cannot fetch system_bt.git from https://gitlab.collabora.com/spurv/system_bt.git
error: Cannot fetch system_netd.git from https://gitlab.collabora.com/spurv/system_netd.git
error: Cannot fetch system_vold.git from https://gitlab.collabora.com/spurv/system_vold.git
error: Cannot fetch mesa.git from https://gitlab.collabora.com/spurv/mesa.git
error: Cannot fetch minijail.git from https://gitlab.collabora.com/spurv/minijail.git
error: Cannot fetch system_core.git from https://gitlab.collabora.com/spurv/system_core.git
error: Cannot fetch frameworks_native.git from https://gitlab.collabora.com/spurv/frameworks_native.git
error: Cannot fetch drm.git from https://gitlab.collabora.com/spurv/drm.git
aborted by user
How large is it supposed to be after the repo sync? the folder is almost 40GB right now.
Reply to this comment
Reply to this comment
BirdZhang:
Apr 04, 2019 at 03:07 AM
repo init -u https://android.googlesource.com/platform/manifest -b android-9.0.0_r10 --depth=1
repo sync -c --no-tags --no-clone-bundle -j8
Reply to this comment
Reply to this comment
John:
Apr 04, 2019 at 10:06 AM
Yeah, it asks for a user credentials for those repositories.
Reply to this comment
Reply to this comment
Robert Foss:
Apr 04, 2019 at 12:22 PM
Hey MarkW,
I would expect the finished sync'd and built repo to be about 100GB.
As for the errors you are seeing, they are my fault, and have been fixed.
They were due to me not wanting to depend on any external repositories.
Rob.
Reply to this comment
Reply to this comment
gmgm:
Apr 05, 2019 at 09:36 AM
--
++
Reply to this comment
Reply to this comment
Marcos Dione:
Apr 04, 2019 at 09:58 AM
Is it possible to fake certain values? Like Phone number, IMEI, etc? I would definitely like to run WhatsApp on my desktop...
Reply to this comment
Reply to this comment
Robert Foss:
Apr 04, 2019 at 02:46 PM
Hey,
Most likely, you have access to the Android source code after all, but how is a different question.
Rob.
Reply to this comment
Reply to this comment
MarkDubya:
Apr 04, 2019 at 04:41 PM
I finally finishing syncing, now I'm getting an error building:
$ make -j12
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=spurv
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.0.5-1-MANJARO-x86_64-Manjaro-Linux
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PPR2.181005.003
OUT_DIR=out
============================================
[1/1] out/soong/.minibootstrap/minibp out/soong/.bootstrap/build.ninja
[44/45] glob prebuilts/ndk/stl.bp
[77/77] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
out/build-spurv-cleanspec.ninja is missing, regenerating...
out/build-spurv.ninja is missing, regenerating...
[154/948] including external/drm_gralloc/Android.mk ...
external/drm_gralloc/Android.mk:43: warning: invalid GPU drivers: etnaviv imx
[198/948] including external/libdrm/Android.mk ...
external/libdrm/libkms/Android.mk:19: warning: invalid GPU drivers: etnaviv imx
[578/948] including system/sepolicy/Android.mk ...
system/sepolicy/Android.mk:79: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version
[948/948] including tools/tradefederation/core/Android.mk ...
external/alsa-lib/Android.mk:42: warning: overriding commands for target `out/target/product/spurv/system/usr/share/alsa/alsa-conf'
build/make/core/base_rules.mk:412: warning: ignoring old commands for target `out/target/product/spurv/system/usr/share/alsa/alsa-conf'
external/alsa-lib/Android.mk:46: warning: overriding commands for target `out/target/product/spurv/obj/ETC/alsa-conf_intermediates/alsa-conf'
build/make/core/prebuilt_internal.mk:507: warning: ignoring old commands for target `out/target/product/spurv/obj/ETC/alsa-conf_intermediates/alsa-conf'
[ 99% 703/704] glob tools/tradefederation/core/atest/**/*.py
[ 0% 14/49152] build out/target/common/obj/all-event-log-tags.txt
FAILED: out/target/common/obj/all-event-log-tags.txt
/bin/bash -c "build/make/tools/merge-event-log-tags.py -o out/target/common/obj/all-event-log-tags.txt frameworks/base/core/java/android/app/admin/SecurityLogTags.logtags frameworks/base/core/java/android/content/EventLogTags.logtags frameworks/base/core/java/android/net/EventLogTags.logtags frameworks/base/core/java/android/os/EventLogTags.logtags frameworks/base/core/java/android/speech/tts/EventLogTags.logtags frameworks/base/core/java/android/webkit/EventLogTags.logtags frameworks/base/core/java/com/android/internal/app/EventLogTags.logtags frameworks/base/core/java/com/android/internal/logging/EventLogTags.logtags frameworks/base/core/java/com/android/server/DropboxLogTags.logtags frameworks/base/core/java/org/chromium/arc/EventLogTags.logtags frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/EventLogTags.logtags frameworks/base/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags frameworks/base/services/core/java/com/android/server/EventLogTags.logtags frameworks/base/services/core/java/com/android/server/am/EventLogTags.logtags frameworks/ex/common/java/com/android/common/GoogleLogTags.logtags frameworks/native/services/surfaceflinger/EventLog/EventLogTags.logtags frameworks/opt/telephony/src/java/com/android/internal/telephony/EventLogTags.logtags packages/apps/QuickSearchBox/src/com/android/quicksearchbox/EventLogTags.logtags packages/apps/Settings/src/com/android/settings/EventLogTags.logtags packages/apps/TimeZoneUpdater/src/main/com/android/timezone/updater/EventLogTags.logtags packages/providers/CalendarProvider/src/com/android/providers/calendar/EventLogTags.logtags packages/providers/ContactsProvider/src/com/android/providers/contacts/EventLogTags.logtags packages/services/Telephony/src/com/android/phone/EventLogTags.logtags system/bt/main/../EventLogTags.logtags system/core/liblog/event.logtags system/core/libsysutils/EventLogTags.logtags system/core/logcat/event.logtags system/core/logd/event.logtags system/core/storaged/EventLogTags.logtags"
File "build/make/tools/merge-event-log-tags.py", line 51
except getopt.GetoptError, err:
^
SyntaxError: invalid syntax
[ 0% 16/49152] target Java source list: apache-xml
File "build/make/tools/normalize_path.py", line 25
print os.path.normpath(p)
^
SyntaxError: invalid syntax
[ 0% 25/49152] target Prebuilt: sdk_v21 (out/target/common/obj/JAVA_LIBRARIES/sdk_v21_intermediates/classes.jar)
ninja: build stopped: subcommand failed.
09:38:59 ninja failed with: exit status 1
#### failed to build some targets (02:26 (mm:ss)) ####
Reply to this comment
Reply to this comment
Robert Foss:
Apr 05, 2019 at 01:41 PM
Hey Mark,
I haven't encountered this issue before.
I think the error looks like an external dependency being bad.
Maybe your python version is the wrong one.
File "build/make/tools/merge-event-log-tags.py", line 51
except getopt.GetoptError, err:
^
SyntaxError: invalid syntax
[ 0% 16/49152] target Java source list: apache-xml
File "build/make/tools/normalize_path.py", line 25
print os.path.normpath(p)
^
SyntaxError: invalid syntax
[ 0% 25/49152] target Prebuilt: sdk_v21 (out/target/common/obj/JAVA_LIBRARIES/sdk_v21_intermediates/classes.jar)
ninja: build stopped: subcommand failed.
09:38:59 ninja failed with: exit status 1
#### failed to build some targets (02:26 (mm:ss)) ####
Reply to this comment
Reply to this comment
MarkDubya:
Apr 05, 2019 at 03:04 PM
How is my python version "bad"? I'm using python 3.7.3 and also have python2 2.7.16. Perhaps you should list the dependencies in your README.
Reply to this comment
Reply to this comment
Robert Foss:
Apr 05, 2019 at 03:10 PM
It probably isn't, but this is an error I don't recognize and haven't encountered,
so I'll have a hard time fixing it for you.
If you do find a solution, please tell me.
Reply to this comment
Reply to this comment
Marcos Dione:
Apr 06, 2019 at 09:35 AM
It's running python2 with python3. Just change the first line so it uses python2 instead of the system's default. Something like:
#! /usr/bin/python2
or:
#! /usr/bin/env python2
Reply to this comment
Reply to this comment
Joel Isaacson:
Apr 04, 2019 at 08:43 PM
Coincidentally, we are working on a technology similar to SPURV. Unlike SPURV which runs locally, ours is a Cloud-Client technology in which a large number of containerized Android instances run in the Cloud. Graphical rendering is performed on the Client. The remote rendering is performed by sending compressed rendering commands (OpenGL ES) from the Android instances in the Cloud to the thin client where the rendering is performed. Here is an overview paper (http://kvm.ascender.com/aic_overview.pdf) and video
(https://tinyurl.com/yy9vxs66).
Reply to this comment
Reply to this comment
Philippe:
Apr 05, 2019 at 03:10 PM
Aah, where can we find the code?
Reply to this comment
Reply to this comment
Joel Isaacson:
Apr 07, 2019 at 02:56 PM
To open source the code and create the infrastructure necessary for it to move forward in the best way possible, we require resources. I can be reached at joel@ascender.com
Reply to this comment
Reply to this comment
Paulo:
Apr 05, 2019 at 12:42 AM
I wish you all the best with this project, I believe it to be something that Linux and open source desperately need.
Is it your goal to have something functioning like Bluestacks? In example, will the user be able to run arm apks in a x86 pc, will the apks be fully functional at their best performance, will there be a key mapper for gaming, will it be possible to install gapps and so on?
And do you intent to have a noob friendly install for the masses, something like a flatpak, snap package or an appimage?
If so and with the recent major developments in WINE/Steam Play and Lutris, this could be the beginning of a paradigm change in order to bring Linux and open source to the general users and the masses.
Reply to this comment
Reply to this comment
Robert Foss:
Apr 05, 2019 at 01:46 PM
Hey Paulo,
So gaming isn't really our intended application, but it does place emphasis
all of the same bottlenecks & features that we are targeting.
We're currently not intending to make this a end-user application
but rather a developers tool and for embedding into products.
About a paradigm shift, this work still requires the host machine to run Linux,
which is not what most people use.
Reply to this comment
Reply to this comment
AOSP:
Apr 05, 2019 at 04:32 PM
Starting compile on Archlinux. So far many issues
On Archlinux it requires ncurses5-compat-libs from AUR.
/usr/bin/python needs to be removed and linked to /usr/bin/python2
arm architecture in BoardConfig.mk needs to be changed to x86_64
external/alsa-lib/src/pcm/pcm_local.h and external/alsa-lib/src/control/control_shm.c need to have added
external/pulseaudio/src/pulsecore/core-util.c needs #define __USE_GNU 1 before
Also, the captcha on this site is very annoying. If there is an intention to provide some support or bugfixing for this project, it should be cloned to gitlab or github so people can open issues there.
Reply to this comment
Reply to this comment
Marcos Dione:
Apr 06, 2019 at 09:42 AM
I wouldn't change the system's python like that. Just edit the failing files like I posted above. Cheers.
Reply to this comment
Reply to this comment
Robert Foss:
Apr 09, 2019 at 02:36 AM
Hey AOSP,
Very nice!
This project is alive (albeit paused this month) within Collabora, and will likely be resumed soon.
I added a 'What comes next?' section, describing what we'd like to look at next.
Reply to this comment
Reply to this comment
Niall:
Apr 06, 2019 at 06:51 PM
Trying to build on Arch Linux, ninja: error: 'out/target/product/spurv/system/bin/app_process32', needed by 'out/target/product/spurv/system/bin/app_process', missing and no known rule to make it
17:51:13 ninja failed with: exit status 1
Reply to this comment
Reply to this comment
abdelatif melki:
Apr 12, 2019 at 01:23 PM
thanks
Reply to this comment
Reply to this comment
Genx Ster:
Jun 06, 2019 at 05:05 PM
Hey @Robert Foss Do you have a compiled one spruv project , my current bandwidth/machine is too limited to compile one.
Thanks
Reply to this comment
Reply to this comment
Robert Foss:
Jun 06, 2019 at 05:31 PM
Hey Genx,
I do indeed have an image laying around: http://people.collabora.com/~robertfoss/aosp_demo_2019-04-09.img.bz2
It's the output of the sister blog-post to this one: https://www.collabora.com/news-and-blog/blog/2019/05/02/running-android-and-wayland-on-embedded-devices/
Reply to this comment
Reply to this comment
Genx Ster:
Jun 06, 2019 at 05:39 PM
arch ??
X86 or x86_64 or arm64 ...
Reply to this comment
Reply to this comment
Robert Foss:
Jun 06, 2019 at 05:43 PM
This image and the blogpost it was made using targets an iMX6 devboard.
Reply to this comment
Reply to this comment
Genx Ster:
Jun 06, 2019 at 05:43 PM
Got that , thats an arm based sbc but i need an x64 img
Reply to this comment
Reply to this comment
Robert Foss:
Jun 06, 2019 at 05:45 PM
Unfortunately I don't have one laying around. This work is however all very muxh x86 compatible.
But it hasn't been used on x86 yet, so you would have to get your hands dirty I'm afraid.
Reply to this comment
Reply to this comment
Genx Ster:
Jun 06, 2019 at 05:50 PM
the aosp source size itself is 12-15 gigs , imo and my bandwidth is limited to 1gb per day + building that thing on anyhow downloading on my machine even after getting dirty for hacks for x86 sku would take several days , lol
Reply to this comment
Reply to this comment
Robert Foss:
Jun 06, 2019 at 07:13 PM
Yeah, building AOSP is always quite the endeavor.
If you still want to make it happen you could rent a machine on AWS of GCE.
Reply to this comment
Reply to this comment
Sion Buckler:
Sep 07, 2019 at 10:30 AM
So this couldn't have come at a better time. I have a business client who's got a 15 year old x386 IBM SurePOS 500 Touchscreen Kiosk. Which was running XP (barely). And they want a POS App on it, which of course, is only on the Android App Store. The clients in-house tech tried Bluestack as the immediate choice, but the kiosk's printer (also 1,000 years old) wouldn't connected to the app via BlueStack on the Kiosks Windows XP. So I upgraded the OS to Ubuntu 18.04 (which I achieved by putting Porteus OS on first, then upgrading). Now I'm at the stage of needing to introduce the emulator, so I'll give this a bloody good go. I do have a query after a quick glance at the docs. It says "The kernel image is at arch/arm/boot/zImage and the DT at arch/arm/boot/dts/imx6qp-zii-rdu2.dtb" ... will this be ok on our x386 machine (which we've nicknamed 'the aircraft carrier', because it also weighs about 100 tonnes). And question 2, how soon can this be made into a one-click install package, like the other older emulators have done - if it's underway can we follow the work on a public repo?
Reply to this comment
Reply to this comment
Robert Foss:
Sep 12, 2019 at 04:58 PM
Hey Sion,
Glad the timing is working out for you!
1) The path for the x86 kernel image is different, and not dtb file is needed for x86 targets.
2) Setting this up as a one-click installer is something we didn't look at. SPURV isn't productized and is just a research project at this point.
Additionally, the host has to run wayland, I'm not sure how well Ubuntu 18.04 does that. I would recommend something more recent.
Reply to this comment
Reply to this comment
Gopal:
Sep 08, 2019 at 05:23 PM
Hi Robert,
Can I use this SPURV for Windows10 to run Andriod applications.
Regards
Gopal
Reply to this comment
Reply to this comment
Robert Foss:
Sep 12, 2019 at 05:00 PM
Hey,
The short answer is no.
The longer answer is maybe somehow using the Windows WSL Linux compatibility layer. Although it sounds painful and I wouldn't recommend dying on that particular hill.
Reply to this comment
Reply to this comment
Sion Buckler:
Sep 13, 2019 at 08:00 PM
I found one achieved version of chrome (not chromium) which I ran on Lubuntu. Lubuntu ran much faster than Ubuntu. Then I reverse engineered the Android App APK to run as a Chrome Extension using Archon. I then narrowed the issue to the underlying virtualisation e.g. kernel and display drivers. I attacked this by running ukuu to upgrade the Linux Kernel but that killed it, so I'm starting fresh. I love a challenge, but this one's definately landing me on that hill you speak of.
Reply to this comment
Reply to this comment
Lynx:
Sep 18, 2019 at 04:45 PM
Getting an error while building. How can I fix this ?
$ make
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=spurv
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.2.9-200.fc30.x86_64-x86_64-Fedora-30-(Workstation-Edition)
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PPR2.181005.003
OUT_DIR=out
============================================
ninja: no work to do.
ninja: no work to do.
No need to regenerate ninja file
No need to regenerate ninja file
[ 0% 1/42947] build out/target/product/spurv/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/ir_expression_operation_constant.h
FAILED: out/target/product/spurv/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/ir_expression_operation_constant.h
/bin/bash -c "python external/mesa3d/src/compiler/glsl/ir_expression_operation.py constant > out/target/product/spurv/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/ir_expression_operation_constant.h"
Traceback (most recent call last):
File "external/mesa3d/src/compiler/glsl/ir_expression_operation.py", line 23, in
import mako.template
ImportError: No module named mako.template
[ 0% 2/42947] build out/target/product/spurv/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/ir_expression_operation.h
FAILED: out/target/product/spurv/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/ir_expression_operation.h
/bin/bash -c "python external/mesa3d/src/compiler/glsl/ir_expression_operation.py enum > out/target/product/spurv/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/ir_expression_operation.h"
Traceback (most recent call last):
File "external/mesa3d/src/compiler/glsl/ir_expression_operation.py", line 23, in
import mako.template
ImportError: No module named mako.template
[ 0% 3/42947] build out/target/product/spurv/system/usr/share/alsa/alsa-conf
alsa.conf
pcm/dsnoop.conf
pcm/modem.conf
pcm/dpl.conf
pcm/default.conf
pcm/surround51.conf
pcm/surround41.conf
pcm/surround50.conf
pcm/dmix.conf
pcm/center_lfe.conf
pcm/surround40.conf
pcm/side.conf
pcm/iec958.conf
pcm/rear.conf
pcm/surround71.conf
pcm/front.conf
cards/aliases.conf
[ 0% 4/42947] build out/target/product/spurv/gen/STATIC_LIBRARIES/libmesa_nir_intermediates/nir/nir_opcodes.h
FAILED: out/target/product/spurv/gen/STATIC_LIBRARIES/libmesa_nir_intermediates/nir/nir_opcodes.h
/bin/bash -c "python external/mesa3d/src/compiler/nir/nir_opcodes_h.py external/mesa3d/src/compiler/nir/nir_opcodes.py > out/target/product/spurv/gen/STATIC_LIBRARIES/libmesa_nir_intermediates/nir/nir_opcodes.h"
Traceback (most recent call last):
File "external/mesa3d/src/compiler/nir/nir_opcodes_h.py", line 45, in
from mako.template import Template
ImportError: No module named mako.template
[ 0% 5/42947] build out/target/product/spurv/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/ir_expression_operation_strings.h
FAILED: out/target/product/spurv/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/ir_expression_operation_strings.h
/bin/bash -c "python external/mesa3d/src/compiler/glsl/ir_expression_operation.py strings > out/target/product/spurv/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/ir_expression_operation_strings.h"
Traceback (most recent call last):
File "external/mesa3d/src/compiler/glsl/ir_expression_operation.py", line 23, in
import mako.template
ImportError: No module named mako.template
[ 0% 6/42947] Gen ES: libmesa_st_mesa
Reply to this comment
Reply to this comment
Lynx:
Sep 18, 2019 at 08:47 PM
The log text is too long . It exceeds the limit.
Full log is here: https://gist.github.com/giggs-lynx/3f1ce453c368dd1eff7c9a32b37fb741
Reply to this comment
Reply to this comment
Robert Foss:
Sep 18, 2019 at 09:46 PM
Hey Lynx,
You seem to be missing the python mako package. Install it for the python version that is being used and you should be able to make get the build started.
Reply to this comment
Reply to this comment
Lynx:
Sep 19, 2019 at 10:04 AM
external/iio-sensors-hal/activity.c:314:48: error: use of undeclared identifier 'errno'
I add #include in activity.c to fix.
==
ImportError: No module named mako.template
fix by sudo pip install Mako
Reply to this comment
Reply to this comment
igor:
Mar 25, 2020 at 03:03 PM
I think I would have to create a modified kernel for this, but it would not be possible to make a hybrid system ?
Reply to this comment
Reply to this comment
Daniel Stone:
Mar 26, 2020 at 10:03 AM
As this is about running Android on mainline Linux kernels, all the kernel changes in this post are either already in upstream mainline Linux, or very close to being included. The kernel tree for this project can run either Android or generic Linux.
Reply to this comment
Reply to this comment
nancy:
Apr 28, 2020 at 08:52 AM
May I ask how SPURV to do window management between android and wayland?
Does SPURV support to run every apk in independent wayland window?
if linux tile/maxisize/minimize the android windows, what android window manager response these operations? Thank you!
Reply to this comment
Reply to this comment
Daniel Stone:
Apr 29, 2020 at 10:12 AM
Currently, SPURV only supports a single window. Resizing is not supported. Supporting more complex window management would require deeper changes to the Android guest system, which we did not undertake as part of this proof of concept. See my reply on the wayland-devel mailing list for more details.
Reply to this comment
Reply to this comment
Mtm:
Dec 02, 2020 at 04:13 PM
Hello
I really appreciate your effort to make Linux more awesome
Is this project still running?
When will it be available to mix with distros like manjaro?
Reply to this comment
Reply to this comment
zach liu:
Aug 28, 2023 at 07:52 AM
hello, thanks to your efforts.
when I trying to pull the code, it tells me the following errors:
```atal: '../platform/art.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: Cannot fetch platform/art
fatal: '../platform/build/blueprint.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: Cannot fetch platform/build/blueprint
fatal: '../platform/bionic.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: '../platform/bootable/recovery.git' does not appear to be a git repository
error: Cannot fetch platform/bionic
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: Cannot fetch platform/bootable/recovery
fatal: '../platform/build.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: Cannot fetch platform/build
fatal: '../platform/build/kati.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: Cannot fetch platform/build/kati
fatal: '../platform/build/soong.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: Cannot fetch platform/build/soong
error: Exited sync due to fetch errors.```
BTW, I had change the local_manifests/linaro.xml, change ssh to https. Does the repo changed to private again?
Reply to this comment
Reply to this comment
Add a Comment