Behold 2 flashlight interest..


Last Updated:

  1. jvrobert

    jvrobert Well-Known Member This Topic's Starter

    Joined:
    Dec 29, 2009
    Messages:
    51
    Likes Received:
    31
    Hi - I'm the author of the MomentFlash app (allows Samsung Moment users to use the LED flash on the camera as a flashlight). Someone on the android market mentioned there was interest in a version that worked on the Behold 2.

    A few questions:

    Is there already an app to do this for the Behold 2? If not, is there interest in one?

    If there's interest, I'll need some help testing as I don't own a Behold 2 so would be flying blind based on the kernel source, assuming I can do the same thing on the behold 2 I do on the moment.
     

    Advertisement
    Exaqtion likes this.
  2. Mastermind278

    Mastermind278 Well-Known Member

    Joined:
    Dec 11, 2009
    Messages:
    283
    Likes Received:
    97
    I am not sure about the interest with everyone else, but I think it would be a pretty interesting program. I tried downloading the program but it stated that I didn't have the correct model. It might be possible if that restriction is removed it might work on the Behold2.
    I am willing to help test if you want to pursue this! :)
     
  3. yatimameiji

    yatimameiji Well-Known Member

    Joined:
    Dec 9, 2009
    Messages:
    471
    Likes Received:
    43
    I would test it out as well as I used to have a Sony Ericsson phone(K850) and I loved that I could use the led as a flashlight as it was very bright.
     
  4. jvrobert

    jvrobert Well-Known Member This Topic's Starter

    Joined:
    Dec 29, 2009
    Messages:
    51
    Likes Received:
    31
    OK, I will take a look. I'll probably need to tweak the low level code a bit, and to do that I'll need a little help. Can someone who has the Android SDK installed and is familiar with ADB please run the following command and post the output?

    adb shell "ls -l /dev"
     
  5. Mastermind278

    Mastermind278 Well-Known Member

    Joined:
    Dec 11, 2009
    Messages:
    283
    Likes Received:
    97
    Code (Text):
    1.  
    2. >adb shell "ls -l /dev"
    3. crw------- root     root       7, 135 2010-01-05 12:59 vcsa7
    4. crw------- root     root       7,   7 2010-01-05 12:59 vcs7
    5. crw------- root     root      10,  27 2010-01-05 12:59 vtmdrv
    6. crw------- root     root     245,   1 2010-01-05 12:59 ttyEFS0
    7. crw------- root     root     245,   0 2010-01-05 12:59 ttyCSD0
    8. prw-rw-rw- root     root              2010-01-05 17:04 vtrsp
    9. prw-rw-rw- root     root              2010-01-05 17:04 vtreq
    10. crw------- root     root     116,  33 2010-01-05 12:59 timer
    11. crwxrwxrwx system   system   100,   0 2010-01-05 12:59 bma150
    12. crw------- root     root      81,  20 2010-01-05 12:59 video20
    13. crw-rw-rw- system   camera   247,   0 2010-01-05 12:59 msm_camera0
    14. drwxr-xr-x root     root              2010-01-05 12:59 block
    15. crw------- root     root     249,   0 2010-01-05 12:59 diag
    16. crw------- root     root       7, 128 2010-01-05 12:59 vcsa
    17. crw------- root     root       7,   0 2010-01-05 12:59 vcs
    18. drwxr-xr-x root     root              2010-01-05 12:59 graphics
    19. drwxr-xr-x root     root              2010-01-05 12:59 input
    20. drwxr-xr-x root     root              2010-01-05 12:59 oncrpc
    21. crw------- root     root     252,   2 2010-01-05 12:59 smdcntl2
    22. crw------- root     root     252,   1 2010-01-05 12:59 smdcntl1
    23. crw------- root     root     252,   0 2010-01-05 12:59 smdcntl0
    24. crw------- root     root      10,  28 2010-01-05 12:59 network_throughput
    25. crw------- root     root      10,  29 2010-01-05 12:59 network_latency
    26. crw------- root     root      10,  30 2010-01-05 12:59 cpu_dma_latency
    27. crwxrwxrwx system   system    10,  31 2010-01-05 12:59 proximity
    28. crwxrwxrwx system   system    10,  32 2010-01-05 12:59 akm8973_aot
    29. crwxrwxrwx system   system    10,  33 2010-01-05 12:59 akm8973_daemon
    30. crw-rw-rw- system   system    10,  34 2010-01-05 12:59 max9877
    31. crw------- root     root      10,  35 2010-01-05 12:59 max17040_driver
    32. crwxrwxrwx system   system    10,  36 2010-01-05 12:59 melfas_fw_download
    33. crw------- root     root      10,  37 2010-01-05 12:59 fsa9480
    34. crw-rw-r-- system   radio     10,  38 2010-01-05 12:59 alarm
    35. crw-rw-rw- bluetooth bluetooth  10, 223 2010-01-05 12:59 uinput
    36. crw-rw---- adb      adb       10,  39 2010-01-05 12:59 android_adb_enable
    37. crw-rw---- adb      adb       10,  40 2010-01-05 12:59 android_adb
    38. drwxr-xr-x root     root              2010-01-05 12:59 log
    39. crw-rw-rw- root     root      10,  44 2010-01-05 12:59 binder
    40. crw-rw---- system   graphics  10,   5 2010-01-05 12:59 pmem_gpu1
    41. crw-rw---- system   graphics  10,   4 2010-01-05 12:59 pmem_gpu0
    42. crw-rw---- system   audio     10,   3 2010-01-05 12:59 pmem_adsp
    43. crw-rw---- system   graphics  10,   2 2010-01-05 12:59 pmem
    44. crw-rw---- system   camera    10,   1 2010-01-05 12:59 pmem_camera
    45. crw-rw-rw- root     root      10,  45 2010-01-05 12:59 ashmem
    46. crw-rw---- system   graphics  10,   0 2010-01-05 12:59 hw3d
    47. crw-rw-rw- system   audio     10,  46 2010-01-05 12:59 msm_snd
    48. crw------- root     root      10,  47 2010-01-05 12:59 msm_wma
    49. crw------- root     root      10,  48 2010-01-05 12:59 msm_amrnb_in
    50. crw------- root     root      10,  49 2010-01-05 12:59 msm_aac
    51. crw------- root     root      10,  50 2010-01-05 12:59 msm_amrnb
    52. crw------- root     root      10,  51 2010-01-05 12:59 msm_qcelp
    53. crw------- root     root      10,  52 2010-01-05 12:59 msm_evrc
    54. crw-rw---- system   audio     10,  53 2010-01-05 12:59 msm_mp3
    55. crw-rw---- system   audio     10,  54 2010-01-05 12:59 msm_preproc_ctl
    56. crw-rw---- system   audio     10,  55 2010-01-05 12:59 msm_pcm_in
    57. crw-rw---- system   audio     10,  56 2010-01-05 12:59 msm_pcm_ctl
    58. crw-rw---- system   audio     10,  57 2010-01-05 12:59 msm_pcm_out
    59. crw------- root     root      10,  58 2010-01-05 12:59 nmea
    60. crw------- root     root      10,  59 2010-01-05 12:59 loopback
    61. crw------- root     root      10,  60 2010-01-05 12:59 smem_log
    62. crw-r----- radio    radio     10,  61 2010-01-05 12:59 qmi2
    63. crw-r----- radio    radio     10,  62 2010-01-05 12:59 qmi1
    64. crw-r----- radio    radio     10,  63 2010-01-05 12:59 qmi0
    65. crw------- root     root       4,  63 2010-01-05 12:59 tty63
    66. crw------- root     root       4,  62 2010-01-05 12:59 tty62
    67. crw------- root     root       4,  61 2010-01-05 12:59 tty61
    68. crw------- root     root       4,  60 2010-01-05 12:59 tty60
    69. crw------- root     root       4,  59 2010-01-05 12:59 tty59
    70. crw------- root     root       4,  58 2010-01-05 12:59 tty58
    71. crw------- root     root       4,  57 2010-01-05 12:59 tty57
    72. crw------- root     root       4,  56 2010-01-05 12:59 tty56
    73. crw------- root     root       4,  55 2010-01-05 12:59 tty55
    74. crw------- root     root       4,  54 2010-01-05 12:59 tty54
    75. crw------- root     root       4,  53 2010-01-05 12:59 tty53
    76. crw------- root     root       4,  52 2010-01-05 12:59 tty52
    77. crw------- root     root       4,  51 2010-01-05 12:59 tty51
    78. crw------- root     root       4,  50 2010-01-05 12:59 tty50
    79. crw------- root     root       4,  49 2010-01-05 12:59 tty49
    80. crw------- root     root       4,  48 2010-01-05 12:59 tty48
    81. crw------- root     root       4,  47 2010-01-05 12:59 tty47
    82. crw------- root     root       4,  46 2010-01-05 12:59 tty46
    83. crw------- root     root       4,  45 2010-01-05 12:59 tty45
    84. crw------- root     root       4,  44 2010-01-05 12:59 tty44
    85. crw------- root     root       4,  43 2010-01-05 12:59 tty43
    86. crw------- root     root       4,  42 2010-01-05 12:59 tty42
    87. crw------- root     root       4,  41 2010-01-05 12:59 tty41
    88. crw------- root     root       4,  40 2010-01-05 12:59 tty40
    89. crw------- root     root       4,  39 2010-01-05 12:59 tty39
    90. crw------- root     root       4,  38 2010-01-05 12:59 tty38
    91. crw------- root     root       4,  37 2010-01-05 12:59 tty37
    92. crw------- root     root       4,  36 2010-01-05 12:59 tty36
    93. crw------- root     root       4,  35 2010-01-05 12:59 tty35
    94. crw------- root     root       4,  34 2010-01-05 12:59 tty34
    95. crw------- root     root       4,  33 2010-01-05 12:59 tty33
    96. crw------- root     root       4,  32 2010-01-05 12:59 tty32
    97. crw------- root     root       4,  31 2010-01-05 12:59 tty31
    98. crw------- root     root       4,  30 2010-01-05 12:59 tty30
    99. crw------- root     root       4,  29 2010-01-05 12:59 tty29
    100. crw------- root     root       4,  28 2010-01-05 12:59 tty28
    101. crw------- root     root       4,  27 2010-01-05 12:59 tty27
    102. crw------- root     root       4,  26 2010-01-05 12:59 tty26
    103. crw------- root     root       4,  25 2010-01-05 12:59 tty25
    104. crw------- root     root       4,  24 2010-01-05 12:59 tty24
    105. crw------- root     root       4,  23 2010-01-05 12:59 tty23
    106. crw------- root     root       4,  22 2010-01-05 12:59 tty22
    107. crw------- root     root       4,  21 2010-01-05 12:59 tty21
    108. crw------- root     root       4,  20 2010-01-05 12:59 tty20
    109. crw------- root     root       4,  19 2010-01-05 12:59 tty19
    110. crw------- root     root       4,  18 2010-01-05 12:59 tty18
    111. crw------- root     root       4,  17 2010-01-05 12:59 tty17
    112. crw------- root     root       4,  16 2010-01-05 12:59 tty16
    113. crw------- root     root       4,  15 2010-01-05 12:59 tty15
    114. crw------- root     root       4,  14 2010-01-05 12:59 tty14
    115. crw------- root     root       4,  13 2010-01-05 12:59 tty13
    116. crw------- root     root       4,  12 2010-01-05 12:59 tty12
    117. crw------- root     root       4,  11 2010-01-05 12:59 tty11
    118. crw------- root     root       4,  10 2010-01-05 12:59 tty10
    119. crw------- root     root       4,   9 2010-01-05 12:59 tty9
    120. crw------- root     root       4,   8 2010-01-05 12:59 tty8
    121. crw------- root     root       4,   7 2010-01-05 12:59 tty7
    122. crw------- root     root       4,   6 2010-01-05 12:59 tty6
    123. crw------- root     root       4,   5 2010-01-05 12:59 tty5
    124. crw------- root     root       4,   4 2010-01-05 12:59 tty4
    125. crw------- root     root       4,   3 2010-01-05 12:59 tty3
    126. crw------- root     root       4,   2 2010-01-05 12:59 tty2
    127. crw------- root     root       4,   1 2010-01-05 12:59 tty1
    128. crw-rw-rw- root     system     4,   0 2010-01-05 12:59 tty0
    129. crw-rw-rw- root     root       5,   2 2010-01-05 12:59 ptmx
    130. crw------- root     root       5,   1 2010-01-05 12:59 console
    131. crw-rw-rw- root     root       5,   0 2010-01-05 12:59 tty
    132. crw------- root     root     253,  36 2010-01-05 12:59 smd36
    133. crw------- root     root     253,  27 2010-01-05 12:59 smd27
    134. crw------- root     root     253,  17 2010-01-05 12:59 smd17
    135. crw------- root     root     253,   7 2010-01-05 12:59 smd7
    136. crw-r----- radio    radio    253,   0 2010-01-05 12:59 smd0
    137. crw------- root     root       1,  13 2010-01-05 12:59 mem_notify
    138. crw------- root     root       1,  11 2010-01-05 12:59 kmsg
    139. crw-rw-rw- root     root       1,   9 2010-01-05 12:59 urandom
    140. crw-rw-rw- root     root       1,   8 2010-01-05 12:59 random
    141. crw-rw-rw- root     root       1,   7 2010-01-05 12:59 full
    142. crw-rw-rw- root     root       1,   5 2010-01-05 12:59 zero
    143. crw-rw-rw- root     root       1,   3 2010-01-05 12:59 null
    144. crw------- root     root       1,   2 2010-01-05 12:59 kmem
    145. crw------- root     root       1,   1 2010-01-05 12:59 mem
    146. crw------- root     root     116,   0 2010-01-05 12:59 controlC0
    147. crw------- root     root     116,  24 2010-01-05 12:59 pcmC0D0c
    148. crw------- root     root     116,  16 2010-01-05 12:59 pcmC0D0p
    149. drwxr-xr-x root     root              2010-01-05 12:59 adsp
    150. crw------- root     root     254,   1 2010-01-05 12:59 rtc1
    151. crw------- root     root     254,   0 2010-01-05 12:59 rtc0
    152. crw------- root     root      89,   0 2010-01-05 12:59 i2c-0
    153. crw------- root     root      89,   4 2010-01-05 12:59 i2c-4
    154. crw------- root     root      89,   5 2010-01-05 12:59 i2c-5
    155. crw------- root     root      89,   3 2010-01-05 12:59 i2c-3
    156. crw------- root     root      89,   2 2010-01-05 12:59 i2c-2
    157. crw------- root     root      89,   1 2010-01-05 12:59 i2c-1
    158. crw-rw---- bluetooth bluetooth 248,   0 2010-01-05 12:59 ttyHS0
    159. crw-rw-rw- system   system   127,   0 2010-01-05 16:02 ttyHSUSB0
    160. brwxr-xr-x root     root     138,  15 2010-01-05 12:59 stl15
    161. brwxr-xr-x root     root     138,  14 2010-01-05 12:59 stl14
    162. brwxr-xr-x root     root     138,  13 2010-01-05 12:59 stl13
    163. brwxr-xr-x root     root     138,  12 2010-01-05 12:59 stl12
    164. brwxr-xr-x root     root     138,  11 2010-01-05 12:59 stl11
    165. brwxr-xr-x root     root     138,  10 2010-01-05 12:59 stl10
    166. brwxr-xr-x root     root     138,   9 2010-01-05 12:59 stl9
    167. brwxr-xr-x root     root     137,  15 2010-01-05 12:59 bml15
    168. brwxr-xr-x root     root     137,  14 2010-01-05 12:59 bml14
    169. brwxr-xr-x root     root     137,  13 2010-01-05 12:59 bml13
    170. brwxr-xr-x root     root     137,  12 2010-01-05 12:59 bml12
    171. brwxr-xr-x root     root     137,  11 2010-01-05 12:59 bml11
    172. brwxrwxrwx root     root     137,  10 2010-01-05 12:59 bml10
    173. brwxr-xr-x root     root     137,   9 2010-01-05 12:59 bml9
    174. crw-rw---- radio    radio     10, 132 2010-01-05 12:59 multipdp
    175. crw-rw---- radio    radio    255,   0 2010-01-05 12:59 dpramerr
    176. crw-rw---- radio    radio    255,   2 2010-01-05 17:08 dpram1
    177. crw-rw---- radio    radio    255,   1 2010-01-05 17:08 dpram0
    178. drwxr-xr-x root     root              2010-01-05 12:59 socket
    179. drwxr-xr-x root     root              1969-12-31 19:00 pts
    180.  
     
  6. kam187

    kam187 Well-Known Member

    Joined:
    Aug 3, 2009
    Messages:
    1,320
    Likes Received:
    46
    It exists for the galaxy, so i'm sure it works for behold 2 as well. App and source code here:

    Glowing Pear
     
  7. jvrobert

    jvrobert Well-Known Member This Topic's Starter

    Joined:
    Dec 29, 2009
    Messages:
    51
    Likes Received:
    31
    OK, here's a stab in the dark ;) It's just a quick test to see if I'm using the right device and ioctl call. If it works, it will only turn the flash on (won't turn off) so you may need to run your camera app and take a picture to cycle flash back off, or maybe reboot phone.

    Also, could you tell me what the text at the top of the app is? Should be Something/Something, like Samsung/SGH-T939 or something like that maybe.

    Install app from AppManager, then run it, then tap red button.

    Let me know if light turns on, or if nothing at all happens.
     

    Attached Files:

  8. Mastermind278

    Mastermind278 Well-Known Member

    Joined:
    Dec 11, 2009
    Messages:
    283
    Likes Received:
    97
    [​IMG]

    Unfortunately it did not work, the FLASH did not come on at all! :mad:
     
  9. kam187

    kam187 Well-Known Member

    Joined:
    Aug 3, 2009
    Messages:
    1,320
    Likes Received:
    46
    Mastermind278 - try 'glowing pear' from the market - its free
     
  10. Mastermind278

    Mastermind278 Well-Known Member

    Joined:
    Dec 11, 2009
    Messages:
    283
    Likes Received:
    97
    Glowing Pear does not work either. Says "Sorry, your device is currently not supported."
     
  11. kam187

    kam187 Well-Known Member

    Joined:
    Aug 3, 2009
    Messages:
    1,320
    Likes Received:
    46
    I guess he checks the model number :( Someone recompile the source!
     
  12. Mastermind278

    Mastermind278 Well-Known Member

    Joined:
    Dec 11, 2009
    Messages:
    283
    Likes Received:
    97
    Recompiled the code by removing the check for the Galaxy only part of the code. It turned on the LED light, however it does not turn it off. When I touch the touch screen it will flash and it will have a more brighter flash while the screen it touched. Once I close the program (Pressing Home button) the light goes off, or when the phone autolocks.

    Code (Text):
    1. devnode = "/dev/msm_camera0";
    2.  
    I think that this is what turns the FLASH on, since it was in the code.
     
  13. Ohgami

    Ohgami Well-Known Member

    Joined:
    Nov 23, 2009
    Messages:
    237
    Likes Received:
    39

    My answers are: Nope, I'm interested and I'd help
     
  14. kam187

    kam187 Well-Known Member

    Joined:
    Aug 3, 2009
    Messages:
    1,320
    Likes Received:
    46
    Its supposed to work like that. Launch it for flash on, touch the screen for flashing bright, and 'home' to turn it off. I like it because it starts fast and does the job perfectly :)
     
  15. jvrobert

    jvrobert Well-Known Member This Topic's Starter

    Joined:
    Dec 29, 2009
    Messages:
    51
    Likes Received:
    31
    OK, Try this one, used the other ioctl I see in the sources.. I'm not sure if the ioctl has to be left open while the light is on (it doesn't on the Moment) so I added a 1 second delay after the light turns on (theoretically).

    So if you could let me know if
    a) Light turns on
    b) Light turns off 1 second after it turns on automatically or if it stays on until you click it.

    Thanks
     

    Attached Files:

  16. Mastermind278

    Mastermind278 Well-Known Member

    Joined:
    Dec 11, 2009
    Messages:
    283
    Likes Received:
    97
    This version seems to work fine. The option to autostart the led does not work. However once I press the button it turns on and stays on. The light only turns off when I press the button off, even after backscreen time out and pressing the HOME button. So the light only turns off when you press the button.

    There is a bit of delay on the graphics though, I press the button, light comes on and a few seconds later the button (on the screen) then lights up and vice versa when shutting down.

    Otherwise it seems like it is working fine!
     
  17. jvrobert

    jvrobert Well-Known Member This Topic's Starter

    Joined:
    Dec 29, 2009
    Messages:
    51
    Likes Received:
    31
    Cool - thanks.

    The lag in graphics was because I put a 1 second delay in just in case I needed to hold open the handle, you wouldn't be able to tell it came on at all otherwise.

    The attached should also fix the issue with the "auto-start" feature, though since you already have it installed, you may need to go in and reset the config option to "kick" it.

    Otherwise, looks like it works and I'll update the app on the Android market to indicate support for the Behold 2 (and probably galaxy, I guess).

    Can you check if the "torch" mode works? You can press in the middle of the eye, and move your finger up and out of the top to turn on "bright" mode. Then also check to make sure it turns off from bright mode if you tap eye again.

    Thanks for your help!

    EDIT: New attachment.. _May_ fix the torch issue with shutting down in 1 second on its own. Could you (or anyone else who wants to try) let me know?
     

    Attached Files:

  18. Mastermind278

    Mastermind278 Well-Known Member

    Joined:
    Dec 11, 2009
    Messages:
    283
    Likes Received:
    97
    Torch mode does work, however it only stays on for about 1 second and then the light turns off completely. The icon however, stays lit up as if it was in torch mode.

    Edit: Torch mode still only goes on for about 1 second!
     
  19. paul89

    paul89 Well-Known Member

    Joined:
    Jan 6, 2010
    Messages:
    1,004
    Likes Received:
    84
    I was the one who requested support for behold on your moment app, I hope to see soon for behold 2, I seriously cant wait!
     
  20. defiantbeast

    defiantbeast Well-Known Member

    Joined:
    Nov 24, 2009
    Messages:
    217
    Likes Received:
    17
    This is just what i was looking for. THANK YOU:):):):). The torch mode only works for a sec and then it turns off although the icon still indicates that its on. But nonetheless thank you
     
  21. paul89

    paul89 Well-Known Member

    Joined:
    Jan 6, 2010
    Messages:
    1,004
    Likes Received:
    84
    k I got the app to work with normal mode but like others said. the tourch mode stays on for 1sec. Is there any way to fix this? By the way I love the widget it is feakin awsome!!!
     
  22. defiantbeast

    defiantbeast Well-Known Member

    Joined:
    Nov 24, 2009
    Messages:
    217
    Likes Received:
    17
    Wow didnt \know there was a widget didnt bother to check. This is really a cool app
     
  23. paul89

    paul89 Well-Known Member

    Joined:
    Jan 6, 2010
    Messages:
    1,004
    Likes Received:
    84
    this app keeps freezing my phone to where i have to reboot, it freezes later when i open any camera app :mad:
     
  24. Geekingitup2005

    Geekingitup2005 Member

    Joined:
    Jun 4, 2009
    Messages:
    22
    Likes Received:
    0
    Fixed glowing pear to work on both the Behold II and Galaxy.
     

    Attached Files:

  25. nogdolan

    nogdolan Active Member

    Joined:
    Dec 15, 2009
    Messages:
    32
    Likes Received:
    3
    For what it's worth Both the Behold II Torch and the moment flash work for me :)
     

Share This Page

Loading...