ADB Shell command not applied - "am set-standby-bucket" - Android 9
I see the same thing with the Android P emulator.
However, this works for me on a Pixel 2 device with P.

Btw I think you need to use the integer representation when setting:

adb shell am set-standby-bucket &lt;package-name&gt; 40


Not

adb shell am set-standby-bucket &lt;package-name&gt; rare