Age | Commit message (Collapse) | Author |
|
ZFile now reports when files overlap in a zip. It previously
failed with a VerifyException and now, at least in cases where
the local header can still be read correctly (for example, a
file contained inside another file), it reports a nice error
that allows users to understand what the problem is.
Bug: 69835362
Change-Id: Ib34df31f97805f1d5ec9ba917dce7374ea6a7d22
Test: included
|
|
When opening the zip file in read-only mode the file is never modified
and any attempt to modify throws IllegalStateExeption.
Test: included
Bug: 62249349
Change-Id: I5e589502dfd4d8d112bc563d7ed28291143ec5ea
|
|
If the extra fields has a header with data size that exceeds the available
buffer, ExtraField would throw a buffer underflow instead of IOException
and this would not be caught in ZFile's update.
Test: included
Bug: 68763077
Change-Id: I34db018526c8cd3a2bc3ebf6fb97604ed941ddfa
|
|
Test: not needed
Change-Id: I803c44cb78331a5df60c5d75fb96e0713aa85c0a
|
|
This improves tests for 4-byte alignment and does some small code
cleanup to make the reason why we need 6 bytes of header for 4 byte
alignment more clear.
Bug: http://b/67995001
Test: Included
Change-Id: I12148519bb360c3b71e97d880f31f111c4feb4aa
|
|
Made two minor fixes in EncodeUtils to remove Error Prone warnings
and to get rid of a while(true) with a recursion loop that
(reasonably) makes developers nervous.
Test: no changes needed
Bug: http://b/38159772
Change-Id: I12a5cf2310ded05bd2ca2f0565324a7d99331b70
|
|
Test: included
Bug: 67995565
Change-Id: I1984fce4f96fa82eae0dad6fd8dde05720bfeda1
|
|
Set the android.enableD8 to true by default.
This CL also improves the error logging when
using D8.
BUG: 67226453
Test: existing
Change-Id: I1eb9d9382a0c15d293ecd96e29bae7456b5f49d5
|
|
When merging a zip into an apk, apkzlib used to copy all
the non-ignored files from the zip as-is. This was done to
improve performance as it avoid recompressing files that
were already compressed.
However, if the files need to be uncompressed (for example,
native libraries in M+ devices), this would not ensure that
the libraries were uncompressed: if the libraries were
compressed in the original zip file, they were copied
as-is, i.e., compressed, to the apk breaking alignment.
This CL fixes this by ensuring that files that *need* to
be uncompressed (and only those) are actually added to
the apk following compression and alignment rules.
Test: included
Bug: http://b/37926537
Change-Id: I69848b37ef33b4f0af07dde8c778c7823443d55b
|
|
Original change: Icc60a18fd6850ab10bddb297fe7754f81f53809c
This reverts commit 493e54f4aae54dec2e143a6835d260ce97c479ec.
Test: existing
Change-Id: I64864622e4c0d21fef4aee8ca8bfd313b0a49b38
|
|
This reverts commit 213b2542e6a1940e06798333737512bfa07c744f.
Reason for revert:
This breaks instant run e.g.
Failure to verify dex file '/data/app/com.example.myapplication-2/split_lib_slice_1_apk.apk': Bad checksum (d6872a46, expected 31c62a46)
I am reverting this change until I figure out what is wrong.
Change-Id: Ica212868c99952f424d982e44561b282e591fa1c
|
|
provide ability to run wit the WorkerExecutor as well as plain old Executor.
remove the double locking effect of locking the file cache when dexing which
lead to numerous deadlocks. Provide only one level of multiplexing by sharding
all .jar files and folders and further bucketizing into 5 shards.
Test: adapted existing unit tests, added new ones for new code.
Change-Id: Icc60a18fd6850ab10bddb297fe7754f81f53809c
|
|
Test: existing tests
Change-Id: I6ab471879d816173534d90024ba20ec1abecde50
|
|
If ASCII decoding fails, ZFile will now automatically try
UTF-8.
Change-Id: I29ef2cf3c043cf31d6c07c70271297356d2571f2
Test: Included
|
|
As some annotation processors output resources.
This also updates various instant run components to properly detect if
there were changes rather than assuming that if transforms ran that the
changed inputs were interesting.
Test: AutoServiceTest.
Issue: https://issuetracker.google.com/37140464
Change-Id: I614f48cd52e65d35a5d1c188fce9357c37e1208e
|
|
Test: None needed
Change-Id: Iad0fc1b13d7521a2ddfada2ba27392d8d78d207e
|
|
https://www.google.com/url?sa=D&q=http%3A%2F%2Fgo%2Fjava-style%23s4.8.3.2-array-declarations
Test: Not needed
Change-Id: I1788dd8acd7cdd675914b4835fcf014d2b41bfea
|
|
go/lsc-require-executor-for-futures
Change-Id: I8e111ace95cf6317d5ccbf340528f29782ff0421
Test: Not needed
|
|
When opening a V2 signed APK, ZFile would force the file
to be marked "dirty" when setting the extra offset for the
central directory required by V2 signature. This would
force the zip to be written.
Test: included
Change-Id: I799c1b7dd3a927591e9d3ed410494bfa0b33300b
|
|
This depends on an updated aapt2 prebuilt.
Test: existing gradle integration tests.
Bug: 36165697
Change-Id: I1d0dbf2853db4111417421ebf0591659671e7b14
|
|
studio-master-dev
am: fe8a72b490
Change-Id: I8c342193ac8b76f0870e21a927b9b2e874d72e64
|
|
Test: Compiles with bazel.
Change-Id: I784bdf60ea336665e364601b94cb1327fe4539b3
|
|
am: 9a5309c7a2
Change-Id: I92b700f615382582c52140dbe107a52d4e2d4fff
|
|
ZFile did not support updating a zip that required aligning
an entry using the extra field if the previous entry had an
extra field that was non-empty but did not match the
format in the spec. With this update, the contents of the
extra field are discarded if they cannot be parsed.
http://b/35841603
Test: Included JUnit.
Change-Id: I977269b0648cd1b3fb7629929e02b9a00f2f0bbf
|
|
Test: cd tools && ./gradlew javadoc
Change-Id: I61a4d788894aa76c2506b1fa9f529e418ce1e6ac
|
|
|
|
Added IncrementalFileManager and associated classes. This
class is capable of doing a perfect incremental merge of
sets of relative files into a destination file, keeping
track of where information came from. It makes java res
merging incremental.
Test: Included
Change-Id: Iddc28655bb00e7859ebd9b5dc04093f6d886ea05
|
|
In the PackageAndroidArtifact, when receiving a Zip64 not handled
exception, we will copy the zip64 file into a new one stripping all
the .class files. This should hopefully generate a much smaller
Zip file that's below the 64K limit.
Bug : b.android.com/232803
Test: added unit tests.
Change-Id: I536568dd86a4015a8dbc2fdfd8c896c2c4831543
|
|
ZFile does not support writing zip entries with data
descriptor since it is silly in the use cases ZFile is
supposed to be used.
However, when opening an existing zip and changing
entries, such as sorting or aligning entries, it may
happen that some of the sorted entries have a data
descriptor and writing them is unsupported.
This CL fixes this by removing the data descriptor from
all entries when the zip file is open for writing.
Test: JUnit tests included
Change-Id: Ifa4d11218d6c22701b784c879367da454d6322fc
|
|
Non-critical errors are now reported to an optional verify
log instead of failing to open the zip. By default the
verify log just discards messages, but a verify that keeps
them is also provided.
Test: junit tests updated
Change-Id: I74dd88a69035586d588b2343c04173b96a08c8c3
|
|
Standardize field names and some minor comment issues.
Test: No tests needed
Change-Id: Ia2fd816d913239f73640656069ba9ae82e09f08a
|
|
Add an option to ZFile to ignore the "version to extract"
in the central directory header and in the local header.
This allows supporting some zip tools that write weird
values in the field.
Test: JUnit tests included
Change-Id: If8f14737ddb50f30508937e13f376cb30bde71e2
|
|
This switches the new APK build pipeline from its own logic for
signing APKs to the logic provided by DefaultApkSignerEngine primitive
from apksig library.
The switch to apksig library also fixes two bugs in the APK signing
pipeline:
1. digests of named sections of MANIFEST.MF are now correct in .SF
files, and
2. signatures of DSA-signed APKs will now verify on Android platforms
with API Level 8 and lower.
Test: ./gradlew :base:integration-test:test --tests *SigningTest
Test: ./tools/base/bazel/bazel build //tools/base/build-system/builder:builder_maven
Bug: 31060257
Bug: 31306164
Change-Id: I742c1362a9eff63dc009a5419636041341cf7309
|
|
The new IncrementalPackager is still only used in full
mode as the task does not have usable incremental inputs.
Change-Id: I08acf23b6609173a14e1fc7f9082e3ebf5e4c2a8
Test: Refactoring, no new tests needed.
|
|
Test: Ran bazel build
Change-Id: Iea73e46d3fd090bead2978f4960722cff59bcaaf
|
|
This method was introduced in guava 18, but the new version of
gradle still uses 17. The equivalent method in guava 17 has
been deprecated in guava 18 so there is no way to have this
working in both 17 and 18 without using the deprecated
method.
This fixes the dilemma by removing guava's call :)
Test: Unnecessary
Change-Id: I4469216f27f91ed8be10d88102454e32cdab4660
|
|
Test: Included
Change-Id: I9cce74b77719003875deaa5a0056e35f2930429e
|