Skip to content

Commit a01d083

Browse files
feat: Add support for pulseaudio server exec
1 parent 528f16d commit a01d083

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
DIE() { echo -e "${@}"; exit 1 ;:;}
44
GWARN() { echo -e "\e[90m${*}\e[0m";:;}
55

6-
apt install -y jq wget proot pv
6+
apt install -y jq wget proot pv pulseaudio
77
[[ ! -d udroid/src ]] && {
88
echo "udroid/src not found"
99
exit 1

udroid/src/udroid.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ login() {
279279
local no_kill_on_exit=false
280280
local no_cwd_active_directory=false
281281
local no_cap_last_cap=false
282+
local no_pulseserver=false
282283
local no_fake_root_id=false
283284
local fix_low_ports=false
284285
local make_host_tmp_shared=true # its better to run with shared tmp
@@ -362,6 +363,9 @@ login() {
362363
--no-cap-last-cap)
363364
no_cap_last_cap=true; shift
364365
;;
366+
--no-pulseserver)
367+
no_pulseserver=true; shift
368+
;;
365369
--no-kill-on-exit)
366370
no_kill_on_exit=true; shift
367371
;;
@@ -603,6 +607,13 @@ login() {
603607
set -- "-p" "$@"
604608
fi
605609

610+
# [CONDITIONAL]: pulseaudio server for audio output (speaker)
611+
if ! no_pulseserver; then
612+
pulseaudio --start \
613+
--load="module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" \
614+
--exit-idle-time=-1
615+
fi
616+
606617
exec proot "$@"
607618
else
608619
ELOG "ERROR: $distro not found or installed"

0 commit comments

Comments
 (0)