diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..c1ef7f2
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,4 @@
+hidl_package_root {
+    name: "vendor.samsung_slsi.hardware.epic",
+    path: "hardware/samsung_slsi/interfaces/epic",
+}
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..28dda55
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,22 @@
+#
+# Copyright (C) 2012 The Android Open Source Project
+#
+# 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.
+#
+
+ifeq ($(TARGET_SOC_BASE), exynos9830)
+interfaces_dirs := \
+	libGeoTrans/1.0
+
+include $(call all-named-subdir-makefiles,$(interfaces_dirs))
+endif
diff --git a/epic/1.0/Android.bp b/epic/1.0/Android.bp
new file mode 100644
index 0000000..9144293
--- /dev/null
+++ b/epic/1.0/Android.bp
@@ -0,0 +1,15 @@
+// This file is autogenerated by hidl-gen -Landroidbp.
+
+hidl_interface {
+    name: "vendor.samsung_slsi.hardware.epic@1.0",
+    root: "vendor.samsung_slsi.hardware.epic",
+    srcs: [
+	"IEpicHandle.hal",
+        "IEpicRequest.hal",
+    ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    gen_java: true,
+}
+
diff --git a/epic/1.0/IEpicHandle.hal b/epic/1.0/IEpicHandle.hal
new file mode 100644
index 0000000..abec6f7
--- /dev/null
+++ b/epic/1.0/IEpicHandle.hal
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * 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.
+ */
+
+package vendor.samsung_slsi.hardware.epic@1.0;
+
+interface IEpicHandle {
+    init(int64_t request_handle);
+    get_handle() generates
+	(int64_t ret);
+    diagonostic();
+};
diff --git a/epic/1.0/IEpicRequest.hal b/epic/1.0/IEpicRequest.hal
new file mode 100644
index 0000000..d79f7a1
--- /dev/null
+++ b/epic/1.0/IEpicRequest.hal
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * 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.
+ */
+
+package vendor.samsung_slsi.hardware.epic@1.0;
+
+import IEpicHandle;
+
+interface IEpicRequest {
+    init(int32_t scenario_id) generates
+	(IEpicHandle ret);
+    init_multi(vec<int32_t> scenario_id_list) generates
+        (IEpicHandle ret);
+    update_handle_id(IEpicHandle req, string handle_id) generates
+	(uint32_t ret);
+    acquire_lock(IEpicHandle req) generates
+	(uint32_t ret);
+    release_lock(IEpicHandle req) generates
+	(uint32_t ret);
+    acquire_lock_option(IEpicHandle req, uint32_t value, uint32_t usec) generates
+	(uint32_t ret);
+    acquire_lock_multi_option(IEpicHandle req, vec<uint32_t> value_list, vec<uint32_t> usec_list) generates
+	(uint32_t ret);
+    acquire_lock_conditional(IEpicHandle req, string condition_name) generates
+	(uint32_t ret);
+    release_lock_conditional(IEpicHandle req, string condition_name) generates
+	(uint32_t ret);
+    perf_hint(IEpicHandle req, string name) generates
+        (uint32_t ret);
+    hint_release(IEpicHandle req, string name) generates
+        (uint32_t ret);
+};
diff --git a/epic/1.0/default/Android.bp b/epic/1.0/default/Android.bp
new file mode 100644
index 0000000..569db13
--- /dev/null
+++ b/epic/1.0/default/Android.bp
@@ -0,0 +1,46 @@
+cc_library_shared {
+    // FIXME: this should only be -impl for a passthrough hal.
+    // In most cases, to convert this to a binderized implementation, you should:
+    // - change '-impl' to '-service' here and make it a cc_binary instead of a
+    //   cc_library_shared.
+    // - add a *.rc file for this module.
+    // - delete HIDL_FETCH_I* functions.
+    // - call configureRpcThreadpool and registerAsService on the instance.
+    // You may also want to append '-impl/-service' with a specific identifier like
+    // '-vendor' or '-<hardware identifier>' etc to distinguish it.
+    name: "vendor.samsung_slsi.hardware.epic@1.0-impl",
+    relative_install_path: "hw",
+    // FIXME: this should be 'vendor: true' for modules that will eventually be
+    // on AOSP.
+    proprietary: true,
+    srcs: [
+        "EpicRequest.cpp",
+	"EpicHandle.cpp"
+    ],
+    shared_libs: [
+        "libhidlbase",
+        "libutils",
+	"liblog",
+        "vendor.samsung_slsi.hardware.epic@1.0",
+    ],
+}
+
+cc_binary {
+    name: "vendor.samsung_slsi.hardware.epic@1.0-service",
+    init_rc: ["vendor.samsung_slsi.hardware.epic@1.0-service.rc"],
+    relative_install_path: "hw",
+    proprietary: true,
+    srcs: ["EpicService.cpp"],
+    shared_libs: [
+        "libutils",
+        "libcutils",
+        "libhidlbase",
+        "liblog",
+        "libbinder",
+        "libsync",
+        "libhardware",
+        "libhidlmemory",
+        "android.hidl.memory@1.0",
+        "vendor.samsung_slsi.hardware.epic@1.0",
+    ],
+}
diff --git a/epic/1.0/default/EpicHandle.cpp b/epic/1.0/default/EpicHandle.cpp
new file mode 100644
index 0000000..ba3aad2
--- /dev/null
+++ b/epic/1.0/default/EpicHandle.cpp
@@ -0,0 +1,49 @@
+#include "EpicHandle.h"
+
+namespace vendor {
+	namespace samsung_slsi {
+		namespace hardware {
+			namespace epic {
+				namespace V1_0 {
+					namespace implementation {
+						EpicHandle::EpicHandle() :
+							mReqHandle(0),
+							pfn_free_request(nullptr)
+						{
+						}
+
+						EpicHandle::~EpicHandle()
+						{
+							if (mReqHandle == 0)
+								return;
+
+							if (pfn_free_request != nullptr)
+								pfn_free_request(mReqHandle);
+						}
+
+						// Methods from ::vendor::samsung_slsi::hardware::epic::V1_0::IEpicHandle follow.
+						Return<void> EpicHandle::init(int64_t request_handle) {
+							mReqHandle = static_cast<long>(request_handle);
+
+							return Void();
+						}
+
+						Return<int64_t> EpicHandle::get_handle() {
+							return static_cast<int64_t>(mReqHandle);
+						}
+
+						Return<void> EpicHandle::diagonostic() {
+							return Void();
+						}
+
+						Return<void> EpicHandle::set_pfn_finalize(free_request_t pfn)
+						{
+							pfn_free_request = pfn;
+							return Void();
+						}
+					}  // namespace implementation
+				}  // namespace V1_0
+			}  // namespace epic
+		}  // namespace interfaces
+	}  // namespace samsung_slsi
+}  // namespace hardware
diff --git a/epic/1.0/default/EpicHandle.h b/epic/1.0/default/EpicHandle.h
new file mode 100644
index 0000000..a616ec9
--- /dev/null
+++ b/epic/1.0/default/EpicHandle.h
@@ -0,0 +1,48 @@
+#ifndef VENDOR_SAMSUNG_SLSI_HARDWARE_EPIC_V1_0_EPICHANDLE_H
+#define VENDOR_SAMSUNG_SLSI_HARDWARE_EPIC_V1_0_EPICHANDLE_H
+
+#include <vendor/samsung_slsi/hardware/epic/1.0/IEpicHandle.h>
+#include <hidl/MQDescriptor.h>
+#include <hidl/Status.h>
+#include <hidl/HidlSupport.h>
+
+#include "EpicType.h"
+
+namespace vendor {
+	namespace samsung_slsi {
+		namespace hardware {
+			namespace epic {
+				namespace V1_0 {
+					namespace implementation {
+
+						using ::android::hardware::hidl_array;
+						using ::android::hardware::hidl_memory;
+						using ::android::hardware::hidl_string;
+						using ::android::hardware::hidl_vec;
+						using ::android::hardware::Return;
+						using ::android::hardware::Void;
+						using ::android::sp;
+
+						struct EpicHandle : public IEpicHandle {
+							EpicHandle();
+							virtual ~EpicHandle();
+
+							// Methods from ::vendor::samsung_slsi::hardware::epic::V1_0::IEpicHandle follow.
+							Return<void> init(int64_t request_handle) override;
+							Return<int64_t> get_handle() override;
+
+							Return<void> diagonostic() override;
+
+							Return<void> set_pfn_finalize(free_request_t pfn);
+
+							long mReqHandle;
+							free_request_t pfn_free_request;
+						};
+					}  // namespace implementation
+				}  // namespace V1_0
+			}  // namespace epic
+		}  // namespace hardware
+	}  // namespace samsung_slsi
+}  // namespace vendor
+
+#endif  // VENDOR_SAMSUNG_SLSI_HARDWARE_EPIC_V1_0_EPICHANDLE_H
diff --git a/epic/1.0/default/EpicRequest.cpp b/epic/1.0/default/EpicRequest.cpp
new file mode 100644
index 0000000..f6aac74
--- /dev/null
+++ b/epic/1.0/default/EpicRequest.cpp
@@ -0,0 +1,297 @@
+#include "EpicRequest.h"
+#include "EpicHandle.h"
+
+#include <chrono>
+#include <thread>
+#include <sstream>
+
+#include <dlfcn.h>
+#include <unistd.h>
+#include <sys/file.h>
+#include <sys/stat.h>
+#include <sys/sendfile.h>
+#include <android/log.h>
+
+namespace vendor {
+namespace samsung_slsi {
+namespace hardware {
+namespace epic {
+namespace V1_0 {
+namespace implementation {
+EpicRequest::EpicRequest() :
+	so_handle(nullptr)
+{
+	if (sizeof(long) == sizeof(int))
+		so_handle = dlopen("/vendor/lib/libepic_helper.so", RTLD_NOW);
+	else
+		so_handle = dlopen("/vendor/lib64/libepic_helper.so", RTLD_NOW);
+
+	if (so_handle == nullptr) {
+		pfn_init = nullptr;
+		pfn_term = nullptr;
+		pfn_alloc_request = nullptr;
+		pfn_alloc_multi_request = nullptr;
+		pfn_update_handle = nullptr;
+		pfn_free_request = nullptr;
+		pfn_acquire = nullptr;
+		pfn_acquire_option = nullptr;
+		pfn_acquire_multi_option = nullptr;
+		pfn_release = nullptr;
+		pfn_acquire_conditional = nullptr;
+		pfn_release_conditional = nullptr;
+		pfn_hint = nullptr;
+		pfn_hint_release = nullptr;
+		pfn_dump = nullptr;
+		return;
+	}
+
+	pfn_init = (init_t)dlsym(so_handle, "epic_init");
+	pfn_term = (term_t)dlsym(so_handle, "epic_term");
+	pfn_alloc_request = (alloc_request_t)dlsym(so_handle, "epic_alloc_request_internal");
+	pfn_alloc_multi_request = (alloc_multi_request_t)dlsym(so_handle, "epic_alloc_multi_request_internal");
+	pfn_update_handle = (update_handle_t)dlsym(so_handle, "epic_update_handle_id_internal");
+	pfn_free_request = (free_request_t)dlsym(so_handle, "epic_free_request_internal");
+	pfn_acquire = (acquire_t)dlsym(so_handle, "epic_acquire_internal");
+	pfn_acquire_option = (acquire_option_t)dlsym(so_handle, "epic_acquire_option_internal");
+	pfn_acquire_multi_option = (acquire_multi_option_t)dlsym(so_handle, "epic_acquire_multi_option_internal");
+	pfn_acquire_conditional = (acquire_conditional_t)dlsym(so_handle, "epic_acquire_conditional_internal");
+	pfn_release_conditional = (release_conditional_t)dlsym(so_handle, "epic_release_conditional_internal");
+	pfn_hint = (hint_t)dlsym(so_handle, "epic_perf_hint_internal");
+	pfn_hint_release = (hint_t)dlsym(so_handle, "epic_hint_release_internal");
+	pfn_release = (release_t)dlsym(so_handle, "epic_release_internal");
+	pfn_dump = (dump_t)dlsym(so_handle, "epic_request_dumpstate_internal");
+
+	if (pfn_init != nullptr)
+		pfn_init();
+}
+
+EpicRequest::~EpicRequest()
+{
+	if (pfn_term != nullptr)
+		pfn_term();
+
+	dlclose(so_handle);
+}
+
+// Methods from ::hardware::samsung_slsi::hardware::epic::V1_0::IEpicRequest follow.
+Return<sp<IEpicHandle>> EpicRequest::init(int32_t scenario_id) {
+	if (pfn_alloc_request == nullptr)
+		return nullptr;
+
+	handleType req_handle = pfn_alloc_request(scenario_id);
+
+	EpicHandle *ret_instance = new EpicHandle();
+	ret_instance->set_pfn_finalize(pfn_free_request);
+
+	sp<IEpicHandle> ret = ret_instance;
+	ret->init(req_handle);
+
+	return ret;
+}
+
+Return<sp<IEpicHandle>> EpicRequest::init_multi(const hidl_vec<int32_t>& scenario_id_list) {
+	if (pfn_alloc_multi_request == nullptr)
+		return nullptr;
+
+	handleType req_handle = pfn_alloc_multi_request(scenario_id_list.data(), scenario_id_list.size());
+
+	EpicHandle *ret_instance = new EpicHandle();
+	ret_instance->set_pfn_finalize(pfn_free_request);
+
+	sp<IEpicHandle> ret = ret_instance;
+	ret->init(req_handle);
+
+	return ret;
+}
+
+Return<uint32_t> EpicRequest::update_handle_id(const sp<IEpicHandle> &handle, const hidl_string &handle_id) {
+	if (handle == nullptr)
+		return 0;
+
+	handleType req_handle = (handleType)handle->get_handle();
+
+	if (req_handle == 0 ||
+		pfn_update_handle == nullptr)
+		return false;
+
+	pfn_update_handle(req_handle, handle_id.c_str());
+	return true;
+}
+
+Return<uint32_t> EpicRequest::acquire_lock(const sp<IEpicHandle> &handle) {
+	if (handle == nullptr)
+		return 0;
+
+	handleType req_handle = (handleType)handle->get_handle();
+
+	if (req_handle == 0 ||
+		pfn_acquire == nullptr)
+		return 0;
+
+	return (uint32_t)pfn_acquire(req_handle);
+}
+
+Return<uint32_t> EpicRequest::release_lock(const sp<IEpicHandle> &handle) {
+	if (handle == nullptr)
+		return 0;
+
+	handleType req_handle = (handleType)handle->get_handle();
+
+	if (req_handle == 0 ||
+		pfn_release == nullptr)
+		return 0;
+
+	return (uint32_t)pfn_release(req_handle);
+}
+
+Return<uint32_t> EpicRequest::acquire_lock_option(const sp<IEpicHandle> &handle, uint32_t value, uint32_t usec) {
+	if (handle == nullptr)
+		return 0;
+
+	handleType req_handle = (handleType)handle->get_handle();
+
+	if (req_handle == 0 ||
+		pfn_acquire_option == nullptr)
+		return 0;
+
+	return (uint32_t)pfn_acquire_option(req_handle, value, usec);
+}
+
+Return<uint32_t> EpicRequest::acquire_lock_multi_option(const sp<IEpicHandle> &handle, const hidl_vec<uint32_t>& value_list, const hidl_vec<uint32_t>& usec_list) {
+	if (handle == nullptr)
+		return 0;
+
+	handleType req_handle = (handleType)handle->get_handle();
+
+	if (req_handle == 0 ||
+		pfn_acquire_multi_option == nullptr)
+		return 0;
+
+	return (uint32_t)pfn_acquire_multi_option(req_handle, value_list.data(), usec_list.data(), value_list.size());
+}
+
+Return<uint32_t> EpicRequest::acquire_lock_conditional(const sp<IEpicHandle> &handle, const hidl_string &condition_name) {
+	if (handle == nullptr)
+		return 0;
+
+	handleType req_handle = (handleType)handle->get_handle();
+
+	if (req_handle == 0 ||
+		pfn_acquire_conditional == nullptr)
+		return 0;
+
+	return (uint32_t)pfn_acquire_conditional(req_handle, condition_name.c_str(), condition_name.size());
+}
+
+Return<uint32_t> EpicRequest::release_lock_conditional(const sp<IEpicHandle> &handle, const hidl_string &condition_name) {
+	if (handle == nullptr)
+		return 0;
+
+	handleType req_handle = (handleType)handle->get_handle();
+
+	if (req_handle == 0 ||
+		pfn_release_conditional == nullptr)
+		return 0;
+
+	return (uint32_t)pfn_release_conditional(req_handle, condition_name.c_str(), condition_name.size());
+}
+
+Return<uint32_t> EpicRequest::perf_hint(const sp<IEpicHandle> &handle, const hidl_string& name) {
+	if (handle == nullptr)
+		return 0;
+
+	handleType req_handle = (handleType)handle->get_handle();
+
+	if (req_handle == 0 ||
+		pfn_hint == nullptr)
+		return 0;
+
+	return (uint32_t)pfn_hint(req_handle, name.c_str(), name.size());
+}
+
+Return<uint32_t> EpicRequest::hint_release(const sp<IEpicHandle> &handle, const hidl_string& name) {
+	if (handle == nullptr)
+		return 0;
+
+	handleType req_handle = (handleType)handle->get_handle();
+
+	if (req_handle == 0 ||
+		pfn_hint_release == nullptr)
+		return 0;
+
+	return (uint32_t)pfn_hint_release(req_handle, name.c_str(), name.size());
+}
+
+Return<void> EpicRequest::debug(const hidl_handle& fd, const hidl_vec<hidl_string>& __unused options) {
+	if (pfn_dump == nullptr)
+		return Void();
+
+	const native_handle_t* native_handle = fd.getNativeHandle();
+	if (native_handle == nullptr || native_handle->numFds < 1)
+		return Void();
+
+	int dumpFd = native_handle->data[0];
+
+	sp<IEpicHandle> handle = init(0);
+	handleType req_handle = (handleType)handle->get_handle();
+
+	std::ostringstream fmt;
+	fmt << PATH_DIR_DUMP << PATH_FILE_DUMP;
+	std::string &&path_dump = fmt.str();
+
+	pfn_dump(req_handle, path_dump.c_str(), path_dump.length());
+	std::this_thread::sleep_for(std::chrono::milliseconds(100));
+
+	int requestDumpFd = -1, count_try = 0;
+	for (count_try = 0; count_try < MAX_TRIES_DUMP; ++count_try) {
+		requestDumpFd = open(path_dump.c_str(), O_RDONLY);
+		if (requestDumpFd >= 0)
+			break;
+
+		std::this_thread::sleep_for(std::chrono::milliseconds(1));
+	}
+
+	if (count_try == MAX_TRIES_DUMP &&
+		requestDumpFd == -1)
+		return Void();
+
+	bool lockHeld = false;
+	for (count_try = 0; count_try < MAX_TRIES_DUMP; ++count_try) {
+		if (flock(requestDumpFd, LOCK_EX) == 0) {
+			lockHeld = true;
+			break;
+		}
+
+		std::this_thread::sleep_for(std::chrono::milliseconds(1));
+	}
+
+	if (count_try == MAX_TRIES_DUMP &&
+		!lockHeld) {
+		close(requestDumpFd);
+		return Void();
+	}
+
+	off_t file_size;
+	file_size = lseek(requestDumpFd, 0, SEEK_END);
+	lseek(requestDumpFd, 0, SEEK_SET);
+	if (sendfile(dumpFd, requestDumpFd, 0, file_size) < 0)
+		__android_log_print(ANDROID_LOG_INFO, "EpicHAL", "Couldn't send file content successfully!");
+	if (flock(requestDumpFd, LOCK_UN) == -1)
+		__android_log_print(ANDROID_LOG_INFO, "EpicHAL", "Couldn't release file lock!");
+	close(requestDumpFd);
+	unlink(path_dump.c_str());
+
+	return Void();
+}
+
+// Methods from ::android::hidl::base::V1_0::IBase follow.
+IEpicRequest* HIDL_FETCH_IEpicRequest(const char* /* name */) {
+	return new EpicRequest();
+}
+//
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace epic
+}  // namespace hardware
+}  // namespace samsung_slsi
+}  // namespace vendor
diff --git a/epic/1.0/default/EpicRequest.h b/epic/1.0/default/EpicRequest.h
new file mode 100644
index 0000000..c9b53bd
--- /dev/null
+++ b/epic/1.0/default/EpicRequest.h
@@ -0,0 +1,81 @@
+#ifndef VENDOR_SAMSUNG_SLSI_HARDWARE_EPIC_V1_0_EPICREQUEST_H
+#define VENDOR_SAMSUNG_SLSI_HARDWARE_EPIC_V1_0_EPICREQUEST_H
+
+#include <vendor/samsung_slsi/hardware/epic/1.0/IEpicRequest.h>
+#include <vendor/samsung_slsi/hardware/epic/1.0/IEpicHandle.h>
+#include <hidl/MQDescriptor.h>
+#include <hidl/Status.h>
+#include <hidl/HidlSupport.h>
+
+#include "EpicType.h"
+
+namespace vendor {
+	namespace samsung_slsi {
+		namespace hardware {
+			namespace epic {
+				namespace V1_0 {
+					namespace implementation {
+
+						using ::android::hardware::hidl_array;
+						using ::android::hardware::hidl_memory;
+						using ::android::hardware::hidl_string;
+						using ::android::hardware::hidl_vec;
+						using ::android::hardware::hidl_handle;
+						using ::android::hardware::Return;
+						using ::android::hardware::Void;
+						using ::android::sp;
+
+						struct EpicRequest : public IEpicRequest {
+							EpicRequest();
+							virtual ~EpicRequest();
+
+							// Methods from ::vendor::samsung_slsi::hardware::epic::V1_0::IEpicRequest follow.
+
+							Return<sp<IEpicHandle>> init(int32_t scenario_id) override;
+							Return<sp<IEpicHandle>> init_multi(const hidl_vec<int32_t>& scenario_id_list) override;
+							Return<uint32_t> update_handle_id(const sp<IEpicHandle> &handle, const hidl_string &handle_id) override;
+							Return<uint32_t> acquire_lock(const sp<IEpicHandle> &handle) override;
+							Return<uint32_t> release_lock(const sp<IEpicHandle> &handle) override;
+							Return<uint32_t> acquire_lock_option(const sp<IEpicHandle> &handle, uint32_t value, uint32_t usec) override;
+							Return<uint32_t> acquire_lock_multi_option(const sp<IEpicHandle> &handle, const hidl_vec<uint32_t>& value_list, const hidl_vec<uint32_t>& usec_list) override;
+							Return<uint32_t> acquire_lock_conditional(const sp<IEpicHandle> &handle, const hidl_string &condition_name);
+							Return<uint32_t> release_lock_conditional(const sp<IEpicHandle> &handle, const hidl_string &condition_name);
+							Return<uint32_t> perf_hint(const sp<IEpicHandle> &handle, const hidl_string& name) override;
+							Return<uint32_t> hint_release(const sp<IEpicHandle> &handle, const hidl_string& name) override;
+
+							Return<void> debug(const hidl_handle& fd, const hidl_vec<hidl_string>& options) override;
+
+							void *so_handle;
+
+							init_t pfn_init;
+							term_t pfn_term;
+							alloc_request_t pfn_alloc_request;
+							alloc_multi_request_t pfn_alloc_multi_request;
+							update_handle_t pfn_update_handle;
+							free_request_t pfn_free_request;
+							acquire_t pfn_acquire;
+							acquire_option_t pfn_acquire_option;
+							acquire_multi_option_t pfn_acquire_multi_option;
+							acquire_conditional_t pfn_acquire_conditional;
+							release_conditional_t pfn_release_conditional;
+							hint_t pfn_hint;
+							hint_release_t pfn_hint_release;
+							release_t pfn_release;
+							dump_t pfn_dump;
+
+							constexpr static const char *PATH_DIR_DUMP = "/data/vendor/epic/";
+							constexpr static const char *PATH_FILE_DUMP = "epic.dump";
+							constexpr static const int MAX_TRIES_DUMP = 1000;
+						};
+
+						// FIXME: most likely delete, this is only for passthrough implementations
+						extern "C" IEpicRequest* HIDL_FETCH_IEpicRequest(const char* name);
+
+					}  // namespace implementation
+				}  // namespace V1_0
+			}  // namespace epic
+		}  // namespace hardware
+	}  // namespace samsung_slsi
+}  // namespace vendor
+
+#endif  // VENDOR_SAMSUNG_SLSI_HARDWARE_EPIC_V1_0_EPICREQUEST_H
diff --git a/epic/1.0/default/EpicService.cpp b/epic/1.0/default/EpicService.cpp
new file mode 100644
index 0000000..65c63c0
--- /dev/null
+++ b/epic/1.0/default/EpicService.cpp
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * 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.
+ */
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+#define LOG_TAG "vendor.samsung_slsi.hardware.epic@1.0-service"
+
+#include <android/log.h>
+#include <hidl/HidlTransportSupport.h>
+#include <binder/ProcessState.h>
+
+#include <hidl/LegacySupport.h>
+#include "EpicRequest.h"
+
+using android::hardware::configureRpcThreadpool;
+using android::hardware::joinRpcThreadpool;
+using android::hardware::defaultPassthroughServiceImplementation;
+using android::sp;
+
+using vendor::samsung_slsi::hardware::epic::V1_0::IEpicRequest;
+using vendor::samsung_slsi::hardware::epic::V1_0::implementation::EpicRequest;
+
+int main()
+{
+	android::ProcessState::initWithDriver("/dev/vndbinder");
+
+	ALOGI("Epic Service started!");
+	return defaultPassthroughServiceImplementation<IEpicRequest>();
+}
diff --git a/epic/1.0/default/EpicType.h b/epic/1.0/default/EpicType.h
new file mode 100644
index 0000000..29d30d4
--- /dev/null
+++ b/epic/1.0/default/EpicType.h
@@ -0,0 +1,21 @@
+#ifndef VENDOR_SAMSUNG_SLSI_HARDWARE_EPIC_V1_0_EPICTYPE_H
+#define VENDOR_SAMSUNG_SLSI_HARDWARE_EPIC_V1_0_EPICTYPE_H
+
+typedef long handleType;
+typedef void (*init_t)();
+typedef void (*term_t)();
+typedef handleType (*alloc_request_t)(int);
+typedef handleType (*alloc_multi_request_t)(const int[], int);
+typedef void (*update_handle_t)(handleType, const char *);
+typedef void (*free_request_t)(handleType);
+typedef bool (*acquire_t)(handleType);
+typedef bool (*release_t)(handleType);
+typedef bool (*acquire_option_t)(handleType, unsigned int, unsigned int);
+typedef bool (*acquire_multi_option_t)(handleType, const unsigned int [], const unsigned int [], int len);
+typedef bool (*acquire_conditional_t)(handleType, const char *, ssize_t);
+typedef bool (*release_conditional_t)(handleType, const char *, ssize_t);
+typedef bool (*hint_t)(handleType, const char *, ssize_t);
+typedef bool (*hint_release_t)(handleType, const char *, ssize_t);
+typedef bool (*dump_t)(handleType, const char *, ssize_t);
+
+#endif
diff --git a/epic/1.0/default/vendor.samsung_slsi.hardware.epic@1.0-service.rc b/epic/1.0/default/vendor.samsung_slsi.hardware.epic@1.0-service.rc
new file mode 100644
index 0000000..5246452
--- /dev/null
+++ b/epic/1.0/default/vendor.samsung_slsi.hardware.epic@1.0-service.rc
@@ -0,0 +1,4 @@
+service epic_service /vendor/bin/hw/vendor.samsung_slsi.hardware.epic@1.0-service
+    class hal
+    user system
+    group system
diff --git a/epic/current.txt b/epic/current.txt
new file mode 100644
index 0000000..5a1bfa1
--- /dev/null
+++ b/epic/current.txt
@@ -0,0 +1,2 @@
+05c5e1c716570963df5aece67b0a2ba9edece543777b76d1d0ea0a4ed2a8c5af vendor.samsung_slsi.hardware.epic@1.0::IEpicHandle
+3f3942355fe2f7a17e3019e2ad8089d83dedf70c9a629ef5d54b6af5aaf98162 vendor.samsung_slsi.hardware.epic@1.0::IEpicRequest
diff --git a/epic/epicoperator/Android.bp b/epic/epicoperator/Android.bp
new file mode 100644
index 0000000..0b29261
--- /dev/null
+++ b/epic/epicoperator/Android.bp
@@ -0,0 +1,23 @@
+cc_library {
+    name: "libepicoperator",
+    proprietary: true,
+    srcs: [
+	"EpicConnector.cpp",
+        "EpicBaseOperator.cpp",
+	"EpicCommonOperator.cpp",
+	"EpicCommonMultiOperator.cpp",
+	"EpicVideoDecodingOperator.cpp",
+	"EpicVideoEncodingOperator.cpp",
+	"OperatorFactory.cpp",
+	"EpicExportAPI.cpp"
+    ],
+    shared_libs: [
+	"libbinder",
+	"libutils",
+	"libcutils",
+	"libhidlbase",
+	"liblog",
+        "vendor.samsung_slsi.hardware.epic@1.0"
+    ],
+    export_include_dirs: ["./"]
+}
diff --git a/epic/epicoperator/EpicBaseOperator.cpp b/epic/epicoperator/EpicBaseOperator.cpp
new file mode 100644
index 0000000..010abe2
--- /dev/null
+++ b/epic/epicoperator/EpicBaseOperator.cpp
@@ -0,0 +1,35 @@
+#include "EpicBaseOperator.h"
+
+namespace epic {
+	EpicBaseOperator::EpicBaseOperator(int scenario_id)
+	{
+		if (!prepareConnector())
+			return;
+
+		mConnector->alloc_request(scenario_id);
+	}
+
+	EpicBaseOperator::EpicBaseOperator(int *scenario_id_list, int len)
+	{
+		if (!prepareConnector())
+			return;
+
+		mConnector->alloc_request(scenario_id_list, len);
+	}
+
+	EpicBaseOperator::~EpicBaseOperator()
+	{
+	}
+
+	bool EpicBaseOperator::doAction(int __unused cmd, void __unused *arg)
+	{
+		return true;
+	}
+
+	bool EpicBaseOperator::prepareConnector()
+	{
+		mConnector = std::make_shared<EpicConnector>();
+
+		return (mConnector != nullptr);
+	}
+}
diff --git a/epic/epicoperator/EpicBaseOperator.h b/epic/epicoperator/EpicBaseOperator.h
new file mode 100644
index 0000000..514fdbb
--- /dev/null
+++ b/epic/epicoperator/EpicBaseOperator.h
@@ -0,0 +1,24 @@
+#pragma once
+
+#include <memory>
+
+#include "IEpicOperator.h"
+#include "EpicConnector.h"
+
+namespace epic {
+	class EpicBaseOperator : public IEpicOperator {
+	public:
+		virtual ~EpicBaseOperator();
+
+		virtual bool doAction(int cmd, void *arg) override;
+
+	protected:
+		EpicBaseOperator(int scenario_id);
+		EpicBaseOperator(int *scenario_id, int len);
+
+		std::shared_ptr<EpicConnector> mConnector;
+
+	private:
+		bool prepareConnector();
+	};
+}
diff --git a/epic/epicoperator/EpicCommonMultiOperator.cpp b/epic/epicoperator/EpicCommonMultiOperator.cpp
new file mode 100644
index 0000000..86564eb
--- /dev/null
+++ b/epic/epicoperator/EpicCommonMultiOperator.cpp
@@ -0,0 +1,48 @@
+#include "EpicCommonMultiOperator.h"
+
+#include "EpicEnum.h"
+
+namespace epic {
+	EpicCommonMultiOperator::EpicCommonMultiOperator() :
+		EpicBaseOperator(0)
+	{
+	}
+
+	EpicCommonMultiOperator::EpicCommonMultiOperator(int *scenario_id_list, int len) :
+		EpicBaseOperator(scenario_id_list, len)
+	{
+	}
+
+	EpicCommonMultiOperator::~EpicCommonMultiOperator()
+	{
+	}
+
+	bool EpicCommonMultiOperator::doAction(int __unused cmd, void *arg)
+	{
+		switch (cmd) {
+		case eAcquire:
+			return mConnector->acquire();
+		case eRelease:
+			return mConnector->release();
+		case eAcquireOption:
+			return doAcquireOption(arg);
+		default:
+			return false;
+		}
+
+		return false;
+	}
+
+	bool EpicCommonMultiOperator::doAcquireOption(void *arg)
+	{
+		if (arg == nullptr)
+			return false;
+
+		unsigned int *arg_array = reinterpret_cast<unsigned int *>(arg);
+		unsigned int len_array = *arg_array;
+
+		arg_array++;
+
+		return mConnector->acquire(arg_array, arg_array + len_array, len_array);
+	}
+}
diff --git a/epic/epicoperator/EpicCommonMultiOperator.h b/epic/epicoperator/EpicCommonMultiOperator.h
new file mode 100644
index 0000000..703a372
--- /dev/null
+++ b/epic/epicoperator/EpicCommonMultiOperator.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include "IEpicOperator.h"
+#include "EpicBaseOperator.h"
+
+namespace epic {
+class EpicCommonMultiOperator : public EpicBaseOperator {
+	public:
+		EpicCommonMultiOperator();
+		EpicCommonMultiOperator(int *scenario_id_list, int len);
+		virtual ~EpicCommonMultiOperator() override;
+
+		virtual bool doAction(int cmd, void *arg) override;
+
+	private:
+		bool doAcquireOption(void *arg);
+	};
+}
diff --git a/epic/epicoperator/EpicCommonOperator.cpp b/epic/epicoperator/EpicCommonOperator.cpp
new file mode 100644
index 0000000..c8f8b54
--- /dev/null
+++ b/epic/epicoperator/EpicCommonOperator.cpp
@@ -0,0 +1,58 @@
+#include "EpicCommonOperator.h"
+
+#include "EpicEnum.h"
+
+namespace epic {
+	EpicCommonOperator::EpicCommonOperator() :
+		EpicBaseOperator(0)
+	{
+	}
+
+	EpicCommonOperator::EpicCommonOperator(int scenario_id) :
+		EpicBaseOperator(scenario_id)
+	{
+	}
+
+	EpicCommonOperator::~EpicCommonOperator()
+	{
+	}
+
+	bool EpicCommonOperator::doAction(int __unused cmd, void *arg)
+	{
+		switch (cmd) {
+		case eAcquire:
+			return mConnector->acquire();
+		case eRelease:
+			return mConnector->release();
+		case eAcquireOption:
+			return doAcquireOption(arg);
+		case eAcquireConditional:
+			return doConditional(&EpicConnector::acquire_conditional, arg);
+		case eReleaseConditional:
+			return doConditional(&EpicConnector::release_conditional, arg);
+		default:
+			return false;
+		}
+
+		return false;
+	}
+
+	bool EpicCommonOperator::doAcquireOption(void *arg)
+	{
+		if (arg == nullptr)
+			return false;
+
+		unsigned int *arg_array = reinterpret_cast<unsigned int *>(arg);
+
+		return mConnector->acquire(arg_array[0], arg_array[1]);
+	}
+
+	bool EpicCommonOperator::doConditional(bool (EpicConnector::*func_conditional)(std::string &), void *arg)
+	{
+		if (arg == nullptr)
+			return false;
+
+		std::string arg_string(reinterpret_cast<char *>(arg));
+		return ((*mConnector).*func_conditional)(arg_string);
+	}
+}
diff --git a/epic/epicoperator/EpicCommonOperator.h b/epic/epicoperator/EpicCommonOperator.h
new file mode 100644
index 0000000..60dc1f6
--- /dev/null
+++ b/epic/epicoperator/EpicCommonOperator.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "IEpicOperator.h"
+#include "EpicBaseOperator.h"
+
+namespace epic {
+	class EpicCommonOperator : public EpicBaseOperator {
+	public:
+		EpicCommonOperator();
+		EpicCommonOperator(int scenario_id);
+		virtual ~EpicCommonOperator() override;
+
+		virtual bool doAction(int cmd, void *arg) override;
+
+	private:
+		bool doAcquireOption(void *arg);
+		bool doConditional(bool (EpicConnector::*)(std::string &), void *arg);
+	};
+}
diff --git a/epic/epicoperator/EpicConnector.cpp b/epic/epicoperator/EpicConnector.cpp
new file mode 100644
index 0000000..cbc5af0
--- /dev/null
+++ b/epic/epicoperator/EpicConnector.cpp
@@ -0,0 +1,103 @@
+#include "EpicConnector.h"
+
+#include <vector>
+
+#include <android/log.h>
+
+#include <dlfcn.h>
+#include <unistd.h>
+
+using ::android::hardware::hidl_vec;
+
+namespace epic {
+	EpicConnector::EpicConnector()
+	{
+	}
+
+	EpicConnector::~EpicConnector()
+	{
+	}
+
+	void EpicConnector::alloc_request(int scenario_id)
+	{
+		getService();
+		if (mRequest == nullptr)
+			return;
+
+		mHandle = mRequest->init(scenario_id);
+	}
+
+	void EpicConnector::alloc_request(int *scenario_id_list, int len)
+	{
+		getService();
+		if (mRequest == nullptr)
+			return;
+
+		std::vector<int32_t> id_vec(scenario_id_list, scenario_id_list + len);
+		mHandle = mRequest->init_multi(id_vec);
+	}
+
+	bool EpicConnector::acquire()
+	{
+		if (mRequest == nullptr ||
+			mHandle == nullptr)
+			return false;
+
+		return mRequest->acquire_lock(mHandle);
+	}
+
+	bool EpicConnector::acquire(unsigned int value, unsigned int usec)
+	{
+		if (mRequest == nullptr ||
+			mHandle == nullptr)
+			return false;
+
+		return mRequest->acquire_lock_option(mHandle, value, usec);
+	}
+
+	bool EpicConnector::acquire(unsigned int *value, unsigned int *usec, int len)
+	{
+		if (mRequest == nullptr ||
+			mHandle == nullptr)
+			return false;
+
+		std::vector<unsigned int> value_vec(value, value + len);
+		std::vector<unsigned int> usec_vec(usec, usec + len);
+
+		return mRequest->acquire_lock_multi_option(mHandle, value_vec, usec_vec);
+	}
+
+	bool EpicConnector::acquire_conditional(std::string &condition_name)
+	{
+		if (mRequest == nullptr ||
+			mHandle == nullptr)
+			return false;
+
+		return mRequest->acquire_lock_conditional(mHandle, condition_name.c_str());
+	}
+
+	bool EpicConnector::release()
+	{
+		if (mRequest == nullptr ||
+			mHandle == nullptr)
+			return false;
+
+		return mRequest->release_lock(mHandle);
+	}
+
+	bool EpicConnector::release_conditional(std::string &condition_name)
+	{
+		if (mRequest == nullptr ||
+			mHandle == nullptr)
+			return false;
+
+		return mRequest->release_lock_conditional(mHandle, condition_name.c_str());
+	}
+
+	void EpicConnector::getService()
+	{
+		mRequest = IEpicRequest::getService();
+		if (mRequest == nullptr)
+			__android_log_print(ANDROID_LOG_INFO, "EPICOPERATOR", "Couldn't get service EPIC HIDL!");
+	}
+}
diff --git a/epic/epicoperator/EpicConnector.h b/epic/epicoperator/EpicConnector.h
new file mode 100644
index 0000000..ce2ead3
--- /dev/null
+++ b/epic/epicoperator/EpicConnector.h
@@ -0,0 +1,32 @@
+#pragma once
+
+#include <vendor/samsung_slsi/hardware/epic/1.0/IEpicRequest.h>
+using ::vendor::samsung_slsi::hardware::epic::V1_0::IEpicRequest;
+using ::vendor::samsung_slsi::hardware::epic::V1_0::IEpicHandle;
+using ::android::sp;
+
+#include <string>
+
+namespace epic {
+	class EpicConnector {
+	public:
+		EpicConnector();
+		~EpicConnector();
+
+		void alloc_request(int scenario_id);
+		void alloc_request(int *scenario_id_list, int len);
+		void free_request();
+		bool acquire();
+		bool acquire(unsigned int value, unsigned int usec);
+		bool acquire(unsigned int *value, unsigned int *usec, int len);
+		bool acquire_conditional(std::string &condition_name);
+		bool release();
+		bool release_conditional(std::string &condition_name);
+
+	private:
+		void getService();
+
+		sp<IEpicRequest> mRequest;
+		sp<IEpicHandle> mHandle;
+	};
+}
diff --git a/epic/epicoperator/EpicEnum.h b/epic/epicoperator/EpicEnum.h
new file mode 100644
index 0000000..d18bcbd
--- /dev/null
+++ b/epic/epicoperator/EpicEnum.h
@@ -0,0 +1,16 @@
+#pragma once
+
+enum eOperator {
+	eCommon,
+        eVideoEncoding,
+        eVideoDecoding,
+};
+
+enum eCommand {
+	eNone,
+	eAcquire,
+	eRelease,
+	eAcquireOption,
+	eAcquireConditional,
+	eReleaseConditional,
+};
diff --git a/epic/epicoperator/EpicExportAPI.cpp b/epic/epicoperator/EpicExportAPI.cpp
new file mode 100644
index 0000000..a0fbaff
--- /dev/null
+++ b/epic/epicoperator/EpicExportAPI.cpp
@@ -0,0 +1,79 @@
+#include <memory>
+#include <cstring>
+
+#include <unistd.h>
+
+#include <OperatorFactory.h>
+
+using namespace epic;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+long epic_alloc_request_internal(int id)
+{
+	return reinterpret_cast<long>(createScenarioOperator(eCommon, id));
+}
+
+void epic_free_request_internal(long handle)
+{
+	IEpicOperator *handle_operator = reinterpret_cast<IEpicOperator *>(handle);
+
+	if (handle_operator == nullptr)
+		return;
+
+	delete handle_operator;
+}
+
+bool epic_acquire_internal(long handle)
+{
+	IEpicOperator *handle_operator = reinterpret_cast<IEpicOperator *>(handle);
+
+	if (handle_operator == nullptr)
+		return false;
+
+	return handle_operator->doAction(eAcquire, nullptr);
+}
+
+bool epic_acquire_option_internal(long handle, unsigned int value, unsigned int usec)
+{
+	IEpicOperator *handle_operator = reinterpret_cast<IEpicOperator *>(handle);
+
+	if (handle_operator == nullptr)
+		return false;
+
+	int32_t arg_array[2] = { static_cast<int32_t>(value), static_cast<int32_t>(usec) };
+	return handle_operator->doAction(eAcquireOption, arg_array);
+}
+
+bool epic_acquire_option_multi_internal(long handle, unsigned int *value, unsigned int *usec, int len)
+{
+	IEpicOperator *handle_operator = reinterpret_cast<IEpicOperator *>(handle);
+
+	if (handle_operator == nullptr ||
+		len == 0)
+		return false;
+
+	std::unique_ptr<int32_t[]> arg_ptr = std::make_unique<int32_t[]>(2 * len + 1);
+
+	arg_ptr[0] = len;
+	memcpy(arg_ptr.get() + 1, value, len * sizeof(int32_t));
+	memcpy(arg_ptr.get() + len + 1, usec, len * sizeof(int32_t));
+
+	return handle_operator->doAction(eAcquireOption, arg_ptr.get());
+}
+
+bool epic_release_internal(long handle)
+{
+	IEpicOperator *handle_operator = reinterpret_cast<IEpicOperator *>(handle);
+
+	if (handle_operator == nullptr)
+		return false;
+
+	return handle_operator->doAction(eRelease, nullptr);
+}
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/epic/epicoperator/EpicVideoDecodingOperator.cpp b/epic/epicoperator/EpicVideoDecodingOperator.cpp
new file mode 100644
index 0000000..3ae0c85
--- /dev/null
+++ b/epic/epicoperator/EpicVideoDecodingOperator.cpp
@@ -0,0 +1,29 @@
+#include "EpicVideoDecodingOperator.h"
+
+#include "EpicEnum.h"
+
+namespace epic {
+	EpicVideoDecodingOperator::EpicVideoDecodingOperator() :
+		EpicBaseOperator(30000),
+		mConditionName("video_decoder")
+	{
+	}
+
+	EpicVideoDecodingOperator::~EpicVideoDecodingOperator()
+	{
+	}
+
+	bool EpicVideoDecodingOperator::doAction(int __unused cmd, void __unused *arg)
+	{
+		switch (cmd) {
+		case eAcquire:
+			return mConnector->acquire_conditional(mConditionName);
+		case eRelease:
+			return mConnector->release_conditional(mConditionName);
+		default:
+			return false;
+		}
+
+		return false;
+	}
+}
diff --git a/epic/epicoperator/EpicVideoDecodingOperator.h b/epic/epicoperator/EpicVideoDecodingOperator.h
new file mode 100644
index 0000000..0886e24
--- /dev/null
+++ b/epic/epicoperator/EpicVideoDecodingOperator.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include "IEpicOperator.h"
+#include "EpicBaseOperator.h"
+
+namespace epic {
+	class EpicVideoDecodingOperator : public EpicBaseOperator {
+	public:
+		EpicVideoDecodingOperator();
+		virtual ~EpicVideoDecodingOperator() override;
+
+		virtual bool doAction(int cmd, void *arg) override;
+
+	private:
+		std::string mConditionName;
+	};
+}
diff --git a/epic/epicoperator/EpicVideoEncodingOperator.cpp b/epic/epicoperator/EpicVideoEncodingOperator.cpp
new file mode 100644
index 0000000..caf1f87
--- /dev/null
+++ b/epic/epicoperator/EpicVideoEncodingOperator.cpp
@@ -0,0 +1,23 @@
+#include "EpicVideoEncodingOperator.h"
+
+#include "EpicEnum.h"
+
+namespace epic {
+	EpicVideoEncodingOperator::EpicVideoEncodingOperator() :
+		EpicBaseOperator(3),
+		mConditionName("video_encoder")
+	{
+	}
+
+	EpicVideoEncodingOperator::~EpicVideoEncodingOperator()
+	{
+	}
+
+	bool EpicVideoEncodingOperator::doAction(int __unused cmd, void __unused *arg)
+	{
+		if (cmd == eAcquire)
+			return mConnector->acquire_conditional(mConditionName);
+
+		return false;
+	}
+}
diff --git a/epic/epicoperator/EpicVideoEncodingOperator.h b/epic/epicoperator/EpicVideoEncodingOperator.h
new file mode 100644
index 0000000..85ef076
--- /dev/null
+++ b/epic/epicoperator/EpicVideoEncodingOperator.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include "IEpicOperator.h"
+#include "EpicBaseOperator.h"
+
+namespace epic {
+	class EpicVideoEncodingOperator : public EpicBaseOperator {
+	public:
+		EpicVideoEncodingOperator();
+		virtual ~EpicVideoEncodingOperator() override;
+
+		virtual bool doAction(int cmd, void *arg) override;
+
+	private:
+		std::string mConditionName;
+	};
+}
diff --git a/epic/epicoperator/IEpicOperator.h b/epic/epicoperator/IEpicOperator.h
new file mode 100644
index 0000000..e0f168c
--- /dev/null
+++ b/epic/epicoperator/IEpicOperator.h
@@ -0,0 +1,11 @@
+#pragma once
+
+namespace epic {
+	class IEpicOperator {
+	public:
+		IEpicOperator() = default;
+		virtual ~IEpicOperator() {};
+
+		virtual bool doAction(int cmd, void *arg) = 0;
+	};
+}
diff --git a/epic/epicoperator/OperatorFactory.cpp b/epic/epicoperator/OperatorFactory.cpp
new file mode 100644
index 0000000..a97b285
--- /dev/null
+++ b/epic/epicoperator/OperatorFactory.cpp
@@ -0,0 +1,56 @@
+#include "IEpicOperator.h"
+
+#include "EpicEnum.h"
+#include "EpicCommonOperator.h"
+#include "EpicCommonMultiOperator.h"
+#include "EpicVideoEncodingOperator.h"
+#include "EpicVideoDecodingOperator.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void * createOperator(int operator_id)
+{
+	switch (operator_id) {
+	case eVideoEncoding:
+		return new epic::EpicVideoEncodingOperator();
+	case eVideoDecoding:
+		return new epic::EpicVideoDecodingOperator();
+	default:
+		return nullptr;
+	}
+
+	return nullptr;
+}
+
+void * createScenarioOperator(int operator_id, int scenario_id)
+{
+	switch (operator_id) {
+	case eCommon:
+		return new epic::EpicCommonOperator(scenario_id);
+	default:
+		return nullptr;
+	}
+
+	return nullptr;
+}
+
+void * createScenarioMultiOperator(int operator_id, int *scenario_id_list, int len)
+{
+	if (len == 1)
+		return createScenarioOperator(operator_id, *scenario_id_list);
+
+	switch (operator_id) {
+	case eCommon:
+		return new epic::EpicCommonMultiOperator(scenario_id_list, len);
+	default:
+		return nullptr;
+	}
+
+	return nullptr;
+}
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/epic/epicoperator/OperatorFactory.h b/epic/epicoperator/OperatorFactory.h
new file mode 100644
index 0000000..83189b5
--- /dev/null
+++ b/epic/epicoperator/OperatorFactory.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#include "EpicEnum.h"
+#include "IEpicOperator.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void * createOperator(int operator_id);
+void * createScenarioOperator(int operator_id, int scenario_id);
+void * createScenarioMultiOperator(int operator_id, int scenario_id_list[], int len);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/epic/update-makefiles.sh b/epic/update-makefiles.sh
new file mode 100755
index 0000000..9fb2c04
--- /dev/null
+++ b/epic/update-makefiles.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+options="-r vendor.samsung_slsi.hardware:vendor/samsung_slsi/hardware \
+         -r android.hidl:system/libhidl/transport \
+         -r android.hardware:hardware/interfaces"
+
+outputs="vendor/samsung_slsi/hardware/epic/1.0/default"
+
+# Generate Android.bp for .hal files
+#hidl-gen -Landroidbp $options vendor.samsung_slsi.hardware.epic@1.0;
+
+# Generate Header files for .hal files
+#hidl-gen -L c++-headers -o $outputs $options vendor.samsung_slsi.hardware.epic@1.0;
+
+# Generate CPP files for .hal files
+#hidl-gen -L c++-impl -o $outputs $options vendor.samsung_slsi.hardware.epic@1.0;
+
+# Generate Android.bp for Default IMPL
+#hidl-gen -L androidbp-impl -o $outputs $options vendor.samsung_slsi.hardware.epic@1.0;
+
+hidl-gen -Lhash $options vendor.samsung_slsi.hardware.epic@1.0
diff --git a/libGeoTrans/1.0/Android.mk b/libGeoTrans/1.0/Android.mk
new file mode 100644
index 0000000..5ab0553
--- /dev/null
+++ b/libGeoTrans/1.0/Android.mk
@@ -0,0 +1,15 @@
+LOCAL_PATH := $(call my-dir)
+
+$(warning #############################################)
+$(warning ########       GeoTrans10       #############)
+$(warning #############################################)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libGeoTrans10
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_SRC_FILES_64 := lib64/libGeoTrans10.so
+LOCAL_SRC_FILES_32 := lib/libGeoTrans10.so
+LOCAL_MULTILIB := both
+LOCAL_SHARED_LIBRARIES := android.hidl.memory@1.0 libc++ libc libcutils libdl libhidlbase libhidlmemory libhidltransport libion liblog libm libutils vendor.samsung_slsi.hardware.geoTransService@1.0
+include $(BUILD_PREBUILT)
diff --git a/libGeoTrans/1.0/geotrans.mk b/libGeoTrans/1.0/geotrans.mk
new file mode 100644
index 0000000..836b02b
--- /dev/null
+++ b/libGeoTrans/1.0/geotrans.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2013 The Android Open Source Project
+#
+# 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.
+#
+
+# OFI
+PRODUCT_PACKAGES += \
+	libGeoTrans10
diff --git a/libGeoTrans/1.0/include/geo_trans_interface.h b/libGeoTrans/1.0/include/geo_trans_interface.h
new file mode 100755
index 0000000..6cd491c
--- /dev/null
+++ b/libGeoTrans/1.0/include/geo_trans_interface.h
@@ -0,0 +1,151 @@
+#ifndef GEO_TRANS_INTERFACE_H
+#define GEO_TRANS_INTERFACE_H
+/**
+ * 32 data is allocated for fd of native handle
+ * The maximum possible value of native_handle_create is 1024
+ */
+#define MAX_HANDLE_FD   (32)
+
+/**
+ * @file geo_trans_interface.hpp
+ * @brief geoTrans common API and data structure definition.
+ */
+
+namespace hardware {
+namespace geoTransClient {
+
+/**
+ * @brief struct describes ROI information.
+ */
+struct Rect {
+    int32_t l;
+    int32_t t;
+    int32_t r;
+    int32_t b;
+};
+
+/**
+ * @brief struct holds buffer information.
+ */
+struct BufferData {
+    BufferData() : y(NULL), uv(NULL), fdY(-1), fdUV(-1), width(0), height(0) {
+        fov.l = 0;
+        fov.t = 0;
+        fov.r = 0;
+        fov.b = 0;
+    }
+    unsigned char* y;
+    unsigned char* uv;
+    int fdY;
+    int fdUV;
+    int32_t width;
+    int32_t height;
+    Rect fov;
+};
+
+/**
+ * @brief struct describes grid information for GDC.
+ */
+typedef struct _GDCGrid {
+    int32_t gridX[33][33];
+    int32_t gridY[33][33];
+} GDCGrid;
+
+/**
+ * @brief pixel format.
+ */
+enum {
+    PIXEL_FORMAT_Y_GRAY = 0x0,      // Y only with 8b samples
+    PIXEL_FORMAT_YUV_420_SP = 0x1  // YUV 4:2:0 planar, with 8b Y samples, followed by interleaved V/U plane with 8b 2x2 subsampled chroma samples
+};
+
+/**
+ * @brief target model for GDC.
+ */
+enum {
+    TARGET_GDC_HW = 0x0,
+    TARGET_GDC_C_MODEL = 0x1
+};
+
+  /**
+   * @brief
+   * Initialize geoTrans10 client.
+   * This call attempts to get geoTransService and open Ion client for memory allocation
+   * @return[output] status
+   */
+int init();
+
+  /**
+   * @brief
+   * Deinitialize geoTrans10 client.
+   * This call attempts to close Ion client for memory allocation
+   * @return[output] status
+   */
+int deinit();
+
+  /**
+   * @brief
+   * Run CSC Scaler.
+   * ----------------------------------------------------
+   * CSC Specification
+   * ----------------------------------------------------
+   * Image resolution ragne : Input [16x16] ~ [8192x8192]
+   *                          Output [4x4] ~ [8192x8192]
+   * Input/output format    : 8b YCbCr 420
+   * Scale                  : x1/4 to x8
+   * Alignment              : multiple of 2
+   * ----------------------------------------------------
+   * @param[dst] destination buffer data
+   * @param[src] source buffer data
+   * @param[format] pixel format (0x0 or 0x1)
+   * @return[output] status
+   */
+int runCSC(BufferData& dst, BufferData& src, int format = PIXEL_FORMAT_YUV_420_SP);
+
+  /**
+   * @brief
+   * Run GDC Warper with a GDC grid.
+   * ----------------------------------------------------
+   * GDC Specification
+   * ----------------------------------------------------
+   * Image resolution ragne : [96x64] ~ [8192x6144]
+   * Input/output format    : 8b YCbCr 420
+   * Scale                  : x1 only
+   * Alignment              : multiple of 16
+   * ----------------------------------------------------
+   * @param[dst] destination buffer data
+   * @param[src] source buffer data
+   * @param[grid] 33x33 grid data for (x,y) axis
+   * @param[format] pixel format (0x0 or 0x1)
+   * @param[target] target model (0x0 or 0x1)
+   * @return[output] status
+   */
+int runGDCGrid(BufferData& dst, BufferData& src, GDCGrid& grid, int format = PIXEL_FORMAT_YUV_420_SP, int target = TARGET_GDC_HW);
+
+  /**
+   * @brief
+   * Run GDC Warper with an affine matrix.
+   * It internally call geoTransRunGDCGrid(), so it has the same specification.
+   * @param[dst] destination buffer data
+   * @param[src] source buffer data
+   * @param[affine] 3x2 affine matrix
+   * @param[format] pixel format (0x0 or 0x1)
+   * @param[target] target model (0x0 or 0x1)
+   * @return[output] status
+   */
+int runGDCMatrix(BufferData& dst, BufferData& src, short* affine, int format = PIXEL_FORMAT_YUV_420_SP, int target = TARGET_GDC_HW);
+
+  /**
+   * @brief
+   * Run bicubic SW scaler.
+   * Please note that this call is for a backup processing in case when a HW error occurs
+   * @param[dst] destination buffer data
+   * @param[src] source buffer data
+   * @param[format] pixel format (0x0 or 0x1)
+   * @return[output] status
+   */
+int runInterpBicubic(BufferData& dst, BufferData& src, int format = PIXEL_FORMAT_YUV_420_SP);
+
+} // namespace geoTransClient
+} // namespace hardware
+#endif
diff --git a/libGeoTrans/1.0/lib/libGeoTrans10.so b/libGeoTrans/1.0/lib/libGeoTrans10.so
new file mode 100755
index 0000000..629cc92
--- /dev/null
+++ b/libGeoTrans/1.0/lib/libGeoTrans10.so
Binary files differ
diff --git a/libGeoTrans/1.0/lib64/libGeoTrans10.so b/libGeoTrans/1.0/lib64/libGeoTrans10.so
new file mode 100755
index 0000000..f63e069
--- /dev/null
+++ b/libGeoTrans/1.0/lib64/libGeoTrans10.so
Binary files differ
