Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android app using android.permission.READ_LOGS - is that impolite?

I have an app that is available from the Android Market. Some users have asked for a way of debugging when things don't work out as expected. I have been looking into adding a menu item that will display the output of


    Process mLogcatProc = null;
    BufferedReader reader = null;
    mLogcatProc = Runtime.getRuntime().exec(
        new String[] {"logcat", "-d", "AndroidRuntime:E BDtN:V *:S" });
    reader = new BufferedReader(new InputStreamReader (mLogcatProc.getInputStream()));
    String line;
    ArrayList listOfLogLines = new ArrayList();
    while ((line = reader.readLine()) != null)
    {
        listOfLogLines.add(line);
    }

Basically I am extracting the parts of the Log.* lines that my app has been writing and the errors that the AndroidRuntime has been throwing.

I have a working prototype that will display to the user the contents of the part of the log that I have extracted in a ListView.

I will have to add android.permission.READ_LOGS to the AndroidManifest.xml file in order for my app to have read access to the log, and this of course will be information that the user will be prompted with before installing. And the question is if this is considered impolite, dangerous or otherwise out of the ordinary. Will it keep users from installing?

like image 686
Jbruntt Avatar asked Jul 24 '10 21:07

Jbruntt


People also ask

Is it safe to give app permissions?

Android allows “normal” permissions — such as giving apps access to the internet — by default. That's because normal permissions shouldn't pose a risk to your privacy or your device's functionality.

What is the uses permission in Android?

Specifies a system permission that the user must grant in order for the app to operate correctly. Permissions are granted by the user when the application is installed (on devices running Android 5.1 and lower) or while the app is running (on devices running Android 6.0 and higher).

What does Android permission Query_all_packages mean?

Permitted uses of the QUERY_ALL_PACKAGES permission. Permitted uses involve apps that must discover any and all installed apps on the device, for awareness or interoperability purposes may have eligibility for the permission. Permitted uses include device search, antivirus apps, file managers, and browsers.

What does it mean when an app has permission to change system settings?

To appease power users by giving apps like Tasker more capabilities, there's a permission called "Modify System Settings" that can be granted. If an app has this permission, it can change Android options like your screen timeout duration.


1 Answers

I wouldn't install an app that did this. If all you want is your own logs, your app can keep its own private log buffer that it writes into along with the system log.

You may not even need to do this though: http://android-developers.blogspot.com/2010/05/google-feedback-for-android.html

like image 63
adamp Avatar answered Sep 20 '22 13:09

adamp