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.7k 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

        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 Reply Quote 0
        • W Offline
          wgarcia @vandys
          last edited by

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

          V 1 Reply Last reply Reply Quote 0
          • V Offline
            vandys @wgarcia
            last edited by

            @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 Reply Quote 0
            • W Offline
              wgarcia @vandys
              last edited by wgarcia

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

              V 1 Reply Last reply Reply Quote 0
              • V Offline
                vandys @wgarcia
                last edited by

                @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

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • First post
                  Last post