Loading mtp/Android.mk +5 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,11 @@ LOCAL_SRC_FILES = \ mtp_MtpDatabase.cpp \ node.cpp LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libstlport libdl libcutils libutils ifneq ($(TW_MTP_DEVICE),) LOCAL_CFLAGS += -DUSB_MTP_DEVICE=$(TW_MTP_DEVICE) endif include $(BUILD_SHARED_LIBRARY) # Build twrpmtp binary / executable Loading mtp/mtp_MtpServer.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -47,11 +47,13 @@ void twmtp_MtpServer::set_storages(storages* mtpstorages) { int twmtp_MtpServer::setup() { #define USB_MTP_DEVICE "/dev/mtp_usb" usePtp = false; MyMtpDatabase* mtpdb = new MyMtpDatabase(); #ifdef USB_MTP_DEVICE int fd = open(USB_MTP_DEVICE, O_RDWR); #define STRINGIFY(x) #x #define EXPAND(x) STRINGIFY(x) MTPI("Using '%s' for MTP device.\n", EXPAND(USB_MTP_DEVICE)); int fd = open(EXPAND(USB_MTP_DEVICE), O_RDWR); #else int fd = open("/dev/mtp_usb", O_RDWR); #endif Loading Loading
mtp/Android.mk +5 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,11 @@ LOCAL_SRC_FILES = \ mtp_MtpDatabase.cpp \ node.cpp LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libstlport libdl libcutils libutils ifneq ($(TW_MTP_DEVICE),) LOCAL_CFLAGS += -DUSB_MTP_DEVICE=$(TW_MTP_DEVICE) endif include $(BUILD_SHARED_LIBRARY) # Build twrpmtp binary / executable Loading
mtp/mtp_MtpServer.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -47,11 +47,13 @@ void twmtp_MtpServer::set_storages(storages* mtpstorages) { int twmtp_MtpServer::setup() { #define USB_MTP_DEVICE "/dev/mtp_usb" usePtp = false; MyMtpDatabase* mtpdb = new MyMtpDatabase(); #ifdef USB_MTP_DEVICE int fd = open(USB_MTP_DEVICE, O_RDWR); #define STRINGIFY(x) #x #define EXPAND(x) STRINGIFY(x) MTPI("Using '%s' for MTP device.\n", EXPAND(USB_MTP_DEVICE)); int fd = open(EXPAND(USB_MTP_DEVICE), O_RDWR); #else int fd = open("/dev/mtp_usb", O_RDWR); #endif Loading