Skip to content

Commit

Permalink
added new things
Browse files Browse the repository at this point in the history
  • Loading branch information
soulspark666 committed Oct 15, 2020
2 parents e7a8b00 + 7eab33d commit a30cf6a
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 0 deletions.
5 changes: 5 additions & 0 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ TARGET_USERIMAGES_USE_F2FS := true
# Qualcomm support
BOARD_USES_QCOM_HARDWARE := true

#Init
TARGET_INIT_VENDOR_LIB := libinit_X01AD
TARGET_RECOVERY_DEVICE_MODULES := libinit_X01AD
TARGET_PLATFORM_DEVICE_BASE := /devices/soc/

# TWRP Configuration
TW_SCREEN_BLANK_ON_BOOT := true
TW_EXTRA_LANGUAGES := true
Expand Down
28 changes: 28 additions & 0 deletions init/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# Copyright (C) 2017-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.
#

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := \
system/core/base/include \
system/core/init
LOCAL_SRC_FILES := init_X01AD.cpp
LOCAL_MODULE := libinit_X01AD

include $(BUILD_STATIC_LIBRARY)
47 changes: 47 additions & 0 deletions init/init_X01AD.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
Copyright (C) 2017-2018 The Android Open Source Project
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.
*/

#include <cstdlib>
#include <unistd.h>
#include <fcntl.h>
#include <android-base/logging.h>
#include <android-base/properties.h>

#include "property_service.h"
#include "log.h"

namespace android {
namespace init {

void vendor_load_properties() {
property_set("ro.product.device", "ASUS_X01A_1");
}

} // namespace init
} // namespace android
4 changes: 4 additions & 0 deletions omni_X01AD.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ PRODUCT_PROPERTY_OVERRIDES += \
sys.usb.controller=7000000.dwc3 \
sys.usb.rndis.func.name=rndis_bam \
sys.usb.rmnet.func.name=rmnet_bam

# Blacklist Properties
PRODUCT_SYSTEM_PROPERTY_BLACKLIST += \
ro.product.device

0 comments on commit a30cf6a

Please sign in to comment.