Tag Archives: Permission deniedadb

Obnoxious permission denied: how does ADB handle permission denied when accessing mobile directory

Programmer algorithm practice must read, common Java API skills to share>>>

Story background

There is no response in an app of mobile phone, I want to find the mobile phone anr log

But I only know that there is a tra * * file in a directory of Data directory, and there is a anr log in the file

I really forgot the details, so I want to go into data and check it with LS

The result is a nasty permission denied

A face muddled force, how to adjust, and then go to the morning search method

If you explore the process, you don’t have to talk nonsense, just talk about the solution

Solutions

1、 Get root permission from mobile phone

My mobile phone is Meizu. The method of root is very simple. Here is the method

2、 Su command to get the highest permission

After entering Su, there will be a pop-up window on the mobile phone

Permission — permission, done

3、 Do whatever you want

Then you can do what you want to do

You will find that the directory I want is anr and the file is traces.txt

Then ADB pull data/anr/traces. TXT > D:anr.log

OK

It seems that you can solve the problem without root, but I didn’t try it. If you are interested, you can try it