There's an issue on Android apparently, log snippet below. This used to work a while ago, must be some recentish regression. I'll see if I can bisect it. Log: D AndroidRuntime: Shutting down VM E AndroidRuntime: FATAL EXCEPTION: main E AndroidRuntime: Process: org.sigrok.pulseview, PID: 11898 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.sigrok.pulseview/org.sigrok.pulseview.PulseViewActivity}: java.lang.NumberFormatException: For input string: "ed72" E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2947) E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3008) E AndroidRuntime: at android.app.ActivityThread.-wrap14(ActivityThread.java) E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650) E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) E AndroidRuntime: at android.os.Looper.loop(Looper.java:154) E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6688) E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468) E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358) E AndroidRuntime: Caused by: java.lang.NumberFormatException: For input string: "ed72" E AndroidRuntime: at java.lang.Integer.parseInt(Integer.java:521) E AndroidRuntime: at java.lang.Integer.parseInt(Integer.java:556) E AndroidRuntime: at org.sigrok.androidutils.UsbSupplicant$DeviceFilter.read(Unknown Source) E AndroidRuntime: at org.sigrok.androidutils.UsbSupplicant.addDeviceFilters(Unknown Source) E AndroidRuntime: at org.sigrok.androidutils.UsbSupplicant.<init>(Unknown Source) E AndroidRuntime: at org.sigrok.pulseview.PulseViewActivity.onCreate(PulseViewActivity.java:35) E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6912) E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126) E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2900) E AndroidRuntime: ... 9 more D Debug : !@DumpState : SHIP D Debug : !@DumpState : debug level:0x4f4c D Debug : !@Dumpstate : Finally, system will skip dumpstate
It seems to be coming from parsing of the device_filter.xml file - "ed72" is a USB product-id: device_filter.xml: <usb-device vendor-id="0403" product-id="ed72" /> It's the first non-decimal one. I guess it's trying to parse it as decimal, which would be breaking all the others too, since they look decimal but are in fact hex.
The regression was introduced by commit 358e7b42e070e78c986338bafa74ea786eb885bc in sigrok-androidutils, which replaced the numbers _which are supposed to be decimal_ with hex ones.
Decimal VIDs and PIDs are very awkward. Maybe a source (hex) file and conversion script may be in order to generate the real (decimal) file from a list of VID/PID pairs in HEX format.
Oops, my bad. Sorry! Is there an easy way to have sigrok-androidutils accept the numbers as hex? Otherwise it should also be doable to have "make update-device-filter" perform a hex->decimal conversion, I guess.
The <usb-device> tag is defined by Google^H^H^H^H^H^HAlphabet. If we don't want to take over maintainership of Android we should not try to change it. :-) Having the make target do a conversion should be fine.
Yup, ok. Any volunteers for making "make update-device-filter" do the hex->decimal conversion? Should be doable with sed or awk or perl or such; not sure when I'll have the time to look into this.
Here's some hints that could be of use: http://stackoverflow.com/questions/4614775/converting-hex-to-decimal-in-awk-or-sed Not sure about having it as a one-liner considering the format...
Fixed in sigrok-androidutils in 2606541de1a91657c0001c0ea573d537069e2332, thanks! The fix is a even a bit nicer than having the Makefile target generate decimal numbers; it changes sigrok-androidutils to do the conversion in its Java code. This means the XML file still lists the IDs in hex which makes it easier to compare them against lsusb output or the udev rules file from libsigrok.
That is _not_ nicer. I thought I explained this: The <usb-device> tag is an official Android tag defined by Google. Putting hex numbers in it is incorrect and incompatible use. In addition to the confusion caused by using the same tag in an incompatibe way, it makes it impossible to use the XML as meta-data for the android.hardware.usb.action.USB_DEVICE_ATTACHED intent, which is also an intended use case...
Correct fix my marcus_c merged as 7156d3ec4d9e959d91b7627758dc9004d3a328b6, thanks a lot!