Enable Pen Mode - Any pen or pencil works as stylus!

Search This thread

RJASSI21

Senior Member
Oct 20, 2013
1,364
202
Can this work on xperia z2 tablet? I got the apk and get toast notification saying enabled and disabled but tried with pencil didnt work is it just pen?
 

macdonx

Member
Oct 19, 2010
16
0
Xperia Z3

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.
dhlBCBa.png

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.

Will this work on Xperia Z3?
 

Emrul

Senior Member
Dec 30, 2009
329
21
Chittagong
Thx a lot Bro. Great mode.

Tried adding asked 2 lines in hw and installing pen mode apk. Working perfectly with Metal and Pencil. But not working with pen. :)

Z1, 4.4.4 rooted stock
 
Last edited:

sfex3best

Senior Member
Jun 27, 2011
420
44
Just tested on the Xperia z3 but it doesn't seem to work.
It does have the clearpad pen file but for some reason it just doesn't activate.
I tried manually too changing the 0 to 1 but nope even if I change it to 1 and click save it ends up turning back to 0.
 

NexusGTS

Senior Member
Dec 23, 2012
1,135
416
Bucharest
That's weird: I could never get Glove Mode to work. Can you elaborate on how this works? Once you enable this setting, how can you test it?
With none of my (thin) gloves this setting ever worked. What am I doing wrong?

i don't know m8 . I just enabled the glowe mode and pen mode and both are working , i didn't do anything :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 108
    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.
    https://drive.google.com/open?id=0B0j3VJ1Xp5N8ZWtYVlRRYWNPSWM

    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.
    https%3A%2F%2Fxdaforums.com%2Fimg.xda-cdn.com%2F3psQZNR6iMeCfoBbGC_5CsqK-qI%3D%2Fhttps%253A%252F%252Fxdaforums.com%252Fimg.xda-cdn.com%252F6Xmqv68Q_UGmFCvylGTImd3CaEE%253D%252Fhttp%25253A%25252F%25252Fi.imgur.com%25252FdhlBCBa.png

    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.
    7
    I tried in hw and in init.d, but it doesn't work, also clearpad doesn't look like folder when i browse with root explorer it looks like file??

    clearpad folder looks like this:
    dza0Wfz.png


    Please try my toggle app, this will change pen's 0 to 1.
    http://d-h.st/5az
    7
    And I get no credit for finding it, and adding it to XperiaSettings app first :crying: :crying:

    Haha. Just kidding.
    Nice to see someone wrote up all the instructions and got the tasker app for stock too. :cowboy: I was about to open a thread to mention this can be done on stock too, but I had work and forgot about it. Thank you for posting this.

    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, create init.d script:
    Code:
    #!/system/bin/sh
    chown system:system /sys/devices/virtual/input/clearpad/pen
    echo 1 > /sys/devices/virtual/input/clearpad/pen
    or add these lines at the bottom of hw_config.sh:
    Code:
    chown system:system /sys/devices/virtual/input/clearpad/pen
    echo 1 > /sys/devices/virtual/input/clearpad/pen
    Now you can use anything made of wood, metal or rubber.
    I couldn't use a plastic pen, though...

    [UPDATE]
    I created pen mode enable/disable toggle app with Tasker.
    http://d-h.st/mZl

    I recommend changing one value in /system/usr/idc/clearpad_pen.idc for more sensitiveness.
    Change
    Code:
    # Pressure
    touch.pressure.scale = 0.2
    to
    Code:
    # Pressure
    touch.pressure.scale = 0.1
    dhlBCBa.png


    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 AOKP for infomation.
    4
    I update my app's toggle method, it uses "cat /sys/devices/virtual/input/clearpad/pen" now.
    http://d-h.st/mZl

    I recommend changing one value in /system/usr/idc/clearpad_pen.idc for more sensitivity.
    With default settings, it made broken lines (due to screen not rsponed to touch) when I write something but 0.1 is fine for me.
    Change
    Code:
    # Pressure
    touch.pressure.scale = 0.2
    to
    Code:
    # Pressure
    touch.pressure.scale = 0.1
    3
    this is a video I made showing the phone while using this mod! thank you so much! it is awesome !

    https://www.youtube.com/watch?v=bdXi07KpWHE