Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

Take a look #6

Open
wants to merge 8 commits into
base: cm-13.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,30 @@ TARGET_OTA_ASSERT_DEVICE := s3ve3g,s3ve3gds,s3ve3gjv
DEVICE_PATH := device/samsung/s3ve3g

# Audio
#AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
#AUDIO_FEATURE_SAMSUNG_DUAL_SIM := true
AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
AUDIO_FEATURE_SAMSUNG_DUAL_SIM := true

# Radio
SIM_COUNT := 2
TARGET_GLOBAL_CFLAGS += -DANDROID_MULTI_SIM
TARGET_GLOBAL_CPPFLAGS += -DANDROID_MULTI_SIM

# Bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth

# Init
TARGET_LIBINIT_DEFINES_FILE := $(DEVICE_PATH)/init/init_s3ve3g.cpp
TARGET_INIT_VENDOR_LIB := libinit_s3ve3g
TARGET_UNIFIED_DEVICE := true

# Kernel
BOARD_CUSTOM_BOOTIMG_MK := $(DEVICE_PATH)/mkbootimg.mk
BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_CMDLINE := console=null androidboot.console=null androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x37 androidboot.selinux=permissive androidboot.bootdevice=msm_sdcc.1 vmalloc=400M
BOARD_KERNEL_CMDLINE := console=null androidboot.console=null androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x37 androidboot.selinux=permissive androidboot.bootdevice=msm_sdcc.1
BOARD_KERNEL_PAGESIZE := 2048
BOARD_KERNEL_SEPARATED_DT := true
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02000000 --tags_offset 0x1e00000
TARGET_KERNEL_SOURCE := kernel/samsung/s3ve3g
TARGET_KERNEL_CONFIG := cyanogenmod_s3ve3g_defconfig
TARGET_KERNEL_CONFIG := lineageos_s3ve3g_defconfig

# Lights
TARGET_PROVIDES_LIBLIGHT := true
Expand All @@ -60,3 +65,6 @@ TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/fstab.qcom

# Releasetools
TARGET_RELEASETOOLS_EXTENSIONS := $(DEVICE_PATH)

# Build
BLOCK_BASED_OTA := false
11 changes: 11 additions & 0 deletions init/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := system/core/init
LOCAL_CFLAGS := -Wall
LOCAL_SRC_FILES := init_s3ve3g.cpp
LOCAL_MODULE := libinit_s3ve3g

include $(BUILD_STATIC_LIBRARY)
18 changes: 9 additions & 9 deletions init/init_s3ve3g.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,15 @@
#include "log.h"
#include "util.h"

#include "init_msm.h"

void init_msm_properties(unsigned long msm_id, unsigned long msm_ver, char *board_type)
{
void init_variant_properties() {
char platform[PROP_VALUE_MAX];
char bootloader[PROP_VALUE_MAX];
char device[PROP_VALUE_MAX];
char devicename[PROP_VALUE_MAX];
int rc;

UNUSED(msm_id);
UNUSED(msm_ver);
UNUSED(board_type);

rc = property_get("ro.board.platform", platform);
if (!rc || !ISMATCH(platform, ANDROID_TARGET))
if (!rc || strncmp(platform, "msm8226", 7))
return;

property_get("ro.bootloader", bootloader);
Expand All @@ -60,12 +53,14 @@ void init_msm_properties(unsigned long msm_id, unsigned long msm_ver, char *boar
property_set("ro.build.description", "s3ve3gxx-user 4.4.2 KOT49H I9301IXXUANL1 release-keys");
property_set("ro.product.model", "GT-I9301I");
property_set("ro.product.device", "s3ve3g");
property_set("ro.telephony.default_network", "0");
} else if (strstr(bootloader, "I9301Q")) {
/* s3ve3gjv */
property_set("ro.build.fingerprint", "samsung/s3ve3gjv/s3ve3g:4.4.2/KOT49H/I9301QXXUANH1:user/release-keys");
property_set("ro.build.description", "s3ve3gjv-user 4.4.2 KOT49H I9301QXXUANH1 release-keys");
property_set("ro.product.model", "GT-I9301Q");
property_set("ro.product.device", "s3ve3gjv");
property_set("ro.telephony.default_network", "0");
} else if (strstr(bootloader, "I9300I")) {
/* s3ve3gds */
property_set("ro.build.fingerprint", "samsung/s3ve3gdsxx/s3ve3gds:4.4.4/KTU84P/I9300IXWUBNJ1:user/release-keys");
Expand All @@ -75,9 +70,14 @@ void init_msm_properties(unsigned long msm_id, unsigned long msm_ver, char *boar
property_set("ro.multisim.set_audio_params", "true");
property_set("ro.multisim.simslotcount", "2");
property_set("persist.radio.multisim.config", "dsds");
property_set("ro.telephony.default_network", "0,1");
}

property_get("ro.product.device", device);
strlcpy(devicename, device, sizeof(devicename));
INFO("Found bootloader id %s setting build properties for %s device\n", bootloader, devicename);
}

void vendor_load_properties() {
init_variant_properties();
}
10 changes: 10 additions & 0 deletions lineage.dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"repository": "android_device_samsung_msm8226-common",
"target_path": "device/samsung/msm8226-common"
},
{
"repository": "android_kernel_samsung_s3ve3g",
"target_path": "kernel/samsung/s3ve3g"
}
]
4 changes: 2 additions & 2 deletions cm.mk → lineage.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Inherit some common CM stuff.
# Inherit some common Lineage stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)

# Inherit device configuration
$(call inherit-product, device/samsung/s3ve3g/full_s3ve3g.mk)

# Release name
PRODUCT_RELEASE_NAME := GT-I9301I
PRODUCT_NAME := cm_s3ve3g
PRODUCT_NAME := lineage_s3ve3g
2 changes: 2 additions & 0 deletions overlay/frameworks/base/core/res/res/values/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -253,4 +253,6 @@
<!-- Whether UI for multi user should be shown -->
<bool name="config_enableMultiUserUI">true</bool>

<string translatable="false" name="config_radio_access_family">GSM|WCDMA</string>

</resources>
3 changes: 0 additions & 3 deletions proprietary-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,11 @@ vendor/lib/libwvm.so
vendor/lib/libWVStreamControlAPI_L1.so

# GPS
-app/com.qualcomm.location/com.qualcomm.location.apk
etc/permissions/com.qualcomm.location.xml
lib/hw/flp.default.so
lib/libloc_api_v02.so
vendor/lib/libgeofence.so
vendor/lib/libizat_core.so
vendor/lib/liblbs_core.so
vendor/lib/liblocationservice.so

# Graphics
vendor/lib/egl/eglsubAndroid.so
Expand Down
11 changes: 0 additions & 11 deletions setup-makefiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ done

# Pick up overlay for features that depend on non-open-source files
PRODUCT_PACKAGES += \\
com.qualcomm.location \\
TimeService

\$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk)
Expand All @@ -86,16 +85,6 @@ LOCAL_PATH := \$(call my-dir)

ifeq (\$(TARGET_DEVICE),$DEVICE)

include \$(CLEAR_VARS)
LOCAL_MODULE := com.qualcomm.location
LOCAL_MODULE_OWNER := $VENDOR
LOCAL_SRC_FILES := proprietary/app/$(LOCAL_MODULE)/$(LOCAL_MODULE).apk
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_MODULE_CLASS := APPS
LOCAL_CERTIFICATE := platform
include \$(BUILD_PREBUILT)

include \$(CLEAR_VARS)
LOCAL_MODULE := TimeService
LOCAL_MODULE_OWNER := $VENDOR
Expand Down
1 change: 0 additions & 1 deletion system.prop
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Radio
ro.telephony.default_network=0
telephony.lteOnGsmDevice=0
4 changes: 2 additions & 2 deletions vendorsetup.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
add_lunch_combo cm_s3ve3g-eng
add_lunch_combo cm_s3ve3g-userdebug
add_lunch_combo lineage_s3ve3g-eng
add_lunch_combo lineage_s3ve3g-userdebug