Commit graph

4 commits

Author SHA1 Message Date
Tao Bao
b656a154ea Move sysMapFile and sysReleaseMap into MemMapping class.
Test: recovery_component_test
Test: recovery_unit_test
Test: Apply an OTA on angler.
Change-Id: I7170f03e4ce1fe06184ca1d7bcce0a695f33ac4d
2017-05-01 21:51:54 -07:00
Tao Bao
14b61e7b96 otautil: Clean up obsolete includes.
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 8cf5c8f60f: "Replace minzip
with libziparchive".

Test: `mmma bootable/recovery`
Change-Id: I349e909ba83d0f6ade5f92856ce3934f29fdca6c
2016-11-08 13:39:12 -08:00
Tao Bao
c3292f3fcb otautil: Clean up SysUtil.cpp.
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
2016-11-07 13:00:38 -08:00
Tianjie Xu
8cf5c8f60f Replace minzip with libziparchive
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
2016-10-17 17:41:51 -07:00
Renamed from minzip/SysUtil.cpp (Browse further)