Commit Graph

1246 Commits

Author SHA1 Message Date
Elliott Hughes 7bad7c4646 Check all lseek calls succeed.
Also add missing TEMP_FAILURE_RETRYs on read, write, and lseek.

Bug: http://b/20625546
Change-Id: I03b198e11c1921b35518ee2dd005a7cfcf4fd94b
2015-04-29 17:46:43 -07:00
Elliott Hughes 8c389e9c76 Merge "Stop using adb_strtok, and check argument validity." 2015-04-28 17:52:17 +00:00
Elliott Hughes ba45ddf37c Stop using adb_strtok, and check argument validity.
Change-Id: I323ffda71b82cc939aed446f9c9fb86ca78df153
2015-04-28 09:40:19 -07:00
Elliott Hughes 6725ebc7b4 Merge "Revert "Revert "init re-execs to set its security context now.""" 2015-04-24 20:29:34 +00:00
Elliott Hughes 6f76dd58f4 Revert "Revert "init re-execs to set its security context now.""
This reverts commit c819dbe95b.

Bug: http://b/19702273
Change-Id: I5c75b148a12e644dd247a4df4f67dc9b4b9ff8cf
2015-04-24 12:42:46 -07:00
Nick Kralevich c690332c5e Merge "Revert "init re-execs to set its security context now."" 2015-04-24 16:59:11 +00:00
Nick Kralevich c819dbe95b Revert "init re-execs to set its security context now."
shamu isn't booting now

This reverts commit c57453d537.

Change-Id: I8efbf6260f5fcf983e5056fac6d03916415b944e
2015-04-24 16:58:33 +00:00
Elliott Hughes 38a82cace5 Merge "init re-execs to set its security context now." 2015-04-24 03:27:53 +00:00
Elliott Hughes c57453d537 init re-execs to set its security context now.
Change-Id: I0a014f8dddfe775159903b5d6fa632733fef692c
2015-04-23 20:26:56 -07:00
Sami Tolvanen 0de2351e6a Merge "Don't remove existing explicitly stashed blocks" 2015-04-17 16:54:34 +00:00
Sami Tolvanen 43b748f254 Don't remove existing explicitly stashed blocks
When automatically stashing overlapping blocks, should the stash
file already exist due to an explicit stash command, it's not safe
to remove the stash file after the command has completed.

Note that it is safe to assume that the stash file will remain in
place during the execution of the next command, so we don't have
take other measures to preserve overlapping blocks.

The stash file itself will be removed by a free command when it's
no longer needed.

Bug: 20297065
Change-Id: I8ff1a798b94086adff183c5aac03260eb947ae2c
2015-04-17 13:07:08 +01:00
Tao Bao 4381767aa6 Merge "imgdiff: Avoid infinite loop if inflate fails" 2015-04-16 20:55:38 +00:00
Elliott Hughes 7176a61718 Merge "Don't use typedefs that hide *s." 2015-04-15 18:26:37 +00:00
Elliott Hughes 0a5cb0c7cd Don't use typedefs that hide *s.
gr_surface was causing confusion for no good reason.

Change-Id: If7120187f9a00dd16297877fc49352185a4d4ea6
2015-04-15 10:58:56 -07:00
Elliott Hughes 6e435abfeb Merge "Move the menu header out of the menu." 2015-04-15 17:05:35 +00:00
Johan Redestig c68bd34dc8 imgdiff: Avoid infinite loop if inflate fails
Break out of the loop if inflate returns an error
and print some details.

Change-Id: Ie157cf943291b1a26f4523b17691dfcefbc881dc
2015-04-15 13:09:54 +02:00
Elliott Hughes 8fd86d77f1 Move the menu header out of the menu.
This makes it easier for us to deal with arbitrary information at the
top, and means that headers added by specific commands don't overwrite
the default ones.

Add the fingerprint back, but broken up so it fits even on sprout's
display.

Change-Id: Id71da79ab1aa455a611d72756a3100a97ceb4c1c
2015-04-13 15:46:15 -07:00
Elliott Hughes 17b032e159 Merge "Add missing \n after "Mounting /system." message." 2015-04-13 20:40:52 +00:00
Elliott Hughes e46066f269 Add missing \n after "Mounting /system." message.
Change-Id: I280a478526f033f5c0041d7e8a818fce6177d732
2015-04-13 13:29:38 -07:00
Elliott Hughes eab12de70e Merge "Remove unnecessary globals." 2015-04-13 20:18:57 +00:00
Elliott Hughes b68c4fc426 Merge "Treat KEY_ENTER the same as KEY_POWER in the pager." 2015-04-13 20:17:12 +00:00
Elliott Hughes 985022a623 Remove unnecessary globals.
Change-Id: I76a042432aede08ceaf250319cf5eeb25d601150
2015-04-13 13:04:32 -07:00
Elliott Hughes 300ed089b3 Treat KEY_ENTER the same as KEY_POWER in the pager.
Our long-press UI sends KEY_ENTER for long presses, which the long-press
UI treats as equivalent to KEY_POWER in the regular UI. So anywhere we accept
KEY_POWER we should accept KEY_ENTER too.

Change-Id: I99d376c961887043cf02037c26d000c8ba4d66f9
2015-04-13 10:47:59 -07:00
Elliott Hughes 0e3781ef9a Merge "Rewritten file pager." 2015-04-11 20:29:47 +00:00
Tao Bao 558ba1bafa Merge "Revert "Append kernel logs to last_log file"" 2015-04-11 02:21:27 +00:00
Elliott Hughes 95fc63e87b Rewritten file pager.
Most importantly, this one no longer skips lines because of wrapping.

Change-Id: Ic1c1944682ab8cbf3d542418ee86d29819173fc9
2015-04-10 19:12:01 -07:00
Tao Bao f012432f96 Revert "Append kernel logs to last_log file"
This reverts commit 2ec803f435.

Change-Id: I419025a772ef99db4c0a78bfa7ef66767f3fa062
2015-04-11 02:04:11 +00:00
Tao Bao 464c3e718f Merge "Append kernel logs to last_log file" 2015-04-11 01:12:24 +00:00
Tao Bao 2ec803f435 Append kernel logs to last_log file
Currently we are keeping one copy of the kernel log (LAST_KMSG_FILE).
This CL changes to append it to the recovery log.

Bug: 18092237
Change-Id: I06ad5629016846927153064f1663753a90296f79
2015-04-10 17:23:34 -07:00
Tao Bao 6d1bd3d3d4 Merge "Update the comments for package installer commands" 2015-04-10 23:53:54 +00:00
Tao Bao b07e1f3a3a Update the comments for package installer commands
These commands are for the communication between the installer and the
update binary (edify interpreter). Update the comments in sync with the
codes.

Change-Id: I7390f022b1447049a974b0b45697ef1d2e71d4e0
2015-04-10 16:18:32 -07:00
Elliott Hughes f19007a525 Merge "Auto-detect whether to use the long-press UI." 2015-04-10 22:28:57 +00:00
Elliott Hughes 4af215b2c3 Auto-detect whether to use the long-press UI.
Change-Id: Ie77a5584e301467c6a5e164d2c62d6f036b2c0c0
2015-04-10 15:14:35 -07:00
Elliott Hughes 51697d2781 Merge "Switch minadb over to C++." 2015-04-10 21:28:46 +00:00
Elliott Hughes 20531ef605 Switch minadb over to C++.
Change-Id: I5afaf70caa590525627c676c88b445d3162de33e
2015-04-10 13:59:19 -07:00
Elliott Hughes 23017c5d5c Merge "Switch minui over to C++." 2015-04-10 20:57:37 +00:00
Elliott Hughes 07cfb8fe79 Switch minui over to C++.
Change-Id: I59e08a304ae514a3fdb6fab58721f11670bc1b01
2015-04-10 13:42:55 -07:00
Elliott Hughes 5d1630a926 Merge "Fix ScreenRecoveryUI to handle devices without power/up/down." 2015-04-10 20:26:53 +00:00
Elliott Hughes 642aaa7a3e Fix ScreenRecoveryUI to handle devices without power/up/down.
Currently fugu has a custom subclass to handle this. The default code
supports devices with trackballs but not all shipping Nexus devices?
That's just silly.

Change-Id: Id2779c91284899a26b4bb1af41e7033aa889df10
2015-04-10 12:47:46 -07:00
Elliott Hughes 6b0dd1d7e1 Merge "Move "Mount /system" to the main menu." 2015-04-10 17:20:04 +00:00
Elliott Hughes ec28340cf3 Move "Mount /system" to the main menu.
Everyone's adding secret key combinations for this anyway, and it's
very useful when debugging.

Change-Id: Iad549452b872a7af963dd649f283ebcd3ea24234
2015-04-10 10:01:53 -07:00
Elliott Hughes 18eaa0cfe7 Merge "Add ev_iterate_available_keys to minui." 2015-04-10 16:58:48 +00:00
Elliott Hughes 0713819fd2 Add ev_iterate_available_keys to minui.
This lets us recognize whether we have up/down/power, say, and tailor
the UI accordingly.

Change-Id: If94e454f14243b59d2f473ac9a436bd60591da01
2015-04-10 09:40:53 -07:00
Elliott Hughes f471861e83 Merge "Move the recovery image version out of the menu header." 2015-04-10 16:25:32 +00:00
Elliott Hughes bb78d6286d Move the recovery image version out of the menu header.
Rather than add code to wrap menu items, let's just put output the
recovery version to the log. It'll be visible at the bottom of the
screen and automatically wrap.

Change-Id: I158fe2d85bc56b195e00619fba455321743923bd
2015-04-09 20:51:08 -07:00
Elliott Hughes e001074f22 Merge "Move default implementations into Device." 2015-04-09 22:53:36 +00:00
Elliott Hughes 06522ef517 Merge "Remove some commented-out code." 2015-04-09 21:02:22 +00:00
Elliott Hughes 9e7ae8a626 Move default implementations into Device.
The current abstract class was a nice idea but has led to a lot of
copy & paste in practice. Right now, no one we know of has any extra
menu items, so let's make the default menu available to everyone.

(If we assume that someone somewhere really does need custom
device-specific menu options, a better API would let them add to
our menu rather than replacing it.)

Change-Id: I59f6a92f3ecd830c2ce78ce9da19eaaf472c5dfa
2015-04-09 13:40:31 -07:00
Elliott Hughes 42c12306c9 Remove some commented-out code.
Change-Id: Ifb466ee2a89da88832c04086fa43da2b8409c232
2015-04-09 11:50:56 -07:00
Elliott Hughes 52222a5841 Merge "Move file paging into ScreenRecoveryUI." 2015-04-09 18:24:45 +00:00