Age | Commit message (Collapse) | Author |
|
Protect extracted dex files from modifications by checking their crc and
modification time. In case of change, proceed to a new extraction.
Those checks are replacing the check of the zip integrity by
opening it with a ZipFile.
Test: SupportMultidexHostTest (from tradefed)
Bug: 32159214
Change-Id: I09aa01550782f5f550bee6fc91709455e82c1057
|
|
The check is unnecessary in MultiDex.install because it was already done
by MultiDexExtractor.load. The retry on bad extraction is also included
in MultiDexExtractor.load so it was redundant too.
Test: SupportMultidexHostTest (from tradefed)
Change-Id: I877a99db0e0c562ac47a7c5c87d7f3e1d70884e6
|
|
This is a poor protection from some attack against application that
would be made to overwrite their extracted secondary dex files.
The protection is poor because marking the dex files read only will
protect only some applications depending on their implementation.
Test: MultiDexLegacyVersionedTestApp
Bug: 32159214
Change-Id: I88c6fc72284f4e0b832dc4d840c9c636a1234638
|
|
|
|
Due to package install races it is possible for a process to be started from an
old apk even though that apk has been replaced. Querying for ApplicationInfo by
package name may return information for the new apk, leading to a runtime with
the old main dex file and new secondary dex files. This leads to various
problems like ClassNotFoundExceptions. Using context.getApplicationInfo()
should result in the process having a consistent view of the world (even if it
is of the old world). The package install races are eventually resolved and old
processes are killed.
Test: Passes Google Play services tests
Change-Id: I95257d851eb678c55a19e731183f7add2b540615
|
|
Temp files are removed unconditionally in a finally block following extraction.
However, if the process is killed during extraction this finally block will not
run. Because temp files started with extractedFilePrefix, they wouldn't be
cleaned up in prepareDexDir(). This change ensures that prepareDexDir() will
remove any existing temp files before extraction begins.
Bug: 27769642
Bug: 33718827
Test: Passes Google Play services tests
Change-Id: I803ba2c7234801551d36cbbe2941eeaa986d31f8
|
|
- Stop collecting build id and version to allow better behavior with
incremental builds.
- Make it resistant to git errors.
Test: mm
Change-Id: I03b1e36048f92f50227cfc0e370454438bee31cf
|
|
Test: mm
Change-Id: I70c50b5b9fe7f06b0adde5616590aec24b6d0dff
|
|
Bug: 30076851
Change-Id: I6a148d0038baebfcfb987bf3ca498a0acf5d106c
|
|
This prevernt multiple processes of the same application from
simultaneously caching the same secondary dex files.
Bug: 27263431
Change-Id: If78ce2d2c5a37a3299b2bb3fa598a3ddd6acb7dd
|
|
On API 19 and 20, the library was trying to save "suppressed exceptions"
in the loader.dexElementsSuppressedExceptions but the field is not
there, it's in DexPathList, so the correct path is
loader.pathList.dexElementsSuppressedExceptions.
Bug: 28808797
Change-Id: I549e2120e744345a86df2f588f03823d9dfab659
|
|
* commit 'f9f54ac65185338b2726a9c6b9d791c5994c38e2':
Use Context.getFilesDir as a backup dex location
|
|
* commit '606af94785cb96d418d87fe5a90bb2e09ccfa97f':
Use Context.getFilesDir as a backup dex location
|
|
On some devices it seems impossible to read or write the application
data directory. There, creating code_cache at the proper location is
impossible. In this case fallback to the 'files' directory. This may
lead to not cleaning the useless extracted secondary dex files if one
such devices is ever updated to L.
Bug: https://code.google.com/p/android/issues/detail?id=79388
Change-Id: I4b6725572f10fd511992dc8a5043d2f135abd3a5
|
|
(cherry picked from commit 805db15e4d7baa57062ad08fb03eeac8691475c8)
Change-Id: I4cae9fa3ba272690461c29bf8d9779350b99ae52
|
|
Change-Id: I807ab1791b1704b5b2ec48c608ac474e0d2b7850
|
|
* commit '8c2abf7f471b061b737e700af711e9d5d6883b40':
Workaround mkdirs concurency problems
|
|
Use only mkdir since our usage is a simple case.
Bug: https://code.google.com/p/android/issues/detail?id=79388
Change-Id: Iab7504f3c38c660f93ab1249895be454af5ff84d
|
|
This is mostly a copy of the support libs' gradle files,
in order to generate a support library that will contain
the current public versions + the new version being built.
Change-Id: I4937073909206653bd0ffd128694161cf59445a9
|
|
To allow automatic configuration when using Jill/Jack.
This is a temporary change untill Jack and Jill are fully
integrated into the SDK build tools.
(cherry picked from commit f50beca07827921e005ce6825bbc874a843f91e1)
Bug: 18112662
Change-Id: I8b9292b05c90d790edade62ac682dba35e7d3e96
|
|
To help compilation with jack of applications using a multidex library.
(cherry picked from commit 2921acf84ac6114a6e600b7ab0237d835ef9e43f)
Bug: 18112662
Change-Id: I0f7535ba859859ec30fc6a07447f1075e7b4deb0
|
|
By explaining the full story in README.txt.
By inlining API 11 constants so we can really compile the library against API 4.
(cherry picked from commit e99daea7a3aec5ffac13b4283685e8d2a5994ad9)
Bug: 18112662
Change-Id: I03a4d5f773bebbe09fcde04a340bdf8abfdbc068
|
|
The version data is kept in a small resource file.
(cherry picked from commit 6d70d23facddf0e780cfb08a7f9af94da510bf96)
Bug: 18112662
Change-Id: I174145a4e93463b0106d45ae86e6dba1be8715e8
|
|
To allow automatic configuration when using Jill/Jack.
This is a temporary change untill Jack and Jill are fully
integrated into the SDK build tools.
Change-Id: I4ee88cb0191211d79f71f305ac7a42e357ec63c2
|
|
To help compilation with jack of applications using a multidex library.
Change-Id: I6502212b9e0a04360d74d88db933f9b58eff974d
|
|
By explaining the full story in README.txt.
By inlining API 11 constants so we can really compile the library against API 4.
Change-Id: I423e807114c15805e97860ff5db22ef9ff1e24c0
|
|
The version data is kept in a small resource file.
Change-Id: I3de1a28fee68726121f3738791439bc315623ed7
|
|
This should allow an automatic cleaning when updating to L without having to
check at each launch.
Bug: 10447095
(cherry picked from commit 590a07e63868f0a1da311ff22b4a9f35eb48a865)
Change-Id: I90b80c0c196b5da2b63bced30b2ba5e93ecb594a
|
|
This should allow an automatic cleaning when updating to L without having to
check at each launch.
Bug: 10447095
Change-Id: I3c0ecc1430ced4592f630ec4c6d8a1a2219e8141
|
|
There may be a need for clearing those unused extracted files after an OTA
bringing Art L on the device.
Bug: 10447095
Change-Id: I80b9c0afa2bd8dfa0cf04e96fb04ba2527da0fe5
|
|
|
|
It was decided that it would be the revision of multidex native support and
that it is the criterion that should be used to discriminate between VMs
capable of multidex and others.
Bug 14238145.
See bug 10447095 for discussions about the deactivation criterion.
Change-Id: I50922972d1d5b3019a111d5a1b4f2f18af9713ed
|
|
frameworks/multidex/library does not stand alone as a gradle project
and should always be inheriting these values from the parent build.
Change-Id: I10eb64f2ad38d0bf278d5300e26a637c481b9b00
|
|
Change-Id: I602f362ef9fb7a7eb88fea05052152b0b45a4c6e
|
|
|
|
The class loader is the same in KK (API 19) & KKWT (API 20), so only
a version bump was needed.
Change-Id: Ib5112e60c9a54ed042e9c71b075ecb5302c1b717
(cherry picked from commit b420940060dbce01a861760d5830416d0e9bb802)
|
|
Change-Id: I0600b6f75005881c549150ea2e0b18800747bf73
|
|
Reduces load time if extraction was already made. It appeared that
new ZipFile was really slow because it's preparing much things as
soon as it's instanciated.
The new criteria consist of the last modified time of the apk plus
the crc of the apk's central directory, last modified time should
be enough for nearly all modifications and the crc is here to try
to handle an OTA mixing with dates.
The transition from old criteria to new should be good: since there
will be no stored values they would be detected as a new installation.
Change-Id: Id390b77b03d794b8b7feb91eb0daae1126c6d691
|
|
|
|
Multidex installation in Application.attachBaseContext()
requires only one call point to MultiDex.install() per Application
so let's provide a default multidex capable Application.
Change-Id: Icfa1993c4b3d7c5a7d1783d4ca6d5b9ea31adb8b
|
|
Change-Id: I5bd149acf7ad8efeadfd6ede018503a4dfba6e31
|
|
The bug was caused by a comparison of Long instances instead of long
values and was leading to the library always detecting that the
secondary dex files needed a fresh exctraction.
bug 12776578
Change-Id: Ia7056a130cf6e99094e4f456b086e141c1255725
|
|
Change-Id: Idb9442556122d83f2277aceb79101f4f53e4c632
|
|
The file deletion when finding that the source apk file size
was different than what was stored in SharedPreferences causes a race
condition when multiple processes are executing this code, where one
process could erase the secondary zip file while a different process had
already started to create the zip file. This check is unnecessary and
has been removed.
Also, changed the parameter for getting the SharedPreferences to
Context.MODE_MULTI_PROCESS, which forces a re-read of the key/value
pairs from the file.
This should also fix the original bug b/12550057.
Bug: 12594955
Bug: 12550057
Change-Id: I53f4bca0d03a5737d802509274520a78effcf228
|
|
This addresses an edge case where the secondary dex is not reloaded
when it should because of an OTA due to the modification time of the
PrebuiltGmsCore.apk in the system image is never different even though
PrebuiltGmsCore.apk may have changed in the OTA. This performs two
checks, the first is that the overall size of the apk is the same.
The second is to check that the number of dex files are the same, and
the CRC values of the dex file zip entries are the same.
Bug: 12550057
Change-Id: I526f6b88cfc7957840b0c35aaad0eab0cd776f7e
|
|
Change-Id: Ic6f8689c68c7bc79bf831441008ae6d08d58e91d
|
|
Bug: 11895788
Change-Id: Id4f6e5b09be809eeb29367bebe78c03e49864cbf
|
|
This CL is to be reverted when debug is done.
Change-Id: I47f2464a4b32affe2d63f874a1df3f8f24e569d5
|
|
Also, removed the file locking which had no effect.
Bug: 11895788
Change-Id: I8b520fff9496f289eba88690b3b583f9c43b932c
|
|
Change-Id: I548dd046f89d937f974cb5a925de70c7ecfad7a4
|