Softeky lights on - off trackball on - off - Droid Eris Android Development

Here is a couple of scripts of everyone, this will make your roms ANYROM for the eris turn on or off your trackball lights, and or softkey lights
I noticed a few roms that have problems with lights so I figured I would put these here to fix this problem.
If you just want to be able to turn on or off your softkey lights or trackball just download the script and put then in /sdcard/gscript
now download gscript app from the market and load a script file from sdcard
save the script and run threw gscript.
http://www.multiupload.com/1EWEV8MK48
If your a rom developer you can easily make these changes to the init.post-boot.sh and have the settings started at boot just add what ever script you want to init.post-boot.sh like this
open init.post-boot.sh add to file at the very top second line
Code:
# Initialize lights at boot to enable softkey lights noti$
echo 1 > sys/class/leds/vtkey-backlight/brightness
sleep 1
save and reboot.

So, to be clear, these scripts switch on or off the softkey lights and only switch on the trackball light, right? They do not enable or turn on the ability of the ROM to control these, right? For that you would have to incorporate some system components (or a 3rd-party app like Light Flow, which seems to be able to do the same thing). I'm not trying to give a hard time, just trying to understand how this works. I've tried doing similar things on evervolv and GST with no luck.
Oh, and one other thing, in your readme you mention
Notice, if you make trackball on run at boot your phone will lag, and after a while reboot this is a known issue to do with memory loss. Just run from gscript and you will be ok, it doesnt do anything to memory, just uses up all the ram/buffer so your phone reboots. if run at startup if it is just run through gscript everything will work fine.
Click to expand...
Click to collapse
What is the "known issue to do with memory loss?" I'm working on a navigation-related reboot problem at the moment and wondering about the ROM using up the RAM/buffer and if it is related. Mil gracias!

klobkelosh said:
So, to be clear, these scripts switch on or off the softkey lights and only switch on the trackball light, right? They do not enable or turn on the ability of the ROM to control these, right? For that you would have to incorporate some system components (or a 3rd-party app like Light Flow, which seems to be able to do the same thing). I'm not trying to give a hard time, just trying to understand how this works. I've tried doing similar things on evervolv and GST with no luck.
Click to expand...
Click to collapse
the lights on works but need to find out how to make them go off,, i add them to the rom but lights jjust stay on even with the phone sleeping , i sent a pm just waitin on a answer

Ok, you can use Light Flow from the market to control the lights but yes, this is only to enable and disable the light. for some reason roms are haveing a problem turning on the lights there just doesnt seem to be any one or off switch. I also have found that in alot of the roms a few that i have flashed that have been ported from the hero are missing a few of these lines
chown system system /sys/class/leds/vtkey-backlight/brightness
chown system system /sys/class/leds/amber/brightness
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/green/brightness
Click to expand...
Click to collapse
and few others like trigger,uevent if you want the full list ill pm it

androidifyme said:
Ok, you can use Light Flow from the market to control the lights but yes, this is only to enable and disable the light. for some reason roms are haveing a problem turning on the lights there just doesnt seem to be any one or off switch. I also have found that in alot of the roms a few that i have flashed that have been ported from the hero are missing a few of these lines
and few others like trigger,uevent if you want the full list ill pm it
Click to expand...
Click to collapse
im looking in my boot img and i see all those lines u mentioned

pming.....

ok ,, and btw i linked them to ur thread in the op

Related

My Solution to Help Stop Screen Freezes (Tasker app)

Since a lot of people suggest disabling the g-sensor to prevent the screen freezes I thought I'd try something.
I don't want to have my rotation disabled as it's very handy to have. So what I do is use an app called Tasker. It's not free, but there is a 7-day trial available.
Basically I have it set to disable screen rotation every time the screen is off..and so far I haven't had any screen freezes. It may be coincidence, it may not be. I'm not exactly sure if the app does disable the g-sensor or does something else, but so far so good.
For those that don't know about Tasker...it's probably the best app that will ever be made for Android. You can make your phone do almost anything.
For example, I use it to:
When I get home, Wifi turns on and 3G is turned off. When I leave home, Wifi turns off and 3G turns on....same for work.
I have it disable wifi, 3g and screen rotation at night when I'm in bed.
It enables GPS when I launch maps or navigation, and disables GPS when I close the app.
And those are very basic ones...
The Tasker wiki has many more advanced "profiles" you can use:
Code:
Lock An Application
Start the Day with a Particular Application
Battery Full Alert
Launch Music App When Headset Inserted
Launch Menu of Music Apps When Headset Inserted
Keep screen awake when using the keyboard
Speaking Clock for Android 1.5
Control Keyguard (scroll to unlock) when Power is Connected/Disconnected
Keep Multiple Backups of Tasker Config
Change Ringtone on Every New Call
Mute in Meetings
Hold Ringer Volume Down
Auto-Respond To SMSs At Night
Change Volume Levels during Different Times of the Day
Check Data/SMS/Minute Usage With Carrier While Sleeping
Temporarily max brightness of screen during Incoming Call
Auto (Silent) Sleep Mode with Exceptions
Intermediate
Power Plug In - Choose Car/Home/Night Mode
Generic Toggle Widget
Open the keyboard and start texting
Set volume then Launch menu of music apps
Alarmclock without Snooze
Alarms with Snooze and Vibrate
Geburtstagserinnerung (German)
Car Locator
Notification Reminder Pulse
Locate your phone using SMS and google maps
Lock your phone and locate it by SMS and sound
A full talking clock
Act like a docking station when plugged into USB
Auto answer calls when your bluetooth headset is connected
Extended phone profile changer with Notification and Widget
Turn your cell phone into a Voip phone
Advanced
Periodic Data Check (Juicedefender Replacement)
Creates profiles similar to S60 devices and changes them depending on variety of factors
U.S. Navy Ships Bells (Using Tasker's OR '/' feature) * Pattern Matching *
Changing background image depending on current weather (Using HTTPGet)
Or you can simply create your own...there is a learning curve, but once you get a feel for it, it's VERY powerful! It can control almost every part of your Android phone.
There's a decent thread with more examples on xda in this thread.
I realise this is a software post, but it's main aim was to point out a way of disabling rotation to help with screen freezes
Hey,
thanks for this thread, i have downloaded tasker now.
Can you post your code for disabling gsensor when screen is off?
//EDIT: Sorry, its very easy.. i think i can create it by myself
HTC_HDD said:
Hey,
thanks for this thread, i have downloaded tasker now.
Can you post your code for disabling gsensor when screen is off?
//EDIT: Sorry, its very easy.. i think i can create it by myself
Click to expand...
Click to collapse
Hehe yep, it's an easy one.
New Event profile > Display off is the Event. Action is disable rotation
I have done it like you and added a task which enables the rotation if screen is on, is this correct?
I have used the phone now and i got freezes again, but not so much.. i think.
Sent from my HTC Desire using XDA App
HTC_HDD said:
I have done it like you and added a task which enables the rotation if screen is on, is this correct?
I have used the phone now and i got freezes again, but not so much.. i think.
Sent from my HTC Desire using XDA App
Click to expand...
Click to collapse
Yep, you also have to create another to say disable screen rotation when the screen is off.
@the_scotsman
Thanks for the suggestion, I've seen a few people mention this app before but now I finally downloaded it. I'll play around a bit to figure out some combos, but one quick question..
Is this going to be something running in the background sucking up battery and memory or is it just like running scripts? What do you think? I'll run current widget once I get some tasks going to see happens, just wondering if you've found anything out yet.
tgtoys said:
@the_scotsman
Thanks for the suggestion, I've seen a few people mention this app before but now I finally downloaded it. I'll play around a bit to figure out some combos, but one quick question..
Is this going to be something running in the background sucking up battery and memory or is it just like running scripts? What do you think? I'll run current widget once I get some tasks going to see happens, just wondering if you've found anything out yet.
Click to expand...
Click to collapse
It depends on what profiles you set up...if they involve wireless, it will enable wireless every so often to check access points etc....or if you are using a location profile, it will enable gps every so often to check your location. You can change how often everything polls in the settings.
I have mine as per the first post, so it does scan for wireless every so often, and I havent seen any change in battery usage.
the_scotsman said:
Yep, you also have to create another to say disable screen rotation when the screen is off.
Click to expand...
Click to collapse
Can you go step by step what you do to set up display off and rotation off?
Hi,
the last NetRipper Kernel has no freezes!!
Is not overclocked, is not undervolted, has no axi and has no freezes.
with friendly greet
starbase64
starbase64 said:
Hi,
the last NetRipper Kernel has no freezes!!
Is not overclocked, is not undervolted, has no axi and has no freezes.
with friendly greet
starbase64
Click to expand...
Click to collapse
Thanks, but i prefer to have axi and undervolt
And I have no freezes
the_scotsman said:
Hehe yep, it's an easy one.
New Event profile > Display off is the Event. Action is disable rotation
Click to expand...
Click to collapse
I can find everything else exept "disable rotation" in Actions. I only found "display rotation" in settings. Any help?
tzic said:
I can find everything else exept "disable rotation" in Actions. I only found "display rotation" in settings. Any help?
Click to expand...
Click to collapse
Yea, thats the one..just choose that one and set it to "off" in the settings for it
ty for the quick reply scotsman, I ll report back in a day or two.
Tried this, but didnt work
I tried many different versions of kernels but in all if I keep my phone on standby (screen off) for a long time, say 20 mins, my phone freezes, My hardware buttons still glow on press, but phone never wakes up, any Ideas??
Even you disable display rotation, the sensor is still active, just use Gscript and disable sensor, you won't get any more freeze.
justwonder said:
Even you disable display rotation, the sensor is still active, just use Gscript and disable sensor, you won't get any more freeze.
Click to expand...
Click to collapse
I was just about to write exactly the same words!
Scotsman - can you tell if Tasker can run a custom written script, upon some event? Then we can use it to turn off the gsensor!
Finally seems to be workin!!I made 2 changes:
1) Upgraded my radio from 2.08 to 2.12 (I recommend this one)
2) Stopped GSensor with Gscript
Another issue,
After I restart the sensor via script, photos in album wont rotate anymore!!
I did a `ps -ef|grep akmd` and the process is running, any thoughts??
edit: it works after restart!!
did you use the free gscript? cause mine says needs su:true
Your solution is great thanks... i did something slightly different : using tasker, autorotation is enabled only for apps that I want too, like gallery. Rest of the time, its off and working great that way too.

Controlling Android Softkeys Backlighting

Is there any app or any mod that can control the backlight given to the Android softkeys (home, menu, back, search)? I think there was one a little ways back, but several searches have found me nothing....
Also is there anyway to set them to a profile where say all day backlight would be forced off until say 12am then they turn on for a few hours? thanks!
There's one in the market called LEDs Hack. Works well, and requires root of course. As far as the second part, you might could set a profile in tasker to control it, not sure though.
http://market.android.com/details?id=com.deskangel.adjbrightness
LEDs Hack indeed works.
There's also Screen Filter
Both will integrate with Tasker (which would take care of your time-of-day needs, or any other context profiles)
For those running CM7, the backlights can also be controlled through the Auto-Brightness settings
Leds hack works, I've experienced some bugs renabling the lights, sometimes a reboot being necessary.
poontab said:
http://market.android.com/details?id=com.deskangel.adjbrightness
Click to expand...
Click to collapse
Any info on setting it up to keep the softkey lights off after turning the screen back on? Me Lazy
^Yes it can lock that.

[Q] 3g supercharger and notification toggle issue

hi guys!
i'm using cm7 white rabbit on my defy+ and i always had problems with 3g supercharger script.. i hoped the new version would solve my problem but it didn't..
actually i don't really need it, but i'd like to make it work properly on my defy..
so my problem:
i install the script (1. quick) and then reboot. after the reboot my notifications toggle doesn't work anymore (i had the same problem using nitro lag nullifier..)
when i "click" on a toggle, it works but it doesn't change colour.. (e.g. i have screen timeout toggle set to 15/30/1, but when i press on it, the colour doesn't change and even the message is always the same... "screen timeout set to 15")..
it pretty wired isn't it??
any solution? just don't use 3g supercharge?
thanks guys!
daede86 said:
hi guys!
i'm using cm7 white rabbit on my defy+ and i always had problems with 3g supercharger script.. i hoped the new version would solve my problem but it didn't..
actually i don't really need it, but i'd like to make it work properly on my defy..
so my problem:
i install the script (1. quick) and then reboot. after the reboot my notifications toggle doesn't work anymore (i had the same problem using nitro lag nullifier..)
when i "click" on a toggle, it works but it doesn't change colour.. (e.g. i have screen timeout toggle set to 15/30/1, but when i press on it, the colour doesn't change and even the message is always the same... "screen timeout set to 15")..
it pretty wired isn't it??
any solution? just don't use 3g supercharge?
thanks guys!
Click to expand...
Click to collapse
Sorry for bringing this up again, but I've also been looking all over for a solution. I'm not sure whether it's the 3G supercharger or the Nitro-Lag-Nulifier that is causing the problem (or maybe KAK? don't think so..). I'm sure there is a solution somewhere... or if you could at least point me to the cause so i will know not to use the specific script...
I tried using only some of them again and again, but since this bug is not permanent(it comes and goes) I can't point my finger at it. Anyone?
THX!

Auto rotation

Does Nexus 7 have auto rotation or not? When I turn it from vertical to horizontal, the screen does not change at all.
ScottXe said:
Does Nexus 7 have auto rotation or not? When I turn it from vertical to horizontal, the screen does not change at all.
Click to expand...
Click to collapse
Yes it has auto rotate but it may not work for a couple of reasons:
It will not work on the "homepage" as for some reason, it is still not available to landscape your homepage.
If your in apps, like the broswer etc, then yes it should auto-rotate, but my Nexus 7 also had this turned off by default.
Goto your settings -> display -> auto rotate. (Im 90% sure its under display )
Make sure the box is ticked
Hope I helped
ScottXe said:
Does Nexus 7 have auto rotation or not? When I turn it from vertical to horizontal, the screen does not change at all.
Click to expand...
Click to collapse
If you're wondering how to enable rotation on the launcher (homepage), you can do it a number of ways. If you don't want to root, you can install an app like ultimate rotation control from the play store. You can also install an alternate launcher like Apex or Nova.
If you want to root, you can flash a ROM that has tablet mode such as Paranoid Android. You can also edit the build.prop file but I wouldn't recommend the latter as it seems to have negative repercussions in system apps.
Sent from my Paranoid Nexus 7
Wilks3y said:
Yes it has auto rotate but it may not work for a couple of reasons:
It will not work on the "homepage" as for some reason, it is still not available to landscape your homepage.
If your in apps, like the broswer etc, then yes it should auto-rotate, but my Nexus 7 also had this turned off by default.
Goto your settings -> display -> auto rotate. (Im 90% sure its under display )
Make sure the box is ticked
Hope I helped
Click to expand...
Click to collapse
Very strange - there is no auto rotate option as per you described. Where does it go?
ScottXe said:
Very strange - there is no auto rotate option as per you described. Where does it go?
Click to expand...
Click to collapse
Easiest way, when you pull the notification bar down, you will see 2 Icons right at the top of the notification bar.
One will be three lines, with dots on them, which looks like the icon of the "Settings" app.
Next to that, you will see something with two arrows, and in the middle either like a screen of a device, or a padlock.
That is what you want to click, if the padlock is there, then rotation is locked, if you have the device screen, with the two arrows, auto rotate is enabled.
Hope this helps.
If you want more help download the application nova launcher.
Once you have nova, open it up and go to "look and fell". Once In there go Into screen orientation and click on auto-rotate.
When you finish do the command above, and it all should work
Sent from my Nexus 7 using xda app-developers app
ScottXe said:
Does Nexus 7 have auto rotation or not? When I turn it from vertical to horizontal, the screen does not change at all.
Click to expand...
Click to collapse
add this to the end of your build.prop file and reboot, then youll be able to autorotate your homescreen. no, adding this to your build.prop file will not hurt your device or cause issues as others here have stated..
launcher.force_enable_rotation=true
simms22 said:
add this to the end of your build.prop file and reboot, then youll be able to autorotate your homescreen. no, adding this to your build.prop file will not hurt your device or cause issues as others here have stated..
launcher.force_enable_rotation=true
Click to expand...
Click to collapse
Works great! Thank you!
The auto rotate is turned off when you have stock jelly bean. But if you pull down the menu you can change it there.
Apex Launcher does it too.
The cheapest way ist modifying the build.prop
An nice app but it cost is
look for "Ultimate Rotation Control" in app store
goes like hell
Don't use the rotation control app, at least not in auto or forced auto. It kills performance.
Sent from my Nexus 7 using Tapatalk 2
simms22 said:
add this to the end of your build.prop file and reboot, then youll be able to autorotate your homescreen. no, adding this to your build.prop file will not hurt your device or cause issues as others here have stated..
launcher.force_enable_rotation=true
Click to expand...
Click to collapse
What is build.prop file and where is it to find for the modification?
RE
The Rotation Control app worked great on my Nexus 7.
I can't say the same for my GS3;
it kept resetting itself to "Forced Auto".
The build.prop method is easy, and works mostly well.
My only problem seems that the Play Store app always crashes when the screen rotates in the app drawer. I'm not sure yet if it happens anywhere else, but so far everything else is good.
The build.prop file is in the "/system/" folder, and you'll need root access to get to it.
Once rooted, get ES File Explorer from the app store.
You'll need to enable "Root Explorer", "Up to Root" and "Mount File System" in the app's "Root Settings" to reach and edit the build.prop.
Once you find the build.prop file in the /system/ folder, you can press it and choose to open it with ES Note Editor.
!!!!! WARNING !!!!!
Before you start messing with the build.prop file,
you'd be smart to make a nandroid backup in CWM.
The slightest typo or mistake can cause your device to not boot up.
You've been warned...!
!!!!! END WARNING !!!!!
But, assuming you add the line accurately to the bottom of your build.prop, you'll be ok.
Rezard said:
!!!!! WARNING !!!!!
Before you start messing with the build.prop file,
you'd be smart to make a nandroid backup in CWM.
The slightest typo or mistake can cause your device to not boot up.
You've been warned...!
!!!!! END WARNING !!!!!
But, assuming you add the line accurately to the bottom of your build.prop, you'll be ok.
Click to expand...
Click to collapse
also, in case you mess something up in you build.prop file, any kind of edit, not just this, you can just reflash your current ROM(no wiping of anything) without anykind of data loss or repercussions. well, OK, one repercussion, a loss of about 3-4 minutes

[Tweak] Disable soft buttons' backlight

Don't like soft buttons' backlight? Want to save some battery?
Here is an init.d script to disable soft buttons' backlight in Aurora.
It should work with other roms too but I haven't tested.
You must have init.d support.
You have it if you have init.d folder in /system/etc.
Instructions:
1. Extract the zip
2. Put 80button-backlight_off to /system/etc/init.d
3. Reboot phone
To enable soft buttons' backlight again just delete the file.
View attachment 1794612
This is the first time I hear about "don't like the buttons backlights" here something to kill it lolol
This is crucial to the good usage of the device and if the sensors are well calibrated and working good the backlights should be automatically adjusted, including on/off. Something that the majority of the roms don't have.
This would then be a great share
Miui v4 if you set the brightness to automatic the backlights will go off after a while. Don't need a patch is a bug eheheh :thumbup:
Djuganight said:
This is the first time I hear about "don't like the buttons backlights" here something to kill it lolol
This is crucial to the good usage of the device and if the sensors are well calibrated and working good the backlights should be automatically adjusted, including on/off. Something that the majority of the roms don't have.
This would then be a great share
Miui v4 if you set the brightness to automatic the backlights will go off after a while. Don't need a patch is a bug eheheh :thumbup:
Click to expand...
Click to collapse
I don't like button-backlights especially at night. You can see them clearly enough without backlights in our u8800.
I did some research, there are people who don't like button-backlights, even in u8800 forums and want to know how to disable those.
I did this for myself and thought that there could be someone who would like to disable them. It's really simple tweak but I think that there are some "noobs" who don't know how to disable them. So I shared my tweak.
Btw in Aurora they dim, but doesn't go off.
Sent from my Huawei U8800
At least is something new and sharing is sharing so good job

Resources