85 Commits

Author SHA1 Message Date
Dianne Hackborn
2bd8d0403b Fix issue #6641368: can't launch gallery
This is a revert of 1db36528b12395b9ed9bf8a1005a6d4ace737627,
but with comments added so I don't make this mistake again. :)

Change-Id: I053216279e3721f08f32f561bb989736ef619f82
2012-06-11 12:27:05 -07:00
Ying Wang
002f53770a Apply --extra-packages in case --custom-pacakge is also specified.
Cherry-picked from master.

Change-Id: I2d67b8821afdf064f4186ccd8def1b65f9a7dc88
2012-04-26 13:13:08 -07:00
Dianne Hackborn
4aa14b912f Add new aapt dump badging output explaining implicit badging.
New uses-implied-feature and uses-implied-permission tell you
about any features or permissions that aapt is automatically
adding to your app, and why it is doing so.

Change-Id: I45edb055408e1259699c994f956166ce67e8db5d
2012-04-16 11:34:15 -07:00
Dan Morrill
4527a92421 Merge "Adding a line for android-debuggable to 'dump badging' if AndroidManifest.xml is configured as such. This is to be used by e.g. Play Store to warn the developer that they are about to publish a security hole." 2012-04-10 17:13:17 -07:00
Dianne Hackborn
31b0e0e86a Implement call log permission compatibility.
If a pre-JellyBean application requests read/write contacts, it
will implicitly be given read/write call log.

Change-Id: I029db4b09fda737bb8fba4e1611355ebdbbfd34f
2012-04-05 19:33:30 -07:00
Dan Morrill
b6ec11ef37 Adding a line for android-debuggable to 'dump badging' if AndroidManifest.xml
is configured as such. This is to be used by e.g. Play Store to warn the
developer that they are about to publish a security hole.

Change-Id: Ib6f8537462cbc00ed0504435bdeee2aae0c5b69b
2012-04-03 14:42:05 -07:00
Dianne Hackborn
7924512aa1 Add new READ_EXTERNAL_STORAGE permission.
Also adds some initial compatibility code for dealing with it.

Change-Id: I104bff11798349e4aaa6da9b7be787b257daa1bb
2012-03-12 15:07:31 -07:00
Dianne Hackborn
1644c6d7f4 Only generate private symbols that are needed.
Change-Id: Icc4c86638db8429a387bf87c934cc712f807e213
2012-02-07 12:57:50 -08:00
Dianne Hackborn
6c997a9e88 aapt now sorts the strings in the resource string pool.
In our current environment with very many translations, this can
save a lot of RAM -- for example over 200K in Gmail just by sorting
the strings in the Gmail .apk (not the framework).

Also add a new aapt command to print the contents of the resource
table string pool.

Change-Id: I1da037b3e2c377b890833ff57ab158965314ac48
2012-01-31 15:41:30 -08:00
Dan Morrill
e74763e26f Minor tweak to console output.
Change-Id: I494910eda1d02f6bcff945b9a13c83767f2248b6
2012-01-06 14:10:45 -08:00
Kenny Root
063a44e541 Add aapt support for implicitly-granted permissions
Bug: 2363582
Bug: 2877343
Change-Id: Iff7b496fb845e45fe1be2317089a96f7d63ed223
2011-12-08 08:46:34 -08:00
Dianne Hackborn
e6b680364d New aapt feature to do smarter filtering of configurations.
This adds a --preferred-configurations flag that specifies the
specific configurations you would like to have.

It is smarter than "-c" because it will avoid stripping a
configuration if that would result in there being no value
for the resource.

It is dumber than "-c" because it can't process as many kinds
of resources.  It is really only intended for bitmaps and use
with density configs.

This required re-arranging AaptAssets to group files together
by config again, like they used to be.  I think this hasn't
broken anything.  Hopefully.

Change-Id: I4e9d12ff6e6dbd1abb8fd4cb1814c6674b19d0e5
2011-10-16 11:52:17 -07:00
Kenny Root
56088a55ca Add package-verifier to aapt dump badging
Print out the package-verifier information when printing out badging.

Change-Id: I9c79c163261d5d4f1094bda76d90b3ff6e1ce540
2011-09-29 13:49:48 -07:00
Xavier Ducrohet
d98e1be20e am f4750724: am 9d829f98: am 21e6e2de: Merge "Change generated dependency file names"
* commit 'f4750724cf8db972a052cb388dc9a39fc7aa6dd6':
  Change generated dependency file names
2011-08-18 14:48:49 -07:00
Josiah Gaskin
b711f3f7ee Change generated dependency file names
This changes the name of the generated dependency files to R.java.d
and <ApkName>.ap_.d respectively.

Change-Id: I17e18770fc0d0a5d31c7b37b40ac1949f45ef13a
2011-08-16 08:14:51 -07:00
Xavier Ducrohet
84be06e4ce resolved conflicts for merge of ea9e6d24 to honeycomb-plus-aosp
Change-Id: I8e047147a4d2c899b6654c03a5f32b04d929e602
2011-07-20 17:45:11 -07:00
Xavier Ducrohet
a125c937de resolved conflicts for merge of 2c311be7 to honeycomb-plus-aosp
Change-Id: I806c7b4ae95f66df621587e52497dd8739a115fe
2011-07-20 16:31:25 -07:00
Josiah Gaskin
8a39da80b3 Added Caching for PreProcessed PNGs
Added a cache management system for pre-processed PNG files
along with unit tests. The cache system will be used if
the --no-crunch flag is passed to AAPT during the package
phase. The cache can be updated by a call to 'aapt crunch'
(see usage statement). Also put in benchmarking code.

Change-Id: I58271fb2ee2f5f9075fd74d4ff6f15e7afabd05c
2011-07-20 15:20:26 -07:00
Xavier Ducrohet
9139868b6c am ba6c98db: am 82943ecf: am d40c93f6: Merge "Add dependency generation to Aapt for R.java"
* commit 'ba6c98db8f21016f81ecac35bb0ea3c433044bb7':
  Add dependency generation to Aapt for R.java
2011-07-19 10:18:28 -07:00
Xavier Ducrohet
bf31250ba0 am d5431ed5: am 2e659ae5: am 42755155: Merge "Copy once-created R.java into library projects"
* commit 'd5431ed5505a42e5e33c8bf7cc2ff72792979be9':
  Copy once-created R.java into library projects
2011-07-19 10:18:25 -07:00
Josiah Gaskin
03589cc653 Add generation of dependency file for .ap_ package
Make Aapt generate a dependency file in the same directory as the
output ap_ file if the --generate-dependencies flag is set.
This dependency file can then be read by the ant exec loop task
to see whether to repackage resources.

Change-Id: I763679414daf76369700aa599c26dcf78d4de099
2011-07-18 16:37:55 -07:00
Josiah Gaskin
9bf34ca6f8 Add dependency generation to Aapt for R.java
Make Aapt generate a dependency file in the location specified
by RClassDir for R.java if the --generate-dependencies flag is set.
This dependency file is then read by the ant exec loop task
to see whether to recreate R.java.

Change-Id: I7152dac86b6ea0e448ef65e3a95694afe233c789
2011-06-27 16:44:57 -07:00
Josiah Gaskin
ce89f1531e Copy once-created R.java into library projects
This change adds functionality in Aapt to allow specification of
library projects to copy the generated R.java file into rather
than regenerating the file for each library project.

Change-Id: I05939d1dc875bd875be9298ca47cb639235070c6
2011-06-27 16:29:38 -07:00
Dianne Hackborn
f77ae6e65a New orientation handling. Only impacts SDK (aapt dump badging).
This is a new way of determining whether an application requires
specific orientations, done by looking at any requirements in its
activity tags.  Note that this won't catch all possible issues,
because applications can still force an orientation through Java
APIs, but the vast majority of applications that actually require
a specific orientation should be doing it this way because it the
easiest way and the only way to cleanly launch into the app from
a different orientation without doing some serious activity tricks.

Change-Id: I11d32104f6bc3d2a72aeeff1ca150b8f1c9f5588
2011-06-16 11:13:20 -07:00
Dianne Hackborn
e289bff0ec Add new landscape and portrait orientation features.
Updates aapt to know about these.  Also updates aapt badging to:

- No longer crash due to the change to how we match unspecified
configuration resources.
- Report the new "smallest screen" supported screen configs.
- Infer old screen size buckets based on new smallest width attrs.
- Report all of the different labels and icons in an app.

Change-Id: I7376042b817391bd070f549cebbc7f03be4635c8
2011-06-14 11:23:52 -07:00
Dan Morrill
00db2213bf am 0ccc8b73: am 5441a9ff: Merge "GL texture filtering changed from AND to OR, so rename tag name to match. (<uses-foo> == AND, <supports-foo> == OR, e.g. uses-feature vs. supports-screen)." into gingerbread
* commit '0ccc8b7345eac0b507c221be47e55926cbda8957':
  GL texture filtering changed from AND to OR, so rename tag name to match. (<uses-foo> == AND, <supports-foo> == OR, e.g. uses-feature vs. supports-screen).
2010-12-14 11:31:29 -08:00
Dan Morrill
096b67f655 GL texture filtering changed from AND to OR, so rename tag name to match.
(<uses-foo> == AND, <supports-foo> == OR, e.g. uses-feature vs.
supports-screen).

Change-Id: I0f20aed7f95169d9adfc7fe128191eb6e49d116f
2010-12-13 16:25:54 -08:00
Scott Main
41a4833bf2 am 4da6efc8: am 46151652: Merge "fix xlarge support in aapt for gingerbread" into gingerbread
* commit '4da6efc8a3ecfcf46a8988ad1d277ae00ed1f58c':
  fix xlarge support in aapt for gingerbread
2010-11-06 16:24:28 -07:00
Scott Main
d58fb97ddf fix xlarge support in aapt for gingerbread
Change-Id: I4d8872fb839a6eadc538055215d4455af328846c
2010-11-04 18:33:05 -07:00
Dianne Hackborn
a0b46c9c44 Implement issue #3116702: New manifest tags for supported screen sizes
Merged from GB.

Change-Id: I94730b54bcacd083f77708e84c35f4932a7b9d2e
2010-10-22 16:18:43 -07:00
Dianne Hackborn
a6d9c7c04c Implement issue #3116702: New manifest tags for supported screen sizes DO NOT MERGE
Change-Id: Iabf64d86c89d387ffbfbc39f950d308a73fe17eb
2010-10-21 15:32:06 -07:00
Dan Morrill
1785627fb3 am b58af2b8: am 5c62ab0a: Merge "Adding a new <uses-gl-texture/> tag, to be used to enable apps to specify filtering based on support for OpenGL ES texture and texture compression formats." into gingerbread
Merge commit 'b58af2b8b3871436942d0e2c878c906bffaa2fb0'

* commit 'b58af2b8b3871436942d0e2c878c906bffaa2fb0':
  Adding a new <uses-gl-texture/> tag, to be used to enable apps to specify
2010-10-15 08:33:00 -07:00
Dan Morrill
6f51fc14d0 Adding a new <uses-gl-texture/> tag, to be used to enable apps to specify
filtering based on support for OpenGL ES texture and texture compression
formats.

Change-Id: I993209a673579b296007ae2ba830d0275770dd11
2010-10-13 14:33:43 -07:00
Dianne Hackborn
f156e752b5 am 31103928: am 192b56d4: Merge "Implement #2964234: Add support for <uses-package> element to aapt" into gingerbread
Merge commit '31103928ed5b9091bcd7de74c8a49675d10c87e7'

* commit '31103928ed5b9091bcd7de74c8a49675d10c87e7':
  Implement #2964234: Add support for <uses-package> element to aapt
2010-09-02 17:59:51 -07:00
Dianne Hackborn
43b6803095 Implement #2964234: Add support for <uses-package> element to aapt
Change-Id: Ifb381f387cab7e5a99006691e330d0e3d9d0f250
2010-09-02 17:14:41 -07:00
Kenny Root
dc05980466 am eb0e0f46: am 2e7427f3: Merge "Add LFH offset to verbose list of APK" into gingerbread
Merge commit 'eb0e0f465155bc9ec2c79741890fb65bd403e33a'

* commit 'eb0e0f465155bc9ec2c79741890fb65bd403e33a':
  Add LFH offset to verbose list of APK
2010-08-25 17:25:15 -07:00
Kenny Root
fb2a9467ad Add LFH offset to verbose list of APK
The Local File Header (LFH) offset is printed in debugging cases when
the platform is inspecting APKs. This adds the LFH offset field to the
list of contents of an APK, so that it can be checked easily against the
Central Directory (CD).

Change-Id: I08f9a13256bfe6563c1a963c4f0289789b2e7857
2010-08-25 07:38:33 -07:00
Dianne Hackborn
cc5239b78b am 8b569c8d: am 42f90ca5: Merge "Fix aapt dump badging to support xlarge screens." into gingerbread
Merge commit '8b569c8d49924d849793513a5418ef0350320962'

* commit '8b569c8d49924d849793513a5418ef0350320962':
  Fix aapt dump badging to support xlarge screens.
2010-08-24 09:02:43 -07:00
Dianne Hackborn
f43489d7d5 Fix aapt dump badging to support xlarge screens.
Change-Id: Ieeb757cd48ad9b3f46c5e4aed9d5efaeac834049
2010-08-20 12:44:33 -07:00
Steve Block
f1ff21ac62 Fixes a few minor problems with AAPT
- Fixes casting problems with stricter compilers
- Adds a couple of missing ifdef guards

This is a first step toward being able to generate APKs on the fly on the device.

Bug: 2766918
Change-Id: Icaaee5a4032afa313256add321b447443861dd85
2010-06-25 11:02:15 +01:00
Dan Morrill
6b22d81aa3 As Donut (API=4) devices and earlier do not have a Bluetooth API, .apk files
that have minSdkLevel (or targetSdkLevel) set to 4 or lower should not be
presumed to require Bluetooth just because they take the permission.

Change-Id: Ia629e9ef0425a577e4e14f9b348f5aa2b39c1e74
2010-06-15 21:57:33 -07:00
Dan Morrill
89d97c1418 Adding the backward-compatible filtering heuristics for the new device
features definitions added in FroYo.

Change-Id: I5024e45c62813fe2fd2ff4d222df816a86a94f86
2010-05-04 08:39:03 -07:00
Dianne Hackborn
cf244ada58 Add ability for some manifest attributes to reference resources.
This loosens our restriction on many manifest attributes requiring
literal string values, to allow various ones to use values from
resources.  This is only allowed if the resource value does not change
from configuration changes, and the restriction is still in place
for attributes that are core to security (requesting permissions) or
market operation (used libraries and features etc).

Change-Id: I4da02f6a5196cb6a7dbcff9ac25403904c42c2c8
2010-03-09 17:18:05 -08:00
Dianne Hackborn
ef05e076ce Fix issue #2448075: aapt doesn't fix up activity-alias android:targetActivity links
And related:

- The aapt tool now sets a resource configurations sdk level to match any configs
  that have been set (for example if you specify density your sdk level will be
  at least 4).
- New option to modify the targetPackage attribute of instrumentation.
- Clean up of aapt options help.
- Fix of UI type values to leave 0 for "unspecified".
- Make the UI mode config APIs public.
2010-03-01 20:42:14 -08:00
Jeff Hamilton
e2c17f9174 Dump original-package entries.
Change-Id: I29b20811847555ff9858ef47cca69c8b992b24ea
2010-02-12 13:45:16 -06:00
Dianne Hackborn
93cee56d87 am ce56857e: am cb2d50d0: Fix issue #2357259: aapt tool prints "uses-configuation:"
Merge commit 'ce56857ef72538c197afd91b9f30dc868d2667d9'

* commit 'ce56857ef72538c197afd91b9f30dc868d2667d9':
  Fix issue #2357259: aapt tool prints "uses-configuation:"
2010-01-07 09:21:52 -08:00
Dianne Hackborn
ce56857ef7 am cb2d50d0: Fix issue #2357259: aapt tool prints "uses-configuation:"
Merge commit 'cb2d50d0d6e2e37ae02b014999da23ecd32038b8' into eclair-plus-aosp

* commit 'cb2d50d0d6e2e37ae02b014999da23ecd32038b8':
  Fix issue #2357259: aapt tool prints "uses-configuation:"
2010-01-06 13:46:50 -08:00
Dianne Hackborn
cb2d50d0d6 Fix issue #2357259: aapt tool prints "uses-configuation:"
Change-Id: Id3ea3a86bd4d385441b05fcbe85b8ab62c35afff
2010-01-06 11:29:54 -08:00
Jean-Baptiste Queru
926d1a2200 am a5a8cc13: resolved conflicts for merge of ce307f88 to eclair-mr2
Merge commit 'a5a8cc13d3f906650a1eb17e20e1b26d68b78453' into eclair-mr2-plus-aosp

* commit 'a5a8cc13d3f906650a1eb17e20e1b26d68b78453':
  Add --custom-package to aapt
2009-12-10 17:57:04 -08:00
Jean-Baptiste Queru
a5a8cc13d3 resolved conflicts for merge of ce307f88 to eclair-mr2 2009-12-10 17:53:27 -08:00