Use pencil or any metal object as stylus on Galaxy S2 [Just like S5/Z Ultra/ Z1]

Search This thread

Harsha Raj

Senior Member
Jun 30, 2011
4,353
1,335
Did you check "Use Root" when assigning the script? cause you need too...
Yes. I did check in use root. This is what I did:

1. Add new profile as "State - display - display state on"
2. Add a new task as "Script - Run shell"
3. Under command put it as
Code:
 #!/system/bin/sh

#Change Touch Sensitivity Script
#Default Sensitivity is 40 on NeatROM

echo 10 > /sys/class/sec/sec_touchscreen/tsp_threshold
4. Tick on "use root".
5. Tested the task manually from task edit screen by tapping on play button and everything good.
6. Turn the profile on and enable tasker and go to home screen.
7. Screen off and then screen on and nothing happens.

Scratch that. It's working now :p before I had long press on the task and had pressed on power button which disabled the task. My bad.

Thank you very much for the script. I have real touch sensitivity issues in my screen occasionally when I'm on default value. Looks like digitizer issue. I was hoping by setting it to "20" always will solve the problem. Let me see now with the script. Thanks.

Sent from my GT-I9100 using Tapatalk
 
  • Like
Reactions: exynoss

rickyjoel

Senior Member
May 16, 2013
61
8
Can't find settings in JellySnap ROM

Hi,

I can't find the mentioned settings in my JellySNAP rom.

My phone has "Settings" but no "Advanced Options"

Thanks.

Ricky
 

ronyzeran

New member
Jan 22, 2014
4
0
Wow , its working .. Really appreciated dev works.
Just a question can we use it in stock s2 roms ???
 

rickyjoel

Senior Member
May 16, 2013
61
8
Hi,

Thanks for the reply.
Is there any list in this will work. This will be more helpful to everyone who visits this thread.

Thanks,

Ricky
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    As you all know, Samsung has made a list of hidden features and one of them is where you can enable a pencil as stylus for you phone. This was USP of Xperia Z Ultra too and was also enabled via root on Xperia Z1.

    But it looks like this feature will work on S2 too. :D

    Requirements: [This was tested on SlimSaber running 4.4.2]
    Any of the following:
    1. Any AOSP based ROM which has the Galaxy S2 device setting included. OR
    2. Any Sammy based ROM with Galaxy S2 device setting included (anyone confrim this is possbile?) OR
    3. Any custom kernel which has option to change screen sensetivity (someone kindly suggest if this too is possbile)

    What should be done? - Basically we need to increase the screen sensitivity
    1. Open up the device settings. This can be in the app drawer depending on your ROM or integrated to the system settings. For example, in the in SlimSaber it is under: Settings - Advanced options - Device
    2. Go to the "Screen" tab
    3. Under "Touch sensitvity" change the value to "10"
    4. Now try with pencil or any metal objects and have fun.

    To quickly revert to default sensitivity turning off the screen does the job. This could be a bug.

    Issues:
    1. The sensitivity reverts back to default after screen off. At least in SlimSaber 4.4.2. The value will remain on 10, but i will need to tap on it again manually.
    2. This will not work when the device in plugged into charger.
    2. You need to go to all the way to the device setting screen each and every time. The screen is hyper sensitive for fingers when it is set to 10.
    3. Of course, the screen is not as good as you to write down notes with handwriting like in Galaxy Note phones. But it is kinda cool to show it off.
    3. The screen will get dirty :p Please don't use the phone while having food. Lead is bad for health:D

    Video:

    I am not sure whether screen sensitivity option is available for other phones like S3, S4 or other OEM too. If anyone know a way and have tried, let us know in the post.

    Have you felt good about still holding on to Galaxy S2 yet? :D
    1
    Awesome working .. Really appreciated dev works.
    Just a question can we use it in stock s2 roms ?
    Yes. All credits go to the CM team who developed the Galaxy S2 device settings back in ICS days. This would not been possible the easy way without their app.

    I have not used the stock ROM for a long time. The device settings was an app back in ICS days. Someone can try sideloading the app to stock ROM and see if it works. Or may be any custom kernel has this screen sensitivity feature?
    1
    The DeviceSettings app writes the value selected for touch sensitivity to the following file to be picked up by the kernel:
    Code:
    /sys/class/sec/sec_touchscreen/tsp_threshold

    Maybe some sort of scripting utility or tasker could help with rewriting the value to the file when the screen turns on and possibly save you having to go back in to force the update through the app??
    1
    Couldn't find the setting in Carbon Rom, musn't have included it. Too bad.
    Maybe you can ask in the ROM thread if its buried somewhere else. Here is the device settings apk link from google search. But it did not install in mine, nor it worked when i side loaded it. https://code.google.com/p/slimics28/downloads/detail?name=GalaxyS2Settings.apk
    1
    It's not even as stable as I showed it in the video?

    Can you make that script using SManager app? That way the script can work even after screen lock or something. I think this is the app https://play.google.com/store/apps/details?id=os.tools.scriptmanager

    And I have no idea what happens when it's set to 5 :p try it out. Nothing bad might happen.

    Sent from my GT-I9100 using Tapatalk

    About the video, yes, it's not that stable. But I guess it's the ROM's/Kernel's fault, since it's unstable changing the thresholds, they don't bother fixing it... :(

    As for the script, have a look atTasker for that. When it screens-off, the threshold reverts back to normal (the bug on the ROM, maybe?), right?

    Then when you do screen-on, use Tasker and it will automatically run the script, and will change the thresholds to the desired percent... :D

    for the script commands I just created a script file:

    Code:
    #!/system/bin/sh
    
    #Change Touch Sensitivity Script
    #Default Sensitivity is 40 on NeatROM
    
    echo 10 > /sys/class/sec/sec_touchscreen/tsp_threshold

    Then put it on /system/xbin, changed it's permissions to 777, then ran it on Terminal Emulator.

    To test, run this on your Terminal Emulator:

    Code:
    $ su
    # sh -x /system/xbin/<name of the script>

    It must echo your desired sensitivity. Then if all's well, try your pen now... :D