Commit Graph

9577 Commits

Author SHA1 Message Date
Tao Bao 0a7c16948b am ca7bf531: Merge "Rotate logs only when there are actual operations"
* commit 'ca7bf53189c70ef0f687d54d772e5eaadc0b1c7c':
  Rotate logs only when there are actual operations
2015-04-08 16:45:17 +00:00
Tao Bao ca7bf53189 Merge "Rotate logs only when there are actual operations" 2015-04-08 16:35:48 +00:00
Tao Bao 682c34bbc3 Rotate logs only when there are actual operations
Currently it rotates the log files every time it boots into the recovery
mode. We lose useful logs after ten times. This CL changes the rotation
condition so that it will rotate only if it performs some actual
operations that modify the flash (installs, wipes, sideloads and etc).

Bug: 19695622
Change-Id: Ie708ad955ef31aa500b6590c65faa72391705940
2015-04-07 22:02:27 -07:00
that 2252d24c96 twrpTar: fix segfault after encrypted backups
also use unsigned int for core_count instead of unsigned long long.
I'll change it back when 4-billion-core devices are common.

PS2
- cast return value via intptr_t (may be important for 64 bit platforms)
- output errors from TWFunc::Wait_For_Child to console

Change-Id: I04158daa0b64e44d68e179d626a83d81cf5d49f7
2015-04-03 22:33:04 +02:00
Andres Morales c94fa0b01b DO NOT MERGE Revert "Erase PST partition if its marked to be erased."
This now gets done at the framework level. Doing it here breaks the signature on the partition.

This reverts commit ee19387905.

Bug: 19967123
Change-Id: I447b926b733ca145f11a916d9569ce39889db627
2015-04-01 22:43:35 +00:00
Tao Bao 2702e011aa am 575e3739: am 6896f9d4: Merge "always use volume mount option when mounting a partition"
* commit '575e37394ec9dc2ff0b098c7a6fe8e3f95c4808f':
  always use volume mount option when mounting a partition
2015-04-01 02:32:26 +00:00
Tao Bao a011896e5e am 8cd389c8: am ccc82eca: Merge "Refactor the codes to call wipe_data/wipe_cache functions"
* commit '8cd389c80568ff46c18c7f7a59396562a6cf7f59':
  Refactor the codes to call wipe_data/wipe_cache functions
2015-04-01 02:32:25 +00:00
Tao Bao 575e37394e am 6896f9d4: Merge "always use volume mount option when mounting a partition"
* commit '6896f9d47db1f959a907d2e67e55860af23e65f8':
  always use volume mount option when mounting a partition
2015-04-01 01:27:37 +00:00
Tao Bao 8cd389c805 am ccc82eca: Merge "Refactor the codes to call wipe_data/wipe_cache functions"
* commit 'ccc82eca9a9b63f43c69472c0841954f19f7a7f0':
  Refactor the codes to call wipe_data/wipe_cache functions
2015-04-01 01:27:36 +00:00
Tao Bao 6896f9d47d Merge "always use volume mount option when mounting a partition" 2015-03-31 23:56:02 +00:00
Tao Bao ccc82eca9a Merge "Refactor the codes to call wipe_data/wipe_cache functions" 2015-03-31 23:39:44 +00:00
Tao Bao e39a9bc722 Refactor the codes to call wipe_data/wipe_cache functions
It also changes the return type of wipe_data/wipe_cache to bool, so the
caller can get the status accordingly.

Change-Id: I3022dcdadd6504dac757a52c2932d1176ffd1918
2015-03-31 12:45:12 -07:00
Tao Bao 938e36c8b2 am 9e1bba1f: am 9295980a: Merge "Revert "Erase PST partition if its marked to be erased.""
* commit '9e1bba1f5f53f366bfec995a89e362c3b897cb37':
  Revert "Erase PST partition if its marked to be erased."
2015-03-31 17:47:29 +00:00
Tao Bao 9e1bba1f5f am 9295980a: Merge "Revert "Erase PST partition if its marked to be erased.""
* commit '9295980ac1554ff7c30531298aadec0750b027e0':
  Revert "Erase PST partition if its marked to be erased."
2015-03-31 17:29:39 +00:00
Tao Bao 9295980ac1 Merge "Revert "Erase PST partition if its marked to be erased."" 2015-03-31 17:25:21 +00:00
Andres Morales c277762de1 Revert "Erase PST partition if its marked to be erased."
This now gets done at the framework level.
Doing it here breaks the signature on the partition.

This reverts commit ee19387905.

Bug: 19967123
Change-Id: I2a977cb0f0ba94defa1bf9091219398ddc1d3528
(cherry picked from commit 037444642b)
2015-03-31 09:48:50 -07:00
Tao Bao 17b2afc1f3 resolved conflicts for merge of 5472176c to master
Change-Id: Ib2395d806bb8c029f7743c36cb7849e5589fad7b
2015-03-30 18:59:50 -07:00
Tao Bao 5472176c86 am 20e82d4f: Merge "Add support to enter sideload mode directly"
* commit '20e82d4fb6b4ba8520bd46db2982495f0b627ed1':
  Add support to enter sideload mode directly
2015-03-31 01:07:09 +00:00
Tao Bao 20e82d4fb6 Merge "Add support to enter sideload mode directly" 2015-03-31 01:00:47 +00:00
Tao Bao c679f93da3 Add support to enter sideload mode directly
When the command file contains "--sideload" (as a result of 'adb reboot
sideload'), it goes into sideload mode directly. Text display will be
turned on by default. It waits for user interaction upon finishing.

When the command file contains "--sideload_auto_reboot", it enters
sideload mode silently. And it will reboot after the installation
regardless of its result, which is designed for automated testing purpose.

Change-Id: Ifdf173351221c7bbf635cfd32463b48e1fff5740
2015-03-30 14:13:18 -07:00
Andres Morales 037444642b Revert "Erase PST partition if its marked to be erased."
This now gets done at the framework level.
Doing it here breaks the signature on the partition.

This reverts commit ee19387905.

Bug: 19967123
Change-Id: I447b926b733ca145f11a916d9569ce39889db627
2015-03-30 20:58:35 +00:00
that 9eadc51fd5 bootloader: fix crash with empty lines in /cache/recovery/command
original fix from commit 93ffa7579c
copied to our code.

Also fixed a whitespace issue in the same code block.

Change-Id: I6396803659c6880cde4f2b2ef08efab5721c215d
2015-03-27 00:06:51 +01:00
Elliott Hughes 65ae9e1ea6 am dac24865: Merge "Factor out the "yes/no" menu and use it for "Wipe cache" too."
* commit 'dac2486514ef7b794610e929fd5615d98c9c1932':
  Factor out the "yes/no" menu and use it for "Wipe cache" too.
2015-03-26 03:47:03 +00:00
Tao Bao dfe34afed6 am 43b80810: Merge "Factor out option variables from int to bool types"
* commit '43b80810284bd0eb43a4488044f902c910c9f3b2':
  Factor out option variables from int to bool types
2015-03-26 03:47:02 +00:00
Elliott Hughes dac2486514 Merge "Factor out the "yes/no" menu and use it for "Wipe cache" too." 2015-03-25 23:56:49 +00:00
Elliott Hughes 30694c9e2f Factor out the "yes/no" menu and use it for "Wipe cache" too.
It's surprising that only one of the wipe options asks for confirmation.
This change makes it easier to add confirmation to any action.

I've also removed the version information from all but the main menu,
because I find I'm not really reading the red text because there's
so much of it all the time.

(Given that fingerprints are long and menu items aren't wrapped, we
might want to go with an actual "About" menu item instead.)

Change-Id: I7d809fdd53f9af32efc78bee618f98a69883fffe
2015-03-25 16:49:01 -07:00
Tao Bao 43b8081028 Merge "Factor out option variables from int to bool types" 2015-03-25 23:40:58 +00:00
Tao Bao 145d861460 Factor out option variables from int to bool types
Change-Id: Ia897aa43e44d115bde6de91789b35723826ace22
2015-03-25 15:56:15 -07:00
Ethan Yonker 0e9dec8758 2.8.6.0
Change-Id: Ibab69893bee968cfac8e25a4f166acf7cc8b4fc9
2015-03-24 21:56:13 -05:00
Ethan Yonker bc2bc6bb67 Fix reboot for some devices
Change-Id: I06caac2e80bd7eb311778796f974846e9ce844fa
2015-03-25 03:54:12 +01:00
that 202e51b1c2 gui: add DST rules to time zones for USA and Europe
This should fix daylight saving time display for most users.
For fully correct time zones we need the tzdata database.

Change-Id: I7b7693ab0abaf20be217bd06d525f03fb89b7217
2015-03-25 03:45:05 +01:00
Elliott Hughes aff79c89e3 am e31f9565: Merge "Remove support for Cupcake kernels."
* commit 'e31f956597f758154a5f6ca7a5793230c8eff936':
  Remove support for Cupcake kernels.
2015-03-24 23:40:26 +00:00
Elliott Hughes e31f956597 Merge "Remove support for Cupcake kernels." 2015-03-24 23:31:07 +00:00
Elliott Hughes b3247c2922 am 9460bb2c: Merge "Fix recovery image text rendering."
* commit '9460bb2c3df9e985c14d2dd76b03aefb3333b251':
  Fix recovery image text rendering.
2015-03-24 22:58:46 +00:00
Elliott Hughes 59156bdeda Remove support for Cupcake kernels.
Change-Id: I7376b9d3c1e11d19e164072d6e9d09c1183114a0
2015-03-24 15:58:15 -07:00
Elliott Hughes 9460bb2c3d Merge "Fix recovery image text rendering." 2015-03-24 22:54:37 +00:00
Elliott Hughes 01a4d08010 Fix recovery image text rendering.
Previously most devices would lose the character before a line wrap.
The log's text rendering was starting at offset 4 but none of the
arithmetic was taking this into account. It just happened to work
on the Nexus 9's 1536-pixel wide display (1536/18=85.3) but not on
a device such as the Nexus 5 (1080/18=60).

The only active part of this change is the change from 4 to 0 in the
gr_text call. The rest is just a few bits of trivial cleanup while I
was working out what was going on.

Change-Id: I9279ae323c77bc8b6ea87dc0fe009aaaec6bfa0e
2015-03-24 15:21:48 -07:00
Elliott Hughes fe5294ad74 am 47733eaf: Merge "Fix wipe command when using sideload in recovery"
* commit '47733eafdc37203d59a8a0a17ccfb936d2920e31':
  Fix wipe command when using sideload in recovery
2015-03-24 22:02:31 +00:00
Elliott Hughes 47733eafdc Merge "Fix wipe command when using sideload in recovery" 2015-03-24 21:43:42 +00:00
Christian Poetzsch 4ec58a4ee5 Fix wipe command when using sideload in recovery
Add support for the wipe command when using sideload within the
recovery. All the support for this command is in place, only the
execution of the actual wipe command itself was missing.

Change-Id: Ia9cdfc912bfb9f558fa89b9f0ed54e843ede41f2
Signed-off-by: Christian Poetzsch <christian.potzsch@imgtec.com>
2015-03-24 11:26:42 -07:00
Gaelle Nassiet e853e96b40 always use volume mount option when mounting a partition
From ROS, if enable adb using the vol.up and vol.down buttons, the
/system partition is mounted by the function ensure_path_mounted() but
with hardcoded mount options.  As a consequence, the blocks are
modified and the reboot in MOS is blocked by the dm_verity feature
that detects a corruption.

This patch forces the function ensure_path_mounted() to use the mount
options from the volume structure, that were previously read from the
fstab.

Change-Id: I748d32c14cb821f4aae5bcc430089dab45375515
Signed-off-by: Gaelle Nassiet <gaellex.nassiet@intel.com>
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
2015-03-24 11:35:04 +01:00
Elliott Hughes cd3d359205 am 733deb26: Merge "Make the recovery menus wrap."
* commit '733deb267db3488be408cbe020769108ee6584b0':
  Make the recovery menus wrap.
2015-03-23 23:32:41 +00:00
Elliott Hughes 733deb267d Merge "Make the recovery menus wrap." 2015-03-23 23:26:15 +00:00
Elliott Hughes 30ad046192 am 31e47876: Merge "Always use strerror to report errno in recovery."
* commit '31e4787634a59d32ff80ccd684bc439cecc4d8c8':
  Always use strerror to report errno in recovery.
2015-03-23 22:00:50 +00:00
Elliott Hughes 31e4787634 Merge "Always use strerror to report errno in recovery." 2015-03-23 21:53:13 +00:00
Elliott Hughes fc06f87ecc Make the recovery menus wrap.
The real problem is that the recovery UI is sluggish. But being able
to wrap off the top to the bottom halves the maximum distance you'll
have to go.

Change-Id: Ifebe5b818f9c9a1c4187d4ac609422da1f38537f
2015-03-23 13:45:31 -07:00
Elliott Hughes 1fdd452f47 Always use strerror to report errno in recovery.
Change-Id: I7009959043150fabf5853a43ee2448c7fbea176e
2015-03-23 13:33:57 -07:00
Elliott Hughes 3dce9e761f am e944944f: Merge "Add "Apply update from sdcard" to default recovery image."
* commit 'e944944fa58f66dad5483b6ee1ea9a2c0f9bedd2':
  Add "Apply update from sdcard" to default recovery image.
2015-03-23 15:07:59 +00:00
Elliott Hughes e944944fa5 Merge "Add "Apply update from sdcard" to default recovery image." 2015-03-23 15:03:24 +00:00
Elliott Hughes c51ac89f0e Add "Apply update from sdcard" to default recovery image.
At the moment, this is the only difference in the sprout recovery
image. That's silly. Let's just improve the error handling slightly
and always have this option present.

Also make the obscure "<3e>" less unclear.

Also use "power button" as the default text rather than "enter button",
because it's been years since anyone had one of those. (Longer term we
should let subclassers tell us the keycode and we translate it to the
correct string.)

Also move the two "Reboot" options together, put "Power off" at the
bottom (and use that terminology, like the real UI, rather than
"Power down"), and use capitals throughout.

Finally, add a README.md with some useful instructions.

Change-Id: I94fb19f73d79c54fed2dda30cefb884426641b5c
2015-03-22 18:16:31 -07:00