fixes for android 9

This commit is contained in:
Charlotte D 2019-04-02 12:20:30 +01:00
parent c73ba8fc50
commit 3396b688b7
12 changed files with 59 additions and 60 deletions

View file

@ -7,6 +7,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := Update LOCAL_PACKAGE_NAME := Update
LOCAL_CERTIFICATE := platform LOCAL_CERTIFICATE := platform
LOCAL_SDK_VERSION := 28
include $(BUILD_PACKAGE) include $(BUILD_PACKAGE)

View file

@ -2,7 +2,7 @@ LOCAL_PATH:=$(call my-dir)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE:=mtop LOCAL_MODULE:=mtop
LOCAL_MODULE_TAGS:=option LOCAL_MODULE_TAGS:=optional
LOCAL_SRC_FILES:=\ LOCAL_SRC_FILES:=\
mtop.c mtop.c
LOCAL_SHARED_LIBRARIES := libcutils LOCAL_SHARED_LIBRARIES := libcutils

View file

@ -2,7 +2,7 @@ LOCAL_PATH:= $(call my-dir)
# RTK bt mac # RTK bt mac
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_PRELINK_MODULE := false LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES := libcutils LOCAL_SHARED_LIBRARIES := libcutils liblog
LOCAL_LDLIBS += -Idl LOCAL_LDLIBS += -Idl
LOCAL_SRC_FILES := setbtmacaddr.c LOCAL_SRC_FILES := setbtmacaddr.c

View file

@ -83,7 +83,7 @@ static void generate_btmac(char filepath[])
sprintf(buf,"%02X:%02X:%02X:%02X:%02X:%02X\0", bt_addr[0], bt_addr[1], bt_addr[2], bt_addr[3], bt_addr[4], bt_addr[5]); sprintf(buf,"%02X:%02X:%02X:%02X:%02X:%02X\0", bt_addr[0], bt_addr[1], bt_addr[2], bt_addr[3], bt_addr[4], bt_addr[5]);
write(fd, buf, sizeof(buf)); write(fd, buf, sizeof(buf));
close(fd); close(fd);
chown(filepath, AID_BLUETOOTH, AID_NET_BT_STACK); chown(filepath, AID_BLUETOOTH, AID_BLUETOOTH);
chmod(filepath, 0660); chmod(filepath, 0660);
} }
ALOGD("%s: %s fd=%d, data=%s",__FUNCTION__, filepath, fd, buf); ALOGD("%s: %s fd=%d, data=%s",__FUNCTION__, filepath, fd, buf);

View file

@ -2,7 +2,7 @@ LOCAL_PATH:= $(call my-dir)
# RTK mac # RTK mac
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_PRELINK_MODULE := false LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES := libcutils LOCAL_SHARED_LIBRARIES := libcutils liblog
LOCAL_LDLIBS += -Idl LOCAL_LDLIBS += -Idl
LOCAL_SRC_FILES := setmacaddr.c LOCAL_SRC_FILES := setmacaddr.c

View file

@ -25,9 +25,9 @@ endif
KERNEL_CCSLOP := $(filter-out time_macros,$(subst $(comma), ,$(CCACHE_SLOPPINESS))) KERNEL_CCSLOP := $(filter-out time_macros,$(subst $(comma), ,$(CCACHE_SLOPPINESS)))
KERNEL_CCSLOP := $(subst $(space),$(comma),$(KERNEL_CCSLOP)) KERNEL_CCSLOP := $(subst $(space),$(comma),$(KERNEL_CCSLOP))
KERNEL_OUT_DIR := $(ANDROID_BUILD_TOP)/$(PRODUCT_OUT)/linux/kernel KERNEL_OUT_DIR := ./$(PRODUCT_OUT)/linux/kernel
KERNEL_MODINSTALL := modules_install KERNEL_MODINSTALL := modules_install
KERNEL_OUT_MODINSTALL := $(KERNEL_OUT_DIR)/$(KERNEL_MODINSTALL) KERNEL_OUT_MODINSTALL := $(TOP)/$(PRODUCT_OUT)/$(KERNEL_MODINSTALL)
KERNEL_MODULES_ROOT := $(PRODUCT_OUT)/root KERNEL_MODULES_ROOT := $(PRODUCT_OUT)/root
KERNEL_MODULES_VENDOR := $(PRODUCT_OUT)/system/vendor/modules KERNEL_MODULES_VENDOR := $(PRODUCT_OUT)/system/vendor/modules
KERNEL_CONFIG := $(KERNEL_OUT_DIR)/.config KERNEL_CONFIG := $(KERNEL_OUT_DIR)/.config
@ -43,7 +43,7 @@ KERNEL_BLD_FLAGS := \
$(KERNEL_EXTRA_FLAGS) $(KERNEL_EXTRA_FLAGS)
KERNEL_BLD_FLAGS :=$(KERNEL_BLD_FLAGS) \ KERNEL_BLD_FLAGS :=$(KERNEL_BLD_FLAGS) \
O=$(KERNEL_OUT_DIR) \ O=../../$(KERNEL_OUT_DIR) \
KERNEL_BLD_ENV := CROSS_COMPILE=$(KERNEL_CROSS_COMP) \ KERNEL_BLD_ENV := CROSS_COMPILE=$(KERNEL_CROSS_COMP) \
CCACHE_SLOPPINESS=$(KERNEL_CCSLOP) CCACHE_SLOPPINESS=$(KERNEL_CCSLOP)
@ -68,32 +68,32 @@ endif
$(KERNEL_BZIMAGE): $(KERNEL_CONFIG) $(KERNEL_BZIMAGE): $(KERNEL_CONFIG)
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) $(KERNEL_BLD_FLAGS) $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) $(KERNEL_BLD_FLAGS)
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=$(KERNEL_SRC_DIR)/modules/aw_schw $(KERNEL_BLD_FLAGS) $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=./modules/aw_schw $(KERNEL_BLD_FLAGS)
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=$(KERNEL_SRC_DIR)/modules/nand/sun50iw1p1 $(KERNEL_BLD_FLAGS) $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=./modules/nand/sun50iw1p1 $(KERNEL_BLD_FLAGS)
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=$(KERNEL_SRC_DIR)/modules/gpu/mali400/kernel_mode/driver/src/devicedrv/mali $(KERNEL_BLD_FLAGS) $(MALI_BUILD_FLAGS) $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=./modules/gpu/mali400/kernel_mode/driver/src/devicedrv/mali $(KERNEL_BLD_FLAGS) $(MALI_BUILD_FLAGS)
$(hide) cp -f $(KERNEL_OUT_DIR)/arch/arm64/boot/Image $@ $(hide) cp -f $(KERNEL_OUT_DIR)/arch/arm64/boot/Image $@
$(KERNEL_OUT_MODINSTALL): $(KERNEL_BZIMAGE) $(KERNEL_OUT_MODINSTALL): $(KERNEL_BZIMAGE)
$(hide) mkdir -p $(KERNEL_OUT_MODINSTALL) $(hide) mkdir -p $(KERNEL_OUT_MODINSTALL)
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) $(KERNEL_BLD_FLAGS) modules $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) $(KERNEL_BLD_FLAGS) modules
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=$(KERNEL_SRC_DIR)/modules/aw_schw $(KERNEL_BLD_FLAGS) modules $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=./modules/aw_schw $(KERNEL_BLD_FLAGS) modules
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=$(KERNEL_SRC_DIR)/modules/nand/sun50iw1p1 $(KERNEL_BLD_FLAGS) modules $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=./modules/nand/sun50iw1p1 $(KERNEL_BLD_FLAGS) modules
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=$(KERNEL_SRC_DIR)/modules/gpu/mali400/kernel_mode/driver/src/devicedrv/mali $(KERNEL_BLD_FLAGS) $(MALI_BUILD_FLAGS) modules $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=./modules/gpu/mali400/kernel_mode/driver/src/devicedrv/mali $(KERNEL_BLD_FLAGS) $(MALI_BUILD_FLAGS) modules
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) $(KERNEL_BLD_FLAGS) modules_install $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) $(KERNEL_BLD_FLAGS) modules_install
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=$(KERNEL_SRC_DIR)/modules/aw_schw $(KERNEL_BLD_FLAGS) modules_install $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=./modules/aw_schw $(KERNEL_BLD_FLAGS) modules_install
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=$(KERNEL_SRC_DIR)/modules/nand/sun50iw1p1 $(KERNEL_BLD_FLAGS) modules_install $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=./modules/nand/sun50iw1p1 $(KERNEL_BLD_FLAGS) modules_install
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=$(KERNEL_SRC_DIR)/modules/gpu/mali400/kernel_mode/driver/src/devicedrv/mali $(KERNEL_BLD_FLAGS) $(MALI_BUILD_FLAGS) modules_install $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=./modules/gpu/mali400/kernel_mode/driver/src/devicedrv/mali $(KERNEL_BLD_FLAGS) $(MALI_BUILD_FLAGS) modules_install
mrproper_kernel: mrproper_kernel:
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=$(KERNEL_SRC_DIR)/modules/aw_schw $(KERNEL_BLD_FLAGS) clean $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=./modules/aw_schw $(KERNEL_BLD_FLAGS) clean
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=$(KERNEL_SRC_DIR)/modules/nand/sun50iw1p1 $(KERNEL_BLD_FLAGS) clean $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=./modules/nand/sun50iw1p1 $(KERNEL_BLD_FLAGS) clean
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=$(KERNEL_SRC_DIR)/modules/gpu/mali400/kernel_mode/driver/src/devicedrv/mali $(KERNEL_BLD_FLAGS) $(MALI_BUILD_FLAGS) clean $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=./modules/gpu/mali400/kernel_mode/driver/src/devicedrv/mali $(KERNEL_BLD_FLAGS) $(MALI_BUILD_FLAGS) clean
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) $(KERNEL_BLD_FLAGS) mrproper $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) $(KERNEL_BLD_FLAGS) mrproper
clean_kernel: clean_kernel:
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=$(KERNEL_SRC_DIR)/modules/aw_schw $(KERNEL_BLD_FLAGS) clean $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=./modules/aw_schw $(KERNEL_BLD_FLAGS) clean
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=$(KERNEL_SRC_DIR)/modules/nand/sun50iw1p1 $(KERNEL_BLD_FLAGS) clean $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=./modules/nand/sun50iw1p1 $(KERNEL_BLD_FLAGS) clean
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=$(KERNEL_SRC_DIR)/modules/gpu/mali400/kernel_mode/driver/src/devicedrv/mali $(KERNEL_BLD_FLAGS) $(MALI_BUILD_FLAGS) clean $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) M=./modules/gpu/mali400/kernel_mode/driver/src/devicedrv/mali $(KERNEL_BLD_FLAGS) $(MALI_BUILD_FLAGS) clean
$(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) $(KERNEL_BLD_FLAGS) clean $(hide) $(KERNEL_BLD_ENV) $(MAKE) -C $(KERNEL_SRC_DIR) $(KERNEL_BLD_FLAGS) clean
$(hide) rm -rf $(KERNEL_OUT_MODINSTALL) $(hide) rm -rf $(KERNEL_OUT_MODINSTALL)

View file

@ -14,12 +14,11 @@ TARGET_NO_KERNEL := false
# ENABLE_CPUSETS := true # ENABLE_CPUSETS := true
# ENABLE_SCHED_BOOST := true # ENABLE_SCHED_BOOST := true
POLICYVERS := 28 POLICYVERS := 30
INSTALLED_KERNEL_TARGET := kernel INSTALLED_KERNEL_TARGET := kernel
BOARD_KERNEL_CMDLINE := BOARD_KERNEL_CMDLINE :=
TARGET_USERIMAGES_USE_EXT4 := true TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
BOARD_FLASH_BLOCK_SIZE := 4096 BOARD_FLASH_BLOCK_SIZE := 4096
BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4

View file

@ -4,7 +4,7 @@ $(call inherit-product, frameworks/native/build/tablet-7in-xhdpi-2048-dalvik-hea
$(call inherit-product, hardware/realtek/bluetooth/firmware/rtlbtfw_cfg.mk) $(call inherit-product, hardware/realtek/bluetooth/firmware/rtlbtfw_cfg.mk)
$(call inherit-product, vendor/supersu/vendor.mk) $(call inherit-product, vendor/supersu/vendor.mk)
KERNEL_SRC_DIR ?= $(ANDROID_BUILD_TOP)/linux/kernel-tulip KERNEL_SRC_DIR ?= ./linux/kernel-tulip
KERNEL_CFG_NAME ?= sun50iw1p1smp_android KERNEL_CFG_NAME ?= sun50iw1p1smp_android
TARGET_KERNEL_ARCH ?= arm64 TARGET_KERNEL_ARCH ?= arm64

View file

@ -19,7 +19,8 @@ TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK := true
BOARD_CHARGER_ENABLE_SUSPEND := true BOARD_CHARGER_ENABLE_SUSPEND := true
BOARD_SEPOLICY_DIRS := \ # TODO: fix the selinux policy
#BOARD_SEPOLICY_DIRS := \
device/softwinner/tulip-common/sepolicy device/softwinner/tulip-common/sepolicy
USE_OPENGL_RENDERER := true USE_OPENGL_RENDERER := true

View file

@ -162,7 +162,8 @@ LOCAL_SHARED_LIBRARIES:= \
libutils \ libutils \
libcutils \ libcutils \
libcamera_client \ libcamera_client \
libui libui \
liblog
LOCAL_SHARED_LIBRARIES += \ LOCAL_SHARED_LIBRARIES += \
libhdr \ libhdr \

View file

@ -89,7 +89,7 @@ CCameraConfig::CCameraConfig(int id)
,mFastPictureMode(false) ,mFastPictureMode(false)
{ {
mhKeyFile = ::fopen(CAMERA_KEY_CONFIG_PATH, "rb"); mhKeyFile = ::fopen(CAMERA_KEY_CONFIG_PATH, "rb");
if (mhKeyFile <= 0) if (!mhKeyFile)
{ {
LOGV("open file %s failed", CAMERA_KEY_CONFIG_PATH); LOGV("open file %s failed", CAMERA_KEY_CONFIG_PATH);
return; return;

View file

@ -1744,25 +1744,25 @@ int CameraHardware::parse_focus_areas(const char *str, bool is_face)
// LOGV("parse_focus_areas : %s", str); // LOGV("parse_focus_areas : %s", str);
tmp = strchr(str,'('); tmp = (char*)strchr(str,'(');
tmp++; tmp++;
ptr = strchr(tmp,','); ptr = (char*)strchr(tmp,',');
memcpy(p1,tmp,ptr-tmp); memcpy(p1,tmp,ptr-tmp);
tmp = ptr+1; tmp = ptr+1;
ptr = strchr(tmp,','); ptr = (char*)strchr(tmp,',');
memcpy(p2,tmp,ptr-tmp); memcpy(p2,tmp,ptr-tmp);
tmp = ptr+1; tmp = ptr+1;
ptr = strchr(tmp,','); ptr = (char*)strchr(tmp,',');
memcpy(p3,tmp,ptr-tmp); memcpy(p3,tmp,ptr-tmp);
tmp = ptr+1; tmp = ptr+1;
ptr = strchr(tmp,','); ptr = (char*)strchr(tmp,',');
memcpy(p4,tmp,ptr-tmp); memcpy(p4,tmp,ptr-tmp);
tmp = ptr+1; tmp = ptr+1;
ptr = strchr(tmp,')'); ptr = (char*)strchr(tmp,')');
memcpy(p5,tmp,ptr-tmp); memcpy(p5,tmp,ptr-tmp);
l = atoi(p1); l = atoi(p1);
@ -4182,32 +4182,29 @@ HALCameraInfo* CameraHardware::get_halinfo()
****************************************************************************/ ****************************************************************************/
camera_device_ops_t CameraHardware::mDeviceOps = { camera_device_ops_t CameraHardware::mDeviceOps = {
CameraHardware::set_preview_window, .set_preview_window = CameraHardware::set_preview_window,
CameraHardware::set_callbacks, .set_callbacks = CameraHardware::set_callbacks,
CameraHardware::enable_msg_type, .enable_msg_type = CameraHardware::enable_msg_type,
CameraHardware::disable_msg_type, .disable_msg_type = CameraHardware::disable_msg_type,
CameraHardware::msg_type_enabled, .msg_type_enabled = CameraHardware::msg_type_enabled,
CameraHardware::start_preview, .start_preview = CameraHardware::start_preview,
CameraHardware::stop_preview, .stop_preview = CameraHardware::stop_preview,
CameraHardware::preview_enabled, .preview_enabled = CameraHardware::preview_enabled,
CameraHardware::enable_preview, .store_meta_data_in_buffers = CameraHardware::store_meta_data_in_buffers,
CameraHardware::disable_preview, .start_recording = CameraHardware::start_recording,
CameraHardware::store_meta_data_in_buffers, .stop_recording = CameraHardware::stop_recording,
CameraHardware::start_recording, .recording_enabled = CameraHardware::recording_enabled,
CameraHardware::stop_recording, .release_recording_frame = CameraHardware::release_recording_frame,
CameraHardware::recording_enabled, .auto_focus = CameraHardware::auto_focus,
CameraHardware::release_recording_frame, .cancel_auto_focus = CameraHardware::cancel_auto_focus,
CameraHardware::auto_focus, .take_picture = CameraHardware::take_picture,
CameraHardware::cancel_auto_focus, .cancel_picture = CameraHardware::cancel_picture,
CameraHardware::take_picture, .set_parameters = CameraHardware::set_parameters,
CameraHardware::cancel_picture, .get_parameters = CameraHardware::get_parameters,
CameraHardware::set_parameters, .put_parameters = CameraHardware::put_parameters,
CameraHardware::get_parameters, .send_command = CameraHardware::send_command,
CameraHardware::put_parameters, .release = CameraHardware::release,
CameraHardware::send_command, .dump = CameraHardware::dump,
CameraHardware::release,
CameraHardware::dump,
CameraHardware::set_fd
}; };
/**************************************************************************** /****************************************************************************