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

TestAndroidOutput fails to read logcat on ARM64 emulator, API levels 21-22 #771

Closed
mhsmith opened this issue Jan 17, 2023 · 1 comment
Closed
Labels

Comments

@mhsmith
Copy link
Member

mhsmith commented Jan 17, 2023

Logs:

13:00:20.733 Thread-176       W  type=1400 audit(0.0:17): avc: denied { execute } for name="logcat" dev="vda" ino=273 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:logcat_exec:s0 tclass=file permissive=0
...
13:00:22.291 python.stderr    W  ERROR: test_bytes (chaquopy.test.android.test_stream.TestAndroidOutput)
13:00:22.291 python.stderr    W  ----------------------------------------------------------------------
13:00:22.292 python.stderr    W  Traceback (most recent call last):
13:00:22.292 python.stderr    W    File "/data/data/com.chaquo.python.demo3/files/chaquopy/AssetFinder/app/chaquopy/test/android/test_stream.py", line 23, in setUp
13:00:22.292 python.stderr    W      self.logcat_process = subprocess.Popen(
13:00:22.292 python.stderr    W    File "stdlib/subprocess.py", line 858, in __init__
13:00:22.292 python.stderr    W    File "stdlib/subprocess.py", line 1704, in _execute_child
13:00:22.292 python.stderr    W  PermissionError: [Errno 13] Permission denied: 'logcat'

It works fine on x86 and x86_64 with API level 21, and on ARM64 with API level 23 and higher.

Since this is apparently a bug in the emulator's SELinux configuration, and there's no other way for an app to read its own logs, we won't be able to fix this issue. But I'll leave it open for visibility for as long as we support these API levels.

@mhsmith
Copy link
Member Author

mhsmith commented Jul 28, 2024

We will desupport these API levels in the next version of Chaquopy (#718).

@mhsmith mhsmith closed this as not planned Won't fix, can't repro, duplicate, stale Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant