AOKP introduced pen mode for Z1 and I could enable it on stock ROM!
Xperia Z Ultra can use the pen or pencil made of wood or metal as stylus, but Z1's screen also supports it and Sony disabled it for some reason.
root is needed to enable this.
To enable pen mode, there's three methods.
One of them is enough.
● Create init.d script in /system/etc/init.d (requires init.d support):
Code:
#!/system/bin/sh
chown system:system /sys/devices/virtual/input/clearpad/pen
echo 1 > /sys/devices/virtual/input/clearpad/pen
● Add these lines at the bottom of /system/etc/hw_config.sh:
Code:
chown system:system /sys/devices/virtual/input/clearpad/pen
echo 1 > /sys/devices/virtual/input/clearpad/pen
● Use toggle app
I created pen mode enable/disable toggle app with Tasker.
http://d-h.st/mZl
Now you can use anything made of wood, metal or rubber.
I couldn't use a plastic pen, though...
I recommend changing one value in /system/usr/idc/clearpad_pen.idc for more accuracy.
Change
Code:
# Pressure
touch.pressure.scale = 0.2
to
Code:
# Pressure
touch.pressure.scale = 0.1
works for me.
In /sys/devices/virtual/input/clearpad/,
there is "grove" but I could only show circle with pen and I couldn't use with glove.
http://i.imgur.com/RibpIAi.png
Thanks
championswimmer for finding this.