Android Question Raspberry Pi3 for Android ioT for SDK=27 Stub!

haltug

New Member
Licensed User
Longtime User
hi all,
Raspberry pi3 B v1.2 for Androidthing worked sdk=27, created today image and loaded.
my B4A version = 5.2
i'm use ADB connection, its worked but logged...(your Raspberry Pi3 iot test Example loaded)​

"Private pm As PeripheralManager" about;
"pm.Initialize" line error "(RuntimeException).java.lang.RuntimeException:Stub!
...
no compiler error!

why?
AddPermission(com.google.android.things.permission.MANAGE_INPUT_DRIVERS)
manifesteditor...ok?
I could not find a solution.
'
'
my manifest;
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="27"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")
'End of default text.
AddApplicationText(<uses-library android:name="com.google.android.things"/>)

'Launch activity automatically on boot (can remove if not needed)
AddActivityText(Main,
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.IOT_LAUNCHER"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
)​
'
'my log;
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (B4A line: 26)
pm.Initialize
java.lang.RuntimeException: Stub!
at com.google.android.things.pio.PeripheralManagerService.<init>(PeripheralManagerService.java:20)
at anywheresoftware.b4a.objects.PeripheralManager.Initialize(PeripheralManager.java:29)
at b4a.example.main._activity_create(main.java:351)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:187)
at b4a.example.main.afterFirstLayout(main.java:102)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
 

haltug

New Member
Licensed User
Longtime User
Thanks your abaut.
All done!(Try to download B4A v7.80 trial version, use the new B4A Sdk Manager to download all components and try it.)
But give me old error still.
i am sending project and log
is there a problem at Things library? because old pi3 gpio@26pin, new pi3 gpio@40pin, can it to be this!
B4X:
*** Debugger waiting for connection (0) ***
Registering a buffer in the process that created it. This may cause memory ordering problems.
Loading /vendor/lib/hw/[email protected] from current namespace instead of sphal namespace.
Displayed b4a.example/.main: +309ms
Registering a buffer in the process that created it. This may cause memory ordering problems.
Registering a buffer in the process that created it. This may cause memory ordering problems.
Registering a buffer in the process that created it. This may cause memory ordering problems.
*** Debugger waiting for connection (1) ***
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 34 (Main)
java.lang.RuntimeException: Stub!
    at com.google.android.things.pio.PeripheralManagerService.<init>(PeripheralManagerService.java:10)
    at anywheresoftware.b4a.objects.PeripheralManager.Initialize(PeripheralManager.java:29)
    at b4a.example.main._activity_create(main.java:392)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:342)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
    at b4a.example.main.afterFirstLayout(main.java:102)
    at b4a.example.main.access$000(main.java:17)
    at b4a.example.main$WaitForLayout.run(main.java:80)
    at android.os.Handler.handleCallback(Handler.java:790)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
null: 10
** Activity (main) Resume **
java.net.SocketException: Socket closed
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at anywheresoftware.b4a.shell.ShellConnector.sendControlMessage(ShellConnector.java:62)
    at anywheresoftware.b4a.shell.ShellConnector.readControlData(ShellConnector.java:194)
    at anywheresoftware.b4a.shell.ShellConnector.connect(ShellConnector.java:186)
    at anywheresoftware.b4a.shell.ShellConnector.run(ShellConnector.java:119)
    at java.lang.Thread.run(Thread.java:764)
Finishing task with all activities already finished
Duplicate finish request for ActivityRecord{c674d3a u0 b4a.example/.main t231 f}
System.exit called, status: 0
VM exiting with result code 0, cleanup skipped.
channel 'de25cc1 Toast (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
channel 'de25cc1 Toast (server)' ~ Channel is unrecoverably broken and will be disposed!
channel '2638753 b4a.example/b4a.example.main (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
channel '2638753 b4a.example/b4a.example.main (server)' ~ Channel is unrecoverably broken and will be disposed!
WIN DEATH: Window{2638753 u0 b4a.example/b4a.example.main}
Attempted to unregister already unregistered input channel '2638753 b4a.example/b4a.example.main (server)'
Process b4a.example (pid 1759) has died: fore TOP 
kill(-1759, 9) failed: No such process
Successfully killed process cgroup uid 10031 pid 1759 in 0ms
WIN DEATH: Window{de25cc1 u0 Toast}
Attempted to unregister already unregistered input channel 'de25cc1 Toast (server)'
setHasOverlayUi called on unknown pid: 1759
Registering a buffer in the process that created it. This may cause memory ordering problems.
Registering a buffer in the process that created it. This may cause memory ordering problems.
Registering a buffer in the process that created it. This may cause memory ordering problems.
crash_sender: running /system/bin/crash_sender
Sending crashes for /data/misc/crash_reporter/crash
crash_sender: job completed
Object died trying to hide notification android.app.ITransientNotification$Stub$Proxy@5d7b5b5 in package b4a.example
removeWindowToken: Attempted to remove non-existing token: android.os.Binder@69c8589
File error accessing recents directory (directory doesn't exist?).
Scan result ready event
Scan result ready event
[0309/110251:INFO:update_manager-inl.h(52)] AndroidThingsPolicy::UpdateCheckAllowed: START
[0309/110251:INFO:next_update_check_policy_impl.cc(48)] Periodic check interval not satisfied, blocking until 3/9/2018 15:55:46 GMT
[0309/110251:INFO:policy_utils.h(58)] decision by NextUpdateCheckTimePolicyImpl::UpdateCheckAllowed
[0309/110251:INFO:update_manager-inl.h(74)] AndroidThingsPolicy::UpdateCheckAllowed: END
Scan result ready event
getConnectionInfo uid=10009
getConnectionInfo uid=10009
Could not set socket write timeout:
   java.lang.reflect.Method.invoke(Native Method)
   com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@11973330:13)
Could not set socket write timeout:
   java.lang.reflect.Method.invoke(Native Method)
   com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@11973330:13)
Could not set socket write timeout:
   java.lang.reflect.Method.invoke(Native Method)
   com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@11973330:13)
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
Could not set socket write timeout:
   java.lang.reflect.Method.invoke(Native Method)
   com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@11973330:13)
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
uid=10009(com.google.android.gms) Binder:981_1 identical 1 line
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
type=1400 audit(0.0:187): avc: denied { read } for name="/" dev="tmpfs" ino=8193 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:device:s0 tclass=dir permissive=1
type=1400 audit(0.0:188): avc: denied { open } for path="/dev" dev="tmpfs" ino=8193 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:device:s0 tclass=dir permissive=1
No service published for: persistent_data_block
Could not set socket write timeout:
   java.lang.reflect.Method.invoke(Native Method)
   com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@11973330:13)
Could not set socket write timeout:
   java.lang.reflect.Method.invoke(Native Method)
   com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@11973330:13)
[AppCertManager] IOException while requesting key: 
java.io.IOException: Invalid device key response.
    at fmk.a(:com.google.android.gms@11973330:12)
    at fmk.a(:com.google.android.gms@11973330:64)
    at fmi.a(:com.google.android.gms@11973330:8)
    at fme.a(:com.google.android.gms@11973330:1)
    at fmd.a(:com.google.android.gms@11973330:10)
    at com.google.android.gms.auth.account.be.legacy.AuthCronChimeraService.b(:com.google.android.gms@11973330:7)
    at ers.call(:com.google.android.gms@11973330:3)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at kfr.run(:com.google.android.gms@11973330:26)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
    at kku.run(Unknown Source:7)
    at java.lang.Thread.run(Thread.java:764)
 

Attachments

  • Athing27.zip
    8.1 KB · Views: 236
Upvote 0

haltug

New Member
Licensed User
Longtime User
hi all,
solved my problem...(kendi sorunumu kendim çözdüm ya helal olsun, ben size yardımcı olayım bağri...)
Manifest look:
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true" 
    android:normalScreens="true" 
    android:smallScreens="true" 
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

AddApplicationText(<uses-library android:name="com.google.android.things"/>)
'Launch activity automatically on boot (can remove if not needed)
AddActivityText(Main,
  <intent-filter>
  <action android:name="android.intent.action.MAIN"/>
  <category android:name="android.intent.category.IOT_LAUNCHER"/>
  <category android:name="android.intent.category.DEFAULT"/>
  </intent-filter>
)
problem targetsdkversion
 
Upvote 0
Top