Compare commits
131 Commits
android-11
...
android-12
Author | SHA1 | Date |
---|---|---|
Damillora | e067501cc5 | |
Damillora | 5e59ceff81 | |
Damillora | 9eefd61dcd | |
Damillora | 16cb93485c | |
Pierre-Hugues Husson | bbc2268788 | |
Pierre-Hugues HUSSON | 6335412007 | |
Andy CrossGate Yan | 88b1230dee | |
Pierre-Hugues HUSSON | adad184263 | |
Alberto Ponces | d5610375c4 | |
Pierre-Hugues Husson | b67b41a7e4 | |
Pierre-Hugues Husson | a60d82afb0 | |
Pierre-Hugues HUSSON | ceeeb076e3 | |
Coxxs | 1633ecfb93 | |
Pierre-Hugues HUSSON | 85b2d3901f | |
haridhayal11 | 2df56defaa | |
Pierre-Hugues HUSSON | cb0571e717 | |
Katharine Chui | a08581af05 | |
Pierre-Hugues HUSSON | e866a6a8cb | |
haridhayal11 | 63ba6b279c | |
Pierre-Hugues HUSSON | 2d7f415cd1 | |
Andy CrossGate Yan | 06fe9bb640 | |
Pierre-Hugues HUSSON | abedbd4e09 | |
Hakalle | ca50009cbe | |
Pierre-Hugues Husson | d815e2bd67 | |
Pierre-Hugues Husson | 71f0000b6a | |
Pierre-Hugues Husson | 2f9ccbeab5 | |
Pierre-Hugues Husson | 90760ae5bd | |
Pierre-Hugues Husson | be9a39aff4 | |
Pierre-Hugues HUSSON | deaf416f56 | |
rinmichi | 9a68ff5d63 | |
Pierre-Hugues HUSSON | 91a71765eb | |
Jay | b4a09c8531 | |
Pierre-Hugues Husson | 39d801473b | |
Pierre-Hugues Husson | 56295977db | |
Pierre-Hugues Husson | d4520330a6 | |
Pierre-Hugues HUSSON | 817b1903e7 | |
Andy CrossGate Yan | 92b36d168f | |
Pierre-Hugues HUSSON | a0477a4836 | |
Jesús R | eb74cd65ed | |
Pierre-Hugues Husson | 985778a03b | |
Pierre-Hugues Husson | 30985a7bef | |
Pierre-Hugues Husson | d827035fd4 | |
Pierre-Hugues Husson | 0048f513fd | |
Pierre-Hugues Husson | f85c88a1c7 | |
Victor Bo | d192015aaf | |
Pierre-Hugues Husson | 4c5d7dad33 | |
Pierre-Hugues Husson | 28f50a1557 | |
Pierre-Hugues HUSSON | 6c7bcae712 | |
pjgowtham | 6ff9da18ad | |
Pierre-Hugues Husson | 791981193d | |
Pierre-Hugues Husson | 7a017556af | |
Pierre-Hugues Husson | 44cdc6fa1a | |
Pierre-Hugues Husson | 9e8679d273 | |
Pierre-Hugues HUSSON | 2818802996 | |
Jesús R | af3ce8e62a | |
Jesús R | 95010d21fa | |
Pierre-Hugues HUSSON | 9b8c390698 | |
CHIDILights | b37cfd9463 | |
Pierre-Hugues HUSSON | 62c5f674d5 | |
Alberto Ponces | 108d85334d | |
Pierre-Hugues Husson | 04cd1b8997 | |
Pierre-Hugues Husson | c9638e910c | |
Pierre-Hugues HUSSON | 3d97cad8e0 | |
Alberto Ponces | 9f28446abd | |
Pierre-Hugues Husson | 50903fde85 | |
Pierre-Hugues Husson | eb24d77380 | |
Pierre-Hugues HUSSON | 155fad8a06 | |
Andy CrossGate Yan | 90e92a5655 | |
Pierre-Hugues Husson | 5874b86caf | |
Quallenauge | a4d6f5c8d3 | |
Pierre-Hugues HUSSON | 6ec496b398 | |
Alberto Ponces | a66fa56752 | |
Pierre-Hugues Husson | b962aa4bfd | |
Pierre-Hugues Husson | b3aad18611 | |
Pierre-Hugues Husson | 089c23d062 | |
Pierre-Hugues Husson | e32ab4aff1 | |
Pierre-Hugues Husson | 329bbe82af | |
Pierre-Hugues Husson | 089dcc7bc0 | |
Pierre-Hugues Husson | 59a5f1a447 | |
Pierre-Hugues HUSSON | 617e2320fb | |
Andy CrossGate Yan | 5ae932aa76 | |
Pierre-Hugues HUSSON | 10a42e0e8c | |
Alberto Ponces | f7060bda94 | |
Pierre-Hugues Husson | 141780a2ac | |
Pierre-Hugues HUSSON | fdc8be8692 | |
Pessi Päivärinne | 5dbc29cc18 | |
Pierre-Hugues HUSSON | cef4fa61fd | |
Alberto Ponces | 95cdb160d5 | |
Pierre-Hugues Husson | 62216987bc | |
Pierre-Hugues Husson | 230b6083b2 | |
Pierre-Hugues Husson | 8c908a0f51 | |
Pierre-Hugues Husson | 2a099c2c5a | |
Pierre-Hugues Husson | 4b86b1ccb5 | |
Pierre-Hugues Husson | bf333ce566 | |
Pierre-Hugues HUSSON | 63ef13a2f8 | |
Jesús R | 4babb2da95 | |
Jesús R | 9b9b7794e7 | |
Pierre-Hugues HUSSON | f96d4cb317 | |
Andy CrossGate Yan | fca972de6f | |
Pierre-Hugues HUSSON | 1e74ebda8d | |
Sarah Vandomelen | 8d11e629c4 | |
Pierre-Hugues Husson | 19533fb782 | |
Pierre-Hugues Husson | ee833b1d7d | |
Pierre-Hugues Husson | 3aad44c311 | |
Pierre-Hugues HUSSON | 723d9cb4f8 | |
Andy CrossGate Yan | 826784b4ae | |
Pierre-Hugues HUSSON | e9855ca82d | |
Alberto Ponces | 66cc06b0a9 | |
Pierre-Hugues HUSSON | 06a00ae37c | |
Andy CrossGate Yan | 7f627a4fe7 | |
Pierre-Hugues Husson | 2fa02fbf17 | |
Pierre-Hugues Husson | f179d6c320 | |
Pierre-Hugues Husson | b66b7aa968 | |
Pierre-Hugues HUSSON | 1aece75b52 | |
vgdn1942 | 187b2ec484 | |
vgdn1942 | 37373d808c | |
Pierre-Hugues Husson | f2481fbc1d | |
Pierre-Hugues Husson | 09a83de001 | |
Pierre-Hugues Husson | 20171be647 | |
Pierre-Hugues Husson | d6a1c9b772 | |
Pierre-Hugues Husson | 9152974ac7 | |
Pierre-Hugues Husson | 46d7d94e9f | |
Pierre-Hugues Husson | fc4969ac98 | |
Pierre-Hugues Husson | 1bb44a597e | |
Pierre-Hugues Husson | c09b32e27b | |
Pierre-Hugues Husson | c21a8e5013 | |
Pierre-Hugues Husson | 0ff308b3e7 | |
Pierre-Hugues Husson | 0050f8a5cd | |
Pierre-Hugues Husson | 9e30f63a84 | |
Pierre-Hugues Husson | 6a1917d307 | |
Pierre-Hugues Husson | 6f2be782fb |
37
base.mk
37
base.mk
|
@ -102,6 +102,7 @@ PRODUCT_PACKAGES += \
|
|||
vendor.huawei.hardware.tp-V1.0-java \
|
||||
vendor.qti.hardware.radio.am-V1.0-java \
|
||||
vendor.qti.qcril.am-V1.0-java \
|
||||
vendor.xiaomi.hardware.displayfeature-V1.0-java
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/phh/treble/interfaces.xml:system/etc/permissions/interfaces.xml
|
||||
|
@ -131,6 +132,9 @@ PRODUCT_COPY_FILES += \
|
|||
device/phh/treble/files/zf6-goodixfp.kl:system/phh/zf6-goodixfp.kl \
|
||||
device/phh/treble/files/zf6-googlekey_input.kl:system/phh/zf6-googlekey_input.kl \
|
||||
device/phh/treble/files/teracube2e-mtk-kpd.kl:system/phh/teracube2e-mtk-kpd.kl \
|
||||
device/phh/treble/files/bv9500plus-mtk-kpd.kl:system/phh/bv9500plus-mtk-kpd.kl \
|
||||
device/phh/treble/files/moto-liber-gpio-keys.kl:system/phh/moto-liber-gpio-keys.kl \
|
||||
device/phh/treble/files/tecno-touchpanel.kl:system/phh/tecno-touchpanel.kl \
|
||||
|
||||
SELINUX_IGNORE_NEVERALLOWS := true
|
||||
|
||||
|
@ -140,6 +144,7 @@ PRODUCT_PACKAGES += \
|
|||
|
||||
PRODUCT_PACKAGES += \
|
||||
lightsctl \
|
||||
lightsctl-aidl \
|
||||
uevent
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
|
@ -198,10 +203,42 @@ PRODUCT_PACKAGES += \
|
|||
|
||||
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
||||
debug.fdsan=warn_once \
|
||||
ro.apex.updatable=false \
|
||||
persist.sys.fflag.override.settings_provider_model=false \
|
||||
ro.setupwizard.mode=OPTIONAL \
|
||||
|
||||
PRODUCT_PRODUCT_PROPERTIES += \
|
||||
ro.setupwizard.mode=OPTIONAL \
|
||||
|
||||
# AOSP overlays
|
||||
PRODUCT_PACKAGES += \
|
||||
NavigationBarMode2ButtonOverlay
|
||||
|
||||
# ThemePicker
|
||||
PRODUCT_PACKAGES += \
|
||||
ThemePicker
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
oplus-alert-slider
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/phh/treble/empty:system/etc/smartpa_params/empty \
|
||||
device/phh/treble/proprietary-files/gome/fs16xx_01s_left.preset:system/phh/gome/fs16xx_01s_left.preset \
|
||||
device/phh/treble/proprietary-files/gome/fs16xx_01s_mono.preset:system/phh/gome/fs16xx_01s_mono.preset \
|
||||
device/phh/treble/proprietary-files/gome/fs16xx_01s_right.preset:system/phh/gome/fs16xx_01s_right.preset \
|
||||
device/phh/treble/proprietary-files/umidigi/fs16xx_01s_mono.preset:system/phh/umidigi/fs16xx_01s_mono.preset
|
||||
|
||||
PRODUCT_PACKAGES += phh-ota
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
xiaomi-touch
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration_7_0.xml:system/etc/a2dp_audio_policy_configuration_7_0.xml \
|
||||
frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:system/etc/a2dp_audio_policy_configuration.xml \
|
||||
|
||||
include build/make/target/product/gsi_release.mk
|
||||
|
||||
# Protect deskclock from power save
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/phh/treble/files/com.android.deskclock_whitelist.xml:system/etc/sysconfig/com.android.deskclock_whitelist.xml
|
||||
|
|
|
@ -3,4 +3,7 @@ BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/phh/treble/bluetooth
|
|||
TARGET_EXFAT_DRIVER := exfat
|
||||
DEVICE_FRAMEWORK_MANIFEST_FILE := device/phh/treble/framework_manifest.xml
|
||||
|
||||
BOARD_ROOT_EXTRA_FOLDERS += bt_firmware sec_storage efs
|
||||
BOARD_ROOT_EXTRA_FOLDERS += bt_firmware sec_storage efs persist
|
||||
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
|
||||
|
||||
BOARD_ROOT_EXTRA_SYMLINKS := $(filter-out $(BOARD_ROOT_EXTRA_SYMLINKS),/mnt/vendor/persist:/persist)
|
||||
|
|
Binary file not shown.
109
cmds/Android.bp
109
cmds/Android.bp
|
@ -183,71 +183,13 @@ cc_binary {
|
|||
],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "lptools",
|
||||
cflags: [
|
||||
"-Werror",
|
||||
"-Wextra",
|
||||
],
|
||||
device_supported: true,
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"liblog",
|
||||
"liblp",
|
||||
"libsparse",
|
||||
"libfs_mgr",
|
||||
"libutils",
|
||||
"libcutils",
|
||||
"android.hardware.boot@1.1",
|
||||
"libhidlbase",
|
||||
],
|
||||
static_libs: [
|
||||
"libdm",
|
||||
],
|
||||
srcs: [
|
||||
"lptools.cc",
|
||||
],
|
||||
cppflags: [
|
||||
"-D_FILE_OFFSET_BITS=64",
|
||||
],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "lptools_static",
|
||||
cflags: [
|
||||
"-Werror",
|
||||
"-Wextra",
|
||||
"-DLPTOOLS_STATIC",
|
||||
],
|
||||
device_supported: true,
|
||||
shared_libs: [
|
||||
"libcrypto",
|
||||
],
|
||||
static_libs: [
|
||||
"libbase",
|
||||
"liblog",
|
||||
"liblp",
|
||||
"libsparse",
|
||||
"libfs_mgr",
|
||||
"libutils",
|
||||
"libcutils",
|
||||
"libdm",
|
||||
"libext4_utils",
|
||||
],
|
||||
srcs: [
|
||||
"lptools.cc",
|
||||
],
|
||||
cppflags: [
|
||||
"-D_FILE_OFFSET_BITS=64",
|
||||
],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "sec-camera-list",
|
||||
srcs: [
|
||||
"sec-camera-list.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
"vendor.samsung.hardware.camera.provider@4.0",
|
||||
"vendor.samsung.hardware.camera.provider@3.0",
|
||||
"libutils",
|
||||
"libhidlbase",
|
||||
|
@ -263,3 +205,52 @@ cc_binary {
|
|||
"oplus-alert-slider.rc",
|
||||
],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "xiaomi-touch",
|
||||
srcs: [
|
||||
"xiaomi-touch.cpp",
|
||||
],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "sec-ril",
|
||||
srcs: [
|
||||
"sec-ril.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
"android.hardware.radio@1.6",
|
||||
"vendor.samsung.hardware.radio@2.0",
|
||||
"vendor.samsung.hardware.radio@2.1",
|
||||
"vendor.samsung.hardware.radio@2.2",
|
||||
"libutils",
|
||||
"libhidlbase",
|
||||
],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "sec-torch",
|
||||
srcs: [
|
||||
"sec-torch.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
"vendor.samsung.hardware.camera.provider@4.0",
|
||||
"vendor.samsung.hardware.camera.provider@3.0",
|
||||
"vendor.samsung.hardware.camera.device@5.0",
|
||||
"libutils",
|
||||
"libhidlbase",
|
||||
],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "lightsctl-aidl",
|
||||
srcs: [
|
||||
"lightsctl-aidl.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
"android.hardware.light-V1-cpp",
|
||||
"libutils",
|
||||
"libhidlbase",
|
||||
"libbinder",
|
||||
],
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
typedef struct {
|
||||
int dir;
|
||||
|
@ -27,4 +28,5 @@ int main(int argc, char **argv) {
|
|||
cfg.speed = 4;
|
||||
|
||||
ioctl(fd, ASUS_MOTOR_DRV_MANUAL_MODE, &cfg);
|
||||
close(fd);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
#include <iostream>
|
||||
#include <android/hardware/light/ILights.h>
|
||||
#include <binder/IServiceManager.h>
|
||||
|
||||
using ::android::hardware::light::ILights;
|
||||
using ::android::sp;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
auto svc = android::waitForVintfService<ILights>();
|
||||
std::vector<android::hardware::light::HwLight> lights;
|
||||
svc->getLights(&lights);
|
||||
for(const auto& l : lights) {
|
||||
std::cout << "Got light " << l.id << std::endl;
|
||||
std::cout << " " << l.ordinal << std::endl;
|
||||
std::cout << " " << toString(l.type) << std::endl;
|
||||
}
|
||||
if(argc <= 1) return 0;
|
||||
if(argc != 3 && argc != 6) return 1;
|
||||
|
||||
std::string typeArg(argv[1]);
|
||||
android::hardware::light::LightType type;
|
||||
if(typeArg == "BACKLIGHT")
|
||||
type = android::hardware::light::LightType::BACKLIGHT;
|
||||
if(typeArg == "KEYBOARD")
|
||||
type = android::hardware::light::LightType::KEYBOARD;
|
||||
if(typeArg == "BUTTONS")
|
||||
type = android::hardware::light::LightType::BUTTONS;
|
||||
if(typeArg == "BATTERY")
|
||||
type = android::hardware::light::LightType::BATTERY;
|
||||
if(typeArg == "NOTIFICATIONS")
|
||||
type = android::hardware::light::LightType::NOTIFICATIONS;
|
||||
if(typeArg == "ATTENTION")
|
||||
type = android::hardware::light::LightType::ATTENTION;
|
||||
if(typeArg == "BLUETOOTH")
|
||||
type = android::hardware::light::LightType::BLUETOOTH;
|
||||
if(typeArg == "WIFI")
|
||||
type = android::hardware::light::LightType::WIFI;
|
||||
std::cout << "Set request type " << toString(type) << std::endl;
|
||||
|
||||
int lightId = -1;
|
||||
for(const auto& l : lights) {
|
||||
if(l.type == type) {
|
||||
lightId = l.id;
|
||||
std::cout << "Got matching light " << l.id << std::endl;
|
||||
std::cout << " " << l.ordinal << std::endl;
|
||||
std::cout << " " << toString(l.type) << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
android::hardware::light::HwLightState state;
|
||||
state.color = (uint32_t)strtoll(argv[2], NULL, 16);
|
||||
state.flashMode = android::hardware::light::FlashMode::NONE;
|
||||
state.brightnessMode = android::hardware::light::BrightnessMode::USER;
|
||||
|
||||
if(argc == 6) {
|
||||
std::string flashArg(argv[3]);
|
||||
if(flashArg == "NONE")
|
||||
state.flashMode = android::hardware::light::FlashMode::NONE;
|
||||
if(flashArg == "TIMED")
|
||||
state.flashMode = android::hardware::light::FlashMode::TIMED;
|
||||
if(flashArg == "HARDWARE")
|
||||
state.flashMode = android::hardware::light::FlashMode::HARDWARE;
|
||||
|
||||
state.flashOnMs = atoi(argv[4]);
|
||||
state.flashOffMs = atoi(argv[5]);
|
||||
}
|
||||
std::cout << "Set flash type to " << toString(state.flashMode) << std::endl;
|
||||
|
||||
auto ret = svc->setLightState(lightId, state);
|
||||
std::cout << "Set light returned " << ret << std::endl;
|
||||
}
|
309
cmds/lptools.cc
309
cmds/lptools.cc
|
@ -1,309 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2018 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.
|
||||
*/
|
||||
|
||||
#include <getopt.h>
|
||||
#include <inttypes.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <sys/types.h>
|
||||
#include <sysexits.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <optional>
|
||||
#include <regex>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <chrono>
|
||||
|
||||
#include <android-base/parseint.h>
|
||||
#include <android-base/properties.h>
|
||||
#include <android-base/strings.h>
|
||||
#include <cutils/android_get_control_file.h>
|
||||
#include <fs_mgr.h>
|
||||
#include <liblp/builder.h>
|
||||
#include <liblp/liblp.h>
|
||||
#include <fs_mgr_dm_linear.h>
|
||||
#include <libdm/dm.h>
|
||||
|
||||
#ifndef LPTOOLS_STATIC
|
||||
#include <android/hardware/boot/1.1/IBootControl.h>
|
||||
#include <android/hardware/boot/1.1/types.h>
|
||||
#endif
|
||||
|
||||
using namespace android;
|
||||
using namespace android::fs_mgr;
|
||||
|
||||
class FileOrBlockDeviceOpener final : public PartitionOpener {
|
||||
public:
|
||||
android::base::unique_fd Open(const std::string& path, int flags) const override {
|
||||
// Try a local file first.
|
||||
android::base::unique_fd fd;
|
||||
|
||||
#ifdef __ANDROID__
|
||||
fd.reset(android_get_control_file(path.c_str()));
|
||||
if (fd >= 0) return fd;
|
||||
#endif
|
||||
fd.reset(open(path.c_str(), flags));
|
||||
if (fd >= 0) return fd;
|
||||
|
||||
return PartitionOpener::Open(path, flags);
|
||||
}
|
||||
};
|
||||
|
||||
static FileOrBlockDeviceOpener opener;
|
||||
std::unique_ptr<MetadataBuilder> makeBuilder() {
|
||||
auto builder = MetadataBuilder::New(opener, "super", 0);
|
||||
if(builder == nullptr) {
|
||||
std::cout << "Failed creating super builder" << std::endl;
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
|
||||
void saveToDisk(std::unique_ptr<MetadataBuilder> builder) {
|
||||
auto newMetadata = builder->Export();
|
||||
int nSlots = 2;//pt->geometry.metadata_slot_count;
|
||||
for(int slot=0; slot < nSlots; slot++) {
|
||||
std::cout << "Saving the updated partition table " << UpdatePartitionTable(opener, "super", *newMetadata, slot) << " for slot " << slot << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
inline bool ends_with(std::string const & value, std::string const & ending)
|
||||
{
|
||||
if (ending.size() > value.size()) return false;
|
||||
return std::equal(ending.rbegin(), ending.rend(), value.rbegin());
|
||||
}
|
||||
|
||||
std::string findGroup(std::unique_ptr<MetadataBuilder>& builder) {
|
||||
auto groups = builder->ListGroups();
|
||||
|
||||
auto partitionName = "system" + ::android::base::GetProperty("ro.boot.slot_suffix", "");
|
||||
for(auto groupName: groups) {
|
||||
auto partitions = builder->ListPartitionsInGroup(groupName);
|
||||
for (const auto& partition : partitions) {
|
||||
if(partition->name() == partitionName) {
|
||||
return groupName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string maxGroup = "";
|
||||
uint64_t maxGroupSize = 0;
|
||||
for(auto groupName: groups) {
|
||||
auto group = builder->FindGroup(groupName);
|
||||
if(group->maximum_size() > maxGroupSize) {
|
||||
maxGroup = groupName;
|
||||
maxGroupSize = group->maximum_size();
|
||||
}
|
||||
}
|
||||
|
||||
return maxGroup;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
if(argc<=1) {
|
||||
std::cerr << "Usage: " << argv[0] << " <create|remove|resize|rename>" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
auto builder = makeBuilder();
|
||||
auto group = findGroup(builder);
|
||||
std::cout << "Best group seems to be " << group << std::endl;
|
||||
|
||||
if(strcmp(argv[1], "create") == 0) {
|
||||
if(argc != 4) {
|
||||
std::cerr << "Usage: " << argv[0] << " create <partition name> <partition size>" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
auto partName = argv[2];
|
||||
auto size = strtoll(argv[3], NULL, 0);
|
||||
auto partition = builder->FindPartition(partName);
|
||||
if(partition != nullptr) {
|
||||
std::cerr << "Partition " << partName << " already exists." << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
partition = builder->AddPartition(partName, group, 0);
|
||||
auto result = builder->ResizePartition(partition, size);
|
||||
std::cout << "Growing partition " << result << std::endl;
|
||||
if(!result) return 1;
|
||||
saveToDisk(std::move(builder));
|
||||
|
||||
std::string dmPath;
|
||||
CreateLogicalPartitionParams params {
|
||||
.block_device = "/dev/block/by-name/super",
|
||||
.metadata_slot = 0,
|
||||
.partition_name = partName,
|
||||
.timeout_ms = std::chrono::milliseconds(10000),
|
||||
.force_writable = true,
|
||||
};
|
||||
auto dmCreateRes = android::fs_mgr::CreateLogicalPartition(params, &dmPath);
|
||||
std::cout << "Creating dm partition for " << partName << " answered " << dmCreateRes << " at " << dmPath << std::endl;
|
||||
exit(0);
|
||||
} else if(strcmp(argv[1], "remove") == 0) {
|
||||
if(argc != 3) {
|
||||
std::cerr << "Usage: " << argv[0] << " remove <partition name>" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
auto partName = argv[2];
|
||||
auto dmState = android::dm::DeviceMapper::Instance().GetState(partName);
|
||||
if(dmState == android::dm::DmDeviceState::ACTIVE) {
|
||||
android::fs_mgr::DestroyLogicalPartition(partName);
|
||||
}
|
||||
builder->RemovePartition(partName);
|
||||
saveToDisk(std::move(builder));
|
||||
exit(0);
|
||||
} else if(strcmp(argv[1], "resize") == 0) {
|
||||
if(argc != 4) {
|
||||
std::cerr << "Usage: " << argv[0] << " resize <partition name> <newsize>" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
auto partName = argv[2];
|
||||
auto size = strtoll(argv[3], NULL, 0);
|
||||
auto partition = builder->FindPartition(partName);
|
||||
std::cout << "Resizing partition " << builder->ResizePartition(partition, size) << std::endl;
|
||||
saveToDisk(std::move(builder));
|
||||
exit(0);
|
||||
} else if(strcmp(argv[1], "replace") == 0) {
|
||||
if(argc != 4) {
|
||||
std::cerr << "Usage: " << argv[0] << " replace <original partition name> <new partition name>" << std::endl;
|
||||
std::cerr << "This will delete <new partition name> and rename <original partition name> to <new partition name>" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
auto src = argv[2];
|
||||
auto dst = argv[3];
|
||||
auto srcPartition = builder->FindPartition(src);
|
||||
if(srcPartition == nullptr) {
|
||||
srcPartition = builder->FindPartition(src + ::android::base::GetProperty("ro.boot.slot_suffix", ""));
|
||||
}
|
||||
auto dstPartition = builder->FindPartition(dst);
|
||||
if(dstPartition == nullptr) {
|
||||
dstPartition = builder->FindPartition(dst + ::android::base::GetProperty("ro.boot.slot_suffix", ""));
|
||||
}
|
||||
std::string dstPartitionName = dst;
|
||||
if(dstPartition != nullptr) {
|
||||
dstPartitionName = dstPartition->name();
|
||||
}
|
||||
std::vector<std::unique_ptr<Extent>> originalExtents;
|
||||
|
||||
const auto& extents = srcPartition->extents();
|
||||
for(unsigned i=0; i<extents.size(); i++) {
|
||||
const auto& extend = extents[i];
|
||||
auto linear = extend->AsLinearExtent();
|
||||
if(linear != nullptr) {
|
||||
auto copyLinear = std::make_unique<LinearExtent>(linear->num_sectors(), linear->device_index(), linear->physical_sector());
|
||||
originalExtents.push_back(std::move(copyLinear));
|
||||
} else {
|
||||
auto copyZero = std::make_unique<ZeroExtent>(extend->num_sectors());
|
||||
originalExtents.push_back(std::move(copyZero));
|
||||
}
|
||||
}
|
||||
builder->RemovePartition(srcPartition->name());
|
||||
builder->RemovePartition(dstPartitionName);
|
||||
auto newDstPartition = builder->AddPartition(dstPartitionName, group, 0);
|
||||
for(auto&& extent: originalExtents) {
|
||||
newDstPartition->AddExtent(std::move(extent));
|
||||
}
|
||||
saveToDisk(std::move(builder));
|
||||
exit(0);
|
||||
} else if(strcmp(argv[1], "map") == 0) {
|
||||
if(argc != 3) {
|
||||
std::cerr << "Usage: " << argv[0] << " map <partition name>" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
auto partName = argv[2];
|
||||
std::string dmPath;
|
||||
CreateLogicalPartitionParams params {
|
||||
.block_device = "/dev/block/by-name/super",
|
||||
.metadata_slot = 0,
|
||||
.partition_name = partName,
|
||||
.timeout_ms = std::chrono::milliseconds(10000),
|
||||
.force_writable = true,
|
||||
};
|
||||
auto dmCreateRes = android::fs_mgr::CreateLogicalPartition(params, &dmPath);
|
||||
std::cout << "Creating dm partition for " << partName << " answered " << dmCreateRes << " at " << dmPath << std::endl;
|
||||
exit(0);
|
||||
} else if(strcmp(argv[1], "unmap") == 0) {
|
||||
if(argc != 3) {
|
||||
std::cerr << "Usage: " << argv[0] << " unmap <partition name>" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
auto partName = argv[2];
|
||||
auto dmState = android::dm::DeviceMapper::Instance().GetState(partName);
|
||||
if(dmState == android::dm::DmDeviceState::ACTIVE) {
|
||||
android::fs_mgr::DestroyLogicalPartition(partName);
|
||||
}
|
||||
exit(0);
|
||||
} else if(strcmp(argv[1], "free") == 0) {
|
||||
if(argc != 2) {
|
||||
std::cerr << "Usage: " << argv[0] << " free" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
auto groupO = builder->FindGroup(group);
|
||||
uint64_t maxSize = groupO->maximum_size();
|
||||
|
||||
uint64_t total = 0;
|
||||
auto partitions = builder->ListPartitionsInGroup(group);
|
||||
for (const auto& partition : partitions) {
|
||||
total += partition->BytesOnDisk();
|
||||
}
|
||||
|
||||
uint64_t groupAllocatable = maxSize - total;
|
||||
uint64_t superFreeSpace = builder->AllocatableSpace() - builder->UsedSpace();
|
||||
if(groupAllocatable > superFreeSpace || maxSize == 0)
|
||||
groupAllocatable = superFreeSpace;
|
||||
|
||||
printf("Free space: %" PRIu64 "\n", groupAllocatable);
|
||||
|
||||
exit(0);
|
||||
} else if(strcmp(argv[1], "unlimited-group") == 0) {
|
||||
builder->ChangeGroupSize(group, 0);
|
||||
saveToDisk(std::move(builder));
|
||||
return 0;
|
||||
} else if(strcmp(argv[1], "clear-cow") == 0) {
|
||||
#ifndef LPTOOLS_STATIC
|
||||
// Ensure this is a V AB device, and that no merging is taking place (merging? in gsi? uh)
|
||||
auto svc1_1 = ::android::hardware::boot::V1_1::IBootControl::tryGetService();
|
||||
if(svc1_1 == nullptr) {
|
||||
std::cerr << "Couldn't get a bootcontrol HAL. You can clear cow only on V AB devices" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
auto mergeStatus = svc1_1->getSnapshotMergeStatus();
|
||||
if(mergeStatus != ::android::hardware::boot::V1_1::MergeStatus::NONE) {
|
||||
std::cerr << "Merge status is NOT none, meaning a merge is pending. Clearing COW isn't safe" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint64_t superFreeSpace = builder->AllocatableSpace() - builder->UsedSpace();
|
||||
std::cerr << "Super allocatable " << superFreeSpace << std::endl;
|
||||
|
||||
uint64_t total = 0;
|
||||
auto partitions = builder->ListPartitionsInGroup("cow");
|
||||
for (const auto& partition : partitions) {
|
||||
std::cout << "Deleting partition? " << partition->name() << std::endl;
|
||||
if(ends_with(partition->name(), "-cow")) {
|
||||
std::cout << "Deleting partition " << partition->name() << std::endl;
|
||||
builder->RemovePartition(partition->name());
|
||||
}
|
||||
}
|
||||
saveToDisk(std::move(builder));
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -44,11 +44,11 @@ int main() {
|
|||
}
|
||||
printf("State %d\n", read_tristate());
|
||||
if(state == 1) {
|
||||
system("service call audio 31 i32 2 s16 android");
|
||||
system("service call audio 32 i32 0 s16 android");
|
||||
} else if(state == 2) {
|
||||
system("service call audio 31 i32 1 s16 android");
|
||||
system("service call audio 32 i32 1 s16 android");
|
||||
} else if(state == 3) {
|
||||
system("service call audio 31 i32 0 s16 android");
|
||||
system("service call audio 32 i32 2 s16 android");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
service phhoplus-alert-slider /system/bin/oplus-alert-slider
|
||||
seclabel u:r:phhsu_daemon:s0
|
||||
oneshot
|
||||
class main
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <iostream>
|
||||
#include <vendor/samsung/hardware/camera/provider/3.0/ISehCameraProvider.h>
|
||||
#include <vendor/samsung/hardware/camera/provider/4.0/ISehCameraProvider.h>
|
||||
|
||||
using ::vendor::samsung::hardware::camera::provider::V3_0::ISehCameraProvider;
|
||||
using ::vendor::samsung::hardware::camera::provider::V4_0::ISehCameraProvider;
|
||||
using ::android::sp;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
#include <iostream>
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
#include <vendor/samsung/hardware/radio/2.2/ISehRadio.h>
|
||||
#include <android/hardware/radio/1.6/IRadio.h>
|
||||
|
||||
using ::vendor::samsung::hardware::radio::V2_2::ISehRadio;
|
||||
using ::android::hardware::radio::V1_6::IRadio;
|
||||
using ::android::sp;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
auto svc = ISehRadio::getService(argv[1]);
|
||||
|
||||
//setNrMode
|
||||
#if 0
|
||||
android::hardware::hidl_vec<uint8_t> cmd = {
|
||||
2, 131, 0, 5, (uint8_t)atoi(argv[2]),
|
||||
};
|
||||
svc->sendRequestRaw(5556, cmd);
|
||||
svc->setNrMode(5555, atoi(argv[1]));
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
//notifyRilConnected
|
||||
android::hardware::hidl_vec<uint8_t> cmd = {
|
||||
11,24,0,5,0,
|
||||
};
|
||||
svc->sendRequestRaw(5556, cmd);
|
||||
#endif
|
||||
svc->setNrMode_2_2(5555, atoi(argv[2]), true);
|
||||
|
||||
#if 0
|
||||
auto svcRadio = IRadio::getService(argv[1]);
|
||||
svcRadio->setAllowedNetworkTypesBitmap(4444, 0x1bfffe);
|
||||
svcRadio->setPreferredNetworkTypeBitmap(4443, 0x1bfffe);
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
#include <iostream>
|
||||
#include <vendor/samsung/hardware/camera/provider/4.0/ISehCameraProvider.h>
|
||||
#include <vendor/samsung/hardware/camera/device/5.0/ISehCameraDevice.h>
|
||||
|
||||
using ::vendor::samsung::hardware::camera::provider::V4_0::ISehCameraProvider;
|
||||
using ::android::sp;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
auto svc = ISehCameraProvider::getService("legacy/0");
|
||||
android::hardware::camera::common::V1_0::Status status;
|
||||
android::sp<android::hardware::camera::device::V3_2::ICameraDevice> camera_old;
|
||||
android::hardware::Return<void> ret = svc->getCameraDeviceInterface_V3_x(argv[3], [&status, &camera_old](android::hardware::camera::common::V1_0::Status s, android::sp<android::hardware::camera::device::V3_2::ICameraDevice> intf) {
|
||||
status = s;
|
||||
if(intf == nullptr) {
|
||||
fprintf(stderr, "Failed getting camera intf\n");
|
||||
}
|
||||
camera_old = intf;
|
||||
});
|
||||
if(!ret.isOk())
|
||||
fprintf(stderr, "Failed getting camera 0\n");
|
||||
|
||||
auto cameraResult = vendor::samsung::hardware::camera::device::V5_0::ISehCameraDevice::castFrom(camera_old);
|
||||
android::sp<vendor::samsung::hardware::camera::device::V5_0::ISehCameraDevice> camera = cameraResult;
|
||||
if(camera == nullptr) {
|
||||
fprintf(stderr, "Coulnd't get sammy device\n");
|
||||
}
|
||||
if(camera != nullptr) {
|
||||
fprintf(stderr, "Got sammy camera device\n");
|
||||
if(strcmp(argv[1], "on") == 0) {
|
||||
fprintf(stderr, "Truning torch mode on power %d\n", atoi(argv[2]));
|
||||
camera->sehSetTorchModeStrength(android::hardware::camera::common::V1_0::TorchMode::ON, atoi(argv[2]));
|
||||
} else {
|
||||
camera->sehSetTorchModeStrength(android::hardware::camera::common::V1_0::TorchMode::OFF, 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
#include <iostream>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#define SET_CUR_VALUE 0
|
||||
|
||||
#define Touch_Game_Mode 0
|
||||
#define Touch_Active_MODE 1
|
||||
#define Touch_UP_THRESHOLD 2
|
||||
#define Touch_Tolerance 3
|
||||
#define Touch_Aim_Sensitivity 4
|
||||
#define Touch_Tap_Stability 5
|
||||
#define Touch_Expert_Mode 6
|
||||
#define Touch_Edge_Filter 7
|
||||
#define Touch_Panel_Orientation 8
|
||||
#define Touch_Report_Rate 9
|
||||
#define Touch_Fod_Enable 10
|
||||
#define Touch_Aod_Enable 11
|
||||
#define Touch_Resist_RF 12
|
||||
#define Touch_Idle_Time 13
|
||||
#define Touch_Doubletap_Mode 14
|
||||
#define Touch_Grip_Mode 15
|
||||
#define Touch_FodIcon_Enable 16
|
||||
#define Touch_Nonui_Mode 17
|
||||
#define Touch_Debug_Level 18
|
||||
#define Touch_Power_Status 19
|
||||
#define Touch_Mode_NUM 20
|
||||
|
||||
#define TOUCH_DEV_PATH "/dev/xiaomi-touch"
|
||||
#define TOUCH_ID 0
|
||||
#define TOUCH_MAGIC 0x5400
|
||||
#define TOUCH_IOC_SETMODE TOUCH_MAGIC + SET_CUR_VALUE
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
if(argc != 3) {
|
||||
fprintf(stderr, "Usage: %s <mode> <0|1>\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
int mode = atoi(argv[1]);
|
||||
int enabled = atoi(argv[2]);
|
||||
if (mode < 0 || mode > 20) return -1;
|
||||
if (enabled != 0 && enabled != 1) return -1;
|
||||
int fd = open(TOUCH_DEV_PATH, O_RDWR);
|
||||
int arg[3] = {TOUCH_ID, mode, enabled};
|
||||
ioctl(fd, TOUCH_IOC_SETMODE, &arg);
|
||||
close(fd);
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
key 114 VOLUME_DOWN
|
||||
key 115 VOLUME_UP
|
||||
key 116 POWER
|
||||
key 249 ASSIST
|
||||
key 250 CAMERA
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2019-2020 The LineageOS 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.
|
||||
-->
|
||||
<config>
|
||||
<allow-in-power-save package="com.android.deskclock" />
|
||||
</config>
|
|
@ -0,0 +1,33 @@
|
|||
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
key 115 VOLUME_UP
|
||||
key 114 VOLUME_DOWN
|
||||
key 102 HOME
|
||||
key 217 ASSIST
|
||||
key 528 FOCUS
|
||||
key 766 CAMERA
|
42
files/ota.sh
42
files/ota.sh
|
@ -1,6 +1,6 @@
|
|||
#!/system/bin/sh
|
||||
|
||||
set -e
|
||||
set -ex
|
||||
|
||||
if ! [ "$(getprop ro.boot.dynamic_partitions)" = true ];then
|
||||
echo "OTA is supported only for devices with dynamic partitions!"
|
||||
|
@ -8,21 +8,24 @@ if ! [ "$(getprop ro.boot.dynamic_partitions)" = true ];then
|
|||
fi
|
||||
|
||||
flavor=$(getprop ro.product.product.name)
|
||||
nextVersion=$(curl --silent -L https://raw.githubusercontent.com/phhusson/treble_experimentations/master/ota/roar/$flavor/date)
|
||||
if [ -f /system/phh/secure ];then
|
||||
flavor=${flavor}-secure
|
||||
fi
|
||||
nextVersion=$(curl --silent -L https://raw.githubusercontent.com/phhusson/treble_experimentations/master/ota/squeak/$flavor/date)
|
||||
if [ -z "$nextVersion" ];then
|
||||
echo "Couldn't find any OTA for $flavor"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
url=$(curl --silent -L https://raw.githubusercontent.com/phhusson/treble_experimentations/master/ota/roar/$flavor/url)
|
||||
size=$(curl --silent -L https://raw.githubusercontent.com/phhusson/treble_experimentations/master/ota/roar/$flavor/size)
|
||||
url=$(curl --silent -L https://raw.githubusercontent.com/phhusson/treble_experimentations/master/ota/squeak/$flavor/url)
|
||||
size=$(curl --silent -L https://raw.githubusercontent.com/phhusson/treble_experimentations/master/ota/squeak/$flavor/size)
|
||||
|
||||
if [ "$(getprop ro.product.build.date.utc)" = "$nextVersion" ];then
|
||||
echo "Installing $nextVersion onto itself, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! curl --silent -L https://raw.githubusercontent.com/phhusson/treble_experimentations/master/ota/roar/$flavor/known_releases |grep -q $(getprop ro.product.build.date.utc);then
|
||||
if ! curl --silent -L https://raw.githubusercontent.com/phhusson/treble_experimentations/master/ota/squeak/$flavor/known_releases |grep -q $(getprop ro.product.build.date.utc);then
|
||||
echo "Warning! The build you are currently running is unknown. Type YES to confirm you want to apply OTA from $url"
|
||||
read answer
|
||||
if ! [ "$answer" = YES ];then
|
||||
|
@ -39,34 +42,11 @@ if [ -b /dev/tmp-phh ] && ! tune2fs -l /dev/tmp-phh |grep 'Last mount time' |gr
|
|||
fi
|
||||
fi
|
||||
|
||||
lptools remove system_phh
|
||||
free=$(lptools free |grep -oE '[0-9]+$')
|
||||
if [ "$free" -le "$size" ];then
|
||||
echo "Warning! There doesn't seem to be enough space on super partition."
|
||||
echo "Do you want me to try to make more space? Type YES"
|
||||
read answer
|
||||
if ! [ "$answer" = YES ];then
|
||||
exit 1
|
||||
fi
|
||||
lptools clear-cow || true
|
||||
lptools unlimited-group || true
|
||||
lptools remove product || true
|
||||
lptools remove product$(getprop ro.boot.slot_suffix) || true
|
||||
free=$(lptools free |grep -oE '[0-9]+$')
|
||||
if [ "$free" -le "$size" ];then
|
||||
echo "Sorry, there is still not enough space available. OTA requires $size, you have $free available"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
lptools create system_phh "$size"
|
||||
lptools unmap system_phh
|
||||
dmDevice=$(lptools map system_phh|grep -oE '/dev/block/[^ ]*')
|
||||
echo "Flashing from ${url}..."
|
||||
|
||||
curl -L "$url" | busybox_phh xz -d -c | simg2img_simple > $dmDevice
|
||||
dmDevice=$(phh-ota new-slot)
|
||||
curl -L "$url" | busybox_phh xz -d -c > $dmDevice
|
||||
phh-ota switch-slot
|
||||
|
||||
lptools replace system_phh system
|
||||
reboot
|
||||
exit 0
|
||||
|
|
|
@ -27,4 +27,5 @@
|
|||
|
||||
key 143 WAKEUP
|
||||
key 172 WAKEUP
|
||||
key 116 WAKEUP
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
key 183 WAKEUP
|
|
@ -14,6 +14,9 @@ PRODUCT_COPY_FILES := $(call FILTER_OUT,google_go.xml:, $(PRODUCT_COPY_FILES))
|
|||
PRODUCT_PACKAGES := $(filter-out CalendarGoogle, $(PRODUCT_PACKAGES))
|
||||
PRODUCT_PACKAGES := $(filter-out GoogleContacts, $(PRODUCT_PACKAGES))
|
||||
|
||||
#Launcher3Go has no recents support...?
|
||||
PRODUCT_PACKAGES := $(filter-out Launcher3Go, $(PRODUCT_PACKAGES))
|
||||
|
||||
PRODUCT_SHIPPING_API_LEVEL :=
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
|
|
5
gapps.mk
5
gapps.mk
|
@ -4,14 +4,15 @@ ifneq ($(wildcard vendor/google)$(wildcard vendor/partner_gms),)
|
|||
-include vendor/partner_gms/products/gms.mk
|
||||
PRODUCT_SHIPPING_API_LEVEL :=
|
||||
|
||||
PRODUCT_PACKAGES := $(filter-out CalendarGoogle, $(PRODUCT_PACKAGES))
|
||||
PRODUCT_PACKAGES := $(filter-out GoogleContacts, $(PRODUCT_PACKAGES))
|
||||
#PRODUCT_PACKAGES := $(filter-out CalendarGoogle, $(PRODUCT_PACKAGES))
|
||||
#PRODUCT_PACKAGES := $(filter-out GoogleContacts, $(PRODUCT_PACKAGES))
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
phh-gapps-overrides \
|
||||
Chrome \
|
||||
GoogleContactsSyncAdapter \
|
||||
talkback \
|
||||
Photos \
|
||||
|
||||
PRODUCT_SYSTEM_DEFAULT_PROPERTIES := $(filter-out ro.boot.vendor.overlay.theme=%,$(PRODUCT_SYSTEM_DEFAULT_PROPERTIES))
|
||||
endif
|
||||
|
|
|
@ -79,7 +79,7 @@ for part in a ab;do
|
|||
cat > ${target}.mk << EOF
|
||||
TARGET_GAPPS_ARCH := ${baseArch}
|
||||
\$(call inherit-product, device/phh/treble/base-pre.mk)
|
||||
include build/make/target/product/aosp_${baseArch}_ab.mk
|
||||
include build/make/target/product/aosp_${baseArch}.mk
|
||||
\$(call inherit-product, device/phh/treble/base.mk)
|
||||
$optional_base
|
||||
$apps_script
|
||||
|
@ -87,10 +87,13 @@ $rom_script
|
|||
|
||||
PRODUCT_NAME := $target
|
||||
PRODUCT_DEVICE := phhgsi_${arch}_$part
|
||||
PRODUCT_BRAND := Phh
|
||||
PRODUCT_SYSTEM_BRAND := Phh
|
||||
PRODUCT_BRAND := google
|
||||
PRODUCT_SYSTEM_BRAND := google
|
||||
PRODUCT_MODEL := Phh-Treble $apps_name
|
||||
|
||||
# Overwrite the inherited "emulator" characteristics
|
||||
PRODUCT_CHARACTERISTICS := tablet
|
||||
|
||||
PRODUCT_PACKAGES += $extra_packages
|
||||
|
||||
EOF
|
||||
|
|
|
@ -12,4 +12,6 @@
|
|||
file="/system/framework/vendor.huawei.hardware.tp-V1.0-java.jar" />
|
||||
<library name="android.hardware.wifi.hostapd.V1_0"
|
||||
file="/system/framework/android.hardware.wifi.hostapd-V1.0-java.jar" />
|
||||
<library name="vendor.xiaomi.hardware.displayfeature.V1_0"
|
||||
file="/system/framework/vendor.xiaomi.hardware.displayfeature-V1.0-java.jar" />
|
||||
</permissions>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
cc_binary {
|
||||
name: "phh-ota",
|
||||
srcs: [
|
||||
"phh-ota.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
"libfs_mgr",
|
||||
"libbase",
|
||||
"liblp",
|
||||
],
|
||||
init_rc: ["phh-ota.rc"],
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
#include <string>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include <sys/xattr.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <libfiemap/image_manager.h>
|
||||
#include <android-base/file.h>
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
using namespace std::string_literals;
|
||||
using android::fiemap::IImageManager;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
mkdir("/metadata/gsi/phh", 0771);
|
||||
chown("/metadata/gsi/phh", 0, 1000);
|
||||
mkdir("/data/gsi/phh", 0771);
|
||||
chown("/data/gsi/phh", 0, 1000);
|
||||
|
||||
auto imgManager = IImageManager::Open("phh", 0ms);
|
||||
if(argc>=2 && strcmp(argv[1], "unmap") == 0) {
|
||||
fprintf(stderr, "Unmapping backing image returned %s\n", imgManager->UnmapImageDevice("system_otaphh_a") ? "true" : "false");
|
||||
fprintf(stderr, "Unmapping backing image returned %s\n", imgManager->UnmapImageDevice("system_otaphh_b") ? "true" : "false");
|
||||
return 0;
|
||||
}
|
||||
if(argc>=2 && strcmp(argv[1], "switch-slot") == 0) {
|
||||
std::string current_slot;
|
||||
std::string next_slot;
|
||||
if(!android::base::ReadFileToString("/metadata/phh/img", ¤t_slot)) {
|
||||
next_slot = "a";
|
||||
} else {
|
||||
if(current_slot.c_str()[0] == 'a')
|
||||
next_slot = "b";
|
||||
}
|
||||
mkdir("/metadata/phh", 0700);
|
||||
android::base::WriteStringToFile(next_slot, "/metadata/phh/img");
|
||||
return 0;
|
||||
}
|
||||
if(argc>=2 && strcmp(argv[1], "new-slot") == 0) {
|
||||
std::string current_slot;
|
||||
std::string next_slot;
|
||||
if(!android::base::ReadFileToString("/metadata/phh/img", ¤t_slot)) {
|
||||
next_slot = "a";
|
||||
} else {
|
||||
if(current_slot.c_str()[0] == 'a')
|
||||
next_slot = "b";
|
||||
}
|
||||
|
||||
std::string imageName = "system_otaphh_"s + next_slot;
|
||||
|
||||
fprintf(stderr, "Unmapping backing image returned %s\n", imgManager->UnmapImageDevice(imageName) ? "true" : "false");
|
||||
fprintf(stderr, "Deleting backing image returned %s\n", imgManager->DeleteBackingImage(imageName) ? "true" : "false");
|
||||
auto backRes = imgManager->CreateBackingImage(imageName, 4*1024*1024*1024LL, IImageManager::CREATE_IMAGE_DEFAULT, nullptr);
|
||||
if(backRes.is_ok()) {
|
||||
fprintf(stderr, "Creating system image succeeded\n");
|
||||
} else {
|
||||
fprintf(stderr, "Creating system image failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::string blockDev;
|
||||
fprintf(stderr, "Mapping backing image returned %s\n", imgManager->MapImageDevice(imageName, 0ms, &blockDev) ? "true" : "false");
|
||||
fprintf(stderr, "blockdev is %s\n", blockDev.c_str());
|
||||
printf("%s\n", blockDev.c_str());
|
||||
|
||||
struct stat sb;
|
||||
for(int i=0; i<10; i++) {
|
||||
if(!stat(blockDev.c_str(), &sb)) break;
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
if(!S_ISBLK(sb.st_mode)) {
|
||||
fprintf(stderr, "blockDev wasn't block dev\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
unlink("/dev/phh-ota");
|
||||
mknod("/dev/phh-ota", 0664 | S_IFBLK, makedev(major(sb.st_rdev), minor(sb.st_rdev)));
|
||||
chmod("/dev/phh-ota", 0664);
|
||||
// Allow system uid to write there
|
||||
chown("/dev/phh-ota", 0, 1000);
|
||||
const char *dstContext = "u:object_r:phhota_dev:s0";
|
||||
setxattr("/dev/phh-ota", "security.selinux", dstContext, strlen(dstContext), 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
if(argc>=2 && strcmp(argv[1], "delete-other-slot") == 0) {
|
||||
const char* current_slot = getenv("PHH_OTA_SLOT");
|
||||
if(current_slot == NULL) {
|
||||
imgManager->UnmapImageDevice("system_otaphh_a");
|
||||
imgManager->DeleteBackingImage("system_otaphh_a");
|
||||
imgManager->UnmapImageDevice("system_otaphh_b");
|
||||
imgManager->DeleteBackingImage("system_otaphh_b");
|
||||
return 0;
|
||||
}
|
||||
if(current_slot[0] == 'a') {
|
||||
imgManager->UnmapImageDevice("system_otaphh_b");
|
||||
imgManager->DeleteBackingImage("system_otaphh_b");
|
||||
return 0;
|
||||
}
|
||||
if(current_slot[0] == 'b') {
|
||||
imgManager->UnmapImageDevice("system_otaphh_a");
|
||||
imgManager->DeleteBackingImage("system_otaphh_a");
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
service phh-ota-make /system/bin/phh-ota new-slot
|
||||
seclabel u:r:phhsu_daemon:s0
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service phh-ota-switch /system/bin/phh-ota switch-slot
|
||||
seclabel u:r:phhsu_daemon:s0
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-ota delete-other-slot
|
|
@ -4,4 +4,9 @@
|
|||
<string name="config_defaultAccessibilityService">com.google.android.marvin.talkback/.TalkBackService</string>
|
||||
<string name="config_persistentDataPackageName">com.google.android.gms</string>
|
||||
<string name="config_defaultNetworkRecommendationProviderPackage">com.google.android.gms</string>
|
||||
<string-array name="config_packagesExemptFromSuspension" translatable="false">
|
||||
<item>com.google.android.apps.wellbeing</item>
|
||||
<item>me.phh.treble.app</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
<string name="config_icon_mask" translatable="false">"M50 0C77.6 0 100 22.4 100 50C100 77.6 77.6 100 50 100C22.4 100 0 77.6 0 50C0 22.4 22.4 0 50 0Z"</string>
|
||||
<bool name="config_useRoundIcon">true</bool>
|
||||
|
||||
<string name="config_wallpaperCropperPackage">com.android.wallpaperpicker</string>
|
||||
<bool name="config_unplugTurnsOnScreen">true</bool>
|
||||
<integer name="config_multiuserMaximumUsers">5</integer>
|
||||
<bool name="config_enableMultiUserUI">true</bool>
|
||||
|
@ -50,4 +49,11 @@
|
|||
<!-- ColorDisplayManager.COLOR_MODE_AUTOMATIC -->
|
||||
<item>3</item>
|
||||
</array>
|
||||
|
||||
<bool name="config_supportAudioSourceUnprocessed">true</bool>
|
||||
|
||||
<string-array name="config_packagesExemptFromSuspension" translatable="false">
|
||||
<item>me.phh.treble.app</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<!-- Enable WPA2 to WPA3 auto-upgrade -->
|
||||
<bool translatable="false" name="config_wifiSaeUpgradeEnabled">false</bool>
|
||||
</resources>
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2019 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.
|
||||
-->
|
||||
<resources>
|
||||
<!-- Package name and fully-qualified class name for the wallpaper picker activity. -->
|
||||
<string name="config_wallpaper_picker_package" translatable="false">com.android.wallpaper</string>
|
||||
<string name="config_wallpaper_picker_class" translatable="false">com.android.customization.picker.CustomizationPickerActivity</string>
|
||||
|
||||
<!-- Fully-qualified class name for the styles & wallpaper picker activity. -->
|
||||
<string name="config_styles_and_wallpaper_picker_class" translatable="false">com.android.customization.picker.CustomizationPickerActivity</string>
|
||||
</resources>
|
|
@ -52,6 +52,15 @@ xiaomi_toggle_dt2w_event_node() {
|
|||
return 1
|
||||
}
|
||||
|
||||
xiaomi_toggle_dt2w_ioctl() {
|
||||
if [ -c "/dev/xiaomi-touch" ]; then
|
||||
echo "Trying to set dt2w mode with ioctl on /dev/xiaomi-touch"
|
||||
# 14 - Touch_Doubletap_Mode
|
||||
xiaomi-touch 14 "$1"
|
||||
return
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
restartAudio() {
|
||||
setprop ctl.restart audioserver
|
||||
|
@ -66,11 +75,12 @@ if [ "$1" == "persist.sys.phh.xiaomi.dt2w" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if ! xiaomi_toggle_dt2w_proc_node "$prop_value"; then
|
||||
# Fallback to event node method
|
||||
xiaomi_toggle_dt2w_event_node "$prop_value"
|
||||
fi
|
||||
exit $?
|
||||
xiaomi_toggle_dt2w_proc_node "$prop_value"
|
||||
# Fallback to event node method
|
||||
xiaomi_toggle_dt2w_event_node "$prop_value"
|
||||
# Fallback to ioctl method
|
||||
xiaomi_toggle_dt2w_ioctl "$prop_value"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" == "persist.sys.phh.oppo.dt2w" ]; then
|
||||
|
@ -184,3 +194,19 @@ if [ "$1" == "persist.sys.phh.backlight.scale" ];then
|
|||
fi
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" == "persist.sys.phh.disable_soundvolume_effect" ];then
|
||||
if [[ "$prop_value" != "0" && "$prop_value" != "1" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$prop_value" == 1 ]];then
|
||||
mount /system/phh/empty /vendor/lib/soundfx/libvolumelistener.so
|
||||
mount /system/phh/empty /vendor/lib64/soundfx/libvolumelistener.so
|
||||
else
|
||||
umount /vendor/lib/soundfx/libvolumelistener.so
|
||||
umount /vendor/lib64/soundfx/libvolumelistener.so
|
||||
fi
|
||||
restartAudio
|
||||
exit
|
||||
fi
|
||||
|
|
|
@ -33,4 +33,6 @@ rm -Rf $SYSTEM/{app,priv-app}/me.phh.superuser/
|
|||
rm -Rf /data/su || true
|
||||
mount -o remount,ro $MOUNTPOINT
|
||||
sync
|
||||
mkdir /metadata/phh
|
||||
touch /metadata/phh/secure
|
||||
reboot
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
||||
ro.system.ota.json_url=https://raw.githubusercontent.com/phhusson/treble_experimentations/master/ota/squeak/ota.json
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
include build/make/target/board/generic_arm_ab/BoardConfig.mk
|
||||
include build/make/target/board/generic/BoardConfig.mk
|
||||
include device/phh/treble/board-base.mk
|
||||
|
||||
# Copy pasted from build/make/target/board/generic_arm64/BoardConfig.mk
|
||||
BOARD_SEPOLICY_DIRS += build/make/target/board/generic_arm64/sepolicy
|
||||
|
||||
ifeq ($(BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE),)
|
||||
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1572864000
|
||||
endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
include build/make/target/board/generic_arm64_ab/BoardConfig.mk
|
||||
include build/make/target/board/generic_arm64/BoardConfig.mk
|
||||
include device/phh/treble/board-base.mk
|
||||
|
||||
ifeq ($(BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE),)
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
229
rw-system.sh
229
rw-system.sh
|
@ -60,7 +60,12 @@ if [ "$vndk" = 26 ];then
|
|||
fi
|
||||
|
||||
setprop sys.usb.ffs.aio_compat true
|
||||
setprop persist.adb.nonblocking_ffs false
|
||||
|
||||
if getprop ro.vendor.build.fingerprint | grep -q -i -e Blackview/BV9500Plus;then
|
||||
setprop persist.adb.nonblocking_ffs true
|
||||
else
|
||||
setprop persist.adb.nonblocking_ffs false
|
||||
fi
|
||||
|
||||
fixSPL() {
|
||||
if [ "$(getprop ro.product.cpu.abi)" = "armeabi-v7a" ]; then
|
||||
|
@ -73,8 +78,12 @@ fixSPL() {
|
|||
if [ -n "$img" ]; then
|
||||
#Rewrite SPL/Android version if needed
|
||||
Arelease="$(getSPL "$img" android)"
|
||||
spl="$(getSPL "$img" spl)"
|
||||
setprop ro.keymaster.xxx.release "$Arelease"
|
||||
setprop ro.keymaster.xxx.security_patch "$(getSPL "$img" spl)"
|
||||
setprop ro.keymaster.xxx.security_patch "$spl"
|
||||
if [ -z "$Arelease" ] || [ -z "$spl" ];then
|
||||
return 0
|
||||
fi
|
||||
setprop ro.keymaster.brn Android
|
||||
|
||||
if getprop ro.vendor.build.fingerprint |grep -qiE 'samsung.*star.*lte';then
|
||||
|
@ -118,6 +127,7 @@ fixSPL() {
|
|||
}
|
||||
|
||||
changeKeylayout() {
|
||||
mpk="/mnt/phh/keylayout"
|
||||
cp -a /system/usr/keylayout /mnt/phh/keylayout
|
||||
changed=false
|
||||
if grep -q vendor.huawei.hardware.biometrics.fingerprint /vendor/etc/vintf/manifest.xml; then
|
||||
|
@ -151,7 +161,6 @@ changeKeylayout() {
|
|||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint | grep -iq -e xiaomi/daisy; then
|
||||
mpk="/mnt/phh/keylayout"
|
||||
cp /system/phh/daisy-buttonJack.kl ${mpk}/msm8953-snd-card-mtp_Button_Jack.kl
|
||||
changed=true
|
||||
if [ ! -f /mnt/phh/keylayout/uinput-goodix.kl ]; then
|
||||
|
@ -165,6 +174,13 @@ changeKeylayout() {
|
|||
chmod 0644 ${mpk}/uinput* ${mpk}/msm8953*
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint | grep -iq -e xiaomi/renoir; then
|
||||
mpk="/mnt/phh/keylayout"
|
||||
cp /system/phh/daisy-buttonJack.kl ${mpk}/lahaina-shimaidp-snd-card_Button_Jack.kl
|
||||
chmod 0644 ${mpk}/lahaina-shimaidp-snd-card_Button_Jack.kl
|
||||
changed=true
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint | grep -qi oneplus/oneplus6/oneplus6; then
|
||||
cp /system/phh/oneplus6-synaptics_s3320.kl /mnt/phh/keylayout/synaptics_s3320.kl
|
||||
chmod 0644 /mnt/phh/keylayout/synaptics_s3320.kl
|
||||
|
@ -177,7 +193,7 @@ changeKeylayout() {
|
|||
changed=true
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint | grep -iq -E -e '^Sony/G834'; then
|
||||
if getprop ro.vendor.build.fingerprint | grep -iq -E -e '^Sony/'; then
|
||||
cp /system/phh/sony-gpio-keys.kl /mnt/phh/keylayout/gpio-keys.kl
|
||||
chmod 0644 /mnt/phh/keylayout/gpio-keys.kl
|
||||
changed=true
|
||||
|
@ -253,6 +269,41 @@ changeKeylayout() {
|
|||
changed=true
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint | grep -q -i -e Blackview/BV9500Plus;then
|
||||
cp /system/phh/bv9500plus-mtk-kpd.kl /mnt/phh/keylayout/mtk-kpd.kl
|
||||
chmod 0644 /mnt/phh/keylayout/mtk-kpd.kl
|
||||
changed=true
|
||||
fi
|
||||
|
||||
if getprop ro.product.vendor.device |grep -qi -e mfh505glm -e fh50lm; then
|
||||
cp /system/phh/empty /mnt/phh/keylayout/uinput-fpc.kl
|
||||
chmod 0644 /mnt/phh/keylayout/uinput-fpc.kl
|
||||
changed=true
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint | grep -iq -e motorola/liber; then
|
||||
cp /system/phh/moto-liber-gpio-keys.kl /mnt/phh/keylayout/gpio-keys.kl
|
||||
chmod 0644 /mnt/phh/keylayout/gpio-keys.kl
|
||||
|
||||
cp /system/phh/empty /mnt/phh/keylayout/uinput_nav.kl
|
||||
chmod 0644 /mnt/phh/keylayout/uinput_nav.kl
|
||||
changed=true
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint | grep -iq DOOGEE/S88Pro;then
|
||||
cp /system/phh/empty /mnt/phh/keylayout/sf-keys.kl
|
||||
chmod 0644 /mnt/phh/keylayout/sf-keys.kl
|
||||
changed=true
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint |grep -iq tecno/kd7;then
|
||||
# Enable dt2w
|
||||
echo cc1 > /proc/gesture_function
|
||||
cp /system/phh/tecno-touchpanel.kl /mnt/phh/keylayout/mtk-tpd.kl
|
||||
chmod 0644 /mnt/phh/keylayout/mtk-tpd.kl
|
||||
changed=true
|
||||
fi
|
||||
|
||||
if [ "$changed" = true ]; then
|
||||
mount -o bind /mnt/phh/keylayout /system/usr/keylayout
|
||||
restorecon -R /system/usr/keylayout
|
||||
|
@ -271,11 +322,11 @@ fi
|
|||
if mount -o remount,rw /system; then
|
||||
resize2fs "$(grep ' /system ' /proc/mounts | cut -d ' ' -f 1)" || true
|
||||
else
|
||||
remount system
|
||||
mount -o remount,rw /
|
||||
major="$(stat -c '%D' /.|sed -E 's/^([0-9a-f]+)([0-9a-f]{2})$/\1/g')"
|
||||
minor="$(stat -c '%D' /.|sed -E 's/^([0-9a-f]+)([0-9a-f]{2})$/\2/g')"
|
||||
mknod /dev/tmp-phh b $((0x$major)) $((0x$minor))
|
||||
blockdev --setrw /dev/tmp-phh
|
||||
resize2fs /dev/root || true
|
||||
resize2fs /dev/tmp-phh || true
|
||||
fi
|
||||
|
@ -306,15 +357,14 @@ if grep vendor.huawei.hardware.biometrics.fingerprint /vendor/manifest.xml; then
|
|||
fi
|
||||
|
||||
foundFingerprint=false
|
||||
for manifest in /vendor/manifest.xml /vendor/etc/vintf/manifest.xml /odm/etc/vintf/manifest.xml;do
|
||||
if grep -q \
|
||||
-e android.hardware.biometrics.fingerprint \
|
||||
-e vendor.oppo.hardware.biometrics.fingerprint \
|
||||
-e vendor.oplus.hardware.biometrics.fingerprint \
|
||||
$manifest;
|
||||
then
|
||||
foundFingerprint=true
|
||||
fi
|
||||
for manifest in /vendor/manifest.xml /vendor/etc/vintf /odm/etc/vintf;do
|
||||
if grep -q \
|
||||
-e android.hardware.biometrics.fingerprint \
|
||||
-e vendor.oppo.hardware.biometrics.fingerprint \
|
||||
-e vendor.oplus.hardware.biometrics.fingerprint \
|
||||
-r $manifest;then
|
||||
foundFingerprint=true
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$foundFingerprint" = false ];then
|
||||
|
@ -392,7 +442,8 @@ if getprop ro.build.overlay.deviceid |grep -q -e CPH1859 -e CPH1861 -e RMX1811 -
|
|||
setprop persist.sys.qcom-brightness "$(cat /sys/class/leds/lcd-backlight/max_brightness)"
|
||||
fi
|
||||
|
||||
if getprop ro.build.overlay.deviceid |grep -iq -e RMX2020 -e RMX2027 -e RMX2040 -e RMX2193 -e RMX2191;then
|
||||
if getprop ro.build.overlay.deviceid |grep -iq -e RMX2020 -e RMX2027 -e RMX2040 -e RMX2193 \
|
||||
-e RMX2193 -e RMX2191 -e RMX2195;then
|
||||
setprop persist.sys.qcom-brightness 2047
|
||||
setprop persist.sys.overlay.devinputjack true
|
||||
setprop persist.sys.phh.fingerprint.nocleanup true
|
||||
|
@ -406,7 +457,6 @@ if getprop ro.vendor.build.fingerprint | grep -iq \
|
|||
-e motorola/hannah -e motorola/james -e motorola/pettyl -e xiaomi/cepheus \
|
||||
-e xiaomi/grus -e xiaomi/cereus -e xiaomi/cactus -e xiaomi/raphael -e xiaomi/davinci \
|
||||
-e xiaomi/ginkgo -e xiaomi/willow -e xiaomi/laurel_sprout -e xiaomi/andromeda \
|
||||
-e iaomi/renoir \
|
||||
-e redmi/curtana -e redmi/picasso \
|
||||
-e bq/Aquaris_M10 ; then
|
||||
mount -o bind /mnt/phh/empty_dir /vendor/lib64/soundfx
|
||||
|
@ -531,6 +581,12 @@ if getprop ro.vendor.build.fingerprint | grep -iq -e Redmi/merlin; then
|
|||
setprop debug.sf.enable_hwc_vds 0
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint | grep -iq -e Redmi/rosemary \
|
||||
-e Redmi/secret -e Redmi/maltose; then
|
||||
setprop debug.sf.latch_unsignaled 1
|
||||
setprop debug.sf.enable_hwc_vds 0
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint | grep -iq -E -e 'huawei|honor' || getprop persist.sys.overlay.huawei | grep -iq -E -e 'true'; then
|
||||
p=/product/etc/nfc/libnfc_nxp_*_*.conf
|
||||
mount -o bind "$p" /system/etc/libnfc-nxp.conf ||
|
||||
|
@ -662,14 +718,13 @@ fi
|
|||
|
||||
setprop ctl.stop console
|
||||
dmesg -n 1
|
||||
if [ -f /system/phh/secure ];then
|
||||
copyprop() {
|
||||
p="$(getprop "$2")"
|
||||
if [ "$p" ]; then
|
||||
resetprop_phh "$1" "$(getprop "$2")"
|
||||
fi
|
||||
}
|
||||
|
||||
copyprop() {
|
||||
p="$(getprop "$2")"
|
||||
if [ "$p" ]; then
|
||||
resetprop_phh "$1" "$(getprop "$2")"
|
||||
fi
|
||||
}
|
||||
if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ];then
|
||||
copyprop ro.build.device ro.vendor.build.device
|
||||
copyprop ro.system.build.fingerprint ro.vendor.build.fingerprint
|
||||
copyprop ro.bootimage.build.fingerprint ro.vendor.build.fingerprint
|
||||
|
@ -713,6 +768,21 @@ if [ -f /system/phh/secure ];then
|
|||
|
||||
resetprop_phh ro.adb.secure 1
|
||||
setprop ctl.restart adbd
|
||||
|
||||
# Hide system/xbin/su
|
||||
mount /mnt/phh/empty_dir /system/xbin
|
||||
mount /mnt/phh/empty_dir /system/app/me.phh.superuser
|
||||
mount /system/phh/empty /system/xbin/phh-su
|
||||
else
|
||||
mkdir /mnt/phh/xbin
|
||||
chmod 0755 /mnt/phh/xbin
|
||||
chcon u:object_r:system_file:s0 /mnt/phh/xbin
|
||||
|
||||
#phh-su will bind over this empty file to make a real su
|
||||
touch /mnt/phh/xbin/su
|
||||
chcon u:object_r:system_file:s0 /mnt/phh/xbin/su
|
||||
|
||||
mount -o bind /mnt/phh/xbin /system/xbin
|
||||
fi
|
||||
|
||||
for abi in "" 64;do
|
||||
|
@ -870,7 +940,7 @@ fi
|
|||
|
||||
if getprop ro.vendor.build.fingerprint |grep -qiE '^samsung/';then
|
||||
for f in /sys/class/lcd/panel/actual_mask_brightness /sys/class/lcd/panel/mask_brightness /sys/class/lcd/panel/device/backlight/panel/brightness /sys/class/backlight/panel0-backlight/brightness;do
|
||||
if [ "$(stat -c '%U' "$f")" == "root" ];then
|
||||
if [ "$(stat -c '%U' "$f")" == "root" ] || [ "$(ls -lZ "$f" | grep -oE 'u:object_r:[^:]*:s0')" == "u:object_r:sysfs:s0" ];then
|
||||
chcon u:object_r:sysfs_lcd_writable:s0 $f
|
||||
chmod 0644 $f
|
||||
chown system:system $f
|
||||
|
@ -880,14 +950,21 @@ if getprop ro.vendor.build.fingerprint |grep -qiE '^samsung/';then
|
|||
setprop persist.sys.phh.fod.samsung true
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint |grep -qiE '^oneplus/';then
|
||||
setprop persist.sys.phh.fod.bbk true
|
||||
if getprop ro.vendor.build.fingerprint | grep -q -e samsung/o1s -e samsung/t2s -e samsung/p3s; then
|
||||
setprop persist.sys.phh.ultrasonic_udfps true
|
||||
fi
|
||||
if getprop ro.build.overlay.deviceid |grep -qiE -e '^RMX' -e '^CPH';then
|
||||
|
||||
if getprop ro.vendor.build.fingerprint |grep -qiE -e ASUS_I006D -e ASUS_I003;then
|
||||
setprop persist.sys.phh.fod.asus true
|
||||
fi
|
||||
|
||||
if (getprop ro.vendor.build.fingerprint;getprop ro.odm.build.fingerprint) |grep -qiE '^oneplus/' ||
|
||||
getprop ro.build.overlay.deviceid |grep -qiE -e '^RMX' -e '^CPH' ||
|
||||
[ -n "$(getprop ro.separate.soft)" ];then
|
||||
setprop persist.sys.phh.fod.bbk true
|
||||
fi
|
||||
|
||||
if getprop ro.build.overlay.deviceid |grep -iq -e RMX1941 -e RMX1945 -e RMX1943 -e RMX1942;then
|
||||
if getprop ro.build.overlay.deviceid |grep -iq -e RMX1941 -e RMX1945 -e RMX1943 -e RMX1942;then
|
||||
setprop persist.sys.qcom-brightness "$(cat /sys/class/leds/lcd-backlight/max_brightness)"
|
||||
setprop persist.sys.phh.mainkeys 0
|
||||
fi
|
||||
|
@ -898,14 +975,24 @@ fi
|
|||
|
||||
resetprop_phh ro.bluetooth.library_name libbluetooth.so
|
||||
|
||||
if getprop ro.vendor.build.fingerprint |grep -iq xiaomi/cepheus;then
|
||||
if getprop ro.vendor.build.fingerprint |grep -iq xiaomi/cepheus -e xiaomi/nabu;then
|
||||
setprop ro.netflix.bsp_rev Q855-16947-1
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint |grep -iq xiaomi/elish;then
|
||||
setprop ro.netflix.bsp_rev Q8250-19134-1
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint |grep -qi redmi/curtana;then
|
||||
setprop ro.netflix.bsp_rev Q6250-19132-1
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint |grep -iq xiaomi/renoir;then
|
||||
setprop ro.netflix.bsp_rev Q875-32774-1
|
||||
resetprop_phh ro.config.media_vol_steps 25
|
||||
resetprop_phh ro.config.media_vol_default 15
|
||||
fi
|
||||
|
||||
# Set props for Vsmart Live's fod
|
||||
if getprop ro.vendor.build.fingerprint |grep -q vsmart/V620A_open;then
|
||||
setprop persist.sys.fp.fod.location.X_Y 447,1812
|
||||
|
@ -932,9 +1019,7 @@ if [ "$vndk" -le 27 ];then
|
|||
setprop persist.sys.phh.no_present_or_validate true
|
||||
fi
|
||||
|
||||
if grep -q /mnt/vendor/persist /vendor/etc/fstab.qcom;then
|
||||
mount /mnt/vendor/persist /persist
|
||||
fi
|
||||
[ -d /mnt/vendor/persist ] && mount /mnt/vendor/persist /persist
|
||||
|
||||
for f in $(find /sys -name fts_gesture_mode);do
|
||||
setprop persist.sys.phh.focaltech_node "$f"
|
||||
|
@ -946,3 +1031,81 @@ fi
|
|||
|
||||
# Disable secondary watchdogs
|
||||
echo -n V > /dev/watchdog1
|
||||
|
||||
# Fix watchdog issue on Samsung Galaxy A20s
|
||||
if getprop ro.vendor.build.fingerprint | grep -iq samsung/a20sub/a20s; then
|
||||
echo -n V > /dev/watchdog0
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint | grep -iq samsung/a11que;then
|
||||
echo -n V > /dev/watchdog0
|
||||
fi
|
||||
|
||||
if [ "$vndk" -le 30 ];then
|
||||
# On older vendor the default behavior was to disable color management
|
||||
# Don't override vendor value, merely add a fallback
|
||||
setprop ro.surface_flinger.use_color_management false
|
||||
fi
|
||||
|
||||
if [ "$(stat -c '%U' /dev/nxp_smartpa_dev)" == "root" ] &&
|
||||
[ "$(stat -c '%G' /dev/nxp_smartpa_dev)" == "root" ];then
|
||||
chown root:audio /dev/nxp_smartpa_dev
|
||||
chmod 0660 /dev/nxp_smartpa_dev
|
||||
fi
|
||||
if getprop ro.odm.build.fingerprint |grep -q Huawei/Chicago/Chicago_VTR;then
|
||||
setprop ctl.stop aptouch
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint | grep -iq -e GOME/GOME_U9; then
|
||||
cp -a /system/etc/smartpa_params /mnt/phh/smartpa_params
|
||||
cp /system/phh/gome/fs16xx_01s_left.preset /mnt/phh/smartpa_params/fs16xx_01s_left.preset
|
||||
cp /system/phh/gome/fs16xx_01s_mono.preset /mnt/phh/smartpa_params/fs16xx_01s_mono.preset
|
||||
cp /system/phh/gome/fs16xx_01s_right.preset /mnt/phh/smartpa_params/fs16xx_01s_right.preset
|
||||
chmod 0644 /mnt/phh/smartpa_params/fs16xx_01s_left.preset
|
||||
chmod 0644 /mnt/phh/smartpa_params/fs16xx_01s_mono.preset
|
||||
chmod 0644 /mnt/phh/smartpa_params/fs16xx_01s_right.preset
|
||||
mount -o bind /mnt/phh/smartpa_params /system/etc/smartpa_params
|
||||
restorecon -R /system/etc/smartpa_params
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint | grep -iq -e UMIDIGI/UMIDIGI_X; then
|
||||
cp -a /system/etc/smartpa_params /mnt/phh/smartpa_params
|
||||
cp /system/phh/umidigi/fs16xx_01s_mono.preset /mnt/phh/smartpa_params/fs16xx_01s_mono.preset
|
||||
chmod 0644 /mnt/phh/smartpa_params/fs16xx_01s_mono.preset
|
||||
mount -o bind /mnt/phh/smartpa_params /system/etc/smartpa_params
|
||||
restorecon -R /system/etc/smartpa_params
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint |grep -iq motorola/kane;then
|
||||
setprop persist.sys.bt.esco_transport_unit_size 16
|
||||
fi
|
||||
|
||||
if [ -f /vendor/bin/ccci_rpcd ];then
|
||||
setprop debug.phh.props.ccci_rpcd vendor
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint | grep -qi -e iaomi/mona; then
|
||||
copyprop ro.product.manufacturer ro.product.vendor.manufacturer
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint | grep -iq -e motorola/liber; then
|
||||
cp /vendor/etc/audio_policy_configuration.xml /mnt/phh/
|
||||
sed -i '/r_submix_audio_policy_configuration/a \t<xi:include href="/vendor/etc/a2dp_audio_policy_configuration.xml"/>' /mnt/phh/audio_policy_configuration.xml
|
||||
mount -o bind /mnt/phh/audio_policy_configuration.xml /vendor/etc/audio_policy_configuration.xml
|
||||
chcon -h u:object_r:vendor_configs_file:s0 /vendor/etc/audio_policy_configuration.xml
|
||||
chmod 644 /vendor/etc/audio_policy_configuration.xml
|
||||
fi
|
||||
|
||||
mount /system/phh/empty /vendor/etc/permissions/samsung.hardware.uwb.xml
|
||||
mount /system/phh/empty /vendor/bin/install-recovery.sh
|
||||
|
||||
if getprop ro.vendor.radio.default_network |grep -qE '[0-9]';then
|
||||
setprop ro.telephony.default_network $(getprop ro.vendor.radio.default_network)
|
||||
fi
|
||||
|
||||
if getprop ro.vendor.build.fingerprint |grep -iq redmi/camellia;then
|
||||
setprop persist.sys.qcom-brightness 4095
|
||||
fi
|
||||
|
||||
mount -o bind /mnt/phh/empty_dir /vendor/app/qti-logkit
|
||||
mount -o bind /mnt/phh/empty_dir /vendor/app/qti-logkit-lite
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
/system/bin/phh-on-boot.sh u:object_r:phhsu_exec:s0
|
||||
/system/bin/phh-on-data.sh u:object_r:phhsu_exec:s0
|
||||
/system/bin/asus-motor u:object_r:phhsu_exec:s0
|
||||
/system/bin/xiaomi-touch u:object_r:phhsu_exec:s0
|
||||
|
||||
#/system/bin/fsck\.exfat u:object_r:fsck_exec:s0
|
||||
/system/bin/fsck\.ntfs u:object_r:fsck_exec:s0
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#Access to fake keymaster SPL/Android version props
|
||||
get_prop(hal_keymaster, default_prop);
|
||||
|
||||
get_prop(hal_keymaster, system_prop);
|
||||
|
||||
get_prop(hal_gatekeeper, system_prop);
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
allow keystore domain:process getattr;
|
||||
allow keystore domain:dir r_dir_perms;
|
||||
allow keystore domain:file r_file_perms;
|
|
@ -17,3 +17,10 @@ binder_call(hal_mms_server, {appdomain -isolated_app})
|
|||
|
||||
type mtk_hal_mms_hwservice, hwservice_manager_type;
|
||||
allow { appdomain -isolated_app } mtk_hal_mms_hwservice:hwservice_manager find;
|
||||
|
||||
#denied { read } for comm="tkuinit" name="u:object_r:default_prop:s0" dev="tmpfs" ino=2029 scontext=u:r:tkcore:s0 tcontext=u:object_r:default_prop:s0 tclass=file permissive=1
|
||||
#denied { open } for comm="tkuinit" path="/dev/__properties__/u:object_r:default_prop:s0" dev="tmpfs" ino=2029 scontext=u:r:tkcore:s0 tcontext=u:object_r:default_prop:s0 tclass=file permissive=1
|
||||
#denied { getattr } for comm="tkuinit" path="/dev/__properties__/u:object_r:default_prop:s0" dev="tmpfs" ino=2029 scontext=u:r:tkcore:s0 tcontext=u:object_r:default_prop:s0 tclass=file permissive=1
|
||||
|
||||
type tkcore, domain;
|
||||
permissive tkcore;
|
||||
|
|
|
@ -4,3 +4,7 @@ allow system_app sysfs_usb_supply:file rw_file_perms;
|
|||
|
||||
type hal_fingerprint_oplus, domain;
|
||||
allow hal_fingerprint_oplus vendor_default_prop:property_service set;
|
||||
|
||||
get_prop(hal_fingerprint_oplus, default_prop);
|
||||
get_prop(system_server, vendor_default_prop);
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
type phhota_dev, dev_type, bdev_type;
|
||||
typeattribute phhota_dev mlstrustedobject;
|
||||
|
||||
allow phhsu_daemon phhota_dev:blk_file rw_file_perms;
|
||||
allow system_app phhota_dev:blk_file rw_file_perms;
|
||||
allow kernel phhsu_daemon:fd use;
|
||||
|
||||
allow phhsu_daemon gsi_data_file:file ioctl;
|
||||
allowxperm phhsu_daemon gsi_data_file:file ioctl { 0x660b };
|
||||
|
||||
allow phhsu_daemon loop_device:blk_file ioctl;
|
||||
allowxperm phhsu_daemon loop_device:blk_file ioctl { 0x4c00 };
|
||||
|
||||
allow phhsu_daemon userdata_block_device:blk_file ioctl;
|
||||
allowxperm phhsu_daemon userdata_block_device:blk_file ioctl { 0x1278 0x127a };
|
||||
|
||||
allow kernel gsi_data_file:file rw_file_perms;
|
|
@ -28,3 +28,5 @@ allowxperm tee rpmb_device:blk_file ioctl { 0xb300-0xbfff };
|
|||
attribute smcinvoke_device_29_0;
|
||||
type smcinvoke_device, dev_type;
|
||||
typeattribute smcinvoke_device smcinvoke_device_29_0;
|
||||
|
||||
get_prop(rild, default_prop);
|
||||
|
|
|
@ -28,7 +28,8 @@ allow system_app hal_tp_default:binder { call };
|
|||
allow system_app vendor_default_prop:property_service { set };
|
||||
|
||||
set_prop(system_app, default_prop);
|
||||
set_prop(system_app, exported3_default_prop);
|
||||
#set_prop(system_app, exported3_default_prop);
|
||||
set_prop(system_app, telephony_config_prop);
|
||||
|
||||
type mtk_hal_rild_hwservice, hwservice_manager_type;
|
||||
allow system_app mtk_hal_rild_hwservice:hwservice_manager { find};
|
||||
|
|
|
@ -11,3 +11,6 @@ persist.sys.phh.mainkeys=0
|
|||
fw.max_users=10
|
||||
persist.sys.max_profiles=10
|
||||
ro.boot.realme.lockstate=0
|
||||
|
||||
#Fixes fingerprint unlock delay
|
||||
persist.wm.enable_remote_keyguard_animation=0
|
||||
|
|
13
vndk.rc
13
vndk.rc
|
@ -47,6 +47,9 @@ on property:persist.sys.phh.vsmart.dt2w=*
|
|||
on property:persist.sys.phh.backlight.scale=*
|
||||
exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.backlight.scale"
|
||||
|
||||
on property:persist.sys.phh.disable_soundvolume_effect=*
|
||||
exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.disable_soundvolume_effect"
|
||||
|
||||
on property:ro.sf.lcd_density=*
|
||||
restart surfaceflinger
|
||||
|
||||
|
@ -70,3 +73,13 @@ on property:persist.sys.phh.restart_ril=true
|
|||
restart vendor.qcrild
|
||||
restart vendor.qcrild2
|
||||
restart vendor.ril-daemon-mtk
|
||||
|
||||
on property:vendor.debug.sf.latch_unsignaled=1
|
||||
setprop debug.sf.latch_unsignaled 1
|
||||
|
||||
on property:sys.phh.uninstall-ota=true
|
||||
exec u:r:phhsu_daemon:s0 root -- /system/bin/rm /metadata/phh/img
|
||||
|
||||
on property:ro.vendor.radio.default_network=*
|
||||
setprop ro.telephony.default_network ${ro.vendor.radio.default_network}
|
||||
|
||||
|
|
Loading…
Reference in New Issue