3 echo "Generating device properties"
4 rm -f generate
-props.sh
5 wget https
://github.com
/Anbox
-halium/anbox
-halium/raw
/lineage
-17.1
/scripts
/generate
-props.sh
6 chmod +x generate
-props.sh
9 echo "Asking for root access"
16 # remove LD_LIBRARY_PATH from /etc/environment to make life easier
17 if ! grep -q "#LD_LIBRARY_PATH" /etc/environment; then
18 sed -i -e "s/^LD_LIBRARY_PATH/#LD_LIBRARY_PATH/" /etc/environment
21 echo "Installing packages"
23 apt install -y lxc1 qtwayland5 qml-module-qtwayland-compositor
24 apt install -y libgbinder sensorfw-qt5 libsensorfw-qt5-plugins || touch NO_SENSORS
25 if [ ! -f NO_SENSORS ]; then
26 rm anbox-sensors_0.1.0_arm64.deb
27 wget https://github.com/Anbox-halium/anbox-sensors/releases/download/v0.1.0/anbox-sensors_0.1.0_arm64.deb
28 dpkg -i anbox-sensors_0.1.0_arm64.deb || touch NO_SENSORS
31 echo "Geting anbox images"
32 if [ -f anbox_arm64_system.img ]; then
33 mv anbox_arm64_system.img anbox_arm64_system.img.bak
34 mv anbox_arm64_vendor.img anbox_arm64_vendor.img.bak
36 rm -f latest-raw-images.zip
37 wget https://build.lolinet.com/file/lineage/anbox_arm64/latest-raw-images.zip
38 unzip latest-raw-images.zip
40 echo "Geting latest runner script"
41 rm -f run-container.sh
42 wget https://github.com/Anbox-halium/anbox-halium/raw/lineage-17.1/scripts/run-container.sh
43 chmod +x run-container.sh
44 rm -f stop-container.sh
45 wget https://github.com/Anbox-halium/anbox-halium/raw/lineage-17.1/scripts/stop-container.sh
46 chmod +x stop-container.sh
48 wget https://github.com/Anbox-halium/anbox-halium/raw/lineage-17.1/scripts/anbox-net.sh
51 if [ -f anbox.prop ]; then
52 mv anbox.prop anbox.prop.bak
54 if grep -q "anbox.display_height" anbox.prop.bak; then
55 grep "anbox.display_height" anbox.prop.bak >> anbox.prop
57 echo "NOTE: Edit /home/anbox/anbox.prop based on your device screen resolution"
58 echo "anbox.display_height=1920" >> anbox.prop
60 if grep -q "anbox.display_width" anbox.prop.bak; then
61 grep "anbox.display_width" anbox.prop.bak >> anbox.prop
63 echo "NOTE: Edit /home/anbox/anbox.prop based on your device screen resolution"
64 echo "anbox.display_width=1080" >> anbox.prop
66 echo "${GRALLOC_PROP}" >> anbox.prop
67 echo "${EGL_PROP}" >> anbox.prop
68 echo "${MEDIA_PROFILES_PROP}" >> anbox.prop
69 echo "${CCODEC_PROP}" >> anbox.prop
70 echo "${EXT_LIB_PROP}" >> anbox.prop
71 echo "${VULKAN_PROP}" >> anbox.prop
72 echo "${DPI_PROP}" >> anbox.prop
73 echo "${GLES_VER_PROP}" >> anbox.prop
74 echo "${XDG_PROP}" >> anbox.prop
75 echo "${WAYLAND_DISP_PROP}" >> anbox.prop
76 echo "${PULSE_PROP}" >> anbox.prop
77 if [ -f NO_SENSORS ]; then
78 echo "anbox.stub_sensors_hal=1" >> anbox.prop
82 echo "Geting latest lxc config"
83 mkdir /var/lib/lxc/anbox
86 wget https://github.com/Anbox-halium/anbox-halium/raw/lineage-17.1/lxc-configs/config
88 if ! grep -q "module-native-protocol-unix auth-anonymous=1" /etc/pulse/touch-android9.pa; then
89 echo "Pulseaudio config patching"
90 sed -i "s/module-native-protocol-unix/module-native-protocol-unix auth-anonymous=1/" /etc/pulse/touch-android9.pa
93 if [ ! -f /etc/gbinder.d/anbox.conf ]; then
94 echo "Adding gbinder config"
97 wget https://github.com/Anbox-halium/anbox-halium/raw/lineage-17.1/gbinder/anbox.conf
100 mount -o remount,ro /
102 echo "Going back to phablet user"
106 echo "Installing anbox launcher"
107 rm anbox.rudiimmer_1.0_all.click
108 wget https
://build.lolinet.com
/file
/lineage
/anbox_arm
64/anbox.rudiimmer_1.0_all.click
109 pkcon
install-local anbox.rudiimmer_1.0_all.click
--allow-untrusted
111 echo "Restarting Pulseaudio service"
112 initctl
--user stop pulseaudio
113 initctl
--user start pulseaudio
115 echo "Installing Finished!"
116 echo "Run anbox container with \"sudo /home/anbox/run-container.sh\" on terminal"
117 echo "Stop anbox container with \"sudo /home/anbox/stop-container.sh\" on terminal"