mathieures / convert-apk Goto Github PK
View Code? Open in Web Editor NEWConvert .apk files to install them on Android >= 11 (SDK >= 30)
Convert .apk files to install them on Android >= 11 (SDK >= 30)
convert-apk/uncompress-resources.sh
Lines 37 to 40 in b157872
should be
compress_with_zip()
{
pushd $unzipped >/dev/null
zip -n resources.arsc -qr "$dst" *
popd >/dev/null
}
otherwise zip will copy the absolute path of the unzipped dir starting from /
root dir. Later when installing the apk the installer will fail to find the AndroidManifest.xml
file because it's not in the root of the archive anymore.
Zip version
❯ zip --version
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 3.0 (July 5th 2008), by Info-ZIP.
Currently maintained by E. Gordon. Please send bug reports to
the authors using the web page at www.info-zip.org; see README for details.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip,
as of above date; see http://www.info-zip.org/ for other sites.
Compiled with gcc 6.3.0 20170415 for Unix (Linux ELF).
Lines 71 to 77 in b157872
I have Android build tools 30.0.3 and Ubuntu 20.4, here apksigner
is a bash file which resolves the JAR location and calls java. convert-apk is handling it like it's a JAR file and calling java on a bash file.
convert-apk/uncompress-resources.sh
Lines 24 to 35 in b157872
Tried running ./convert-apk.sh -t ...
but got error on Ubuntu 20.04
Zipping back into ...
using tar
tar: unrecognized option '--options'
Try 'tar --help' or 'tar --usage' for more information.
Version:
❯ tar --version
tar (GNU tar) 1.30
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.