OSDN Git Service
Chih-Wei Huang [Thu, 8 Jul 2021 13:44:36 +0000 (21:44 +0800)]
init: don't set serialno via kernel cmdline
On an x86 device the product serial number is set in the DMI table.
We don't set it via kernel cmdline. It will be set later in init.sh.
Chih-Wei Huang [Sat, 23 Nov 2019 02:48:43 +0000 (10:48 +0800)]
init: set default selinux mode to permissive
To support selinux enforcing mode, we still have a long way to go.
Let's set the default mode to permissive.
Chih-Wei Huang [Wed, 16 Oct 2019 14:35:22 +0000 (22:35 +0800)]
Merge tag 'android-7.1.2_r39' into nougat-x86
Android 7.1.2 Release 39 (
5787804)
Janis Danisevskis [Wed, 5 Jun 2019 23:42:12 +0000 (16:42 -0700)]
Fix a memory leak in gatekeeper.
In violation to the documentation of GateKeeper::GetAuthTokenKey and
GateKeeper::GetPasswordKey, the implementations in SoftGateKeeper
allocate and return buffers and relinquish ownership causing a memory
leak, because the caller expects the implementation to retain ownership.
Bug:
129768470
Bug:
134557251
Test: gatekeeper-unit-tests
Change-Id: I0af9539d3dcd47dfd1e7d80cdee700ea0c2d6d0f
Merged-In: I0af9539d3dcd47dfd1e7d80cdee700ea0c2d6d0f
(cherry picked from commit
6a9c4e7968e73393110b169b33fb636531fe7fc2)
Wei Wang [Fri, 14 Apr 2017 01:27:35 +0000 (18:27 -0700)]
init.rc: set initial cpuset to all cores
Starting zygote early requires cpuset to be initialized to all cores for
foreground cpuset. Change to expolit all cores by default at boot and
let device manufacturers override to proper values in device specific
init script.
Bug:
36576280
Test: marlin boot fast and checked cpuset during early boot
Change-Id: I2c1ce0630e58a7b04d1a453c6740d3f0bce9de9f
Steven Moreland [Thu, 1 Mar 2018 19:03:04 +0000 (11:03 -0800)]
String16: remove integer overflows
Bug:
73826242
Test: manual
Change-Id: I32e13d61b944c1a527cf2d95473552d246e322be
Merged-In: I32e13d61b944c1a527cf2d95473552d246e322be
(cherry picked from commit
d0648d8dc61fe9ac39d2cd150a332b385a334bdc)
Chih-Wei Huang [Thu, 4 Jan 2018 08:45:08 +0000 (16:45 +0800)]
Merge tag 'android-7.1.2_r36' into nougat-x86
Android 7.1.2 Release 36 (N2G48H)
Chih-Wei Huang [Mon, 20 Nov 2017 08:50:20 +0000 (16:50 +0800)]
init: handle ctrl-alt-del event
By setting /proc/sys/kernel/ctrl-alt-del to 1, kernel will trap
ctrl-alt-del event and send a SIGINT signal to init.
Start the ctrl-alt-del service on receiving the signal.
tintin [Fri, 13 Oct 2017 18:11:48 +0000 (11:11 -0700)]
libnetutil: Check dhcp respose packet length
Bug:
67474440
Test: Manual
Change-Id: I84b533f0101a56ec01e64c7591f3c7e82f513b2e
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
(cherry picked from commit
61f25d4a3657e79659963d12005afa8c30883015)
android-build-team Robot [Fri, 3 Nov 2017 19:55:51 +0000 (19:55 +0000)]
Merge cherrypicks of [
3166006,
3165952,
3164925,
3164926,
3164927,
3164928,
3167313,
3167314,
3167315,
3167316,
3167317,
3167318,
3167319,
3167320,
3167321,
3167322,
3166318,
3166319,
3166320,
3166321,
3166322,
3166323,
3166324,
3167333,
3167334,
3167373,
3165112,
3166325,
3165229,
3165230] into nyc-mr2-release
Change-Id: I1ceb02446b2daf909b269a7e9a2777182546e414
Narayan Kamath [Wed, 9 Aug 2017 17:32:09 +0000 (18:32 +0100)]
zip_archive: reject files that don't start with an LFH signature.
Bug:
64211847
Test: zip_archive_test
Merged-In: Ib89f0def696206ff427be27764c158fab88e4b5d
Merged-In: I275e7c4da05ceeb20401b560c72294f29ef63642
Change-Id: I38705f4e9688326a140aa59a1333b0878ed39c14
(cherry picked from commit
2740bb09e3cee99032a86a1700cb0a6f14f3a51f)
Narayan Kamath [Wed, 9 Aug 2017 17:32:09 +0000 (18:32 +0100)]
zip_archive: reject files that don't start with an LFH signature.
Bug:
64211847
Test: zip_archive_test
Merged-In: Ib89f0def696206ff427be27764c158fab88e4b5d
Merged-In: I275e7c4da05ceeb20401b560c72294f29ef63642
Change-Id: I38705f4e9688326a140aa59a1333b0878ed39c14
(cherry picked from commit
2740bb09e3cee99032a86a1700cb0a6f14f3a51f)
Elliott Hughes [Tue, 21 Jun 2016 00:21:59 +0000 (17:21 -0700)]
Use __ with attribute __noreturn__ to avoid colliding with noreturn.
Change-Id: I5a73ec69b580b2e70b2c68177078fa56b8353c19
android-build-team Robot [Thu, 28 Sep 2017 17:17:26 +0000 (17:17 +0000)]
Merge cherrypicks of [
2973982,
2974657,
2974658,
2973983,
2973984,
2974689,
2974690,
2974691,
2974692,
2974710,
2974711,
2974713,
2974714,
2974215,
2974216,
2974217,
2974218,
2974219,
2974220,
2974729,
2974730,
2974731,
2974732,
2974733,
2974734,
2974735,
2974736,
2974737,
2974738,
2974739,
2974740,
2974741,
2974742,
2974749,
2974750,
2974751,
2974752,
2974753,
2974647,
2974744,
2974693,
2974694,
2974648,
2974513,
2974665,
2974746] into nyc-mr2-release
Change-Id: Ib4bf7d12a0daded9d3a6a9861e82b96b2b657afa
Adam Vartanian [Mon, 14 Aug 2017 14:51:29 +0000 (15:51 +0100)]
Fix integer overflow in utf{16,32}_to_utf8_length
Without an explicit check, the return value can wrap around and return
a value that is far too small to hold the data from the resulting
conversion.
No CTS test is provided because it would need to allocate at least
SSIZE_MAX / 2 bytes of UTF-16 data, which is unreasonable on 64-bit
devices.
Bug:
37723026
Test: run cts -p android.security
Change-Id: Ie2606b92b9eab1acfe8ce4663b43b81156a4cad7
Merged-In: I56ba5e31657633b7f33685dd8839d4b3b998e586
(cherry picked from commit
f0a43dede921178b3048d40c330a8b664e94cca3)
Adam Vartanian [Mon, 14 Aug 2017 14:51:29 +0000 (15:51 +0100)]
Fix integer overflow in utf{16,32}_to_utf8_length
Without an explicit check, the return value can wrap around and return
a value that is far too small to hold the data from the resulting
conversion.
No CTS test is provided because it would need to allocate at least
SSIZE_MAX / 2 bytes of UTF-16 data, which is unreasonable on 64-bit
devices.
Bug:
37723026
Test: run cts -p android.security
Change-Id: Ie2606b92b9eab1acfe8ce4663b43b81156a4cad7
Merged-In: I56ba5e31657633b7f33685dd8839d4b3b998e586
(cherry picked from commit
f0a43dede921178b3048d40c330a8b664e94cca3)
Daniel Rosenberg [Mon, 20 Mar 2017 20:09:06 +0000 (13:09 -0700)]
Make sdcardfs the default
This will cause devices to default to sdcardfs if the kernel
supports it.
Test: Booted a wiped device, ensured sdcardfs was enabled
Change-Id: Ibce012b841b78d37ade668a38e91dca74a637867
Gustavo Padovan [Sat, 11 Jun 2016 14:11:19 +0000 (11:11 -0300)]
libsync: add support to new Sync API
Change libsync functions in a way that it can run dynamically on both
APIs.
v2: fix whitespace changes and poll return handling
v3: handle error cases on sync_wait()
Test: Sync unit tests still passes.
Change-Id: I743ab92ce39cbfa75dca41dd0a435efa9f2aab66
hange-Id: Ib56f2c6441b41028bc9f66998676790b7713988a
Gustavo Padovan [Fri, 10 Jun 2016 19:51:29 +0000 (16:51 -0300)]
libsync: open new location of sw_sync file
sw_sync file for debug was moved to debugfs. Try to open it and if it
fails try to open /dev/sw_sync.
Test: Sync unit tests still passes.
Change-Id: Ie078fbc2eb5294f28b916a9e65b7fcd3a18a8580
hange-Id: I216874964368d939bed2779d98cd89e527a57d45
Gustavo Padovan [Fri, 10 Jun 2016 19:24:49 +0000 (16:24 -0300)]
libsync: add new Sync kernel API
Add the new API to the internal sync.h file. As there is two different
APIs we will need to discovery dynamically which one to use.
v2: Fix Documentation
Test: Sync unit tests still passes.
Change-Id: I2ab3cd46e48ba5d9c73d54f9583b1a8141566581
Gustavo Padovan [Fri, 10 Jun 2016 19:09:36 +0000 (16:09 -0300)]
libsync: move kernel headers for sync ioctls to sync.h
This patch moves the legacy API to the internal sync.h header
and add documentation to it.
Test: Sync unit tests still passes.
Change-Id: I9b17eb23af30043b3df5fb9e857affad68ba8521
Christopher Ferris [Tue, 13 Dec 2016 01:32:55 +0000 (17:32 -0800)]
Update for kernel headers v4.8.14.
Update sync.c to include the structurs from sw_sync.h. This uapi
header has been deleted.
Test: Built mips/arm/arm64/x86/x86_64. Built and booted angler.
Change-Id: I2495cb17b35f697fb8a2a00f6633ccb53f78293f
Christopher Ferris [Wed, 24 Aug 2016 21:49:18 +0000 (14:49 -0700)]
Update for kernel headers v4.7.2.
The new uapi kernel headers added a new SEGV reason code, so
add it to the tombstone code.
Update sync.c to include the needed data structures itself. Someone
else will be fixing this to work on old versus new kernels.
Change-Id: Icb27713ea38a20003c7671a9bca262eebd96099b
Greg Hackmann [Fri, 5 Aug 2016 20:47:32 +0000 (13:47 -0700)]
libsync: add static library for recovery
Change-Id: If43188c3b4b16c698c077338ea0ef1dfd16b9c56
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Greg Hackmann [Fri, 5 Aug 2016 17:07:28 +0000 (10:07 -0700)]
libsync: remove unused liblog dependency
Change-Id: I69840ece3f13809b2440edbe6cfa412a56aee4aa
Signed-off-by: Greg Hackmann <ghackmann@google.com>
George Burgess IV [Wed, 2 Mar 2016 22:02:55 +0000 (14:02 -0800)]
Cleanup uses of sprintf so we can deprecate it.
Also cleans up two instances of open() with useless mode params, and
changes a few uses of snprintf to use sizeof(buffer) instead of
hardcoded buffer sizes.
Change-Id: If11591003d910c995e72ad8f75afd072c255a3c5
Chih-Wei Huang [Wed, 7 Jun 2017 02:34:34 +0000 (10:34 +0800)]
Merge tag 'android-7.1.2_r17' into nougat-x86
Android 7.1.2 Release 17 (NJH47B)
Chih-Wei Huang [Sat, 20 May 2017 08:29:06 +0000 (16:29 +0800)]
libsuspend: add powerbtnd thread
Also send wakeup key on resume to ensure the system wakes up normally.
android-build-team Robot [Thu, 18 May 2017 00:55:53 +0000 (00:55 +0000)]
Merge cherrypicks of [
2278225,
2279882,
2279862,
2278226,
2277057,
2279863,
2278227] into nyc-mr2-pixel-monthly-release
Change-Id: I1ecb022752e056db772b9dc471529bc4ef335d7a
Wei Wang [Wed, 29 Mar 2017 19:57:51 +0000 (12:57 -0700)]
libcutils: remove schedgroup fds [DO NOT MERGE]
After removing bg_non_interactive cgroup, there is only a ROOT cgroup.
This CL removes the no-op trying to set cgroup.
It also removes the attempt to open non-exist bg_non_interactive cgroup.
Bug:
36649832
Test: marlin boosts and cgroup ROOT task looks normal
Change-Id: Idef1dfdaa71fde63c98c73a3d37f65416aa6f2e2
(cherry picked from commit
bcb6419fc9ac4c33aa1429092df4428e8e3836df)
Wei Wang [Mon, 20 Mar 2017 21:21:06 +0000 (14:21 -0700)]
init.rc: remove bg_non_interactive cgroup [ DO NOT MERGE ]
We have seen cases when threads in this cgroup not scheduled for more than
a few seconds in heavy workload situation and causing device freeze.
In Linux, multiple threads placed in ROOT cgroup cause the CPU resource to
be split per thread, rather than per group.
Currently we have many threads in ROOT cgroup, which makes threads in
bg_non_interactive cgroup to have "tiny" CPU resource other than 5%
quota defined.
Bug:
34193533
Test: on marlin
Change-Id: I7721f6196560fbedf6265e8b6db130cec9edefd7
(cherry picked from commit
0638626e0e6c38835d36fa17326aee08235e261a)
Wei Wang [Mon, 20 Mar 2017 22:13:05 +0000 (15:13 -0700)]
libcutils: only change cgroup when fd is initialized [ DO NOT MERGE ]
This is to avoid failues on setting non-exist cgroup
Bug:
34193533
Test: on marlin
Change-Id: I619dcba332fda9ec421df811745cf10311beddd3
(cherry picked from commit
e46aae223626432bde7d4e95818e8394664c6c02)
android-build-team Robot [Wed, 17 May 2017 22:59:12 +0000 (22:59 +0000)]
release-request-
513a9883-0d18-4c2f-80ce-
cadb234b4e89-for-git_nyc-mr2-pixel-monthly-release-
3938523 snap-temp-L39300000065258774
Change-Id: Iebfce5748223b9efcec5d6693b75df9868ad4acf
Chih-Wei Huang [Fri, 12 May 2017 03:54:47 +0000 (11:54 +0800)]
Revert "Set correct permission for pppd"
It causes mtpd can't run pppd.
This reverts commit
9e89fe3e1816e8e7a5142780bf12302ee64d1b7e.
Reported-By: Xuefer H <xuefer@gmail.com>
android-build-team Robot [Thu, 11 May 2017 19:13:46 +0000 (19:13 +0000)]
Merge cherrypicks of [
2247380,
2246315,
2247358] into nyc-mr2-pixel-monthly-release
Change-Id: I63d2b044988b02601e7050cb3af45e4956338924
Wei Wang [Wed, 29 Mar 2017 19:57:51 +0000 (12:57 -0700)]
libcutils: remove schedgroup fds [DO NOT MERGE]
Change-Id: Ie2c576dca8097668edd4c4e4fe947e862bd0c6d9
Susmitha Gummalla [Thu, 25 Jun 2015 05:38:25 +0000 (22:38 -0700)]
Camera: Add feature extensions
This change includes below commits:
Camera bringup changes system-core
Change-Id: I1cf98641eca9096bd27645e07ea802646ea1fb96
system/core: Fix for HAL compilation issues while integrating HAL 1.0
Change-Id: Iead9c1ade279b64c5cbdf4d2de1a8b695939c52a
Camera: Add enum to specify the frame type
Added enum to specify the frame type of either fd/data buffer
CRs-fixed: 654901
Change-Id: I1c0b1a2c6a1425cdb6650cdfc20ca65835a1b81f
Change-Id: I654a40661e6e101da2a06986abeceb20639cccd9
Chih-Wei Huang [Fri, 7 Oct 2016 13:59:28 +0000 (21:59 +0800)]
libsuspend: disable earlysuspend by default
Chih-Wei Huang [Tue, 27 Sep 2016 11:14:12 +0000 (19:14 +0800)]
ueventd: defer modules loading if explicitly listed
The patch extends the syntax of /etc/modules.blacklist.
The modules marked as deferred in this file will be loaded
after all other modules are loaded at coldboot stage.
Chih-Wei Huang [Fri, 23 Sep 2016 09:59:47 +0000 (17:59 +0800)]
init: set default value of ro.hardware to the target name
People usually forget to set the value of androidboot.hardware to
the target name in kernel cmdline which results in boot failure.
The change tries to reduce such an error in the future. The target
name is hardcoded to the image. This eliminates the necessity of
androidboot.hardware.
Chih-Wei Huang [Thu, 25 Aug 2016 17:02:30 +0000 (01:02 +0800)]
ueventd: auto load modules on uevents
This is a squashed and refactory patch of the following commits
from marshmallow-x86:
* add modprobe-like capability and automatic ueventd loading
Author: Jianxun Zhang <jianxun.zhang@intel.com>
Author: Daniel Leung <daniel.leung@intel.com>
Author: Andrew Boie <andrew.p.boie@intel.com>
- insmod_by_dep() added to libcutils; loads a module into kernel.
Modules the target module depends on will be loaded first. Loading
will be stopped when an error occurs.
- rmmod_by_dep() added to libcutils; removes a module from kernel.
It also tries to remove other modules the target module depends
on until an error occurs.
- Implement wildcard matching for ueventd rules.
The PCI and USB addresses for devices can change from devices
from devices for a particular class of peripheral, for example,
bluetooth. The ueventd rules created with these addresses are
then device-specific.
This changes the way ueventd rules with wildcard are handled.
Instead of matching just the prefix with a trailing wildcard,
now these rules can have wildcard anywhere in the rule.
The wildcard matching is implemented using fnmatch(), where
its matching is simliar to shell pathname expansion. It suits
this particular usage model well.
For example, instead of creating a rule to match:
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/bluetooth/hci0/rfkill*
, this would suffice:
/sys/devices/*/bluetooth/hci0/rfkill*
- Let ueventd auto-load kernel modules. Implements the functionality
for ueventd to auto-load kernel modules when uevents are triggered.
Since /system may not be mounted when uevents are fired,
a deferred loading mechanism is implemented. Once mapping of
module and alias is available, these modules are then loaded.
Modules can also be blacklisted so they will not be loaded
automatically. One example would be the Wifi driver, as
Android's has to control its loading and unloading.
- add 'probemod' builtin command. This command accepts the name of a
kernel module plus a set of command line arguments. The module will
be loaded, along with all its dependencies, using the libcutils
insmod_by_dep() API.
- Drivers in kernel can request modules by launching a program in
user space, the program's path by default is "/sbin/modprobe".
Because Android system has no modprobe and ueventd is the only
program handling the module aliases so far, This patch provides a
cheap approach to handle kernel's requests in ueventd executable.
- Add new builtin init command "coldboot". The main purpose is to
provide an approach in init.*.rc files to fire uevents for devices
under the path which is passed as the the argument. This should be
called after /system is mounted so any queued events that need to
load a module can be fired.
* allow to load modules from standard module path
* ueventd: load modules in a forked process
Loading some modules (e.g., ath3k) will be blocked to wait for
firmware. The forking is necessary, otherwise ueventd has no
chance to load the firmware.
* init: add modprobe to load kernel requested modules
* libcutils: refine probe_module
Make the code be more elegant and fix the realloc bug.
* ueventd: refactory module and firmware loading mechanism
Currently each module and firmware loading event is forked to
a child process to handle. It may cause some race conditions.
Now we fork ueventd into two processes. The parent process handles
normal uevents including modules loading, while the child process
only handles firmware loading events. All events are handled
sequentially.
* ueventd: load all modules with the matched alias
Originally we only load the first module with the matched alias.
It causes some necessary modules are not loaded.
Chih-Wei Huang [Thu, 25 Aug 2016 13:10:32 +0000 (21:10 +0800)]
ueventd: fix copied string not being freed
Unlike change Id0a5f711e33363082ba201afda6b26043998cb1c,
parse_subsystem and parse_line_subsystem hold points to memory
of the copied string which can't be freed.
To fix the issue, duplicate the strings to be hold.
Then we can parse the std::string data directly without
copying it.
Change-Id: I4dbf543de6880537b419e6c2344ee6a40ce378f1
Chih-Wei Huang [Thu, 18 Aug 2016 08:05:58 +0000 (16:05 +0800)]
init: don't bail out even no SELinux domain defined
Chih-Wei Huang [Sun, 14 Aug 2016 03:23:20 +0000 (11:23 +0800)]
init: enlarge the time to wait coldboot done
We need more time to probe and load all modules.
If 10s is still not enough for you, let me know.
Chih-Wei Huang [Fri, 29 Jul 2016 11:49:58 +0000 (19:49 +0800)]
init.rc: symlink /lib to /system/lib
Currently more linux drivers use request_firmware_nowait() to load
firmwares. It requires the firmwares exist in the standard path.
Create the symlink before ueventd started to ensure firmwares
could be loaded correctly.
Ma Jian [Wed, 6 Jul 2016 10:31:55 +0000 (18:31 +0800)]
Fix build break on x86_64
When TARGET_ARCH=x86_64, the LOCAL_SRC_FILES will be wrongly set to
codegen.cpp.arm, but the android make will 'smartly' remove the suffix
".arm" and try to compile the codegen.cpp without the libenc dependency.
NO_REF_TASK
Tested: local build
Change-Id: I25df0692886fd8b7c56d467d3b6f674919b09b56
Ma Jian [Sun, 12 Jun 2016 09:34:25 +0000 (17:34 +0800)]
Support use local time for RTC
When default timezone isn't UTC, there will no persist.sys.timezone
under /data/property/, so init won't get the default timezone for
setting time from rtc.
This change adds a fallback to read the property when the persist file
does not exists.
Notice, the default property of persist.sys.timezone should be set in
/default.prop instead of /system/build.prop
NO_REF_TASK
Tested: set default timezone with Asia/Shanghai, make sure bios time
is correct in local time, reboot to android, the local time should
be correct.
Change-Id: Ifbd20cb3710f833ab65852b4e5d51e38cc7c2d79
Roman Petrovski [Fri, 10 Jun 2016 19:50:00 +0000 (03:50 +0800)]
init: support usbmisc devices
The patch allows to create usbmisc device nodes like /dev/cdc-wdm0.
Chih-Wei Huang [Sun, 5 Jun 2016 10:47:29 +0000 (18:47 +0800)]
libsuspend: add a property sleep.earlysuspend
Set the property to 0 to disable earlysuspend.
The default value is 1.
Jaap Jan Meijer [Thu, 2 Jun 2016 15:43:24 +0000 (17:43 +0200)]
libsuspend: make sleep state configurable and add a fallback
This patch allows the user to set the sleep state target from
Android properties for both wakeup_count and earlysuspend methods.
It also includes a fallback state if the default state is not
available and the user didn't set the sleep.state property.
Signed-off-by: Jaap Jan Meijer <jjmeijer88@gmail.com>
Ching Tzung Lin [Mon, 11 Jan 2016 21:00:22 +0000 (13:00 -0800)]
Mount debugfs earlier regardless build variant
ag/835596 can be reverted after this CL is merged.
BUG:
26455292
Change-Id: I453b0f1d08d822f8cd2d4d33f1c1b21f0d7f543a
Chih-Wei Huang [Tue, 6 Oct 2015 19:08:21 +0000 (03:08 +0800)]
libsuspend: enable earlysuspend for android-x86
Chih-Wei Huang [Mon, 23 Nov 2015 09:57:37 +0000 (17:57 +0800)]
init: expand variables on mount_all command
This allows mount_all to handle fstab.${ro.hardware} instead
of hardcoding the file name.
Chih-Wei Huang [Mon, 10 Aug 2015 08:31:28 +0000 (16:31 +0800)]
Software-accelerated Pixel Flinger
The typical graphic workloads on VirtualBox are improved 3X.
Supports both x86 and x86_64.
Similar change by HazouPH <jgrharbers@gmail.com>:
http://review.cyanogenmod.org/#/c/70896/
And by Quanganh pham <quanganh2627@gmail.com>:
http://review.cyanogenmod.org/#/c/97125/
Chih-Wei Huang [Fri, 3 Apr 2015 12:36:39 +0000 (20:36 +0800)]
init.rc: fix for "add_tid_to_cgroup failed to write" warnings
I still don't understand why only 0660 works.
Chih-Wei Huang [Sat, 6 May 2017 14:52:37 +0000 (22:52 +0800)]
Merge branch 'android-ia' into nougat-x86
Chih-Wei Huang [Mon, 3 Nov 2014 15:06:02 +0000 (23:06 +0800)]
Allow all to execute su
The Superuser app can control how su is used.
Chih-Wei Huang [Wed, 29 Oct 2014 15:25:57 +0000 (23:25 +0800)]
init.rc: let some services run as root
The surfaceflinger needs root permission to control vt.
Run the console shell as root to make debugging easier.
Chih-Wei Huang [Fri, 8 Aug 2014 10:17:04 +0000 (18:17 +0800)]
libutils: fix incorrect calculation in utf8_length() method
The first character of utf-8 could be larger than 128. If use signed char
variable to hold it, it would be treated as negative. That may result in
some unexpected errors.
For example, without this patch, suppose the code is 0xE88888, then
first_char is 0xE8 and converted to int32_t type (0xFFFFFFE8) and
masked with (~to_ignore_mask). The result utf32 is
FFF08208
which is incorrect.
Change-Id: I72b355f380865bc375251eb287fc225fd585a115
Chih-Wei Huang [Sun, 29 Apr 2012 07:04:55 +0000 (15:04 +0800)]
Set correct permission for pppd
The pppd needs setuid root to setup ppp interface.
Chih-Wei Huang [Sun, 1 Jan 2012 19:16:41 +0000 (03:16 +0800)]
init: avoid virtual console be set blanked
Chih-Wei Huang [Tue, 1 Feb 2011 07:47:03 +0000 (15:47 +0800)]
init: change firmware_dirs for Android-x86
Chih-Wei Huang [Sat, 15 Jan 2011 22:44:37 +0000 (06:44 +0800)]
ueventd.rc: remove redundant definitions
Change-Id: Icb4f051abf941052aca9752ca2949386738d94e5
Irina Patru [Fri, 22 Aug 2014 12:18:49 +0000 (15:18 +0300)]
UPSTREAM_PENDING newfs_msdos: Handle alignment failure
When trying to create a new FAT32 file system using alignment, the resulted
MBR structure is corrupted, because the total sectors reported does not
correspond to the actual available sectors. This is due to the reserved
sectors field which is updated during the alignment.
When fsck_msdos will try to check this file system, it will fail because it
cannot match the reported sectors with the actual available sectors.
Due to the failed check, the file system cannot be mounted by vold.
I/fsck_msdos( 2180): FAT size too small, 242822 entries won't fit into 1897 sectors
I/fsck_msdos( 2180): fsck_msdos terminated by exit(8)
E/Vold ( 2180): Filesystem check failed (unknown exit code 8)
E/Vold ( 2180): /dev/block/vold/179:49 failed FS checks (I/O error)
D/Vold ( 2180): Volume sdcard1 state changing 3 (Checking) -> 1 (Idle-Unmounted)
In order to fix this issue, we will save the initial bpb structure and restore
it if the alignment fails.
Change-Id: I58d5078551c689b28c9070585bb330c45bab9c62
Signed-off-by: Irina Patru <irina.patru@intel.com>
Reviewed-on: https://android.intel.com/256992
Reviewed-by: Dolca, Robert <robert.dolca@intel.com>
Reviewed-by: cactus <cactus@intel.com>
Reviewed-by: Popa, Valentin <valentin.popa@intel.com>
Samuel Ortiz [Thu, 17 Jul 2014 23:35:29 +0000 (01:35 +0200)]
devices: Increase the uevent socket buffer size
Depending on the timing, hald may start while ueventd is not done yet
with its initial coldboot. As hald also independently starts its own
coldboot, ueventd netlink socket buffer could get filled quickly and
thus ueventd could lose some uevents.
This is fixed by increasing the ueventd netlink socket buffer size.
Change-Id: Ie92f77c14099421740b3984f1cc23f813287b78f
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Reviewed-on: https://android.intel.com/219843
Reviewed-by: Escande, Thierry <thierry.escande@intel.com>
Reviewed-by: cactus <cactus@intel.com>
Reviewed-by: Ortiz, Samuel <samuel.ortiz@intel.com>
Tested-by: Ortiz, Samuel <samuel.ortiz@intel.com>
Tested-by: cactus <cactus@intel.com>
Reviewed-by: Porlan, Patrick <patrick.porlan@intel.com>
Reviewed-by: Bianti, Sebastien <sebastien.bianti@intel.com>
Reviewed-by: Mahalingam, Ganesh <ganesh.mahalingam@intel.com>
Tested-by: Mahalingam, Ganesh <ganesh.mahalingam@intel.com>
Andrew Boie [Thu, 12 Jul 2012 22:39:25 +0000 (15:39 -0700)]
adb: reserve a wakelock when clients are connected over socket
USB OTG connections already have a wakelock reserved, but if a network
socket connection is made, the device can unexpectedly suspend
in the middle of a session. The lock is released when the client
disconnects.
Change-Id: Id5ac01699fab9350955c9814042259542fc6a694
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Andrew P. Boie [Fri, 31 Aug 2012 19:05:55 +0000 (12:05 -0700)]
libdiskconfig: Enable Mac OS X host build
Change-Id: Iacc7d5463364d0cd15ca9fabaa58ad05857d9e78
Signed-off-by: Andrew P. Boie <andrew.p.boie@intel.com>
Andrew Boie [Fri, 11 Nov 2011 01:58:05 +0000 (17:58 -0800)]
diskconfig: Fix disk_layout.conf size parsing
If the user was appending 'K' to their lengths (which is valid
but redundant) it was being treated as megabytes instead of
kilobytes.
Change-Id: I979ec4d01f1342de1f3209b946201ca87bad32a7
Paul Drews [Mon, 20 Jun 2011 17:01:24 +0000 (10:01 -0700)]
Use progressive offset in buffer for successive writes
The code for copying from one raw file to another looped
back and tried again with a suitably smaller number of bytes
if the entire buffer was not written on the first try.
However, it failed to advance an offset in the buffer past
the bytes that were written. This could conceivably happen
under rare circumstances, leading to a corrupted disk image.
This fix defines an offset into the buffer, advancing it by
the number of bytes written on each successive retry.
Signed-off-by: Paul Drews <paul.drews@intel.com>
Change-Id: I76b8e0b3c0d3b0c32bd2114d0867ac7489808279
Andrew Boie [Wed, 11 Jul 2012 03:43:29 +0000 (20:43 -0700)]
libdiskconfig: HACK Don't do space checks on zero-size images
If an image file is of zero size, assume we just want to expand it
to fit the available images.
Change-Id: If8f22eb12d3a5179960d4359307bb177e3323e8a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
android-build-team Robot [Thu, 4 May 2017 22:05:54 +0000 (22:05 +0000)]
release-request-
3b995630-3bae-4f9e-868a-
935ab7740cc9-for-git_nyc-mr2-pixel-monthly-release-
3934930 snap-temp-L20000000060688928
Change-Id: I0b0e54d53ba4dd01b340a98cbd22998853fcb7ae
android-build-team Robot [Thu, 4 May 2017 22:05:43 +0000 (22:05 +0000)]
release-request-
3b995630-3bae-4f9e-868a-
935ab7740cc9-for-git_nyc-mr2-pixel-monthly-release-
3934930 snap-temp-L20000000060688928 (snap-temp-branch)
Change-Id: I6020d93cccc4060166b115b75d39a65447bb09aa
android-build-team Robot [Tue, 25 Apr 2017 17:25:51 +0000 (17:25 +0000)]
Merge cherrypicks of [
2099168,
2092432,
2035802] into nyc-mr2-pixel-monthly-release
Change-Id: I40db3fb5beaf3634e9682283d7ba07cad2cccaa0
Wei Wang [Wed, 29 Mar 2017 19:57:51 +0000 (12:57 -0700)]
libcutils: remove schedgroup fds [DO NOT MERGE]
Change-Id: I49339b20aa636d2048596f49772928541c701f94
android-build-team Robot [Tue, 25 Apr 2017 17:14:03 +0000 (17:14 +0000)]
release-request-
1b405be0-1652-4c5c-a4e4-
f5799a530db2-for-git_nyc-mr2-pixel-monthly-release-
3934930 snap-temp-L15900000057606206
Change-Id: I80dbed1bf9265dec16b7ae0bd8ecb33acc7cdfc1
android-build-team Robot [Tue, 25 Apr 2017 17:13:53 +0000 (17:13 +0000)]
release-request-
1b405be0-1652-4c5c-a4e4-
f5799a530db2-for-git_nyc-mr2-pixel-monthly-release-
3934930 snap-temp-L15900000057606206 (snap-temp-branch)
Change-Id: I47bb079d4f9651b256023d7b6be205af8fdb6f0d
android-build-team Robot [Fri, 21 Apr 2017 21:09:22 +0000 (21:09 +0000)]
Merge cherrypicks of [
2119741,
2092432,
2035802] into nyc-mr2-pixel-monthly-release
Change-Id: Iee6560247cc7d3feaf75e2cd196dc5dbd858dc99
Wei Wang [Wed, 29 Mar 2017 19:57:51 +0000 (12:57 -0700)]
libcutils: remove schedgroup fds [DO NOT MERGE]
Change-Id: I36368c501dc6f44a48f8f44a55d95f7bf080d311
android-build-team Robot [Fri, 21 Apr 2017 20:42:33 +0000 (20:42 +0000)]
Merge cherrypicks of [
2007123,
2089669,
2072002,
2094113,
1989895,
2094094,
2017568,
2054111,
2054025,
2074928,
2066476,
2092431,
2053944,
2095243,
2092549,
2065088,
2007730,
2008313,
2053983,
2025333,
2094716,
2026590,
2059276,
2089422,
2080090] into nyc-mr2-pixel-monthly-release
Change-Id: Id02cbf050d7962af08201906764ddc3509eea9a5
android-build-team Robot [Fri, 21 Apr 2017 20:40:15 +0000 (20:40 +0000)]
Merge "Fix out of bound read in libziparchive" into snap-temp-L87400000056978794
android-build-team Robot [Fri, 21 Apr 2017 20:40:15 +0000 (20:40 +0000)]
Merge "init.rc: remove bg_non_interactive cgroup [ DO NOT MERGE ]" into snap-temp-L87400000056978794
Tianjie Xu [Wed, 5 Apr 2017 21:46:27 +0000 (14:46 -0700)]
Fix out of bound read in libziparchive
Change-Id: I29e682f901a7b6529d7b25d98c1cf2387fe0a9b5
Wei Wang [Mon, 20 Mar 2017 22:13:05 +0000 (15:13 -0700)]
libcutils: only change cgroup when fd is initialized [ DO NOT MERGE ]
Change-Id: I2ff42dc2d722b399d3a03bd855eff0328ed8d47d
Wei Wang [Mon, 20 Mar 2017 21:21:06 +0000 (14:21 -0700)]
init.rc: remove bg_non_interactive cgroup [ DO NOT MERGE ]
Change-Id: I5cc1af7204ca847469a58027de82b192a04b5469
android-build-team Robot [Fri, 21 Apr 2017 17:29:29 +0000 (17:29 +0000)]
release-request-
762540b1-1728-41bc-a9ce-
e977f3e2683f-for-git_nyc-mr2-pixel-monthly-release-
3888830 snap-temp-L22300000056915770
Change-Id: If660b2507ebb0fdf5657c3f9f4ae65e286bd87fe
android-build-team Robot [Fri, 21 Apr 2017 17:29:20 +0000 (17:29 +0000)]
release-request-
762540b1-1728-41bc-a9ce-
e977f3e2683f-for-git_nyc-mr2-pixel-monthly-release-
3888830 snap-temp-L22300000056915770 (snap-temp-branch)
Change-Id: I142b945f6c768c2fd5037b86b17eb2a0de460faf
android-build-team Robot [Thu, 20 Apr 2017 22:39:44 +0000 (22:39 +0000)]
Merge cherrypicks of [
2089422,
2053944,
2094094,
2007730,
2072002,
2065088,
1989895,
2080090,
2026590,
2008313,
2089669,
2059276,
2094716,
2066476,
2053983,
2007123,
2017568,
2054111,
2054025,
2095243,
2092431,
2092549,
2025333,
2099168,
2074928] into nyc-mr2-pixel-monthly-release
Change-Id: I2bafcbf46b4e5e6ebf3f90f87e7f4f185cf17553
android-build-team Robot [Thu, 20 Apr 2017 22:37:43 +0000 (22:37 +0000)]
Merge "Fix out of bound read in libziparchive" into snap-temp-L07900000056674784
android-build-team Robot [Thu, 20 Apr 2017 22:37:43 +0000 (22:37 +0000)]
Merge "libcutils: only change cgroup when fd is initialized [ DO NOT MERGE ]" into snap-temp-L07900000056674784
Tianjie Xu [Wed, 5 Apr 2017 21:46:27 +0000 (14:46 -0700)]
Fix out of bound read in libziparchive
Change-Id: I0813fb54ea2f3f79dea7519f705c0ff8be6d8c2b
Wei Wang [Mon, 20 Mar 2017 21:21:06 +0000 (14:21 -0700)]
init.rc: remove bg_non_interactive cgroup [ DO NOT MERGE ]
Change-Id: I0866e794aed68ba9d83b125215b95fbc3270a5c4
Wei Wang [Mon, 20 Mar 2017 22:13:05 +0000 (15:13 -0700)]
libcutils: only change cgroup when fd is initialized [ DO NOT MERGE ]
Change-Id: Ide2cfb0c50282f5c385545d879a67f2f571a5487
Tianjie Xu [Wed, 5 Apr 2017 21:46:27 +0000 (14:46 -0700)]
Fix out of bound read in libziparchive
We should check the boundary of central directory before checking its
signature. Swap the order of these two checks.
Bug:
36392138
Test: libziparchive doesn't read the signature after boundary check fails.
Change-Id: Ie89f709bb2d1ccb647116fb7ccb1e23c943e5ab8
(cherry picked from commit
74464a1361562d4042a67c5d66bfcf396ee7e59c)
(cherry picked from commit
d9fd1863f46d5185eaaebc0803ee9c5da3ef110b)
Tianjie Xu [Wed, 5 Apr 2017 21:46:27 +0000 (14:46 -0700)]
Fix out of bound read in libziparchive
We should check the boundary of central directory before checking its
signature. Swap the order of these two checks.
Bug:
36392138
Test: libziparchive doesn't read the signature after boundary check fails.
Change-Id: Ie89f709bb2d1ccb647116fb7ccb1e23c943e5ab8
(cherry picked from commit
74464a1361562d4042a67c5d66bfcf396ee7e59c)
(cherry picked from commit
d9fd1863f46d5185eaaebc0803ee9c5da3ef110b)
gitbuildkicker [Thu, 30 Mar 2017 23:18:05 +0000 (16:18 -0700)]
merge in nyc-mr2-release history after reset to
685b7f70a3c47f5b192e3f7478f0cd289ea6bbf8
Wei Wang [Wed, 29 Mar 2017 19:57:51 +0000 (12:57 -0700)]
libcutils: remove schedgroup fds [DO NOT MERGE]
After removing bg_non_interactive cgroup, there is only a ROOT cgroup.
This CL removes the no-op trying to set cgroup.
It also removes the attempt to open non-exist bg_non_interactive cgroup.
Bug:
36649832
Test: marlin boosts and cgroup ROOT task looks normal
Change-Id: Idef1dfdaa71fde63c98c73a3d37f65416aa6f2e2
(cherry picked from commit
bcb6419fc9ac4c33aa1429092df4428e8e3836df)
gitbuildkicker [Thu, 30 Mar 2017 18:46:27 +0000 (11:46 -0700)]
merge in nyc-mr2-release history after reset to
e6e89f99d2d254be117eaea7d1eeaf68934ef734
gitbuildkicker [Mon, 27 Mar 2017 18:10:15 +0000 (11:10 -0700)]
merge in nyc-mr2-release history after reset to nyc-mr2-dev
Wei Wang [Mon, 20 Mar 2017 22:13:05 +0000 (15:13 -0700)]
libcutils: only change cgroup when fd is initialized [ DO NOT MERGE ]
This is to avoid failues on setting non-exist cgroup
Bug:
34193533
Test: on marlin
Change-Id: I619dcba332fda9ec421df811745cf10311beddd3
(cherry picked from commit
e46aae223626432bde7d4e95818e8394664c6c02)
Wei Wang [Mon, 20 Mar 2017 21:21:06 +0000 (14:21 -0700)]
init.rc: remove bg_non_interactive cgroup [ DO NOT MERGE ]
We have seen cases when threads in this cgroup not scheduled for more than
a few seconds in heavy workload situation and causing device freeze.
In Linux, multiple threads placed in ROOT cgroup cause the CPU resource to
be split per thread, rather than per group.
Currently we have many threads in ROOT cgroup, which makes threads in
bg_non_interactive cgroup to have "tiny" CPU resource other than 5%
quota defined.
Bug:
34193533
Test: on marlin
Change-Id: I7721f6196560fbedf6265e8b6db130cec9edefd7
(cherry picked from commit
0638626e0e6c38835d36fa17326aee08235e261a)