Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
twrp
android_bootable_recovery
Commits
4bc99b05
Commit
4bc99b05
authored
9 years ago
by
sub77
Browse files
Options
Download
Email Patches
Plain Diff
temp
Change-Id: I6c0dc93fc1e4d118bd2549af77dddb0fea8ef59e
parent
acdd29e8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
2 deletions
+47
-2
gui/action.cpp
gui/action.cpp
+31
-1
gui/objects.hpp
gui/objects.hpp
+3
-0
gui/themes_multirom/1080x1920/portrait.xml
gui/themes_multirom/1080x1920/portrait.xml
+12
-0
install.cpp
install.cpp
+1
-1
No files found.
gui/action.cpp
View file @
4bc99b05
...
...
@@ -203,6 +203,9 @@ GUIAction::GUIAction(xml_node<>* node)
ADD_ACTION
(
cancelbackup
);
ADD_ACTION
(
checkpartitionlifetimewrites
);
ADD_ACTION
(
mountsystemtoggle
);
ADD_ACTION
(
repack
);
ADD_ACTION
(
ledon
);
ADD_ACTION
(
ledoff
);
#ifdef TARGET_RECOVERY_IS_MULTIROM
ADD_ACTION
(
rotation
);
ADD_ACTION
(
multirom
);
...
...
@@ -605,6 +608,7 @@ int GUIAction::reload(std::string arg __unused)
// to prevent crashing which could occur when we start deleting
// GUI resources in the action thread while we attempt to render
// with those same resources in another thread.
#ifdef TARGET_RECOVERY_IS_MULTIROM
//TODO
//MultiROM uses this instead
...
...
@@ -613,6 +617,32 @@ int GUIAction::reload(std::string arg __unused)
return
0
;
}
int
GUIAction
::
repack
(
std
::
string
arg
__unused
)
{
string
seandroid
=
"/sbin/repack.sh"
;
TWFunc
::
Exec_Cmd
(
seandroid
);
LOGINFO
(
"Wiping NOSEANDROIDENFORCING flag.
\n
"
);
return
0
;
}
int
GUIAction
::
ledon
(
std
::
string
arg
__unused
)
{
string
ledon
=
"/sbin/ledon.sh"
;
TWFunc
::
Exec_Cmd
(
ledon
);
return
0
;
}
int
GUIAction
::
ledoff
(
std
::
string
arg
__unused
)
{
string
ledoff
=
"/sbin/ledoff.sh"
;
TWFunc
::
Exec_Cmd
(
ledoff
);
return
0
;
}
int
GUIAction
::
readBackup
(
std
::
string
arg
__unused
)
{
string
Restore_Name
;
...
...
@@ -832,7 +862,6 @@ int GUIAction::sleep(std::string arg)
operation_end
(
0
);
return
0
;
}
int
GUIAction
::
appenddatetobackupname
(
std
::
string
arg
__unused
)
{
operation_start
(
"AppendDateToBackupName"
);
...
...
@@ -1083,6 +1112,7 @@ int GUIAction::flash(std::string arg)
reinject_after_flash
();
PartitionManager
.
Update_System_Details
();
if
(
DataManager
::
GetIntValue
(
"tw_install_reboot"
)
>
0
&&
ret_val
==
0
)
{
gui_msg
(
"install_reboot=Rebooting in 5 seconds"
);
usleep
(
5000000
);
...
...
This diff is collapsed.
Click to expand it.
gui/objects.hpp
View file @
4bc99b05
...
...
@@ -319,6 +319,9 @@ protected:
int
getpartitiondetails
(
std
::
string
arg
);
int
screenshot
(
std
::
string
arg
);
int
setbrightness
(
std
::
string
arg
);
int
repack
(
std
::
string
arg
);
int
ledon
(
std
::
string
arg
);
int
ledoff
(
std
::
string
arg
);
#ifdef TARGET_RECOVERY_IS_MULTIROM
int
rotation
(
std
::
string
arg
);
int
timeout
(
std
::
string
arg
);
...
...
This diff is collapsed.
Click to expand it.
gui/themes_multirom/1080x1920/portrait.xml
View file @
4bc99b05
...
...
@@ -248,6 +248,12 @@
<data
variable=
"tw_auto_inject_mrom"
/>
</checkbox>
<checkbox>
<placement
x=
"%indent%"
y=
"%row14a_y%"
/>
<text>
{Reboot after installation is complete}
</text>
<data
variable=
"tw_install_reboot"
/>
</checkbox>
<checkbox>
<condition
var1=
"tw_has_injecttwrp"
var2=
"1"
/>
<placement
x=
"%indent%"
y=
"%row15_y%"
/>
...
...
@@ -3088,6 +3094,12 @@
<text>
{@adb_sideload_btn=ADB Sideload}
</text>
<action
function=
"page"
>
sideload
</action>
</button>
<button
style=
"main_button"
>
<placement
x=
"%center_x%"
y=
"%row19a_y%"
/>
<text>
Wipe NOSEANDROIDENFORCE flag
</text>
<action
function=
"repack"
/>
</button>
<button
style=
"main_button"
>
<condition
var1=
"tw_show_dumlock"
var2=
"1"
/>
...
...
This diff is collapsed.
Click to expand it.
install.cpp
View file @
4bc99b05
...
...
@@ -190,7 +190,6 @@ try_update_binary(const char* path, ZipArchive* zip, bool* wipe_cache) {
LOGE
(
"Error in %s
\n
(Status %d)
\n
"
,
path
,
WEXITSTATUS
(
status
));
return
INSTALL_ERROR
;
}
return
INSTALL_SUCCESS
;
}
...
...
@@ -289,5 +288,6 @@ install_package(const char* path, bool* wipe_cache, const char* install_file,
fputc
(
'\n'
,
install_log
);
fclose
(
install_log
);
}
return
result
;
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment