[Security Discussion] Geofferey:
Thanks dude! You're being a tremendous help. I'll try with that as well. I've compiled stuff before, it's always finding the missing pieces :/

MOAR!:

ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk APP_PLATFORM=android-21
[arm64-v8a] Compile : cow-exec <= cow-exec.c
[arm64-v8a] Executable : cow-exec
[arm64-v8a] Install : cow-exec => libs/arm64-v8a/cow-exec
[arm64-v8a] Compile : cow-run-as <= run-as.c
[arm64-v8a] Executable : cow-run-as
[arm64-v8a] Install : cow-run-as => libs/arm64-v8a/cow-run-as
[arm64-v8a] Compile : dirtycow <= dirtycow.c
./dirtycow.c:50:36: warning: format specifies type 'int' but the argument has
type 'size_t' (aka 'unsigned long') [-Wformat]
LOGV("[*] madvise = %p %d", addr, size);
~~ ^~~~
%zu
./dirtycow.c:17:70: note: expanded from macro 'LOGV'
...{ __android_log_print(ANDROID_LOG_INFO, "exploit", __VA_ARGS__); printf(...
^~~~~~~~~~~
./dirtycow.c:50:36: warning: format specifies type 'int' but the argument has
type 'size_t' (aka 'unsigned long') [-Wformat]
LOGV("[*] madvise = %p %d", addr, size);
~~ ^~~~
%zu
./dirtycow.c:17:91: note: expanded from macro 'LOGV'
..."exploit", __VA_ARGS__); printf(__VA_ARGS__); printf("\n"); fflush(stdou...
^~~~~~~~~~~
./dirtycow.c:136:75: warning: format specifies type 'long long' but the argument
has type 'long' [-Wformat]
...new file size (%lld) and file old size (%lld) differ\n", st2.st_size, st...
~~~~ ^~~~~~~~~~~
%ld
./dirtycow.c:17:70: note: expanded from macro 'LOGV'
...{ __android_log_print(ANDROID_LOG_INFO, "exploit", __VA_ARGS__); printf(...
^~~~~~~~~~~
./dirtycow.c:136:88: warning: format specifies type 'long long' but the argument
has type 'long' [-Wformat]
...(%lld) and file old size (%lld) differ\n", st2.st_size, st.st_size);
~~~~ ^~~~~~~~~~
%ld
./dirtycow.c:17:70: note: expanded from macro 'LOGV'
...{ __android_log_print(ANDROID_LOG_INFO, "exploit", __VA_ARGS__); printf(...
^~~~~~~~~~~
./dirtycow.c:136:75: warning: format specifies type 'long long' but the argument
has type 'long' [-Wformat]
...new file size (%lld) and file old size (%lld) differ\n", st2.st_size, st...
~~~~ ^~~~~~~~~~~
%ld
./dirtycow.c:17:91: note: expanded from macro 'LOGV'
..."exploit", __VA_ARGS__); printf(__VA_ARGS__); printf("\n"); fflush(stdou...
^~~~~~~~~~~
./dirtycow.c:136:88: warning: format specifies type 'long long' but the argument
has type 'long' [-Wformat]
...(%lld) and file old size (%lld) differ\n", st2.st_size, st.st_size);
~~~~ ^~~~~~~~~~
%ld
./dirtycow.c:17:91: note: expanded from macro 'LOGV'
..."exploit", __VA_ARGS__); printf(__VA_ARGS__); printf("\n"); fflush(stdou...
^~~~~~~~~~~
./dirtycow.c:142:21: warning: format specifies type 'int' but the argument has
type 'size_t' (aka 'unsigned long') [-Wformat]
LOGV("size %d\n\n",size);
~~ ^~~~
%zu
./dirtycow.c:17:70: note: expanded from macro 'LOGV'
...{ __android_log_print(ANDROID_LOG_INFO, "exploit", __VA_ARGS__); printf(...
^~~~~~~~~~~
./dirtycow.c:142:21: warning: format specifies type 'int' but the argument has
type 'size_t' (aka 'unsigned long') [-Wformat]
LOGV("size %d\n\n",size);
~~ ^~~~
%zu
./dirtycow.c:17:91: note: expanded from macro 'LOGV'
..."exploit", __VA_ARGS__); printf(__VA_ARGS__); printf("\n"); fflush(stdou...
^~~~~~~~~~~
8 warnings generated.
[arm64-v8a] Executable : dirtycow
[arm64-v8a] Install : dirtycow => libs/arm64-v8a/dirtycow
[arm64-v8a] Compile : recowvery-applypatch <= recowvery-applypatch.c
[arm64-v8a] Executable : recowvery-applypatch
./obj/local/arm64-v8a/objs/recowvery-applypatch/recowvery-applypatch.o: In function `main':
/Users/geofferey/android_external_dirtycow-android-6.0/./recowvery-applypatch.c:95: undefined reference to `load_boot_image'
/Users/geofferey/android_external_dirtycow-android-6.0/./recowvery-applypatch.c:107: undefined reference to `bootimg_set_cmdline_arg'
/Users/geofferey/android_external_dirtycow-android-6.0/./recowvery-applypatch.c:108: undefined reference to `bootimg_set_cmdline_arg'
/Users/geofferey/android_external_dirtycow-android-6.0/./recowvery-applypatch.c:113: undefined reference to `write_boot_image'
/Users/geofferey/android_external_dirtycow-android-6.0/./recowvery-applypatch.c:132: undefined reference to `free_boot_image'
/Users/geofferey/android_external_dirtycow-android-6.0/./recowvery-applypatch.c:120: undefined reference to `free_boot_image'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [obj/local/arm64-v8a/recowvery-applypatch] Error 1
make: *** [build] Error 2
geoffereysair3:android_external_dirtycow-android-6.0 geofferey$

I'll play tomorrow. I've been up all night 6 am