Commit Graph

38 Commits

Author SHA1 Message Date
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
b5dcce3738 abstracted unknown files out of resources, to remove dependencies on ResTable 2014-03-02 08:46:35 -06:00
Connor Tumbleson
086139a037 code cleanup of 2014 2014-02-09 19:01:57 -06:00
Connor Tumbleson
2af523d5d4 correctly handles apk's with one package named "android" 2014-01-13 17:43: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
559a3024cc Ignore multiple types 2014-01-06 06:39:51 -06:00
Connor Tumbleson
a1ca5019d8 fix spacing in ResArrayValue 2013-11-23 08:35:08 -06:00
Connor Tumbleson
e91790e676 correctly handle incorrect type labeled <array>'s 2013-11-23 08:34:33 -06:00
Connor Tumbleson
4b180bd13c handle MNC_ZERO correctly 2013-11-22 16:22:53 -06:00
Connor Tumbleson
f6623d8a12 add newer release api versions 2013-11-03 19:08:39 -06:00
Connor Tumbleson
bdb718f8a9 added xxxhdpi, added DENSITY_400, added MNC_ZERO 2013-11-01 20:10:39 -05:00
Connor Tumbleson
64bcb32d81 add method to return size of resPackage, (count of ResSpecs) 2013-10-12 15:39:43 -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
9f03d7d35c removes hacky @*android fix
Updates unit-tests to actually use AOSP drawables/layouts/anims, instead of using 3rd party ones.
2013-06-05 12:36:24 -05:00
Connor Tumbleson
a4a22a2961 revert commit: 7d5d633b97 2013-06-05 11:58:17 -05:00
Ryszard Wiśniewski
38de56697a Properly handle style with dot in its name and without a parent style. 2013-06-05 18:45:17 +02:00
Connor Tumbleson
aa20036307 fixed problem with <items> showing up in colors.xml 2013-05-12 07:20:35 -05:00
Ryszard Wiśniewski
14f26474e6 Cleaned up the code related to multiple substitutions in xml strings. 2013-05-11 20:04:12 +02:00
Connor Tumbleson
3a6d548756 fixed problem with nodpi, added drawable unit testing 2013-05-09 21:54:03 -05:00
Connor Tumbleson
f93a312308 Prevents double escaping of special chars in arrays.xml/<item> tags 2013-05-05 08:13:32 -05:00
Connor Tumbleson
d18ee186da Update density ConfigFlags to ints, updated internal windows aapt. 2013-04-30 07:53:52 -05:00
Connor Tumbleson
9e50300ec2 update spacing 2013-04-07 07:37:52 -05:00
Lars Greiss
7d5d633b97 Apktool: Add new inverted TRDS qualifier
into awesome apktool

thanks and cheers

SlimRoms Team
2013-04-06 12:56:42 -05:00
Connor Tumbleson
3a5530e67b remove hardcoded htc stuff 2013-04-03 14:07:18 -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
c5d2ecf96f fixed #401 (versionCode / versionName) 2013-03-21 08:58:14 -05: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
f504ceca43 minor comment change / cleanup 2013-02-03 11:50:31 -06:00
Connor Tumbleson
39a9bf054c actually commit previous commit 2013-01-29 21:26:08 -06:00
Connor Tumbleson
0dd2f3f6ba Revert to c836995ead 2013-01-19 12:10:07 -06:00
Alsan Wong
efd8349aa5 fix for ResValue cast to ResAttr exception (not really, just bypass) 2013-01-18 15:31:22 +08: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
da68943022 Starting work on Bug #252 2012-12-01 12:36:51 -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
Connor Tumbleson
85a4901e1d fix useless helpers of mType variable 2012-11-03 18:33:41 -05:00
Connor Tumbleson
58ec5e1892 updating gitignore for compatibility w/ Eclipse & added fix for new MIUI 2012-11-01 14:23:19 -05:00
Zhukovskiy Andrey
ea8f6b666f reference-array dirty fix (works) 2012-10-21 13:25:11 -05:00
Connor Tumbleson
4db49ab347 Adding brut.apktool :/ 2012-09-19 20:27:35 -05:00