We currently set all heaps to have RWX permissions of 644. However,
libdmabufheap only opens the heap files as O_RDONLY. Reduce the
permissions to 444 accordingly.
Additionally, stop overriding the default permissions given to the
system, system-uncached and system-secure heaps (which all have RWX
perrmissions of 444).
Change-Id: Icc6159acc494ab169a6d04fd86732c1b126e7b15
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Signed-off-by: pix106 <sbordenave@gmail.com>
- to comply with device tree entry
Change-Id: I7fd62a60992352cae2d9fa63a6e2fca223e7848f
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Signed-off-by: pix106 <sbordenave@gmail.com>
The char devices under /dev/mem_buf_vm each represent a
Virtual Machine to which HLOS can transfer or share memory
using an ioctl.
Change-Id: If3546148204e3b1c389975d3ec9aabd265b03012
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Signed-off-by: pix106 <sbordenave@gmail.com>
Add permissions for peripheral manager to be able to access remoteproc
nodes in order to boot modem.
Change-Id: I04ab76ef8e17c4b68c2662de57e26499201b8b3d
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Signed-off-by: pix106 <sbordenave@gmail.com>
Give access to /dev/dma_heap, with the same permissions given to
/dev/ion.
Change-Id: I4516f8771a65ee799b0ad033c37368970221325c
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Signed-off-by: pix106 <sbordenave@gmail.com>
* Prebuilt libcameraservice sets this prop to 1 if the running camera
app is MIUI/ANX camera, and 0 otherwise
* This is needed to unlock all functions of MIUI/ANX camera in
the camera HAL, such as pro mode controls, beauty modes, portrait
depth slider and much more, and mainly fixes excess noise in
camera shots taken with our ultrawide lens
* We won't keep the prop enabled by default because as long as its
enabled, gcam/mods crash immediately on launch and we don't want
that. So let's retain the stock behaviour instead.
[clarencelol]: * avc: denied { set } for property=sys.camera.miui.apk pid=1008 uid=1047 gid=1005 scontext=u:object_r:system_prop:s0 tclass=property_service permissive=0
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Signed-off-by: pix106 <sbordenave@gmail.com>
* Write to node to turn on LED in offline charging mode
Change-Id: Iee02ac9af0438b5bc4dcf08dfe19e10226d7090e
Signed-off-by: pix106 <sbordenave@gmail.com>
[clarencelol: It improves scrolling janks in my testing]
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Signed-off-by: pix106 <sbordenave@gmail.com>
With the kernel patch to separate placement hinting part of
boost signal on placement into a prefer_high_cap hint knob,
TA will lose the boost placement hint.
This CL adds placement hinting back to TA when INTERACTION
is on.
Bug: 144451857
Test: Boot & run jank test.
Change-Id: I3dcb39804d5bbaff344fbdaf64548335a1fdf1ea
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Signed-off-by: pix106 <sbordenave@gmail.com>
Since power_off_alarm is vendor module, so rename it to
vendor.power_off_alarm
Change-Id: Ib4bf6574117cd6b0a381d96de2abf4907a54785d
CRs-Fixed: 2858409
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Signed-off-by: pix106 <sbordenave@gmail.com>
* As per the init.qcom.rc service defination has vendor prefix
* This Fixes:
I init : Command 'start rmt_storage' action=boot (/vendor/etc/init/hw/init.target.rc:161) took 0ms and failed: service rmt_storage not found
Change-Id: I271adb887b9420d631e67eb4e7f436f0cd931f32
Signed-off-by: pix106 <sbordenave@gmail.com>
writepid command usage to join a cgroup has been deprecated in favor
of a more flexible approach using task_profiles. This way cgroup path
is not hardcoded and cgroup changes can be easily made. Replace
writepid with task_profiles command to migrate between cgroups.
Bug: 191283136
Test: build and boot
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: If0a64b9f335ad13f65522361b125cab951002a2c
Signed-off-by: pix106 <sbordenave@gmail.com>
On fs/post-fs trigger there are chances of vendor partition mounting,
which may block ipa loading. To prevent the same change the
trigger level.
Signed-off-by: pix106 <sbordenave@gmail.com>
* This gives proper permission to /dev/diag node so that diag driver
can load successfully
* Logs spam with error '-13' which basically translates to access denied/invalid permission.
* Fix this by giving system read and write access.
Change-Id: I87fe322e7c0d91a494d29213e6f657ed8a7032a6
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Signed-off-by: pix106 <sbordenave@gmail.com>
-Set max_comp_streams to num of cores since upstream also moves this to
percpu.
Bug: 38249616
Test: boot and run zram-perf showing better performance
Change-Id: I0b92b246d773db85aa03d033b2cecee54347cbd1
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
[clarencelol]: I'm not sure why it got removed before, it is not deprecated yet as Google still using it
Reference: https://android.googlesource.com/device/google/redbull/+/refs/tags/android-s-beta-4/fstab.hardware
Signed-off-by: pix106 <sbordenave@gmail.com>
* Needs Kernel side support
* This activates kernelspace battery saver via powerhal whenever
battery saver is enabled in userspace, thereby lowering power
consumption at kernel-level by disabling boosts and such
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Change-Id: I2623503db27d7518de519bcaa3f5af6ab83879d0
Redmi Note 7 has variants with 3GB as well as for 4GB RAM.
So use 50% for ZRAM size instead of current 3GB for both.
Parameter 'max_comp_streams' is obsolete and should not be set.
Kernel currently uses always num of online CPUs.
Change-Id: Ib0157c7b4ba686a9597fd33d268dace4e0171da7
* Adjust with wayne-common
* Switch to standalone extract utils from pa
* Update FCM level to 3
* Move IR Blaster to device specific repo
Co-authored-by: Erfan Abdi <erfangplus@gmail.com>
Co-authored-by: Michael Bestas <mkbestas@lineageos.org>
Signed-off-by: OdSazib <odsazib@gmail.com>
- In my testing, i faced some CPU Stalls with the old setup. (caused some spikes in jitter and non-consistent hackbench).
- 1000 was perfect in my testing and did not hit over power usage.
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Allow system permission for RPS sysfs nodes, so that cnss-daemon,
user space daemon can enable RPS(Receive packet steering) feature.
Change-Id: Iccebc347d959fc8ca35f28cb64e7bcf6b05f341a
CRs-Fixed: 2768237
Add rule to set permissions for the mhi_*_pipe_4 pipe that sends and
receives diag traffic to external chipsets. These nodes should have rw
access for the system group so the diag-router appplication can access
it.
Change-Id: Ia83ea035d248482790f70cbce7d42b86238ebd11
Google moved apex sessions directory from /data/apex/sessions to
/metadata/apex/sessions after commit:
"Move apex sessions directory to /metadata"
36cf4bbac6
Devices with a mounted metadata partition will have the needed
directories set up by system/core/rootdir/init.rc. Xiaomi devices
on sm6125 do not have a metadata partition out of the box, so things
like "Google Play system update" will fail to install the update.
Therefore, create a dummy directory under /data/vendor/metadata_apex
and symlink it to /metadata/apex.
The reason why the old /data/apex/sessions directory is not used
for the symlink is that apexd will call migrateSessionsDirIfNeeded()
to recursively copy things from the old directory to the new one.
Creating the symlink from /data/apex/sessions may result in
unintended behaviors.
Signed-off-by: OdSazib <odsazib@gmail.com>
Prefetching appears to have a slightly negative effect on boot time, and
actually makes boot time much worse when the available dm-bufio cache
shrinks. Since we anticipate the dm-bufio cache will shrink (because of
an increasing number of APEX dm-verity targets), disable prefetching
completely.
Boot time w/o this change: 12.085
Boot time with this change: 11.958
Boot time w/o this change with 128kB dm-bufio cache: 22.82
Boot time with this change with 128kB dm-bufio cache: 12.007
Test: atest google/perf/boottime/boottime-test
Bug: 136247322
Change-Id: I12e342c5692fa89855d9c217f2e94287ff5642a6
We dont need you at all
05-28 19:19:49.428 0 0 I init : Command 'rm /data/vendor/lct_diag/client_*' action=post-fs-data (/vendor/etc/init/hw/init.qcom.rc:371) took 0ms and failed: unlink() failed: No such file or directory
Signed-off-by: Manish4586 <manish.n.manish45@gmail.com>
Change-Id: I1d25b638e9385494f7ce883bab71ddab480559e0
All this does is to disable msm_core and set the
polling_interval to 0, which makes the driver useless.
We can achieve the same result by disabling the driver.
Change-Id: Ic19c505ed74811a3d1b76703255af3aa5cb37bf9
Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
Signed-off-by: Subhajeet Muhuri <subhajeet.muhuri@gmail.com>
Signed-off-by: OdSazib <odsazib@gmail.com>
Add support to set "ro.netflix.bsp_rev" property at run time
depending on the target. This is needed when 2 or targets are
binary compatible, but have different Netflix proprty for
device whitelisting.
Change-Id: I9484f2886a8b7d986c762fa9031c0e541f15c7e1
Update uventd rules to move new audio drivers to audio group.
Update init rc to move audio sysfs node to audio group.
Change-Id: I8e5230e04090b3555e32c0404401dddacea1cd15
* This is manually ported by me from Lavender tree on Corvus-Devices
* Thanks @StyloGey for reviewing the java code and giving me a better solution
* Original repo: https://github.com/Corvus-Devices/device_xiaomi_lavender.git
To get it working, you need these two commits in your kernel:
> c04d6d6e61
> 8e25ac3318
Signed-off-by: OdSazib <odsazib@gmail.com>
Change-Id: I1bb48ced1f23728daa2e5170647ce08a04347110
Set USB default composition to 0x9091 having diag,serial_cdev,
rmnet,adb for 8909 with kernel 4.9.
Change-Id: I3066799d801bc9d8451b0d5a0bcd6d4055d1f735
* We don't support alarm_boot anyway, also
it's not getting set because of SELinux denial:
[ 7.243347] selinux: avc: denied { set } for property=ro.alarm_boot pid=556 uid=0 gid=0 scontext=u:r:vendor_init:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service permissive=0\x0a
[ 7.243470] init: Unable to set property 'ro.alarm_boot' to 'false' from uid:0 gid:0 pid:556: SELinux permission check failed
Change-Id: Ia188bac2d2aa466c23dabd9dc50ee1f58e6ab7ee
* In favor of Low Memory Killer Daemon (lmkd).
* Adaptive LMK was also dropped quite sometime ago
making it useless to keep this script around.
Change-Id: Ie221d6f669d261bb871a77fed712b0df3f5ba248
* No matter how hard QC tried to improve these features, they still suffer
from stability issues, mainly due to the unpredictable nature of vmpressure
they rely on.
Change-Id: Icd14c79298a3c268abffa06ed17a79dececf423a
* When sys.use_fifo_ui is enabled, ActivityManager tracks the UI thread and RenderThread (the two most UI-critical threads) of the top application and makes those threads SCHED_FIFO instead of SCHED_OTHER. This effectively eliminates jitter from UI and RenderThreads; the traces that've gathered with this option enabled show runnable times on the order of microseconds instead of milliseconds.
* However, it should be enabled only when we have EAS i.e a capacity-aware RT scheduler because if RT load balancer is not capacity-aware, then there would be a 30% reduction in application startup performance.
Reference: https://source.android.com/devices/tech/debug/jank_jitter
Signed-off-by: Saurabh Charde <saurabhchardereal@gmail.com>
Signed-off-by: Aston-Martinn <advaithbhat9@gmail.com>
Change-Id: I8b55ad1899be985fc7357abaf06d68d6a130fb75
This patch will remove deprecated code for wpa_supplicant
which is creating symlink with system directory.
Change-Id: I95d1c61ab59addc04c1e7d462529bb9400bbfe92
CRs-Fixed: 2644788
Those values seem off. CAF maybe messed them up as those values look possibly wrong.
Those values are used as powerhint values on pixel 2 and 3.
Signed-off-by: Dusan Uveric <dusan.uveric9@gmail.com>
Change-Id: I1eebb1f57a7e91f26b9900cda65ec151b05ecbd7
* No matter how hard QC tried to improve these features, they still suffer
from stability issues, mainly due to the unpredictable nature of vmpressure
they rely on.
Signed-off-by: PIPIPIG233666 <2212848813@qq.com>
Change-Id: I8256abb91b7e3160670ec45a22fdceeecc2a928c
Removing the check of 1GB RAM while enabling
low_ram target specific configurations to enable them
for 2GB RAM targets as well.
Updating ZRAM size to 75% of RAM for <2GB devices
Change-Id: I8d5341a4397cd20f2c59e7396801fcbea7fe5b73
Move the ADSP start KPI marker within the adsp-loader code instead
of adding the same in .rc file.
Change-Id: Ib67f5775dfb9fdca47e62a189de9994b7a6624e8
Fix reboot after 120 seconds on WLAN tethering enable.
Fix "target device is connected but no internet" issue.
Move ipacm-related sections from rootdir/etc/init.qcom.rc to data-ipa-cfg-mgr/ipacm/src/ipacm.rc
Make ipacm.rc look like vendor/qcom/opensource/data-ipa-cfg-mgr/ipacm/src/ipacm.rc but add
writepid /dev/cpuset/system-background/tasks to the service definition.
This let ipacm start after data decryption (it got killed on data decrypt and not respawned,
because was disabled).
This fixes following errors:
04-01 14:35:57.525 591 17586 W libc : Unable to set property "ctl.interface_start" to "android.hardware.tetheroffload.config@1.0::IOffloadConfig/default": error code: 0x20
04-01 14:35:57.526 2665 3190 I ServiceManagement: getService: Trying again for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default...
04-01 14:35:57.526 591 17586 E hwservicemanager: Failed to set property for starting android.hardware.tetheroffload.config@1.0::IOffloadConfig/default
Set wifi.active.interface context to exported_wifi_prop and allow hal_wifi_default to set it.
I don't know why context definition was not embedded to the contexts file, but now it is.
This fixes following errors:
[163263.846522] selinux: avc: denied { set } for property=wifi.active.interface pid=2733 uid=1010 gid=1010 scontext=u:r:hal_wifi_default:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service permissive=0
Change-Id: I735e7d8d8d07b9545ef16a6baa35a13aba3cd116
As it turned out, allowing background, system-background, restricted,
foreground and top-app to use all 8 cores results in severe jitter and lag
whenever background tasks are running, whether it be on boot, or during waking up
from sleep.
This commit readds pinning background to cores 0-1, system-background and
restricted to cores 0-3, foreground to cores 0-6 and top-app to cores 0-7.
Change-Id: Idb76879e75e05b437600f0b689c260c674eb7eea
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
During bootup the device first enumerates in ADB only composition
and then falls back to the persist.sys.usb.config.
Prevent this enumeration in ADB only composition during bootup
by setting the sys.usb.configfs from init.qcom.usb.rc
Change-Id: I4d9aa8454202b8118ff76dfda7f44c6413c42020