8

How can I view a simple text file via adb or adb shell ? I know there is fileExplorer that comes with ADT but its not very handy, I have pull a file every time, then open it,

is there a quick way on the command line ?

2 Answers 2

13

adb shell cat /sdcard/file.txt

cat is the command for displaying text files in linux.

usage: cat [-beflnstv] [-] [file ...]

1
  • is there any other text viewer in adb shell?
    – Ooker
    Dec 29, 2020 at 10:24
2

cat is the command which is useful to open text files in adb.

cat txtfile

or

cat txtfile.text

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.