“adb shell am set-inactive <packageName> true “ does't work
<p>I want to test App standby mode. The devices I use is Galaxy S7 edge and virtual device with an Android 6.0 (API level 23).</p>

<p>I use:</p>

<pre><code>$ adb shell dumpsys battery unplug
$ adb shell am set-inactive &lt;packageName&gt; true
</code></pre>

<p>When I test if the app is actually in standby using <code>adb shell am get-inactive &lt;packageName&gt;</code> I always obtain the following result <code>Idle=false</code>. Did anyone else experience the same behavior?</p>