Skip to content
Snippets Groups Projects
Select Git revision
  • feat/dind
  • develop
  • master default
  • 0.9.4_FDROID
  • 0.9.4
  • 0.9.3
  • 0.9.2
  • 0.9.2RC3
  • 0.9.2RC2
  • 0.9.2RC1
  • 0.9.1
  • 0.9.0
  • 0.8.2
  • 0.8.1
  • 0.8.0
  • 0.7.0
  • 0.6.0
  • 0.5.4
  • 0.5.3
  • 0.5.2
  • 0.5.1
  • 0.5
  • 0.4
23 results

bitmask_android

  • Clone with SSH
  • Clone with HTTPS
  • Forked from leap / bitmask_android
    2275 commits behind the upstream repository.
    user avatar
    Parménides GV authored
    Riseup's EE certificate expired (EE = End-Entity, the commercial
    certificate signed by the issuer), and we weren't able to fetch
    provider.json because the pin wasn't valid.
    
    This problem needs to be avoided in the future, using
    HKPK (https://tools.ietf.org/html/rfc7469), which Micah's implementing
    on Riseup.
    
    Switching from build types from flavors enables us to run tests against
    production apk, not just debug. I didn't detect this pinning problem
    because tests were run only against the debug apk, which trusted
    preseeded providers by default (thus bypassing pinning issue).
    b0a0805a
    History

    Bitmask Android App

    This repository contains the source code for the Bitmask Android app.

    Please see the issues section to report any bugs or feature requests and to see the list of known issues.

    License

    Build Requirements

    Install from developer.android.com:

    Make sure add the necessary android tools to your bin path. For example, assuming you installed the SDK and NDK to ~/dev on a linux machine, you would add this to your path:

    ~/dev/android-sdk-linux/tools
    ~/dev/android-sdk-linux/platform-tools
    ~/dev/android-ndk-r9d

    Installable via android command (SDK Manager):

    • Android SDK Build-tools, 19.0.3
    • Android Support Repository, 4+

    We need Mercurial:

    Finally, install a java compiler. For example:

    sudo apt-get install default-jdk

    Build native sources

    To build NDK sources, you need to issue these commands:

    cd app
    ./build-native.sh
    cd .. (to get back to the project directory)

    Compiling from the command line

    Signed APK

    If you want to release a signed APK, you'll have to create a gradle.properties file in the project root with the following structure:

    storeFileProperty=fullPath
    storePasswordProperty=store password without quotation marks
    keyAliasProperty=key alias without quotation marks
    keyPasswordProperty=key password without quotation marks

    Actual command

    ./gradlew build

    The resulting apk(s) will be in app/build/apk.

    Using Android Studio

    • Import project => select bitmask_android top folder

    Running tests

    To run the automated tests:

    1. Run an emulator (device doesn't necesarily has root, so testVpnCertificateValidator.testIsValid may fail).
    2. Unlock Android
    3. Issue the command ./gradlew connectedCheck
    4. Pay attention and check the "Trust this app" checkbox, if you don't do so tests won't run.

    Due to the nature of some tests, adb will lose its connectivity and you won't receive any tests results. To look for failed tests, do the following:

    1. adb kill-server
    2. adb logcat | less
    3. Look for: "failed: test"

    We'll polish this process soon, but right now that's what we're doing (well, in fact, we run "adb logcat" in Emacs and then search "failed: test" in the corresponding buffer ;) ).

    Acknowledgements

    This project bases its work in ics-openvpn project.

    Contributing

    Please fork this repository and contribute back using pull requests.

    Our preferred method for receiving translations is our Transifex project.

    Any contributions, large or small, major features, bug fixes, additional language translations, unit/integration tests are welcomed and appreciated but will be thoroughly reviewed and discussed.