Friday, September 12, 2014

Java System.getProperties() on various platforms

Here is a handy comparison of Java System.getProperties() on various platforms, in case you are ever trying to detect what OS you are running on.  What is interesting is how Android reports itself as Linux, but it looks like there are some other candidate properties that will give you a clue that it is Android.






Windows 7LinuxAndroid
file.encoding.pkg=sun.io
file.encoding=ANSI_X3.4-1968
file.separator=/
java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
java.awt.printerjob=sun.print.PSPrinterJob
java.class.path=./bin:./lib/jmxtools.jar:./lib/common...
java.class.version=49.0
java.endorsed.dirs=/usr/java/jre1.5.0_06/lib/endorsed
java.ext.dirs=/usr/java/jre1.5.0_06/lib/ext
java.home=/usr/java/jre1.5.0_06
java.io.tmpdir=/tmp
java.library.path=/usr/java/jre1.5.0_06/lib/i386/client...
java.runtime.name=Java(TM) 2 Runtime Environment, Stand...
java.runtime.version=1.5.0_06-b05
java.specification.name=Java Platform API Specification
java.specification.vendor=Sun Microsystems Inc.
java.specification.version=1.5
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport...
java.vendor.url=http://java.sun.com/
java.vendor=Sun Microsystems Inc.
java.version=1.5.0_06
java.vm.info=mixed mode
java.vm.name=Java HotSpot(TM) Client VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Sun Microsystems Inc.
java.vm.specification.version=1.0
java.vm.vendor=Sun Microsystems Inc.
java.vm.version=1.5.0_06-b05
line.separator=
os.arch=i386
os.name=Linux
os.version=2.4.21-37.ELsmp
path.separator=:
sun.arch.data.model=32
sun.boot.class.path=./lib/mx4j.jar:./lib/mx4j-remote.jar:...
sun.boot.library.path=/usr/java/jre1.5.0_06/lib/i386
sun.cpu.endian=little
sun.cpu.isalist=
sun.io.unicode.encoding=UnicodeLittle
sun.jnu.encoding=ANSI_X3.4-1968
sun.management.compiler=HotSpot Client Compiler
sun.os.patch.level=unknown
user.country=US
user.dir=/root/proto/sa
user.home=/root
user.language=en
user.name=root
user.timezone=America/Los_Angeles
file.encoding.pkg=sun.io
file.encoding=ANSI_X3.4-1968
file.separator=/
java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
java.awt.printerjob=sun.print.PSPrinterJob
java.class.path=./bin:./lib/jmxtools.jar:./lib/common...
java.class.version=49.0
java.endorsed.dirs=/usr/java/jre1.5.0_06/lib/endorsed
java.ext.dirs=/usr/java/jre1.5.0_06/lib/ext
java.home=/usr/java/jre1.5.0_06
java.io.tmpdir=/tmp
java.library.path=/usr/java/jre1.5.0_06/lib/i386/client...
java.runtime.name=Java(TM) 2 Runtime Environment, Stand...
java.runtime.version=1.5.0_06-b05
java.specification.name=Java Platform API Specification
java.specification.vendor=Sun Microsystems Inc.
java.specification.version=1.5
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport...
java.vendor.url=http://java.sun.com/
java.vendor=Sun Microsystems Inc.
java.version=1.5.0_06
java.vm.info=mixed mode
java.vm.name=Java HotSpot(TM) Client VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Sun Microsystems Inc.
java.vm.specification.version=1.0
java.vm.vendor=Sun Microsystems Inc.
java.vm.version=1.5.0_06-b05
line.separator=
os.arch=i386
os.name=Linux
os.version=2.4.21-37.ELsmp
path.separator=:
sun.arch.data.model=32
sun.boot.class.path=./lib/mx4j.jar:./lib/mx4j-remote.jar:...
sun.boot.library.path=/usr/java/jre1.5.0_06/lib/i386
sun.cpu.endian=little
sun.cpu.isalist=
sun.io.unicode.encoding=UnicodeLittle
sun.jnu.encoding=ANSI_X3.4-1968
sun.management.compiler=HotSpot Client Compiler
sun.os.patch.level=unknown
user.country=US
user.dir=/root/proto/sa
user.home=/root
user.language=en
user.name=root
user.timezone=America/Los_Angeles
android.icu.library.version = 4.8.1.1
android.icu.unicode.version = 6.0
android.openssl.version = OpenSSL 1.0.1c 10 May 2012
android.zlib.version = 1.2.6.f-codeaurora-mods-v1
file.encoding = UTF-8
file.separator = /
http.agent = Dalvik/1.6.0 (Linux; U; Android 4.1.2; SAMSUNG-SGH-I547 Build/JZO54K)
java.boot.class.path = /system/framework/core.jar:...
java.class.path = .
java.class.version = 50.0
java.compiler = 
java.ext.dirs = 
java.home = /system
java.io.tmpdir = /data/data/com.demo.android.simple/cache
java.library.path = /vendor/lib:/system/lib
java.runtime.name = Android Runtime
java.runtime.version = 0.9
java.specification.name = Dalvik Core Library
java.specification.vendor = The Android Project
java.specification.version = 0.9
java.vendor = The Android Project
java.vendor.url = http://www.android.com/
java.version = 0
java.vm.name = Dalvik
java.vm.specification.name = Dalvik Virtual Machine Specification
java.vm.specification.vendor = The Android Project
java.vm.specification.version = 0.9
java.vm.vendor = The Android Project
java.vm.vendor.url = http://www.android.com/
java.vm.version = 1.6.0
line.separator = 
os.arch = armv7l
os.name = Linux
os.version = 3.0.31-1371191
path.separator = :
user.dir = /
user.home = 
user.language = en
user.name = 
user.region = US

Monday, January 13, 2014

Cisco CP-DX650 USB driver for Android ADB

Grrr!  Why doesn't Cisco make their documentation easier to find?  After days of searching, I finally found the solution.  See


Apparently, there is a developer kit called the "Cisco DX650 Add-on".  More importantly, it has instructions on how to install the USB driver.  In case that link goes stale in the future, let me highlight the salient points:

  1. Install Android SDK (duh)
  2. Install the Google USB Driver (duh)
  3. Edit ...\android-sdk-windows\usb_driver\android_winusb.inf
  4. Add the following lines under [Google.NTx86] and [Google.NTamd64]
    ;Cisco DX650
    %SingleAdbInterface% = USB_Install, USB\VID_0451&PID_D109
    %CompositeAdbInterface% = USB_Install, USB\VID_0451&PID_D109&MI_01
    %CompositeAdbInterface% = USB_Install, USB\VID_0451&PID_D109&MI_02
  5. Save and close it
  6. Connect the device to your PC
  7. You may need to specify the location of the driver as
    ...\android-sdk-windows\usb_driver\
  8. Enjoy!