Commit graph

1224 commits

Author SHA1 Message Date
Elliott Hughes
498163c28a Merge "Remove more dead code."
am: 0c2dab9adf

Change-Id: I52dbcba34d893573b3452c7b084af8840e5c1ec1
2019-08-08 12:40:55 -07:00
Elliott Hughes
1547e4a316 Remove more dead code.
Test: treehugger
Change-Id: I2b7f606241cde2c2743d8021fad00d30f7e0b0de
2019-08-07 14:52:16 -07:00
Tom Cherry
306ca15d79 Merge "Add reserved AID ranges for all partitions"
am: 2a0a0810a1

Change-Id: I639c3ed66293da360318b5979480c1def45f1955
2019-07-15 16:32:41 -07:00
Tom Cherry
2a0a0810a1 Merge "Add reserved AID ranges for all partitions" 2019-07-15 23:19:41 +00:00
Justin Yun
e0b1eb8d65 Merge "Rename product_services to system_ext"
am: 6da50e319c

Change-Id: If9eaecca2382b3ace74ae721e80d51c79bb9b0fb
2019-07-11 00:15:28 -07:00
Tom Cherry
3ceea099f3 Add reserved AID ranges for all partitions
With Treble and Mainline, each partition needs to be able to
independently define its own set of AIDs and therefore needs its own
AID range to not conflict with updates made to other partitions.

This includes the system partition in the case of vendors making
additions to it.  Bionic will always have the hardcoded list of
platform AIDs in its own reserved list.

Bug: 73062966
Test: can load AIDs from partitions other than vendor
Test: bionic-unit-tests

Change-Id: I6509acc555cd28b421b9edaf3f8006bad6c56125
2019-07-10 13:45:53 -07:00
Justin Yun
7eaf9b58ec Rename product_services to system_ext
Update ld.config.txt and init.

Bug: 134359158
Test: make && check boot and ld.config.txt file
Change-Id: Ie1dce42e690414fb45b26759506ea7f64d06740d
2019-07-09 23:34:17 +00:00
Tom Cherry
073c1d442c Merge "Actually make fs_path_config / fs_path_config_from_file private" am: 20670249d0
am: a4754b12c4

Change-Id: Iedd8078ee67055f4b88393de4c9b8f42f8c39fef
2019-06-24 14:37:04 -07:00
Tom Cherry
68debff5ec Actually make fs_path_config / fs_path_config_from_file private
No one outside of libcutils is using these structs and we don't want
to leak them as they are private.

Test: build
Change-Id: I1c95564a9843c9155a333334008cbff7c7ff1f51
2019-06-20 23:34:30 +00:00
Tom Cherry
bc876255f7 Merge "Remove fs_config endianness functions" am: 9b229069fb
am: 2a43e8ffb7

Change-Id: I76dd185d3034387b347119c6136620c3409e7ea6
2019-06-20 15:10:31 -07:00
Tom Cherry
ad13c88ee2 Merge "Remove fs_config_generate()" am: 45f79b1c3b
am: b9ef822307

Change-Id: I2d451687cdfef481ec4c222cbdef584fa0b6bfbd
2019-06-20 15:10:14 -07:00
Tom Cherry
5550d4e90f Remove fs_config endianness functions
We don't support big endian on Android.

Test: build
Change-Id: I4278ecc139b0ffeba63cf7b3a43b1ce9e858e741
2019-06-20 16:35:50 +00:00
Zhijun He
f17089d834 Revert "libprocessgroup users use libcutils"
am: 5360a8492d

Change-Id: I505e0a9aa120531f6190b328a0dc9a9f79eb473a
2019-06-18 22:50:46 -07:00
Zhijun He
5360a8492d Revert "libprocessgroup users use libcutils"
This reverts commit 1ec3b78b67.

Reason for revert: breaks all camera use cases

Bug: 135568875

Exempt-From-Owner-Approval: revert, no build cop

Change-Id: Iec8e1f94f5bedced3f3faf73f851fd2f13e2e768
2019-06-19 05:25:07 +00:00
Steven Moreland
d0b343973c Merge "libprocessgroup users use libcutils" into qt-dev
am: c99582dc51

Change-Id: Ib150bad71b461c71355467ea0f21d5cebc3f7633
2019-06-18 16:48:52 -07:00
Steven Moreland
1ec3b78b67 libprocessgroup users use libcutils
libprocessgroup symbols are being moved into libcutils in order to
optimize linking/memory usage. libprocessgroup will no longer be
required in the future (however removing references to it will come
separately).

Bug: 135145426
Test: boot

Test:
BEFORE:
$ adb shell showmap -a $(pid hwservicemanager) | grep -P "libprocessgroup|libcutils" -A1 | grep -P 'libprocessgroup|libcutils|\.bss' | awk '{s += $9}END{print s}'
28

AFTER:
$ adb shell showmap -a $(pid hwservicemanager) | grep -P "libprocessgroup|libcutils" -A1 | grep -P 'libprocessgroup|libcutils|\.bss' | awk '{s += $9}END{print s}'
12

Change-Id: I10d7c2d2b2b14cbbe0a128b9156d31206419d24c
2019-06-18 22:03:54 +00:00
Tom Cherry
55fe01db69 Remove fs_config_generate()
We replaced creating the binary fs_config files with a python script
(/build/make/tools/fs_config/fs_config_generator.py), so there are no
more users of this function, nor do we plan for there to be.

Test: build
Change-Id: I49ec7e3d22c206bc250cbda6f66a4a59e47030e9
2019-06-17 13:40:31 -07:00
Bowgo Tsai
1d0e2be724 Merge "Moving /odm/build.prop to /odm/etc/buid.prop" into qt-dev
am: b36b54cf79

Change-Id: Iaa42e2c76c794b6c94a69961421834956c04ff65
2019-05-22 21:07:57 -07:00
Bowgo Tsai
3182ea132e Moving /odm/build.prop to /odm/etc/buid.prop
In device root directory, we have the following symlinks:
  - /odm/app -> /vendor/odm/app
  - /odm/bin -> /vendor/odm/bin
  - /odm/etc -> /vendor/odm/etc
  ...

This allows the Generic System Image (GSI) to be used on both devices:
  1) Has a physical odm partition, where those symlink will be hidden
     when /odm is used as the mount point
  2) Has no physical odm partition and fallback to /vendor/odm/.

We can't just have the symlink /odm -> /vendor/odm, because the former
devices won't have /vendor/odm directory, which leads to mount failure
when the mount point /odm is resolved to /vendor/odm.

The existing /vendor/odm/build.prop won't be loaded in the latter
devices, because there is no symlink
    - /odm/build.prop -> /vendor/odm/build.prop.

Note that init blocks reading through direct symlinks (O_NOFOLLOW) so
the above symlink won't work either. This CL moves the odm build.prop
to /odm/etc/build.prop for init to load it (symlinks in earlier
components of the path will still be followed by O_NOFOLLOW).

Bug: 132128501
Test: boot a device and checks /odm/etc/build.prop is loaded
Change-Id: I0733c277baa67c549bb45599abb70aba13fbdbcf
Merged-In: I0733c277baa67c549bb45599abb70aba13fbdbcf
(cherry picked from commit c49655b2a4)
2019-05-22 16:15:44 +08:00
Bowgo Tsai
9fc8dcf517 Moving /odm/build.prop to /odm/etc/buid.prop
In device root directory, we have the following symlinks:
  - /odm/app -> /vendor/odm/app
  - /odm/bin -> /vendor/odm/bin
  - /odm/etc -> /vendor/odm/etc
  ...

This allows the Generic System Image (GSI) to be used on both devices:
  1) Has a physical odm partition, where those symlink will be hidden
     when /odm is used as the mount point
  2) Has no physical odm partition and fallback to /vendor/odm/.

We can't just have the symlink /odm -> /vendor/odm, because the former
devices won't have /vendor/odm directory, which leads to mount failure
when the mount point /odm is resolved to /vendor/odm.

The existing /vendor/odm/build.prop won't be loaded in the latter
devices, because there is no symlink
    - /odm/build.prop -> /vendor/odm/build.prop.

Note that init blocks reading through direct symlinks (O_NOFOLLOW) so
the above symlink won't work either. This CL moves the odm build.prop
to /odm/etc/build.prop for init to load it (symlinks in earlier
components of the path will still be followed by O_NOFOLLOW).

Bug: 132128501
Test: boot a device and checks /odm/etc/build.prop is loaded
Change-Id: I0733c277baa67c549bb45599abb70aba13fbdbcf
Merged-In: I0733c277baa67c549bb45599abb70aba13fbdbcf
2019-05-22 06:03:34 +00:00
dimitry
d2231d0e2d Merge changes I8186718c,I8d6f33e9,I56fe5e11,Ie4004c98,I531d3d60, ... am: b26696e2dd
am: f7e9467a31

Change-Id: Iaf243bead1df42205b8c7b35f6336e5b664c45aa
2019-05-21 02:24:56 -07:00
dimitry
051d5cba80 Enable native_bridge_support for libcutils
Android build system added support for building translated binaries
used on natively bridged targets (arm on x86 for example).

However in order to avoid building unnecessary binaries and libraries
for such architectures most modules do not support native bridge by default.

All needed modules have to explicitly indicate if they may be used as part
of translated binary build.

This change enabled native bridge support for libcutils which is a
greylisted library (available for apps targeting Android version < N).

Bug: http://b/77159578
Test: make
Change-Id: I56fe5e11a884d22714cfc4afb78bec0a352d6370
2019-05-16 14:17:00 +02:00
Tom Cherry
d0dc22e467 Merge "Add default executable permission in odm/bin" am: 766e878253
am: ede9bb5b37

Change-Id: I0d2817f128f8acaec5356b42b80d43ef0b8ac947
2019-05-08 08:56:03 -07:00
Tom Cherry
766e878253 Merge "Add default executable permission in odm/bin" 2019-05-08 15:31:28 +00:00
Tom Cherry
6836c9a24b Merge "Remove sbin from fs_config.cpp" am: 26ec31ce8d
am: c6c4fbe805

Change-Id: I8a8d4742a03df2bf475c6a4a7c7350cff7638470
2019-05-07 23:59:51 -07:00
Tom Cherry
2f74a26a2d Remove sbin from fs_config.cpp
There is no longer a /sbin on Android.

Bug: 73660730
Test: build
Change-Id: I3f5ce292790392a02aa4a1c661f44b4c7e1570dc
2019-05-07 10:21:05 -07:00
Min Yun
a8eb00720c Add default executable permission in odm/bin
In odm's binary files can't have executable permission.
Add default executable permission in odm/bin and vendor/odm/bin.
Previously partitions that except system, only appeared in
system partition if product haven't separated partition.
After support ODM, vendor/odm should considered.

Bug : 124465978
Test : Check each file's permission.
system/vendor/bin/* -> 0755
system/product/bin/* -> 0755
system/product_services/bin/* -> 0644
system/oem/bin/* -> 0644

vendor/odm/bin/* -> 0755
vendor/product/bin/* -> 0644
vendor/product_services/bin/* -> 0644

Change-Id: I5cee48474fceaf73853b2013d58017bd64953d86
2019-05-07 14:04:23 +09:00
Tim Murray
41f261df25 Merge "cutils: add ashmem_init" am: 55ba959c13
am: 3d213c39e8

Change-Id: Ib9335109c0226c34dce479ee56a5f231d23f8d19
2019-04-05 03:02:02 -07:00
Tim Murray
8879ed7f2a cutils: add ashmem_init
Add a new ashmem_init function that only dlopens libashmemd_client.
This allows the library to be preloaded in the zygote.

Test: boots, works
Bug: 129543489

Change-Id: Ie106791edf381654f085203c266c9f9c0df35cfc
2019-04-04 17:30:25 -07:00
Tim Murray
943f1c1d4a cutils: add ashmem_init
Add a new ashmem_init function that only dlopens libashmemd_client.
This allows the library to be preloaded in the zygote.

Test: boots, works
Bug: 129543489

Change-Id: Ie106791edf381654f085203c266c9f9c0df35cfc
2019-04-05 00:28:05 +00:00
Yifan Hong
25d42eeaa6 Merge changes from topic "libprocessgroup_rc"
* changes:
  CgroupSetupCgroups -> CgroupSetup
  Add libcgrouprc to ld.config.*.txt.
  libprocessgroup: use libcgrouprc to read cgroup.rc
  libprocessgroup_setup: use libcgrouprc_format
  libprocessgroup: Move CgroupSetupCgroups() to libprocessgroup_setup
  libprocessgroup: Add libcgrouprc
  libprocessgroup: Add libcgrouprc_format
2019-04-03 19:08:51 +00:00
Yifan Hong
bd5853cb48 Merge changes from topic "libprocessgroup_rc"
* changes:
  CgroupSetupCgroups -> CgroupSetup
  Add libcgrouprc to ld.config.*.txt.
  libprocessgroup: use libcgrouprc to read cgroup.rc
  libprocessgroup_setup: use libcgrouprc_format
  libprocessgroup: Move CgroupSetupCgroups() to libprocessgroup_setup
  libprocessgroup: Add libcgrouprc
  libprocessgroup: Add libcgrouprc_format
2019-04-03 16:41:21 +00:00
Yifan Hong
53e0deb7b2 libprocessgroup: use libcgrouprc to read cgroup.rc
Use the LL-NDK library to read cgroup.rc.

As a side-effect, the CgroupController class is changed
to a wrapper of ACgroupController* from the library. The
class itself essentially becomes the pointer, and can be
trivially copied. Modify all client code for this change.

Test: builds and boots
Bug: 123664216

Change-Id: I635d9885db62e82f37421f6d20f59c84a6f4cbb2
Merged-In: I635d9885db62e82f37421f6d20f59c84a6f4cbb2
2019-04-02 22:31:57 -07:00
Elliott Hughes
15e370aced Merge "libcutils: android_reboot command should be unsigned." am: e3ec16b9c6 am: cf2f309cff
am: ba78d39cdc

Change-Id: I034c780c6c1166e4c6643ebcc607d3388246ebab
2019-04-02 19:52:28 -07:00
Treehugger Robot
e3ec16b9c6 Merge "libcutils: android_reboot command should be unsigned." 2019-04-03 01:19:06 +00:00
Yifan Hong
fad638c82d libprocessgroup: use libcgrouprc to read cgroup.rc
Use the LL-NDK library to read cgroup.rc.

As a side-effect, the CgroupController class is changed
to a wrapper of ACgroupController* from the library. The
class itself essentially becomes the pointer, and can be
trivially copied. Modify all client code for this change.

Test: builds and boots
Bug: 123664216

Change-Id: I635d9885db62e82f37421f6d20f59c84a6f4cbb2
2019-04-02 17:34:37 -07:00
Nick Kralevich
eed675688d Merge "Revert "relax /system/bin directory permissions"" am: 98880af580 am: 88b15b2b7c
am: 6b38459ee5

Change-Id: I44ec7363697f52ee55284343f4f4f473b34de9ab
2019-04-02 15:05:19 -07:00
Elliott Hughes
66e5ae0f5a libcutils: android_reboot command should be unsigned.
Hex literals have the type of the first type they fit in. The reboot
constants are large enough that that's `unsigned` rather than `int`.

Bug: http://b/76110968
Test: treehugger
Change-Id: Iac4fe61d1fe572297febf0b57e34d698942469f9
2019-04-02 09:19:46 -07:00
Nick Kralevich
8d1b43bbf4 Revert "relax /system/bin directory permissions"
It appears Chase has fixed their app, so we no longer need to keep these
permissions relaxed.

This reverts commit 53842f8a90.

Bug: 119605322
Test: compiles and boots
Change-Id: Iba5e9ecd685eb386997a5e92638b8a1b5943ad4b
2019-04-02 08:54:17 -07:00
Steven Moreland
6e10e67eaa Merge "libutils/libcutils: make host more like device" am: 43f29072a9 am: 02bb6c1b24
am: 775ed88ddd

Change-Id: I6d9a2c90499622ad61046b3c222f8cb9d688bd16
2019-03-29 17:49:56 -07:00
Steven Moreland
43f29072a9 Merge "libutils/libcutils: make host more like device" 2019-03-29 23:05:20 +00:00
Steven Moreland
e6132be529 libutils/libcutils: make host more like device
Having shared host libraries allows libraries depending on these to use
'shared_libs' for these. This simplifies configurations since these
libraries don't have to specify 'shared_libs' on all non-host targets.

Bug: 124524556
Test: build only

Change-Id: I09fb4a4fb66ea0a87cb76b1e6f400c537a11f082
2019-03-28 18:44:32 -07:00
Yifan Hong
82faf0949f libcutils: android_get_control_file uses realpath. am: dd6eefca30 am: 877436dd25
am: 353d08605d

Change-Id: Ia22a3af3de76eace5f8cb6e58ebc2a8c9d59437f
2019-03-26 16:37:24 -07:00
Elliott Hughes
ae2c2c5770 Merge "Clean up some mess by only building Android-specific code for the device." am: 443fdb2fdc am: 0fa7eddc31
am: 870413d411

Change-Id: I5ea2a7cf59c8ce5b7bc0a970237df17a69d08056
2019-03-25 09:43:43 -07:00
Yifan Hong
dd6eefca30 libcutils: android_get_control_file uses realpath.
If the path to android_get_control_file is a symlink, the final sanity
check will fail that the fd does not have the same path as the given
file. We can't expect callers to readlink() because this would change
the environment key. Instead, try to call realpath on both paths.

Bug: 126233777
Test: lpdump
Change-Id: I0df10d7dbe3e572b8335faad812e5cd80bff1733
2019-03-21 16:00:00 -07:00
Elliott Hughes
7acb0d39e8 Clean up some mess by only building Android-specific code for the device.
Test: treehugger
Change-Id: Id44721ccd1817d8c537b226f60a58b7cb691fb01
2019-03-21 14:59:45 -07:00
Roland Levillain
00c6d45ee9 Merge "Remove Valgrind entries from fs_config." am: e61d5ccf47 am: 710264b43b
am: 6ab844e1fe

Change-Id: I8ab7dcf37ed09045bfe9efe14a93048d6966c74e
2019-03-14 06:43:13 -07:00
Roland Levillain
3f3e2c678e Remove Valgrind entries from fs_config.
Valgrind has been removed from the Android tree in 2018.

Test: n/a
Bug: 77856586
Change-Id: I3b51d9b2290a4276299725cdd5a53a5bba00166e
2019-03-13 17:12:00 +00:00
The Android Open Source Project
4d916a1ece DO NOT MERGE - Merge PPRL.190305.001 into master
Bug: 127812889
Change-Id: I16a546dc24d3cf980ad7ab09895c0d97ee436224
2019-03-11 11:57:28 -07:00
Martijn Coenen
538e0b98c4 Update comments on native_handle_create.
To indicate limits.

Test: builds
Change-Id: Id5129a7f6a8f413911544dedeb02bb4e7a2f6e10
2019-03-06 14:22:10 +01:00