[Stock Kernel, Root] Grip Sensor, grip_wake_lock reducing standby time - Galaxy Tab 3 8.0 Android Development

Dear all, just want to share the simple solution in case this would bother you.
Recently I noticed that during my train commute with the Tab (3 8) in the backpack that after reaching office, the battery got more drained than expected. Checking with "Better Battery Stats" I found that "grip_wake_lock" has kept my device active for no reason - so no deep sleep as it should be. If you want to check on the sensor, call the dialer and enter *#0*# to get the test application. You find the grip sensor at the bottom of the screen. It may miss on wifi only devices (like the vibrate was on my GTab 2 7 wifi).
I have not found any application actually using this sensor, though I am not sure about the TouchWiz to increase ring volume when in a bag - but I don't care about this anyway. This function is also on phones that do NOT have a grip sensor, so it is unlikely.
So now how to switch off the sensor and get rid of the grip_wake_lock:
in a root shell enter
echo 0 > /sys/class/sensors/grip_sensor/onoff
This was also found for another device having a grip sensor with other problems as described here:
http://forum.xda-developers.com/showthread.php?t=2237946
You can put the same in an init.d script, but as the stock kernel does not support it, you need to find another way to execute that automatically at boot. There are many tools doing this, I picked "Universal Init.d"

Related

Few Issues - Help!

Hey all.
Got my Touch Cruise recently and so far my experiences are mixed. Here's some of the problems I've had - maybe someone can suggest fixes?
1. Battery life is awful. With Wi-fi enabled I get at most 2 days out of a full charge.
2. Screen sensitivity is poor. Even with the stylus a lot of times I have to press the same key twice or the accuracy isn't 100% - very annoying when sending text messages.
3. When on a call the screen goes into standby meaning you can't easily turn on the speakerphone, mute/hold it etc. I've tried turning off all the power saving options I can find but it still happens.
4. Ring volume levels aren't great. Annoying when I'm out and about or in the car with the stereo turned up.
5. Backlight is very poor outside, or even in the car - basically anywhere where it's exposed to sunlight.
I've changed the UI to the SPB one as I was recommended to do on another forum, and it helps a bit, but to be honest I'm very close to selling it on unless I can get the above issues fixed.
Any ideas? Thanks!
You should check out the many posts on this forum, many of them address your concerns. I'll see if I can take a crack at them:
1) Yes battery life is not great, I wouldn't leave Wifi turned on all day. The less stuff you are using the better, for example if you're not using Bluetooth don't leave it on. Same for the WLAN. Don't have applications constantly making data connections either (prob not applicable if you're on the wifi). An example of such an application would be the weather app. Search the forums for tips on improving battery life.
2) There are registry key entries that improve the touch sensitivity of the screen and TouchFLO. Try this thread as a start. http://forum.xda-developers.com/showthread.php?t=355277
3) There's a registry entry for this, don't use Kaiser Tweak. http://forum.xda-developers.com/showthread.php?t=355230
4) Are you sure the ring volume is to the max? Is the ringtone itself loud? I'm pretty sure there's reg entries for this too, check out the tips and tweaks thread.
5) Yeah if sunlight is hitting it directly the screen is not very visible. Try turning the brightness up to the max. Supposedly there are screen protectors out there that minimize the effect of glare although I haven't personally tried any except for the stock protector.
Overall your best bet is to read the forums and use the search function. You will almost always find someone who has asked the same question in the past. And welcome to xda. HTH.

[Q]How to Keep Proximity Sensor on?

Mods, please move if this isn't the right section (I contemplated the development section but opted against it).
I'll try to be short while providing enough background to get the more knowledgeable people here the info they need to help me with this problem. Essentially, i have a 32gb P6210 that I'm going to flush mount in my dash to use for in car entertainment. With no access to the hardware buttons I did some research on what would realistically meet my needs (especially getting the screen back on without the power button).
I found Tap Tap App on the market and the widget allows me to turn the screen off and waving my hand in front of the proximity sensor four times turns the screen back on. The issue is that, randomly (has ranged from 10 minutes to 17 hours), the proximity sensor is turned off when the screen is off, making the app inconsistent, even with "never turn off sensor" checked within the app. I'm in talks with the developer and he mentioned that the proximity sensor turning off with the screen off is dependent on the underlying rules built into individual ROMs. I'm on the stock ROM.
I need to know if anyone has info on how to keep the proximity sensor on indefinitely with the screen off so Tap Tap App has the input needed to continuing working as designed. I dont care about battery drain at all, the tab will have constant power. I'm rooted with clockwork mod recovery so if anyone has a system file I can edit, a zip i can flash, a tasker profile you know will work, etc, please post it up. Thanks in advance!
Kinda lonely in here...anyways, as an observation update, the app i was using, Tap Tap App, worked far less reliably using the Power button widget vs having the button in the notification area.
Conversely, I found a very similar app called "Soft Power" and have been using it the past 3 days with no issues. It has no widget option and only has the option for turning off via notification area. I'm thinking that always running the notification area by default means a background service is running to keep it there. I have not yet been able to not wake it up by waving my hand over the prox sensor. So for anybody with similar needs to mine in terms of not wanting or being able to access the power button, this has been a good alternative thus far.
I tried it on my phone. It does not work at all.
LG Optimus 2X 2.3.4
It looks like a promising application.
Perhaps it works on ICS ?

How to Keep screen off if proximity sensor = covered?

Hello all,
This has been an issue since my first sony. Gravity Box - an xposed module had a handy option in which at every screen wake, it was checking the proximity sensor to see if there is something near or not - it helped avoiding accidental dials and touches while in pocket.
I tried third party apps but the functionality is problematic. I also tried automations such as MacroDroid which held wakelock on proximity sensor - thus battery drain and cpu usage.
Samsung has an option within settings that does just that.
My question is, is there an adb command or a tasker automation (or even app) that brings this functionality back?
Looking fwd for your input. I am not rooted (for now) so the options are limited. Still I hope you guys have some bright ideas on the matter.
Cheers,

[GUIDE] How to have screen auto on/off with any "flip" case

Hey there folks!
Since MiA1 does not have double tap to wake, or you just want funcionality of waking screen and be ready to go with ANY flip case you
might have bought (and screen off when you close it) here is a simple guide to achive so, i have been testing it for 5 days and so far it works flawlessly.
So far im getting only 1% of battery usage overall, meaning the app itself is NOT keeping CPU awake, only the proximity sensor to determine if the case
is closed or not. Really battery friendly overall. Dont know the bad reviews on PlayStore - people moan about anything these days and app does not
work well with any device, but with A1, its a bingo.
1. remove your lockscreen security (set to none) - this is up to you! If you have your phone with you at all times, it
removes the need to do extra steps (draw pattern, PIN, etc...). If you prefer to open case and be taken to locksceen, skip this step!
2. install "EveryCover" DOWNLOAD - !app is add supported! - also, there is paid version which i have so i support the dev, but free one works just as well!
- enter ap and activate the service (works by using Device Admin)
- tick "Auto start at Boot" - so service keeps running after restart
- tick "Service in notification bar" - it will prevent app to be killed by system - more on that later!
- you can even set the time period in which app is inactive (ex. - when you sleep at night)
3. Test the funcinality. Just open and close your case, like you normally would (not 2 times in 1 secs, right ). In my testing of daily usage it almost never "misses".
The screen on is almost instant when you flip the case and screen is set to off after 1 sec of closing case. I tested many many times to see if the screen really switches off, and it
works great. I will also mention that it seems to work even in almost pitch dark (!) and no problems on indoors on evenings etc... It seems that the app is really good at listening to
sensor, or we have a really good proximity sensor on A1!
OPTIONAL STEPS:
Now if you are perfectionist or just like me, 2 things may bother you with this setup, and i will also explain steps how to deal with them.
4. persistant notifications - if you enabled "Service in notification bar" there will be constant notification which may bother you. To deal with this, just long press
on the notification and switch the toggle to the right. (or you can go to app settings and do the same, turn off notifications)
5. "EveryCover running in the background" notification - the last problem you may encounter, altho only the visual one, can be pain to watch. To disable this notification just download this app:
HERE!
Just enter app, grant permission, select "Press to select apps" and choose EveryCover.
You are done! This way, you have:
- working screen on/off solution for ANY flip case
- clean status bar without unnecessary notifications
- persistant service that will NOT be killed by system or after restart
- all that with only 1% of battery usage and no impact on performance what so ever.
Dislclaimer; I am not a dev of any apps mentioned here.
Cheers, hopefully this helps someone!
Magnetic wake / sleep works if you can find a case with magnet placed at correct place built in case.
Phone wakes and sleeps when opened or shut automatically with this feature. Don't be confused with smart cases as not the same thing. I'm late with this reply but works with many phone Inc all my xiaomi phones

Proximity sensor issue s8/s8+ - wakelocks and battery drain

Hello all,
many of you probably have no idea, that there's a small issue with our phones regarding tmd4906 proximity sensor. But first things first. Since I switched to oreo, I've noticed that something's eating up the battery and its sth related to system process. So I installed gsam battery monitor and started checking the lists. I came across that in android system, there's an entry regarding proximity sensor which is taking battery like crazy. Then, I was searching for the cause of it. And i found that's pretty easy to reproduce for us all. So I ask you to check something:
switch on your mobile data, find a dark place, turn on, i.e Spotify and start listening to music (mobile data has to be in use), turn off the screen, and point any other's phone camera to your phone where proximity sensor is (left to the speaker, up.). You should be able to see that proximity sensor is constantly working when mobile data is in use.
Another question - is there any other way to get rid of this? I have switched off everything which may make use of this sensor - no go. Since I'm unrooted, I cant do nothing about it. It's keeping making wakelocks like crazy and draining a lot of juice. My Samsung A5 2016 uses half less juice when i keep mobile data on.
Yes, I've tried many clean flashes from scratch - nothing. I came across that similar issue was found in s7.
Have you tried disabling "Block accidental touches" in Settings / Display ?
I my S7 Edge i had that too. Made my "Android System" wake like crazy. Only working solution was install different ROM (official)

Categories

Resources