通过adb-shell命令“ fastboot擦除缓存”从手机上的所有应用程序擦除缓存

时间:2018-10-26 16:07:22

标签: android fastboot

我正在尝试通过SDK-Toolkit中的官方adb-shell擦除所有应用程序缓存,而不必植根我的手机。执行命令

fastboot erase cache

仅删除应用程序缓存还是删除移动硬盘上的应用程序数据和常规数据?

1 个答案:

答案 0 :(得分:0)

fastboot tag-wiki上查看信息。

快速启动擦除缓存应仅擦除缓存分区(检查该命令的输出)。

要删除应用数据,还有另一个命令:

@IBOutlet weak var clearButton: UIBarButtonItem!
@IBOutlet weak var filterButton: UIBarButtonItem!

var selectedImage: UIImage?

override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)
    handlePost()
}

func handlePost() {
    if selectedImage != nil {
        clearButton.isEnabled = true
        clearButton.tintColor = Colors.tint
        filterButton.isEnabled = true
        filterButton.tintColor = Colors.tint
        shareButton.isEnabled = true
        shareButton.backgroundColor = Colors.tint
        shareButton.setTitleColor(.white, for: .normal)
    }
    else {
        clearButton.isEnabled = false
        clearButton.tintColor = .darkGray
        filterButton.isEnabled = false
        filterButton.tintColor = .darkGray
        shareButton.isEnabled = false
        shareButton.backgroundColor = .darkGray
        shareButton.setTitleColor(.lightGray, for: .normal)
    }
}

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
    if let videoUrl = info[UIImagePickerController.InfoKey.mediaURL] as? URL {
        if let thumbnail = self.generateThumbnailForImage(videoUrl) {
            self.videoUrl = videoUrl
            self.photoImageView.image = thumbnail
            self.selectedImage = thumbnail
            handlePost()
        }
    }
    if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage {
        selectedImage = image
        photoImageView.image = image
        handlePost()
    }
    dismiss(animated: true, completion: nil)
}

但是请小心使用的命令。您可能会得到不想要的结果。干杯。