You may get an error "*Error: app is in background *" while using
adb shell am startservice
in Oreo (26+). This requires services in the foreground. Use the following.
adb shell am start-foreground-service com.some.package.name/.YourServiceSubClassName