Shutdown (Power off) with Android?

Is it possible to connect a physically power button?


The physical power button is possible with power from the GPIO header, check the discussion here:

Is there a reset signal on the RockPi4?

This will just be an option to cut off power the hard way. I am looking for a safe shutdown that protects the file system to be corrupted, which could happen in case of hard cut off.

Please include the shutdown / reboot options also in the “normal” Android images.

At the moment i activate the Download mode and power of with a main switch in front of the power supply.

Can I ask how you get to “Download mode” my remote keyboard does not have a POWER button ?


The 7.1 img have a Powerbutton app, with this I et too the download mode.



Thanks thats not there at the moment on the 9 version … fingers crossed it gets added soon …

I think I was hoping for a keyboard shortcut ??

The power button is not available in the plain 7.1 image and only this supports Raspberry Pi’s TouchScreen and Pi camera. Please make it available also there (and also in the new version 9 image).

Found a workaround that is working for me (on the plain Android 9 Pie image):
If you install “Qute” terminal, you can create a script with command
reboot -p
and you can create a shortcut to that script on the desktop. Clicking this shortcut will trigger a shutdown (without confirmation!),


Really good workaround, Thanks! Works with plain Android 7.1 image too.

I have Rock pi4c board.
Does it has POWER pads for button or not? I need it for going to sleep mode.
This picture is correct?

I need this button for car usage.

And where can I download schematic of ROCK Pi 4c?

There three buttons are:

ADC key, Maskrom key, Reset key.

You can refer the schematic and the components diagram.

Ok. Thank you.
I need android sleep state when my car isn’t running. How to enter to sleep?
When I try to close the ADC key contacts, board does not go to sleep.

The next version will look for gpio at 40PIN as the Power button

1 Like

What is the next version? Board or source?

The Android 10 source.

1 Like

I built Android 10 from source for pi4c, but 40PIN does not work like power button.
Can you give me some patch to activate this function?

Please refer to the:

&rk_key {
    status = "okay";

    power-key {
		gpios = <&gpio4 26 GPIO_ACTIVE_HIGH>;
		linux,code = <116>;
		label = "power";

1 Like

This commit from Pie does not compile on Android 10.

DTC     arch/arm64/boot/dts/rockchip/rk3399-rockpi-4c.dtb
Error: arch/arm64/boot/dts/rockchip/rk3399-rockpi-4c.dts:938.1-8 Label or path rk_key not found
FATAL ERROR: Syntax error parsing input tree
scripts/Makefile.lib:307: recipe for target 'arch/arm64/boot/dts/rockchip/rk3399-rockpi-4c.dtb' failed
make[1]: *** [arch/arm64/boot/dts/rockchip/rk3399-rockpi-4c.dtb] Error 1
arch/arm64/Makefile:145: recipe for target 'rockchip/rk3399-rockpi-4c.dtb' failed

Could you tell me please, how fix it?

I have committed the changes, please repo Sync.

Please press the 16PIN grounding analog Power key in 40PIN.

1 Like