Coder Social home page Coder Social logo

sample-usbenum's People

Contributors

atn832 avatar devunwired avatar irataxy avatar mangini avatar omcsesz avatar proppy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sample-usbenum's Issues

Crashes when an Arduino Yun ic connected via Usb

The sample app crashes when an Arduino Yun is connected to the Raspberry Pi running Android Things.

Log

FATAL EXCEPTION: main
Process: com.example.androidthings.usbenum, PID: 7369
java.lang.ArrayIndexOutOfBoundsException: length=64; index=64
at com.example.androidthings.usbenum.ConfigurationDescriptor.parseResponse(ConfigurationDescriptor.java:125)
at com.example.androidthings.usbenum.ConfigurationDescriptor.fromDeviceConnection(ConfigurationDescriptor.java:54)
at com.example.androidthings.usbenum.UsbActivity.printDeviceDetails(UsbActivity.java:155)
at com.example.androidthings.usbenum.UsbActivity.handleIntent(UsbActivity.java:96)
at com.example.androidthings.usbenum.UsbActivity.onNewIntent(UsbActivity.java:61)
at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1223)
at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1235)
at android.app.ActivityThread.deliverNewIntents(ActivityThread.java:2783)
at android.app.ActivityThread.performNewIntents(ActivityThread.java:2795)
at android.app.ActivityThread.handleNewIntent(ActivityThread.java:2804)
at android.app.ActivityThread.-wrap15(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1539)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

Host and Accessory communication(NOT AN ISSUE)

I'm encountering difficulties establishing communication between two Android devices, where one is designated as the host and the other as the accessory. I attempted to utilize the usb-serial-for-android library on one device and connected the two devices using a wired connection. However, I'm facing issues in establishing a connection and facilitating communication between the devices.

DeviceList is always empty on Android 9

My setup

  • macOS 10.14
  • Android Studio 3.5.3
  • Android 9
  • adb: 1.0.41 Version 29.0.5-5949299

Running the app, after upgrading ext.kotlin_version to 1.3.50 to make it build, just gives me empty device list when it's connected with a USB cable to a macOS with Android Studio 3.5.3 installed.

Here is my adb logcat

2019-12-26 18:08:40.435 10616-10616/? I/dthings.usbenu: Late-enabling -Xcheck:jni
2019-12-26 18:08:40.536 10616-10629/? I/dthings.usbenu: The ClassLoaderContext is a special shared library.
2019-12-26 18:08:40.562 10616-10629/? I/dthings.usbenu: The ClassLoaderContext is a special shared library.
2019-12-26 18:08:40.686 10616-10616/? I/Perf: Connecting to perf service.
2019-12-26 18:08:40.676 10616-10616/? W/embryo: type=1400 audit(0.0:1631): avc: denied { read } for name="u:object_r:vendor_iop_prop:s0" dev="tmpfs" ino=16888 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:vendor_iop_prop:s0 tclass=file permissive=0
2019-12-26 18:08:40.676 10616-10616/? W/embryo: type=1400 audit(0.0:1632): avc: denied { read } for name="u:object_r:vendor_iop_prop:s0" dev="tmpfs" ino=16888 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:vendor_iop_prop:s0 tclass=file permissive=0
2019-12-26 18:08:40.692 10616-10616/? E/libc: Access denied finding property "vendor.perf.iop_v3.enable"
2019-12-26 18:08:40.692 10616-10616/? E/libc: Access denied finding property "vendor.perf.iop_v3.enable.debug"
2019-12-26 18:08:40.694 10616-10616/? E/libc: Access denied finding property "vendor.perf.iop_v3.enable"
2019-12-26 18:08:40.694 10616-10616/? E/libc: Access denied finding property "vendor.perf.iop_v3.enable.debug"
2019-12-26 18:08:40.676 10616-10616/? W/embryo: type=1400 audit(0.0:1633): avc: denied { read } for name="u:object_r:vendor_iop_prop:s0" dev="tmpfs" ino=16888 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:vendor_iop_prop:s0 tclass=file permissive=0
2019-12-26 18:08:40.700 10616-10616/? D/Embryo: preload com.example.androidthings.usbenum, 53ms, hwui=true, layout=true, decor=false
2019-12-26 18:08:40.704 10616-10642/? D/OpenGLRenderer: Skia GL Pipeline
2019-12-26 18:08:42.865 10616-10616/com.example.androidthings.usbenum E/libc: Access denied finding property "vendor.perf.iop_v3.enable"
2019-12-26 18:08:42.865 10616-10616/com.example.androidthings.usbenum E/libc: Access denied finding property "vendor.perf.iop_v3.enable.debug"
2019-12-26 18:08:42.846 10616-10616/com.example.androidthings.usbenum W/dthings.usbenum: type=1400 audit(0.0:1635): avc: denied { read } for name="u:object_r:vendor_iop_prop:s0" dev="tmpfs" ino=16888 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:vendor_iop_prop:s0 tclass=file permissive=0
2019-12-26 18:08:42.870 10616-10616/com.example.androidthings.usbenum V/Font: Change font:2
2019-12-26 18:08:42.889 10616-10616/com.example.androidthings.usbenum E/libc: Access denied finding property "vendor.perf.iop_v3.enable"
2019-12-26 18:08:42.876 10616-10616/com.example.androidthings.usbenum W/dthings.usbenum: type=1400 audit(0.0:1637): avc: denied { read } for name="u:object_r:vendor_iop_prop:s0" dev="tmpfs" ino=16888 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:vendor_iop_prop:s0 tclass=file permissive=0
2019-12-26 18:08:42.889 10616-10616/com.example.androidthings.usbenum E/libc: Access denied finding property "vendor.perf.iop_v3.enable.debug"
2019-12-26 18:08:42.876 10616-10616/com.example.androidthings.usbenum W/dthings.usbenum: type=1400 audit(0.0:1638): avc: denied { read } for name="u:object_r:vendor_iop_prop:s0" dev="tmpfs" ino=16888 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:vendor_iop_prop:s0 tclass=file permissive=0
2019-12-26 18:08:42.890 10616-10616/com.example.androidthings.usbenum E/libc: Access denied finding property "vendor.perf.iop_v3.enable.debug"
2019-12-26 18:08:42.876 10616-10616/com.example.androidthings.usbenum W/dthings.usbenum: type=1400 audit(0.0:1640): avc: denied { read } for name="u:object_r:vendor_iop_prop:s0" dev="tmpfs" ino=16888 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:vendor_iop_prop:s0 tclass=file permissive=0
2019-12-26 18:08:42.914 10616-10616/com.example.androidthings.usbenum I/UsbEnumerator: Device List
2019-12-26 18:08:42.914 10616-10616/com.example.androidthings.usbenum I/UsbEnumerator: No Devices Currently Connected
2019-12-26 18:08:42.923 10616-10616/com.example.androidthings.usbenum E/libc: Access denied finding property "vendor.perf.iop_v3.enable"
2019-12-26 18:08:42.906 10616-10616/com.example.androidthings.usbenum W/dthings.usbenum: type=1400 audit(0.0:1641): avc: denied { read } for name="u:object_r:vendor_iop_prop:s0" dev="tmpfs" ino=16888 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:vendor_iop_prop:s0 tclass=file permissive=0
2019-12-26 18:08:42.923 10616-10616/com.example.androidthings.usbenum E/libc: Access denied finding property "vendor.perf.iop_v3.enable.debug"
2019-12-26 18:08:42.906 10616-10616/com.example.androidthings.usbenum W/dthings.usbenum: type=1400 audit(0.0:1642): avc: denied { read } for name="u:object_r:vendor_iop_prop:s0" dev="tmpfs" ino=16888 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:vendor_iop_prop:s0 tclass=file permissive=0
2019-12-26 18:08:42.943 10616-10668/com.example.androidthings.usbenum D/DecorView: onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@5fbb7be[UsbActivity]
2019-12-26 18:08:42.944 10616-10642/com.example.androidthings.usbenum I/Adreno: QUALCOMM build                   : f909f5a, Ida6448821d
    Build Date                       : 11/12/18
    OpenGL ES Shader Compiler Version: EV031.25.03.00
    Local Branch                     : 
    Remote Branch                    : refs/tags/AU_LINUX_ANDROID_LA.UM.7.3.R1.08.00.00.423.039
    Remote Branch                    : NONE
    Reconstruct Branch               : NOTHING
2019-12-26 18:08:42.944 10616-10642/com.example.androidthings.usbenum I/Adreno: Build Config                     : S P 6.0.3 AArch64
2019-12-26 18:08:42.936 10616-10616/com.example.androidthings.usbenum W/RenderThread: type=1400 audit(0.0:1643): avc: denied { search } for name="proc" dev="debugfs" ino=16694 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:qti_debugfs:s0 tclass=dir permissive=0
2019-12-26 18:08:42.946 10616-10642/com.example.androidthings.usbenum I/Adreno: PFP: 0x016ee170, ME: 0x00000000
2019-12-26 18:08:42.949 10616-10642/com.example.androidthings.usbenum I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 1
2019-12-26 18:08:42.949 10616-10642/com.example.androidthings.usbenum I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
2019-12-26 18:08:42.950 10616-10642/com.example.androidthings.usbenum I/OpenGLRenderer: Initialized EGL, version 1.4
2019-12-26 18:08:42.950 10616-10642/com.example.androidthings.usbenum D/OpenGLRenderer: Swap behavior 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.