#!/bin/bash

This script will format your Android phone

Check if device is connected

adb 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

adb shell "twrp wipe data" echo "Device formatted successfully"

帮我写一个格式化手机的sh

原文地址: https://www.cveoy.top/t/topic/fzdb 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录