One interesting function Sony touted for their phablet, the Xperia Z Ultra, is its ability to react to ordinary pens and pencils—yes, pens and pencils—as a styli. Putting aside the obvious concern of scratching and ruining your phone’s screen with a pen, it’s still definitely a unique differentiating factor when you’re comparing different phablets.
Well, it turns out that the Xperia Z1’s screen also has this same capability, except it was disabled by Sony for some reason or another. First implemented in an AOKP ROM for the device, XDA Senior Member RyokoN has now made the this function available to any owner of the Xperia Z1 running the official firmware.
In order to get this working, you must edit edit hw_config.sh, or create an init.d script with the lines of code given by RyokoN. Don’t worry if this sounds a bit too brief and incomplete, as RyokoN has provided all the necessary steps and information to get this rather simple mod up and running. And for users of Tasker, RyokoN has also created an app to get Pen mode working with Tasker.
This mod is only compatible with materials made of metal, wood, and lead, so plastic and anything else will not work. If you want to give this a try, head over to the original thread for more information._________