Android 手机格式化脚本 - 使用 ADB 和 TWRP
#!/bin/bash
This script will format your Android phone
Check if device is connected
ad devices | grep -w device &> /dev/null if [ $? -ne 0 ]; then echo 'No device found' exit 1 fi
Confirm with user before formatting
echo 'Are you sure you want to format your device? This will erase all data.' select yn in 'Yes' 'No'; do case $yn in Yes ) break;; No ) exit;; esac done
Format device
ad shell 'twrp wipe data' echo 'Device formatted successfully'
原文地址: http://www.cveoy.top/t/topic/oi0B 著作权归作者所有。请勿转载和采集!