Update to latest AOSP master

Merge in latest commits from AOSP master and fix merge conflicts
diff --git a/twrp.cpp b/twrp.cpp
index 32b411c..d4e861d 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -120,6 +120,18 @@
 	bool Cache_Wipe = false, Factory_Reset = false, Perform_Backup = false;
 
 	{
+		TWPartition* misc = PartitionManager.Find_Partition_By_Path("/misc");
+		if (misc != NULL) {
+			if (misc->Current_File_System == "emmc") {
+				set_device_type('e');
+				set_device_name(misc->Actual_Block_Device.c_str());
+			} else if (misc->Current_File_System == "mtd") {
+				set_device_type('m');
+				set_device_name(misc->MTD_Name.c_str());
+			} else {
+				LOGERR("Unknown file system for /misc\n");
+			}
+		}
 		get_args(&argc, &argv);
 
 		int index, index2, len;