• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Flashlight/torch for Nexus 5

Scheduled Pinned Locked Moved Support
5 Posts 2 Posters 1.4k Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V Offline
      vandys
      last edited by 1 Sept 2017, 04:52

      The uTorch app looks like it would be nice, but unfortunately it never actually turns on the LED. I dug around a bit and it looks like it might be some strange permission problem.

      Anyway, to tide me over I wrote the simple script:

      #!/bin/sh
      cd /sys/class/leds/led:flash_torch
      sudo chmod a+rw brightness
      echo 100 > brightness
      read x
      echo 0 > brightness
      exit 0

      (adjust to taste). So in a pinch I can pop up a terminal and run this; the light comes on nicely, and when I hit return it goes back off. CLI uTorch!

      W 1 Reply Last reply 1 Sept 2017, 05:29 Reply Quote 0
      • W Offline
        wgarcia @vandys
        last edited by 1 Sept 2017, 05:29

        @vandys There is also "Indicator Torch" now in the OpenStore

        V 1 Reply Last reply 1 Sept 2017, 18:26 Reply Quote 0
        • V Offline
          vandys @wgarcia
          last edited by 1 Sept 2017, 18:26

          @wgarcia

          @wgarcia said in Flashlight/torch for Nexus 5:

          @vandys There is also "Indicator Torch" now in the OpenStore

          That doesn't work, either. Thanks for the pointer, though!

          W 1 Reply Last reply 2 Sept 2017, 04:53 Reply Quote 0
          • W Offline
            wgarcia @vandys
            last edited by wgarcia 9 Feb 2017, 04:54 2 Sept 2017, 04:53

            @vandys It works for me, I'm using the development channel in the Nexus 5

            V 1 Reply Last reply 2 Sept 2017, 04:55 Reply Quote 0
            • V Offline
              vandys @wgarcia
              last edited by 2 Sept 2017, 04:55

              @wgarcia said in Flashlight/torch for Nexus 5:

              @vandys It works for me, I'm using the development channel in the Nexus 5

              Interesting. Probably a permission problem, then. I'll check it out further when I can afford to have my phone interrupted. Thanks again.

              1 Reply Last reply Reply Quote 0
              1 out of 5
              • First post
                1/5
                Last post