factory: add factory_post_boot.sh/boost adbd
Add factory_post_boot.sh for factory targets to boost adbd on boot. Bug: 222226268 Change-Id: If20455705e2632eda95297952cfd770a4e8ff6f7
This commit is contained in:
parent
dced35e5c5
commit
2f2f7fd3de
4 changed files with 38 additions and 1 deletions
|
@ -12,3 +12,8 @@ on boot
|
||||||
|
|
||||||
# Audio test folder
|
# Audio test folder
|
||||||
mkdir /data/AudioTest 0775 system system
|
mkdir /data/AudioTest 0775 system system
|
||||||
|
|
||||||
|
on property:sys.boot_completed=1
|
||||||
|
# Bump nnapi min clamp & add adbd to it for factory (b/222226268)
|
||||||
|
write /sys/kernel/vendor_sched/nnapi_uclamp_min 512
|
||||||
|
exec - system system -- /vendor/bin/factory/factory_post_boot
|
||||||
|
|
25
factory/factory_post_boot/Android.bp
Normal file
25
factory/factory_post_boot/Android.bp
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
//
|
||||||
|
// Copyright (C) 2022 The Android Open Source Project
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
package {
|
||||||
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||||
|
}
|
||||||
|
sh_binary {
|
||||||
|
name: "factory_post_boot",
|
||||||
|
src: "factory_post_boot.sh",
|
||||||
|
vendor: true,
|
||||||
|
sub_dir: "factory",
|
||||||
|
}
|
||||||
|
|
4
factory/factory_post_boot/factory_post_boot.sh
Normal file
4
factory/factory_post_boot/factory_post_boot.sh
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/vendor/bin/sh
|
||||||
|
|
||||||
|
# Add adbd to nnapi vendor cgroup. (b/222226268)
|
||||||
|
echo `pidof adbd` > /sys/kernel/vendor_sched/set_task_group_nnapi
|
|
@ -63,11 +63,14 @@ DEVICE_PACKAGE_OVERLAYS += device/google/gs201/overlay-factory
|
||||||
PRODUCT_COPY_FILES += \
|
PRODUCT_COPY_FILES += \
|
||||||
device/google/gs201/conf/init.factory.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.factory.rc
|
device/google/gs201/conf/init.factory.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.factory.rc
|
||||||
|
|
||||||
|
BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/factory_boost
|
||||||
|
|
||||||
# Add factory-friendly changes
|
# Add factory-friendly changes
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
FactoryOverlaySettings \
|
FactoryOverlaySettings \
|
||||||
FactoryOverlayLauncher3 \
|
FactoryOverlayLauncher3 \
|
||||||
FactoryOverlayFrameworkRes
|
FactoryOverlayFrameworkRes \
|
||||||
|
factory_post_boot
|
||||||
|
|
||||||
# To prevent rebooting due to crashing services
|
# To prevent rebooting due to crashing services
|
||||||
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue