summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2017-02-24 00:40:00 +0100
committerMatt Mower <mowerm@gmail.com>2017-02-24 02:21:33 +0100
commite07f010963b247e21da3f1c0cfe023be2e1219fd (patch)
treefdfdbe679084cb9c2c77ade8ffea7672cca6f275 /partitionmanager.cpp
parentlogd: add seclabel so that service runs in 7.1 tree builds (diff)
downloadandroid_bootable_recovery-e07f010963b247e21da3f1c0cfe023be2e1219fd.tar
android_bootable_recovery-e07f010963b247e21da3f1c0cfe023be2e1219fd.tar.gz
android_bootable_recovery-e07f010963b247e21da3f1c0cfe023be2e1219fd.tar.bz2
android_bootable_recovery-e07f010963b247e21da3f1c0cfe023be2e1219fd.tar.lz
android_bootable_recovery-e07f010963b247e21da3f1c0cfe023be2e1219fd.tar.xz
android_bootable_recovery-e07f010963b247e21da3f1c0cfe023be2e1219fd.tar.zst
android_bootable_recovery-e07f010963b247e21da3f1c0cfe023be2e1219fd.zip
Diffstat (limited to '')
-rw-r--r--partitionmanager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index bc4d8e136..ea8693f52 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -2092,8 +2092,8 @@ bool TWPartitionManager::Enable_MTP(void) {
}
char old_value[PROPERTY_VALUE_MAX];
- property_get("sys.usb.config", old_value, "error");
- if (strcmp(old_value, "error") != 0 && strcmp(old_value, "mtp,adb") != 0) {
+ property_get("sys.usb.config", old_value, "");
+ if (strcmp(old_value, "mtp,adb") != 0) {
char vendor[PROPERTY_VALUE_MAX];
char product[PROPERTY_VALUE_MAX];
property_set("sys.usb.config", "none");
@@ -2147,13 +2147,13 @@ void TWPartitionManager::Add_All_MTP_Storage(void) {
bool TWPartitionManager::Disable_MTP(void) {
char old_value[PROPERTY_VALUE_MAX];
- property_get("sys.usb.config", old_value, "error");
+ property_get("sys.usb.config", old_value, "");
if (strcmp(old_value, "adb") != 0) {
char vendor[PROPERTY_VALUE_MAX];
char product[PROPERTY_VALUE_MAX];
property_set("sys.usb.config", "none");
property_get("usb.vendor", vendor, "18D1");
- property_get("usb.product.adb", product, "D002");
+ property_get("usb.product.adb", product, "D001");
string vendorstr = vendor;
string productstr = product;
TWFunc::write_file("/sys/class/android_usb/android0/idVendor", vendorstr);