1

I bought a cheap Blackview BV5900 running on Android 9.0 (I assume a custom ROM) as I needed something rugged and with long battery life for testing purposes. I'm struggling to find any answers as to why apps won't auto start when they are supposed to. The app in question primarily is Grandstream Wave - Video which is effectively a SIP client. It auto starts just fine on an old Samsung Galaxy V6.

I've tried various auto-start apps to see if I could get around it, but it would seem they fail to load as well on boot, so they don't do the task they are intended to perform. I've been in contact with the manufacturer and their answer is it just won't do it.

As it's a test phone I'm quite happy to root it, although I'm completely new to Android, I'm sure I'll find enough info to get started with a bit of googling.

What I'm after is a bit of help on what to look for and how to find it. From what I gather, the app is looking for a BOOT_COMPLETE message of some sort, so I'm guessing that is disabled somewhere? Any answers, please assume I know nothing, you will be correct.

EDIT 11May2020

Tried the shell command as requested here - no Joy. Result from shell below. Not sure whether this just means I don't have enough privilege to run it or it's disabled in some way?

Broadcasting: Intent { act=android.intent.action.BOOT_COMPLETED flg=0x400000 pkg=com.grandstream.wave }
Security exception: Permission Denial: not allowed to send broadcast android.intent.action.BOOT_COMPLETED from pid=5834, uid=2000

java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.BOOT_COMPLETED from pid=5834, uid=2000
    at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:21774)
    at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:22411)
    at com.android.server.am.ActivityManagerShellCommand.runSendBroadcast(ActivityManagerShellCommand.java:690)
    at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:174)
    at android.os.ShellCommand.exec(ShellCommand.java:103)
    at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:16434)
    at android.os.Binder.shellCommand(Binder.java:634) at android.os.Binder.onTransact(Binder.java:532)
    at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3551)
    at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3397)
    at android.os.Binder.execTransact(Binder.java:731)
0

This would not be a complete answer to your problem. But if you suspect that BOOT_COMPLETED broadcast is disabled for some reason, you can try to send it manually using adb shell and see if your app starts up.

It better to send the broadcast directly to your app by specifying its package name. If you do not know the package name of your application, first you need to find it. To get a list of all installed packages in your device, you can use following command.

$ adb shell pm list packages

After finding the package name of your app from the output of above command, you can use following command to send the broadcast to your app, and see if it starts after it received the broadcast.

$ adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -p <com.your.apps.package.name.comes.here>

In above command replace <com.your.apps.package.name.comes.here> with your app's package name.

| improve this answer | |
  • Thanks, I’ll try the shell later in the week when I get some time and post the results here. – user258282 May 2 at 12:50
  • 1
    Details in edited question, not enough space to fit in comments. – user258282 May 11 at 12:27
  • Seems like you do not have permission to send BOOT_COMPLETED broadcast via adb shell. Please check if you can run this command and get root access through adb shell : adb root as mentioned here. If you can get root access, you will be able to send the broadcast. – Lakindu May 11 at 13:09
  • Thanks, pretty sure I don’t have root access, but I will check. – user258282 May 12 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.