Remote turn off app helps us to turn off the Android Phone with SMS.
Click on the above link to download the file. The downloaded file will be in the Zip format. You can extract it using unzipping software like 7-Zip.
After you extracted the files, you can see the RemotePowerOff apk file within the extracted folder (system/app).
Transfer the apk file to the Android (if it is on the PC) and install it.
Alternatively, you can install the zip file directly in the custom recovery. You can check this article to boot your Android phone into the recovery mode.
I assume that you’ve installed the app on your device. Let's see the steps to do the task.
Now I suggest you to try this yourself first. Just grab another phone and send SMS (your secret code only; Keep in mind that the secret code is case sensitive) to your Android device.
Once your device received the SMS, you’ll be prompted to provide the root permission for the app. This is just one time only and it will not prompt you to provide root permission in future. Just tap “Grant" option.
Your device will begin to shutdown. Now we know that the setup works perfectly.
That’s it. From now on, when you send the secret code in the SMS to your Android handset, the phone will shutdown.