Commit graph

47 commits

Author SHA1 Message Date
Demon Singur
2b78290510
msm8226-common: rootdir: Do not symlink sdcard legacy path
Solves the following denial.
denied  { write } for  pid=548 comm="init" name="storage" dev="rootfs" ino=15996 scontext=u:r:vendor_init:s0 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0

Change-Id: If246f497bd8384f0fee81469d8d29dcb528d4d4e
2020-01-25 20:06:29 +03:00
Tri Vo
f851456f2d
msm8226-common: Move device-specific entries to /vendor/ueventd.rc
Change-Id: I1e530edace4c5692bc1fa063eb731c6551e39da6
2020-01-25 20:00:56 +03:00
Abhishek Arpure
1daf0485a9
msm8226-common: Move ueventd.qcom.rc to /vendor
Change-Id: Iab2699bf26ca4402b835d1af8d4493f9b28595d9
2020-01-25 19:57:01 +03:00
RomanDesigner
e9bd7422fe
[DNM] msm8226-common: Remove charger's seclabel 2020-01-25 19:44:42 +03:00
Subbaraman Narayanamurthy
ba042ba0a3
msm8226-common: rootdir: add CAP_SYS_BOOT for charger
Add CAP_SYS_BOOT capability for charger service so that it can
shutdown/reboot the system.

Change-Id: I17ccba74d5a3c38bd751c55bcf42fb3689d730a7
2020-01-25 19:43:50 +03:00
Subbaraman Narayanamurthy
87b6b7223e
msm8226-common: Change user/group permission for for charger
Make charger binary run as system instead of root. Since it
needs to handle input key events, add input as a supplemental
group in addition to system and graphics.

Change-Id: Id1dc46f335087147b7d8cf674664c26f0b511de1
2020-01-25 19:42:59 +03:00
Subbaraman Narayanamurthy
a21254abcd
msm8226-common: rootdir: Update charger service path
charger binary is moved to /system/bin. Update it accordingly.

* also set seclabel

Change-Id: I78574238f9fc5ec028d10ab866676bfc0cd36370
2020-01-25 19:41:38 +03:00
RomanDesigner
327ee766cf
msm8226-common: Don't fix /dev/alarm permission in init
We are already fixed it in ueventd.rc, so this is not needed now

This reverts commit 88892c76f5.
2020-01-25 19:36:52 +03:00
dev-harsh1998
67be5b8d30
msm8226-common: rootdir: Assign gps group to camera
* fixes geotagging of photos

Change-Id: I79a62012d94b3e3ffb5f76aaa6d55707dc2b32c4
Signed-off-by: Ad!thya R <gh0strider.2k18.reborn@gmail.com>
2020-01-24 16:08:24 +03:00
RomanDesigner
d602959b23
s3ve3g-common: Fix alarm permission in ueventd.rc 2020-01-19 18:25:49 +03:00
RomanDesigner
88892c76f5
msm8226-common: Fix /dev/alarm permission in init 2020-01-19 18:20:04 +03:00
RomanDesigner
0ea94cc42b
msm8226-common: Delete sepolicy contexts from init.qcom.rc 2020-01-06 16:51:52 +03:00
Hai Shalom
7e57ce4586
msm8226-common: Uprev wifi supplicant to 1.2 in init.qcom.rc
Update manifest with hidl 1.2 required for WPA3 and OWE.

Bug: 112195778
Test: Functional tests
2020-01-05 13:08:36 +03:00
Kim Le
1fd4b63df2
msm8226-common: Move fstab to vendor/etc 2020-01-05 13:06:17 +03:00
RomanDesigner
58de415064
msm8226-common: Move hardware specific .rc files to /vendor/etc/init/hw
The reason these files are moved to /vendor/etc/init/hw and
not /vendor/etc/init is because 'init' scans the /vendor/etc/init folder
for vendor service .rc fragments to import. That would either result
in duplicate imports or out-of-order imports of these hardware
specific .rc files and that *may* have unintended consequences.

In order to preserve the current import order for MTP, we move all
hardware specific .rc files to /vendor/etc/init/hw which is not
autoscanned by init BUT leave the init.${ro.hardware}.rc (i.e.
init.qcom.rc in this case) in root for 'init' to find.

Signed-off-by: Joshua Primero <jprimero155@gmail.com>
2020-01-05 12:56:38 +03:00
John Stultz
802f5e740f
msm8226-common: Disable nonblocking_ffs to avoid recent crashes with adbd
Recent changes to adbd have enabled nonblocking_ffs by default.

These have seeminly uncovered some bad memory corruption in the
kernel ffs gadget driver on every kernel I've tried so far.

Unfortunately I've not been able to diagnose what is going wrong,
so for now, lets disable the nonblocking_ffs.

We still need to root cause the issue as its a problem even with
the mainline kernel on HiKey, so its likely a generic kernel issue.

Change-Id: I81ac10edf5ddf9040852a4cb1f0f07c4ca16ef67
2020-01-05 12:50:04 +03:00
RomanDesigner
260468a75f
msm8226-common: Define extra folders in makefile instead of init.qcom.rc
With Android 10, these folders get wiped out unless declared at compile time.
2020-01-05 12:48:03 +03:00
padarshr
992b7b00be
msm8226-common: Address 'LOCAL_MODULE_TAGS := eng debug' deprecation.
Newer AOSP deprecates LOCAL_MODULE_TAGS := eng debug.
We now remove that and instead add the package to
PRODUCT_PACKAGES_ENG or PRODUCT_PACKAGES_DEBUG as applicable.

To ensure that we don't miss out on any package during this switch,
we add these explicitly, even though it might have been already
added under PRODUCT_PACKAGES at some other location.

Change-Id: Id1f94f34e100d616d91292efe514c201f7d24642
2020-01-05 12:35:01 +03:00
Francescodario Cuzzocrea
0b9054f915 msm8226-common: support fingerprint device
Change-Id: Ie1f37be4bff38c4cf343c76d1afc2bce84727c8f
2020-01-03 21:06:50 +01:00
Francescodario Cuzzocrea
320c019e22 msm8226-common: rootdir: restore secontex of /efs
- also fix file permissions

Change-Id: If94b70a4008fcd1d00ca15e203c37ac8e94211ae
2019-12-15 18:30:17 +01:00
pythonlimited
709a208448 msm8226-common: rootdir: correct charger seclabel 2019-10-17 16:13:03 +02:00
Francescodario Cuzzocrea
d5a4d8d567 msm8226-common: fix offline charging 2019-10-16 12:32:04 +02:00
Francescodario Cuzzocrea
d79f3a2047 msm8226-common: cleanup filesystem mounting when starting in offline charger mode 2019-10-16 12:32:04 +02:00
Francescodario Cuzzocrea
87854edbce msm8226-common: remove unnecessary stock samsung services for charger 2019-10-16 12:32:04 +02:00
Adrian DC
e8e44209b9 init: Resolve kernel trace_marker permissions on post-fs
* The permissions were not set to 222 instead of 220,
    thus introducing regular logs from libcutils:
    "cutils-trace: Error opening trace file: Permission denied (13)"

 * Refers to frameworks/native/cmds/atrace/atrace.rc

Change-Id: I236ea25d2f2068f9f86a43492807f5f05e92da96
2019-10-16 12:32:04 +02:00
Francescodario Cuzzocrea
239f611e92 msm8226-common: move init.ril.sh to vendor 2019-10-16 12:32:04 +02:00
Michael Bestas
66e4c61446 msm8226: Move init.qcom.bt.sh to vendor
Change-Id: I6b9c508e3c2b3573fba0a5bdf9281be8947fffc0
2019-10-16 12:32:04 +02:00
dianlujitao
2e680523ba msm8226-common: Rename bt props for new HAL
* Also move some stuff to vendor

Change-Id: I1afd110bffed0f43b1afcbef99be8a3776d24e0b
2019-10-16 12:32:04 +02:00
Michael Bestas
50a1d315aa msm8226-common: Set vendor.post_boot.parsed=1 before starting mpdecision
* Allows mpdecision to work properly on boot to restore selected power profile

Change-Id: Ib92f971f28ed875481170b056ac16aad05aadcfc
2019-10-16 12:32:04 +02:00
Arne Coucheron
0451bc5df8 msm8226-common: rootdir: Ensure .bt_nv.bin is owned by bluetooth
This file is used by hciattach when turning on bluetooth,
and without correct permissions, MAC address will be wrong.

Change-Id: Ie700a4be1a6b83932a9cffac45cd63f179f3edda
2019-10-16 12:32:04 +02:00
Satya Krishna Pindiproli
9b23f325aa msm8226-common: ueventd.qcom.rc: add and edit permissions of audio nodes
Change permissions of AMR-NB device node and change owner
and group of AMR-WB node to fix failure in opening of these
nodes from OMX component.

CRs-Fixed: 2072938
Change-Id: I5508529726ce0a3b763ac1364960def32887c6a2
2019-10-16 12:32:04 +02:00
Bruce Levy
a10c93e70b msm8226-common: init: Mark rmt_storage as shutdown critical
rmt_storage should not be automatically killed by Android during shutdown
since it is needed to actually process the peripheral shutdown
2019-10-16 12:32:04 +02:00
Sahitya Tummala
b6a27cf7a5 msm8226-common: init: Set ioprio for rmt_storage service
Earlier, this used to be set from rmt_storage service with
sys_admin capability. But now, that capability is dropped
off and hence, set it here in init scripts.

Change-Id: Ie8a3895c2b63da35d78fb9e571d74b735c969520
2019-10-16 12:32:04 +02:00
D. Andrei Măceș
2540653e36 msm8226-common: init: Modify time_daemon to allow settimeofday() fallback
The legacy time_daemon binary relied on the old Android alarm dri-
ver for setting RTC at bootup. Once /dev/alarm support was removed
we found that time cannot be restored properly, unless a data con-
nection was available for NTP sync.

However, the blob already has a fallback mechanism that relies on
settimeofday(), except that it could never work properly. While
time_daemon is started under UID/GID of root, it immediately drops
to system/net_raw, which is required for subsequent socket commu-
ications (e.g., QMI, modem, etc).

The issue was that any UID transition from root triggers the remo-
val of all thread capabilities, including CAP_SYS_TIME, required
for settimeofday() or other RTC adjustments. Thus, time_daemon was
edited to skip the internal set[gu]id() calls altoghether, in order
to use the new capabilities mechanism introduced with Oreo init.

Change-Id: I8a0e220b724234c26b99a09b7f54af7996129d67
Signed-off-by: D. Andrei Măceș <andrei@unlegacy-android.org>
Signed-off-by: RenanQueiroz <queirozrrq@gmail.com>
2019-10-16 12:32:04 +02:00
sb6596
3243b69821 msm8226-common: Add seclabel to hciattach service
Change-Id: I4942c3203e67fa02ba3f93cd2a26f74e11b41753
2019-10-16 12:32:04 +02:00
Ben Romberger
f59cb37284 msm8226-common: init.qcom.rc: Updated audio calibration delta file path
Audio calibration delta files folder created at
/data/misc/audio/acdbdata/delta.
Path changed to provide access to media server.
Added /data/audio/acdbdata/delta path also
for backward compatibility

Change-Id: I53031d1aecd3f12a15d76db417d7a8eafd80cf8b
2019-10-16 12:32:04 +02:00
Han Wang
d83b999e4a msm8226-common: Remove creation of /data/misc/wifi and /data/misc/dhcp
* The creation of /data/misc/wifi and /data/misc/dhcp was moved long ago
  to the core init.rc script. Moreover, /data/misc/wifi is deprecated
  since wpa_supplicant now relies on /data/vendor/wifi.

Change-Id: Ic0a33af44ffe163d3dd06cebdc1e192dc9bcb11f
2019-10-16 12:32:04 +02:00
Wang Han
e388f8ce4b msm8226-common: ueventd: Don't modify permissions of /dev/hw_random
This addresses an underlying problem since /dev/hw_random is used. The
issue is that EntropyMixer, which runs in system_server, needs to read
from /dev/hw_random, but thanks to our qualcomm ueventd, EntropyMixer
can never accress this node, resulting in warnings like this:

W EntropyMixer: Failed to add HW RNG output to entropy pool
W EntropyMixer: java.io.FileNotFoundException: /dev/hw_random (Permission denied)

AOSP ueventd handles this well, so just remove this line to get things
back to stage. This issue was never exposed because Google derps the
logging here, which is already fixed on Pie.

c78a463e87

Change-Id: I42c9aaa8f57306536e51c0a17febad57a5a77581
2019-10-16 12:32:04 +02:00
Roshan Pius
e05da8434e msm8226-common: wpa_supplicant(hidl): Add support for starting HAL lazily
Bug: 72394251
Test: Able to start supplicant from framework using
ISupplicant.getService()
Change-Id: I19b8434e7241b9028e7dc86316ec9d5512affcca
2019-10-16 12:32:04 +02:00
Roshan Pius
53358075ee msm8226-common: Don't start supplicant with interfaces
Framework will now add interface to supplicant (via HIDL) when it
needs to control an interface, so don't specify them in the startup
params.

Bug: 69426063
Test: Device boots up and able to connect to wifi.
Change-Id: I817d28093f8b982e3806c212babd888c0f5eb7c0
2019-10-16 12:32:04 +02:00
Jeff Vander Stoep
f8d387d38b msm8226-common: wpa_supplicant: Move control sockets to /data/vendor
Treble compliance.

Bug: 70228425
Bug: 70393317
Test: complete wifi test in b/70393317
Test: verify sockets exist in /data/vendor/wifi/wpa/sockets

Change-Id: I0bfc3a351419f0a03498e79664949f353369bf1b
2019-10-16 12:32:04 +02:00
Jeff Vander Stoep
49f4349027 msm8226-common: wifi_supplicant: deprecate entropy.bin
Wpa_supplicant's random pool is not necessary on Android. Randomness
is already provided by the entropymixer service which ensures
sufficient entropy is maintained across reboots. Commit b410eb1913
'Initialize /dev/urandom earlier in boot' seeds /dev/urandom with
that entropy before either wpa_supplicant or hostapd are run.

Bug: 34980020
Test: Use wifi and wifi tethering on 8974 targets
Change-Id: Iaa2a8a42e4e3fd941c5be0f8fa691245cdb429e9
2019-10-16 12:32:04 +02:00
Jeff Johnson
bd514559fd msm8226-common: wlan: Update supplicant services for new calling sequence
Change-Id: I9a2b5b2c27c8fd0e7b13e78cf02985c1c19db1b6
2019-10-16 12:32:04 +02:00
Michael Bestas
187c23c689 msm8226-common: Move wpa_supplicant overlays to vendor
Change-Id: I42e8994585615c15fb069166a79b86488e8acb25
2019-10-16 12:32:04 +02:00
pythonlimited
ba0a20ffe8 msm8226-common: give input3 correct permissions 2019-10-12 10:26:31 +02:00
Francescodario Cuzzocrea
5b0d6c9004 msm8226-common: rootdir: update power profile to be in line with stock 2019-10-12 10:26:31 +02:00
Francescodario Cuzzocrea
f89d1e5ca3 [SQUASH]: initial bringup of samsung msm8226-common repo from msm8974-common
* Rename msm8974-common -> msm8226-common
 * Import the old msm8226-common camera wrapper and apply :
	- 45e3438b26 (diff-dd6d2dcc679d12b9430a9787bab45b33)
	- 737bd8c396 (diff-dd6d2dcc679d12b9430a9787bab45b33)
	- a79e72b246 (diff-dd6d2dcc679d12b9430a9787bab45b33)
	- d4dadbaff0 (diff-dd6d2dcc679d12b9430a9787bab45b33)
	- c2eb30c314 (diff-dd6d2dcc679d12b9430a9787bab45b33)
	- 9ac995b901 (diff-dd6d2dcc679d12b9430a9787bab45b33)
 * Remove msm8974 keylayout in favour of msm8226 ones
 * Add wifi/prima relate configs for Qualcomm WIFI
 * Import libwncss from our old msm8226-common branch
 * Remove AvancedDisplay overlay as our panel does not support mDNIe
 * Import rootdir files from stock SM-G800H release, rework it taking as
 example klte one and import stock ondemand governor parameters
 * Adapt seccomp policy for msm8226
 * Adapt sensor multihal for msm8226
 * Adapt sepolicy for msm8226-common
2019-10-12 10:17:42 +02:00