android led blue (heartbeat)

Post Reply
Sandr
Posts: 32
Joined: Wed Mar 30, 2016 6:48 pm
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 0
Been thanked: 0
Contact:

android led blue (heartbeat)

Post by Sandr »

how to control led blue from under android?

User avatar
mad_ady
Posts: 10954
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 996 times
Contact:

Re: android led blue (heartbeat)

Post by mad_ady »

The same way as from linux. It's exposed under /sys, but I don't know the path by heart.

Sandr
Posts: 32
Joined: Wed Mar 30, 2016 6:48 pm
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 0
Been thanked: 0
Contact:

Re: android led blue (heartbeat)

Post by Sandr »

it used to be in the utility before(odroid C2), can it be included in the odroid utility? I do not want to root the device

Luke.go
Posts: 731
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english
Has thanked: 120 times
Been thanked: 117 times
Contact:

Re: android led blue (heartbeat)

Post by Luke.go »

Hi there!
It will be applied on next update.

thatsaltydude
Posts: 23
Joined: Thu May 16, 2019 4:31 am
languages_spoken: german, english
ODROIDs: Defective and disposed: U2, N2
Currently in use: HC4
Has thanked: 14 times
Been thanked: 4 times
Contact:

Re: android led blue (heartbeat)

Post by thatsaltydude »

I don't know how to do this without root, but here is how I do it (with root).
I'm using a simple shell script which I have to launch every time I reboot because I haven't figured out how to autostart scripts. I also wrote an android app which should work on all devices with LEDs (you can actually select any led found), but you probably don't want to use an app that needs root from a stranger on the internet.

So, you can just type

su
echo none > /sys/devices/platform/leds/leds/blue:heartbeat/trigger

into the terminal emulator. This will disable it.
In theory, there are other blink modes to echo to the trigger file, but they don't seem to be working.

Sandr
Posts: 32
Joined: Wed Mar 30, 2016 6:48 pm
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 0
Been thanked: 0
Contact:

Re: android led blue (heartbeat)

Post by Sandr »

Not active checkbox...
Attachments
IMG_20190809_224442.jpg
IMG_20190809_224442.jpg (324.53 KiB) Viewed 3032 times

milesian
Posts: 22
Joined: Fri Nov 10, 2017 6:52 am
languages_spoken: english
ODROIDs: xu4
Has thanked: 35 times
Been thanked: 1 time
Contact:

Re: android led blue (heartbeat)

Post by milesian »


thatsaltydude wrote:I'm using a simple shell script which I have to launch every time I reboot because I haven't figured out how to autostart scripts. .
Highly recommend Tasker to automate scripts on boot or any condition out there, really. I use it to run a boatload on boot to mount external drives and fire up my optware stuff. Android powered by Tasker really is formidable, especially with SBC/desktop use cases like ours.

Sent from my ONEPLUS A5000 using Tapatalk

These users thanked the author milesian for the post:
thatsaltydude (Sun Aug 11, 2019 3:27 am)

User avatar
mad_ady
Posts: 10954
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 996 times
Contact:

Re: android led blue (heartbeat)

Post by mad_ady »

@milesian: Sorry for the offtopic, and it may not apply to odroids, but how do you mount external disks and bypass mount namespace isolation so that other apps can access them?
It might also be worth it to share your tasker config and maybe document things in an article for Odroid Magazine :)

Luke.go
Posts: 731
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english
Has thanked: 120 times
Been thanked: 117 times
Contact:

Re: android led blue (heartbeat)

Post by Luke.go »

@Sandr
Please update boot.ini files.

you should add a line,

Code: Select all

setenv heartbeat "1"
and below lines. before add belows, please find first and last lines.

Code: Select all

~
movi read dtbs 0 ${dtb_mem_addr}
fdt addr ${dtb_mem_addr}
if test "${heartbeat}" = "0"; then fdt set /leds/blueled linux,default-trigger "none"; fi
booti ${loadaddr} - ${dtb_mem_addr}
~

User avatar
codewalker
Posts: 1686
Joined: Mon Feb 25, 2013 11:03 am
languages_spoken: english
ODROIDs: all
Has thanked: 69 times
Been thanked: 141 times
Contact:

Re: android led blue (heartbeat)

Post by codewalker »

We do not update boot.ini during updating because user modified boot.ini.
If you want to apply new boot.ini, Remove boot.ini in /odm/boot.ini and then system restore new boot.ini.
Sandr wrote:
Sat Aug 10, 2019 5:14 am
Not active checkbox...

milesian
Posts: 22
Joined: Fri Nov 10, 2017 6:52 am
languages_spoken: english
ODROIDs: xu4
Has thanked: 35 times
Been thanked: 1 time
Contact:

Re: android led blue (heartbeat)

Post by milesian »

mad_ady wrote:
Sat Aug 10, 2019 3:13 pm
@milesian: how do you mount external disks and bypass mount namespace isolation so that other apps can access them?
Funny you mention this, I'm struggling with this on the N2 right now. With Android 7 on the XU4, it was a simple matter of mount-bind from /mnt/media_rw/xxx to /data/media/0/yyy. That put all my external drives on my "sdcard" and they were r/w accessible to all. Apps even reported correct space remaining for each drive!

But now with Android 9 on the N2, the above is totally not working. The mount-binds I do as root are visible only to root, but not to whatever default user Android is. Very frustrating, and it sure sounds like I've hit the "mount namespace isolation" wall you mentioned.

Anyway, other than recommending Tasker to the OP, I'm now totally off-topic. I hope you don't mind if I PM you with any progress that I make, should I make any.

User avatar
mad_ady
Posts: 10954
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 996 times
Contact:

Re: android led blue (heartbeat)

Post by mad_ady »

I suggest you make a new thread. Others are bound to be interested too.

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 2 guests