How to create an Android System App with the Ltouch Panels

Android software stackThe topic we would like to tell you today is how to create an Android System App with the any of the touch panels/tablets Ltouch F, FW (Wifi) or development boards Ltouch S and SW (Wifi). An Android system app is a special kind of application that has higher privileges and does not live in normal user application sandbox.

Example of tasks that can be performed with system apps are:

  • Install and remove other apps
  • Execute commands in super user mode with the Java command: Runtime.getRuntime.exec
  • Low level permission for interacting with the platform
  • Full access to device’s resources

On normal Android devices found on the market, it is usually not possible to create such applications without having two special certificates files. These certificates are provided by the manufacturer and they are located in the source files’ folders and generated when the system is built.

We are happy to announce that all the Ltouch products do not have such limitations therefore all the customers that use Ltouch Android panels are now able to sign their applications with these certificates producing Android system apps running with the highest permissions’ level available.

The procedure to create an Android system app is the following:

  1. In your application’s AndroidManifest.xml file, under the <manifest> tag element, add the attribute android:sharedUserId=”android.uid.system”
  2. Export an unsigned version of your Android application. In Eclipse ADT just right-click on the project >> Android Tools >> Export Unsigned Application Package.
  3. Use the signapk.jar file to sign your application using the two certificate files: platform.x509.pem and platform.pk8 (provided to our customers in the restricted website’s support section):
    java -jar signapk.jar platform.x509.pem platform.pk8 YourApp-unsigned.apk YourApp-signed.apk
    
  4. Deploy the created app into the Ltouch device with
    adb install YourApp-signed.apk
    

    or with any other methods allowed by Android.

That’s it!

Other resources

More information on that topic is available at StackOverflow.

If you are interested in knowing more on the Android System Permissions, take a look at the Guide provided by Google.