Android Server doesn't start on boot

Hello,

Android Server doesn't start on cold boot for me on my Google TV (Android 11). It's possible to start the app itself using adb by running something like this 'adb shell monkey -p com.virtualhere.androidserver 1' but it starts in foreground and it's not optimal for me. There are workarounds but I don't like them: I can run it with home assistant for example and send "HOME" after to minimize it.

Couldn't start com.virtualhere.androidserver.DaemonService at all.

After doing a bit of research, it seems like BOOT_COMPLETED broadcast is not sent to apps in Google TV. I can switch to Android TV and it should work apparently. If it's not possible to fix in VirtualHere Android Server then I can switch to ATV. Will I need to re-purchase the license despite it being the same hardware device? 

#2

There is no reason to start the virtualhere app on boot. All you need to do is just plug in the usb device into the android device. Then if virtualhere is installed it will popup and say "Allow VirtualHere to use this device automatially" or something similar. Then you click that and save checkbox and virtualhere will be automatically started when that device is connected. It should also work on boot i think.

 

#3

Hello,

The "Start on boot" feature is ticked and it's not working for me on a Google TV device. Are you willing to investigate? Everything else is working just fine. 

Will I need to purchase another license if I flash Android TV on my server device?

#4

First on the Google TV, can you post the messages from the Virtualhere Android menu at the top right ->System Messages copy to clipboard and paste in here if you can, that might help if there is a permission issue.

#5

--------- beginning of perf 02-24 13:21:29.323 941 1000 P Quality : 09 03 info 1708741282980 procName:com.virtualhere.androidserver 1 callback:androidx.core.content.res.j,target:android.os.Handler callback:android.view.Choreographer$FrameDisplayEventReceiver,target:android.view.Choreographer$FrameHandler,maxWallTime:224 latencyTime:683,WallTime:0,normalLatencySlowTimes:10 $ $ $ $ 02-24 13:23:05.236 941 1000 P Quality : 09 03 info 1708741385235 procName:com.virtualhere.androidserver 2 what:159,obj:android.app.servertransaction.ClientTransaction@4ff04033,target:android.app.ActivityThread$H $ latencyTime:0,WallTime:317 android.os.MessageQueue.nativePollOnce:-2,android.os.MessageQueue.next:335,android.os.Looper.loop:200,android.app.ActivityThread.main:7848,java.lang.reflect.Method.invoke:-2,com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run:592,com.android.internal.os.ZygoteInit.main:1192, allocWait:-1,ionwait:-1,dstate:-1,sched:-1,iowait:-1 $ com.virtualhere.androidserver/.GUI 02-24 13:23:05.237 941 1000 P Quality : 09 03 info 1708741385236 procName:com.virtualhere.androidserver 1 what:159,obj:android.app.servertransaction.ClientTransaction@8382,target:android.app.ActivityThread$H what:159,obj:android.app.servertransaction.ClientTransaction@4ff04033,target:android.app.ActivityThread$H,maxWallTime:317 latencyTime:316,WallTime:0 $ $ $ com.virtualhere.androidserver/.GUI 02-24 13:23:11.486 941 1000 P Quality : 09 03 info 1708741391484 procName:com.virtualhere.androidserver 1 callback:androidx.core.content.res.j,target:android.os.Handler callback:android.view.Choreographer$FrameDisplayEventReceiver,target:android.view.Choreographer$FrameHandler,maxWallTime:276 latencyTime:301,WallTime:0,normalLatencySlowTimes:10 $ $ $ $ --------- beginning of main 02-24 13:32:48.465 2714 2714 E e.androidserve: Unknown bits set in runtime_flags: 0x800000 02-24 13:32:48.475 2714 2714 E e.androidserve: Not starting debugger since process cannot load the jdwp agent. 02-24 13:32:48.478 2714 2714 I Zygote : gc_tuning enable app's gc tuning from fork 02-24 13:32:48.609 2714 2714 W e.androidserve: JIT profile information will not be recorded: profile file does not exist. 02-24 13:32:48.609 2714 2714 I chatty : uid=10062(com.virtualhere.androidserver) identical 1 line 02-24 13:32:48.609 2714 2714 W e.androidserve: JIT profile information will not be recorded: profile file does not exist. --------- beginning of system 02-24 13:32:48.622 2714 2714 I ActivityTaskManager: isPreloadSplashApp = com.virtualhere.androidserver 02-24 13:32:48.637 2714 2714 I LoadedApk: No resource references to update in package com.tvos 02-24 13:32:48.637 2714 2714 D NetworkSecurityConfig: No Network Security Config specified, using platform default 02-24 13:32:48.638 2714 2714 D NetworkSecurityConfig: No Network Security Config specified, using platform default 02-24 13:32:48.690 2714 2714 D Hera_jni: entering JNI_OnLoad 02-24 13:32:48.690 2714 2714 D Hera_jni: entering register_android_heraeye_Native 02-24 13:32:48.690 2714 2714 D Hera_jni: leaving register_android_heraeye_Native success 02-24 13:32:48.690 2714 2714 D Hera_jni: entering register_hera_task_info_Native 02-24 13:32:48.690 2714 2714 D Hera_jni: leaving register_hera_task_info_Native success 02-24 13:32:48.690 2714 2714 D Hera_jni: leaving JNI_OnLoad success 02-24 13:32:48.693 2714 2714 W nvr.ui_probe: disable 02-24 13:32:48.703 2714 2753 D android.os.LagInfo: native init, open fd=-1 02-24 13:32:48.729 2714 2714 D AppCompatDelegate: Checking for metadata for AppLocalesMetadataHolderService : Service not found 02-24 13:32:48.935 2714 2753 P Quality : 09 03 info 1708741968934 procName:com.virtualhere.androidserver 1 what:159,obj:android.app.servertransaction.ClientTransaction@8382,target:android.app.ActivityThread$H what:159,obj:android.app.servertransaction.ClientTransaction@6ec0fbab,target:android.app.ActivityThread$H,maxWallTime:231 latencyTime:407,WallTime:0 $ $ $ com.virtualhere.androidserver/.GUI 02-24 13:32:49.247 2714 2714 I ActivityThread: gc_tuning enable=false 02-24 13:32:49.648 2714 2755 W libEGL : EGLNativeWindowType 0xa2d47e08 disconnect failed 02-24 13:32:49.727 2714 2714 E virtualhere-daemon: Opening local exception: Connection refused 02-24 13:32:49.728 2714 2714 E virtualhere-daemon: Opening local exception: Connection refused 02-24 13:32:50.042 2714 2820 I vhusbd : Sat Feb 24 13:32:49 2024 LOG_INFO >>> Starting VirtualHere USB Server v4.6.0 (Built: Sep 26 2023, 11:19:00)<<< 02-24 13:32:50.043 2714 2820 I vhusbd : Sat Feb 24 13:32:50 2024 LOG_INFO Using configuration /data/user/0/com.virtualhere.androidserver/files/config.ini 02-24 13:32:50.206 2714 2820 I vhusbd : Sat Feb 24 13:32:50 2024 LOG_INFO Server licensed to=anfcb03d188d29137f max_devices=unlimited 02-24 13:32:50.207 2714 2820 I vhusbd : Sat Feb 24 13:32:50 2024 LOG_INFO Using large URB's 02-24 13:32:50.208 2714 2820 I vhusbd : Sat Feb 24 13:32:50 2024 LOG_INFO Listening on all network interfaces at TCP port 7575 (IPv6 dual-stack) 02-24 13:32:50.209 2714 2820 I vhusbd : VirtualHere USB Server is running...press CTRL-C to stop 02-24 13:32:50.973 2714 2811 W NsdServiceInfo: Key lengths > 9 are discouraged: anfcb03d188d29137f 02-24 13:32:51.040 2714 2820 I vhusbd : Sat Feb 24 13:32:51 2024 LOG_INFO Found Full speed device [10d7:b012] "Actions, general adapter" at address 1002 02-24 13:32:51.615 2714 2755 W libEGL : EGLNativeWindowType 0xa2d4fbf8 disconnect failed 02-24 13:32:51.703 2714 2854 D virtualhere-daemon: mdns service sucessfully registered 02-24 13:32:52.149 2714 2846 02-24 13:32:52.150 2714 2714 E virtualhere-daemon: License query failed, Error: null 02-24 13:32:52.386 2714 2885 D virtualhere-daemon: Querying purchases async 02-24 13:32:52.394 2714 2877 I TetheringManager: registerTetheringEventCallback:com.virtualhere.androidserver

#6

Thanks, ill send you an email, that log actually looks ok