TacoTheDank / Scoop

[ADB/Root] Catches a stack trace when an app crashes unexpectedly.
Apache License 2.0
307 stars 25 forks source link

Display command to enable logging #66

Open Wjxfi opened 1 year ago

Wjxfi commented 1 year ago

When you click on "no permission to log" the command "pm grant taco.scoop android.permission.READ_LOGS" should appear to apply to adb. I'm sure few people will search for this command on the internet.

drogga commented 1 year ago

Or to just be copied to the clipboard when tapping on that entry in the settings/preferences, which will act as a button.

The "Wiki" can totally be merged with / included/copied to the ReadMe, its not that long at all, there's no need in my humble opinion to be in a separate place/page/tab with jumps, hoops and links from the readme to the wiki, buried that deep and hard to find for a newbie...

@TacoTheDank - I wrote you in one of my repos and tagged / mentioned you, please "react" when you read it, like you did before (I didn't created "issue" tickets here on purpose, I hope that it's not that big of an issue). Thank You. Wish you well and all the best - bye for now.

TacoTheDank commented 1 year ago

The "Wiki" can totally be merged with / included/copied to the ReadMe, its not that long at all, there's no need in my humble opinion to be in a separate place/page/tab with jumps, hoops and links from the readme to the wiki, buried that deep and hard to find for a newbie...

Eh, the README would have been too long with the guide IMO, so I opted to put it in its own location. I already thought that it's pretty accessible. I'll take another look and see how I can make it more visible.

drogga commented 1 year ago

What about the ability to copy the command from the app itself ?

Have you read my input in my repo where I mentioned you, would you mind sharing an opinion there please, or at least react with an emoji, like how you did here, so I can at least know that you've read it ? Thanks in advance ;)

TacoTheDank commented 1 year ago

Yeah, I've read it. I'm taking the backseat for coding for a couple months to focus on school and other stuff.

Regarding copying from the app itself, I don't believe that's necessary, really. You would have to use ADB from a command line on the computer if you don't have root, so just copying it to the phone's clipboard would be pointless (because you need it on the computer). The only reason I would see for this is if you (for some reason) were manually granting the permission from a terminal app on the phone, like Termux or whatnot.

Wjxfi commented 1 year ago

Yeah, I've read it. I'm taking the backseat for coding for a couple months to focus on school and other stuff.

Regarding copying from the app itself, I don't believe that's necessary, really. You would have to use ADB from a command line on the computer if you don't have root, so just copying it to the phone's clipboard would be pointless (because you need it on the computer). The only reason I would see for this is if you (for some reason) were manually granting the permission from a terminal app on the phone, like Termux or whatnot.

that isn't true. wirless debug helps, and you don't need a pc. for example ladb already made it possible

TacoTheDank commented 1 year ago

You're lying. wirless debug helps, and you don't need a pc. for example ladb already made it possible.

I forgot about wireless ADB. It's pretty new, only having been introduced in Android 11. I've never used it.

I had no idea LADB even existed until now. Here is the link: https://github.com/tytydraco/LADB

That wouldn't make me a liar, just ignorant. Instead of calling people liars (which is very accusatory), just say something like "that isn't true" and correct them nicely. Please consider how your words and tone may come across to other people.

I will add a link to the Wiki as a preference option. I will also add a preference that will copy the command to the clipboard when pressed, as @drogga suggested.

Wjxfi commented 1 year ago

Sorry, I was in a bad mood

drogga commented 1 year ago

OK, thank you, but please if you link the page in the app, don't make it open inside the app (by using the WebView - I hate when apps do that and there's no way around it), but make it as a link that asks the system with which browser to open it (even tho A.12 can't have "none" set as default - that I hate the most of G's stupid decisions), even tho I think this is a bit pointless, since you already added a "Source Code" button under "About" in the settings. Currently the "Permission Status" can be tapped/pressed, it's already like a button, but just doesn't do anything, so there's no need to do anything fancy or complicated, you can just use what's already there and make it copy the command as a plain text (can probably be done in less than 10 mins.), but IDK if you need to use the full command, including "adb shell", or just start from "pm grant", because LADB and others, like the "Remote ADB Shell" app, are already in the shell, so that first part will be unnecessarily and it will probably throw an error. BTW, the other day I used "Shizuku" (was already activated form a PC on A.9) and "Termux" (works tru Shizuku in order to have elevated permissions, like shell) to activate "Scoop". Also please keep in mind that it will be nice if the "Permission status" button copies the command even if and when "Scoop" thinks and reports\shows that the READ_LOGS permission is granted, because, as I mentioned elsewhere, even with root it might still not collect\capture crash logs, like in VMOS with Android 9 Pie ROM with BusyBox and their preferred SuperUser manager app.

I noticed that there's a 'Crash the App' in some apps for "power users", I can't name any currently, because I don't remember which, but you might also add such button, tho IDK how it will capture the crash log, if the app that's supposed to grab it crashes, but still I think that it's a nice idea (I altered a app to always crash when launched in order to test such LogCat apps).

Let's hope that when you finally have some time to work on Scoop, you can also add a theme switch button in the main interface (it can be a button with a sun\moon icon), or one in the settings... ;)

Edit: I remembered, SAI {com.aefyr.sai} has a "Crash app" button in its "Super Secret Settings".

drogga commented 1 year ago

Combine same crashes Combine crashes from the same app with the same stack trace into one item

^ I don't think this option is actually working, as it doesn't seem to do anything for me or make any difference.

TacoTheDank commented 1 year ago

^ I don't think this option is actually working, as it doesn't seem to do anything for me or make any difference.

Yeah, I've never seen a difference, either. I might remove this.