Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*.so
*.pyc
injector/injector
libs
obj
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
SUBDIRS=injector libhook

PROCESS=com.android.chrome
ACTIVITY=com.google.android.apps.chrome.Main

all:
for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d; done
@ndk-build -B

clean:
for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d clean; done
@rm -rf obj libs

test: all
python test.py
21 changes: 0 additions & 21 deletions common.mk

This file was deleted.

14 changes: 0 additions & 14 deletions injector/Makefile

This file was deleted.

3 changes: 3 additions & 0 deletions jni/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
LOCAL_PATH := $(call my-dir)

include $(call all-subdir-makefiles)
6 changes: 6 additions & 0 deletions jni/Application.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
APP_PLATFORM := android-19
APP_ABI := armeabi-v7a
APP_STL := stlport_static
APP_PIE := true

APP_CXXFLAGS := -Wall -Werror -fpermissive -fpic
8 changes: 8 additions & 0 deletions jni/injector/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := injector
LOCAL_SRC_FILES := main.cpp

include $(BUILD_EXECUTABLE)
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions jni/libhook/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := libhook
LOCAL_SRC_FILES := main.cpp hook.cpp report.cpp hooks/io.cpp
LOCAL_LDLIBS := -llog

include $(BUILD_SHARED_LIBRARY)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 0 additions & 14 deletions libhook/Makefile

This file was deleted.

4 changes: 2 additions & 2 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
print "@ Pushing files to /data/local/tmp ..."

adb.sh( "rm -rf /data/local/tmp/injector /data/local/tmp/libhook.so" )
adb.push( "injector/injector", "/data/local/tmp/injector" )
adb.push( "libhook/libhook.so", "/data/local/tmp/libhook.so" )
adb.push( "libs/armeabi-v7a/injector", "/data/local/tmp/injector" )
adb.push( "libs/armeabi-v7a/libhook.so", "/data/local/tmp/libhook.so" )
adb.sh( "chmod 777 /data/local/tmp/injector" )

print "@ Starting %s/%s ..." % ( process, activity )
Expand Down