Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
212 views
in Technique[技术] by (71.8m points)

power off - Powering off Android Things

Usually, to power down an Android device, you do this via the power button of course.

You can also do adb shell and reboot -p.

But in Android Things, I don't see a way to shut down the device. If it is no problem, I'd love to just cut the power of my Raspberry Pi for this, but is that acceptable? Could it corrupt the SD-card?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Android (and by extension, Android Things) should have no problem with a sudden loss of power. The core operating system is housed in read-only partitions on the file system, so there is no risk of corrupting the OS from a failed in-flight write.

Also, reboot -p should still work if you wanted to use that in testing or development. Going even farther with it, you could connect a Gpio with an InputDriver that emits KEYCODE_POWER to add your own power button back to the system if you felt you needed it.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...