History log of /frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2279b2534272282a5b5152723235da397e49195c 19-Jul-2017 Steven Moreland <smoreland@google.com> frameworks/base: use proper nativehelper headers

libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: modules using frameworks/base find headers
Bug: 63762847
Change-Id: I0f9f231acdebe460f279135462f43d3e32eff64d
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
c012ae38153dd2fe22243c7c5bc81d6f81568ae1 16-Dec-2016 Andreas Gampe <agampe@google.com> NativeLibraryHelper: Minor fixes

Skip over directories when iterating library files. Ensure correct
temp file naming.

Bug: 33668201
Test: m
Test: Device boots
Test: Manual: Install debuggable and non-debuggable apps
Change-Id: I2f0547e965d9a0c478e333a13b2db02f4eedac2c
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
d6dd6b8a613c9c91eeebde713f12f18e6cc43c1f 07-Oct-2016 Tamas Berghammer <tberghammer@google.com> Install all files from the lib directory for debuggable apps

This is required to support developer tools what want to install helper
code (e.g. scripts, executables) into the apps lib directory.

Test: manual - install debuggable & non-debuggable app
Change-Id: Ibceb827f92a09735d7c605e689e23c0cd293a6fd
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
93bb56ef1525314707dafe5c849916b1d44d15ea 11-Sep-2016 Elliott Hughes <enh@google.com> Move frameworks/base to std::unique_ptr.

Bug: http://b/22403888
Change-Id: Iae2c68b00be7cd9dd215a75cf80b16d7403f6328
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
76f6a86de25e1bf74717e047e55fd44b089673f3 19-Sep-2015 Daniel Micay <danielmicay@gmail.com> constify JNINativeMethod function pointer tables

Change-Id: I4036c924958221cbc644724f8eb01c5de3cd7954
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
957c23775f46c26142bc6d4f9a592ac4586a9ef8 04-Aug-2015 Yusuke Sato <yusukes@google.com> Let findSupportedAbi and hasRenderscriptBitcode scan only relevant files

for better performance. Without the optimization, these two functions
may check more than 100k file names in the pre-installed APK files,
which can take a few seconds to finish even on a recent device.

(cherry-pick of 34fe3df8519523dbb4bc27010fa57f259d5e868d)

Bug: 21957428
Change-Id: I5ebe0438019958d883a7fda6bd92ea4484211d23
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
407753c456c1eb2c8556ae7891b6bef43b044e76 16-Jun-2015 Narayan Kamath <narayan@google.com> ZipFileRO: Use precise widths for zip file types.

getEntryInfo crashes on 64-bit devices because "long" types
were being passed int pointers (that pointed to a stack frame)
that were reinterpret_cast'ed to long* (sigh.). To fix this issue
once and for all, use types with explicitly defined widths.

This change also removes some dead invariant checking from
Asset.cpp instead of cleaning it up.

Note that we've introduced a wart in NativeLibraryHelper, where
we need to deal with zlib's uLong type, which is "at least 32 bits
wide".

bug: 21622286

(cherry picked from commit 4600dd053dbdbd4b95f3b11057a1cc55b99f9c77)

Change-Id: I7886cb37a229cc27c625699c80e6a6a6117d2203
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
dec4688f40b0018fbd1f00db05581966f531d88f 01-Oct-2014 Dmitriy Ivanov <dimitry@google.com> Load libraries directly from apk

Introduced new 'extractNativeLibs' attribute to manifest/application.
Setting it to false prevents installer from extracting library from apk.

The default value for extractNativeLibs is true.

Bug: 8076853
(cherry picked from commit ff193d642eea7128faad837d19e347cd25212c27)
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
ed6b9dff563c5e22f040ff37e12c0d771e0478ae 21-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Consistency in core/jni

Make consistent use of core_jni_helpers for registration.

Translate some #ifdefs into const bools.

Change-Id: I37639aa053dd50f003a552cbd8550dddecc811c5
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
0f0b4919667f418b249c497f5ad3e83fdf4437e5 12-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Wall Werror in core/jni

Turn on -Wall -Werror in core/jni. Fix warnings.

Clang TODO: For GCC we need to turn off Wunused-but-set-variable in
the GL bindings. However, Clang doesn't have that warning and thus
complains about an unknown pragma. It is necessary to make the
pragma #ifdef-ed on the compiler being GCC.

Change-Id: I14cab48d45c2771eef0432082356c47ed44a3d7f
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
6e3a1c2bb27efeb717921a30c309066636a11b50 14-Jun-2014 Nick Kralevich <nnk@google.com> am 5f20e1ae: am 23315095: am 748f4b8d: Merge "update mLastSlash for gdbserver"

* commit '5f20e1ae8df262ac777944f00b685f0cf2fe4458':
update mLastSlash for gdbserver
195b23ef712c51dc8d2f3a1f1943a27054dc4e74 14-Jun-2014 Nick Kralevich <nnk@google.com> update mLastSlash for gdbserver

the gdbserver special case wasn't updating mLastSlash. Fix it.

Change-Id: I63d64bb5f543bd2df6183649cf727e830731e144
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
c32a244e907719e03d0fae42b20401dcd2c595fc 03-Jun-2014 Narayan Kamath <narayan@google.com> am dd2e9d33: am 7cb13f8a: Merge "Scan for renderscript files before deciding ABIs."

* commit 'dd2e9d3386d2d74f99f79bcad951ff5cdefa6fab':
Scan for renderscript files before deciding ABIs.
d47e38b6342fea93b007319431634a4bcfee452c 16-May-2014 Narayan Kamath <narayan@google.com> Scan for renderscript files before deciding ABIs.

The presence of ".bc" files in an APK implies
incompatibility with any of the 64 bit ABIs.

bug: 14900093

Change-Id: I66ca339a9a149cb3b7e7b349033d80acdeb4140a
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
d11f223c535ed9ce628fe5aaf0fd5692dd0cf9e4 10-Apr-2014 Narayan Kamath <narayan@google.com> resolved conflicts for merge of 286a247e to master

Change-Id: I63df9d482da3ce2ac851959223b9180020ffad0c
1378aba7aeeb7f6dd6cc2503968ba7b0e58d9333 28-Feb-2014 Ramin Zaghi <ramin.zaghi@arm.com> Re-implement native library search and copies.

We now use a two step approach :

- First we look through the list of shared libraries in an
APK, and choose an ABI based on the (priority) list of ABIs
a given device supports.
- Then we look through the list of shared libraries and copy
all shared libraries that match the ABI we've selected.

This fixes a long-standing bug where we would sometimes copy
a mixture of different ABIs to the device, and also allows us
to clearly pick an ABI to run an app with.

The code in NativeLibraryHelper has been refactored so that all
file name validation & matching logic is done in a single place
(NativeLibrariesIterator). This allows us to avoid a lot of
redundant logic and straightens out a few corner cases (for eg.
where the abi determination & copying logic do not agree on
what files to skip).

bug: https://code.google.com/p/android/issues/detail?id=65053
bug: 13647418

Change-Id: I34d08353f24115b0f6b800a7eda3ac427fa25fef
Co-Authored-By: Zhenghua Wang <zhenghua.wang0923@gmail.com>
Co-Authored-By: Ramin Zaghi <ramin.zaghi@arm.com>
Co-Authored-By: Narayan Kamath <narayan@google.com>
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
ad076286c3140ce9f1f25b8503bdfd2047a968a7 18-Jan-2014 Elliott Hughes <enh@google.com> Don't confuse stat and stat64.

Bug: 11865851
Change-Id: I45e65036d86c58943b9c273777f3f8be79a6966f
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
afd31e08299008fdc5c2813f21b2573f29dc53df 03-Dec-2013 Narayan Kamath <narayan@google.com> Reimplement ZipFileRO in terms of libziparchive.

This lets us share zip archive processing code with both
the runtime (Art, dalvik) and critical java code
(StrictJarFile).

This change also moves several utility methods to ZipUtils
and dedups code across several zip inflation methods.

One of the side effects of this change is that several
processing loops are now O(n) instead of O(n^2).

bug: 10193060

Change-Id: I3c7188496837a47246c4f342e45485a70fef3169
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
1f5762e646bed2290934280464832782766ee68e 07-May-2013 Mathias Agopian <mathias@google.com> libutils clean-up

Change-Id: I11ee943da23a66828455a9770fc3c5ceb4bbcaa9
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
a982dc05d7ca919c07f50e446549ef9dceadf6bd 23-Mar-2012 Colin Cross <ccross@android.com> frameworks/base: move Zip* from libandroidfw to libutils

ZipUtils is needed by build/tools, move it from libandroidfw
(frameworks/base) to libutils (frameworks/native).

Change-Id: I2b4b7adcdf68eb25ee7cba5dd3b69eadf0523af3
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
b13b9bdad2baf6ad1ec2e56b6b7598fa20f55fc4 18-Feb-2012 Mathias Agopian <mathias@google.com> frameworks/base refactoring.

step 2: move libutils headers to their new home: androidfw

Change-Id: I14624ba23db92a81f2cb929f104386e1fab293ef
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
fcbbaf1d837e96e77d0ec45a050e8a41060ae7f3 13-Jan-2012 Kenny Root <kroot@google.com> resolved conflicts for merge of e80341c8 to master

Change-Id: I5d2150e20aebb6aba10caa391268c0fdbbf281ef
ec193dec4d9ca2cfc8295c4becfe950a906a15ed 09-Jan-2012 Steve Block <steveblock@google.com> Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE

See https://android-git.corp.google.com/g/157519

Bug: 5449033
Change-Id: I8ceb2dba1b031a0fd68d15d146960d9ced62bbf3
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
6215d3ff4b5dfa52a5d8b9a42e343051f31066a5 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
5baa3a62a97544669fba6d65a11c07f252e654dd 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
10410fc85248ea77c2c1fbbb666c3fe4fcfef1b6 20-Dec-2011 Anthony Mazzola <m00901766@AndroidServer1.huawei.com> Fix issue with selecting proper JNI libraries

Current code will load both abi and abi2 versions of the JNI libraries.
The second one found will be the library in use. Update algorithm so
that abi2 libraries will never be loaded once we find a library that
supports the primary abi. This is consistent with the original
implementation.

Bug: 5787224
Change-Id: Ib4d30bea8316ca9bf62757c970dcc5b75cd969ec
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
71f2cf116aab893e224056c38ab146bd1538dd3e 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
1ebd74acf9977daa42133507e970dab88e08f0ef 04-Aug-2011 Kenny Root <kroot@google.com> Better error codes for missing files

Make sure that files that don't exist aren't returning bogus 'out of
space' error codes.

Add some Javadoc so I can remember what each thing does in an IDE.

Add copyright header to NativeLibraryHelper

Bug: 3375299
Change-Id: Iac46019160921daca65b21d38897e5165063316e
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
66269ea6f68f2f25888ce1080c94ac782742fafc 12-Jul-2011 Kenny Root <kroot@google.com> Move extract native libraries to JNI code

The built-in ZipFile class was quite a long time to find an unpack
libraries. Move everything to using the libutils ZipFileRO class that
goes quite a bit faster. Initial measurements are 6 times faster than
the Java code.

Also, read files off the disk and compare their CRC against the APK's
CRC to see if we need to write the new file to disk. This also cuts down
the bootup time by up to a second per APK that has native files.

Change-Id: Ic464a7969a17368fb6a6b81d026888c4136c7603
/frameworks/base/core/jni/com_android_internal_content_NativeLibraryHelper.cpp