Forráskód Böngészése

README: update logcat instructions with easier modern ADB commands

[skip ci]
[ci skip]

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Álvaro Brey 2 éve
szülő
commit
a705c5e7b0
1 módosított fájl, 5 hozzáadás és 6 törlés
  1. 5 6
      README.md

+ 5 - 6
README.md

@@ -44,7 +44,7 @@ Easy starting points are also reviewing [pull requests](https://github.com/nextc
 #### With a linux computer:
 - enable USB-Debugging in your smartphones developer settings and connect it via USB
 - open command prompt/terminal
-- enter `adb logcat | grep "$(adb shell ps | awk '/com.nextcloud.client/{print $2}')" > logcatOutput.txt` to save the output to this file
+- enter `adb logcat --pid=$(adb shell pidof -s 'com.nextcloud.client') > logcatOutput.txt` to save the output to this file
 
 **Note:** You must have [adb](https://developer.android.com/studio/releases/platform-tools.html) installed first!
 
@@ -52,15 +52,14 @@ Easy starting points are also reviewing [pull requests](https://github.com/nextc
 - download and install [Minimal ADB and fastboot](https://forum.xda-developers.com/t/tool-minimal-adb-and-fastboot-2-9-18.2317790/#post-42407269)
 - enable USB-Debugging in your smartphones developer settings and connect it via USB
 - launch Minimal ADB and fastboot
-- enter `adb shell ps | findstr com.nextcloud.client` and use the second place of this output (it is the first integer, e.g. `18841`) as processID in the following command:
-- `adb logcat | findstr <processID> > %HOMEPATH%\Downloads\logcatOutput.txt` (This will produce a logcatOutput.txt file in your downloads)
-- if the processID is 18841, an example command is: `adb logcat | findstr 18841 > %HOMEPATH%\Downloads\logcatOutput.txt` (You might cancel the process after a while manually: it will not be exited automatically.)
+- enter `adb shell pidof -s 'com.nextcloud.client` and use the output as `<processID>` in the following command:
+- `adb logcat --pid=<processID> > %HOMEPATH%\Downloads\logcatOutput.txt` (This will produce a `logcatOutput.txt` file in your downloads)
+- if the processID is `18841`, an example command is: `adb logcat --pid=18841 > %HOMEPATH%\Downloads\logcatOutput.txt` (You might cancel the process after a while manually: it will not be exited automatically.)
 
 #### On a device (with root) :wrench:
 - open terminal app *(can be enabled in developer options)*
 - get root access via "su"
-- enter `logcat -d -f /sdcard/logcatOutput.txt`
-- you will have to filter the output manually, as above approach is not working on device
+- enter `logcat -d --pid $(pidof -s com.nextcloud.client) -f /sdcard/logcatOutput.txt`
 
 or