Comments (5)
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.
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.
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.
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.
adb shell pm grant com.dp.logcatapp android.permission.READ_LOGS
from logcatreader.
Related Issues (20)
- https://github.com/darshanparajuli/LogcatReader/blob/master/logcat/proguard-rules.pro
- 'Stuck' at a specific point
- Typo in strings.xml
- showing no information after a moment HOT 1
- Problem with Android hanging HOT 1
- This only needs to be done once HOT 2
- Feature Request: Start logging and saving immediately. HOT 1
- Minimal log view
- Help
- Filter `LOG LEVEL` semantics contradictory
- java.lang.SecurityException HOT 2
- Filters not applied directly after opening the app, only after opening the filter list
- Get logcat from tcpip HOT 1
- Logcat standard output format different from Logcat Reader output format HOT 1
- Android 13 `SecurityException` while executing `pm grant ...` HOT 1
- Android 13 update and LogcatReader behaviour HOT 2
- still maintained HOT 1
- Manual method need help HOT 1
- Android 13
- After switching time zones. The time displayed by logcat is still the previous time zone
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logcatreader.