Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in / Register
Toggle navigation
E
etwrp
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
e
tools
etwrp
Commits
95e80075
Commit
95e80075
authored
Aug 24, 2017
by
Ethan Yonker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DO NOT MERGE Android 8.0 stuff
Change-Id: I8c8a9734adbf36c33463123844fa6e078934ae34
parent
c0c5c3a1
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
64 additions
and
11 deletions
+64
-11
Android.mk
crypto/ext4crypt/Android.mk
+1
-1
Android.mk
gpt/Android.mk
+2
-0
fileutils.c
libblkid/lib/fileutils.c
+5
-0
Android.mk
libpixelflinger/Android.mk
+2
-0
Android.mk
mtp/Android.mk
+3
-0
MtpDataPacket.cpp
mtp/MtpDataPacket.cpp
+4
-0
MtpDevice.cpp
mtp/MtpDevice.cpp
+18
-0
Android.mk
toolbox/Android.mk
+7
-7
Android.mk
toybox/Android.mk
+22
-3
No files found.
crypto/ext4crypt/Android.mk
View file @
95e80075
...
@@ -8,7 +8,7 @@ LOCAL_CFLAGS :=
...
@@ -8,7 +8,7 @@ LOCAL_CFLAGS :=
LOCAL_SRC_FILES := Decrypt.cpp Ext4Crypt.cpp Keymaster.cpp KeyStorage.cpp ScryptParameters.cpp Utils.cpp HashPassword.cpp ext4_crypt.cpp
LOCAL_SRC_FILES := Decrypt.cpp Ext4Crypt.cpp Keymaster.cpp KeyStorage.cpp ScryptParameters.cpp Utils.cpp HashPassword.cpp ext4_crypt.cpp
LOCAL_SHARED_LIBRARIES := libselinux libc libc++ libext4_utils libsoftkeymaster libbase libcrypto libcutils libkeymaster_messages libhardware libprotobuf-cpp-lite
LOCAL_SHARED_LIBRARIES := libselinux libc libc++ libext4_utils libsoftkeymaster libbase libcrypto libcutils libkeymaster_messages libhardware libprotobuf-cpp-lite
LOCAL_STATIC_LIBRARIES := libscrypt_static
LOCAL_STATIC_LIBRARIES := libscrypt_static
LOCAL_C_INCLUDES := system/extras/ext4_utils external/scrypt/lib/crypto system/security/keystore hardware/libhardware/include/hardware system/security/softkeymaster/include/keymaster system/keymaster/include
LOCAL_C_INCLUDES := system/extras/ext4_utils
system/extras/ext4_utils/include/ext4_utils
external/scrypt/lib/crypto system/security/keystore hardware/libhardware/include/hardware system/security/softkeymaster/include/keymaster system/keymaster/include
ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),)
ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),)
LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX
LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX
...
...
gpt/Android.mk
View file @
95e80075
...
@@ -3,7 +3,9 @@ LOCAL_PATH := $(call my-dir)
...
@@ -3,7 +3,9 @@ LOCAL_PATH := $(call my-dir)
# Build libgpt_twrp library
# Build libgpt_twrp library
include $(CLEAR_VARS)
include $(CLEAR_VARS)
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 26; echo $$?),0)
LOCAL_CLANG := false
LOCAL_CLANG := false
endif
LOCAL_MODULE := libgpt_twrp
LOCAL_MODULE := libgpt_twrp
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TAGS := optional
...
...
libblkid/lib/fileutils.c
View file @
95e80075
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include <unistd.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/resource.h>
#include <sys/limits.h>
#include "c.h"
#include "c.h"
#include "fileutils.h"
#include "fileutils.h"
...
@@ -18,6 +19,10 @@
...
@@ -18,6 +19,10 @@
#define _PATH_TMP "/tmp/"
#define _PATH_TMP "/tmp/"
#endif
#endif
#ifndef OPEN_MAX
#define OPEN_MAX 256
#endif
/* Create open temporary file in safe way. Please notice that the
/* Create open temporary file in safe way. Please notice that the
* file permissions are -rw------- by default. */
* file permissions are -rw------- by default. */
int
xmkstemp
(
char
**
tmpname
,
char
*
dir
)
int
xmkstemp
(
char
**
tmpname
,
char
*
dir
)
...
...
libpixelflinger/Android.mk
View file @
95e80075
...
@@ -89,7 +89,9 @@ endif
...
@@ -89,7 +89,9 @@ endif
#
#
include $(CLEAR_VARS)
include $(CLEAR_VARS)
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 26; echo $$?),0)
LOCAL_CLANG := false
LOCAL_CLANG := false
endif
LOCAL_MODULE:= libpixelflinger_twrp
LOCAL_MODULE:= libpixelflinger_twrp
LOCAL_SRC_FILES := $(PIXELFLINGER_SRC_FILES)
LOCAL_SRC_FILES := $(PIXELFLINGER_SRC_FILES)
LOCAL_SRC_FILES_arm := $(PIXELFLINGER_SRC_FILES_arm)
LOCAL_SRC_FILES_arm := $(PIXELFLINGER_SRC_FILES_arm)
...
...
mtp/Android.mk
View file @
95e80075
...
@@ -40,6 +40,9 @@ LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libdl libcutils libutil
...
@@ -40,6 +40,9 @@ LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libdl libcutils libutil
ifneq ($(TW_MTP_DEVICE),)
ifneq ($(TW_MTP_DEVICE),)
LOCAL_CFLAGS += -DUSB_MTP_DEVICE=$(TW_MTP_DEVICE)
LOCAL_CFLAGS += -DUSB_MTP_DEVICE=$(TW_MTP_DEVICE)
endif
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25; echo $$?),0)
LOCAL_CFLAGS += -DHAS_USBHOST_TIMEOUT
endif
include $(BUILD_SHARED_LIBRARY)
include $(BUILD_SHARED_LIBRARY)
...
...
mtp/MtpDataPacket.cpp
View file @
95e80075
...
@@ -427,7 +427,11 @@ int MtpDataPacket::readDataAsync(struct usb_request *req) {
...
@@ -427,7 +427,11 @@ int MtpDataPacket::readDataAsync(struct usb_request *req) {
// Wait for result of readDataAsync
// Wait for result of readDataAsync
int
MtpDataPacket
::
readDataWait
(
struct
usb_device
*
device
)
{
int
MtpDataPacket
::
readDataWait
(
struct
usb_device
*
device
)
{
#ifdef HAS_USBHOST_TIMEOUT
struct
usb_request
*
req
=
usb_request_wait
(
device
,
200
);
#else
struct
usb_request
*
req
=
usb_request_wait
(
device
);
struct
usb_request
*
req
=
usb_request_wait
(
device
);
#endif
return
(
req
?
req
->
actual_length
:
-
1
);
return
(
req
?
req
->
actual_length
:
-
1
);
}
}
...
...
mtp/MtpDevice.cpp
View file @
95e80075
...
@@ -50,6 +50,10 @@ static bool isMtpDevice(uint16_t vendor, uint16_t product) {
...
@@ -50,6 +50,10 @@ static bool isMtpDevice(uint16_t vendor, uint16_t product) {
}
}
#endif
#endif
#ifdef HAS_USBHOST_TIMEOUT
static
const
int
USB_CONTROL_TRANSFER_TIMEOUT_MS
=
200
;
#endif
MtpDevice
*
MtpDevice
::
open
(
const
char
*
deviceName
,
int
fd
)
{
MtpDevice
*
MtpDevice
::
open
(
const
char
*
deviceName
,
int
fd
)
{
struct
usb_device
*
device
=
usb_device_new
(
deviceName
,
fd
);
struct
usb_device
*
device
=
usb_device_new
(
deviceName
,
fd
);
if
(
!
device
)
{
if
(
!
device
)
{
...
@@ -70,15 +74,24 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
...
@@ -70,15 +74,24 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
interface
->
bInterfaceSubClass
==
1
&&
// Still Image Capture
interface
->
bInterfaceSubClass
==
1
&&
// Still Image Capture
interface
->
bInterfaceProtocol
==
1
)
// Picture Transfer Protocol (PIMA 15470)
interface
->
bInterfaceProtocol
==
1
)
// Picture Transfer Protocol (PIMA 15470)
{
{
#ifdef HAS_USBHOST_TIMEOUT
char
*
manufacturerName
=
usb_device_get_manufacturer_name
(
device
,
USB_CONTROL_TRANSFER_TIMEOUT_MS
);
char
*
productName
=
usb_device_get_product_name
(
device
,
USB_CONTROL_TRANSFER_TIMEOUT_MS
);
#else
char
*
manufacturerName
=
usb_device_get_manufacturer_name
(
device
);
char
*
manufacturerName
=
usb_device_get_manufacturer_name
(
device
);
char
*
productName
=
usb_device_get_product_name
(
device
);
char
*
productName
=
usb_device_get_product_name
(
device
);
#endif
MTPD
(
"Found camera:
\"
%s
\"
\"
%s
\"\n
"
,
manufacturerName
,
productName
);
MTPD
(
"Found camera:
\"
%s
\"
\"
%s
\"\n
"
,
manufacturerName
,
productName
);
free
(
manufacturerName
);
free
(
manufacturerName
);
free
(
productName
);
free
(
productName
);
}
else
if
(
interface
->
bInterfaceClass
==
0xFF
&&
}
else
if
(
interface
->
bInterfaceClass
==
0xFF
&&
interface
->
bInterfaceSubClass
==
0xFF
&&
interface
->
bInterfaceSubClass
==
0xFF
&&
interface
->
bInterfaceProtocol
==
0
)
{
interface
->
bInterfaceProtocol
==
0
)
{
#ifdef HAS_USBHOST_TIMEOUT
char
*
interfaceName
=
usb_device_get_string
(
device
,
interface
->
iInterface
,
USB_CONTROL_TRANSFER_TIMEOUT_MS
);
#else
char
*
interfaceName
=
usb_device_get_string
(
device
,
interface
->
iInterface
);
char
*
interfaceName
=
usb_device_get_string
(
device
,
interface
->
iInterface
);
#endif
if
(
!
interfaceName
)
{
if
(
!
interfaceName
)
{
continue
;
continue
;
}
else
if
(
strcmp
(
interfaceName
,
"MTP"
))
{
}
else
if
(
strcmp
(
interfaceName
,
"MTP"
))
{
...
@@ -88,8 +101,13 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
...
@@ -88,8 +101,13 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
free
(
interfaceName
);
free
(
interfaceName
);
// Looks like an android style MTP device
// Looks like an android style MTP device
#ifdef HAS_USBHOST_TIMEOUT
char
*
manufacturerName
=
usb_device_get_manufacturer_name
(
device
,
USB_CONTROL_TRANSFER_TIMEOUT_MS
);
char
*
productName
=
usb_device_get_product_name
(
device
,
USB_CONTROL_TRANSFER_TIMEOUT_MS
);
#else
char
*
manufacturerName
=
usb_device_get_manufacturer_name
(
device
);
char
*
manufacturerName
=
usb_device_get_manufacturer_name
(
device
);
char
*
productName
=
usb_device_get_product_name
(
device
);
char
*
productName
=
usb_device_get_product_name
(
device
);
#endif
MTPI
(
"Found MTP device:
\"
%s
\"
\"
%s
\"\n
"
,
manufacturerName
,
productName
);
MTPI
(
"Found MTP device:
\"
%s
\"
\"
%s
\"\n
"
,
manufacturerName
,
productName
);
free
(
manufacturerName
);
free
(
manufacturerName
);
free
(
productName
);
free
(
productName
);
...
...
toolbox/Android.mk
View file @
95e80075
...
@@ -47,14 +47,14 @@ ifeq ($(TW_USE_TOOLBOX), true)
...
@@ -47,14 +47,14 @@ ifeq ($(TW_USE_TOOLBOX), true)
$(if $(filter $(PLATFORM_SDK_VERSION), 23 24), du)
$(if $(filter $(PLATFORM_SDK_VERSION), 23 24), du)
OUR_TOOLS := \
OUR_TOOLS := \
iftop
\
$(if $(shell test $(PLATFORM_SDK_VERSION) -lt 26; iftop),)
\
ioctl
\
$(if $(shell test $(PLATFORM_SDK_VERSION) -lt 26; ioctl),)
\
nandread
\
$(if $(shell test $(PLATFORM_SDK_VERSION) -lt 26; nandread),)
\
newfs_msdos \
newfs_msdos \
prlimit
\
$(if $(shell test $(PLATFORM_SDK_VERSION) -lt 26; prlimit),)
\
sendevent
\
$(if $(shell test $(PLATFORM_SDK_VERSION) -lt 26; sendevent),)
\
start
\
$(if $(shell test $(PLATFORM_SDK_VERSION) -lt 26; start),)
\
stop
\
$(if $(shell test $(PLATFORM_SDK_VERSION) -lt 26; stop),)
\
ifneq (,$(filter $(PLATFORM_SDK_VERSION), 23))
ifneq (,$(filter $(PLATFORM_SDK_VERSION), 23))
BSD_TOOLS += \
BSD_TOOLS += \
...
...
toybox/Android.mk
View file @
95e80075
...
@@ -69,7 +69,6 @@ LOCAL_SRC_FILES := \
...
@@ -69,7 +69,6 @@ LOCAL_SRC_FILES := \
toys/android/runcon.c \
toys/android/runcon.c \
toys/android/setenforce.c \
toys/android/setenforce.c \
toys/android/setprop.c \
toys/android/setprop.c \
toys/lsb/dmesg.c \
toys/lsb/hostname.c \
toys/lsb/hostname.c \
toys/lsb/killall.c \
toys/lsb/killall.c \
toys/lsb/md5sum.c \
toys/lsb/md5sum.c \
...
@@ -213,7 +212,6 @@ LOCAL_SRC_FILES += \
...
@@ -213,7 +212,6 @@ LOCAL_SRC_FILES += \
toys/other/xxd.c \
toys/other/xxd.c \
toys/pending/arp.c \
toys/pending/arp.c \
toys/pending/diff.c \
toys/pending/diff.c \
toys/pending/ftpget.c \
toys/pending/lsof.c \
toys/pending/lsof.c \
toys/pending/telnet.c \
toys/pending/telnet.c \
toys/pending/test.c \
toys/pending/test.c \
...
@@ -222,6 +220,17 @@ LOCAL_SRC_FILES += \
...
@@ -222,6 +220,17 @@ LOCAL_SRC_FILES += \
toys/posix/ps.c \
toys/posix/ps.c \
toys/posix/ulimit.c
toys/posix/ulimit.c
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25; echo $$?),0)
# Android 8.0 had some tools in different paths
LOCAL_SRC_FILES += \
toys/pending/dmesg.c \
toys/net/ftpget.c
else
LOCAL_SRC_FILES += \
toys/lsb/dmesg.c \
toys/pending/ftpget.c
endif
# Account for master branch changes pulld into CM14.1
# Account for master branch changes pulld into CM14.1
ifneq ($(CM_BUILD),)
ifneq ($(CM_BUILD),)
LOCAL_SRC_FILES += \
LOCAL_SRC_FILES += \
...
@@ -241,13 +250,23 @@ LOCAL_SRC_FILES += \
...
@@ -241,13 +250,23 @@ LOCAL_SRC_FILES += \
toys/pending/resize.c \
toys/pending/resize.c \
toys/posix/file.c
toys/posix/file.c
else
else
LOCAL_SRC_FILES += \
toys/other/switch_root.c
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25; echo $$?),0)
# Android 8.0 had some tools in different paths
LOCAL_SRC_FILES += \
toys/net/ifconfig.c \
toys/net/netcat.c \
toys/net/netstat.c \
toys/net/rfkill.c
else
LOCAL_SRC_FILES += \
LOCAL_SRC_FILES += \
toys/other/ifconfig.c \
toys/other/ifconfig.c \
toys/other/netcat.c \
toys/other/netcat.c \
toys/other/rfkill.c \
toys/other/rfkill.c \
toys/other/switch_root.c \
toys/pending/netstat.c
toys/pending/netstat.c
endif
endif
endif
else
else
LOCAL_SRC_FILES += \
LOCAL_SRC_FILES += \
toys/other/ifconfig.c \
toys/other/ifconfig.c \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment