[General Questions and Answers] lRaziel1:
I have an ooold phone, a rooted Xperia E (C1504) from 2013. This is important, because I am limited to using Android 4.1.1 Jelly Bean.

Long story short, the power on button is broken. I pulled it out with pliers because it was malfunctioning to the point of making the phone unusable. I actually use a clip folded so that it touches both ends where the button was soldered and it actually works perfectly fine as a substitute "button". Thing is, it's super inconvenient. I don't wanna take off the lid then put the clip just so the screen turns on so I can change the song playing.

Anyways, is there an app that allows me to turn on/off the screen or map my power button that does NOT heavily drain my battery?

I have tried several suggestions but they either don't do what I want/do it poorly, or are not compatible with jelly bean.

Or better yet, does anyone know of any app that turns ON the screen when connecting 3.5mm earbuds? This is an already included function in many phones so I imagine there should be an app or xposed module that can do that withouth relying on a wakelock running 24/7 draining battery.

Basically I want something that does what "Volume Power" does, the problem with this god tier app is that it drained half my battery on 5 hours of stand-by. It's a shame because it's exactly what I want.

Anyone has any ideas? Thank you

PS. as a side note, if you want to answer, I figured I'd rather ask here than making a thread for something like this.

I have an xperia arc s with a broken screen. If I lift it up of the case in a manner that the flex cables are tense, it works ok with many ghost touches. As soon as I remove what was under it holding it high above the phone case so that it sits normally, the image fades away. Backlight still works, but the image goes away. Only until I pull it up and tense the flex cable is that the image returns. I know the screen is shot, but still, I'm curious, any ideas what happened with it? lol

EDIT. PS.2. Well the problem with the screen I mentioned is that the flex cable was more sensitive than I was accustomed and I damaged, that's about it.

EDIT.

I did find something, and while it may not be a solution for everyone, it was almost exactly what I wanted. First I rooted, then I used Xposed Installer and used Xposed Additions so to be able to map the physical camera button and add "Screen Off" and "Screen On" conditions to it.

The only problem with it is that with a long press instead of showing the power menu (power off, restart) it just opens the camera, as it's supposed to.

I guess you could solve that but it doesn't matter in my case, since the power button switch is soldered directly into my phone's motherboard rather than being a flex cable addition or something, so I just removed the button with pliers and use a sanded paper clip to make a connection between the 2 points where the button was soldered, that way I bring up the power menu and also turn on the phone.

Again, this worked for me because of the way the power button was put on my motherboard and I did this only because the button was completely shot and unusable, like a ruptured appendix. It was turning off and on my phone, also preventing it from turning on and all of this completely at random. If your power button is a flex cable accessory that connects to the main board or is not completely shot like mine, don't do this because it will help nothing, hey, in your case it's probably better because you just replace the power button + volume buttons flex cable for another and you're good to go. You can get it from ebay or buy a 2nd hand phone that is not working (which should be cheap) and use the spares for your own.

Hope this helped someone, someday, anytime.