How to use a pen or pencil as stylus on your Sony Xperia Z1 display
It turns out that the 5" display on the Xperia Z1 also supports that feature, but Sony hasn't enabled it out of the box, for some reason.
If you are the proud owner of Sony's 20 MP flagship, and want the ability to write directly on the display with a pencil or pen, you don't even have to change ROMs or anything, just enable the feature with some system editing.
You will need to be rooted, of course, and we won't tell you how to do it, but there are plenty of easy guides online, as the procedure is pretty straightforward. Next off, you need to write some code. We kid, just a system file edit will be enough, and there is an even easier way, too:
1. Download the Pen Mode file - it's in a simple APK form, so you can sideload and install it. The file is a Tasker app macro, which enables the pen and pencil mode on your Xperia Z1.
2. A much geekier and more rewarding way is to edit the hw_config.sh file. Use ES File Explorer (a free download from the Play Store), and navigate to /system/etc/hw_config.sh, then add the following lines at the end of the file:
3. That's it, and if you find that the pressure sensitivity is iffy, it's advisable to change a value in the value in the /system/usr/idc/clearpad_pen.idc file. Navigate there, and edit one number as follows:
That's pretty much it, and now you can enjoy scribbling with a regular pen or pencil, whatever you have handy, on the display of the Xperia Z1. Those who immediately started thinking to try that on the Xperia Z, too, are in for a disappointment, as it uses a different digitizer.
source: RyokoN (XDA-Devs)