diff --git a/build/configs/requirements.txt b/build/configs/requirements.txt index 42677269e40c9f461e4fb006a0d1014a9cde8ee3..e62aed4da5df7006b2ca830a9be59014ff0f974e 100755 --- a/build/configs/requirements.txt +++ b/build/configs/requirements.txt @@ -11,5 +11,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -rich==13.3.1 -toml==0.10.2 +rich +toml diff --git a/build/configs/system_deps.toml b/build/configs/system_deps.toml index 7ed642c4c1078959aa6ce57d9d6b8be46db28f46..02c834b921542cf7026108688385fb31d0957404 100755 --- a/build/configs/system_deps.toml +++ b/build/configs/system_deps.toml @@ -43,4 +43,6 @@ package_deps = [ "cjson-devel", # GPU render "openssl-devel", + "distributed-utils", + "distributed-build", ] diff --git a/build/gn/BUILDCONFIG.gn b/build/gn/BUILDCONFIG.gn index 1f2244a2d3b180d4f0af9cf7b011f2bb4042e7cf..31e05c86d5b3ac31c8cd5d6d5ccb55b0a909fb05 100644 --- a/build/gn/BUILDCONFIG.gn +++ b/build/gn/BUILDCONFIG.gn @@ -75,7 +75,7 @@ declare_args() { is_ft_build = current_os == "linux" - sys_inc = "/usr/local/include" + sys_inc = "/usr/include" usr_inc = "/usr/include" } diff --git a/build/gn/configs/system_libs/BUILD.gn b/build/gn/configs/system_libs/BUILD.gn index 32d033234d562b72e013f7e239481da3fa54bf9c..7ca98e8c45e48b3cb93e347226a3fd581df9ad17 100644 --- a/build/gn/configs/system_libs/BUILD.gn +++ b/build/gn/configs/system_libs/BUILD.gn @@ -14,44 +14,55 @@ config("c_utils_config") { visibility = [ ":*" ] - include_dirs = [ "${sys_inc}/c_utils" ] - libs = [ "utils", "sec_shared" ] + include_dirs = [ "/opt/distributed-middleware-build/openeuler/compiler_include" ] + include_dirs += [ "${sys_inc}/c_utils" ] + libs = [ "utils.z", "boundscheck" ] } config("ipc_core_config") { visibility = [ ":*" ] - include_dirs = [ "${sys_inc}/ipc_core" ] - libs = [ "ipc_core" ] + include_dirs = [ "${sys_inc}/ipc" ] + include_dirs += [ "//mock/ipc" ] + + libs = [ "ipc_core.z" ] } config("hilog_config") { visibility = [ ":*" ] include_dirs = [ "${sys_inc}/hilog" ] - libs = [ "hilog" ] + libs = [ "hilog.z" ] } +# config("hitrace_meter_config") { + # visibility = [ ":*" ] + + # include_dirs = [ "${sys_inc}/hitrace_meter" ] + # libs = [ "hitrace_meter" ] +# } + config("hitrace_meter_config") { visibility = [ ":*" ] - include_dirs = [ "${sys_inc}/hitrace_meter" ] - libs = [ "hitrace_meter" ] + include_dirs = [ "//mock/hitrace" ] + #libs = [ "hitrace_meter" ] } config("eventhandler_config") { visibility = [ ":*" ] include_dirs = [ "${sys_inc}/eventhandler" ] - libs = [ "eventhandler" ] + include_dirs += [ "//mock/eventhandler" ] + libs = [ "eventhandler.z" ] } config("skia_config") { visibility = [ ":*" ] include_dirs = [ - "${sys_inc}/flutter", - "${sys_inc}/flutter/txt", + "${usr_inc}/flutter", + "${usr_inc}/flutter/txt", "${sys_inc}/skia", "${sys_inc}/skia/src", "${sys_inc}/skia/include", @@ -64,7 +75,7 @@ config("samgr_config") { visibility = [ ":*" ] include_dirs = [ "${sys_inc}/samgr" ] - libs = [ "samgr_proxy" ] + libs = [ "samgr_proxy.z" ] } config("image_config") { @@ -84,15 +95,15 @@ config("mmi_config") { config("syspara_config") { visibility = [ ":*" ] - include_dirs = [ "${sys_inc}/syspara" ] - libs = [ "beget_proxy", "begetutil" ] + include_dirs = [ "${sys_inc}/init" ] + libs = [ "beget_proxy.z", "begetutil.z" ] } config("safwk_config") { visibility = [ ":*" ] include_dirs = [ "${sys_inc}/safwk" ] - libs = [ "system_ability_fwk" ] + libs = [ "system_ability_fwk.z" ] } config("libz_config") { @@ -108,7 +119,7 @@ config("gtest_config") { config("harfbuzz_config") { visibility = [ ":*" ] - include_dirs = [ "/usr/include/harfbuzz" ] + include_dirs = [ "${sys_inc}/harfbuzz" ] libs = ["harfbuzz"] } @@ -146,7 +157,7 @@ group("samgr") { group("image") { public_deps = [ ":hilog", - ":hitrace_meter", + # ":hitrace_meter", ":c_utils", ":ipc_core", ] diff --git a/build/prebuild.sh b/build/prebuild.sh index 0c8ead31ace7625fb0f0da2fba746ce3664709ac..9db6936dcd9be3f6192726b3bc8a1b54e0290e25 100755 --- a/build/prebuild.sh +++ b/build/prebuild.sh @@ -48,9 +48,6 @@ PROJECT_DIR=$(dirname ${SCRIPT_DIR}) sudo pip3 install -r ${SCRIPT_DIR}/configs/requirements.txt -# Remove out dir -# rm -rf ${PROJECT_DIR}/out - # ============================================================================= # System Packages # ============================================================================= @@ -75,36 +72,19 @@ fi cd ${PREBUILD_DIR} FT_PREBUILD_DIR=$(pwd) -# install prebuild library -if [ ! -d ${FT_PREBUILD_DIR}/libs ]; then -git clone https://gitee.com/yanansong/ft_engine_prebuild.git -b rpms ${FT_PREBUILD_DIR}/libs -fi - -ARCHNAME=`uname -m` - -cd ${FT_PREBUILD_DIR}/libs/rpms/${ARCHNAME} -sudo ./installRPM - -# install prebuild include. -if [ ! -d ${FT_PREBUILD_DIR}/inc ]; then -git clone https://gitee.com/yanansong/devel_inc.git ${FT_PREBUILD_DIR}/inc -fi - -# copy include files to /usr/include. -cd ${FT_PREBUILD_DIR}/inc -sudo cp -fr * /usr/local/include - # install mesa_fangtian if [ ! -d ${FT_PREBUILD_DIR}/rpm/binary ]; then - git clone https://gitee.com/ShaoboFeng/rpm-fangtian.git ${FT_PREBUILD_DIR}/rpm/binary + git clone https://gitee.com/huangyuxin2023/rpm-fangtian.git ${FT_PREBUILD_DIR}/rpm/binary fi cd ${FT_PREBUILD_DIR}/rpm/binary ./install.sh cd ${PROJECT_DIR} -# copy FT sa file to /usr/local/share/ft/ +# copy FT sa file +sudo mkdir -p /system/profile/ft +sudo cp -fr ${PROJECT_DIR}/etc/ft.xml /system/profile/ft + sudo mkdir -p /usr/local/share/ft -sudo cp -fr ${PROJECT_DIR}/etc/ft.xml /usr/local/share/ft/ sudo cp -fr ${PROJECT_DIR}/etc/icon /usr/local/share/ft/ sudo cp -fr ${PROJECT_DIR}/etc/desktop /usr/local/share/ft/ @@ -118,21 +98,21 @@ sudo cp ${PROJECT_DIR}/window_manager/resources/config/other/window_manager_conf # ============================================================================= if [ ! -d ${PROJECT_DIR}/third_party/ft_flutter ]; then -git clone https://gitee.com/openeuler/ft_flutter.git ${PROJECT_DIR}/third_party/ft_flutter +git clone https://gitee.com/openeuler/ft_flutter.git -b 2203sp2_20231023 ${PROJECT_DIR}/third_party/ft_flutter fi cd ${PROJECT_DIR}/third_party/ft_flutter ./project_build/prebuild.sh ./build.sh $* if [ ! -d ${PROJECT_DIR}/third_party/ft_multimedia ]; then -git clone https://gitee.com/openeuler/ft_multimedia.git ${PROJECT_DIR}/third_party/ft_multimedia +git clone https://gitee.com/openeuler/ft_multimedia.git -b 2203sp2_20231023 ${PROJECT_DIR}/third_party/ft_multimedia fi cd ${PROJECT_DIR}/third_party/ft_multimedia ./build/prebuild.sh $* ./build.sh $* if [ ! -d ${PROJECT_DIR}/third_party/ft_mmi ]; then -git clone https://gitee.com/openeuler/ft_mmi.git ${PROJECT_DIR}/third_party/ft_mmi +git clone https://gitee.com/openeuler/ft_mmi.git -b 2203sp2_20231023 ${PROJECT_DIR}/third_party/ft_mmi fi cd ${PROJECT_DIR}/third_party/ft_mmi ./build/prebuild.sh diff --git a/build/prebuildrpm.sh b/build/prebuildrpm.sh new file mode 100755 index 0000000000000000000000000000000000000000..930c3bbbabd83051b571ec84f3a60a6ee64b3a6d --- /dev/null +++ b/build/prebuildrpm.sh @@ -0,0 +1,55 @@ +# Copyright (c) 2023 Huawei Technologies Co., Ltd. +# 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. + +set -e + +# ============================================================================= +# Python +# ============================================================================= +# +# check python3 in current system. +PYTHON_REQUIRED_VERSION="3.9.2" + +echo -e "\e[36m[-] Prepare python3 packages...\e[0m" + +# Check if python3 is installed +if ! command -v python3 &> /dev/null; then + echo "python3 is not installed" + exit 1 +fi +if ! command -v pip3 &> /dev/null; then + echo "pip3 is not installed" + exit 1 +fi + +# Check python version +PYTHON_VERSION=$(python3 --version 2>&1 | awk '{print $2}') + +# Compare the versions +if [ "$(printf '%s\n' "$PYTHON_REQUIRED_VERSION" "$PYTHON_VERSION" | sort -V | head -n1)" = "$PYTHON_REQUIRED_VERSION" ]; then + echo "The python3 version is $PYTHON_VERSION" +else + echo "The python3 version is less than $PYTHON_REQUIRED_VERSION" +fi + +# Install python packages +SCRIPT_DIR=$(cd $(dirname $0);pwd) +PROJECT_DIR=$(dirname ${SCRIPT_DIR}) + +echo -e "\e[36m[-] Prepare system packages...\e[0m" + +# Check & Install required system packages +python3 ${PROJECT_DIR}/build/builder.py check --install-packages + +cd ${PROJECT_DIR} +echo -e "\033[32m[*] Pre-build Done. You need exec 'build.sh'.\033[0m" diff --git a/display_server/rosen/modules/render_service_client/test/ft_build/BUILD.gn b/display_server/rosen/modules/render_service_client/test/ft_build/BUILD.gn index c904166d117f269cf0959c8cf191e4fa62585fd4..db530d1640af675268e2585a0d8bfebed60b7f65 100644 --- a/display_server/rosen/modules/render_service_client/test/ft_build/BUILD.gn +++ b/display_server/rosen/modules/render_service_client/test/ft_build/BUILD.gn @@ -43,7 +43,7 @@ ft_executable("render_service_client_rs_demo") { "//display_server/rosen/modules/render_service_client/ft_build:librender_service_client", "//build/gn/configs/system_libs:hilog", - "//build/gn/configs/system_libs:libz", + #"//build/gn/configs/system_libs:libz", "//build/gn/configs/system_libs:skia", "//build/gn/configs/system_libs:image", ] diff --git a/display_server/utils/buffer_handle/ft_build/BUILD.gn b/display_server/utils/buffer_handle/ft_build/BUILD.gn index 443b94787b50766b8ba42f3ad50339a912afaa85..2c86bf7ec176e577af3675522aedc4be7384ee2e 100644 --- a/display_server/utils/buffer_handle/ft_build/BUILD.gn +++ b/display_server/utils/buffer_handle/ft_build/BUILD.gn @@ -21,14 +21,15 @@ config("buffer_handle_public") { ft_static_library("buffer_handle") { include_dirs = [ - "${sys_inc}/c_utils", - "${sys_inc}/ipc_core", - "${sys_inc}/hilog", "${usr_inc}/ftsurface", ] public_configs = [ ":buffer_handle_public" ] - libs = [ "ipc_core", "hilog", "utils", "sec_shared" ] - sources = [ "../src/buffer_handle.cpp" ] + + deps = [ + "//build/gn/configs/system_libs:ipc_core", + "//build/gn/configs/system_libs:hilog", + "//build/gn/configs/system_libs:c_utils", + ] } diff --git a/display_server/utils/scoped_bytrace/ft_build/BUILD.gn b/display_server/utils/scoped_bytrace/ft_build/BUILD.gn index 82cf4ebd95a1f0027ccd31504ff3ff092f479c7a..1cb4a4e337a01b79e62cdf43e8ed9958d9cd26a9 100644 --- a/display_server/utils/scoped_bytrace/ft_build/BUILD.gn +++ b/display_server/utils/scoped_bytrace/ft_build/BUILD.gn @@ -20,11 +20,6 @@ config("scoped_bytrace_config") { "-Werror", "-g3", ] - include_dirs = [ - "${sys_inc}/hitrace_meter", - "${sys_inc}/hilog", - ] - libs = ["hilog", "hitrace_meter"] } config("scoped_bytrace_public_config") { @@ -35,4 +30,8 @@ ft_static_library("scoped_bytrace") { sources = [ "../src/scoped_bytrace.cpp" ] configs = [ ":scoped_bytrace_config" ] public_configs = [ ":scoped_bytrace_public_config" ] + deps = [ + "//build/gn/configs/system_libs:hitrace_meter", + "//build/gn/configs/system_libs:hilog", + ] } diff --git a/mock/eventhandler/dumper.h b/mock/eventhandler/dumper.h new file mode 100644 index 0000000000000000000000000000000000000000..5d12328430173598b5fab89417e4cb67a33af1d5 --- /dev/null +++ b/mock/eventhandler/dumper.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * 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. + */ + +#ifndef BASE_EVENTHANDLER_INTERFACES_INNER_API_DUMPER_H +#define BASE_EVENTHANDLER_INTERFACES_INNER_API_DUMPER_H + +namespace OHOS { +namespace AppExecFwk { +class Dumper { +public: + virtual ~Dumper() = default; + /** + * Processes the content of a specified string. + * @param message the content of a specified string. + */ + virtual void Dump(const std::string &message) = 0; + + /** + * Obtains the tag information. + * which is a prefix added to each string before the string content is processed. + * @return the tag information. + */ + virtual std::string GetTag() = 0; +}; +} // namespace AppExecFwk +} // namespace OHOS + +#endif // BASE_EVENTHANDLER_INTERFACES_INNER_API_DUMPER_H \ No newline at end of file diff --git a/mock/eventhandler/logger.h b/mock/eventhandler/logger.h new file mode 100644 index 0000000000000000000000000000000000000000..fdeadc8981561788e246561ac21ef26a19fc11a8 --- /dev/null +++ b/mock/eventhandler/logger.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * 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. + */ + +#ifndef BASE_EVENTHANDLER_INTERFACES_INNER_API_LOGGER_H +#define BASE_EVENTHANDLER_INTERFACES_INNER_API_LOGGER_H + +namespace OHOS { +namespace AppExecFwk { +class Logger { +public: + virtual ~Logger() = default; + /** + * Processes the content of a specified string. + * @param message the content of a specified string. + */ + virtual void Log(const std::string &line) = 0; +}; +} // namespace AppExecFwk +} // namespace OHOS + +#endif // BASE_EVENTHANDLER_INTERFACES_INNER_API_LOGGER_H \ No newline at end of file diff --git a/mock/hitrace/hitrace_meter.h b/mock/hitrace/hitrace_meter.h new file mode 100644 index 0000000000000000000000000000000000000000..641fd169b95058db3345d021c4c47b72c7bb6fd2 --- /dev/null +++ b/mock/hitrace/hitrace_meter.h @@ -0,0 +1,17 @@ + + +#define HITRACE_TAG_GRAPHIC_AGP 0 + +#define HITRACE_METER(...) +#define HITRACE_METER_FMT(...) +#define HITRACE_METER_NAME(...) +#define HITRACE_TAG_WINDOW_MANAGER + +#define CountTrace(...) +#define StartTrace(...) +#define FinishTrace(...) +#define StartAsyncTrace(...) +#define FinishAsyncTrace(...) +#define StartTraceArgs(...) +#define StartAsyncTraceArgs(...) +#define FinishAsyncTraceArgs(...) diff --git a/mock/ipc/sys_binder.h b/mock/ipc/sys_binder.h new file mode 100644 index 0000000000000000000000000000000000000000..e9c7478ccf0ca0d1f9c28e1a53a8c8d7d2a4ede0 --- /dev/null +++ b/mock/ipc/sys_binder.h @@ -0,0 +1,237 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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. + */ + +#ifndef _UAPI_LINUX_BINDER_H +#define _UAPI_LINUX_BINDER_H + +#include +#include +#include +#include + +#define B_PACK_CHARS(c1, c2, c3, c4) ((((c1) << 24)) | (((c2) << 16)) | (((c3) << 8)) | (c4)) +#define B_TYPE_LARGE 0x85 + +// #define BINDER_IPC_32BIT + +enum { + BINDER_TYPE_BINDER = B_PACK_CHARS('s', 'b', '*', B_TYPE_LARGE), + BINDER_TYPE_REMOTE_BINDER = B_PACK_CHARS('r', 'b', '*', B_TYPE_LARGE), + BINDER_TYPE_WEAK_BINDER = B_PACK_CHARS('w', 'b', '*', B_TYPE_LARGE), + BINDER_TYPE_HANDLE = B_PACK_CHARS('s', 'h', '*', B_TYPE_LARGE), + BINDER_TYPE_REMOTE_HANDLE = B_PACK_CHARS('r', 'h', '*', B_TYPE_LARGE), + BINDER_TYPE_WEAK_HANDLE = B_PACK_CHARS('w', 'h', '*', B_TYPE_LARGE), + BINDER_TYPE_FD = B_PACK_CHARS('f', 'd', '*', B_TYPE_LARGE), + BINDER_TYPE_FDA = B_PACK_CHARS('f', 'd', 'a', B_TYPE_LARGE), + BINDER_TYPE_PTR = B_PACK_CHARS('p', 't', '*', B_TYPE_LARGE), +}; + +enum { + FLAT_BINDER_FLAG_PRIORITY_MASK = 0xff, + FLAT_BINDER_FLAG_ACCEPTS_FDS = 0x100, +}; + +#ifdef BINDER_IPC_32BIT +typedef __u32 binder_size_t; +typedef __u32 binder_uintptr_t; +#else +typedef __u64 binder_size_t; +typedef __u64 binder_uintptr_t; +#endif +struct binder_object_header { + __u32 type; +}; + +struct flat_binder_object { + struct binder_object_header hdr; + __u32 flags; + union { + binder_uintptr_t binder; + __u32 handle; + }; + binder_uintptr_t cookie; +}; + +struct binder_fd_object { + struct binder_object_header hdr; + __u32 pad_flags; + union { + binder_uintptr_t pad_binder; + __u32 fd; + }; + binder_uintptr_t cookie; +}; + +struct binder_buffer_object { + struct binder_object_header hdr; + __u32 flags; + binder_uintptr_t buffer; + binder_size_t length; + binder_size_t parent; + binder_size_t parent_offset; +}; + +enum { + BINDER_BUFFER_FLAG_HAS_PARENT = 0x01, +}; + +struct binder_fd_array_object { + struct binder_object_header hdr; + __u32 pad; + binder_size_t num_fds; + binder_size_t parent; + binder_size_t parent_offset; +}; + +struct binder_write_read { + binder_size_t write_size; + binder_size_t write_consumed; + binder_uintptr_t write_buffer; + binder_size_t read_size; + binder_size_t read_consumed; + binder_uintptr_t read_buffer; +}; + +struct binder_version { + __s32 protocol_version; +}; + +#ifdef BINDER_IPC_32BIT +#define BINDER_CURRENT_PROTOCOL_VERSION 7 +#else +#define BINDER_CURRENT_PROTOCOL_VERSION 8 +#endif +struct binder_node_debug_info { + binder_uintptr_t ptr; + binder_uintptr_t cookie; + __u32 has_strong_ref; + __u32 has_weak_ref; +}; + +struct binder_ptr_count { + binder_uintptr_t ptr; + uint32_t count; +}; + +#define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) +#define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) +#define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32) +#define BINDER_SET_IDLE_PRIORITY _IOW('b', 6, __s32) +#define BINDER_SET_CONTEXT_MGR _IOW('b', 7, __s32) +#define BINDER_THREAD_EXIT _IOW('b', 8, __s32) +#define BINDER_VERSION _IOWR('b', 9, struct binder_version) +#define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info) +#define BINDER_GET_NODE_REFCOUNT _IOWR('b', 17, struct binder_ptr_count) + +enum transaction_flags { + TF_ONE_WAY = 0x01, + TF_ROOT_OBJECT = 0x04, + TF_STATUS_CODE = 0x08, + TF_ACCEPT_FDS = 0x10, +}; + +struct binder_transaction_data { + union { + __u32 handle; + binder_uintptr_t ptr; + } target; + binder_uintptr_t cookie; + + __u32 code; + __u32 flags; + pid_t sender_pid; + uid_t sender_euid; + binder_size_t data_size; + binder_size_t offsets_size; + union { + struct { + binder_uintptr_t buffer; + binder_uintptr_t offsets; + } ptr; + __u8 buf[8]; + } data; +}; + +struct binder_transaction_data_sg { + struct binder_transaction_data transaction_data; + binder_size_t buffers_size; +}; + +struct binder_ptr_cookie { + binder_uintptr_t ptr; + binder_uintptr_t cookie; +}; + +struct binder_handle_cookie { + __u32 handle; + binder_uintptr_t cookie; +}__attribute__((__packed__)); +struct binder_pri_desc { + __s32 priority; + __u32 desc; +}; + +struct binder_pri_ptr_cookie { + __s32 priority; + binder_uintptr_t ptr; + binder_uintptr_t cookie; +}; + +enum binder_driver_return_protocol { + BR_ERROR = _IOR('r', 0, __s32), + BR_OK = _IO('r', 1), + BR_TRANSACTION = _IOR('r', 2, struct binder_transaction_data), + BR_REPLY = _IOR('r', 3, struct binder_transaction_data), + BR_ACQUIRE_RESULT = _IOR('r', 4, __s32), + BR_DEAD_REPLY = _IO('r', 5), + BR_TRANSACTION_COMPLETE = _IO('r', 6), + BR_INCREFS = _IOR('r', 7, struct binder_ptr_cookie), + BR_ACQUIRE = _IOR('r', 8, struct binder_ptr_cookie), + BR_RELEASE = _IOR('r', 9, struct binder_ptr_cookie), + BR_DECREFS = _IOR('r', 10, struct binder_ptr_cookie), + BR_ATTEMPT_ACQUIRE = _IOR('r', 11, struct binder_pri_ptr_cookie), + BR_NOOP = _IO('r', 12), + BR_SPAWN_LOOPER = _IO('r', 13), + BR_FINISHED = _IO('r', 14), + BR_DEAD_BINDER = _IOR('r', 15, binder_uintptr_t), + BR_CLEAR_DEATH_NOTIFICATION_DONE = _IOR('r', 16, binder_uintptr_t), + BR_FAILED_REPLY = _IO('r', 17), + BR_RELEASE_NODE = _IO('r', 18), +}; + +enum binder_driver_command_protocol { + BC_TRANSACTION = _IOW('c', 0, struct binder_transaction_data), + BC_REPLY = _IOW('c', 1, struct binder_transaction_data), + BC_ACQUIRE_RESULT = _IOW('c', 2, __s32), + BC_FREE_BUFFER = _IOW('c', 3, binder_uintptr_t), + BC_INCREFS = _IOW('c', 4, __u32), + BC_ACQUIRE = _IOW('c', 5, __u32), + BC_RELEASE = _IOW('c', 6, __u32), + BC_DECREFS = _IOW('c', 7, __u32), + BC_INCREFS_DONE = _IOW('c', 8, struct binder_ptr_cookie), + BC_ACQUIRE_DONE = _IOW('c', 9, struct binder_ptr_cookie), + BC_ATTEMPT_ACQUIRE = _IOW('c', 10, struct binder_pri_desc), + BC_REGISTER_LOOPER = _IO('c', 11), + BC_ENTER_LOOPER = _IO('c', 12), + BC_EXIT_LOOPER = _IO('c', 13), + BC_REQUEST_DEATH_NOTIFICATION = _IOW('c', 14, struct binder_handle_cookie), + BC_CLEAR_DEATH_NOTIFICATION = _IOW('c', 15, struct binder_handle_cookie), + BC_DEAD_BINDER_DONE = _IOW('c', 16, binder_uintptr_t), + BC_TRANSACTION_SG = _IOW('c', 17, struct binder_transaction_data_sg), + BC_REPLY_SG = _IOW('c', 18, struct binder_transaction_data_sg), + BC_RELEASE_NODE = _IOW('c', 19, binder_uintptr_t), +}; + +#endif \ No newline at end of file diff --git a/runFT.sh b/runFT.sh index cef666908f0d334eaad9f1ec748dd8b812b9ce37..5d8a06d61dcad40860918d0bd888ff1e3e77809c 100755 --- a/runFT.sh +++ b/runFT.sh @@ -11,6 +11,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -sudo systemctl restart samgr -sudo systemctl restart hilogd -sa_main /usr/local/share/ft/ft.xml +pid=$(ps aux | grep samgr | awk '{print $2}') +kill -9 $pid + +samgr & +sa_main /system/profile/ft/ft.xml +