Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
obj/
.DS_Store
libs/*/
2 changes: 1 addition & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:versionCode="22"
android:versionName="1.4.0"
>
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="10" />
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="10" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:label="JavaIDEdroid" android:icon="@drawable/icon">
<activity android:name="MainActivity"
Expand Down
26 changes: 15 additions & 11 deletions jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ libcutils_SRC_FILES := \
libcutils/jni/sched_policy.c \
libcutils/jni/iosched_policy.c \
libcutils/jni/str_parms.c \
libcutils/jni/abort_socket.c \
libcutils/jni/selector.c \
libcutils/jni/tztime.c \
libcutils/jni/zygote.c \
libcutils/jni/ashmem-dev.c \
libcutils/jni/mq.c \
libcutils/jni/uevent.c
libcutils/jni/abort_socket.c \
libcutils/jni/selector.c \
libcutils/jni/tztime.c \
libcutils/jni/zygote.c \
libcutils/jni/ashmem-dev.c \
libcutils/jni/mq.c \
libcutils/jni/uevent.c

ifeq ($(TARGET_ARCH),arm)
libcutils_SRC_FILES += libcutils/jni/arch-arm/memset32.S
Expand Down Expand Up @@ -162,7 +162,7 @@ libutils_SRC_FILES := \
libutils/jni/ZipFileRO.cpp \
libutils/jni/ZipUtils.cpp \
libutils/jni/misc.cpp \
libutils/jni/BackupData.cpp \
libutils/jni/BackupData.cpp \
libutils/jni/BackupHelpers.cpp \
libutils/jni/Looper.cpp

Expand All @@ -175,10 +175,10 @@ libutils_C_INCLUDES += $(LOCAL_PATH)/libutils/jni/include
aapt_SRC_FILES := \
JNImain.c \
aapt/jni/StringPool.cpp \
aapt/jni/ZipFile.cpp \
aapt/jni/ZipEntry.cpp \
aapt/jni/ZipFile.cpp \
aapt/jni/ZipEntry.cpp \
aapt/jni/Images.cpp \
aapt/jni/SourcePos.cpp \
aapt/jni/SourcePos.cpp \
aapt/jni/ResourceTable.cpp \
aapt/jni/Resource.cpp \
aapt/jni/AaptAssets.cpp \
Expand Down Expand Up @@ -215,6 +215,10 @@ LOCAL_CFLAGS += $(libhost_CFLAGS)
LOCAL_CFLAGS += $(libutils_CFLAGS)
LOCAL_CFLAGS += $(aapt_CFLAGS)

#To build binaries with PIE, uncomment folowing two lines and one line in Application.mk
#LOCAL_CFLAGS += -fPIE
#LOCAL_LDFLAGS += -fPIE -pie

LOCAL_LDLIBS += -lz -llog

# Building a commandline executable for Android
Expand Down
5 changes: 4 additions & 1 deletion jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
APP_ABI := x86 armeabi
#For PIE uncomment
#APP_PIE := true
APP_STL := gnustl_static
APP_PLATFORM := android-9
APP_PLATFORM := android-9
6 changes: 6 additions & 0 deletions jni/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
To build complete aapt binaries:
1. Adjust ndk-build-aaptcomplete.sh to call the ndk-build script of the Android NDK
2. Look near the bottom of /jni/Android.mk. Uncomment "include $(BUILD_EXECUTABLE)" and comment out "include $(BUILD_SHARED_LIBRARY)".
3. Determine whether you need the PIE or non-PIE binaries. If you need PIE, there are two lines to uncomment at the bottom of jni/Android.mk, and one in jni/Application.mk.
4. Run ndk-build-aaptcomplete.sh.
5. Binaries can be found in /libs/armeabi/ and /libs/x86
14 changes: 7 additions & 7 deletions jni/libhost/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ LOCAL_SRC_FILES:= \
ifeq ($(HOST_OS),cygwin)
LOCAL_CFLAGS += -DWIN32_EXE
endif
ifeq ($(HOST_OS),windows)
ifeq ($(USE_MINGW),)
# Case where we're building windows but not under linux (so it must be cygwin)
LOCAL_CFLAGS += -DUSE_MINGW
endif
endif
ifeq ($(HOST_OS),darwin)
LOCAL_CFLAGS += -DMACOSX_RSRC
endif
Expand All @@ -23,5 +17,11 @@ endif
LOCAL_MODULE:= libhost
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include

include $(BUILD_SHARED_LIBRARY)
# acp uses libhost, so we can't use
# acp to install libhost.
LOCAL_ACP_UNAVAILABLE:= true

include $(BUILD_HOST_STATIC_LIBRARY)

# Include toolchain prebuilt modules if they exist.
-include $(TARGET_TOOLCHAIN_ROOT)/toolchain.mk
25 changes: 0 additions & 25 deletions jni/libhost/jni/Android.mk.original

This file was deleted.

1 change: 0 additions & 1 deletion jni/libhost/jni/Application.mk

This file was deleted.

13 changes: 7 additions & 6 deletions jni/libhost/jni/CopyFile.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,19 @@ static bool isSourceNewer(const struct stat* pSrcStat, const struct stat* pDstSt

/*
* Returns true if the source file has high resolution modification
* date. Cygwin doesn't support st_mtim in normal build, so always
* return false.
* date. Cygwin/Mingw doesn't support st_mtim and always returns false.
*/
static bool isHiresMtime(const struct stat* pSrcStat)
{
#if defined(WIN32) || defined(USE_MINGW)
return 0;
#elif defined(MACOSX_RSRC)
#if HAVE_STAT_ST_MTIM
#if defined(MACOSX_RSRC)
return pSrcStat->st_mtimespec.tv_nsec > 0;
#else
return pSrcStat->st_mtim.tv_nsec > 0;
#endif
#else
return 0;
#endif
}

/*
Expand Down Expand Up @@ -136,7 +137,7 @@ static int copyFileContents(const char* dst, int dstFd, const char* src, int src
return -1;
}
if (writeCount != readCount) {
fprintf(stderr, "acp: partial write to '%s' (%d of %d)\n",
fprintf(stderr, "acp: partial write to '%s' (%zd of %zd)\n",
dst, writeCount, readCount);
return -1;
}
Expand Down
4 changes: 1 addition & 3 deletions jni/libhost/source.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
http://android.git.kernel.org/

[platform/build.git] / libs / host / Android.mk
https://android.googlesource.com/platform/build/+/jb-mr2-dev/libs/host

5 changes: 5 additions & 0 deletions jni/libpng/README.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This version of libpng has been modified by B. Clint Hall to remove several security vulernabilities from libpng 1.2.44.

git merge was used to pull libpng 1.2.56 into the Android's modified version of libpng 1.2.44.

see diff.txt for exhaustive list of changes.
Loading