Allow it to fail. When there is an error for a section ending,
print the error pointing to the line where the section starts.
Bug: 69050941
Test: boot, init_tests
Change-Id: I1d8ed25f4b74cc9ac24d38b8075751c7d606aea8
AID_SHARED_GID is a GID shared by a specific app across all users on
the same device. Bring the UserHandle and multiuser.c implementations
into agreement, and copy/paste the unit tests that verify that both
behave identically.
This fixes a regression where multiuser_get_shared_gid() was applying
per-user isolation when it shouldn't have.
Test: adb shell /data/nativetest64/libcutils_test/libcutils_test64
Bug: 34151068, 64548938
Change-Id: I491dd79d23a214425a68865d1d0f8269916aad4c
This change ensures that the logcatd binary is properly
included into builds which contain logpersist. logcatd
is required for logpersist to actually work.
Bug: 69171565
Test: make checkbuild
Test: verified that logcatd binary is present in build
Change-Id: I78161998763a4694ba88af43113fef39a5fbd8c8
+ quota support
This patch fixes broken f2fs_format by replacing the existing flow with calling
legacy mkfs.f2fs binary explicitly likewise ext4.
This removes obsolete ext4 stuffs as well.
Bug: 67009570
Change-Id: Ia81bcbc7adc3a8b57ada860f7f7871602ac1c6e9
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
... if they are not available. Use weak symbols and do not call the
following functions when they are not defined:
* android_dlopen_ext
* android_get_exported_namespace
Test: links
Test: boots
Change-Id: I653548bac61a0eba001f72bab969b5b858bd1553
Just the minimial changes to get this to actually build, because otherwise
we always bog down trying to rewrite everything (when the real answer
is usually "stop using libcutils, it's awful").
This doesn't move a handful of files: two are basically just BSD libc
source, a couple have outstanding code reviews, and one can be deleted
(but I'll do that in a separate change).
I'm also skipping the presubmit hooks because otherwise clang-format
wants to reformat everything. I'll follow up with that...
Bug: N/A
Test: builds
Change-Id: I06403f465b67c8e493bad466dd76b1151eed5993
PRODUCT_FULL_TREBLE is being deprecated in favor
of smaller flags. Use the appropriate one instead.
Bug: 62019611
Test: manual
Change-Id: Id5d127c29f908cd3011031b3b698ddec3dcba9c1
Before:
extracting android-info.txt (0 MB)...
extracting boot.img (29 MB)...
target reported max download size of 536870912 bytes
archive does not contain 'boot.sig'
archive does not contain 'boot_other.img'
archive does not contain 'dtbo.img'
archive does not contain 'dt.img'
archive does not contain 'recovery.img'
extracting system.img (1928 MB)...
archive does not contain 'system.sig'
extracting system_other.img (574 MB)...
archive does not contain 'system.sig'
archive does not contain 'vbmeta.img'
After:
extracting android-info.txt (0 MB) to RAM...
extracting boot.img (29 MB) to disk... took 0.232s
target reported max download size of 536870912 bytes
archive does not contain 'boot.sig'
archive does not contain 'boot_other.img'
archive does not contain 'dtbo.img'
archive does not contain 'dt.img'
archive does not contain 'recovery.img'
extracting system.img (1928 MB) to disk... took 10.122s
archive does not contain 'system.sig'
extracting system_other.img (574 MB) to disk... took 3.424s
archive does not contain 'system.sig'
archive does not contain 'vbmeta.img'
Bug: http://b/69128980
Test: ran manually
Change-Id: Ib190d1cc56ad9da06a4f9a9e822f7dad4a9a53b7
The client of FirstStageMount class should check the existence of fstab
in device-tree prior to using it. So raising a FATAL error inside
FirstStageMount when failed to parsing the fstab, in order to expose
more accurate error messages.
Also fixing a comment in fs_mgr, where it might happen in either
non-A/B or A/B.
Bug: 69102431
Test: boot sailfish
Change-Id: Ifb525beaa3423b118644778bfe0f84bff9465303
In vendor process, libvndksupport must look for "default" namespace,
instead of "sphal" namespace to open hal libraries.
Bug: 63411330
Test: Boot the device.
Change-Id: I26208b6f47708f83e0679fd72ca7471ade84fff9
Merged-In: I26208b6f47708f83e0679fd72ca7471ade84fff9
If no 'sphal' namespace exist, the sphal library may be found in
current namespace.
Change the log level and message to note this.
Bug: 64162324
Test: Check log message for vndksupport tag.
Change-Id: I5ed6ba1e48f99e7d11d80a465177ac9f3a7fbd97
Merged-In: I5ed6ba1e48f99e7d11d80a465177ac9f3a7fbd97
In order to replace qtaguid module with new eBPF network monitoring
module. We firstly move the current qtaguid userspace implementation
into netd and hide the detail from other processes. The current API will
talk to netd fwmark client to pass down the qtaguid related request from
high level framework and netd will use the proper method to complete the
request.
Test: Current TrafficStats CTS tests should not fail.
Bug: 30950746
Change-Id: Ie90c28f3594ab2877746b2372a1b6944768bfb18
Partners require to access update_engine's logs on the file system with
non-root permission.
Bug: 65568605
Test: directory created with the correct permission on boot
Change-Id: I1c1fb4acb8b0f2e7352ffa9e7d05a864940b5986
The qtaguid kernel module will be deprecated on devices running 4.9
kernel or above and we need to support both old and new module in
userspace. Netd is responsible for choosing which kernel module to use
and all the current qtaguid native implementation need to be hided
behind it. So the current qtaguid native API implementation will be
moved to a isolate library under system/core and only netd can access to
it. The libcutils qtaguid API will become a wrapper to send request to
netd module. This modification will make sure the apps that currently
using this native API will not be broken.
Bug: 30950746
Test: All cts and vts test related should not fail.
Change-Id: I9de98a25ed5dc71bbf520ee0aadd16d59025699a
This test actually belongs with the adb python wrapper, since it's not
affected by changes to adb itself.
Bug: http://b/64260633
Test: python test_device.py
Change-Id: I58e5dff760f35923f8dbbdc7de6ffd75254880dc
In this case, if the .eh_frame_hdr doesn't exist, we would crash.
Bug: 68813077
Test: Pass new unit tests, verified that without the fix, the unit test
Test: would crash.
Change-Id: I4f1365a76fe5c2fb69fa106a1ef15889c14e7611
Static executables only have a .eh_frame section and no .eh_frame_hdr
section. Add support for this by rearranging the class hierarchy and
creating a DwarfEhFrameWithHdr class and a DwarfEhFrame class to handle
the different cases.
Add new unit tests for DwarfEhFrame and for the new functionality.
Bug: 68820189
Test: Passes new unit tests, unwinds static executables.
Change-Id: I63d7cb8c52a686e96579a2266e18c0d06bbb6e63
We want repeatable builds for minimal OTAs.
(cherrypick of 2e93eda69cf20d9c04d56ea6bf1e2ea62ad62eb4.)
Bug: http://b/64634017
Bug: 64709603 (presubmit balking at the line above)
Test: repeated builds after `touch daemon/main.cpp` keep same md5sum
Change-Id: Iedeb44377ea45bbf20e2212760802198a57dc14a
Fix for buffer overrun when a tag that is too big is sent to logd.
Buffer supplied is precisely the right size for max message length
however strlen will be run on the buffer, so need to ensure null
terminator, otherwise any strlen will go off the end of the buffer.
Also converted LogBuffer::Log() over to use the safer strnlen in the
case where it is measuring the buffer (and converted over to using
__android_log_is_loggable_len())
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
Test: liblog.android_log_buf_print__maxtag
Change-Id: I3cb8b25af55943fb0f4658657560eb2300f52961
If an entry is found in .eh_frame_hdr, but it's not properly in .eh_frame,
then the code would crash. The assumption that the header always points
to valid fde data is not guaranteed.
Bug: 68813077
Test: Passes new unit test that crashed before the change.
Change-Id: I914d9bda0d442cd232e2a056ae490301a8850105
The parent change ran into an issue where enabling UBSan on an i686
build caused it to use __mulodi4.
https://github.com/android-ndk/ndk/issues/184 documents linking against
libclang_rt.builtins-i686.a, but that's not available from soong either.
Bug: 62378620
Bug: 29412086
Test: x86 builds work again
Change-Id: I730d59558aa4ed28f8a11b5393e037111e320f29
This change adds user namespace-awareness to uevent_kernel_* in
libcutils. Instead of assuming that root is always uid 0, it detects
whether the uid 0 is mapped in the current user namespace and returns
the appropriately mapped uid (or the kernel's "overflowuid" in case it
is not mapped).
In older kernels, or those where user namespaces are not enabled, this
still uses uid 0 for root.
Bug: 62378620
Test: bullhead networking still works
Test: Android in Chrome OS can now receive netlink-related messages
Change-Id: I7ea3454e8f38b9c70c65294d6b2a99e5a88f9d70