Android

ASN1C supports the Android platform. The ASN1C runtime must be deployed on Android just as it must be deployed in a normal JSE environment. However, the runtime's Java bytecode must first be converted into Android (Dalvik VM) bytecode. The easiest method is to use the Android ADT Eclipse Plug-in and reference the ASN1C Java runtime in the same way as you would for a normal Java application. The Android developer tools provide the ability to convert the Java bytecode that is located in any referenced JAR files. The ADT plug-in handles this automatically for you. If you choose not to use the plug-in, Android's command-line tools can provide the same functionality.

For use with Android, the ASN1C Java runtime should be either an unexpired, evaluation runtime or else an unlimited runtime.

Your installation contains a sample Android project in java/sample_ber/AndroidSample. Note that while this sample is located in the sample_ber folder, it is really a catch-all project and it is not strictly a BER-only sample.

Problems with Dalvik VM Verifier?

Our Java runtime is obfuscated, which means it can have some unusual, but legal, bytecode produced by the obfuscator. Sometimes, a particular JVM (or, in this case, the Dalvik VM) doesn’t like bytecode that an obfuscator produces. We first found this was a problem with our unlimited runtimes and so we changed our obfuscation settings. If you have version 6.4.2 (or later) of ASN1C, and are using the unlimited runtime, you should not encounter verification errors.

Using the unlimited runtime would be the typical case for use with Android (per-host-licensing not really being an option). If, however, you are working with the evaluation runtime, you should be sure to have ASN1C version 6.4.3 (or later). Note that we just discovered that the verification errors persisted in our evaluation runtime while in the midst of packaging and releasing our 6.4.3 kits. As a result, we repackaged those kits. If you have an ASN1C 6.4.3 evaluation kit, you should not encounter verification errors on Android. If you do, and you were an early adopter of 6.4.3, you may just need to re-download the evaluation kit. This is likely the case if your runtime JAR file is dated before August 12, 2011.