Commit Graph

9577 Commits

Author SHA1 Message Date
Tao Bao 43248cc36c Merge "recovery: Don't show "No /cache partition found" on screen." am: 021304503a
am: 7c77883b06

Change-Id: I1797129fa70266d9fe5eb09dece6b00cf75b6f2a
2017-02-24 20:03:45 +00:00
Tao Bao 7c77883b06 Merge "recovery: Don't show "No /cache partition found" on screen."
am: 021304503a

Change-Id: I5bc7cba2eb474faf60212877cd621d8ab06fe00c
2017-02-24 20:01:14 +00:00
Treehugger Robot 021304503a Merge "recovery: Don't show "No /cache partition found" on screen." 2017-02-24 19:54:19 +00:00
Tao Bao f7f1da3fb5 recovery: Don't show "No /cache partition found" on screen.
People have been confused by the message and thought that's an error.

Test: Boot recovery on sailfish; choose 'View recovery logs'.
Change-Id: I2c540f18d6493c1a129233d10ecbc96823dd3601
2017-02-24 10:16:18 -08:00
Elliott Hughes 1de1c7124e Merge "Add a missing #include for openat(2)." am: 3ac0dd2a56 am: cdfe2895b4
am: a82df97dd8

Change-Id: Ie157634ac0e83d168a980fe1b3c72664179551ce
2017-02-24 17:03:37 +00:00
Elliott Hughes a82df97dd8 Merge "Add a missing #include for openat(2)." am: 3ac0dd2a56
am: cdfe2895b4

Change-Id: I0924ddf2096e076bd6a32b850c25e575f080041d
2017-02-24 17:00:36 +00:00
Elliott Hughes cdfe2895b4 Merge "Add a missing #include for openat(2)."
am: 3ac0dd2a56

Change-Id: I29988a3e7d509587d55c7a821c4ced2e0f32ebe4
2017-02-24 16:59:06 +00:00
Elliott Hughes 3ac0dd2a56 Merge "Add a missing #include for openat(2)." 2017-02-24 16:55:25 +00:00
Matt Mower 653a170935 Tweak MTP startup routine
* As a precaution, (non-permanently) disable MTP if TWRP crashes.
* Remove a duplicate logging of 'Starting MTP'.
* Combine and improve readability of conditions before MTP starts.
* Remove unnecessary Disable_MTP() call if conditions unsatisfied.

Change-Id: I61ac772fc123da5b84c3061fbcf2116531bc4e2f
2017-02-24 03:10:17 +01:00
Matt Mower e07f010963 Fix handling of USB config during MTP switching
The property set of sys.usb.config was not part of the original 'Only
change USB mode to mtp when ready for MTP' commit. Further, it adds an
additional USB off/on toggle to the MTP startup routine, potentially
confusing the host computer. The default init.recovery.usb.rc already
sets the usb functions to 'adb' during 'on fs'.

It is possible that devices could run into issues with MTP startup due
to sys.usb.config not yet being set. This is actually due to a poor
design decision in Enable_MTP(), where sys.usb.config would not be
configured for mtp if sys.usb.config had never been set. It is not
necessary to check for a previous value, just set it.

Fix the USB PID for adb-only mode in Disable_MTP().

Change-Id: I21b5e64c9bdcd3104372a8b4eb8ea50cf4561892
2017-02-23 19:21:33 -06:00
that d1afb52fea twrpDigest: don't crash when zip.md5 file is empty
Change-Id: I14145b32c7993bb0cd236b2982ed00bc2c791282
2017-02-23 23:05:59 +01:00
Captain Throwback 1b3fa22d71 logd: add seclabel so that service runs in 7.1 tree builds
Change-Id: If9bfcf6bdeac91e82e9615b671acbee5acffe0cc
2017-02-23 13:16:02 -06:00
Matt Mower 9b4d8dd8f3 Use LOGI/LOGE for non-EVENT_LOGGING events
Change-Id: Iaebc613a25a727a91205d2f361e9d7719036d88d
2017-02-23 20:14:10 +01:00
Matt Mower c0f84e77d2 Run language_helper.py from inside languages dir
compare_xml.py and language_helper.py make different assumptions about
the directory from which they are called. Assume the script is run from
within the languages directory for both.

Change-Id: I4207919360d82dcd3cfbdebcff38f0e872554744
2017-02-23 20:02:05 +01:00
Matt Mower ff2c6b2d52 Update MTP debugging tags
Change-Id: I8cf8b32d5a98ac2470386cbaf70cfc87f44e94f6
2017-02-23 20:01:07 +01:00
Elliott Hughes 25a29d452e Add a missing #include for openat(2).
Bug: https://code.google.com/p/android/issues/detail?id=64374
Test: builds
Change-Id: I7d7650463197710657820a1adce51f71c1b01415
2017-02-23 10:45:42 -08:00
Matt Mower a8e6d83155 Do not unconditionally remove MTP storage on unmount
* It is not necessary to Remove_MTP_Storage() for a partition if an
  MTP_Storage_ID has not been assigned.
* The hack to force-set tw_mtp_enabled=1 should no longer be necessary
  now that we're checking whether MTP really needs to be disabled for
  a volume before running Disable_MTP().

Change-Id: I1b7233eedd9da7c6be0c67fc60243f3837105173
2017-02-23 19:42:48 +01:00
Matt Mower 84830ce015 Only change USB mode to mtp when ready for MTP
Commit 'Do not toggle USB ID during MTP startup if not needed' changed
the default USB mode to 'mtp,adb'. Depending on the device, this can
result in an unfortunate side effect of crashing an ORS sideload
midway through the process (it's not clear to me whether the kernel or
the connected computer is responsible). Only put USB into mtp mode
when MTP storage is starting-up.

The hack to change the USB mode to adb when a user compiles TWRP
without MTP support is no longer necessary now that 'adb' is the
startup mode.

Change-Id: I8ed13d6ab8e85621533997b8c37ef7ebec0fcf85
2017-02-23 12:30:59 -06:00
D. Andrei Măceș 9ce12ec20d build: [FIXUP] Addendum for BusyBox get/setprop & API 24 vs 25
Change-Id: I9c909bc990210fc3ec2ed3edf0ac106248f613ba
2017-02-23 16:00:44 +01:00
MinSeong Kim 663ad8e9d0 Fix "ordered comparison between pointer and zero".
From Clang 4.x releases, DR583 and DR1512 will be addressed.
This patch, in advance, fixes the error(s).

Test: `mmma bootable/recovery`
Change-Id: I29dc85ae681307c322ab3a698c3f3bbad1c784ee
Signed-off-by: MinSeong Kim <minseong.kim@linaro.org>
2017-02-23 15:27:05 +01:00
SevenMaxs c7a2f934b5 Update Russian localization
Added new strings (Scripts language_helper.py and compare_xml.py were used).

Change-Id: Id6f220d17e748cd10ff8ff8b21c2e40d84be5ec9
2017-02-21 11:12:50 +03:00
nijel8 2dd66f4962 cryptfs: Fix encryption issue due to stack corruption.
Ioctl BLKGETSIZE expects pointer to unsigned long as argument.

On 64bit target using pointer to unsigned int can cause stack
corruption due to type mismatch.

props to https://github.com/aopp/android_system_vold/commit/f8b8787317fc94439b63bc891eeda83f7ae2f4f6

Change-Id: I1d76c65e29479c8f0cd44b6892069b21b8249b95
2017-02-19 21:34:12 +01:00
gitbuildkicker 170db2c1bb merge in oc-release history after reset to master 2017-02-19 00:07:15 -08:00
Ethan Yonker 91758440d3 Add a listxattr tool for listing xattrs
Change-Id: Ib80bab2b605ce77cd8fdc717d8bcfa8085516679
2017-02-16 21:54:51 -06:00
Ethan Yonker 8d039f7bd8 libtar: support backing up and restoring new Android user.* xattr
Support for backing up and restoring user.default, user.inode_cache, and
user.inode_code_cache xattrs introduced in Android 7.x

Change-Id: I6e0aa7fc9cd30ed004ef28ebb58d60a82e518123
2017-02-16 21:50:05 -06:00
Sen Jiang c45c1bf9ed Merge "Use bspatch from external/bsdiff." am: f9962dbfe2 am: 2c467f6e49 am: 6f06890343
am: 05087fb83d

Change-Id: Ifafcedf27aa9394a307fca854c491891191cce04
2017-02-16 21:30:41 +00:00
Sen Jiang 05087fb83d Merge "Use bspatch from external/bsdiff." am: f9962dbfe2 am: 2c467f6e49
am: 6f06890343

Change-Id: I6e49f937f1145dba2c5500f25db5020fca7ceac0
2017-02-16 21:26:41 +00:00
Sen Jiang 6f06890343 Merge "Use bspatch from external/bsdiff." am: f9962dbfe2
am: 2c467f6e49

Change-Id: Id7641e953d6ca749e20ecfb126a39392b6db3dab
2017-02-16 21:23:12 +00:00
Sen Jiang 2c467f6e49 Merge "Use bspatch from external/bsdiff."
am: f9962dbfe2

Change-Id: I21e6de951b22673fe48ff8f7db418e22d233ee58
2017-02-16 21:18:42 +00:00
Sen Jiang f9962dbfe2 Merge "Use bspatch from external/bsdiff." 2017-02-16 21:14:10 +00:00
Matt Mower 9cc33c8391 Partition: Remove unused has_data_media variable
Change-Id: Ic1a3aa2b57db5539ce6f6740a63bfe6d33890d70
2017-02-16 17:09:44 +01:00
Matt Mower 0c00571d49 GUI: Fix typo in warning message
Change-Id: I991ad86a453273139bcafbb9f68898631dfb6b51
2017-02-16 17:07:43 +01:00
Matt Mower d821c96c52 Symlink file_contexts --> file_contexts.bin
The presence of /file_contexts is still important to TWRP:
- files written while in adb shell only pick up contexts if
  /file_contexts is present
- fixContexts looks for /file_contexts
- if !USE_EXT4 (is this possible), then make_ext4fs looks for
  /file_contexts when wiping

In the event than file_contexts.bin also becomes more important in the
future, leave it in place and create a symlink to it.

Change-Id: Ic87852248d42d5ea6bf936df160efa41294b6520
2017-02-16 17:06:48 +01:00
Matt Mower 6244806a62 Fix bldr msg file open mode when offset specified
It was pointed out to me by gmrt that O_APPEND is incorrect, as lseek
before writing would be undone (perhaps we avoided this issue due to
an inability to write beyond the end of a partition) and O_RDWR is not
necessary to lseek. When AOSP switched from fopen to open, they also
removed the full partition wipe (fopen in wb mode) before each write,
so this is no longer an issue. Completely restore the original AOSP
file access mode flags.

Change-Id: I42b4efc5f499360ce5b761d3a2a5d4dac4cdfb65
2017-02-16 05:19:59 +01:00
gitbuildkicker cfdaf0559f merge in oc-release history after reset to master 2017-02-14 00:07:08 -08:00
Tao Bao dec8a91aec Merge "recovery: Clean up browse_directory()." am: 635eb1c83e am: c42d44bbeb am: 19e7776451
am: b1b8e89db8

Change-Id: I5eb70db5411cb8e5a1d469f132d4b974df4fa0a7
2017-02-14 02:08:42 +00:00
Tao Bao b1b8e89db8 Merge "recovery: Clean up browse_directory()." am: 635eb1c83e am: c42d44bbeb
am: 19e7776451

Change-Id: I412a0f3df337c20c89b6168521ac7dd7a8e47ee5
2017-02-14 02:06:42 +00:00
Tao Bao 19e7776451 Merge "recovery: Clean up browse_directory()." am: 635eb1c83e
am: c42d44bbeb

Change-Id: I462259ea96248f253e161065a17b0098add83716
2017-02-14 02:05:12 +00:00
Tao Bao c42d44bbeb Merge "recovery: Clean up browse_directory()."
am: 635eb1c83e

Change-Id: Idf8a4e33a1f7cfd5d5c648aa97e00219828fc58d
2017-02-14 02:03:11 +00:00
Tao Bao 635eb1c83e Merge "recovery: Clean up browse_directory()." 2017-02-14 01:56:24 +00:00
gitbuildkicker 90fae92441 merge in oc-release history after reset to master 2017-02-13 13:20:40 -08:00
Tao Bao 16b509535b Merge "minui: Move graphics_{adf,drm,fbdev} into classes." am: 0d14cc279c am: 6585a3c368 am: b8997adc20
am: 1cb8964aac

Change-Id: I8b1fb8ba115f7313f7382b7669e35184eaea3a79
2017-02-13 18:42:16 +00:00
Tao Bao 1cb8964aac Merge "minui: Move graphics_{adf,drm,fbdev} into classes." am: 0d14cc279c am: 6585a3c368
am: b8997adc20

Change-Id: I32adb7cc1bf316e5986308a8863399e5a504e10f
2017-02-13 18:36:46 +00:00
Tao Bao b8997adc20 Merge "minui: Move graphics_{adf,drm,fbdev} into classes." am: 0d14cc279c
am: 6585a3c368

Change-Id: I0484295d4c202f6854968f99bac0b4b0c6928378
2017-02-13 18:32:15 +00:00
Tao Bao 6585a3c368 Merge "minui: Move graphics_{adf,drm,fbdev} into classes."
am: 0d14cc279c

Change-Id: I75c426732188a868f0acb160284a45a19d0b9b1e
2017-02-13 18:29:46 +00:00
gitbuildkicker d4abaacaa4 merge in oc-release history after reset to master 2017-02-13 10:28:29 -08:00
Tao Bao 0d14cc279c Merge "minui: Move graphics_{adf,drm,fbdev} into classes." 2017-02-13 18:25:06 +00:00
z31s1g d1d3cb6ef0 DE language update
Change-Id: I20b8e99bf011e8f3894f20fef1a5d46cca4cd3b6
2017-02-12 16:51:50 +01:00
gitbuildkicker 1f9da44bb0 merge in oc-release history after reset to master 2017-02-12 00:07:02 -08:00
Tao Bao c4a18efa84 recovery: Clean up browse_directory().
Get rid of the malloc/realloc/free'd menus.

browse_directory() will only be called on devices with SD card. Tested
the CL by temporarily setting SDCARD_ROOT to a different location.

Test: See above.
Change-Id: I935e1bf4bad0273e3dff87fa2536924f1219adb5
2017-02-10 21:21:52 -08:00