Skip to content

Android

Nick Dyer edited this page Oct 29, 2015 · 3 revisions

Android Devices

Android Kernel Versions

Android uses the following Linux kernel versions by default. There is a range of Linux kernel versions which it is possible to run each Android release on. Often a BSP (Board Support Package) is used which has a slightly different Linux version.

See Driver-Integration#branches for the correct branch to use.

Android version Linux kernel version
2.3.x (Gingerbread) 2.6.35
3.0.x (Honeycomb) 2.6.36
4.x (Ice Cream Sandwich) 3.0
4.x (Jelly Bean) 3.0/3.1/3.4
4.4 (Kitkat) 3.4/3.8/3.10
5.0 (Lollipop) 3.16
6.0 (Marshmallow) 3.18

Initialising driver module

Under android, the touch driver can be initialised from the init.rc script:

# atmel touch driver
insmod /system/lib/modules/atmel_mxt_ts.ko
chmod 0777 /sys/bus/i2c/drivers/atmel_mxt_ts/1-004b/debug_enable
chmod 0777 /sys/bus/i2c/drivers/atmel_mxt_ts/1-004b/pause_driver
chmod 0777 /sys/bus/i2c/drivers/atmel_mxt_ts/1-004b/mem_access
write /proc/sys/kernel/dmesg_restrict 0

The chmod/dmesg_restrict lines are used for debug access to the chip for integration purposes. These lines should be removed on shipping builds.

Firmware loader interface

The atmel_mxt_ts driver uses the firmware loader interface to access configuration and firmware files from user space.

The CONFIG_FW_LOADER option must be enabled in the kernel configuration.

On Android systems, files should be placed in the /system/vendor/firmware or /system/etc/firmware directories.

Prior to 4.0 ICS, this patch is required:

http://git.android-x86.org/?p=platform/system/core.git;a=commitdiff;h=b36af46cc0da1ec6d687d3cd195512cca2b74c4c

After 4.0 ICS, the firmware loader is enabled by default and located in system/core/init/devices.c.

IDC file

The Android input layer contains some scaling factors that are applied to normalise the area and pressure (amplitude) as reported up to apps. This is applied prior to gesture detection (eg Android pinch) so it may affect the gestures as they describe.

The parameters are documented here: http://source.android.com/devices/input/touch-devices.html#touchsizecalibration http://source.android.com/devices/input/touch-devices.html#touchpressurecalibration

The values should be calibrated so a reading of 1.0 after scaling corresponds to a standard finger size.

The orientation calibration should be set to touch.orientation.calibration = vector otherwise vector information will be converted incorrectly.

Debugging tools

adb

The adb (Android Debug Bridge) command line utility is used with Android devices to

  • run commands
  • copy files
  • install and uninstall APK files
  • retrieve debugging information (from logcat and dmesg)

It is available from the Google Android Developer site:

http://developer.android.com/sdk/

You will only need to install the "Android SDK Platform-tools" packages using the SDK Manager.

The adb utility must be in your path. On Linux (assuming SDK is unpacked in home directory):

export PATH=$PATH:~/android-sdk-linux_x86/platform-tools

Or on Windows, you will need to ensure appropriate USB drivers are installed, then in cmd.exe:

set PATH=%PATH%;C:\Program Files\Android\android-sdk\platform-tools

mxt-app

The mxt-app utility allows allows the user to manage maXTouch devices from the command line. It is released as open-source through github:

https://github.com/atmel-maxtouch/mxt-app

See the github site for user manual and instructions for building under Android or Linux.

MaxtouchUtility

This utility is an Android application for configuring and troubleshooting maXTouch chips.

An APK can be provided on request from Atmel.

Features include:

  • Read or write object registers.
  • Send commands via Command Processor, for example backup, reset, calibrate.
  • View message output.
  • View raw reference/delta data via a 3D graph.
  • Upload configuration from .xcfg file
  • Save configuration to .raw file
  • Connect remotely over wifi to Socket Bridge Client

ADB Bridge Client

ADB Bridge Client makes it possible to connect maXTouch Studio to an embedded Maxtouch chip via ADB.

ADB bridge client will upload a copy of mxt-app to the device, which is then used to provide the device end of the bridge.

This tool is available on request from Atmel.

getevent

The getevent tool is built into most Android devices. It can capture live event output using adb.

See http://source.android.com/devices/tech/input/getevent.html

Pointer location

Since Ice Cream Sandwich, Android contains a pointer location tool which can be enabled under Settings>Developer options>Pointer location.