Android Studio debugging of native app with SELinux policies set to permissive - android

I have a native Android app that needs to access one of the device's I2C buses. From what I read here, one needs to set the SELinux policies to "permissive" in order to do so.
However, when I do that, I start getting this error when I try to launch Android Studio's native debugger:
Error while starting native debug session: com.intellij.execution.ExecutionException: Unsupported device. This device cannot be debugged using the native debugger. See log file for details.
I checked the log but couldn't find anything relevant in there.
Any idea if there's an incompatibility between having the SELinux policies set to "permissive" and running the native debugger on Android Studio?

Related

Logback to capture all logs displayed in adb logcat

Currently logback captures all the logs to a file that are mentioned via error, debug etc.
Apart from this logs, in Android Studio logcat we could we other logs that are provided by other apps or by the Android System.
Is there a mechanism to include all the logs that are available in adb logcat to the logs created using logback?
Unfortunately, no :
For security reason, an application can only see its own logcat, since Android 4.1 (API 16) there is no way for it to access logs from other applications or from the system.
While it is possible to add logback events to the logcat with a suitable appender, the other way around is not easy. There is no API to access the logcat events. The only solution would be for the application to launch the adb logcat command (without the usual -d flag), continuously read its output and create logback events.

Android Things {AppName} has stopped - get logs

I'm running a build from the Android Things Console built with several custom apks
One of the apps is failing with "{AppName}" has stopped. Open app again" The cause appears isolated to only one Configuration.
I'm trying to get to root cause, normally I would run "adb logcat" to view full details with android. Is adb logcat support with Android Things build? Is a mechanism such as logcat available in Android Things when built with a build from the Android Things Console? If not, is there an alternative?
ADB is available on development images of Android Things, not on production builds. You can change which one in the console. You can also add crash reporting tools like Crashlytics which will provide crash reports for you.

Vuforia tracking works in Editor but not on Android Device

I am using Unity 2018.2.17f1 and Vuforia Unity Extension Version 7.5.26 and build a App tracking an Cylindric Image Target.
The tracking is working fine in Editor, however when I try to run it on my phone the tracking does not work.
When looking at the Log output of the phone I see: Vuforia initialization successful
and there are no errors and also no Message about any success of tracking ...
Anyone had a simmilar issue?
Sometimes it may cause due to android versions. Newer API levels require runtime permissions. Grant camera permission and kill the app and then run the app, bit weird but it may work.

How can I fix Android app launch stopped error?

I have installed my android app in my device. But getting "Unfortunately, app has stopped."
How can I debug the installed app? Is it possible to debug the app directly installed in the device?
Since code is not available with me
You can't connect debugger to an application if it uses a release build type where all of the information necessary for debugging is stripped out
(true for apps from play market).
If you don't want to use a debugger but just to see logs you may see log in android studio or just by running adb logcat in terminal.
Android Studio 3.0 also has a feature of Profile and Debug Pre-built APKs but only if they were built with debugging enabled

Cocos game Application Crash offline log

We build Android-based game Apps on the Cocos2d platform using C++ and JavaScript. App uses no internet.I can able to see the crash report when we use the android studio to debug. but how to catch the log/report when the app crashes on the mobile device when it's not connected to Computer.
Use crash reporter, which allows your to view crash-related information on the web when a crash occurs. It's easy to integrated into your project by reference each document.
You can use Crashlytics by Fabric (recommended)
The most powerful, yet lightest weight crash reporting solution. You can easily integrate with your app through gradle and get crash report.
Enable NDK crash reporting in your project, for more information check this thread.
BugSense

Categories

Resources