Home » Android » Android Core » Android touch not working? Not to worry.

About Janaka Bandara

Janaka Bandara
A budding software engineer in the enterprise integration space, and a simplistic guy who likes to learn, appreciate, help, share, and enjoy life

Android touch not working? Not to worry.

It’s fairly rare to see a non-smartphone these days among the masses. Despite their numerous benefits, smartphones can sometimes be a PITA—especially the touchscreen.

I have a (somewhat aged) Greentel Safari M1 which suffers from an occasional hiccup – the touchscreen simply refuses to work. No matter how hard I try, there’s no hint of a response – not a flicker, not a movement, not a button/icon highlight, nothing.

I have taken it to the vendor for repair, and all they do is factory-reset the phone (which then—for obvious reasons—starts running smoothly right away). None of the other suggestions—rebooting, tapping the corners, heating (which I didn’t really try)—ever worked.

What if I can do the reset myself—without having to run to a repair shop every couple weeks?

Fortunately I can.

No, it’s not a recovery option. That one I gave up a long time ago, after so many fruitless attempts to find a working button combination.

Now I always enable USB debugging right after I reset the phone (while the touch is back in its full glory) and authorize my developer machine to connect to it via adb.

Good thing with Android is that you get an impressive bunch of utility commands that run with adb, out of the box. Not much useful for a regular user, but handy for a developer, hacker or someone going through a hard time fixing his phone—like myself.

In my case, input is the tool that helps me get through my mess. input allows you to send arbitrary user inputs to your phone via your computer—touches, drags, long presses, keystrokes, home, back, shakes—whatever you wish.

Thankfully, now I can just get into the phone’s shell (using adb shell) and run a series of inputs that would unlock my screen and reset the phone via: [open top drawer]Settings[scroll down]Backup and resetReset phone button:

# unlock
input swipe 120 320 0 320

# there will probably be unread SMS pop-ups: dismiss them with back button
input tap 10 180

# bonus: check missed calls!
input tap 20 450
input tap 120 180
input swipe 120 440 120 200
input swipe 120 440 120 200

# BEWARE! factory reset!
input keyevent HOME
input keyevent MENU
input tap 300 420
input swipe 120 440 120 200
input tap 300 420
input swipe 120 440 120 200
input tap 300 420
input tap 120 420
input tap 120 240

It’s worth noting that my device runs a customized Android 4.4 OS, on a 240×320 screen. If you wish to utilize the same script for your phone, you might need to tweak it to suit your OS, menus and UI elements; the best way to do this would be to run the commands incrementally, checking the result at each stage and tweaking as you go along. (I myself had to spend about 15 minutes to get this one in order, the first time.)

Happy resetting!

Published on Java Code Geeks with permission by Janaka Bandara, partner at our JCG program. See the original article here: Android touch not working? Not to worry.

Opinions expressed by Java Code Geeks contributors are their own.

(+1 rating, 1 votes)
You need to be a registered member to rate this.
Start the discussion Views Tweet it!
Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy

Leave a Reply

avatar

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
Notify of