Android Question Substitute of Starter Service

Rubens Jr.

Member
Licensed User
Hi !
How can I make a service like the starter service (always runing) as described :
  • If you are using B4A v8.30+ then the starter service will not be killed until the whole process is killed.
  • You will see a message such as this one, 60 seconds after the app has moved to the background:
    ** Service (starter) Destroy (ignored)**
Reason :
My Tablet with Android 11 do not start my app if it has the starter Service !
It shoes a blank screen only.
With an very old other tablet (Android 8.1) This do not happen. My App starts ok every time. (This tablet is a very slow one, about 100 seconds to do a boot)
With another old tablet (Android 9) in 10 times 1 start with a blank screen, 9 ok. This is a not to slow one.
With this brand new ... in 20 times only one starts ok. Even when starts ok, if a touch Home button and start it again : blank screen.
In This same new tablet, an very old App made with B4A version 2.5 the App start ok.

In this new tablet I made a factory reset. Enable usb debug
In B4A (version 11.50) : Start a new project : File -> New -> b4xpages. No modification, just the example.
Compile and run : blank screen.
But, if I remove de Start service and compile and run : Ok ! No problem !! The Click button apears normal.

So .. Is there a way that I make a another service with another name of course than stay running like de start one ?
Thanks

(Sorry by bad english ..)
 

Rubens Jr.

Member
Licensed User
Ok. I did it.
File -> new -> Default
Compile and run .. Same result !
Top of screen : B4A Example e no button.
Remove Starter, recompile and works ok. Top of screen : Activity and o button Click.
Add new Service, named it Starter, recompile and again not work.
But The log shows some diferences ! At the end :
Immediately CompilePackage: b4a.example Failed

The complete log :

pointer 0 down pointerIndex=0 trackingIndex=0
pointer 0 down x=530.48193 y=596.00665
start_output_stream
disable backend pcm(directionCM_OUT)
Apply path: out-reset
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Apply path: media-single-speaker
select device(out)dev:OUT_SPK, path:media-single-speaker
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
oneway function results will be dropped but finished with status OK and parcel size 4
+++++++++++++++ start_output_stream: pcm sample_rate: 48000,pcm fmt: 0x00000000,pcm channels: 2
oneway function results will be dropped but finished with status OK and parcel size 4
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Ignoring HOME; event canceled.
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
uid=1041(audioserver) writer identical 1 line
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
mixer(0xf73a0f80) throttle end: throttle time(10)
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
uid=1041(audioserver) writer identical 6 lines
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
oneway function results will be dropped but finished with status OK and parcel size 4
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
uid=1041(audioserver) writer identical 136 lines
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
out_standby
oneway function results will be dropped but finished with status OK and parcel size 4
pointer 0 down pointerIndex=0 trackingIndex=0
pointer 0 down x=402.60684 y=154.7421
START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=b4a.example/.main bnds=[320,102][469,204]} from uid 10095
Transition from ACTIVITY_FINISHED to INTENT_STARTED
start by-launcher
start_output_stream
disable backend pcm(directionCM_OUT)
Apply path: out-reset
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Apply path: media-single-speaker
select device(out)dev:OUT_SPK, path:media-single-speaker
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
+++++++++++++++ start_output_stream: pcm sample_rate: 48000,pcm fmt: 0x00000000,pcm channels: 2
oneway function results will be dropped but finished with status OK and parcel size 4
oneway function results will be dropped but finished with status OK and parcel size 4
ing_service_impl.cc:758 Configured tracing session 33, #sources:1, duration:5000 ms, #buffers:1, total buffer size:4096 KB, total sessions:1, uid:1071 session name: ""
probes_producer.cc:230 Ftrace setup (target_buf=33)
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
ftrace_procfs.cc:176 enabled ftrace
Power setMode: LAUNCH to: 1
setLaunchValueAnimatorScale 0.55
setLaunchValueAnimatorScale return false
cur-mode:LAUNCH
Compat change id reported: 135634846; UID 10113; state: DISABLED
Compat change id reported: 143937733; UID 10113; state: ENABLED
Transition from INTENT_STARTED to ACTIVITY_LAUNCHED
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Forked child process 5468
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
app.processName = b4a.example
Start proc 5468:b4a.example/u0a113 for pre-top-activity {b4a.example/b4a.example.main}
mixer(0xf73a0f80) throttle end: throttle time(9)
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
[AllocatorImpl] allocate
succeed to allocate buffers: bufferId:5009 name:Splash Screen b4a.example#0 width*height=(1024*600) layerCount:1 format:1 usage:2355 reservedSize:0
Not starting debugger since process cannot load the jdwp agent.
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
uid=1041(audioserver) writer identical 2 lines
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
No Network Security Config specified, using platform default
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
No Network Security Config specified, using platform default
[Surface(name=Task=21)/@0x8308840 - animation-leash#0] No local sync point found
[Surface(name=Task=21)/@0x8308840 - animation-leash#0] No local sync point found
[Surface(name=Task=1)/@0xba4fa27 - animation-leash#0] No local sync point found
[Surface(name=Task=1)/@0xba4fa27 - animation-leash#0] No local sync point found
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
common created.
Bridge logger not enabled.
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
oneway function results will be dropped but finished with status OK and parcel size 4
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
uid=1041(audioserver) writer identical 2 lines
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
getTransport: Cannot find entry android.hardware.configstore@1.0::ISurfaceFlingerConfigs/default in either framework or device manifest.
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
[AllocatorImpl] allocate
succeed to allocate buffers: bufferId:5037 name:b4a.example/b4a.example.main#0 width*height=(1024*600) layerCount:1 format:1 usage:2304 reservedSize:0
[AllocatorImpl] allocate
succeed to allocate buffers: bufferId:5041 name:b4a.example/b4a.example.main#0 width*height=(1024*600) layerCount:1 format:1 usage:2304 reservedSize:0
[AllocatorImpl] allocate
succeed to allocate buffers: bufferId:5043 name:b4a.example/b4a.example.main#0 width*height=(1024*600) layerCount:1 format:1 usage:2816 reservedSize:0
[AllocatorImpl] allocate
succeed to allocate buffers: bufferId:5049 name:b4a.example/b4a.example.main#0 width*height=(1024*600) layerCount:1 format:1 usage:2304 reservedSize:0
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
[MapperLoader] load
[MapperLoader] loadModule
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Transition from ACTIVITY_LAUNCHED to ACTIVITY_FINISHED
/data/misc/iorapd/b4a.example/1/b4a.example.main/compiled_traces/compiled_trace.pb exists
/data/misc/iorapd/b4a.example/1/b4a.example.main/compiled_traces/compiled_trace.pb size is 0
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
[AllocatorImpl] allocate
Displayed b4a.example/.main: +499ms
succeed to allocate buffers: bufferId:5076 name:b4a.example/b4a.example.main#0 width*height=(1024*600) layerCount:1 format:1 usage:2816 reservedSize:0
Power setMode: LAUNCH to: 0
cur-mode:NORMAL
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
GoogleInputMethodService.onFinishInput():3400
GoogleInputMethodService.onStartInput():1972
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
uid=1041(audioserver) writer identical 126 lines
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
out_standby
oneway function results will be dropped but finished with status OK and parcel size 4
probes_producer.cc:329 Producer stop (id=33)
ftrace_procfs.cc:183 disabled ftrace
ng_service_impl.cc:1948 Tracing session 33 ended, total sessions:0
Perfetto TraceBuffer saved to file: /data/misc/iorapd/b4a.example/1/b4a.example.main/raw_traces/5468-1643176457742126275.perfetto_trace.pb
Immediately CompilePackage: b4a.example Failed
Sending signal. PID: 582 SIG: 10
Thread[6,tid=592,WaitingInMainSignalCatcherLoop,Thread*=0xeeefe400,peer=0x131c1e30,"Signal Catcher"]: reacting to signal 10
SIGUSR1 forcing GC (no HPROF) and profile save
Explicit concurrent copying GC freed 11895(571KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 6384KB/12MB, paused 230us total 140.191ms
 
Upvote 0

Rubens Jr.

Member
Licensed User
Justo to add some information :
I Reboot my tablet and start the same example before (Standart app, not b4xpages) and it works !
the log :

pointer 0 down pointerIndex=0 trackingIndex=0
pointer 0 down x=433.5766 y=594.01
pointer 0 down pointerIndex=0 trackingIndex=0
pointer 0 down x=410.59903 y=161.73047
START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=b4a.example/.main bnds=[320,102][469,204]} from uid 10095
Transition from ACTIVITY_FINISHED to INTENT_STARTED
start by-launcher
createTrack_l(): mismatch between requested flags (00000004) and output flags (00000002)
OpPlayAudio: track:55 usage:13 not muted
createTrack_l(-574): AUDIO_OUTPUT_FLAG_FAST denied by server; frameCount 0 -> 8994
setLaunchValueAnimatorScale 0.55
setLaunchValueAnimatorScale return false
oneway function results will be dropped but finished with status OK and parcel size 4
oneway function results will be dropped but finished with status OK and parcel size 4
Power setMode: LAUNCH to: 1
Compat change id reported: 135634846; UID 10113; state: DISABLED
Transition from INTENT_STARTED to ACTIVITY_LAUNCHED
Compat change id reported: 143937733; UID 10113; state: ENABLED
binder thread pool (1 threads) starved for 236 ms
cur-mode:LAUNCH
ClassLoader referenced unknown path:
Forked child process 3617
oneway function results will be dropped but finished with status OK and parcel size 4
Slow operation: 57ms so far, now at startProcess: returned from zygote!
Slow operation: 57ms so far, now at startProcess: done updating battery stats
Slow operation: 58ms so far, now at startProcess: building log message
app.processName = b4a.example
Start proc 3617:b4a.example/u0a113 for pre-top-activity {b4a.example/b4a.example.main}
Slow operation: 58ms so far, now at startProcess: starting to update pids map
Slow operation: 60ms so far, now at startProcess: done updating pids map
grantorIdx must be less than 3
grantorIdx must be less than 3
Not starting debugger since process cannot load the jdwp agent.
grantorIdx must be less than 3
SessionDirect:ump: beginning usec: 1643177379691109
grantorIdx must be less than 3
start_output_stream
disable backend pcm(directionCM_OUT)
Apply path: out-reset
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Apply path: media-single-speaker
select device(out)dev:OUT_SPK, path:media-single-speaker
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
+++++++++++++++ start_output_stream: pcm sample_rate: 48000,pcm fmt: 0x00000000,pcm channels: 2
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Session Direct (id=2)
Summary:
Description = /data/misc/iorapd/b4a.example/1/b4a.example.main/compiled_traces/compiled_trace.pb
Duration = 54ms
Total File Paths=6 (good: 100%)
Total Entries=157 (good: 100%)
Total Bytes=643072 (good: 100%)
uid=1041(audioserver) writer identical 1 line
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
No Network Security Config specified, using platform default
No Network Security Config specified, using platform default
[AllocatorImpl] allocate
mixer(0xf50dcac0) throttle end: throttle time(8)
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
succeed to allocate buffers: bufferId:1002 name:Splash Screen b4a.example#0 width*height=(1024*600) layerCount:1 format:1 usage:2355 reservedSize:0
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Slow operation: 69ms so far, now at getContentProviderImpl: after updateLruProcess
Slow operation: 69ms so far, now at getContentProviderImpl: before updateOomAdj
Slow operation: 73ms so far, now at getContentProviderImpl: after updateOomAdj
Slow operation: 73ms so far, now at getContentProviderImpl: done!
uid=1041(audioserver) writer identical 6 lines
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
common created.
Bridge logger not enabled.
oneway function results will be dropped but finished with status OK and parcel size 4
Killing 3116enseavanti.com.br.app2shop_multilaser/u0a60 (adj 975): kill background
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Killing 3033:com.facebook.lite/u0a43 (adj 905): kill background
uid=1041(audioserver) writer identical 1 line
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Process 3116 exited due to signal 9 (Killed)
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Process 3033 exited due to signal 9 (Killed)
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Successfully killed process cgroup uid 10060 pid 3116 in 90ms
Successfully killed process cgroup uid 10043 pid 3033 in 0ms
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
getTransport: Cannot find entry android.hardware.configstore@1.0::ISurfaceFlingerConfigs/default in either framework or device manifest.
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
[AllocatorImpl] allocate
succeed to allocate buffers: bufferId:1028 name:b4a.example/b4a.example.main#0 width*height=(1024*600) layerCount:1 format:1 usage:2304 reservedSize:0
[AllocatorImpl] allocate
succeed to allocate buffers: bufferId:1032 name:b4a.example/b4a.example.main#0 width*height=(1024*600) layerCount:1 format:1 usage:2304 reservedSize:0
[AllocatorImpl] allocate
[AllocatorImpl] allocate
succeed to allocate buffers: bufferId:1036 name:b4a.example/b4a.example.main#0 width*height=(1024*600) layerCount:1 format:1 usage:2304 reservedSize:0
succeed to allocate buffers: bufferId:1040 name:b4a.example/b4a.example.main#0 width*height=(1024*600) layerCount:1 format:1 usage:2816 reservedSize:0
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
[MapperLoader] load
[MapperLoader] loadModule
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
uid=1041(audioserver) writer identical 1 line
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
** Activity (main) Create, isFirst = true **
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Transition from ACTIVITY_LAUNCHED to ACTIVITY_FINISHED
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
/data/misc/iorapd/b4a.example/1/b4a.example.main/compiled_traces/compiled_trace.pb exists
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
** Activity (main) Resume **
/data/misc/iorapd/b4a.example/1/b4a.example.main/compiled_traces/compiled_trace.pb size is 2220
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Displayed b4a.example/.main: +971ms
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Permission failure: android.permission.ACCESS_SURFACE_FLINGER from uid=10113 pid=3617
checking android.permission.ACCESS_SURFACE_FLINGER for uid=10113 => denied (4044 us)
[AllocatorImpl] allocate
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
succeed to allocate buffers: bufferId:1069 name:b4a.example/b4a.example.main#0 width*height=(1024*600) layerCount:1 format:1 usage:2816 reservedSize:0
[AllocatorImpl] allocate
succeed to allocate buffers: bufferId:1073 name:b4a.example/b4a.example.main#0 width*height=(1024*600) layerCount:1 format:1 usage:2816 reservedSize:0
Power setMode: LAUNCH to: 0
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
cur-mode:NORMAL
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
GoogleInputMethodService.onFinishInput():3400
GoogleInputMethodService.onStartInput():1972
mode(0),devices(0x2)latform device:OUT_SPK(0x3)
Unable to start service Intent { act=com.google.android.gms.drive.ApiService.RESET_AFTER_BOOT flg=0x4 cmp=com.google.android.gms/.drive.api.ApiService (has extras) } U=0: not found
Error executing JobStatus{23c4a3 #u0a43/-471957687 com.facebook.lite/com.facebook.analytics.appstatelogger.AppStateIntentService u=0 s=10043 TIME=none:-1m19s890ms READY}
Error executing JobStatus{7e19143 #u0a40/-471957687 com.instagram.lite/com.facebook.analytics.appstatelogger.AppStateIntentService u=0 s=10040 TIME=none:-41s318ms READY}
Error executing JobStatus{8571d5b #u0a60/2071862120 penseavanti.com.br.app2shop_multilaser/com.onesignal.RestoreKickoffJobService u=0 s=10060 TIME=-22s454ms:-22s454ms READY}
Error executing JobStatus{19d33c #u0a43/1786848100 com.facebook.lite/.intent.WakefulIntentService u=0 s=10043 TIME=none:-19s932ms READY}
uid=1041(audioserver) writer identical 6 lines
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
I am not expert on this. My guess is the phone is loaded with Custom ROM and kernel which has issue with the mentioned CDM and OEMCrypto L3.
 
Upvote 0

Dieter Baumgartner

Member
Licensed User
Longtime User
I have the same problem with empty screen showing when i compile a App with Starter-service on a new bought NO-NAME tablet. On phones the app runs perfect, but on the tablet show blank screen and the HOME- Button is not working.
.
The tablet runs Android Go 10 and the connection to the debugger also fails,also when you only start a new project with B4Xpage with no changes. (Hello World- Button does not show up, only blank screen, no HOME-Button working)
Strange thing is, another very big app with many libs runs perfect.
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…