Skip to content

Commit

Permalink
Spes: initial init script
Browse files Browse the repository at this point in the history
for fixing rice processor spacing issue

Signed-off-by: lolipuru <banstellazz@gmail.com>
Signed-off-by: shripad-jyothinath <shripadsuper@gmail.com>
  • Loading branch information
lolipuru authored and shripad-jyothinath committed Aug 17, 2023
1 parent 853b91e commit ff62ae7
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 6 deletions.
3 changes: 3 additions & 0 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ TARGET_USES_CUSTOM_DISPLAY_INTERFACE := true
# OTA assert
TARGET_OTA_ASSERT_DEVICE := spes,spesn

# Init
TARGET_INIT_VENDOR_LIB := //$(DEVICE_PATH):libinit_spes

# HIDL
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
$(DEVICE_PATH)/configs/hidl/framework_compatibility_matrix.xml
Expand Down
13 changes: 13 additions & 0 deletions init/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (C) 2022 The LineageOS Project
// SPDX-License-Identifier: Apache-2.0

cc_library_static {
name: "libinit_spes",
recovery_available: true,
shared_libs: ["libbase"],
srcs: ["init_spes.cpp"],
include_dirs: [
"system/core/init",
"system/libbase/include"
]
}
41 changes: 41 additions & 0 deletions init/init_spes.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (C) 2023 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.
*/

#include <android-base/logging.h>
#include <android-base/properties.h>
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include <sys/_system_properties.h>
#include <sys/sysinfo.h>

#include "property_service.h"
#include "vendor_init.h"

void property_override(char const prop[], char const value[]) {
prop_info *pi;

pi = (prop_info*) __system_property_find(prop);
if (pi)
__system_property_update(pi, value, strlen(value));
else
__system_property_add(prop, strlen(prop), value, strlen(value));
}

void vendor_load_properties() {
property_override("ro.rice.chipset", "Qualcomm® Snapdragon® 680 4G");
}
void vendor_load_properties() {
property_override("ro.rising.maintainer", "Shripad Gamer🎮 ");
}
6 changes: 0 additions & 6 deletions lineage_spes.mk
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ TARGET_FACE_UNLOCK_SUPPORTED := true
#Dolby flags
TARGET_EXCLUDES_AUDIOFX := true

#Chipset
RISING_CHIPSET := "Snapdragon-680"

#Maintainer
RISING_MAINTAINER := "Shripad-J"

#Package type
RISING_PACKAGE_TYPE := PIXEL

Expand Down

0 comments on commit ff62ae7

Please sign in to comment.