Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lineage 14.1 MAC-adress and hangs #480

Closed
thogh opened this issue Oct 7, 2019 · 6 comments
Closed

Lineage 14.1 MAC-adress and hangs #480

thogh opened this issue Oct 7, 2019 · 6 comments

Comments

@thogh
Copy link

thogh commented Oct 7, 2019

Hi there!
First of all: Thanks a lot for this very useful thing! I have it in daily use and it all in all works great on a raspberry pi and x84.

On Android I discovered two (more or less minor) problems: I am trying to reuse old hardware as snapclients. On those only lineage 14.1 (Android 7.1, Kernel 3.4.0) is available, which is running smoothly. But unfortunately the snapcast-client is not able to read the MAC-adress properly and it also keeps hanging time by time on both of my android devices. Both clients are going permanently on- and offline.

Concerning the MAC-issue the adress is read as 00:00:00:00:00:00 for both devices and dmesg says

type=1400 audit(1570440166.391:183528): avc: denied { read } for pid=30738 comm="snapclient" name="address" dev="sysfs" ino=18836 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

Since the client seems to be unable to read some values, I was wondering if this is SELinux related?

Concerning the 'hanging' this problem is better described as 'stop running'. It usually happens after restarting the snapserver and also after some time of idle states (> 1 hour). Hitting the app's 'stop' and than the 'play' button solves this, but it has to be done manually (what is not such a big thing). There is a notification saying

create outputmix failed sl_result_memory_failure

Maybe there is a way to settle this? Are there any configuration-files somewhere in the android-system which could/should be edited?

Best,
tho

@thogh
Copy link
Author

thogh commented Oct 10, 2019

In the meantime I figured that setting the SELinux state to "permissive" makes it possible to display the MAC-Adresses correctly.

The issue concerning the hangs (see above) remains.Mostly it happens when the device was asleep (display off). I also tried installing the app as a system app, but this did not change the behaviour.

It would be great if this could be settled, since this device is meant to receive cron-based audio-signals in the morning...

Kind regards,
thogh

@badaix
Copy link
Owner

badaix commented Oct 10, 2019

Regarding SELinux in general (not related to the muting): have you seen any other avc's?
The MAC address was always problematic on Android, now these system calls are even blocked, so this could be an issue for other phones too.
Btw: have you tried the latest version (0.15.1)? This version adds some special foreground service permission, maybe it helps
.

@badaix
Copy link
Owner

badaix commented Oct 10, 2019

I've just checked and noticed that on my Android 9 phone I'm also having MAC 00:00:00:00:00.
So there's a good chance that this will be fixed soon.

@thogh
Copy link
Author

thogh commented Oct 10, 2019

Thank you very much for your reply! I really appreciate that!

I do use 0.15.1.
These avcs are shown in dmesg (SELinux in permissive mode):

[19289.719329] type=1400 audit(1570713062.916:42): avc: denied { ioctl } for pid=2285 comm="snapclient" path="socket:[57239]" dev="sockfs" ino=57239 ioctlcmd=8927 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=tcp_socket permissive=1 [19831.450653] type=1400 audit(1570713604.644:43): avc: denied { read } for pid=16653 comm="RenderThread" name="gpuclk" dev="sysfs" ino=10104 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1

The (obviously not related) muting/unmuting – online/offline issue now occurs when I restart my musicserver (mopidy in raspbian butcher on a pi4). For maintenance reasons the server restarts periodically. While this does not affect my x86 machine, the android devices run into online/offline-loop.

I believe that this did not happen on one device which was running a newer kernel / android-version (Oreo or above; but I do not have this device anymore, so I cannot reproduce this). By now I am running the client on a Nexus 7 (flo) and a Samsung J3 (both Lineage 14.1).

If it was a little easier I would set a cronjob to restart the app twice a day or so, but I am not experienced in the android environment (e.g. starting apps with its activities from the command line). So maybe it could become a future option within the app to auto-restart the app when it throws out failures (or to shut it down / stop it when errors keep occurring)?

Thanks again for all your effort! This is a great tool!

@badaix
Copy link
Owner

badaix commented Dec 4, 2019

I'm having similary problems on my Samsung S5: once the server is restarted I'm getting error messages from OpenSL (the sound library) while opening the device (I don't remember the exact message), but I remember that I tried to fix this when porting the Snapcast client to Android years ago.
Now I've learned that there is a new audio library AAudio introduced in Oreo and that there is an officially recommended abstraction layer Oboe.
When I've time (probably not this year), I will have a deeper look at this library.

@badaix
Copy link
Owner

badaix commented Mar 4, 2020

should be fixed with Snapdroid 0.19

@badaix badaix closed this as completed Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants