Change a bunch of names from "appsupport" to "aliendalvik"
parent
9c0ac546cf
commit
e4cadd5342
|
@ -20,7 +20,7 @@ Aliendalvik is a complex piece of software and requires lots of setup to run. Th
|
|||
- Build and install patched mobile-mutter and libwayland, see patches/
|
||||
- Get the vanilla (not GApps) android system.img and vendor.img from Waydroid
|
||||
|
||||
3. Copy all the aliendalvik config, binaries and libraries to the target device, see files.txt
|
||||
3. Copy all the aliendalvik config, binaries and libraries to the target device, see files.txt again
|
||||
|
||||
4. Create necessary users, groups, and configure a few more things on the device, see setup-environment.txt
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ if [ "${active_wayland_user}" == "" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
data_dir="/home/${active_wayland_user}/.local/share/appsupport/data/"
|
||||
data_dir="/home/${active_wayland_user}/.local/share/aliendalvik/data/"
|
||||
|
||||
rm -f ${data_dir}/alien_boot_completed
|
||||
|
||||
|
@ -43,9 +43,9 @@ rm -f ${data_dir}/alien_boot_completed
|
|||
echo "alien bootup finished, running post startup"
|
||||
|
||||
# use the commands from alien-post-startup.sh script here
|
||||
lxc-attach --name=aliendalvik --lxcpath=/tmp/appsupport -- /system/bin/sh -c ""
|
||||
lxc-attach --name=aliendalvik --lxcpath=/tmp/aliendalvik -- /system/bin/sh -c ""
|
||||
|
||||
lxc-attach --name=aliendalvik --lxcpath=/tmp/appsupport -- /system/bin/sh -c "source /etc/mkshrc;
|
||||
lxc-attach --name=aliendalvik --lxcpath=/tmp/aliendalvik -- /system/bin/sh -c "source /etc/mkshrc;
|
||||
# enable gesture navigation
|
||||
cmd overlay disable com.android.internal.systemui.navbar.gestural
|
||||
cmd overlay enable com.android.internal.systemui.navbar.gestural"
|
||||
|
@ -54,7 +54,7 @@ cmd overlay enable com.android.internal.systemui.navbar.gestural"
|
|||
fi
|
||||
) &
|
||||
|
||||
lxc-start --rcfile=/tmp/appsupport/aliendalvik/config --lxcpath=/tmp/appsupport -n aliendalvik -F
|
||||
lxc-start --rcfile=/tmp/aliendalvik/config/config --lxcpath=/tmp/aliendalvik -n aliendalvik -F
|
||||
|
||||
if [ "$(cat ${data_dir}/alien_boot_completed)" = "2" ]; then
|
||||
echo "alien crashed"
|
||||
|
|
|
@ -43,20 +43,20 @@ while true; do
|
|||
break
|
||||
done
|
||||
|
||||
chown ${active_wayland_user}:appsupport-wayland /run/user/${active_wayland_uid}/wayland-0
|
||||
chown ${active_wayland_user}:aliendalvik-wayland /run/user/${active_wayland_uid}/wayland-0
|
||||
chmod 775 /run/user/${active_wayland_uid}/wayland-0
|
||||
|
||||
rm -f /tmp/appsupport/aliendalvik/*
|
||||
mkdir -p /tmp/appsupport/aliendalvik/
|
||||
cp -r /opt/alien/config/* /tmp/appsupport/aliendalvik/
|
||||
rm -f /tmp/aliendalvik/config/*
|
||||
mkdir -p /tmp/aliendalvik/config/
|
||||
cp -r /opt/alien/lxc-config/* /tmp/aliendalvik/config/
|
||||
|
||||
sed -i "s/__UID__/${active_wayland_uid}/g" /tmp/appsupport/aliendalvik/10-bsp_config
|
||||
sed -i "s/__UID__/${active_wayland_uid}/g" /tmp/appsupport/aliendalvik/20-privilege_config
|
||||
sed -i "s/__UID__/${active_wayland_uid}/g" /tmp/aliendalvik/config/10-bsp_config
|
||||
sed -i "s/__UID__/${active_wayland_uid}/g" /tmp/aliendalvik/config/20-privilege_config
|
||||
|
||||
mkdir -p /home/${active_wayland_user}/.local/share/appsupport/data/
|
||||
chown ${active_wayland_user}:${active_wayland_user} /home/${active_wayland_user}/.local/share/appsupport/
|
||||
mkdir -p /home/${active_wayland_user}/.local/share/aliendalvik/data/
|
||||
chown ${active_wayland_user}:${active_wayland_user} /home/${active_wayland_user}/.local/share/aliendalvik/
|
||||
|
||||
data_dir="/home/${active_wayland_user}/.local/share/appsupport/data/"
|
||||
chown appsupport-root:appsupport-root ${data_dir}
|
||||
data_dir="/home/${active_wayland_user}/.local/share/aliendalvik/data/"
|
||||
chown aliendalvik-root:aliendalvik-root ${data_dir}
|
||||
|
||||
sed -i "s|__DATA_DIR__|${data_dir}|g" /tmp/appsupport/aliendalvik/10-bsp_config
|
||||
sed -i "s|__DATA_DIR__|${data_dir}|g" /tmp/aliendalvik/config/10-bsp_config
|
||||
|
|
|
@ -39,7 +39,7 @@ if [ "$1" == "start" ]; then
|
|||
#
|
||||
# systemd should ensure that we're always started and stopped in sync with
|
||||
# aliendalvik.service (because of BindsTo= dependency)
|
||||
while [ "$(lxc-attach --name=aliendalvik --lxcpath=/tmp/appsupport -- /system/bin/getprop hwservicemanager.ready)" != "true" ]; do
|
||||
while [ "$(lxc-attach --name=aliendalvik --lxcpath=/tmp/aliendalvik -- /system/bin/getprop hwservicemanager.ready)" != "true" ]; do
|
||||
echo "User services startup waiting for hwservicemanager in container"
|
||||
sleep 1
|
||||
done
|
||||
|
|
|
@ -12,7 +12,7 @@ Restart=never
|
|||
RestartSec=3
|
||||
RestartPreventExitStatus=32
|
||||
ExecStart=/usr/bin/aliendalvik
|
||||
ExecStop=/usr/bin/lxc-attach --name=aliendalvik --lxcpath=/tmp/appsupport -- /system/bin/reboot -p
|
||||
ExecStop=/usr/bin/lxc-attach --name=aliendalvik --lxcpath=/tmp/aliendalvik -- /system/bin/reboot -p
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical.target
|
||||
|
|
|
@ -19,7 +19,10 @@
|
|||
set "PackageBlacklistFiles=/etc/apkd/app-blacklist"
|
||||
set "NotifBlacklistFiles=/etc/apkd/notif-blacklist"
|
||||
|
||||
- edit LXC configuration in /tmp/appsupport/aliendalvik/10-bsp_config
|
||||
- edit LXC configuration in /opt/alien/lxc-config/config
|
||||
replace the paths with /tmp/aliendalvik/config/
|
||||
|
||||
- edit LXC configuration in /opt/alien/lxc-config/10-bsp_config
|
||||
replace "/dev/puddlejumper" with "/dev/binder"
|
||||
replace "/dev/hwpuddlejumper" with "/dev/hwbinder"
|
||||
replace "/dev/vndpuddlejumper" with "/dev/vndbinder"
|
||||
|
@ -30,7 +33,7 @@
|
|||
comment out /odm/lib, /odm/lib64, /system/etc/apns-conf.xml, /dev/alien_video32, /dev/alien_video33 and /dev/video mounts
|
||||
comment out /home/defaultuser, /home/defaultuser/android_storage and /run/media/defaultuser mounts
|
||||
|
||||
- edit LXC configuration in /tmp/appsupport/aliendalvik/20-privilege_config
|
||||
- edit LXC configuration in /opt/alien/lxc-config/20-privilege_config
|
||||
# add a line to start properly on apparmor devices
|
||||
lxc.apparmor.profile = unconfined
|
||||
|
||||
|
@ -40,10 +43,10 @@
|
|||
# replace "lxc.idmap = g 100000 100000 1" line with
|
||||
lxc.idmap = g 100000 __UID__ 1
|
||||
|
||||
- edit LXC configuration in /tmp/appsupport/aliendalvik/30-net_config
|
||||
- edit LXC configuration in /opt/alien/lxc-config/30-net_config
|
||||
comment out tmpfs mount to "sys/fs/selinux"
|
||||
|
||||
- edit android props in /tmp/appsupport/aliendalvik/generated_props
|
||||
- edit android props in /opt/alien/lxc-config/generated_props
|
||||
comment out these props: ro.vendor.extension_library, ro.hardware.vulkan, ro.board.platform
|
||||
update these props "ro.alien.no_camera=1", "ro.alien.no_soundtrigger=1", "ro.com.android.mobiledata=false"
|
||||
when you're on a pinephone pro, set "ro.opengles.version=196609"
|
||||
|
|
|
@ -96,6 +96,7 @@ aliendalvik build props + system and vendor image:
|
|||
|
||||
|
||||
runtime generated LXC config:
|
||||
-> copy these files into /opt/alien/lxc-config/ on the new device
|
||||
|
||||
/tmp/appsupport/aliendalvik/10-bsp_config
|
||||
/tmp/appsupport/aliendalvik/20-privilege_config
|
||||
|
|
16
running.txt
16
running.txt
|
@ -29,7 +29,7 @@
|
|||
chmod 777 /dev/dri/card0
|
||||
|
||||
- chmod wayland socket
|
||||
chown YOUR_USER:appsupport-wayland /run/user/YOUR_UID/wayland-0
|
||||
chown YOUR_USER:aliendalvik-wayland /run/user/YOUR_UID/wayland-0
|
||||
chmod 775 /run/user/YOUR_UID/wayland-0
|
||||
|
||||
- setup the waydroid vendor blob with another overlayfs (as root)
|
||||
|
@ -51,16 +51,20 @@
|
|||
- optional: copy overlay for gesture navigation from waydroid into alien (as root)
|
||||
cp -r /tmp/waydroid-system/system/product/overlay /opt/alien/rootfs/product/
|
||||
|
||||
- copy lxc-config into /tmp/aliendalvik/config
|
||||
mkdir -p /tmp/aliendalvik/config/
|
||||
cp /opt/alien/lxc-config/* /tmp/aliendalvik/config/
|
||||
|
||||
- set data dir in LXC config
|
||||
nano /tmp/appsupport/aliendalvik/10-bsp_config
|
||||
nano /tmp/aliendalvik/config/10-bsp_config
|
||||
# set __DATA_DIR__ to /opt/alien/data
|
||||
|
||||
- set UID in LXC config
|
||||
nano /tmp/appsupport/aliendalvik/10-bsp_config
|
||||
nano /tmp/aliendalvik/config/10-bsp_config
|
||||
# set __UID__ to your UID in this line
|
||||
lxc.mount.entry = /run/user/__UID__/wayland-0 run/display/wayland-0 none bind,nodev,nosuid,create=file 0 0
|
||||
|
||||
nano /tmp/appsupport/aliendalvik/20-privilege_config
|
||||
nano /tmp/aliendalvik/config/20-privilege_config
|
||||
# set __UID__ to your UID (this maps your UID to UID 100000 inside the container)
|
||||
lxc.idmap = u 100000 __UID__ 1
|
||||
lxc.idmap = g 100000 __UID__ 1
|
||||
|
@ -69,7 +73,7 @@
|
|||
/usr/lib/lxc/lxc-net start
|
||||
|
||||
- now check if lxc wants to startup
|
||||
/usr/bin/lxc-start --rcfile=/tmp/appsupport/aliendalvik/config --lxcpath=/tmp/appsupport/aliendalvik -n aliendalvik -F
|
||||
/usr/bin/lxc-start --rcfile=/tmp/aliendalvik/config/config --lxcpath=/tmp/aliendalvik -n aliendalvik -F
|
||||
# shouldn't error out immediately, but should crash after like 30 seconds
|
||||
# there should be stuff in /opt/alien/data now, and logs in /opt/alien/data/logcats/log
|
||||
# if you got to this point, you're very close :)
|
||||
|
@ -102,7 +106,7 @@
|
|||
|
||||
- optional: use gesture navigation in android to have swipe-back gesture
|
||||
# go into container and disable -> enable the overlay
|
||||
lxc-attach --name=aliendalvik --lxcpath=/tmp/appsupport -- /system/bin/sh
|
||||
lxc-attach --name=aliendalvik --lxcpath=/tmp/aliendalvik -- /system/bin/sh
|
||||
cmd overlay disable com.android.internal.systemui.navbar.gestural
|
||||
cmd overlay enable com.android.internal.systemui.navbar.gestural
|
||||
|
||||
|
|
|
@ -1,32 +1,34 @@
|
|||
- enable systemd-resolved to actually answer queries on port 53 so that android can ask dns queries
|
||||
# add this line to /etc/systemd/resolved.conf
|
||||
DNSStubListenerExtra=127.0.0.1
|
||||
DNSStubListenerExtra=127.0.0.1^
|
||||
# then restart systemd-resolved
|
||||
sudo systemctl restart systemd-resolved
|
||||
|
||||
- setup users/groups needed for aliendalvik
|
||||
# create user+group that gets permissions for wayland-socket
|
||||
useradd -u 501000 -U appsupport-wayland
|
||||
groupmod -g 501000 appsupport-wayland
|
||||
useradd -u 501000 -U aliendalvik-wayland
|
||||
groupmod -g 501000 aliendalvik-wayland
|
||||
|
||||
# create appsupport-root user with UID and GID 500000
|
||||
useradd -u 500000 -U appsupport-root
|
||||
groupmod -g 500000 appsupport-root
|
||||
# create aliendalvik-root user with UID and GID 500000
|
||||
useradd -u 500000 -U aliendalvik-root
|
||||
groupmod -g 500000 aliendalvik-root
|
||||
|
||||
# own data directory
|
||||
mkdir -p /opt/alien/data/
|
||||
chown -R appsupport-root:appsupport-root /opt/alien/data/
|
||||
chown -R aliendalvik-root:aliendalvik-root /opt/alien/data/
|
||||
|
||||
# set subuids (no clue how correct this actually is, but works)
|
||||
# might have to create those files
|
||||
touch /etc/subuid
|
||||
touch /etc/subgid
|
||||
usermod --add-subuids 100000-100000 --add-subgids 100000-100000 root
|
||||
usermod --add-subuids 100000-100000 --add-subgids 100000-100000 appsupport-root
|
||||
usermod --add-subuids 100000-100000 --add-subgids 100000-100000 aliendalvik-root
|
||||
usermod --add-subuids 500000-599999 --add-subgids 500000-599999 root
|
||||
usermod --add-subuids 500000-599999 --add-subgids 500000-599999 appsupport-root
|
||||
usermod --add-subuids 500000-599999 --add-subgids 500000-599999 aliendalvik-root
|
||||
usermod --add-subuids 600001-700000 --add-subgids 600001-700000 root
|
||||
usermod --add-subuids 600001-700000 --add-subgids 600001-700000 appsupport-root
|
||||
usermod --add-subuids 600001-700000 --add-subgids 600001-700000 aliendalvik-root
|
||||
|
||||
usermod --add-subuids YOUR_UID-YOUR_UID --add-subgids YOUR_UID-YOUR_UID root
|
||||
|
||||
- symlink from /usr/lib to /usr/lib64 (alienaudioservice hardcodes some paths to lib64 :/)
|
||||
ln -s /usr/lib /usr/lib64
|
||||
|
|
Loading…
Reference in New Issue