From 69bcdd23b94dab9e0ef67bd480e7f875b06dc71d Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Fri, 16 Jul 2021 17:04:23 +0300 Subject: adbsign: support compressed adb files --- src/app_adbsign.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/app_adbsign.c') diff --git a/src/app_adbsign.c b/src/app_adbsign.c index 2992d76..23bcc8b 100644 --- a/src/app_adbsign.c +++ b/src/app_adbsign.c @@ -66,13 +66,14 @@ static int adbsign_main(void *pctx, struct apk_ctx *ac, struct apk_string_array { struct apk_out *out = &ac->out; struct sign_ctx *ctx = pctx; + adb_comp_t comp; char **arg; int r; ctx->ac = ac; foreach_array_item(arg, args) { - ctx->xfrm.is = apk_istream_from_file(AT_FDCWD, *arg); - ctx->xfrm.os = apk_ostream_to_file(AT_FDCWD, *arg, 0644); + ctx->xfrm.is = adb_decompress(apk_istream_from_file(AT_FDCWD, *arg), &comp); + ctx->xfrm.os = adb_compress(apk_ostream_to_file(AT_FDCWD, *arg, 0644), comp); adb_c_xfrm(&ctx->xfrm, update_signatures); apk_istream_close(ctx->xfrm.is); r = apk_ostream_close(ctx->xfrm.os); -- cgit v1.2.3-70-g09d2