rovo89 / XposedInstaller

3.89k stars 1.51k forks source link

Detect if logcat is disabled on the device #415

Open rovo89 opened 6 years ago

rovo89 commented 6 years ago

There seem to be some devices which disable logcat by default. There should at least be a warning about this when viewing the log file.

@wanam You mentioned this problem on another issue. Do you have more details, like how to check if logcat is indeed disabled? A more generic way would be to always show this warning if the log is empty.

wanam commented 6 years ago

I noticed this issue on a Huawei device last year, unfortunately i don't own one anymore so i can look for something we can relay on, the last time i checked, the logcat was not empty, but it was logging a very few lines.

If someone can upload the app that is fired by the hidden Huawei code ##2846579## , maybe we can analyze the activity "ProjectMenu", and see if could get a generic way to check that. log1-300x291

rovo89 commented 6 years ago

Alright, thanks! I'm still unsure whether this should be generic or rather targeting specific devices/vendors. This page shows that also an LeTV device is affected: https://stackoverflow.com/questions/18124334/huawei-logcat-not-showing-the-log-for-my-app

Here's a comment which mentions two paths in /sys/kernel which might affect it: https://stackoverflow.com/a/4312038 None of those exists on Genymotion, but maybe they exist on affected devices.

Ideally, I think there should be a warning in Xposed Installer if the log is empty and there should be an easy way for the user to correct it - maybe even with a button that directly opens the configuration dialog.

If somebody with an affected device reads this and can contribute additional information (like an Intent to open the dialog), that would be great. 😃