shims: add missing symbols

This commit is contained in:
Joel Bacchus
2021-01-17 01:35:05 +00:00
parent 47bedcc2a3
commit 4fe0995a91
7 changed files with 193 additions and 0 deletions
+54
View File
@@ -0,0 +1,54 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := shim_binder.cpp
LOCAL_SHARED_LIBRARIES := libbinder
LOCAL_MODULE := libshim_libbinder
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := shim_camera.cpp
LOCAL_SHARED_LIBRARIES := libui liblog libcutils libgui libbinder libutils
LOCAL_MODULE := libshim_libcamera
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := shim_liblog.c
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_MODULE := libshim_liblog
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := shim_skia.cpp
LOCAL_SHARED_LIBRARIES := libskia
LOCAL_MODULE := libshim_skia
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := shim_gui.cpp
LOCAL_SHARED_LIBRARIES := libgui
LOCAL_MODULE := libshim_gui
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_C_INCLUDES += frameworks/av
LOCAL_SRC_FILES := shim_libwvm.cpp
LOCAL_SHARED_LIBRARIES := libstagefright_foundation liblog libmedia
LOCAL_MODULE := libshim_libwvm
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_32_BIT_ONLY := true
include $(BUILD_SHARED_LIBRARY)
+13
View File
@@ -0,0 +1,13 @@
extern "C" int _ZN7android6Parcel13writeString16EPKDsj();
extern "C" int _ZN7android6Parcel13writeString16EPKtj() {
return _ZN7android6Parcel13writeString16EPKDsj();
}
extern "C" int _ZNK7android6Parcel18readParcelFileDescriptorEv(); // TBD can't find this symbol on libbinder?????
extern "C" int _ZNK7android6Parcel24readParcelFileDescriptorERi(int& outCommChannel) {
return 0; //_ZNK7android6Parcel18readParcelFileDescriptorEv();
}
extern "C" int _ZN7android10IInterface8asBinderEv() {
return 0;
}
+51
View File
@@ -0,0 +1,51 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <pthread.h>
#include <utils/Log.h>
#include <hardware/power.h>
#include <hardware/hardware.h>
#include <ui/GraphicBuffer.h>
#include <string>
using namespace android;
extern "C" void _ZN7android13GraphicBufferC1EjjijNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE(
uint32_t inWidth, uint32_t inHeight, int inFormat, uint32_t inUsage,
std::string requestorName);
extern "C" void _ZN7android13GraphicBufferC1Ejjij(
uint32_t inWidth, uint32_t inHeight, int inFormat, uint32_t inUsage) {
std::string requestorName = "<Unknown>";
_ZN7android13GraphicBufferC1EjjijNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE(
inWidth, inHeight, inFormat, inUsage, requestorName);
}
extern "C" void* _ZN7android19GraphicBufferMapper4lockEPK13native_handlejRKNS_4RectEPPv(
buffer_handle_t handle, uint32_t usage, const Rect& bounds, void** vaddr);
extern "C" void* _ZN7android19GraphicBufferMapper4lockEPK13native_handleiRKNS_4RectEPPv(
buffer_handle_t handle, int32_t usage, const Rect& bounds, void** vaddr) {
return _ZN7android19GraphicBufferMapper4lockEPK13native_handlejRKNS_4RectEPPv(
handle, static_cast<uint32_t>(usage), bounds, vaddr);
}
extern "C" void _ZN7android7String8C1EPKc(void **str8P, const char *str);
extern "C" void _ZN7android13SensorManagerC1Ev(void *sensorMgr)
{
}
extern "C" void _ZN7android13SensorManager16createEventQueueEv(void **retVal, void *sensorMgr)
{
}
extern "C" pthread_mutex_t _ZN7android9SingletonINS_13SensorManagerEE5sLockE = PTHREAD_MUTEX_INITIALIZER;
extern "C" void* _ZN7android9SingletonINS_13SensorManagerEE9sInstanceE = NULL;
+10
View File
@@ -0,0 +1,10 @@
#include <stdint.h>
extern "C"
{
/* android::SurfaceControl:setLayer*/
void _ZN7android14SurfaceControl8setLayerEj(uint32_t) {}
void _ZN7android14SurfaceControl8setLayerEi(int32_t layer) {
_ZN7android14SurfaceControl8setLayerEj(static_cast<uint32_t>(layer));
}
}
+49
View File
@@ -0,0 +1,49 @@
#include <string.h>
#include <log/log.h>
#define LOG_BUF_SIZE 1024
int lab126_log_write(int bufID, int prio, const char *tag, const char *fmt, ...)
{
va_list ap;
char buf[LOG_BUF_SIZE];
int _a = bufID;
int _b = prio;
// skip flooding logs
if (!tag)
{
tag = "";
}
if( strncmp(tag, "Sensors", 7) == 0
|| strncmp(tag, "qcom_se", 7) == 0 )
{
return 0;
}
// skip flooding logs
va_start(ap, fmt);
vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
va_end(ap);
char new_tag[128];
snprintf(new_tag, sizeof(new_tag), "AMZ-%s", tag);
return __android_log_buf_write(LOG_ID_MAIN, ANDROID_LOG_DEBUG, new_tag, buf);
}
int __vitals_log_print(int bufID, int prio, const char *tag, const char *fmt, ...)
{
va_list ap;
char buf[LOG_BUF_SIZE];
int _a = bufID;
int _b = prio;
va_start(ap, fmt);
va_end(ap);
return __android_log_write(ANDROID_LOG_DEBUG, tag, "__vitals_log_print not implemented");
}
+7
View File
@@ -0,0 +1,7 @@
extern "C" {
void _ZN7android16MediaBufferGroupC1Ev() { }
void _ZNK7android11MediaSource11ReadOptions14getNonBlockingEv() { }
void _ZNK7android11MediaSource11ReadOptions9getSeekToEPxPNS1_8SeekModeE() { }
void _ZN7android16MediaBufferGroup14acquire_bufferEPPNS_11MediaBufferE() { }
void _ZN7android16MediaBufferGroup14acquire_bufferEPPNS_11MediaBufferEb() { }
}
+9
View File
@@ -0,0 +1,9 @@
#include <SkBitmap.h>
extern "C"
{
extern bool _ZN8SkBitmap14tryAllocPixelsEPNS_9AllocatorEP12SkColorTable(SkBitmap::Allocator* allocator, SkColorTable* ctable);
bool _ZN8SkBitmap11allocPixelsEPNS_9AllocatorEP12SkColorTable(SkBitmap::Allocator* allocator, SkColorTable* ctable) {
return _ZN8SkBitmap14tryAllocPixelsEPNS_9AllocatorEP12SkColorTable(allocator, ctable);
}
}