├── README
├── device-proprietary-files-spr.txt
├── device-proprietary-files-gsm.txt
├── Android.mk
├── AndroidProducts.mk
├── extract-files.sh
├── setup-makefiles.sh
├── init
├── Android.bp
└── init_hlte.cpp
├── superior_hlte.mk
├── full_hlte.mk
├── superior.dependencies
├── BoardConfig.mk
├── device.mk
└── overlay
└── frameworks
└── base
└── core
└── res
└── res
└── values
└── config.xml
/README:
--------------------------------------------------------------------------------
1 | Copyright 2014 - The CyanogenMod Project
2 |
3 | Device configuration for Samsung Galaxy Note 3 (GSM).
4 |
--------------------------------------------------------------------------------
/device-proprietary-files-spr.txt:
--------------------------------------------------------------------------------
1 | # Radio - pinned to N900PVPSEPL1_N900PSPTEPL1_SPR
2 | lib/libsec-ril.so:vendor/lib/libsec-ril.spr.so|05c3065616afbf0de5fcc0e808df57a5a919b879
3 |
--------------------------------------------------------------------------------
/device-proprietary-files-gsm.txt:
--------------------------------------------------------------------------------
1 | # Radio - pinned to N9005XXSGBRI2_N9005AUTGBRI1_AUT
2 | lib/libsec-ril.so:vendor/lib/libsec-ril.gsm.so|2ce78024389d3b2a7651b3fdd446d5d0431aa7a5
3 |
--------------------------------------------------------------------------------
/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2014 The Android Open-Source 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 | LOCAL_PATH := $(call my-dir)
18 |
19 | ifeq ($(TARGET_DEVICE),hlte)
20 | include $(call all-subdir-makefiles,$(LOCAL_PATH))
21 | endif
22 |
--------------------------------------------------------------------------------
/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_hlte.mk
18 |
19 | COMMON_LUNCH_CHOICES := \
20 | superior_hlte-user \
21 | superior_hlte-userdebug \
22 | superior_hlte-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=hlte
22 | export DEVICE_COMMON=hlte-common
23 | export VENDOR=samsung
24 |
25 | ./../$DEVICE_COMMON/extract-files.sh $@
26 |
--------------------------------------------------------------------------------
/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=hlte
22 | export DEVICE_COMMON=hlte-common
23 | export VENDOR=samsung
24 |
25 | ./../$DEVICE_COMMON/setup-makefiles.sh $@
26 |
--------------------------------------------------------------------------------
/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_hlte",
19 | recovery_available: true,
20 | srcs: ["init_hlte.cpp"],
21 | whole_static_libs: ["libbase"],
22 | include_dirs: [
23 | "system/core/base/include",
24 | "system/core/init"
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/superior_hlte.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 SuperiorOS stuff.
17 | $(call inherit-product, vendor/superior/config/common.mk)
18 |
19 | $(call inherit-product, device/samsung/hlte/full_hlte.mk)
20 |
21 | PRODUCT_DEVICE := hlte
22 | PRODUCT_NAME := superior_hlte
23 |
--------------------------------------------------------------------------------
/full_hlte.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2014 The CyanogenMod Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | # Inherit from those products. Most specific first.
16 | $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
17 |
18 | # Inherit from hlte device
19 | $(call inherit-product, device/samsung/hlte/device.mk)
20 |
21 | # Set those variables here to overwrite the inherited values.
22 | PRODUCT_NAME := full_hltexx
23 | PRODUCT_DEVICE := hltexx
24 | PRODUCT_BRAND := Samsung
25 | PRODUCT_MANUFACTURER := Samsung
26 | PRODUCT_MODEL := Samsung Galaxy Note 3
27 |
--------------------------------------------------------------------------------
/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 | "remote": "github",
10 | "repository": "SuperiorOS-Devices/device_samsung_msm8974-common",
11 | "target_path": "device/samsung/msm8974-common",
12 | "branch": "ten"
13 | },
14 | {
15 | "remote": "github",
16 | "repository": "SuperiorOS-Devices/android_kernel_samsung_msm8974",
17 | "target_path": "kernel/samsung/msm8974",
18 | "branch": "ten"
19 | },
20 | {
21 | "remote": "github",
22 | "repository": "SuperiorOS-Devices/proprietary_vendor_hltexx",
23 | "target_path": "vendor/samsung",
24 | "branch": "ten"
25 | },
26 | {
27 | "remote": "github",
28 | "repository": "SuperiorOS-Devices/android_hardware_samsung",
29 | "target_path": "hardware/samsung",
30 | "branch": "ten"
31 | },
32 | {
33 | "remote": "github",
34 | "repository": "SuperiorOS-Devices/device_samsung_qcom-common",
35 | "target_path": "device/samsung/qcom-common",
36 | "branch": "ten"
37 | }
38 | ]
39 |
--------------------------------------------------------------------------------
/BoardConfig.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2014-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 from common hlte
17 | include device/samsung/hlte-common/BoardConfigCommon.mk
18 |
19 | TARGET_OTA_ASSERT_DEVICE := hlte,hltespr,hltexx
20 |
21 | # Init
22 | TARGET_INIT_VENDOR_LIB := libinit_hlte
23 | TARGET_RECOVERY_DEVICE_MODULES := libinit_hlte
24 |
25 | # Kernel
26 | TARGET_KERNEL_CONFIG := lineage_hlte_bcm2079x_defconfig
27 |
28 | # NFC
29 | include $(COMMON_PATH)/nfc/bcm2079x/board.mk
30 |
31 | # Radio/RIL
32 | include $(COMMON_PATH)/radio/single/board.mk
33 |
34 | # inherit from the proprietary version
35 | -include vendor/samsung/hlte/BoardConfigVendor.mk
36 |
--------------------------------------------------------------------------------
/device.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2014-2016 The CyanogenMod Project
3 | # Copyright (C) 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/hlte/hlte-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 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
23 |
24 |
28 | LTE|CDMA|EVDO|GSM|WCDMA
29 |
30 |
33 | false
34 |
35 |
37 |
38 | - com.google.android.setupwizard/com.google.android.setupwizard.carrier.ActivationActivity
39 |
40 |
41 |
--------------------------------------------------------------------------------
/init/init_hlte.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2013, The Linux Foundation. All rights reserved.
3 | Copyright (c) 2017-2020, 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::base::ReadFileToString;
51 | using android::base::Trim;
52 | using android::init::property_set;
53 |
54 | // copied from build/tools/releasetools/ota_from_target_files.py
55 | // but with "." at the end and empty entry
56 | std::vector ro_product_props_default_source_order = {
57 | "",
58 | "product.",
59 | "product_services.",
60 | "odm.",
61 | "vendor.",
62 | "system.",
63 | };
64 |
65 | void property_override(char const prop[], char const value[], bool add = true)
66 | {
67 | auto pi = (prop_info *) __system_property_find(prop);
68 |
69 | if (pi != nullptr) {
70 | __system_property_update(pi, value, strlen(value));
71 | } else if (add) {
72 | __system_property_add(prop, strlen(prop), value, strlen(value));
73 | }
74 | }
75 |
76 | void set_rild_libpath(char const *variant)
77 | {
78 | std::string libpath("/system/vendor/lib/libsec-ril.");
79 | libpath += variant;
80 | libpath += ".so";
81 |
82 | property_override("rild.libpath", libpath.c_str());
83 | }
84 |
85 | void cdma_properties(char const *operator_alpha,
86 | char const *operator_numeric,
87 | char const *default_network,
88 | char const *cdma_sub,
89 | char const *rild_lib_variant)
90 | {
91 | /* Dynamic CDMA Properties */
92 | property_set("ro.cdma.home.operator.alpha", operator_alpha);
93 | property_set("ro.cdma.home.operator.numeric", operator_numeric);
94 | property_set("ro.telephony.default_network", default_network);
95 | property_set("ro.telephony.default_cdma_sub", cdma_sub);
96 | set_rild_libpath(rild_lib_variant);
97 |
98 | /* Static CDMA Properties */
99 | property_set("ril.subscription.types", "NV,RUIM");
100 | property_set("telephony.lteOnCdmaDevice", "1");
101 | }
102 |
103 | void gsm_properties(char const *rild_lib_variant)
104 | {
105 | set_rild_libpath(rild_lib_variant);
106 |
107 | property_set("ro.telephony.default_network", "9");
108 | property_set("telephony.lteOnGsmDevice", "1");
109 | }
110 |
111 | void vendor_load_properties() {
112 |
113 | std::string bootloader = GetProperty("ro.bootloader", "");
114 |
115 | const auto set_ro_product_prop = [](const std::string &source,
116 | const std::string &prop, const std::string &value) {
117 | auto prop_name = "ro.product." + source + prop;
118 | property_override(prop_name.c_str(), value.c_str(), false);
119 | };
120 |
121 | if (bootloader.find("N9005") == 0) {
122 | /* hltexx */
123 | for (const auto &source : ro_product_props_default_source_order) {
124 | set_ro_product_prop(source, "fingerprint", "samsung/hltexx/hlte:5.0/LRX21V/N9005XXSGBRI2:user/release-keys");
125 | set_ro_product_prop(source, "device", "hlte");
126 | set_ro_product_prop(source, "model", "SM-N9005");
127 | }
128 | property_override("ro.build.description", "hltexx-user 5.0 LRX21V N9005XXSGBRI2 release-keys");
129 | gsm_properties("gsm");
130 | } else if (bootloader.find("N900P") == 0) {
131 | /* hltespr - Sprint */
132 | for (const auto &source : ro_product_props_default_source_order) {
133 | set_ro_product_prop(source, "fingerprint", "samsung/hltespr/hltespr:5.0/LRX21V/N900PVPSEPL1:user/release-keys");
134 | set_ro_product_prop(source, "device", "hltespr");
135 | set_ro_product_prop(source, "model", "SM-N900P");
136 | }
137 | property_override("ro.build.description", "hltespr-user 5.0 LRX21V N900PVPSEPL1 release-keys");
138 | cdma_properties("Sprint", "310120", "8", "1", "spr");
139 | } else {
140 | gsm_properties("gsm");
141 | }
142 |
143 | std::string device = GetProperty("ro.product.device", "");
144 | LOG(ERROR) << "Found bootloader id " << bootloader << " setting build properties for "
145 | << device << " device" << std::endl;
146 | }
147 |
--------------------------------------------------------------------------------