Connor Tumbleson
9fc1ede991
License 2018 update
2018-02-16 08:26:53 -05:00
Connor Tumbleson
c23c1303dd
Merge branch 'master' into issue-1639
2017-10-24 15:39:28 -04:00
Connor Tumbleson
0271e55370
Fix regression when --frame-path points to non existing directory
...
- fixes #1639
2017-10-14 12:36:54 -04:00
Connor Tumbleson
41018a81b8
Remove .exit() falls from library code
...
- fixes #1640
2017-10-14 12:36:07 -04:00
Connor Tumbleson
3ec4f360ab
Add support for shorthand SDK for bounding check
...
- fixes #1630
2017-09-28 08:23:02 -04:00
Connor Tumbleson
dc33533d76
add tests, make public method
2017-09-19 15:09:25 -04:00
Connor Tumbleson
21e9dd514c
cs cleanup
2017-09-19 14:42:14 -04:00
Jan Vidar Krey
5f0d53ba20
Support bounding targetSdkVersion between minSdkVersion and maxSdkVersion
...
It is possible to create a an AndroidStudio project that uses the following
nonsense settings:
defaultConfig {
minSdkVersion 15
maxSdkVersion 19
targetSdkVersion 25
}
The application is successfully built by Android Studio, and the APK
works when installed on the relevant devices, however the app cannot
be re-built with Apktool afterwards.
This patch works around the problem by explicitly setting the
targetSdkVersion to the max of the maxSdkVersion and min of the minSdkVersion
only if these are specified.
2017-09-15 16:24:39 +02:00
Connor Tumbleson
e9618fae6b
Windows binary is still 32 bit
2017-08-27 09:54:36 -04:00
Connor Tumbleson
fa966d2d66
Drop 32 bit binaries
...
- update unix/win/mac 64 bit binaries
- fixes #1598
- refs #1594
2017-08-24 15:53:52 -04:00
Connor Tumbleson
79454823b3
Refactor directory checks to prevent assumptions
...
- only checks directory path of apktool framework location
- fixes #1586
2017-08-15 15:52:46 -04:00
Connor Tumbleson
1597c12472
changed all license files
2017-07-05 12:05:52 -04:00
Bing Qiao
28883538a7
Class.class.getResourceAsStream tries to load resource from root directory. This fails when apktool is built into a fat jar like Spring boot executable so that the classloader tries to load the resource from the root directory of the Spring boot jar instead of that of the bundled appktool jar.
2017-06-29 12:36:05 +01:00
Connor Tumbleson
e4db1fa8d6
Prevent closing objects that may not exist.
2017-05-04 17:53:54 -04:00
Connor Tumbleson
488b9d58dd
code style changes
2017-05-02 08:16:07 -04:00
Marc Miltenberger
66c1b46865
Closing Framework and APK after use
...
This commit should fix https://github.com/iBotPeaches/Apktool/issues/1160
2017-05-02 08:21:09 +02:00
Connor Tumbleson
891d0d39e0
Refactor ExtFile to brut.j.dir
...
- move to using Paths when possible
- adapt calls to FileDirectory to leverage Paths
2016-12-25 07:57:41 -05:00
Connor Tumbleson
166bf508e2
Add "--no-version-vectors"
...
- fixes #1384
- prevents aapt versioning vectors on rebuild
2016-12-23 09:11:43 -05:00
Connor Tumbleson
31d015fe37
Add new aapt binaries for macosx
2016-12-23 07:30:46 -05:00
Connor Tumbleson
dae52d3899
Add new aapt binaries
...
- 32/64 unix
- windows
2016-12-22 09:06:25 -05:00
Connor Tumbleson
6361fa9725
Evolve Update-Framework to Empty Framework Directory
...
- allows emptying of framework via (empty-framework-dir)
- checks in place to only delete files that are APKs, non recursive
2016-10-06 09:18:16 -04:00
Connor Tumbleson
daa1e1d753
Updating Framework Support
2016-10-06 07:21:10 -04:00
Connor Tumbleson
6e509695eb
Patch newest AndroResGuard format
2016-08-06 07:56:17 -04:00
Connor Tumbleson
ed7b094b02
move default framework location on windows/unix
...
- unix - $HOME/.local/share/apktool
- windows - $HOME/AppData/Local/apktool
- #1277
2016-06-21 08:03:00 -04:00
Connor Tumbleson
47dd120b38
Prevents package renaming of Adobe AIR applications
...
- fixes #1240
2016-05-04 08:04:28 -04:00
Benjamin Dobell
032a3e5e25
Reinstate minimalistic debug option to inject android:debuggable with aapt
2016-04-28 08:21:21 -04:00
Connor Tumbleson
8689991626
clear /apktool/framework/1.apk in between tests
2016-04-27 07:37:14 -04:00
Andrei Zhukouski
513e4b752b
Copy AndroidManifest.xml
...
Copy AndroidManifest.xml along with resources.arsc from the framework apk file instead of creating the fake entry.
2016-04-22 08:32:42 +03:00
Andrei Zhukouski
2ec2fe817a
Fix typo
2016-04-17 15:02:38 +03:00
Andrei Zhukouski
6e065f15a0
Support of official aapt
...
Create fake AndroidManifest.xml file inside each installed framework file to support official aapt from Google.
2016-04-17 14:48:51 +03:00
Connor Tumbleson
ea2c821fa5
Add support for AndResGuard
...
- fixes #1170
2016-03-10 09:29:49 -05:00
Connor Tumbleson
cd852cd658
Removes SmaliDebugging
...
- fixes #1061
2016-02-27 20:20:53 -05:00
Rover12421
123912d226
Apktool.yml file (MetaInfo) using object serialization
...
non-printable character more intuitive, does not affect printable
character view
2016-01-22 06:28:03 -06:00
zoujunhua
c30261bd15
add "flyme" to list of ignored renamed packages
2015-10-16 16:02:02 +08:00
Andrew Grieve
392420c909
Adds doNotCompress list to apktool.yml
...
This is the list of files (resources, assets, etc) that are stored in
the .apk uncompressed.
For apps that use AssetFileDescriptor.openFd(), the adding compression
will break the call.
Maintains support for the resourcesAreCompressed key, but no longer
records it when decompiling (it instead records resources.arsc in the
doNotCompress list).
2015-08-14 11:52:33 -04:00
Connor Tumbleson
d5f3b3fd5a
[skip] its com.miui.core now
2015-06-29 11:33:13 -05:00
Connor Tumbleson
b878cbd776
[miui] add a new ignored package
2015-06-06 10:43:48 -05:00
Connor Tumbleson
3208624bf6
Moves all XML parsing related functions to new class: ResXmlPatcher
2015-04-16 08:24:30 -05:00
Connor Tumbleson
addbf8336d
[WIP] Wires up rewriter of @string references in provider attrs
...
- finds all <providers> in manifest
- finds corresponding @string in res/values/strings.xml
- does reference replacement w/ literal value
- fixes #636
2015-04-16 08:24:30 -05:00
Connor Tumbleson
becaf754a9
[skip] use IOUtils.closeQuietly()
2015-04-16 08:20:18 -05:00
Connor Tumbleson
0a74de4ab0
Shared Library Rebuilding Support
...
- handles references with shared resources
- adds support for --shared-lib
- update unit-tests
2015-03-14 08:04:33 -05:00
thuxnder
07b43d687c
use BufferedInputStream for APK
...
faster xml escape function
2015-03-01 10:29:34 -06:00
Connor Tumbleson
3f571bebef
Handles unreadable $HOME gracefully
...
- superseeds PR 98 (rscarvalho)
2015-02-12 08:18:53 -06:00
Connor Tumbleson
81e6af093b
Removes general access bit hack
...
- fixed in aosp: android_libcore/commit/25681be69e19a834b00cfbf54cd99ac13f12b9ff
- reverts 42f69fd745
- reverts 47a5eac0b0
- fixes googlecode issue 744
2015-01-21 07:12:26 -06:00
Connor Tumbleson
4882396163
Prevent casting strings that resemble filepaths to ResFileValues
...
- add testcase
- adapt changes
- introduce decodeManifestWithResources which uses attr decoding w/ resources
2014-12-26 08:08:50 -06:00
Connor Tumbleson
40fdfc50a1
Options Cleanup
...
- remove ugly Hashmap passing
- create ApkOptions
- refactor based on ApkOptions
2014-11-01 21:07:02 -05:00
Connor Tumbleson
9031c22365
[skip] update all copyrights to 2014
2014-10-23 18:14:48 -05:00
Connor Tumbleson
76bf5ead25
Handle renamed manifests with "yi"
...
- issue 682
2014-10-05 12:33:47 -05:00
Connor Tumbleson
ce3c37c6ab
Handle ARSC files with multiple ResPackages
...
- superseeds - 68c1809a48
2014-10-03 11:31:43 -05:00
Connor Tumbleson
6138d26335
prevent execution if file is named same as apktool framework folder
2014-09-23 08:32:04 -05:00
Connor Tumbleson
7b0ba28a43
[skip] code style
2014-09-23 08:24:45 -05:00
Connor Tumbleson
49b6bf70e4
[skip] check result of .setExecutable()
2014-09-23 07:56:28 -05:00
Connor Tumbleson
3d2e935f08
[skip] cs fixes
2014-08-16 10:17:15 -05:00
Connor Tumbleson
584d1cda18
ignore "com.lge.internal"
2014-05-18 06:48:01 -05:00
Connor Tumbleson
b53101f69e
adds support for ignoring "com.lge"
...
-- fixes issue 630
2014-05-08 15:08:40 -05:00
Connor Tumbleson
25e9ed7281
add more modular support for renamed packages
...
-- There is no "set" rules for renaming a manifest, so we must adapt to patterns. There are some apks that have original package names as "android", "miui", "com.htc", etc. These are not meant for renaming, but exist to align that apk to a specific OEM framework system. (EX HTC system apks have a package id of com.htc). However, this pattern isn't true when framework apks are involved, as the intended behavior is to rename the package from xxx to com.htc (as an example).
-- We solve this by first identifying the active package via the packageId instead of package with most ResSpecs (we fall back on that though)
-- then with two hardcoded arrays of UNKNOWN_PACKAGES and ALLOWED_PACKAGES
2014-03-19 16:23:45 -05:00
Connor Tumbleson
1e3b66f9be
adds "miui", "android" and "com.htc" to list of ignored renamed packages.
2014-03-09 17:47:43 -05:00
Connor Tumbleson
501a6df677
only store renamed-manifest-package if the apk requires the change
2014-01-07 15:06:45 -06:00
Connor Tumbleson
f6a61ba1b4
rename variables to help user understand, remove unneeded ones
2014-01-07 13:08:48 -06:00
Connor Tumbleson
e254cec648
rework manifest renaming
...
Issue #526 , correctly handles apks where a renamed package is required, by comparing the package name present
in AndroidManifest.xml and resources.arsc. If different, we take the package name present
in resources.arsc (original) and replace it in the <manifest> tag of AndroidManifest.xml. The previous value in
AndroidManifest.xml (renamed) becomes the value to be passed to aapt on rebuild via --rename-manifest-package
Both these values along with the package id of the original are stored in apktool.yml, for use during the
rebuild
2014-01-07 10:59:37 -06:00
Connor Tumbleson
d2fc74d984
remove jre7 code from testing class, added comments for manifest changing
2013-11-15 13:07:07 -06:00
Connor Tumbleson
8d0801e6db
cleanup document related functions
2013-11-15 12:08:21 -06:00
Connor Tumbleson
87e39c4bb9
add todo
2013-10-12 15:44:47 -05:00
Connor Tumbleson
27922bdb81
remove hardcoded seperator char
2013-09-17 21:48:31 -05:00
Connor Tumbleson
bd9dce78b4
add warning for unknown operating system and fix getFrameworkDir to use non hardcode seperator char
2013-09-17 21:44:57 -05:00
Connor Tumbleson
d4b86475ca
fix for NPE w/ null version numbers
2013-09-12 17:46:14 -05:00
Connor Tumbleson
be4ae922de
stderr for error messages
2013-09-07 08:54:07 -05:00
Connor Tumbleson
d12468a2f7
remove "Done"/"Loaded" messages, as output is becoming clogged.
2013-08-14 08:33:09 -05:00
Connor Tumbleson
007a6d45a2
Update to smali 2b5
2013-08-12 09:16:50 -05:00
Connor Tumbleson
6a87c9ffd4
remove un-needed done.
2013-07-08 13:58:46 -05:00
Connor Tumbleson
6475ef8a77
ignore errors during Manifest alterations, to prevent crashing of apktool
2013-06-12 10:29:16 -05:00
Connor Tumbleson
832978a549
fixes issue 469, added -m / --match-original
...
fixes xml output not having newline after xml declaration
2013-06-12 10:04:28 -05:00
Connor Tumbleson
c6861e1241
move multi catches to multi-catch (java 7), fixed pkg id not being correctly read from apktool.yml
2013-05-12 10:15:36 -05:00
Connor Tumbleson
be73563c43
handle all version(s) as strings, and change java to 1.7
2013-05-02 12:56:18 -05:00
Connor Tumbleson
db6ecadc00
fix spacing in installFramework()
2013-04-30 07:55:33 -05:00
Connor Tumbleson
47a5eac0b0
fixed install|if frameworks with commons-compress
2013-04-30 07:53:17 -05:00
Connor Tumbleson
0ca74eca67
support for decoding unknown files, @todo add support for building unknown files
2013-03-31 17:13:10 -05:00
Connor Tumbleson
be77354859
only use --forced-package-id if prebuilt aapt is used
2013-03-29 14:49:04 -05:00
Connor Tumbleson
d8b774864c
fix comment on getAaptBinaryFile()
2013-03-29 14:45:54 -05:00
Connor Tumbleson
0c5871687f
fixes #440 includes prebuilt aapt binaries
2013-03-29 14:42:35 -05:00
Connor Tumbleson
90577d40e8
added OSDection, and prebuilt aapt
2013-03-28 19:51:08 -05:00
Connor Tumbleson
c5d2ecf96f
fixed #401 (versionCode / versionName)
2013-03-21 08:58:14 -05:00
Connor Tumbleson
c420a039e0
set --max-res-version if maxsdk version is present
2013-03-21 06:32:18 -05:00
M1cha
071ce71a61
apktool-lib: fix recompiling framework apk's with dependencies by using static package-id
2013-03-19 12:55:58 -05:00
Connor Tumbleson
69ee710e30
fixes #427 , correctly handles --frame-path
on build
2013-03-14 16:50:27 -05:00
Connor Tumbleson
626d7e7ecd
fixes #396 , update to smali v1.4.2
2013-02-16 07:32:39 -06:00
Connor Tumbleson
e82c0754de
Code cleanup of 2013
...
Signed-off-by: Connor Tumbleson <connor.tumbleson@gmail.com>
2013-02-12 21:12:17 -06:00
Connor Tumbleson
7fe733bf43
adding support for htc .r.9.png
2013-01-21 08:25:57 -06:00
Connor Tumbleson
cb5bad5555
added ability to use --frame-path during install of frameworks
2013-01-18 08:19:19 -06:00
Connor Tumbleson
f82b2e1855
fixes issue #67 - only compresses resources.arsc if original apk had compressoin
2013-01-13 08:19:42 -06:00
Connor Tumbleson
aebdf7a519
only show -aapt info in verbose mode
2013-01-06 09:57:44 -06:00
Connor Tumbleson
3b1a8be980
Updated unit-tests for 4.2 APK support, added -a / --apt during build for location to aapt, reverted fix regarding <uses-sdk>
2012-12-23 15:13:01 -06:00
Connor Tumbleson
559ed2853a
prevents renaming manifest if package is "android" and fixes deletion of tmp files
2012-12-19 07:57:52 -06:00
Connor Tumbleson
04b5508c3a
Android 4.2 support finally ? updated some internal libs, fixed --renamed-package
2012-12-18 19:40:42 -06:00
Connor Tumbleson
f065a5be92
properly store package information (manifest AND resources.arsc info) in apktool.yml for renamed packages
2012-12-13 21:14:41 -06:00
Connor Tumbleson
4410e466f5
Merge branch 'master' of github.com:iBotPeaches/Apktool
2012-12-01 12:37:16 -06:00
Connor Tumbleson
da68943022
Starting work on Bug #252
2012-12-01 12:36:51 -06:00
Robert Mays Jr
f83383a33b
Support for --framework <dir> command line argument to specify the location of the framework files (previously forced you to keep them in the home folder)
2012-11-29 18:30:21 -05:00
Connor Tumbleson
b4db7735a5
only check for layoutDir if over sdk 17
2012-11-19 07:56:19 -06:00
Connor Tumbleson
5b106e5c34
New API 17 resource identifiers. ~ Untested
...
Adjust naming to match brut.all conventions & added natural SDK check w/ new configFlags
2012-11-19 07:47:59 -06:00