How I can simulate “tail” command for file on the Android file system?

后端 未结 4 1475
余生分开走
余生分开走 2021-02-14 23:47

I have file on SD-CARD and my app using it as log file. Is it possible through the adb to watch file with all changes in real time? Like with tail -f /sdcard/myfile.log

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-15 00:31

    You can install busybox and then:

    adb shell
    tail -f /path/of/your/file
    

    But remember that you should have root access to install busybox. If you are using the emulator check this one: How to get root access on Android emulator?

提交回复
热议问题