Open droidvoider opened 7 years ago
gcc -o dirtyc0w dirtyc0w.c -lpthread
You have to use a cross compiler inorder to compile for Android. When you compile it using gcc it will give you an amd64 binary not arm64. Both architectures are mutually exclusive and something built for arm64 won't work on the other and vice-versa. So you have to use a toolchain.
https://developer.android.com/ndk/guides/standalone_toolchain.html
Edit: Fairly certain this isn't for Android and won't compile as such.. gcc -pthread dirtyc0w.c -o dirtyc0w gcc -pthread -pie dirtyc0w.c -o dirtyc0w gcc -pthread -fpie dirtyc0w.c -o dirtyc0w gcc -pthread -pie -fpie dirtyc0w.c -o dirtyc0w (not executable: 64-bit ELF file)
Unless you know I'm wrong I believe this is designed for a different OS.