Commit Graph

984 Commits

Author SHA1 Message Date
Dees Troy bb4c0cbc4b Fix merge conflicts and update for 4.4 kitkat
Make a copy of libmincrypt in TWRP source so we do not have to
ifdef verifier.cpp for various versions of mincrypt.

Remove reboot tool from toolbox (it was removed from 4.4 and did
not compile properly on some devices in older trees)
2013-11-02 20:43:26 +00:00
Dees Troy 3be70a897e Update licenses to all match 2013-10-22 14:25:12 +00:00
Kevin Steck 7b69e9d111 Skip the = or \n before grabbing Zip_File.
Change-Id: I0454f8fc3cbe037fac63ef5861f8f373e4654d49
2013-10-22 14:03:30 +00:00
Dees Troy d932ce1b99 Fix spelling error 2013-10-18 17:12:59 +00:00
Dees Troy 0cd27a85bc Clean up init.rc 2013-10-18 17:10:12 +00:00
bigbiff bigbiff c49d706903 fix getting and setting contexts in selinux
recreate lost+found with selinux contexts

Change-Id: I19e8696d47319dfb641520956c8a27c2a796a0c3
2013-10-17 16:49:49 +00:00
Dees Troy 0241670122 Merge "Ensure root folders get added in split archives" into twrp2.7 2013-10-17 11:45:09 -05:00
Dees Troy c01ed9e9e2 Merge "Add toolbox_recovery rules" into twrp2.7 2013-10-17 11:44:11 -05:00
Dees Troy e6ddddca76 Merge "Add conditions support to GUIImage" into twrp2.7 2013-10-17 11:43:44 -05:00
Dees Troy ed40077534 Ensure root folders get added in split archives
Make sure that we add the root folder itself to get the perms and
SELinux contexts before splitting to a second archive.

Change-Id: Id93a9f9b4767b61bba38eb0cf7306c81a8540a3c
2013-10-17 11:42:05 -05:00
Dees Troy a829d5deb2 Remove trailing spaces on auto generated backup names
Trailing spaces sometimes cause folder creation depending on what
file system is in use (e.g. vfat).
2013-10-17 00:26:34 +00:00
Dees Troy 8d66f8bda9 Add toolbox_recovery rules
Build special limited toolbox with SELinux tools for recovery

Change-Id: Ifc76a6bd0468a72081f15ede2a68adf48af8a0f2
2013-10-16 19:46:29 +00:00
Vojtech Bocek 6041a78f8f Add conditions support to GUIImage
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2013-10-11 14:41:39 +02:00
The Android Automerger 91321f60ae merge in klp-release history after reset to klp-dev 2013-10-03 06:01:22 -07:00
Michael Runge a2a1ce823b Allow child classes to override the overlay location for the
update image.

b/10952479

Change-Id: I59bb834f271f702fb529054dab7926b816fa35cc
2013-10-02 16:31:07 -07:00
Dees Troy 7e176dab1b Merge "check for space after = too" into twrp2.7 2013-10-01 10:34:50 -05:00
Dees Troy 0221bd9c4d Merge "Improvements to Update_Log_File" into twrp2.7 2013-10-01 10:34:15 -05:00
Dees Troy e34c9070a5 Merge "Fix checking for file_contexts in updater" into twrp2.7 2013-10-01 10:24:08 -05:00
Dees Troy d29b3361f0 Fix checking for file_contexts in updater 2013-10-01 15:21:12 +00:00
Dees Troy 9d7fdf5274 Improvements to Update_Log_File
Change-Id: I5596759b0cb39e4448b6be382f9224feed70a5ea
2013-09-19 20:52:45 +00:00
bigbiff bigbiff a6c5f4e633 check for space after = too 2013-09-17 20:01:14 -04:00
Dees Troy fd44bf2c05 Merge "Remove unneeded images" into twrp2.7 2013-09-17 15:09:00 -05:00
Dees Troy a9e49d3d85 Remove unneeded images 2013-09-17 20:06:14 +00:00
Vojtech Bocek a2e7016ee1 Never generate empty backup name
* Backup would then go to /sdcard/TWRP/*serial_num*/
  (without any subfolder) and restore would not be able to find it.

Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2013-09-17 17:06:09 +02:00
Dees Troy bb20778f7e 2.6.3.0 2013-09-12 15:49:25 +00:00
Vojtech Bocek 1239ee8b34 Add 1200x1920 theme
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: I558c988c94f750607f58aa3dd22736447c78a214
2013-09-12 15:40:22 +00:00
Dees Troy 4bf3b0d804 Make SELinux automatic if present 2013-09-12 10:38:15 -05:00
Vojtech Bocek 05534209f1 Add TWFunc::Exec_Cmd() with no 'result' agrument
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: Id8acff1ac9b3c7e4b562c80562a8ff42a1d132b9
2013-09-12 15:36:40 +00:00
Dees Troy f193f88e6d Make fixing su perms automatic
In 4.3+ with SELinux, su perms will be lost on every reboot so
users will get the prompt to fix su perms in TWRP every time. Make
fixing the su perms automatic instead of nagging the user.

Change-Id: Ia8a2652018db5e1f6ffc5fec2a4ac0db3a8f32bb
2013-09-12 09:11:32 -05:00
Dees Troy b21cc64ca8 Pull ROM info from build.prop for backup names
Change-Id: I7847fca22b5d4f0a35da41625b15bd677a1e9768
2013-09-12 09:11:13 -05:00
Dees Troy 893136dc45 Merge "Kang in older minzip for building in CM9 & CM7" into twrp2.7 2013-09-12 09:10:49 -05:00
Dees Troy 237b83b54c Merge "print out md5s to recovery.log" into twrp2.7 2013-09-12 09:10:01 -05:00
The Android Automerger c287321e9c merge in klp-release history after reset to klp-dev 2013-09-12 06:00:47 -07:00
Doug Zongker cc2958fd7f fix secure adb in recovery
Recovery's init.rc was missing a line (added to the main system's
init.rc in change Ic97fd464440ff4a29fc9da7ad15949ac5215ade3) is
required for secure adb to work.

Change-Id: Id79b94d2abb4cbe3cca7cabeb4bc5faf7205e56b
2013-09-11 13:24:32 -07:00
Nick Kralevich d456944f02 Don't apply permission changes to symlink.
Bug: 10183961
Bug: 10186213
Bug: 8985290
Change-Id: I57cb14af59682c5f25f1e091564548bdbf20f74e
2013-09-10 17:13:23 -07:00
Nick Kralevich e461251e2c Don't apply permission changes to symlink.
Bug: 10183961
Bug: 10186213
Bug: 8985290
Change-Id: I57cb14af59682c5f25f1e091564548bdbf20f74e
2013-09-10 15:34:19 -07:00
The Android Automerger c4a3a4bcc8 merge in klp-release history after reset to klp-dev 2013-09-10 14:28:02 -07:00
Dees Troy b7ae098e21 Kang in older minzip for building in CM9 & CM7
CM7 and CM9 do not have libselinux needed in the newer minzip.
2013-09-10 20:47:46 +00:00
Nick Kralevich 5dbdef0e5b updater: introduce and set_metadata and set_metadata_recursive
Introduce two new updater functions:

* set_metadata
* set_metadata_recursive

Long term, these functions are intended to be more flexible replacements
for the following methods:

* set_perm
* set_perm_recursive

Usage:

  set_metadata("filename", "key1", "value1", "key2", "value2", ...)
  set_metadata_recursive("dirname", "key1", "value1", "key2", "value2", ...)

Description:

set_metadata() and set_metadata_recursive() set the attributes on a file/directory
according to the key/value pairs provided. Today, the following keys are
supported:

* uid
* gid
* mode (set_perm_extd only)
* fmode (set_perm_extd_recursive only)
* dmode (set_perm_extd_recursive only)
* selabel
* capabilities

Unknown keys are logged as warnings, but are not fatal errors.

Examples:

* set_metadata("/system/bin/netcfg", "selabel", "u:object_r:system_file:s0");

This sets the SELinux label of /system/bin/netcfg to u:object_r:system_file:s0.
No other changes occur.

* set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "selabel", "u:object_r:system_file:s0", "capabilities", 0x0);

This sets /system/bin/netcfg to uid=0, gid=3003, mode=02750,
selinux label=u:object_r:system_file:s0, and clears the capabilities
associated with the file.

* set_metadata_recursive("/system", "uid", 0, "gid", 0, "fmode", 0644, "dmode", 0755, "selabel", "u:object_r:system_file:s0", "capabilities", 0x0);

All files and directories under /system are set to uid=0, gid=0,
and selinux label=u:object_r:system_file:s0. Directories are set to
mode=0755.  Files are set to mode=0644 and all capabilities are cleared.

Bug: 10183961
Bug: 10186213
Bug: 8985290
Change-Id: Ifdcf186a7ed45265511dc493c4036e1ac5e3d0af
2013-09-10 10:24:24 -07:00
bigbiff bigbiff 6b059548df print out md5s to recovery.log 2013-09-10 10:28:26 -04:00
Dees Troy abaa9ca8f3 Merge "Hack-fix build with different system/core/charger versions" into twrp2.7 2013-09-10 08:46:29 -05:00
Dees Troy bc365b5e44 Merge "another fix to ignore space then = sign" into twrp2.7 2013-09-10 08:45:23 -05:00
Dees Troy c2e9bc74a1 Fix zip folder selection when storage path is similar
If internal is /sdcard and external is /sdcard-ext then the zip
path used to stay on /sdcard-ext when trying to switch to internal
storage. Using Get_Root_Path instead of resizing will ensure that
the path changes properly.
2013-09-10 00:16:31 +00:00
bigbiff bigbiff c03121d2ac another fix to ignore space then = sign 2013-09-09 19:14:35 -04:00
Nick Kralevich 3328e3bc81 Revert "Update OTA installer to understand SELinux filesystem labels"
This reverts commit 627eb30f73.

Bug: 10183961
Bug: 10186213
2013-09-09 10:47:14 -07:00
Vojtech Bocek 65fdcddec6 Hack-fix build with different system/core/charger versions
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2013-09-06 21:32:22 +02:00
Dees_Troy 84f683a322 Merge "Add more args to make_ext4fs command" into twrp2.7 2013-09-06 11:41:05 -05:00
Dees_Troy 5295d581a5 Add more args to make_ext4fs command 2013-09-06 15:51:08 +00:00
Dees_Troy 399f480dc7 Fix libselinx flags in libtar 2013-09-06 15:16:00 +00:00
Dees Troy 8807a1ead6 Merge "libtar: store SELinux file context in tar archives" into twrp2.7 2013-09-05 14:53:36 -05:00