Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
magicsih authored Oct 17, 2019
1 parent b758808 commit b591c9e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@

<pre>
<code>
AdbContext adbContext = new DefaultAdbContext(
Executors.newFixedThreadPool(10, new CustomizableThreadFactory("ADBNetwork-")),
Executors.newFixedThreadPool(10, new CustomizableThreadFactory("AdpcCallback-"))
);
adbContext.init();
String packageName = "com.sec.android.app.clockpackage";
AdbDevice s8 = adbContext.getAdpcDeviceById("{your-android-device-id}");
s8.registerPollingListener(STAT_INFO_TOP, "top -p `pidof " + packageName + "` -o ARGS,%CPU -n 1\n", this, false);
s8.registerPollingListener("meminfo", "dumpsys meminfo " + packageName + "\n", this, false);
s8.start();
Thread.currentThread().join();
adbContext.shutdown();
AdbContext adbContext = new DefaultAdbContext(
Executors.newFixedThreadPool(10, new CustomizableThreadFactory("ADBNetwork-")),
Executors.newFixedThreadPool(10, new CustomizableThreadFactory("AdpcCallback-"))
);
adbContext.init();

String packageName = "com.sec.android.app.clockpackage";

AdbDevice s8 = adbContext.getAdpcDeviceById("{your-android-device-id}");
s8.registerPollingListener(STAT_INFO_TOP, "top -p `pidof " + packageName + "` -o ARGS,%CPU -n 1\n", this, false);
s8.registerPollingListener("meminfo", "dumpsys meminfo " + packageName + "\n", this, false);
s8.start();

Thread.currentThread().join();
adbContext.shutdown();
</code>
</pre>

0 comments on commit b591c9e

Please sign in to comment.