Here are my modified instructions. There were a few tweaks such as adding a few more packages to get via apt, editing a different manifest, and retrieving OpenGapps via git lfs:
# Create a builder AppVM based on whonix-14-ws or Debian in which you'll build android-x86. # You'll need 120GB for android-x86 sources and temp build files and 30GB for swap. # Extend private storage size to 160GB via GUI or in dom0: qvm-volume extend android-builder:private 160g # Add 30GB swap in builder VM: sudo fallocate -l 30G /tmp/swapfile sudo chmod 0600 /tmp/swapfile sudo mkswap /tmp/swapfile sudo swapon /tmp/swapfile # Add the following repository to /etc/apt/sources.list (openjdk-8 is required, but it is not available under Debian 10): # deb https://deb.debian.org/debian sid main # Install packages in whonix-14-ws (or Debian) template: sudo apt-get update sudo apt-get install openjdk-8-jdk gnupg flex bison gperf build-essential zip zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip gettext libyaml-dev dosfstools syslinux syslinux-utils xorriso mtools makebootfat lunzip git-core curl python-pip libssl-dev bc libelf-dev git-lfs python-pip git-core curl clang libncurses5 libncurses5-dev # In builder VM run: sudo ln -s /sbin/mkdosfs /usr/local/bin/mkdosfs sudo pip install prettytable Mako pyaml dateutils --upgrade export _JAVA_OPTIONS="-Xmx8G" echo 'export _JAVA_OPTIONS="-Xmx8G"' >> ~/.profile echo "sudo swapon /tmp/swapfile" >> /rw/config/rc.local # Download android-x86 sources: mkdir android-x86 cd android-x86 curl https://storage.googleapis.com/git-repo-downloads/repo > repo chmod a+x repo sudo install repo /usr/local/bin rm repo git config --global user.name "Your Name" git config --global user.email "r...@example.com" repo init -u git://git.osdn.net/gitroot/android-x86/manifest -b oreo-x86 -m android-x86-8.1-r1.xml # To add GAPPS to your build you need to add the build system, and the wanted sources to your manifest. # Edit .repo/manifests/android-x86-8.1-r1.xml and add the following towards the end: <remote name="opengapps" fetch="https://github.com/opengapps/" /> <remote name="gitlab" fetch="https://gitlab.opengapps.org/opengapps/" /> <project path="vendor/opengapps/build" name="aosp_build" revision="master" remote="opengapps" /> <project path="vendor/opengapps/sources/all" name="all" clone-depth="1" revision="master" remote="gitlab" /> <!-- arm64 depends on arm --> <project path="vendor/opengapps/sources/arm" name="arm" clone-depth="1" revision="master" remote="gitlab" /> <project path="vendor/opengapps/sources/arm64" name="arm64" clone-depth="1" revision="master" remote="gitlab" /> <project path="vendor/opengapps/sources/x86" name="x86" clone-depth="1" revision="master" remote="gitlab" /> <project path="vendor/opengapps/sources/x86_64" name="x86_64" clone-depth="1" revision="master" remote="gitlab" /> # Download sources: repo sync --no-tags --no-clone-bundle --force-sync -j$( nproc --all ) # If you choose to add GAPPS, then edit file device/generic/common/device.mk and add at the beginning: #OpenGAPPS GAPPS_VARIANT := pico GAPPS_PRODUCT_PACKAGES += Chrome \ KeyboardGoogle \ LatinImeGoogle \ GoogleTTS \ YouTube \ PixelIcons \ PixelLauncher \ Wallpapers \ PixelLauncherIcons \ WebViewGoogle \ GoogleServicesFramework \ GoogleLoginService \ GAPPS_FORCE_BROWSER_OVERRIDES := true GAPPS_FORCE_PACKAGE_OVERRIDES := true GAPPS_EXCLUDED_PACKAGES := FaceLock \ AndroidPlatformServices \ PrebuiltGmsCoreInstantApps \ # And at the end add: #OpenGAPPS $(call inherit-product, vendor/opengapps/build/opengapps-packages.mk) # OpenGapps changed their repo to require git-lfs. There may be a better way to do this, but if you're building with GApps, this gets the right files. It takes awhile: cd vendor rm -r opengapps git clone https://github.com/opengapps/opengapps.git cd opengapps git lfs install ./download_sources.sh --shallow x86_64 cd ../../ # Edit android-x86 sources for XEN compatibility: sed -i -e 's|/sys/block/\[shv\]d\[a-z\]|/sys/block/\[shv\]d\[a-z\] /sys/block/xvd\[a-z\]|g' bootable/newinstaller/install/scripts/1-install sed -i -e 's|/sys/block/\[shv\]d\$h/\$1|/sys/block/\[shv\]d\$h/\$1 /sys/block/xvd\$h/\$1|g' bootable/newinstaller/install/scripts/1-install sed -i -e 's|hmnsv|hmnsvx|g' bootable/newinstaller/initrd/init # Edit android-x86 sources for Debian build environment: sed -i -e 's|genisoimage|xorriso -as mkisofs|g' bootable/newinstaller/Android.mk # Configure build target: . build/envsetup.sh lunch android_x86_64-userdebug # Configure kernel: /usr/bin/make -C kernel O=$OUT/obj/kernel ARCH=x86_64 menuconfig # You need to edit these parameters: XEN=yes XEN_BLKDEV_BACKEND=yes XEN_BLKDEV_FRONTEND=yes XEN_NETDEV_BACKEND=no XEN_NETDEV_FRONTEND=no SECURITY_SELINUX_BOOTPARAM=yes SECURITY_SELINUX_BOOTPARAM_VALUE=1 SECURITY_SELINUX_DISABLE=yes DEFAULT_SECURITY_SELINUX=yes # The kernel config will be in out/target/product/x86_64/obj/kernel/.config # Also, you can edit the config to set the device type from tablet to phone. # Edit device/generic/common/device.mk and change PRODUCT_CHARACTERISTICS from tablet to default: PRODUCT_CHARACTERISTICS := default # Start the build: make -j$( nproc --all ) iso_img # After you got the iso, create the android network VM. If you choose the android VM's netvm as sys-whonix directly, the network won't work. You need to have intermediate netvm between android VM and sys-whonix. Create new AppVM sys-android based on fedora template with netvm sys-whonix and set "provides network". # Create android VM in dom0: qvm-create --class StandaloneVM --label green --property virt_mode=hvm android qvm-prefs android kernel '' qvm-prefs android 'sys-android' qvm-prefs android memory '2048' qvm-prefs android maxmem '2048' qvm-volume extend android:root 20g # Start the android VM with iso: qvm-start android --cdrom=android-builder:/home/user/android-x86/out/target/product/x86_64/android_x86_64.iso # Install android-x86 on xvda and reboot. # Start android VM without iso: qvm-start android # When it'll start, kill the VM and wait for it to halt. # Configure android VM to use the mouse in dom0: sudo mkdir -p /etc/qubes/templates/libvirt/xen/by-name/ sudo cp /etc/libvirt/libxl/android.xml /etc/qubes/templates/libvirt/xen/by-name/android.xml sudo sed -i -e 's/tablet/mouse/g' /etc/qubes/templates/libvirt/xen/by-name/android.xml # Start android VM without iso and it should work fine: qvm-start android While the ISO boots and installs and the mouse works fine, the system can't get past the initial Google first run wizard. After clicking the button to set up a new device (vs transferring from an existing phone), the screen turns black, and it doesn't go anywhere. It's still responsive - I can click on the back button, and it will get highlighted as if I had actually clicked it. However, nothing happens. Thoughts? On Wednesday, December 18, 2019 at 2:21:19 PM UTC-6, arthur...@gmail.com wrote: > > So, I managed to get the instructions to work (albeit with a few > modifications - I'll post them when/if I can figure out the GApps issue). > However, I'm having issues whenever I try to include and compile GApps. I > can confirm that Android-x86 will build successfully on its own, but when I > include GApps in my device.mk, I get a lot of these after every GApps app > build: > > End-of-central-directory signature not found. Either this file is not a > zipfile, or it constitutes one disk of a multi-part archive. In the latter > case the central directory and zipfile comment will be found on the last > disk(s) of this archive. > > > I then get these for each app before it all fails: > > Unable to open > 'out/target/product/x86_64/obj/APPS/PixelLauncherIcons_intermediates/package.apk' > > for verification > > > I've got the complete log, my device.mk, etc, but does anyone know what's > up? > > On Thursday, December 12, 2019 at 9:20:54 PM UTC-6, arthur...@gmail.com > wrote: >> >> Are the instructions in the first post edited and updated, or are there >> more recent instructions which should be used? I'm personally interested in >> an image with GApps (I downloaded the nogapps ISO and tried to somehow >> install GApps, but to no avail - I wasn't sure if the image provided up >> near the start of the thread was functional). If there are updated/verified >> instructions that could be provided, that would be awesome! >> >> On Saturday, April 27, 2019 at 6:29:08 PM UTC-5, alex.j...@gmail.com >> wrote: >>> >>> On Saturday, April 27, 2019 at 9:35:19 PM UTC, alex.j...@gmail.com >>> wrote: >>> > On Thursday, April 25, 2019 at 10:20:32 PM UTC, Daniil Travnikov wrote: >>> > > I am stuck on this process already twice. >>> > > >>> > > When I put the command >>> > > >>> > > Download sources: >>> > > repo sync --no-tags --no-clone-bundle --force-sync -j$( nproc --all ) >>> > > >>> > > >>> > > and when it show this: >>> > > >>> > > >>> > > From git://git.osdn.net/gitroot/android-x86/platform/frameworks/av >>> > > * [new branch] nougat-x86 -> x86/nougat-x86 >>> > > Fetching project platform/external/android-clat >>> > > remote: Counting objects: 1, done >>> > > remote: Finding sources: 100% (793/793) >>> > > remote: Total 793 (delta 244), reused 793 (delta 244) >>> > > Receiving objects: 100% (793/793), 517.38 KiB | 0 bytes/s, done. >>> > > Resolving deltas: 100% (244/244), done. >>> > > From https://android.googlesource.com/platform/external/android-clat >>> > > * [new tag] android-7.1.2_r36 -> android-7.1.2_r36 >>> > > >>> > > >>> > > I got nothing, I mean it's look like freeze. >>> > >>> > Did you try to remove downloaded repo and sync it again from scratch? >>> The OpenGAPPS repo changed, see below, maybe it's somehow related. >>> > >>> > I'd recommend to build Android 8 release, the mouse works fine there. >>> Also the Settings bug is fixed if you use userdebug build variant instead >>> of eng. >>> > The guide in the same as in first post except: >>> > >>> > Android 8 will take 211GB to build. I've build it with 32GB RAM >>> without swap, maybe it'll work with less RAM. >>> > >>> > repo init -u git://git.osdn.net/gitroot/android-x86/manifest -b >>> oreo-x86 -m android-x86-8.1-r1.xml >>> > instead of >>> > repo init -u git://git.osdn.net/gitroot/android-x86/manifest -b >>> android-x86-7.1-r2 >>> > >>> > <remote name="opengapps" fetch="https://github.com/opengapps/" /> >>> > <remote name="nezor" fetch="https://gitlab.nezorfla.me/opengapps/" /> >>> > <project path="vendor/opengapps/build" name="aosp_build" >>> revision="master" remote="opengapps" /> >>> > <project path="vendor/opengapps/sources/all" name="all" >>> clone-depth="1" revision="master" remote="nezor" /> >>> > <project path="vendor/opengapps/sources/x86" name="x86" >>> clone-depth="1" revision="master" remote="nezor" /> >>> > <project path="vendor/opengapps/sources/x86_64" name="x86_64" >>> clone-depth="1" revision="master" remote="nezor" /> >>> > instead of >>> > <remote name="opengapps" fetch="https://github.com/opengapps/" /> >>> > <project path="vendor/opengapps/build" name="aosp_build" >>> revision="master" remote="opengapps" /> >>> > <project path="vendor/opengapps/sources/all" name="all" >>> clone-depth="1" revision="master" remote="opengapps" /> >>> > <project path="vendor/opengapps/sources/x86" name="x86" >>> clone-depth="1" revision="master" remote="opengapps" /> >>> > <project path="vendor/opengapps/sources/x86_64" name="x86_64" >>> clone-depth="1" revision="master" remote="opengapps" /> >>> > >>> > lunch android_x86_64-userdebug >>> > instead of >>> > lunch android_x86_64-eng >>> > >>> > /usr/bin/make -C kernel O=$OUT/obj/kernel ARCH=x86_64 menuconfig >>> > instead of >>> > make -C kernel O=$OUT/obj/kernel ARCH=x86_64 menuconfig >>> >>> I've uploaded the working Android 8.1 iso for those who need it for a >>> test, but I don't recommend to use it for security reasons and it's better >>> to build the iso yourself: >>> https://drive.google.com/open?id=1Y4P77mlPPlXBzYrJ5yHJ7XM6gLVsQQm0 >>> >>> md5sum android_x86_64-oreo-nogapps.iso >>> b3af7a84820dd9fb32dd40c68f285993 android_x86_64-oreo-nogapps.iso >>> >>> sha1sum android_x86_64-oreo-nogapps.iso >>> 16e9bcf0da44929b223fc2ab1df97de0df26d9fb android_x86_64-oreo-nogapps.iso >>> sha256sum >>> >>> sha256sum android_x86_64-oreo-nogapps.iso >>> b7d9aa5f9c401202ea24b63e95bb0f38d1f981381a719257c1a2f526e0cf636f >>> android_x86_64-oreo-nogapps.iso >>> >>> sha512sum android_x86_64-oreo-nogapps.iso >>> 16f2666a20499f31472fc933a670c47070e0db14686b605b69254d054dcc63893b564e5a35e84e1daf7b7fd80f955a2834956a1bb029e93563b7d8c44787666b >>> >>> android_x86_64-oreo-nogapps.iso >>> >>> -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/0dad805d-6cc7-4adf-a95b-c95ec10c0ba5%40googlegroups.com.