matlog icon indicating copy to clipboard operation
matlog copied to clipboard

Grant READ_LOGS via ADB if Not Rooted

Open curiousrom opened this issue 5 years ago • 4 comments

I love MatLog & recommend it to users on XDA & Reddit.

Just some minor comments:

In the MatLog Play Store page & also in the README.md file this important info could be added:

MatLog requires root permission or if you don't have root, connect to a computer & copy/paste this in adb to grant the required permission:

adb shell pm grant com.pluscubed.matlog android.permission.READ_LOGS

In the MatLog Play Store page this could be added:

  • The logcat are saved in /data/media/0/matlog/saved_logs/ or /sdcard/matlog/saved_logs/.

  • This is deprecated & should be deleted:

Google+ Community: https://goo.gl/VQpTfp

In the README.md file this is wrong:

Where are the logs saved?

On the SD card, under /sdcard/catlog/saved_logs/.

Replace with:

On the SD card, under /sdcard/matlog/saved_logs/.

curiousrom avatar Feb 07 '20 19:02 curiousrom

Why matlog is not asking for root access on my phone? Even though my phone is rooted via magisk.. just curious :)

Sorry for asking here and my english.

ghost avatar Jun 12 '20 10:06 ghost

@Gamemulatorer - Check in your Magisk manager settings.

This is not the topic of this thread. Check XDA forum for Magisk thread.

curiousrom avatar Jun 12 '20 16:06 curiousrom

I tried to grant permission via adb and get the following error.

Exception occurred while executing 'grant': java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS. at android.app.ContextImpl.enforce(ContextImpl.java:2187) at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:2215) at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1481) at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1463) at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:378) at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2419) at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:260) at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97) at android.os.ShellCommand.exec(ShellCommand.java:38) at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:26028) at android.os.Binder.shellCommand(Binder.java:972) at android.os.Binder.onTransact(Binder.java:856) at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4818) at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:9350) at android.os.Binder.execTransactInternal(Binder.java:1228) at android.os.Binder.execTransact(Binder.java:1165)

LuisCarlosHK avatar Oct 06 '22 16:10 LuisCarlosHK

The adb command works for me on Android 7.1.

@LuisCarlosHK Per #64, it's an Android 10+ thing, you need to set an option in Android's developer options and reboot.

opk12 avatar Dec 19 '23 19:12 opk12