adb -d logcat -d > log_dump.txt
- Write the current Android device logs to the file.
- The first
-dapplies toadband means "the only connected device". - The second
-dapplies tologcatand 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.