AOSP10 TWRP Merge: fix conflicts and update libraries needed
This allows flame to boot TWRP. Still will need to work on super partition for vendor and system access. The plan will be to cherry-pick any updates to android-9.0 through gerrit.twrp.me to this branch as a WIP.
This commit is contained in:
+12
-7
@@ -44,14 +44,14 @@
|
||||
#include "openrecoveryscript.hpp"
|
||||
#include "progresstracking.hpp"
|
||||
#include "variables.h"
|
||||
#include "adb_install.h"
|
||||
#include "install/adb_install.h"
|
||||
#include "data.hpp"
|
||||
#include "adb_install.h"
|
||||
#include "fuse_sideload.h"
|
||||
#include "gui/gui.hpp"
|
||||
#include "gui/pages.hpp"
|
||||
#include "orscmd/orscmd.h"
|
||||
#include "twinstall.h"
|
||||
#include "install/adb_install.h"
|
||||
extern "C" {
|
||||
#include "gui/gui.h"
|
||||
#include "cutils/properties.h"
|
||||
@@ -253,8 +253,8 @@ int OpenRecoveryScript::run_script_file(void) {
|
||||
gui_msg(Msg("set_restore_opt=Setting restore options: '{1}':")(value2));
|
||||
line_len = strlen(value2);
|
||||
for (i=0; i<line_len; i++) {
|
||||
if ((value2[i] == 'S' || value2[i] == 's') && Partition_List.find(PartitionManager.Get_Android_Root_Path() + ';') != string::npos) {
|
||||
Restore_List += PartitionManager.Get_Android_Root_Path() + ';';
|
||||
if ((value2[i] == 'S' || value2[i] == 's') && Partition_List.find("/system;") != string::npos) {
|
||||
Restore_List += "/system;";
|
||||
gui_msg("system=System");
|
||||
} else if ((value2[i] == 'D' || value2[i] == 'd') && Partition_List.find("/data;") != string::npos) {
|
||||
Restore_List += "/data;";
|
||||
@@ -363,10 +363,13 @@ int OpenRecoveryScript::run_script_file(void) {
|
||||
|
||||
int wipe_cache = 0;
|
||||
string result;
|
||||
pid_t sideload_child_pid;
|
||||
// pid_t sideload_child_pid;
|
||||
|
||||
gui_msg("start_sideload=Starting ADB sideload feature...");
|
||||
ret_val = apply_from_adb("/", &sideload_child_pid);
|
||||
|
||||
// ret_val = apply_from_adb("/", &sideload_child_pid);
|
||||
Device::BuiltinAction reboot_action = Device::REBOOT_BOOTLOADER;
|
||||
ret_val = ApplyFromAdb("/", &reboot_action);
|
||||
if (ret_val != 0) {
|
||||
if (ret_val == -2)
|
||||
gui_err("need_new_adb=You need adb 1.0.32 or newer to sideload to this device.");
|
||||
@@ -378,6 +381,7 @@ int OpenRecoveryScript::run_script_file(void) {
|
||||
ret_val = 1; // failure
|
||||
}
|
||||
sideload = 1; // Causes device to go to the home screen afterwards
|
||||
#ifdef USE_28_INSTALL
|
||||
if (sideload_child_pid != 0) {
|
||||
LOGINFO("Signaling child sideload process to exit.\n");
|
||||
struct stat st;
|
||||
@@ -388,6 +392,7 @@ int OpenRecoveryScript::run_script_file(void) {
|
||||
LOGINFO("Waiting for child sideload process to exit.\n");
|
||||
waitpid(sideload_child_pid, &status, 0);
|
||||
}
|
||||
#endif
|
||||
property_set("ctl.start", "adbd");
|
||||
gui_msg("done=Done.");
|
||||
} else if (strcmp(command, "fixperms") == 0 || strcmp(command, "fixpermissions") == 0 || strcmp(command, "fixcontexts") == 0) {
|
||||
@@ -539,7 +544,7 @@ int OpenRecoveryScript::Backup_Command(string Options) {
|
||||
line_len = Options.size();
|
||||
for (i=0; i<line_len; i++) {
|
||||
if (Options.substr(i, 1) == "S" || Options.substr(i, 1) == "s") {
|
||||
Backup_List += PartitionManager.Get_Android_Root_Path() + ';';
|
||||
Backup_List += "/system;";
|
||||
gui_msg("system=System");
|
||||
} else if (Options.substr(i, 1) == "D" || Options.substr(i, 1) == "d") {
|
||||
Backup_List += "/data;";
|
||||
|
||||
Reference in New Issue
Block a user