Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fetch /data/anr/anr_xxx on Oreo (8.1.0)?

I'm unable to adb pull /data/anr/anr_xxx files on my Pixel Xl with Android 8.1.0.

My trials:

➜  Downloads adb shell ls -al /data/anr
total 1184
drwxrwxr-x  2 system system   4096 2018-06-24 13:57 .
drwxrwx--x 43 system system   4096 1970-02-11 19:30 ..
-rw-------  1 system system 503517 2018-06-24 01:41 anr_2018-06-24-01-41-39-700
-rw-------  1 system system 683519 2018-06-24 13:57 anr_2018-06-24-13-57-19-517
➜  Downloads adb pull /data/anr/anr_2018-06-24-01-41-39-700 .
adb: error: failed to copy '/data/anr/anr_2018-06-24-01-41-39-700' to './anr_2018-06-24-01-41-39-700': remote open failed: Permission denied

marlin:/data/anr $ ls -al
total 1184
drwxrwxr-x  2 system system   4096 2018-06-24 13:57 .
drwxrwx--x 43 system system   4096 1970-02-11 19:30 ..
-rw-------  1 system system 503517 2018-06-24 01:41 anr_2018-06-24-01-41-39-700
-rw-------  1 system system 683519 2018-06-24 13:57 anr_2018-06-24-13-57-19-517
marlin:/data/anr $ cp anr_2018-06-24-13-57-19-517 /sdcard/Download
cp: /sdcard/Download/anr_2018-06-24-13-57-19-517: Permission denied

I googled many times and didn't find a solution and i'm really going to be crazy. Any help or hint will be appreciated. Thank you!

like image 444
Liu Tao Avatar asked Jun 24 '18 06:06

Liu Tao


People also ask

Where can I find ANR traces on Android?

On older OS releases, there's a single /data/anr/traces.txt file on the device. On newer OS releases, there are multiple /data/anr/anr_* files. You can access ANR traces from a device or emulator by using Android Debug Bridge (adb) as root:

When does an ANR happen in a thread?

If a worker thread holds a lock on a resource that the main thread requires to complete its work, then an ANR might happen. For example, figure 4 shows a Traceview timeline where most of the work is performed on a worker thread. Figure 4. Traceview timeline that shows the work being executed on a worker thread

How do I know if my app has an ANR?

There are some common patterns to look for when diagnosing ANRs: The app is doing slow operations involving I/O on the main thread. The app is doing a long calculation on the main thread. The main thread is doing a synchronous binder call to another process, and that other process is taking a long time to return.

Why is it taking so long to get the Oreo update?

A: Because Lenovorola is pulling a Samsung, taking forever to officially deliver the Oreo update to everyone. Q: ERMAHGERD DIS ROM SUCKZ, MAH BATTERY IS DEAD IN 30 MINS, PLZ HALP! A: Please do blame Motorola, or yourself, or your apps' developers, but not me.


1 Answers

You can use adb bugreport ./bugreport.zip, then unzip bugreport.zip, you will find a bugreporp-xxx.txt. from this txt, you can get /data/anr/anr_xxx file content by greping /data/anr/anr_

like image 125
user8783065 Avatar answered Oct 19 '22 14:10

user8783065