summaryrefslogtreecommitdiff
path: root/src/app_adbsign.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2021-07-16 17:04:23 +0300
committerTimo Teräs <timo.teras@iki.fi>2021-07-22 15:30:08 +0300
commit69bcdd23b94dab9e0ef67bd480e7f875b06dc71d (patch)
tree54c88f2de0967ad8503440ce668d2156a649d5f1 /src/app_adbsign.c
parent7af34db6cfed5792b8acd4a4fd4da56de8381673 (diff)
downloadapk-tools-69bcdd23b94dab9e0ef67bd480e7f875b06dc71d.tar.gz
apk-tools-69bcdd23b94dab9e0ef67bd480e7f875b06dc71d.tar.bz2
apk-tools-69bcdd23b94dab9e0ef67bd480e7f875b06dc71d.tar.xz
apk-tools-69bcdd23b94dab9e0ef67bd480e7f875b06dc71d.zip
adbsign: support compressed adb files
Diffstat (limited to 'src/app_adbsign.c')
-rw-r--r--src/app_adbsign.c5
1 files changed, 3 insertions, 2 deletions
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);