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
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
c1b4e0d321
Merge branch 'smali-api-level' of https://github.com/benjamin-promon/Apktool into benjamin-promon-smali-api-level
2016-09-18 16:47:04 -04:00
Benjamin Adolphi
db35f54af6
Pass minimum api level to smali library
...
When apktool creates a DexBuilder class, it creates it without specifying a minimum api level. This causes the DexBuilder class to assume api level 20 by default. This is not ideal since in some cases, the concrete minimum api level is required.
One such case is in smali's DexWriter class which implements a workaround for a bug in Dalvik that was fixed in Android 4.2 (https://code.google.com/p/android/issues/detail?id=35304 ) that causes apps that call the Method.getParameterAnnotations api to crash in some cases (see bug report for more details). The workaround that smali implements is only triggered if the minimum api level is below 17 (Android 4.2). But since apktool effectively sets the minimum api level to 20, this code is never triggered causing apktool to create apk files that crash on devices below Android 4.2.
This change passes the minimum api level to the smali library.
2016-09-15 00:31:32 +02:00
Connor Tumbleson
7801a4bbf2
don't compress mkv/webm
2016-08-24 08:44:24 -04:00
Connor Tumbleson
bada6441ec
don't edit the original Manifest
...
- use dummy copy and restore original after build
2016-08-06 09:45:18 -04:00
Connor Tumbleson
6e509695eb
Patch newest AndroResGuard format
2016-08-06 07:56:17 -04:00
Connor Tumbleson
3a982948ea
Adds full filepath for STORED files in case of multiple extensions
...
- fixes #1244
- prevents greedy extension check STORE`ing too many files
2016-07-29 09:21:52 -04:00
Connor Tumbleson
87315af36e
Remove previous android:debuggable value to allow changing
...
- adds unit test
- normalizeNewlines moved to TestUtils
2016-04-28 08:31:36 -04: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
Connor Tumbleson
b29df52b87
Cleanup unclosed streams plus formatting
...
- run FindBugs to find problems
2016-02-14 20:34:06 -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
Connor Tumbleson
0011498b52
[skip] rename var to match extension or file without extension
2016-01-06 12:49:55 -06:00
Andrei Zhukouski
22bd5b0acc
Fixes issue #1122
2016-01-04 13:15:54 +03:00
Ira Hanson
8232ee0ea8
Consistently encode unknown filenames to prevent cast error
2016-01-02 21:40:15 -06:00
Connor Tumbleson
5e4bae0526
Only stores extension(s) of uncompressed files
...
- fixes #1053
2015-10-13 07:28:43 -05: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
e407fe839b
Correctly rebuild /libs & /lib folder on [b]uild
2015-04-22 07:21:02 -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
7326867b09
re-add copy() method using try-with-resources
2015-04-16 08:12:20 -05:00
Connor Tumbleson
10afb3cd56
Merge branch 'del_BrutIO_copy' of https://github.com/rover12421/Apktool into rover12421-del_BrutIO_copy
2015-04-16 08:03:44 -05:00
Connor Tumbleson
a561a95542
Don't ignore multiple dex files when -s is used
...
- fixes #904
2015-04-04 08:09:07 -05:00
Rover12421
407ffdc5fe
remove BrutIO copy method
...
`copy` method already in IOUtils
2015-03-30 13:30:52 +08:00
Greg Leach
39a2848340
Moving a couple utility functions into BrutIO. Also, formatting change to match spec.
2015-03-25 09:56:55 -07:00
Greg Leach
472a02db41
Formatting for right-hand margin
2015-03-24 20:22:05 -07:00
Greg Leach
628286c022
Java NIO doesn't allow the preservation of the compression method (STORED vs DEFLATED), so unfortunately we need to fall back to ZipEntry-based output for unknown files.
2015-03-24 20:14:05 -07:00
Rover12421
f3582b60db
buildUnknownFiles optimization
...
newFileSystem will file replication overhead
2015-03-18 09:15:26 +08:00
Connor Tumbleson
fac43a62b8
remove dependency on sharedLibrary in apktool.yml
2015-03-14 08:20:00 -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
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
e281f81546
[skip] during info message, don't show apk build dir
2015-01-19 07:25:21 -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
d821717253
java7 try-with-resources and multi catch
2014-10-29 16:18:25 -05:00
Connor Tumbleson
9031c22365
[skip] update all copyrights to 2014
2014-10-23 18:14:48 -05:00
Connor Tumbleson
7b0ba28a43
[skip] code style
2014-09-23 08:24:45 -05:00
Connor Tumbleson
56c953cd16
don't break BC, store classes.dex in /smali
2014-08-16 09:54:34 -05:00
Connor Tumbleson
b2b5eb5f01
[skip] cs fixes, added changes to changelog
2014-08-16 09:48:02 -05:00
Connor Tumbleson
7ef993cc75
Multiple Dex Support - part 3
...
- dexlib2 handles non classes.dex
- cleaned up functions
- cs fixes
2014-08-16 08:45:43 -05:00
Connor Tumbleson
c476ce16be
Multiple Dex Support - part 2
...
- CS fixes
- adds support for building multiple dex
- prevents extra dex from being unknown and extra dex
- adds unit-test
2014-08-16 08:29:57 -05:00
Connor Tumbleson
70eaab9971
Multiple Dex Support
...
- CS fixes
- added decode support for multiple dexes
- decoded to smali_[dex name]
2014-08-15 20:24:12 -05:00
Connor Tumbleson
a031787ece
switch from URI to Paths
2014-05-03 07:37:52 -05:00
Connor Tumbleson
b5dcce3738
abstracted unknown files out of resources, to remove dependencies on ResTable
2014-03-02 08:46:35 -06:00
Connor Tumbleson
65b188ae96
fixes unknown files being ignored if prefixed with known file
2014-02-16 11:20:06 -06:00
Connor Tumbleson
f85dc478b2
Github pr #81 - correctly handle non-URI characters in filename
2014-02-10 07:17:56 -06:00
Connor Tumbleson
086139a037
code cleanup of 2014
2014-02-09 19:01:57 -06:00
Connor Tumbleson
dc2b2fecb8
cleanup new lines and fixup revision properties
2014-02-04 09:52:09 -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
259ff5ef01
fix nio2 windows problem - funorpain
2013-12-08 16:48:59 -06:00
Connor Tumbleson
02ac674551
Add apktool version to output during decode/rebuild
2013-09-17 21:52:09 -05:00
Connor Tumbleson
054ddb1388
Fix for window builds due to java.nio
2013-09-07 08:53:07 -05:00
Connor Tumbleson
fb7fbf0805
pass api to DexFileFactory
2013-08-12 09:16:51 -05:00
Connor Tumbleson
115db91fab
fixes space in filepath on windows
2013-07-26 16:36:26 -05:00
Connor Tumbleson
6b173146ac
fix invalid casting
2013-07-08 12:27:55 -05:00
Connor Tumbleson
09a978e015
fix for root unknown file on windows
2013-05-24 08:11:10 -05:00
Connor Tumbleson
cfac52a744
fix for Windows Env using FileSystem, thanks @BurgerZ
2013-05-24 07:55:33 -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
ac745599ed
close, unclosed ZipFile
2013-05-12 07:20:07 -05:00
Connor Tumbleson
9186858f33
added lib support for "/libs" folder.
2013-05-10 08:24:24 -05:00
Ryszard Wiśniewski
89133557ca
Added debugLinePrefix CLI option.
2013-05-04 22:04:26 +02:00
Connor Tumbleson
0b37a23874
remove old imports, update changes to reflect fixing of smali debug
2013-05-03 19:30:30 -05:00
Connor Tumbleson
a7236053bf
add unit-test and support for handling unknown files
2013-05-03 19:16:34 -05:00
Connor Tumbleson
168075e493
remove dead imports
...
remove old kxml import
update snakeyaml to 1.12
2013-05-01 18:05:46 -05:00
Connor Tumbleson
47a5eac0b0
fixed install|if frameworks with commons-compress
2013-04-30 07:53:17 -05:00
Connor Tumbleson
42f69fd745
fixes #439
...
Extends ZipFile using apache commons compress ZipFile, to have finer control over the header allowing some parts to be ignored,
ex: the general access bit
2013-04-06 12:50:42 -05:00
Connor Tumbleson
a48c11dc1c
cleanup of various functions
...
Removed attr sorting that was never enabled and never worked, added @todo elements for unknown file handling, updated usage output
2013-04-01 16:41:27 -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
4b8ed4c2b1
progress on UnknownFile handling
2013-03-31 09:04:12 -05:00
Connor Tumbleson
c5d2ecf96f
fixed #401 (versionCode / versionName)
2013-03-21 08:58:14 -05:00
Connor Tumbleson
8b182cacae
usage redo fixed #403
2013-03-20 21:36:20 -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
M1cha
3578010262
add support for automatically patch signatures
...
Conflicts:
brut.apktool/apktool-lib/src/main/java/brut/androlib/Androlib.java
2013-03-19 12:55:44 -05:00
Connor Tumbleson
e4d506ab27
removed --original
2013-03-19 08:52:24 -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
881bb56b4d
removing register and class path overrides
2013-02-16 06:47:17 -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
484feea284
removing dead code, code cleanup
2013-01-19 16:35:48 -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
c62f1c5f64
dont substring release build, as it pulls name directly from build.gradle
2012-12-23 15:23:12 -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
9d19ad1355
adding support for release / snapshot builds via gradle. kudos to #smali
2012-12-19 18:19:20 -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
5a290988bc
commenting out retaining original signature until fixed
2012-11-12 21:31:54 -06:00
Connor Tumbleson
689e0e59a6
updating JesusFreke's smali/baksmali. Fixed SmaliMod to handle removal of smaliLexer.
2012-10-08 18:50:34 -05:00
Connor Tumbleson
4db49ab347
Adding brut.apktool :/
2012-09-19 20:27:35 -05:00