adb -d logcat -d > log_dump.txt
- Write the current Android device logs to the file.
- The first
-d
applies toadb
and means "the only connected device". - The second
-d
applies tologcat
and means "dump the contents and exit".
adb -s CAFEBABEDEADBEEF logcat -d > log_dump.txt
- Same as previous, but connect to the device with the given serial number.