Using a Wacom Bamboo with the Nexus 7: Part 1: Making it work (kind of)

image

UPDATE (Nov 18): This no longer works in Android 4.2. I’m looking into alternative ways to accomplish this.

As you can see, I am using my Wacom Bamboo Pen on my Nexus 7. This is the only combination I’ve tried, other Wacom tablets may or may not work on other Android tablets. I’d be interested in hearing if you can get this working on different configurations.

Currently this process takes a bit of work to set up. When I have more time to do so, I might put together an app which automates setup.

Things you must have:
1. If your tablet doesn’t allow you to plug standard USB devices into it, you must own a USB OTG adapter. One end is a micro-usb plug, and the other end is a standard USB socket. This allows you to actually plug the Wacom tablet into your Nexus 7 (or probably other tablet)
2. Your tablet must be rooted. If not, sorry, no dice. You need to be able to write to /system for this to work.
3. Be running a recent version of Android. I’m not sure exactly how recent it has to be; the tablet didn’t do anything at all for me until I was running 4.1.2 (as far as I can remember), so you may require 4.1.2 to be able to do this.

Meet all of those criteria? Cool, let’s move on to some issues specifically relating to the Nexus 7. If your tablet naturally defaults to landscape orientation, you might not hit any of these problems and the tablet might just work, no fiddling required.
Try plugging in your tablet right now. You’ll notice that the scaling is completely screwed up; in portrait mode, the width of the drawing tablet maps to the width of the android tablet. The same can be said of their respective heights. As a result, anything you draw will be squished horizontally and stretched vertically. No good.
It would seem obvious that the fix, then, is to flip the tablet on its side and use it in landscape mode. However– the screen area your drawing tablet maps *does not change* when the screen rotates, so you’re stuck only being able to write on half of the screen, and it is stretched out.

image

There is a fix, however — add the appropriate Input Device Configuration file to tell Android to treat the drawing tablet as a touchScreen device. This causes the drawing tablet to appropriately map to the screen, and works great, with one catch. Android won’t display a mouse cursor when you use the drawing tablet, so you’ll be drawing blind essentially. I’m currently working on an app that displays a marker where you hover your pen, though it needs some more work before I’m comfortable with releasing it.

Alright, so let’s begin. There will be terminal commands, followed by what I am doing in (parentheses).
1. Open up a terminal and type in ‘su’. (gain root access)
2. ‘mount -o rw,remount /system’ (remount /system as read/write)
3. Plug in your drawing tablet.
4. run ‘lsusb’. One of the lines should include “056a” if you’re using a Wacom tablet (other manufacturers have a different identifier. If this applies to you, unplug the tablet, lsusb again, and compare which lines are new.)
I have a line looking like: “Bus 002 Device 002: ID 056a:00d4″. In this case, 056a is the Vendor ID and 00d4 is the Device ID. Those IDs are important, and we’ll need them in the next step.
5. echo “touch.deviceType = touchScreen\ntouch.orientationAware = 0″ > /system/usr/idc/Vendor_056a_Product_00d4.idc (create a file named /system/usr/idc/Vendor_056a_Product_00d4.idc with the following two lines as its contents:
touch.deviceType = touchScreen
touch.orientationAware = 0
If your drawing tablet has different IDs, replace the IDs in the above path. Keep all capitals the same, this is case sensitive.)
6. chmod 644 /system/usr/idc/Vendor_056a_Product_00d4.idc (set appropriate permissions on the file we just made; read/write for root, read for group and everyone else. otherwise, this will not work)
7. Unplug your tablet and plug it in again. It should work. Probably.

5 thoughts on “Using a Wacom Bamboo with the Nexus 7: Part 1: Making it work (kind of)

  1. I have a wacom inkling. When plugged into a computer you can move the cursor with the pen like a drawing tablet with any surface you want. However my nexus 7 only recognize it as a usb memory (by the app “nexus media importer”). Do you think it would be possible to use this method to let it be recognized as a touchscreen device. That combo would really make a wonderful design-on-the-go setup. My intuos 3 works with the otg cable (with wrong proportions, haven´t rooted yet).

  2. Hi,
    I’m trying to make this work too. I have a nexus 7 with SmoothROM 4.2 using Motley kernel.
    So far with this .idc i can see the cursor and wacom tablet is working but using only part of the screen (orientation is correct but proportions are not). Pressure seems to be working in “Markers” (and i can tell it’s there looking at getevent output) but not in sketchbook pro.

    #Vendor_056a_Product_00b0.idc
    touch.deviceType = touchPad
    touch.orientationAware = 0
    touch.pressure.calibration = amplitude
    touch.pressure.scale = 0.0125
    touch.orientation.calibration = vector
    touch.orientation = touch.orientation + PI / 2
    touch.size.calibration = area
    touch.size.bias = 0
    touch.size.isSummed = 0

    I’m still strugging to find the appropiate idc properties to make it work. In case someone wants to give a hand here is some more info:

    Output of `getevent`
    #############################################################
    add device 1: /dev/input/event4
    name: “Wacom Intuos3 4×5″
    events:
    KEY (0001): BTN_0 BTN_1 BTN_2 BTN_3
    BTN_LEFT BTN_RIGHT BTN_MIDDLE BTN_SIDE
    BTN_EXTRA BTN_TOOL_PEN BTN_TOOL_RUBBER BTN_TOOL_BRUSH
    BTN_TOOL_PENCIL BTN_TOOL_AIRBRUSH BTN_TOOL_MOUSE BTN_TOOL_LENS
    BTN_TOUCH BTN_STYLUS BTN_STYLUS2
    REL (0002): REL_WHEEL
    ABS (0003): ABS_X : value 0, min 0, max 25400, fuzz 4, flat 0, resolution 200
    ABS_Y : value 0, min 0, max 20320, fuzz 4, flat 0, resolution 200
    ABS_Z : value 0, min -900, max 899, fuzz 0, flat 0, resolution 0
    ABS_RX : value 0, min 0, max 4096, fuzz 0, flat 0, resolution 0
    ABS_RZ : value 0, min -900, max 899, fuzz 0, flat 0, resolution 0
    ABS_THROTTLE : value 0, min -1023, max 1023, fuzz 0, flat 0, resolution 0
    ABS_WHEEL : value 0, min 0, max 1023, fuzz 0, flat 0, resolution 0
    ABS_PRESSURE : value 0, min 0, max 1023, fuzz 0, flat 0, resolution 0
    ABS_DISTANCE : value 0, min 0, max 63, fuzz 0, flat 0, resolution 0
    ABS_TILT_X : value 0, min 0, max 127, fuzz 0, flat 0, resolution 0
    ABS_TILT_Y : value 0, min 0, max 127, fuzz 0, flat 0, resolution 0
    ABS_MISC : value 0, min 0, max 0, fuzz 0, flat 0, resolution 0
    MSC (0004): MSC_SERIAL
    input props:
    INPUT_PROP_POINTER

    #############################################################

    output of dumpsys input (only relevant part):
    #############################################################
    145: Wacom Intuos3 4×5
    Classes: 0×80000145
    Path: /dev/input/event4
    Descriptor: 9bd100bb3dca4fa187e0cf8037921ee528077b4e
    Location:
    UniqueId:
    Identifier: bus=0×0003, vendor=0x056a, product=0x00b0, version=0×0102
    KeyLayoutFile: /system/usr/keylayout/Generic.kl
    KeyCharacterMapFile: /system/usr/keychars/Generic.kcm
    ConfigurationFile: /system/usr/idc/Vendor_056a_Product_00b0.idc
    HaveKeyboardLayoutOverlay: false

    Device 145: Wacom Intuos3 4×5
    Generation: 627
    IsExternal: true
    Sources: 0×01006513
    KeyboardType: 1
    Motion Ranges:
    X: source=0×00006002, min=0.000, max=799.000, flat=0.000, fuzz=0.031
    Y: source=0×00006002, min=0.000, max=1279.000, flat=0.000, fuzz=0.063
    PRESSURE: source=0×00006002, min=0.000, max=1.000, flat=0.000, fuzz=0.000
    ORIENTATION: source=0×00006002, min=-3.142, max=3.142, flat=0.000, fuzz=0.000
    DISTANCE: source=0×00006002, min=0.000, max=63.000, flat=0.000, fuzz=0.000
    TILT: source=0×00006002, min=0.000, max=1.571, flat=0.000, fuzz=0.000
    VSCROLL: source=0×00006002, min=-1.000, max=1.000, flat=0.000, fuzz=0.000
    Z: source=0×01000010, min=-1.000, max=1.000, flat=0.000, fuzz=0.000
    RX: source=0×01000010, min=-1.000, max=1.000, flat=0.000, fuzz=0.000
    RZ: source=0×01000010, min=-1.000, max=1.000, flat=0.000, fuzz=0.000
    THROTTLE: source=0×01000010, min=0.000, max=1.000, flat=0.000, fuzz=0.000
    WHEEL: source=0×01000010, min=-1.000, max=1.000, flat=0.000, fuzz=0.000
    Keyboard Input Mapper:
    Parameters:
    HasAssociatedDisplay: false
    OrientationAware: false
    KeyboardType: 1
    Orientation: 0
    KeyDowns: 0 keys currently down
    MetaState: 0×0
    DownTime: 0
    Touch Input Mapper:
    Parameters:
    GestureMode: spots
    DeviceType: pointer
    AssociatedDisplay: hasAssociatedDisplay=true, isExternal=false
    OrientationAware: false
    Raw Touch Axes:
    X: min=0, max=25400, flat=0, fuzz=4, resolution=200
    Y: min=0, max=20320, flat=0, fuzz=4, resolution=200
    Pressure: min=0, max=1023, flat=0, fuzz=0, resolution=0
    TouchMajor: unknown range
    TouchMinor: unknown range
    ToolMajor: unknown range
    ToolMinor: unknown range
    Orientation: unknown range
    Distance: min=0, max=63, flat=0, fuzz=0, resolution=0
    TiltX: min=0, max=127, flat=0, fuzz=0, resolution=0
    TiltY: min=0, max=127, flat=0, fuzz=0, resolution=0
    TrackingId: unknown range
    Slot: unknown range
    Calibration:
    touch.size.calibration: none
    touch.pressure.calibration: physical
    touch.orientation.calibration: none
    touch.distance.calibration: scaled
    Viewport: displayId=0, orientation=1, logicalFrame=[0, 0, 1280, 800], physicalFrame=[0, 0, 1280, 800], deviceSize=[1280, 800]
    SurfaceWidth: 800px
    SurfaceHeight: 1280px
    SurfaceLeft: 0
    SurfaceTop: 0
    SurfaceOrientation: 0
    Translation and Scaling Factors:
    XTranslate: 0.000
    YTranslate: 0.000
    XScale: 0.031
    YScale: 0.063
    XPrecision: 31.751
    YPrecision: 15.876
    GeometricScale: 0.047
    PressureScale: 0.001
    SizeScale: 0.000
    OrientationScale: 0.000
    DistanceScale: 1.000
    HaveTilt: true
    TiltXCenter: 63.500
    TiltXScale: 0.017
    TiltYCenter: 63.500
    TiltYScale: 0.017
    Last Button State: 0×00000000
    Last Raw Touch: pointerCount=0
    Last Cooked Touch: pointerCount=0
    Pointer Gesture Detector:
    XMovementScale: 0.037
    YMovementScale: 0.037
    XZoomScale: 0.014
    YZoomScale: 0.014
    MaxSwipeWidth: 8132.319336
    Joystick Input Mapper:
    Axes:
    Z: min=-1.00000, max=1.00000, flat=0.00000, fuzz=0.00000
    scale=0.00111, offset=0.00056, highScale=0.00111, highOffset=0.00056
    rawAxis=2, rawMin=-900, rawMax=899, rawFlat=0, rawFuzz=0, rawResolution=0
    RX: min=-1.00000, max=1.00000, flat=0.00000, fuzz=0.00000
    scale=0.00049, offset=-1.00000, highScale=0.00049, highOffset=-1.00000
    rawAxis=3, rawMin=0, rawMax=4096, rawFlat=0, rawFuzz=0, rawResolution=0
    RZ: min=-1.00000, max=1.00000, flat=0.00000, fuzz=0.00000
    scale=0.00111, offset=0.00056, highScale=0.00111, highOffset=0.00056
    rawAxis=5, rawMin=-900, rawMax=899, rawFlat=0, rawFuzz=0, rawResolution=0
    THROTTLE: min=0.00000, max=1.00000, flat=0.00000, fuzz=0.00000
    scale=0.00049, offset=0.00000, highScale=0.00049, highOffset=0.00000
    rawAxis=6, rawMin=-1023, rawMax=1023, rawFlat=0, rawFuzz=0, rawResolution=0
    WHEEL: min=-1.00000, max=1.00000, flat=0.00000, fuzz=0.00000
    scale=0.00196, offset=-1.00000, highScale=0.00196, highOffset=-1.00000
    rawAxis=8, rawMin=0, rawMax=1023, rawFlat=0, rawFuzz=0, rawResolution=0
    Configuration:
    ExcludedDeviceNames: []
    VirtualKeyQuietTime: 0.0ms
    PointerVelocityControlParameters: scale=1.000, lowThreshold=500.000, highThreshold=3000.000, acceleration=3.000
    WheelVelocityControlParameters: scale=1.000, lowThreshold=15.000, highThreshold=50.000, acceleration=4.000
    PointerGesture:
    Enabled: true
    QuietInterval: 100.0ms
    DragMinSwitchSpeed: 50.0px/s
    TapInterval: 150.0ms
    TapDragInterval: 300.0ms
    TapSlop: 20.0px
    MultitouchSettleInterval: 100.0ms
    MultitouchMinDistance: 15.0px
    SwipeTransitionAngleCosine: 0.3
    SwipeMaxWidthRatio: 0.2
    MovementSpeedRatio: 0.8
    ZoomSpeedRatio: 0.3

    Input Dispatcher State:
    DispatchEnabled: 1
    DispatchFrozen: 0
    FocusedApplication: name=’AppWindowToken{41c33ec0 token=Token{40efeb00 ActivityRecord{40f24150 u0 jackpal.androidterm/.Term}}}’, dispatchingTimeout=5000.000ms
    FocusedWindow: name=’Window{41317e98 u0 jackpal.androidterm/jackpal.androidterm.Term}’
    TouchDown: false
    TouchSplit: false
    TouchDeviceId: -1
    TouchSource: 0×00000000
    TouchDisplayId: -1
    TouchedWindows:
    ############################################################

  3. When I updated to 4.2 I found that this stopped working. I’m pretty sure that it just can’t be done anymore, I spent some time trying all sorts of different options in the idc to no avail.

  4. It works fine with my nexus 7 – 4.2.1 – paranoid android rom + wakom intuos4. but it still cut of the half of the screen on landscape mode. does anybody has a solution for this?

  5. I realize this page is over a year old, but this is the only page I could find that helped me solve the problem. I am using a generic tablet with a rockchip processor running a very-nearly stock android 4.2.2. My wacom tablet now works in portrait orientation for portrait mode and landscape orientation for landscape mode. When I use touch gestures, it displays a circle. When I use the stylus, it displays an arrow.

    The instructions as stated by others on this page didn’t quite work for me, but they definitely sent me in the right direction.

    I used the following command to find the name of my devices.

    adb shell dumpsys input | grep -i bamboo

    In my case, the device names are:

    Wacom Bamboo 2FG 4×5 Pen
    Wacom Bamboo 2FG 4×5 Finger

    I created the following two files, using the device names:

    /system/usr/idc/Wacom_Bamboo_2FG_4x5_Pen.idc
    /system/usr/idc/Wacom_Bamboo_2FG_4x5_Finger.idc

    The contents of those files are the same:

    touch.deviceType = default
    touch.orientationAware = 1

Leave a Reply