[MOD] Enable custom Boot Sounds in CyanogenMod 07/15/2011 - G2 and Desire Z Android Development

Enable Custom Boot Sounds
First make sure you are running a cyanogenmod based rom, i have only tested on CM7, but i believe the capability exists in CM6 as well.
Flash from recovery:
http://www.mediafire.com/?4cr7aa4lg51y8pc
BUSYBOX REQUIRED - if you dont have a proper busybox install (like cm7) this can sometimes fail. if you experience issues, mount system rw before running the script.
Zip contains the default "DROID" sound, to replace with your own see below.
Instructions:
1) Flash from recovery over current rom
2) reboot phone
Once you have flashed this you will also have some new commands in terminal or adb:
enablebootsound - enables boot sound if enable from recovery was unsuccesful
bootsoundtoggle - turns bootsound on or off
newbootsound - copies /sdcard/android_audio.mp3 as new boot sound
newbootanim - copies /sdcard/bootanimation.zip as new bootanimation.
Feel free to post your custom sounds in this thread. i'll try and keep the first post updated.
Once again - to set custom sound or animation place them on root of sdcard named appropriately i.e. 'bootanimation.zip' and 'android_audio.mp3'
Enjoy.
bootsound enable script by mrdaviso modified by me for compatibility and to eliminate double runs, from a tutorial posted by spiicytuna

Very cool idea and a very nice implementation. I had a media force close as soon as the phone finished turning on, but then again I was using a 5mb mp3. Also as soon as I did "newbootsound", the selected song started playing. Other then that everything works exactly as you described . Ill post some logs up tomorrow. Thanks!

Nice work. I always thought this had to be done by fixing the links in /system/bin/bootanimation
Sent from my HTC Vision using XDA Premium App

I'm always changing my animations and will now be changing bootsounds....so I hope you don't mind, I made a small change to /system/bin/bootsound
Its now
#!/system/bin/sh
bprop=/system/build.prop
play=$(cat $bprop | egrep -c -i -o ro.config.play.bootsound=1)
if [ "$play" = "1" ]; then
stagefright -a -o /system/media/*.ogg
stagefright -a -o /system/media/*.mp3
fi
exit 0
Sent from my HTC Vision using XDA Premium App

Doesn't work on PyroMod.
----------------------------------------
Never mind. A wipe and a few reflashes later and I got it working right.

In CM7 RC2, remember to type "su" before typing enablebootsound...
It works! great add-on to cm7, u tha man!

EdWRX said:
In CM7 RC2, remember to type "su" before typing enablebootsound...
It works! great add-on to cm7, u tha man!
Click to expand...
Click to collapse
In Terminal Emulator period you need to type su (to gain root access) before typing any of the commands.
I'm running CM 6.1.1 and it worked great..only thing is the boot audio cuts out about 5 seconds before my animation ends (and it's not the audio clip..it's 30seconds long)..is there any way to increase the length of this?

In case you wanna add to the OP, this is from enablebootsound.
#I just made this into a script this was from a post on XDA by spiicytuna
#http://forum.xda-developers.com/showpost.php?p=8274824&postcount=2
#Please give the credit to him not me.
Sent from my HTC Vision using XDA Premium App

only thing is the boot audio cuts out about 5 seconds before my animation ends (and it's not the audio clip..it's 30seconds long)..is there any way to increase the length of this?[/QUOTE]
I have the same problem. Any suggestions? I might have to wipe, but I don't want to unless I have to xD
Sent from my HTC Vision using XDA Premium App

this sounds so awesome, but im a super noob when it comes to other things that isnt just flashing something and bam its there.......

Simer03 said:
this sounds so awesome, but im a super noob when it comes to other things that isnt just flashing something and bam its there.......
Click to expand...
Click to collapse
EDIT no terminal required now

Already have the perfect start sound. Android Hell wave from Portal. Other good ones would be "Hello friend" and "Amusing Fact" from Portal.

when i run enablebootsound after su and reboot...it loop....
but i get into recovery and press fix permissions ..it sound DRIOD...
well done!

I was able to get this working on my evo shift cm7 nightly rom, great work!

update:
http://www.mediafire.com/download.php?dxjcc9cyhzyalz3
if you have already flashed and used the previous version, this one is of no use to you.
The only modification is after flashing when you are rebooting you will see your splash screen for a few seconds, then your device will reboot and continue like normal. ONE REBOOT is normal. after this reboot the boot sound will automatically play. so for you self proclaimed super noobs, all you do is flash and reboot. once again after flashing your device will boot to splash screen for a few seconds then reboot and greet you with your animation and the default android sound.
see OP for changing the sound.

If you can, why not build an app that lets you change your sound? Something similar to Root Tools by Rummler. You can swap boot-animations easily with that app, granted you can only change from the ones he has. There are 24 of them.

sounds like a good idea. I would use an App to do this. Shouldn't be too hard, as right now I use gscripts to do most of my changing/testing.

This will never be released as an app by me. Script only. a few commands in terminal should be easy enough, and it isn't a customization suite, it's just to enable the boot sound, the ability to change was an after thought and is a simple few lines.

mejorguille said:
Very cool idea and a very nice implementation. I had a media force close as soon as the phone finished turning on, but then again I was using a 5mb mp3. Also as soon as I did "newbootsound", the selected song started playing. Other then that everything works exactly as you described . Ill post some logs up tomorrow. Thanks!
Click to expand...
Click to collapse
I know how to get the clip to play all the way through. I got it on mine. Not sure if there are any side effects, but perhaps you would like to test it out? If so, please send me your clip.

@ amazinglarry311
Do you think this will cause any side effects? I dont know much, but I like to tinker and learn
If you remove the line that tells it to stop playing the boot audio
this
Code:
on property:dev.bootcomplete=1
stop bootsound
from
/etc/init.local.rc
so it now looks like this
Code:
# CyanogenMod Extras
# Compcache - handle at boot
service compcache /system/bin/handle_compcache
user root
group root
oneshot
###Bootsound - Safe to Delete: Start ###
service bootsound /system/bin/bootsound
user media
group audio
disabled
oneshot
on property:init.svc.bootanim=running # to correct timin
start bootsound
### Bootsound - Safe to Delete: End ###
As long as the audio clip doesn't exceed boot time, than you should be good.
If the clip is longer, it will continue to play, until its finished...which no one probably wants.
If anyone wants to give it a shot, just backup your file, and edit it... or use the attached file. Its not zipped, just remove the .zip from the filename.
Thanks.

Related

[GUIDE] Getting some old features back in Virtuous Sense ROMS

GUIDE: Getting some old features back
INTRO: For those who dislike some of the changes/features made to roms as they are developed and are asking how to get them back, here is a how to. It is usually a simple matter of pushing the old files from previous builds into your current rom. Keep in mind that the devs are building a rom as they see fit. As with any rom that you don't build yourself, there will always be things you want to change.
-If there is a bug, post it in the thread.
-If there is a change that you personally want, then do it yourself. Don't expect the dev, and everyone else who uses the rom, to accommodate your specific needs/wants. You may not have noticed, but you aren't the only one using the rom!
NOTE: This guide and code are meant for the virtuous sense rom, but the concept is universal. For example, if you are using some rom and the new version is posted with, say the amazon mp3 apk removed, and you want it back, refrain from cluttering up the dev's thread with a request to have it back. This is both selfish and a waste of posting space. If you are to the point of installing custom roms, you should first be able to type basic adb/terminal emulator commands to copy/delete files. In this case you would extract the amazon mp3 apk from an old .zip and push/install it into your current one. Now wasn't that easier than waiting and hoping that someone will do it for you?
NOW TO THE GUIDE:
Auto brightness mod - To revert from the auto brightness 'mod', which is far too sensitive, to the original, simply pull the services.jar and framework-res.apk from a rom before the patch, and push them to your framework folder. I've attached them to the second post for ease.
Reboot into recovery
Code:
adb shell mount /system
adb shell rm /system/framework/services.jar
adb shell rm /system/framework/framework-res.apk
adb push [directory of saved file]\services.jar /system/framework
adb push [directory of saved file]\framework-res.apk /system/framework
Reboot
-------------------
Keyboard mapping - The www/com key has been changed to a tab, which is good, as it was non-functional before. However the user keys have been changed too. I've modified a file which keeps the www/com key as TAB but also keeps the user keys as user assignable keys. Also attached to second post.
Reboot into recovery
Code:
adb shell mount /system
adb shell rm /system/usr/keylayout/vision-keypad.kl
adb push [directory of saved file]\vision-keypad.kl /system/usr/keylayout
Reboot
-------------------
Rosie auto-rotate - If you want to keep it so that rosie will only be in portrait mode with the keyboard closed, but dont want to turn off auto-rotate throughout all apps, just push the old rosie. Also attached to second post.
Reboot into recovery
Code:
adb shell mount /system
adb shell rm /system/app/com.htc.launcher.apk
adb push [directory of saved file]\com.htc.launcher.apk /system/app
Reboot
Attachments:
You need to rename "services.jar.zip" back to "services.jar" and "vision-keypad.kl.zip" back to "vision-keypad.kl". This is because the forum wont let you upload .kl and .jar extensions as attachments.
Thanks so much for this. I'll definitely be pushing the auto-brightness mod back, and I may do the keyboard, too (might let others do that one first, or see if rmk40/eViL release an update with that first).
Thanks for this!
Sent from my HTC Vision using Tapatalk
Couldn't make the quick key to work.. maybe I might be doing it wrong but I couldn't make it work.. ill keep trying
sent from t-mobile g2 using HTC sense
android602 said:
Couldn't make the quick key to work.. maybe I might be doing it wrong but I couldn't make it work.. ill keep trying
sent from t-mobile g2 using HTC sense
Click to expand...
Click to collapse
What version of virtuous are you running? Did you rename it and remove the .zip from the end?
I'm using that exact file w/ no issues
calendar/lockscreen
Is it possible to replace the sense lockscreen/calendar with the vanilla versions? I have tried searching but can't find find any instructions for how to do this
felixk87 said:
Is it possible to replace the sense lockscreen/calendar with the vanilla versions? I have tried searching but can't find find any instructions for how to do this
Click to expand...
Click to collapse
Lockscreen - no.
Calendar - maybe, haven't tried. However I did find these 2 threads by typing in the words "htc calendar" in the search box (which means you didn't search very hard )
http://forum.xda-developers.com/showthread.php?t=795222
http://forum.xda-developers.com/showthread.php?t=723761]
They may help you.
Good idea with this thread. It's impossible for us to please everyone and this is absolutely the most constructive way to deal with everyone's personal preferences. There is one key consideration for everyone. If we make other changes to the frameworks which you DO want, pushing files from this thread which have not been updated with said features will eliminate those changes as well. Point is, the concept here is good but it needs to be maintained.
Also, the intention with Virtuous is to provide options. The ROM isn't finalized so ROM Manager isn't populated with all the variants it will eventually have. Case in point, we had to re-base on the new Egypt RUU and are in the process of re-applying all our changes. If we had a variety of options, we would have to redo all of those as well. Once we're in a more "final" state, you'll start to see a lot more choices officially supported with the ROM.
The keyboard mod you have here will probably just become part of Virtuous 0.8.0, by the way. I had not realized our replacement eliminated the quick key customizations (oversight).
Chances are I'm not doing it right, as I'm only about 2% oriented in using ADB, but after following the code, pushing the files, etc, the phone boots up with perpetual errors and crashes. (Phone cannot be launched, etc.)
The process in which I did it was:
Wipe the G2, install v0.7.0, update to 0.7.4, remain in recovery and use adb and followed the code you provided above. (Everything says it works, in terms of mounting, pushing, etc.)
I've also tried it where I reboot after updating, let the phone launch fully, then go back to recovery to push the mod files. Same errors occur.
The only two mods I was interested in were the auto-brightness one and the orientation one.
Any idea what I did wrong?
felixk87 said:
Is it possible to replace the sense lockscreen/calendar with the vanilla versions? I have tried searching but can't find find any instructions for how to do this
Click to expand...
Click to collapse
You could possibly try pushing the lockscreen apk from SuperVillainZ.
NANDROID 1ST THOUGH!!!!!
Sent from my HTC Vision using XDA App
fox-orian said:
Chances are I'm not doing it right, as I'm only about 2% oriented in using ADB, but after following the code, pushing the files, etc, the phone boots up with perpetual errors and crashes. (Phone cannot be launched, etc.)
The process in which I did it was:
Wipe the G2, install v0.7.0, update to 0.7.4, remain in recovery and use adb and followed the code you provided above. (Everything says it works, in terms of mounting, pushing, etc.)
I've also tried it where I reboot after updating, let the phone launch fully, then go back to recovery to push the mod files. Same errors occur.
The only two mods I was interested in were the auto-brightness one and the orientation one.
Any idea what I did wrong?
Click to expand...
Click to collapse
Well from what you are saying, it sounds like the methods are correct. Did you make sure to remove the ".zip" from the end of the services.jar.zip file?
Can this be modified to restore ".com/www" to G2's?
the1wingedangel said:
Well from what you are saying, it sounds like the methods are correct. Did you make sure to remove the ".zip" from the end of the services.jar.zip file?
Click to expand...
Click to collapse
Yup, and I have "always show extension" enabled in folder options, so I definitely got rid of the .zip.
Maybe I'll fiddle with it a little more, see if I missed something.
All right, here's the error I get after removing the files for the brightness mod, and pushing the ones you attached in:
"The application Google Services Framework (process com.google.process.gapps) has stopped unexpectedly."
Basically the launcher is completely inaccessible, the phone remains perpetually in the settings screen because I suppose it's the only thing that it can load without the launcher. It also can't get a signal except for wi-fi, "Mobile Networks" in the settings remains unchecked, and it can't be turned on. Hahaha pretty severe for a rather simple mod.
Here's a full step-by-step of exactly what I did:
Wipe User Data, Wipe Cache
Install virtuous v0.7.0, then v0.7.4 from zip
Remain in Recovery
Open command prompt Change directory to ADB (c:\AndroidSDK\tools)
Entered the following codes one at a time:
- adb shell mount /system (mounts)
- adb shell rm /system/framework/services.jar (file removed)
- adb shell rm /system/framework/framework-res.apk (file removed)
- adb push C:\services.jar /system/framework (success 0.250s)
- adb push C:\framework-res.apk /system/framework (success 1.80s)
(I just have the files on C temporarily for the ease of it.)
Reboot
Then the errors hit once I unlock the screen.
Heheh, I can't really think of any other way to approach it. Hmmmm.
Any idea what I'd need to put back for video codecs? I'm running CM 6.1 but it doesn't run streaming videos from the NHL Gamecenter unlike the stock rom. I'm assuming its a codec issue and was wondering what I'd want to replace.
fox-orian said:
All right, here's the error I get after removing the files for the brightness mod, and pushing the ones you attached in:
"The application Google Services Framework (process com.google.process.gapps) has stopped unexpectedly."
Basically the launcher is completely inaccessible, the phone remains perpetually in the settings screen because I suppose it's the only thing that it can load without the launcher. It also can't get a signal except for wi-fi, "Mobile Networks" in the settings remains unchecked, and it can't be turned on. Hahaha pretty severe for a rather simple mod.
Here's a full step-by-step of exactly what I did:
Wipe User Data, Wipe Cache
Install virtuous v0.7.0, then v0.7.4 from zip
Remain in Recovery
Open command prompt Change directory to ADB (c:\AndroidSDK\tools)
Entered the following codes one at a time:
- adb shell mount /system (mounts)
- adb shell rm /system/framework/services.jar (file removed)
- adb shell rm /system/framework/framework-res.apk (file removed)
- adb push C:\services.jar /system/framework (success 0.250s)
- adb push C:\framework-res.apk /system/framework (success 1.80s)
(I just have the files on C temporarily for the ease of it.)
Reboot
Then the errors hit once I unlock the screen.
Heheh, I can't really think of any other way to approach it. Hmmmm.
Click to expand...
Click to collapse
Weird, I have no idea why that won't work for you. Anyway, there is another way around it. Just open up your patch.zip (from 0.7.0 to 0.7.4), go to the framework folder, and remove the services.jar and framework-res.apk from it. Then go about the wipe/install of both zips like normal. That way the patch zip will no longer replace those two files. Anything that you don't want changed in a patch zip can just removed from it.
Snap Jackel Pop said:
Any idea what I'd need to put back for video codecs? I'm running CM 6.1 but it doesn't run streaming videos from the NHL Gamecenter unlike the stock rom. I'm assuming its a codec issue and was wondering what I'd want to replace.
Click to expand...
Click to collapse
Sorry cant help on that one, I haven't run a CM rom since like 1 or 2.0 haha. You may try to see if others are having that problem, or if it is a known issue with the 6.1 and streaming videos. Is it only that site? Maybe a flash player version problem?
rmk40 said:
Good idea with this thread. It's impossible for us to please everyone and this is absolutely the most constructive way to deal with everyone's personal preferences. There is one key consideration for everyone. If we make other changes to the frameworks which you DO want, pushing files from this thread which have not been updated with said features will eliminate those changes as well. Point is, the concept here is good but it needs to be maintained.
Also, the intention with Virtuous is to provide options. The ROM isn't finalized so ROM Manager isn't populated with all the variants it will eventually have. Case in point, we had to re-base on the new Egypt RUU and are in the process of re-applying all our changes. If we had a variety of options, we would have to redo all of those as well. Once we're in a more "final" state, you'll start to see a lot more choices officially supported with the ROM.
The keyboard mod you have here will probably just become part of Virtuous 0.8.0, by the way. I had not realized our replacement eliminated the quick key customizations (oversight).
Click to expand...
Click to collapse
Yea, I assumed it would be out-dated soon anyway, as changes are made to your roms. I'll adjust it to keep up if the need is there though. It was just a couple of the more simple alterations that I made, and after seeing so many people cluttering up your thread with posts about them, I decided to post this.
Mostly, though, I just wanted to remind people that many simple issues/personal needs (like an app being removed from a rom, or a small change to one or two apps) can be solved with a little bit of thought and some adb knowledge - both of which should be present if you are working with a rooted phone in the first place!
the1wingedangel said:
many simple issues/personal needs can be solved with a little bit of thought and some adb knowledge - both of which should be present if you are working with a rooted phone in the first place!
Click to expand...
Click to collapse
I really cant emphasise this enough!
Sent from my sweet G2
Do you know if there is anyone to return the power down message. I remember before there being and option to restart the phone, hibernate, power off, or reboot into recovery. I liked having that. Is there anyway to return this feature?
Sent from my sweet G2
felixk87 said:
Is it possible to replace the sense lockscreen/calendar with the vanilla versions? I have tried searching but can't find find any instructions for how to do this
Click to expand...
Click to collapse
ddotpatel said:
You could possibly try pushing the lockscreen apk from SuperVillainZ.
NANDROID 1ST THOUGH!!!!!
Sent from my HTC Vision using XDA App
Click to expand...
Click to collapse
by chance, did anyone try this? if not, I will try it in a few...

Quick and Easy Bootanimation.zip Swap for the G2

****Disclaimer!!! I am not responsible for any errors or issues that may come from using these directions. This method has been tested and used by me on the T-Mobile G2 ONLY.****
Ok, I like playing with boot animations on my device. And I have this quirk for running everything I can on the device, rather than through ADB, unless I have to. While digging through assorted threads, here and abroad, I ran across a nifty app called GScript lite, free on the Market, and amazingly useful. On another thread, someone pointed out that if you copy a boot animation to /data/local, it will take precedence over any boot animations that your favorite ROM may install. So, I decided to simplify changing boot ani's, so I can swap them around whenever I feel like it. I now have it down to about 30 sec, and decided to post this for everyone interested to try it. Ok, so, here's the details;
Requirements: GScript lite, file manager, new boot animations
1) Download the animation you want to try to your SDcard
2) Copy the zip to /mnt/sdcard
3) Rename animation file "bootanimation.zip"
4) Open GScript and hit menu
a) Type in whatever you want to call the script in the top
box
b) Make sure "Needs SU?" is checked
c) Type cp /mnt/sdcard/bootanimation.zip /data/local
<enter>
reboot
d) Now hit "save"
5) Just press your scriptname in the list and enjoy!
From here on out, to change boot animations, all you need to do is copy the renamed file to SD root, and click on that script, phone will reboot showing your brand new animation. "Share and Enjoy!"
I'd like to thank the GScript devs for a very useful tool, and Kaanha for the commands
Click the Thanks button if this helps you.
Nice...definitely makes switching them pretty simple. Thanks!
Sent from my HTC Vision using XDA Premium App
Works like a charm!!!!
Thanks Much!!!
There are a few apps on the Market that can do this as well, no Terminal knowledge required (or scripts)
Simply search for your bootanimation from the GUI and it should do the job for you...
Boot Animation Changer Lite comes to mind, it's free.
There are a few other ones if you search for bootanimation on the Market.
Hope this helps. Good luck
perfect, worked like a charm, enjoying my honeycomb animation now. thank you.
neophyte8 said:
perfect, worked like a charm, enjoying my honeycomb animation now. thank you.
Click to expand...
Click to collapse
Link me to your honeycomb animation?
*Edit nevermind i just used the boot animation from the honeycomb port 18 thanks.

[MOD] Enable Custom Boot Sounds MT4G/Glacier CM/AOSP

This is the same implementation as the g2 boot sound enabler with a few improvements.
i'm not responsible if you blah blah blah. don't be stupid, and don't flash things to your phone without realizing the possible risk. i haven't bricked a phone yet and don't plan on it.
DOWNLOAD:
View attachment bootsound-glacier-CM-signed.zip
MIRROR - Mediafire
This enables custom boot sounds. After flashing and rebooting you should be greeted with the all to famous "DROID" bootsound.
you will also have some new useful commands in terminal:
newbootsound - copies /sdcard/android_audio.mp3 as new bootsound
newbootanim - copies /sdcard/bootanimation.zip as new boot animation
bootsoundoff - turns boot sound off
bootsoundon - turns boot sound back on
Just files named accordingly on your sdcard's root i.e. 'bootanimation.zip' and 'android_audio.mp3'
Flash. Reboot. Enjoy.
Rom developers - feel free to include this in your builds if you so desire, please make sure credit is given accordingly to spiicytuna, mrdaviso, and myself.
if you're running a sense rom there's a totally different way of doing it so, should you be running sense... don't flash. or flash at your own risk, i can't guarantee the outcome.
untested... let me know if things go smoothly, the same process works for the evo g2 etc.. so shouldnt be an issue. make sure your media volume is up, some report if it's muted you wont hear it. (not sure about this, i guess it would be easy to test...)
Thanks this worked GREAT.
thanks worked great on cm7 rc2! so basically i can rename any sound file i want then overwrite the original? or does it have to be done through terminal? sorry for the ?? i am just learning
thanks again!
Terminal isn't required, but the sound you need to replace resides in /system/media so a file explorer with root access would be necessary.
not working?
i have tried this through root explorer and terminal. the outcome is correct in terminal... says that the new boot sound is there. I also was sure to check the volume. and still nothing? please help?
ya doesnt work on cm7 rc4 either
worked great for me ... except that the boot sound plays regardless of whether I have the volume down / muted / etc. before I reboot.
i'm on royalginger v1.5 which is based on cm7 nightly #31
ckisgen said:
worked great for me ... except that the boot sound plays regardless of whether I have the volume down / muted / etc. before I reboot.
i'm on royalginger v1.5 which is based on cm7 nightly #31
Click to expand...
Click to collapse
Why is it based off of #31? Just curious...
DADDYDC650 said:
Why is it based off of #31? Just curious...
Click to expand...
Click to collapse
why didn't you just IM me? el oh el
cos in my researching on the boards and also the other test builds I made - #31 was the most stable overall.
Ya can't seem to get it to work. The script seem to work fine but i think im applying the Audio file wrong can someone post an example? System/media. Running cm rc4
guys here is a manual method of unlocking boot audio...I got this from an older thread that was deleted for some odd reason..
anyway I did not make this script and I do not intend to take credit, but here is a manual way if all else fails.
1. download and rename the bootsnd.txt to bootsnd.sh and NOT bootsnd.sh.sh
2. place the file in the root of your sd card
3. use root explorer to set /system to r/w
4. open terminal type: su and hit enter to gain root priv,
5. type "cd /sdcard" with out the quotes to mount the sdcard root
6. type "sh bootsnd.sh" with out quotes and hit enter wait about 10 seconds then close terminal NOTE* YOU WILL NOT SEE ANY OUTPUT or confirmation! hit enter ONLY once unless you want to eat BOOTLOOPS for breakfast
7. with root explorer push android_audio.mp3 to /system/media
8. reboot and BOOM!
this does NOT work on sense roms, only works with AOSP (any cm builds) as far as I have tested.
I have included my own boot audio its a god of war 3 overture theme portion
now that is my work as I had to chop it up
unzip and rename it to android_audio.mp3 first before pushing it

[mod] script - disable key backlight

Here is a very simple script that turns off the key lights..
I find them very annoying at night, and an unnecessary waste of battery.
Extract the file from the zip, place in init.d and set permissions.
Might be useful for the Rom devs as an option in aroma installers?
If this isn't the place then please delete this thread someone of mod variety.
#THESE ARE NOT TO BE FLASHED IN RECOVERY
http://db.tt/E0UUuuAs
backfromthestorm said:
Here is a very simple script that turns off the key lights..
I find them very annoying at night, and an unnecessary waste of battery.
Place in init.d and set permissions.
Might be useful for the Rom devs as an option in aroma installers?
If this isn't the place then please delete this thread someone of mod variety.
Thanks.
http://db.tt/k0yjWc6c
Click to expand...
Click to collapse
nice can you also make one for button lights always on
Wow Thanks
i wish if there is an app for that,, So we can switch on/off easy
Isn't working for me..
Tried this both permissions:
x x x
x x x
x x x
and
x x x
x o o
x o o
Also did a full reboot after each permission change
XXX
XOX
XOX
Turn off fastboot?
Also try executing in root explorer.
manually executing helps. But after a reboot they are back on..until I execute the script again..
been looking for something like this for weeks but unfortunately it doesn't work for me, used root explorer set permissions as you wrote and disabled fastboot
edit
sorry my fault i did a quick reboot instead of a full reboot.. now working perfect many thanks matey and welcome to the one x
boshot said:
manually executing helps. But after a reboot they are back on..until I execute the script again..
Click to expand...
Click to collapse
Disable fastboot in power settings.
If no, then hold power for twenty seconds.
I did...but they always went on again.. Don't know why..
Oke the off Works
But the on does not work
When the phone boots up they are on
But when i turn off screen then the light are off and stay off
Sent from my HTC One X using xda premium
not work for me, and yes fastboot is off in powersettings!
ISC V6.1
peterfeter said:
not work for me, and yes fastboot is off in powersettings!
ISC V6.1
Click to expand...
Click to collapse
full reboot?
peterfeter said:
not work for me, and yes fastboot is off in powersettings!
ISC V6.1
Click to expand...
Click to collapse
Nice to see I'm not alone with that problem.
It's doing quite well if I manually execute it from Root explorer, but after a reboot it's not execute automatic by the script..
fastboot off and al lot of full reboots were done.. I really don't know what the problem is..
Solution: I'll never reboot by phone anymore
boshot said:
Nice to see I'm not alone with that problem.
It's doing quite well if I manually execute it from Root explorer, but after a reboot it's not execute automatic by the script..
fastboot off and al lot of full reboots were done.. I really don't know what the problem is..
Solution: I'll never reboot by phone anymore
Click to expand...
Click to collapse
Which ROM are you using? I have noticed that not all ROMs support all init.d scripts for some reason due to ramdisk issues. I haven't bothered investigating exactly why.
EDIT: @OP FYI The backlights off script that you have posted is identical to the backlights back on script. I am assuming that the back on script should read:
Code:
echo KB - set Key Backlight [B][COLOR="DarkRed"]1[/COLOR][/B]
echo "[B][COLOR="DarkRed"]1[/COLOR][/B]" > /sys/class/leds/button-backlight/brightness
I'm using Touch X-treme ( Sig )
Also tried it on villain rom with a friends HOX, same behavior.
I saw the sig but most people don't update them.
You can test to see if you have an underlying problem with (some) init.d scripts running correctly by unzipping this script and placing it in your system/etc/init.d folder and setting the permissions to match the others that you have in there.
Then do a full reboot and view the contents of the file:
/sys/devices/virtual/bdi/179:0/read_ahead_kb
It should read '4096'. If it doesn't, you have a problem with (some) init.d scripts.
All the script does is to increase the size of the SD card readahead cache to 4096 rather than whatever is is set to run at.
Once you have tested, simply delete the init.d script and reboot again to restore your original value.
Thanks.
Will test it later the day...
Send via Tapatalk 2
@ nobnut
Sorry had wrong link up for auto.
No apology necessary. I was just letting you know before people started getting confused
EDIT: The scripts work really well. Thank you.
I don't use them as init.d scripts. I execute them from shortcuts using Tasker, that way I can have manual control over the button lights from the homescreen
Bloomin' marvellous
Thanks again.
@nobnut Cool, btw the first few lines of the auto script don't do anything, the last line just sets it back to rw instead of ro, so the phone can have control back.

[Q] init.d script to start a service

Hey,
im not sure if anyone is familiar with KeepScreen but its an amazing app which has a wake lock preventing the screen from timing out. So for instance, if youre reading xda and your screen shuts off, use this app to set it to never shut off when xda is the foreground app. It seriously works amazingly and i love it. But ever since ICS it doesnt start on boot.
I have found the command am to start an app from the command line but i can not for the life of me figure out how to use it inside an init.d script to start keep screen's service.
Any help?
Not sure if this is ROM specific, but I use the feature where the screen won't timeout if I'm looking at the screen. Can be finicky in lite light but other than that our had been great for me.
Sent from my SGH-T999 using Tapatalk 2
threshold350 said:
Not sure if this is ROM specific, but I use the feature where the screen won't timeout if I'm looking at the screen. Can be finicky in lite light but other than that our had been great for me.
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
Yeah I've used that but like you said it's not always perfect. KeepScreen has been flawless except the starting at boot issue
Sent from my SGH-T999 using Tapatalk 2
@ OP....
if your app is using init.d scripts to execute commands... and they aren't starting up after boot...
I think I understand you correctly here...
Then navigate to /system/etc/ and find the file init.qcom.post_boot.sh and open it in edit mode with a file explorer (root explorer is my preference but whatever gets it done) and add this line to the very end of the file as text
/system/etc/init.d*
That will execute init.d scripts AFTER boot, and might solve your problem.
Init.d executes early in the boot phase (pretty much when you see your boot animations and such) and simply put, that could be your issue.
Give it a shot, and if it doesn't work then there is likely and issue caused by what you described in your post.... (not every app works flawlessly with any version of android)
cobraboy85 said:
@ OP....
if your app is using init.d scripts to execute commands... and they aren't starting up after boot...
I think I understand you correctly here...
Then navigate to /system/etc/ and find the file init.qcom.post_boot.sh and open it in edit mode with a file explorer (root explorer is my preference but whatever gets it done) and add this line to the very end of the file as text
/system/etc/init.d*
That will execute init.d scripts AFTER boot, and might solve your problem.
Init.d executes early in the boot phase (pretty much when you see your boot animations and such) and simply put, that could be your issue.
Give it a shot, and if it doesn't work then there is likely and issue caused by what you described in your post.... (not every app works flawlessly with any version of android)
Click to expand...
Click to collapse
Thanks! But this isnt my app. Its an app in the playstore. I linked it in the first post. The app works on Gingerbread perfectly, but not on ICS or JB. It fails to start the service once the BOOT_COMPLETE broadcast is sent. So i was hoping to use an init.d script to manually start the service. However, when i open terminal emulator and type
Code:
am KeepScreen
nothing happens. So i guess my question is more directed to how to properly use the
Code:
am
command from terminal.
Your command line is incomplete
elesBB,
I ran into this old thread, but this might be helpful to others having the same problem as elesBB did. The command line is incomplete. Try:
am com.tni.KeepScreenLite
scvjohnny
scvjohnny said:
elesBB,
I ran into this old thread, but this might be helpful to others having the same problem as elesBB did. The command line is incomplete. Try:
am com.tni.KeepScreenLite
scvjohnny
Click to expand...
Click to collapse
I've since modded the apk but thanks!
Sent from my SGH-M919 using Tapatalk

Categories

Resources