├── README
├── device-proprietary-files.txt
├── superior.dependencies
├── Android.mk
├── AndroidProducts.mk
├── extract-files.sh
├── setup-makefiles.sh
├── init
├── Android.bp
└── init_hltechn.cpp
├── superior_hltechn.mk
├── full_hlte.mk
├── overlay
└── frameworks
│ └── base
│ └── core
│ └── res
│ └── res
│ └── values
│ └── config.xml
├── BoardConfig.mk
└── device.mk
/README:
--------------------------------------------------------------------------------
1 | Copyright 2014 - The CyanogenMod Project
2 | Copyright 2017 - The LineageOS Project
3 |
4 | Device configuration for Samsung Galaxy Note 3 (China).
5 |
--------------------------------------------------------------------------------
/device-proprietary-files.txt:
--------------------------------------------------------------------------------
1 | # Radio - pinned to N9008VZMSDQD2_N9008VCHMDQD2_CHM
2 | lib/libsec-ril.so:vendor/lib/libsec-ril.so|f3aa0514c84addbac8d6cffc2fe6171d37578cab
3 |
--------------------------------------------------------------------------------
/superior.dependencies:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "remote": "github",
4 | "repository": "SuperiorOS-Devices/device_samsung_hlte-common",
5 | "target_path": "device/samsung/hlte-common",
6 | "branch": "ten"
7 | }
8 | ]
9 |
--------------------------------------------------------------------------------
/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2014 The Android Open-Source Project
3 | # Copyright (C) 2017 The LineageOS Project
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | LOCAL_PATH := $(call my-dir)
19 |
20 | ifeq ($(TARGET_DEVICE),hltechn)
21 | include $(call all-subdir-makefiles,$(LOCAL_PATH))
22 | endif
23 |
--------------------------------------------------------------------------------
/AndroidProducts.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018-2019 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | PRODUCT_MAKEFILES := \
17 | $(LOCAL_DIR)/superior_hltechn.mk
18 |
19 | COMMON_LUNCH_CHOICES := \
20 | superior_hltechn-user \
21 | superior_hltechn-userdebug \
22 | superior_hltechn-eng
23 |
--------------------------------------------------------------------------------
/extract-files.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (C) 2016 The CyanogenMod Project
4 | # Copyright (C) 2017 The LineageOS Project
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | set -e
20 |
21 | export DEVICE=hltechn
22 | export DEVICE_COMMON=hlte-common
23 | export VARIANT_COPYRIGHT_YEAR=2017
24 | export VENDOR=samsung
25 |
26 | ./../$DEVICE_COMMON/extract-files.sh $@
27 |
--------------------------------------------------------------------------------
/setup-makefiles.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (C) 2016 The CyanogenMod Project
4 | # Copyright (C) 2017 The LineageOS Project
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | set -e
20 |
21 | export DEVICE=hltechn
22 | export DEVICE_COMMON=hlte-common
23 | export VARIANT_COPYRIGHT_YEAR=2017
24 | export VENDOR=samsung
25 |
26 | ./../$DEVICE_COMMON/setup-makefiles.sh $@
27 |
--------------------------------------------------------------------------------
/init/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2019 The LineageOS Project
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 |
17 | cc_library_static {
18 | name: "libinit_hltechn",
19 | recovery_available: true,
20 | srcs: ["init_hltechn.cpp"],
21 | whole_static_libs: ["libbase"],
22 | include_dirs: [
23 | "system/core/base/include",
24 | "system/core/init"
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/superior_hltechn.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2013-2016 The CyanogenMod Project
2 | # Copyright (C) 2017-2018 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | # Inherit some common LineageOS stuff.
17 | $(call inherit-product, vendor/superior/config/common.mk)
18 |
19 | $(call inherit-product, device/samsung/hltechn/full_hlte.mk)
20 |
21 | PRODUCT_DEVICE := hltechn
22 | PRODUCT_NAME := superior_hltechn
23 |
--------------------------------------------------------------------------------
/full_hlte.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2014 The CyanogenMod Project
2 | # Copyright (C) 2017 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | # Inherit from those products. Most specific first.
17 | $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
18 |
19 | # Inherit from hlte device
20 | $(call inherit-product, device/samsung/hltechn/device.mk)
21 |
22 | # Set those variables here to overwrite the inherited values.
23 | PRODUCT_NAME := full_hltechn
24 | PRODUCT_DEVICE := hltechn
25 | PRODUCT_BRAND := samsung
26 | PRODUCT_MANUFACTURER := samsung
27 | PRODUCT_MODEL := hltechn
28 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
22 |
23 |
27 | GSM|WCDMA|LTE
28 |
--------------------------------------------------------------------------------
/BoardConfig.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2014 The CyanogenMod Project
2 | # Copyright (C) 2017-2018 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | # inherit from common hlte
17 | include device/samsung/hlte-common/BoardConfigCommon.mk
18 |
19 | TARGET_OTA_ASSERT_DEVICE := hlte,hltechn
20 |
21 | # Init
22 | TARGET_INIT_VENDOR_LIB := libinit_hltechn
23 | TARGET_RECOVERY_DEVICE_MODULES := libinit_hltechn
24 |
25 | # Kernel
26 | TARGET_KERNEL_CONFIG := lineage_hltechn_defconfig
27 |
28 | # NFC
29 | BOARD_NFC_HAL_SUFFIX := $(TARGET_BOARD_PLATFORM)
30 |
31 | # NFC
32 | include $(COMMON_PATH)/nfc/bcm2079x/board.mk
33 |
34 | # Radio/RIL
35 | include $(COMMON_PATH)/radio/single/board.mk
36 |
37 | # inherit from the proprietary version
38 | -include vendor/samsung/hltechn/BoardConfigVendor.mk
39 |
--------------------------------------------------------------------------------
/device.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2014-2016 The CyanogenMod Project
3 | # Copyright (C) 2017-2018 The LineageOS Project
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | $(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
19 |
20 | # Get non-open-source specific aspects
21 | $(call inherit-product-if-exists, vendor/samsung/hltechn/hltechn-vendor.mk)
22 |
23 | # Permissions
24 | PRODUCT_COPY_FILES += \
25 | frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \
26 | frameworks/native/data/etc/android.hardware.nfc.hce.xml:system/etc/permissions/android.hardware.nfc.hce.xml
27 |
28 | # Overlays
29 | DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
30 |
31 | # NFC
32 | $(call inherit-product, device/samsung/hlte-common/nfc/bcm2079x/product.mk)
33 |
34 | # Common hlte
35 | $(call inherit-product, device/samsung/hlte-common/hlte.mk)
36 |
--------------------------------------------------------------------------------
/init/init_hltechn.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2013, The Linux Foundation. All rights reserved.
3 | Copyright (c) 2017-2019, The LineageOS Project. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are
7 | met:
8 | * Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above
11 | copyright notice, this list of conditions and the following
12 | disclaimer in the documentation and/or other materials provided
13 | with the distribution.
14 | * Neither the name of The Linux Foundation nor the names of its
15 | contributors may be used to endorse or promote products derived
16 | from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
19 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
22 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
25 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
27 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
28 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | */
30 |
31 | #include
32 | #include
33 | #include
34 | #include
35 | #include
36 | #include
37 |
38 | #include
39 | #include
40 | #include
41 | #include
42 |
43 | #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
44 | #include
45 |
46 | #include "property_service.h"
47 | #include "vendor_init.h"
48 |
49 | using android::base::GetProperty;
50 | using android::init::property_set;
51 |
52 | // copied from build/tools/releasetools/ota_from_target_files.py
53 | // but with "." at the end and empty entry
54 | std::vector ro_product_props_default_source_order = {
55 | ".",
56 | "product.",
57 | "product_services.",
58 | "odm.",
59 | "vendor.",
60 | "system.",
61 | };
62 |
63 | void property_override(char const prop[], char const value[], bool add = true)
64 | {
65 | auto pi = (prop_info *) __system_property_find(prop);
66 |
67 | if (pi != nullptr) {
68 | __system_property_update(pi, value, strlen(value));
69 | } else if (add) {
70 | __system_property_add(prop, strlen(prop), value, strlen(value));
71 | }
72 | }
73 |
74 | void gsm_properties()
75 | {
76 | property_set("ro.telephony.default_network", "9");
77 | property_set("telephony.lteOnGsmDevice", "1");
78 | }
79 |
80 | #define ISMATCH(a, b) (!strncmp((a), (b), PROP_VALUE_MAX))
81 |
82 | void vendor_load_properties() {
83 |
84 | std::string bootloader = GetProperty("ro.bootloader", "");
85 |
86 | const auto set_ro_product_prop = [](const std::string &source,
87 | const std::string &prop, const std::string &value) {
88 | auto prop_name = "ro.product." + source + prop;
89 | property_override(prop_name.c_str(), value.c_str(), false);
90 | };
91 |
92 | if (bootloader.find("N9008V") == 0) {
93 | /* hltezm - China Mobile */
94 | for (const auto &source : ro_product_props_default_source_order) {
95 | set_ro_product_prop(source, "fingerprint", "samsung/hltezm/hlte:5.0/LRX21V/N9008VZMSDQD2:user/release-keys");
96 | set_ro_product_prop(source, "device", "hlte");
97 | set_ro_product_prop(source, "model", "SM-N9008V");
98 | }
99 | property_override("ro.build.description", "hltezm-user 5.0 LRX21V N9008VZMSDQD2 release-keys");
100 | }
101 | gsm_properties();
102 |
103 | std::string device = GetProperty("ro.product.device", "");
104 | LOG(ERROR) << "Found bootloader id " << bootloader << " setting build properties for "
105 | << device << " device" << std::endl;
106 | }
107 |
--------------------------------------------------------------------------------