Giter VIP home page Giter VIP logo

Comments (5)

darshanparajuli avatar darshanparajuli commented on August 15, 2024 1

Hmm... it should work. Are you sure you didn't misspell anything?
adb shell pm grant com.dp.logcatapp android.permission.READ_LOGS

Also, what version of Android?

from logcatreader.

Joust6809 avatar Joust6809 commented on August 15, 2024 1

I presume the error was misreading the command. It appears as 3 lines when displayed by the app, given my screen resolution and font size. It is really all on a single line.
Here a slight alternative:
Open a DOS window by pressing the "Windows" key then typing "cmd" then enter.
Use "cd /folder_to_adb.exe"
Type "adb devices"
If your phone is recognized;
Type "adb shell" and enter

You are now in an interactive linux style shell executing in your phone.
Type: "pm grant com.dp.logcatapp android.permission.READ_LOGS"

pm is a command which will read 3 parameters
grant is the first parameter
com.dp.logcatapp is the second parameter. It is the internal name that identify the app
Finally, the third parameter is the name of the permission.

This works without needing root. The app, after restart, immediately print all those log lines.
Thanks for sharing the source code.

from logcatreader.

marco-dev avatar marco-dev commented on August 15, 2024

Do I have to restart the app or my device?
Is there a possibility to show in Logcat Reader if READ_LOGS is already granted?

I sent the command with adb and got no error, so I guess it worked. But Logcat doesn't show logs from other apps.

Huawei P20 Pro with Android 9.

from logcatreader.

revolunet avatar revolunet commented on August 15, 2024

same issue with Motorola G7 here

$ adb shell dumpsys package com.dp.logcatapp | grep permission                                                             

    requested permissions:
      android.permission.READ_LOGS
      android.permission.READ_EXTERNAL_STORAGE
      android.permission.WRITE_EXTERNAL_STORAGE
      android.permission.FOREGROUND_SERVICE
    install permissions:
      android.permission.FOREGROUND_SERVICE: granted=true
      android.permission.READ_LOGS: granted=true
      runtime permissions:

You need to kill the app and restart it too :

adb shell  am force-stop com.dp.logcatapp

from logcatreader.

Brock721 avatar Brock721 commented on August 15, 2024

adb shell pm grant com.dp.logcatapp android.permission.READ_LOGS

from logcatreader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.