Building from source is quite easy, but will require a little bit of extra work to get going.
This guide will assume you have Eclipse installed already, along with the Android-SDK.
It will also assume you are running Linux, because I do not know how to install the Android-NDK on Windows (I use Linux exclusively). There are some useful guides on this on the internet though.
- Clone this repo to somewhere on your computer. I use ~/git
cd ~/git && git clone https://github.com/Kryten2k35/OTAUpdates- Open up Eclipse and import "Existing Android code into workspace" and follow the instructions during the wizard. Things will not compile properly at the moment, because we're not finished
You also need to import the cardview library from Google's support code. Make sure your Android SDK is up to date and import form the following location:
$SDK_ROOT/extras/android/support/v7/cardviewNow right click on the OTAUpdates project in Eclipse and choose properties and add cardview as library (or edit the missing library that most likely exists)
This is where things get interesting:-
-
Head over to the Android NDK page and download the latest version for your OS. Again, this is assuming you're running Linux.
-
Once it's downloaded, open up a terminal and find the file on your computer. Once you have, type
./nandroid-ndk-$VERSION-linux-$ARCH.binReplacing $VERSION and $ARCH with your NDK version and OS Architecture.
This will extract to a location on your computer. When this has finished, type this into a terminal
nano ~/.bashrcTo edit your .bashrc file and add these values to the bottom
export ANDROID_NDK_HOME=/home/kryten2k35/Android-NDK/Linux
export PATH=$PATH:$ANDROID_NDK_HOMEChange the ANDROID_NDK_HOME= path to your installation of the NDK
That's the NDK set up!
Now we need some C++ libraries in order to compile Bypass.
-
Head over to the Boost website and download the latest version to your computer
-
Extract them to your computer. I used
~/boost/boostIt's actually important to put them in folders like that. Maybe you cna use
~/cpp_libraries/boostBut most definitely put the path like that. Make sure the boost folder is inside another. If i doubt, use my first suggestion
Now you can clone the bypass library to your computer. Again, I used ~/git
cd ~/git && git clone https://github.com/Kryten2k35/bypassNow, head into the Bypass directory:
bypass/platform/android/library/jni- Open up the Android.mk file in your favourite editor and look for this text:
/home/kryten2k35/boostIt should be on this line
LOCAL_C_INCLUDES:= ../../../dep/libsoldout ../../../src /opt/local/include /usr/local/include /home/kryten2k35/boost $(BYPASS_INCLUDE_PATH)-
Edit that text to point to YOUR boost directory that we setup earlier
-
Save and exit
Now we can compile Bypass
Open a terminal at this directory:-
bypass/platform/android/libraryType:
ndk-buildHopefully, if you've done everything right, there will be no errors!
Now you can go ahead and import Bypass into eclipse
You want to import the library folder form above:
bypass/platform/android/libraryInto your workspace.
Then, add Bypass as a library to the OTAUpdates project, like we did previously with the cardview library!
Now, try building and installing the apk on your device. It should now work.
Bare in mind, that having manually compiled the apk when placing in your ROM, you should extract the libraries in the lib/ folder of the apk and place them in:
- 4.4.4 or earlier = /system/lib
- 5.0 or later = /system/app/OTAUpdates/lib/arm
Put the apk in:
- 4.4.4 or earlier = /system/app
- 5.0 or later = /system/app/OTAUpdates/ (and call it base.apk)