Open falkor2k15 opened 3 years ago
hey falkor I'm really a noob so I understand about 10% of what you saying but the way I told you to get the sound working i linux deploy still works for me.
buy the way where you from? out of topic though because if you can get a oneplus 6( as your looking for a mobile now, it's two years old but still have great hardware) you can run android/linux in dual boot, so you can still play with deploy in android and have a taste what can be a linux phone, for more information check the postmarketos project or for less information the mobian project.
Sound works for you in Linux Deploy? It sure doesn't work for me, and according to one source getting audio working in CHROOT has been a long-standing problem. I heard the issue can be device specific, and people have had more luck with XSDL output whereas I am using VNC. Either way I have been unsuccessful, and there evidently hasn't been any discussion about (pulse) audio/LD in a number of years.
I am from London, and there are Android phones littered all over the place - but you cannot rely on there being any particular model available, such as the OnePlus 6 unless you order online. Therefore, although I love your idea, I try to find one solution fits all - and since root is seldom available without extra tools, Linux Deploy is more a secondary consideration compared to PROOT, which may be more the viable way to go - complete with guaranteed working sound.
OK I got audio to work with XSDL X server - just had to increment the port number by 1! I also found out that XSDL has graphics acceleration, so can run more apps compared to VNC, such as Pinta. Perhaps more desktop environments will also display; PROOT might even work with XSDL too - with or without graphics acceleration? Shame the app is a bit clunky though and hijacks the Android mouse cursor.
like I write in https://github.com/meefik/linuxdeploy/issues/1297 you can use termux (I recomend from fdroid), then you need put to /etc/profile
this: export PULSE_SERVER=127.0.0.1
then turn of linux.
go to termux and install pulseaudio pkg install pulseaudio
, then you put theese comand (every times before you start linux - I have this in script):
pulseaudio --start --exit-idle-time=-1
pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1
the original recomend auth-anonymous=1
too, but I run it without this command......, and finaly run linux and enjoy it!
If you guys also need to record audio, see this:
https://github.com/termux/termux-app/issues/2871#issuecomment-1718978515
The only problem is how to let pulseaudio take termux microphone as mic_input remotely
Install LinuxDeploy apk; Install busybox apk, install busybox payloads, reboot your phone
Select Ubuntu, bionic, File, image size 60GB, set username and password, enable ssh, enable vnc gui, select xfce. Hit the install button, hit the configure button, hit the start button.
Install "termux" apk, install "com.termux.api" apk
In termux
pkg update
pkg install pulseaudio
pkg install termux-api
termux-microphone-record -l 3
pulseaudio --start --exit-idle-time=-1
pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1
pacmd load-module module-sles-source
pactl load-module module-sles-source
In LinuxDeploy system, add "export PULSE_SERVER=127.0.0.1" to the end of "/etc/profile", do a reboot
Use fakestandby apk to make sure the network is always on:
Now when you use vnc enter your linux system, you should be able to use microphone and speaker without any problems.
https://yingshaoxo.blogspot.com/2023/09/how-to-let-linuxdeploy-desktop-audio.html
I looked at some old methods from 2015/2017, but none seem to be working now.
Does anyone have an up-to-date method that's confirmed to work with recent Android devices/security?
Incidentally, it works with PROOT: Termux is setup as a Pulse Audio server (built in) and then the proot distro is set to export audio to the localhost, i.e. the Termux server.
Of course, Linux Deploy cannot send it's audio to Termux unless we can perhaps find a way to run LD CHROOT through Termux instead of using the Start button in the LD app? Other Android apps acting as Pulse Audio server (or as somewhere to "stream" the audio to so to speak), such as Simple Protocol or PulseDroid no longer seem to work for whatever reason(s).
Besides Pulse Audio there's also some Alsa utils, but those methods seem too outdated. XSDLserver apparently has a built in Pulse Audio server like Termux, but is no longer working out of the box.