smack.c \
malloc_debug.c \
target.c \
- thread.c \
- ui_viewer.c
+ thread.c
SRC_CPP := \
cpp/features/feature.cpp \
STOP_SH = ../scripts/swap_stop.sh
INIT_LOADER_SH = ../scripts/swap_init_loader.sh
INIT_PRELOAD_SH = ../scripts/swap_init_preload.sh
-INIT_UIHV_SH = ../scripts/swap_init_uihv.sh
INIT_WSP_SH = ../scripts/swap_init_wsp.sh
INIT_GTP_SH = ../scripts/swap_init_gtp.sh
LOADER_SCRIPT = ../scripts/gen_loader_header.sh
PRELOAD_SCRIPT = ../scripts/gen_preload_header.sh
-UIHV_SCRIPT = ../scripts/gen_uihv_header.sh
GTP_SCRIPT = ../scripts/gen_gtp_data.sh
SCRIPTS := \
$(START_SH) \
$(STOP_SH) \
$(INIT_LOADER_SH) \
$(INIT_PRELOAD_SH) \
- $(INIT_UIHV_SH) \
$(INIT_WSP_SH) \
$(INIT_GTP_SH)
$(INIT_PRELOAD_SH): $(PRELOAD_SCRIPT)
bash $< $@
-#UIHV
-$(INIT_UIHV_SH): $(UIHV_SCRIPT)
- bash $< $@
-
#GOT patcher
$(INIT_GTP_SH): $(GTP_SCRIPT)
bash $< $@
#include "threads.h"
#include "smack.h"
#include "swap_debug.h"
-#include "ui_viewer.h"
#include "cpp/features/feature_manager_c.h"
#include "cpp/auxd/auxd_client_c.h"
{
const char ui_viewer_log[] = "/run/swap/uilib.log";
- if (is_feature_enabled(FL_UI_VIEWER_PROFILING))
- if (ui_viewer_enable(app_info))
- LOGE("Failed to enabled UI viewer profiling\n");
-
if (access(ui_viewer_log, F_OK) != -1)
remove(ui_viewer_log);
static int kill_app_case_type_tizen(const struct app_info_t *app_info)
{
- ui_viewer_disable();
-
if (!auxd_client_tizen_app_terminate(manager.auxd_client, app_info->app_id)) {
LOGE("Cannot kill tizen app %s\n", app_info->app_id);
return -1;
+++ /dev/null
-/*
- * DA manager
- *
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- *
- * Anastasia Lyupa <a.lyupa@samsung.com>
- *
- * 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.
- *
- * Contributors:
- * - Samsung RnD Institute Russia
- *
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdbool.h>
-#include <string.h>
-#include <errno.h>
-
-#include "ui_viewer.h"
-#include "da_protocol.h"
-#include "swap_debug.h"
-#include "smack.h"
-
-static int ui_viewer_set_app_info(const struct app_info_t *app_info)
-{
- const char APP_INFO_FILE[] =
- "/sys/kernel/debug/swap/uihv/app_info";
- FILE *fp;
- int ret = 0, c = 0;
- uint64_t main_offset;
-
- main_offset = *(uint64_t*)app_info->setup_data.data;
-
- if (app_info->exe_path == NULL || !strlen(app_info->exe_path)) {
- LOGE("Executable path is not correct\n");
- ret = -EINVAL;
- goto fail;
- }
-
- fp = fopen(APP_INFO_FILE, "w");
- if (fp != NULL) {
- c = fprintf(fp, "0x%lx:%s\n", (unsigned long)main_offset,
- app_info->exe_path);
- if (c < 0) {
- LOGE("Can't write to file: %s\n", APP_INFO_FILE);
- ret = -EIO;
- }
- fclose(fp);
- } else {
- LOGE("Can't open file: %s\n", APP_INFO_FILE);
- ret = -ENOENT;
- }
-fail:
- return ret;
-}
-
-static int ui_viewer_ctrl(bool enable)
-{
- const char UI_ENABLE_FILE[] =
- "/sys/kernel/debug/swap/uihv/enable";
- FILE *fp;
- int ret = 0, c = 0;
-
- fp = fopen(UI_ENABLE_FILE, "w");
- if (fp != NULL) {
- c = fprintf(fp, "%d\n", enable ? 1 : 0);
- if (c < 0) {
- LOGE("Can't write to file: %s\n", UI_ENABLE_FILE);
- ret = -EIO;
- }
- fclose(fp);
- } else {
- LOGE("Can't open file: %s\n", UI_ENABLE_FILE);
- ret = -ENOENT;
- }
-
- return ret;
-}
-
-int ui_viewer_enable(const struct app_info_t *app_info)
-{
- int ret = 0;
-
- if (ui_viewer_set_app_info(app_info)) {
- LOGE("Cannot set app info for ui viewer\n");
- ret = -1;
- goto out;
- }
-
- ret = ui_viewer_ctrl(true);
-
-out:
- return ret;
-}
-
-int ui_viewer_disable(void)
-{
- return ui_viewer_ctrl(false);
-}
+++ /dev/null
-/*
- * DA manager
- *
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- *
- * Anastasia Lyupa <a.lyupa@samsung.com>
- *
- * 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.
- *
- * Contributors:
- * - Samsung RnD Institute Russia
- *
- */
-
-
-#ifndef UI_VIEWER_H_
-#define UI_VIEWER_H_
-
-#include "da_inst.h"
-
-int ui_viewer_enable(const struct app_info_t *app_info);
-int ui_viewer_disable(void);
-
-#endif /* UI_VIEWER_H_ */
%{_bindir}/swap_stop.sh
%{_bindir}/swap_init_loader.sh
%{_bindir}/swap_init_preload.sh
-%{_bindir}/swap_init_uihv.sh
%{_bindir}/swap_init_wsp.sh
%{_bindir}/swap_init_gtp.sh
+++ /dev/null
-#!/bin/bash
-ui_viewer_lib="$LIBDIR/da_ui_viewer.so"
-
-output=$1
-
-
-function print_header()
-{
- filename=$1
- echo "#!/bin/bash
-#Preload
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-" > $filename
-}
-
-function print_ui_viewer_lib()
-{
- filename=$1
- echo -e "/bin/echo \"$ui_viewer_lib\" > /sys/kernel/debug/swap/uihv/path" >> $filename
-}
-
-##################################
-# Script entry point #
-##################################
-
-
-print_header $output
-print_ui_viewer_lib $output
swap_preload.ko \
swap_wsp.ko \
swap_nsp.ko \
-swap_uihv.ko \
swap_gtp.ko \
"
/usr/bin/swap_init_preload.sh
fi
-#UIHV
-if [ -d /sys/kernel/debug/swap/uihv/ ]
-then
- /usr/bin/swap_init_uihv.sh
-fi
-
#WSP
if [ -d /sys/kernel/debug/swap/wsp/ ]
then