fuzion24 / androidobfuscation-ndk Goto Github PK
View Code? Open in Web Editor NEWExample of obfuscating an Android NDK project using O-LLVM
Example of obfuscating an Android NDK project using O-LLVM
thanks for the example. I've just tried using v3.6.1 llvm-obfuscator and example code doesn't seem to work. Complaining about -mllvm -sub -mllvm -fla -mllvm -bcf arguments. Any help will be greatly appreciated. Thanks
I have used expanded following .tar file in appropriate place
OSX-NDK-Obfuscator.tar.bz2
Then i executed build.sh, i got the following issue. Please help me to resolve the issue
$ ./build.sh
[armeabi] Compile : obfuscated <= obfuscationTest.c
make: /Users/sureshs/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-clang3.4-obfuscator/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-clang3.4-gcc: No such file or directory
make: *** [obj/local/armeabi/objs/obfuscated/obfuscationTest.o] Error 1
I tried to create an obfuscated binary for x86 platform, but it failed with linker error that it did not understand sysroot
option. See the log below
rm -f /Users/test/scratchpad/AndroidObfuscation-NDK/libs/armeabi/lib_.so /Users/test/scratchpad/AndroidObfuscation-NDK/libs/armeabi-v7a/lib_.so /Users/test/scratchpad/AndroidObfuscation-NDK/libs/armeabi-v7a-hard/lib_.so /Users/test/scratchpad/AndroidObfuscation-NDK/libs/mips/lib_.so /Users/test/scratchpad/AndroidObfuscation-NDK/libs/x86/lib_.so
rm -f /Users/test/scratchpad/AndroidObfuscation-NDK/libs/armeabi/gdbserver /Users/test/scratchpad/AndroidObfuscation-NDK/libs/armeabi-v7a/gdbserver /Users/test/scratchpad/AndroidObfuscation-NDK/libs/armeabi-v7a-hard/gdbserver /Users/test/scratchpad/AndroidObfuscation-NDK/libs/mips/gdbserver /Users/test/scratchpad/AndroidObfuscation-NDK/libs/x86/gdbserver
rm -f /Users/test/scratchpad/AndroidObfuscation-NDK/libs/armeabi/gdb.setup /Users/test/scratchpad/AndroidObfuscation-NDK/libs/armeabi-v7a/gdb.setup /Users/test/scratchpad/AndroidObfuscation-NDK/libs/armeabi-v7a-hard/gdb.setup /Users/test/scratchpad/AndroidObfuscation-NDK/libs/mips/gdb.setup /Users/test/scratchpad/AndroidObfuscation-NDK/libs/x86/gdb.setup
[x86] Compile : obfuscated <= obfuscationTest.c
/Applications/ADT/android-ndk-r10/toolchains/obfuscator-llvm-3.4/prebuilt/darwin-x86_64/bin/clang -MMD -MP -MF /Users/test/scratchpad/AndroidObfuscation-NDK/obj/local/x86/objs/obfuscated/obfuscationTest.o.d -gcc-toolchain /Applications/ADT/android-ndk-r10/toolchains/x86-4.8/prebuilt/darwin-x86_64 -target i686-none-linux-android -ffunction-sections -funwind-tables -fstack-protector -fPIC -no-canonical-prefixes -O2 -g -DNDEBUG -fomit-frame-pointer -fstrict-aliasing -I/Users/test/scratchpad/AndroidObfuscation-NDK/jni -DANDROID -mllvm -sub -mllvm -fla -mllvm -bcf -Wa,--noexecstack -Wformat -Werror=format-security -I/Applications/ADT/android-ndk-r10/platforms/android-9/arch-x86/usr/include -c /Users/test/scratchpad/AndroidObfuscation-NDK/jni/obfuscationTest.c -o /Users/test/scratchpad/AndroidObfuscation-NDK/obj/local/x86/objs/obfuscated/obfuscationTest.o
[x86] Executable : obfuscated
/Applications/ADT/android-ndk-r10/toolchains/obfuscator-llvm-3.4/prebuilt/darwin-x86_64/bin/clang++ -Wl,--gc-sections -Wl,-z,nocopyreloc --sysroot=/Applications/ADT/android-ndk-r10/platforms/android-9/arch-x86 -Wl,-rpath-link=/Applications/ADT/android-ndk-r10/platforms/android-9/arch-x86/usr/lib -Wl,-rpath-link=/Users/test/scratchpad/AndroidObfuscation-NDK/obj/local/x86 /Users/test/scratchpad/AndroidObfuscation-NDK/obj/local/x86/objs/obfuscated/obfuscationTest.o -lgcc -gcc-toolchain /Applications/ADT/android-ndk-r10/toolchains/x86-4.8/prebuilt/darwin-x86_64 -target i686-none-linux-android -no-canonical-prefixes -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -static -lc -lm -o /Users/test/scratchpad/AndroidObfuscation-NDK/obj/local/x86/obfuscated
ld: unknown option: --sysroot=/Applications/ADT/android-ndk-r10/platforms/android-9/arch-x86
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *_\* [/Users/test/scratchpad/AndroidObfuscation-NDK/obj/local/x86/obfuscated] Error 1
There is no issue with ARM and MIPS platforms though.
Any idea on this?
How do I use it/or build it. on windows x64
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.