summaryrefslogtreecommitdiffstats
path: root/otautil (follow)
Commit message (Collapse)AuthorAgeFilesLines
* otautil: Move RangeSet implementation into rangeset.cpp.Tao Bao2017-10-163-151/+216
| | | | | | | | | | | Since it has grown much larger, users of the header shouldn't compile and carry their full copies. Also add missing header includes in imgdiff.cpp and imgdiff_test.cpp. Test: mmma bootable/recovery Test: recovery_unit_test; recovery_component_test; recovery_host_test Change-Id: I88ca54171765e5606ab0d61580fbc1ada578fd7d
* otautil: #include <errno.h> for TEMP_FAILURE_RETRY.Tao Bao2017-10-111-0/+1
| | | | | Test: mmma bootable/recovery Change-Id: I5959303528c6f704f10ce153f6fcb2054ce35b1e
* Move rangeset.h and print_sha1.h into otautil.Tao Bao2017-10-112-0/+325
| | | | | | | | | Also drop the "bootable/recovery" path in LOCAL_C_INCLUDES from applypatch modules. Test: lunch aosp_{angler,bullhead,fugu,dragon,sailfish}-userdebug; mmma bootable/recovery Change-Id: Idd602a796894f971ee4f8fa3eafe36c42d9de986
* otautil: Fix mac build.Tao Bao2017-10-102-3/+4
| | | | | | | | | bootable/recovery/otautil/SysUtil.cpp:103:19: error: use of undeclared identifier 'mmap64'; did you mean 'mmap'? void* reserve = mmap64(nullptr, blocks * blksize, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0); ^~~~~~ Test: mmma bootable/recovery Change-Id: I22d7dc4d994069201e5a633cec21421e2c4182fa
* Revert "Revert "Move error_code.h into otautil.""Tao Bao2017-10-092-0/+80
| | | | | | | | | | | | | | | | This reverts commit 26436d6d6010d5323349af7e119ff8f34f85c40c to re-land "Move error_code.h into otautil.". This way it stops requiring relative path ".." in LOCAL_C_INCLUDES (uncrypt and edify). Soong doesn't accept non-local ".." in "local_include_dirs". This CL needs to land with device-specific module changes (e.g. adding the dependency on libotautil). Test: lunch aosp_{angler,bullhead,dragon,fugu,sailfish}-userdebug; mmma bootable/recovery Change-Id: If193241801af2dae73eccd31ce57cd2b81c9fd96
* Revert "Move error_code.h into otautil."Tao Bao2017-10-052-80/+0
| | | | | | | | This reverts commit 623fe7e701d5d0fb17082d1ced14498af1b44e5b. Reason for revert: Need to address device-specific modules. Change-Id: Ib7a4191e7f193dfff49b02d3de76dda856800251
* Move error_code.h into otautil.Tao Bao2017-10-042-0/+80
| | | | | | | | | This way it stops requiring relative path ".." in LOCAL_C_INCLUDES (uncrypt and edify). Soong doesn't accept non-local ".." in "local_include_dirs". Test: mmma bootable/recovery Change-Id: Ia4649789cef2aaeb2785483660e9ea5a8b389c62
* otautil: Export headers.Tao Bao2017-10-037-4/+8
| | | | | Test: mmma bootable/recovery Change-Id: Ic01b68e2a394d578fc9fc09da2dabe9061b98122
* otautil: Clean up dirCreateHierarchy().Tao Bao2017-07-272-143/+95
| | | | | | | | | | | | - Changed to std::string based implementation (mostly moved from the former make_parents() in updater/install.cpp); - Removed the timestamp parameter, which is only neeed by file-based OTA; - Changed the type of mode from int to mode_t; - Renamed dirCreateHierarchy() to mkdir_recursively(). Test: recovery_unit_test passes. Test: No external user of dirCreateHierarchy() in code search. Change-Id: I71f8c4b29bab625513bbc3af6d0d1ecdc3a2719a
* otautil: Delete dirUnlinkHierarchy().Tao Bao2017-07-252-69/+0
| | | | | | | | | This function has become obsolete since we've removed file-based OTA support (it was needed by 'delete_recursive' edify function earlier). Test: mmma -j bootable/recovery Test: Code search shows no active user of the function. Change-Id: If6faaa759d4c849b79acba4e6adb82baadc89f7a
* kill package_extract_dirTianjie Xu2017-05-243-178/+0
| | | | | | | It's only used by file-based OTA which has been deprecated for O. Test: mma Change-Id: I439c93155ca94554d827142c99aa6c0845cc7561
* otautil: Android.mk -> Android.bpSteven Moreland2017-05-102-33/+34
| | | | | Test: flash and boot recovery on internal angler Change-Id: Id8845b4b422d0078b251333eb6d30ce14771ef10
* Update the comment for obsolete symlink handling .Tianjie Xu2017-05-041-1/+0
| | | | | | | | | | | | | | Symlink is a filebased OTA feature, and the corresponding updater function has been removed in https://android-review.googlesource.com/#/c/350357/. Also the only place where we call "package_extract_dir()" is to unpack some bootloader dir in vendor's code. We plan to remove it also in a separate bug. Bug: 31917448 Test: mma Change-Id: I3986d60958e64e0d5d8fa5f5bd508c579fb7fa2c
* Move sysMapFile and sysReleaseMap into MemMapping class.Tao Bao2017-05-022-94/+82
| | | | | | | Test: recovery_component_test Test: recovery_unit_test Test: Apply an OTA on angler. Change-Id: I7170f03e4ce1fe06184ca1d7bcce0a695f33ac4d
* Log temperature during OTA updateTianjie Xu2017-03-283-4/+112
| | | | | | | | | | | | Log the maximum temperature as well as the start/end temperature of an update to last_install. Check the temperature at the end of each block_image_update(verify). To get the maximum temp, we iterate through /sys/class/thermal/thermal_zone*/temp and find the maximum value present. Bug: 32518487 Test: temperature logs in last_install Change-Id: Iaf22a9fbc5b18611bbc5320ffea995417872e514
* otautil: Clean up obsolete includes.Tao Bao2016-11-082-12/+1
| | | | | | | | | | | | | | | | | | | | | | external/zlib and external/safe-iop/include were used by Zip.c, which became obsolete after [1]. Removing - <assert.h>: we no longer call assert(3); - <limits.h>: we no longer use PATH_MAX; - <stdio.h>: we don't need FILE anymore; - <stdlib.h>: no more malloc(3)/calloc(3); - <unistd.h>: was once needed for lseek(2); - <string.h>: no more memset(3). Adding - <stdint.h> for SIZE_MAX. [1] commit 8cf5c8f60f51049278b08ae4cbc31df397b651fd: "Replace minzip with libziparchive". Test: `mmma bootable/recovery` Change-Id: I349e909ba83d0f6ade5f92856ce3934f29fdca6c
* otautil: Clean up SysUtil.cpp.Tao Bao2016-11-072-189/+197
| | | | | | | | | | Add unit testcases for sysMapFile(). Test: recovery_unit_test passes. Test: Build and use the new recovery image to sideload a package. Test: Build and use the new recovery image to install an update. Change-Id: I77d8f1ea151ab513865d992c256ba93a1fcb51a4
* Replace minzip with libziparchiveTianjie Xu2016-10-187-0/+749
Clean up the duplicated codes that handle the zip files in bootable/recovery; and rename the library of the remaining utility functions to libotautil. Test: Update package installed successfully on angler. Bug: 19472796 Change-Id: Iea8962fcf3004473cb0322b6bb3a9ea3ca7f679e