Merge remote-tracking branch 'TeamWin/android-11' into android-11
Change-Id: I7a3a43554dd1dd099ac5255a956579459759a3a6
This commit is contained in:
@@ -161,6 +161,9 @@ ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true)
|
||||
ifeq ($(TW_EXCLUDE_LPDUMP),)
|
||||
TWRP_REQUIRED_MODULES += lpdump lpdumpd.rc
|
||||
endif
|
||||
ifeq ($(TW_EXCLUDE_LPTOOLS),)
|
||||
TWRP_REQUIRED_MODULES += lptools
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(TW_USES_VENDOR_LIBS),true)
|
||||
|
||||
@@ -1112,6 +1112,7 @@ bool TWPartition::Is_File_System(string File_System) {
|
||||
File_System == "yaffs2" ||
|
||||
File_System == "exfat" ||
|
||||
File_System == "f2fs" ||
|
||||
File_System == "erofs" ||
|
||||
File_System == "squashfs" ||
|
||||
File_System == "auto")
|
||||
return true;
|
||||
|
||||
@@ -3115,6 +3115,7 @@ void TWPartitionManager::Override_Active_Slot(const string& Slot) {
|
||||
LOGINFO("Overriding slot to '%s'\n", Slot.c_str());
|
||||
Active_Slot_Display = Slot;
|
||||
DataManager::SetValue("tw_active_slot", Slot);
|
||||
PartitionManager.Update_System_Details();
|
||||
}
|
||||
|
||||
void TWPartitionManager::Set_Active_Slot(const string& Slot) {
|
||||
@@ -3578,7 +3579,6 @@ bool TWPartitionManager::Unmap_Super_Devices() {
|
||||
LOGINFO("removing cow partition: %s\n", cow_partition.c_str());
|
||||
destroyed = DestroyLogicalPartition(cow_partition);
|
||||
}
|
||||
rmdir((*iter)->Mount_Point.c_str());
|
||||
iter = Partitions.erase(iter);
|
||||
delete part;
|
||||
if (!destroyed) {
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
soong_namespace {
|
||||
imports: [
|
||||
"external/lptools",
|
||||
],
|
||||
}
|
||||
@@ -237,6 +237,8 @@ ifeq ($(AB_OTA_UPDATER), true)
|
||||
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/update_engine_sideload
|
||||
RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.boot@1.0.so
|
||||
RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.boot@1.1.so
|
||||
endif
|
||||
ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true)
|
||||
ifeq ($(TW_EXCLUDE_LPDUMP),)
|
||||
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/bootctl
|
||||
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/lpdump
|
||||
@@ -245,6 +247,9 @@ ifeq ($(AB_OTA_UPDATER), true)
|
||||
RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblpdump_interface-V1-cpp.so
|
||||
RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libprotobuf-cpp-full.so
|
||||
endif
|
||||
ifeq ($(TW_EXCLUDE_LPTOOLS),)
|
||||
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/lptools
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard system/core/libsparse/Android.*),)
|
||||
|
||||
+5
-1
@@ -216,7 +216,6 @@ bool twrpRepacker::Repack_Image_And_Flash(const std::string& Target_Image, const
|
||||
else
|
||||
PartitionManager.Override_Active_Slot("A");
|
||||
DataManager::SetProgress(.25);
|
||||
PartitionManager.Update_System_Details();
|
||||
if (!Backup_Image_For_Repack(part, REPACK_ORIG_DIR, Repack_Options.Backup_First, gui_lookup("repack", "Repack")))
|
||||
return false;
|
||||
if (TWFunc::copy_file(REPACK_NEW_DIR "ramdisk.cpio", REPACK_ORIG_DIR "ramdisk.cpio", 0644)) {
|
||||
@@ -261,6 +260,11 @@ bool twrpRepacker::Repack_Image_And_Flash(const std::string& Target_Image, const
|
||||
}}
|
||||
TWFunc::removeDir(REPACK_NEW_DIR, false);
|
||||
gui_msg(Msg(msg::kWarning, "repack_overwrite_warning=If device was previously rooted, then root has been overwritten and will need to be reinstalled."));
|
||||
string Current_Slot = PartitionManager.Get_Active_Slot_Display();
|
||||
if (Current_Slot == "A")
|
||||
PartitionManager.Override_Active_Slot("B");
|
||||
else
|
||||
PartitionManager.Override_Active_Slot("A");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user