Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,770,637 Members 39,964 Now Online
XDA Developers Android and Mobile Development Forum

[Script] Lighthouse led script

Tip us?
 
broodplank1337
Old
(Last edited by broodplank1337; 14th June 2014 at 09:25 AM.)
#1  
broodplank1337's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 9985
Posts: 4,938
Join Date: Nov 2011
Location: Nijmegen

 
DONATE TO ME
Prompt [Script] Lighthouse led script

Since this section is almost becoming a true fossil, buried somewhere in the Sahara dessert, I decide to share just another shell script I made which is for Android.

I call it the "lighthouse" script
 
Flashbang eye hurt script
, because basically what it does is looping the brightness value of your camera LED, up and down continuously. and it looks kinda like the effect that you get from a lighthouse.
It pulses the led on and off on chosen speed (defined by intervalValue and pauseValue).

IT can be used for example for using it as a way to signal people in an emergency or so
 
it is probably the best to use it to annoy your friends with it or check out the awesome effect of Tapetum lucidum, make sure to keep a fair distance


Be warned, it may really hurt your eyes and causes temporary blind spots in your vision very rapidly (on long term this will damage your eyes without question)

 
I am not responsible for any punches or bite marks that you received, nor the eye hurt you caused with this script



Instructions:
1. Copy script to PC and adjust values if needed
2. Push script to phone in an ext4 partition, for example "adb push lighthouse /system/bin/"
3. Set chmod 755 "adb shell chmod 755 /system/bin/lighthouse"
4. Open terminal emulator and type "lighthouse" to run the script
 
4. Open terminal emulator and type "lighthouse", don't press enter yet
5. Find a suitable target, human or animal with Tapetum lucidum eyes for example. Use script at night for full performance
6. Now run the script and profit (be sure to dodge the counter attack caused by target)




Script

Code:
#!/system/bin/sh

# Lighthouse script
# by broodplank

export max=`cat /sys/class/leds/torch-sec1/max_brightness`;
export intervalValue="0.03"
export pauseValue="0.5"

while [ 1 ]

trap '{ echo "Interrupted, resetting led"; echo 0 > /sys/class/leds/torch-sec1/brightness ; exit 1; }' INT

do

 for i in `seq 0 $max`;
  do
    echo $i > /sys/class/leds/torch-sec1/brightness
    sleep $intervalValue
  done

  sleep $pauseValue

 for o in `seq $max -1 0`;
  do
    echo $o > /sys/class/leds/torch-sec1/brightness
    sleep $intervalValue
  done

  sleep $pauseValue

done

Oh and believe me, you will regret you tested it on your self if you are in a dark room. true story

Use this script responsibly (if possible)

 
not sure if troll or real.. it is a script for developers, just has a nasty outcome
Device: Samsung Galaxy S4 (i9505)

Latest Development:
 

Roms:
AOSP v4.4.4 (KTU84P) from source for I9505 (Github)
- Cleanest ROM available for i9505. along with up-to-date stock kernel, also forms a perfect base for ROM developers.

Apps:
Galaxy S4 Glove Mode App (Playstore link)
- Do you want the Glove Mode of the S4 but your ROM doesn't support it? Use this app to enable/disable it easily.

Latest Scraps:
Proprietary Lib Cleaner / Silent proprietary libs / Live Thermal Monitor / GIT Conflict Fixer

Projects in development:
 

broodROM KitKat "Aiming for perfection"
- Custom ROM with really high standards, more info soon

For sources you can visit my Github. Or take a look at all my projects

The Following 4 Users Say Thank You to broodplank1337 For This Useful Post: [ Click to Expand ]
 
elesbb
Old
#2  
elesbb's Avatar
Senior Member
Thanks Meter 4306
Posts: 6,716
Join Date: Jun 2010

 
DONATE TO ME
Quote:
Originally Posted by broodplank1337 View Post
 
Since this section is almost becoming a true fossil, buried somewhere in the Sahara dessert, I decide to share just another shell script I made which is for Android.

I call it the "lighthouse" script
 
Flashbang eye hurt script
, because basically what it does is looping the brightness value of your camera LED, up and down continuously. and it looks kinda like the effect that you get from a lighthouse.
It pulses the led on and off on chosen speed (defined by intervalValue and pauseValue).

IT can be used for example for using it as a way to signal people in an emergency or so
 
it is probably the best to use it to annoy your friends with it or check out the awesome effect of Tapetum lucidum, make sure to keep a fair distance


Be warned, it may really hurt your eyes and causes temporary blind spots in your vision very rapidly (on long term this will damage your eyes without question)

 
I am not responsible for any punches or bite marks that you received, nor the eye hurt you caused with this script



Instructions:
1. Copy script to PC and adjust values if needed
2. Push script to phone in an ext4 partition, for example "adb push lighthouse /system/bin/"
3. Set chmod 755 "adb shell chmod 755 /system/bin/lighthouse"
4. Open terminal emulator and type "lighthouse" to run the script
 
4. Open terminal emulator and type "lighthouse", don't press enter yet
5. Find a suitable target, human or animal with Tapetum lucidum eyes for example. Use script at night for full performance
6. Now run the script and profit (be sure to dodge the counter attack caused by target)




Script

Code:
#!/system/bin/sh

# Lighthouse script
# by broodplank

export max=`cat /sys/class/leds/torch-sec1/max_brightness`;
export intervalValue="0.03"
export pauseValue="0.5"

while [ 1 ]

trap '{ echo "Interrupted, resetting led"; echo 0 > /sys/class/leds/torch-sec1/brightness ; exit 1; }' INT

do

 for i in `seq 0 $max`;
  do
    echo $i > /sys/class/leds/torch-sec1/brightness
    sleep $intervalValue
  done

  sleep $pauseValue

 for o in `seq $max -1 0`;
  do
    echo $o > /sys/class/leds/torch-sec1/brightness
    sleep $intervalValue
  done

  sleep $pauseValue

done

Oh and believe me, you will regret you tested it on your self if you are in a dark room. true story

Use this script responsibly (if possible)

 
not sure if troll or real.. it is a script for developers, just has a nasty outcome
I used this, and a ship landed in my front yard
 
broodplank1337
Old
#3  
broodplank1337's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 9985
Posts: 4,938
Join Date: Nov 2011
Location: Nijmegen

 
DONATE TO ME
Quote:
Originally Posted by elesbb View Post
I used this, and a ship landed in my front yard
hahaha well I must say the script actually does provide a good signal light, which is also great to blind your mates with
Device: Samsung Galaxy S4 (i9505)

Latest Development:
 

Roms:
AOSP v4.4.4 (KTU84P) from source for I9505 (Github)
- Cleanest ROM available for i9505. along with up-to-date stock kernel, also forms a perfect base for ROM developers.

Apps:
Galaxy S4 Glove Mode App (Playstore link)
- Do you want the Glove Mode of the S4 but your ROM doesn't support it? Use this app to enable/disable it easily.

Latest Scraps:
Proprietary Lib Cleaner / Silent proprietary libs / Live Thermal Monitor / GIT Conflict Fixer

Projects in development:
 

broodROM KitKat "Aiming for perfection"
- Custom ROM with really high standards, more info soon

For sources you can visit my Github. Or take a look at all my projects

 
Galaxy*$4
Old
(Last edited by Galaxy*$4; 22nd June 2014 at 09:10 AM.)
#4  
Senior Member
Thanks Meter 11
Posts: 182
Join Date: Sep 2013
i dont know what i am missing, but how do i push it to my phone,

edit, never mind i think i got it.
Galaxy S4 AT&T 16gb internal and 32gb external sd card. wrapped in otter box defender. 4.4.2 with deadly venom magic tool kit, rooted, safe strapped.
rom slots
stock-echoe v20
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes