This allows us to pass in the path to the target apk as an additional
included resource apk, allowing theme designers to reference styles
and attributes from the original package without needing to duplicate
them. Duplicating attributes never worked quite well, and causes
all sorts of issues, including crashing apps.
Instead of a theme declaring attributes, that are app specific, it
simply reference the originals. This way things like colors that
are style specific get included correctly.
Here's an example of stat_sys_wifi_signal_4_fully.xml using this feature.
By using ?com.android.systemui:attr/ we are able to reference attributes
defined in SystemUI directly in our themed resource.
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="17.25dp"
android:height="18dp"
android:viewportWidth="46.0"
android:viewportHeight="48.0">
<path
android:fillColor="?com.android.systemui:attr/backgroundColor"
android:pathData="M20.4,18.0"/>
<path
android:fillColor="?com.android.systemui:attr/fillColor"
android:pathData="M42.0,32.0l0.0,-4.0L26.0,18.0L26.0,7.0c0.0,-1.7 -1.3,-3.0 -3.0,
-3.0c-1.7,0.0 -3.0,1.3 -3.0,3.0l0.0,11.0L4.0,28.0l0.0,4.0l16.0,-5.0l0.0,11.0l-4.0,
3.0l0.0,3.0l7.0,-2.0l7.0,2.0l0.0,-3.0l-4.0,-3.0L26.0,27.0L42.0,32.0z"/>
</vector>
Change-Id: Ic00b5d91fc651a29a8c3ab341e5494107acd0463
TICKET: CYNGNOS-1645
When re-creating resource apks for themes, aapt will fail if the
apk already exists unless we use -f
Change-Id: If2c3a634aa3ca061009aa6892530d643f8f67e9f
Themes: Forward port installd
Id: I5c03bdca30d55f252d486ddac0355f41623ba8d5
Themes: Remove legacy theme support
Id: I6823a6f2735f07f8e4a25a9c0f6f297577a554ab
Access Themed ResTables from compiled theme apk [2/2]
Before this patch the ResTable for a theme/app was created and
accessed seperate from the compiled APK. Since the compiled APK
has its own copy of the resources.arsc, we can just reuse the table
in the APK instead
Id: Ib7916eba5663db5d077d33fc02623748e8a9f10c
Send target sdk version to aapt [2/2]
If vector drawables are used in a theme we must have a minSdkVersion of 21 passed
to aapt or else aapt will Segfault.
Id: Ib5ffa6d12c91d465f3a603e03b09ab03b02715c7
Change-Id: Ie14322b7efb40b270abd3d4ca1b7c5f97bf4b5ca
Do not fall back to dalvik.vm.dex2oat-threads if
dalvik.vm.boot-dex2oat-threads is not set. Also do not ever use
the value of dalvik.vm.image-dex2oat-threads. Instead use the
default behavior of dex2oat in that situation.
(cherry picked from commit 919461cbeef3e9f35388fc099a5fcdae1cb79cc6)
Bug: 24413760
Change-Id: I42e60996341414b95b8df2d243d5e07f7f5ff9b6
Expect the boot status explicitly as a parameter so that we do not
have to rely on dev.bootcomplete, which isn't meaningfully set
when the device needs the decryption screen on boot.
Bug: 23898216
Change-Id: I9b34298caf70b1e5d40970cc0d04c469016a80a7
Check dev.bootcomplete in dex2oat(). Use the information for
two changes.
Only switch to the background when we're post bootcomplete.
This will ensure better utilization after upgrades.
Add a second dex2oat-threads property that is used pre
bootcomplete. A separation of these phases allows using less
cores when the device is up, freeing up resources for other
purposes, e.g., avoid jank. The precedence during boot is the
boot property, or the image property if the former doesn't
exist, or the default property as a fallback.
Bug: 23898216
Bug: 24004256
Change-Id: I5063f3fc4b437cbe88c4e94584e01c1c78eccc4d
restorecon_data already iterates across all found users internally,
so we don't need to call it for each UID moved. In fact, this was a
bug that caused data for the owner to be relabeled when moving apps
back to internal storage.
Bug: 21813384
Change-Id: I5ba76d4f30d129365864c8a25b665f344b99a6b4
App movement now has three distinct stages: copying, scanning, and
cleanup. Previously, a battery pull late in the move process would
end up with packages.xml pointing at the old location which had been
torn down. Now, we update packages.xml to point at the new location
as the "source of truth" before we start deleting the old location.
Bug: 21831336
Change-Id: I62b8916c673265c240e2574ea968cdce5a7a0074
Previously installd removed the normal cache directory when delete_code_cache is
called. It should delete the code cache directory.
BUG=21206499
Change-Id: I5774430e389e22805fa7984b4c83420c3677ca75
Add the debug.gencfi system property that forces generation of
CFI data.
(cherry picked from commit 816243d470)
Bug: 21924613
Change-Id: Ida66f8c1567634d05cfdbba1a982be3684e94369
Given a pair of absolute paths {from_path, to_path} , check that
they are both valid apk subpaths (eg. /data/app/package/foo) and
link(2) to_path to from_path. This is required by staged installs,
where we link existing apks and oat files to their staging location.
bug: 20889739
Change-Id: I3b5e3b43677af68be59308121a4409caaa6a72f0
We now move code under /data/app/com.example when a complete move
is requested. This really only works for new cluster-style installs
that also have native libraries and OAT contained inside.
Teach measuring code about cluster-style installs when measuring
app footprint. Also offer to measure private data space for all
users.
Bug: 19993667, 20275578
Change-Id: I6df7b947cb5cc8a4552f56f4b64a661e8512389f
New "mvuserdata" command will move all private app data from one
volume UUID to another. It leverages the existing "cp" toybox
command to do the heavy lifting for all known users, preserving
details like timestamps and permissions. It invokes restorecon()
to correctly label the new location when the copy is finished.
Changes installd to no longer drop capabilities, so we run as root
again. This also allows us to exec "cp" with CAP_DAC_OVERRIDE and
CAP_FOWNER still in effect.
Bug: 19993667
Change-Id: I1f407a7c4a1af97ca5afc27b04eb16b4936cbdef
We're now parsing and passing through volume UUIDs sent across the
command socket. The "!" argument value is treated as null, which
means internal storage.
Bug: 19993667
Change-Id: I17729a769ce687a2e94e85991a6338c77ded0b66
Teach free_cache() and restorecon_data() about building per-volume
paths. Also clean up restorecon_data() by using std::string when
building paths.
Clearer names for path building utility methods, and tests to verify.
Bug: 19993667
Change-Id: Iacfbcdaa5b901cc2490bc8eba366dfdeb44f1d93
Since app data paths can live on expanded storage devices, accept the
target volume UUID when building paths. The null UUID indicates the
default internal storage.
To improve readability, start using std::string in several places,
which throws when allocations fail. For now, perform last-second
sanity checks on incoming path arguments, but we'll eventually want
to check arguments as they come through installd.cpp, instead of
crashing the entire daemon.
Also remove "lib" symlink code from install() and make_user_data(),
since we're no longer supporting /data/app-lib. The framework
already uses linklib() to create the right symlink for the selected
ISA-specific library dir.
Bug: 19993667
Change-Id: Ib9343575ffb62bf3981e19375de8f3822fc31e28
This is the minimal change needed to switch it over to C++, which
paves the way for using more robust utilities like std::string.
Change-Id: I80ed6280146875eb6ddbbb340c05450388ca13f0
Apps on expanded storage live at /mnt/expand/<uuid>/app/com.example,
so we need to relax one more directory level.
Bug: 19993667
Change-Id: I347ec7b92435ea69e632ed5d5fdfabe38ce0b56e
Previously AID_INSTALL was used, which was causing permission denied errors
when PackageManager was trying to recursively rename staging directory
Bug: 19550105
Bug: 20087446
Change-Id: I3a9e3056c1fbc1ce0077a3ce52cf77ea6b5085ee
Changes to installd:
- dexopt now allows oat_dir param for custom output directory
- Added helper method calculate_oat_file_path for calculating oat file
output location based on oat_dir and apk_path.
Bug: 19550105
Change-Id: I6b079207310583adeb6dad918a58034a059e34c4
Previously odex files were stored alongside the dex location as:
dex location: /foo/bar/base.apk
odex location: /foo/bar/<isa>/base.odex
This changes where odex files are stored, adding an "oat" directory:
dex location: /foo/bar/base.apk
odex location: /foo/bar/oat/<isa>/base.odex
See also the corresponding changes in platform/art and platform/build.
Bug: 19550105
Change-Id: I4c6be4f0c41ff175904846db8e360c4af815b265
When decrypting a device, a tmpfs is temporarily mounted as /data,
the size of which is usually small. When the zygote, system server
and necessary apps are brought up, they will be compiled into the
tmpfs.
If the system image contains prebuilts, they will be relocated instead
of compiled. This is unnecessary. In this special situation it is
acceptable to run out of the prebuilt oat files without relocation,
which can save space in the tmpfs.
This patch ensures that apps are not being relocated.
Change-Id: I42bfb7e3039574b7e4f2772e0d395f093d59ed1b
Signed-off-by: Hyangseok Chae <neo.chae@lge.com>
Add swap file support for dex2oat to installd. Only use in low-memory
mode.
Bug: 18596910
(cherry picked from commit f68ce4de7f)
Change-Id: I131448f3907115054a592af73db86d2b9257ea33
Mark 2 unused paramters to prevent clang from erroring out
Change-Id: Ifc9b4a5b820bd6318e9259e737e708d25fdb174b
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>