Linuxtips13

TurnToJPG -->


1. Install Android Studio

Enable 32-bit library and install some 32-bit libs:

dpkg --add-architecture i386
apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i38

Download from offcial website:

https://developer.android.com/studio, then untar it to:

Ignored

2. vendor.img resize

Install qemu tools via:

# apt-get install -y qemu qemu-utils

Resize via:

# qemu-img resize vendor.img +1G
# mount -o loop,offset=1048576 vendor.img /mnt8/
# losetup -l
# resize2fs /dev/loop9
# df -h | grep mnt8
/dev/loop9      1.1G   67M  1.1G   7% /mnt8

3. waydroid

Install via:

# export DISTRO="focal"
# sudo curl https://repo.waydro.id/waydroid.gpg --output /usr/share/keyrings/waydroid.gpg && \ 
# echo "deb [signed-by=/usr/share/keyrings/waydroid.gpg] https://repo.waydro.id/ $DISTRO main" > ~/waydroid.list && sudo mv ~/waydroid.list /etc/apt/sources.list.d/waydroid.list && sudo apt-get update -y
# sudo apt-get install -y waydroid

Initialize via:

root@vp1:~# waydroid init
[08:42:25] Download https://sourceforge.net/projects/waydroid/files/images/system/lineage/waydroid_x86_64/lineage-17.1-20211007-VANILLA-waydroid_x86_64-system.zip/download
[08:43:29] Validating system image
[08:43:31] Extracting to /var/lib/waydroid/images
[08:43:58] Download https://sourceforge.net/projects/waydroid/files/images/vendor/waydroid_x86_64/lineage-17.1-20211007-MAINLINE-waydroid_x86_64-vendor.zip/download
[08:44:10] Validating vendor image
[08:44:10] Extracting to /var/lib/waydroid/images

conflict with redroid, so ignored.

4. Configure monitor in wayland

Via gnome-control-center we could setup the monitor.

https://blog.csdn.net/ALakers/article/details/102705681
https://blog.imlk.top/blog/51/
https://zhiwei.li/blog/%E7%BC%96%E8%AF%91android_emualtor.html
https://zhiwei.li/blog/android%E6%A8%A1%E6%8B%9F%E5%99%A8rom%E7%BC%96%E8%AF%91.html

6. v2ray

via:

sudo docker run -d --restart=always --privileged --network=host --name=v2raya -v /etc/v2raya:/etc/v2raya mzz2017/v2raya

7. repo sync issue

solved via(python2->python3):

curl https://storage.googleapis.com/git-repo-downloads/repo-1 > ~/bin/repo
chmod a+x ~/bin/repo
python3 ~/bin/repo init -u git@....

8. build blissOS

via:

sudo apt-get install git-core gnupg flex bison maven gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386  lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip squashfs-tools python-mako libssl-dev ninja-build lunzip syslinux syslinux-utils gettext genisoimage gettext bc xorriso libncurses5
sudo apt-get install -y openjdk-8-jdk
repo init -u https://github.com/BlissRoms-x86/manifest.git -b p9.0-x86
repo sync -j24 -c --no-tags --no-clone-bundle
Next step is to download the proprietary files from ChromeOS:
mkdir vendor/bliss_priv/proprietary
mkdir vendor/bliss_priv/source
bash build-x86.sh -r android_x86_64-userdebug
After that, you can build your release file:
bash build-x86.sh android_x86_64-userdebug (to build the userdebug version for x86_64 CPUs)