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

Search This thread

algarues

Senior Member
Feb 14, 2011
297
30
Samsung Galaxy S10
I am rooted and I also have tasker installed but I cannot install your apk

when I tap on it I get the installation screen but I can tap only on cancel, install does not work.....
 

olokos

Recognized Developer
Oct 16, 2011
2,945
2,494
Warsaw
Any chance for calibrating it except for that file ryo?

Wysłane z mojego C6903 przy użyciu Tapatalka
 

algarues

Senior Member
Feb 14, 2011
297
30
Samsung Galaxy S10
Make sure you are not running overlay apps such as BatteryMix and enable Unknown sorces

Thank you for your help,

In the end I decided to enable or disable it via 2 scripts that I launch using the scripter utility from rom toolbox.

It works

Anyway here is what my impression are:

1. when pen mode is enabled the display becomes a 1-point touch screen, that is if you touch the screen before laying your pen or finger, any other touch following it is undetected

this also mean that if you lay your hand on the screen first, the stylus touching it or your finger will not be detected

the question is whether this is the same behaviour on the ultra,

because if the ultra is still multitouch with pen mode enabled and if the screen technology is the same of the z1, then there is still some unknown setting to tinker with, which might also improve writing performance

2. I noticed that without changing the screen sensitivity, the writing efficiency changes based on the # of the lead of a pencil, so your mileage may vary depending on the "stylus" that you use

3. I tried today to test some "professional" styluses such as adonit jot pro or similar, but I couldn' t because the shop where I went did not have any available to test before hand for buyers

I also asked if I could test the Ultra stylus, but when the shop assistant opened the box with me, we realized that the stylus (at least) in germany is not sold with the phone.

It would be interesting to test the pen mode on the z1 with either the ultra stylus or an adonit and see how good it goes

Does anybody in this forum have the chance to do something like that and let us know?

---------- Post added at 01:08 AM ---------- Previous post was at 12:21 AM ----------

I found a couple of videos

This is the sony-made stylus for the ultra

http://www.youtube.com/watch?v=LMZD3qvinRA

In this italian video it is also said that it can write with a pencil without lead, more importantly it shows that while accepting pen input, the ultra still is multitouch, so maybe additional seetings have to be changed or maybe some software might be ported from the ultra to the z1

http://www.youtube.com/watch?v=buYLYzM1HGY

this other video shows a comparative test with different "styluses"

http://www.youtube.com/watch?v=GnxRxtm1H9c
 

algarues

Senior Member
Feb 14, 2011
297
30
Samsung Galaxy S10
Make sure you are not running overlay apps such as BatteryMix and enable Unknown sorces

I found out that I could not install your app because i had easy eyes running while trying it

disabling it make the "install" button usable

By the way I noticed that if you change the touch sensitivity setting to 0.1 in clearpad_pen.idc

then the system rewrites it back to 0.2 after a while

How can it be permanently changed?
 

crusnikmachine

Senior Member
Jan 30, 2011
60
5
Screen protector should not be an issue unless its super thick (1mm+?) , which would also make normal use worse.

100% working with my glass m 0.2mm protector, which i would highly recommend since i wrote this with a key which might make some surfaces unhappy :D

(This is the coolest thing ever!!)

Sent from my C6903 using xda app-developers app
 
Last edited:
  • Like
Reactions: LSD DREAMER

dodimo

Senior Member
May 31, 2010
73
5
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.

Thanks pal works like a charm ;)

Sent from my C6903 using XDA Premium 4 mobile app
 

olokos

Recognized Developer
Oct 16, 2011
2,945
2,494
Warsaw
It worked perfectly with just the toggle app on stock rooted 4.4

Wysłane z mojego C6903 przy użyciu Tapatalka
 

mnsk

Senior Member
Aug 12, 2012
507
88
I am using the toggle app on stock 4.4.2 but it seems after a while the pen mode
stops working, either i have to touch the screen again with the finger or keep touching
it with the pen to make it work again. Any help?
 

olokos

Recognized Developer
Oct 16, 2011
2,945
2,494
Warsaw
Ryo - I tried to get it working without the app so it would work straight after booting, but nope. Phone acts like nothing happened.
I'm running Monx's rom 5.01 which is 4.4
Take a look at the file.
e5epeduv.jpg


Wysłane z mojego C6903 przy użyciu Tapatalka
 

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