Giter Site home page Giter Site logo

cjdns-android's Introduction

cjdns for Android

Build Status tip for next commit

Meshnet is an Android app that lets you connect to cjdns networks, without the need for a rooted phone -- thanks to the android.net.VpnService API introduced with Android 4.0 (Ice Cream Sandwich). Older versions still require root.

Current state:

  • app starts cjdroute and stops it properly
  • app crashes on real devices because of a threading issue
  • shows cjdroute's pid on the emulator
  • shows cjdroute's output in adb logcat -- with weird buffer issues though
  • doesn't support ETHInterface and TUNInterface yet

TODO

  • Hello world
  • Build cjdroute
  • Start cjdroute from app
  • Properly kill cjdroute (via Admin API)
  • Extract Admin API config from cjdroute.conf
  • Run as background service
  • Display cjdroute logs
  • Pass VpnService descriptor to cjdroute
  • Display peer stats
  • Allow peering info exchange via qr codes
  • Release on fdroid (finn's repo: http://h.finn.io/fdroid/)
  • Store cjdroute.conf on SD card
  • Store cjdroute.conf somewhere safe
  • Add IPv6 to contacts
  • Use root for Android < 4.0
  • tbc

Installation

  1. Android SDK and NDK
  2. x86 or armeabi toolchain
  • android-ndk/build/tools/make-standalone-toolchain.sh --platform=android-21 --toolchain=x86-4.9 --install-dir=i686-linux-android/ --system=linux-x86_64
  • android-ndk/build/tools/make-standalone-toolchain.sh --platform=android-21 --toolchain=arm-linux-androideabi-4.9 --install-dir=arm-linux-androideabi/ --system=linux-x86_64
  1. build cjdns
  • git clone https://github.com/lgierth/cjdns.git && cd cjdns && git checkout android-wip
  • for the x86 emulator:
    • PATH=$PATH:/path/to/i686-linux-android/bin CROSS_COMPILE=i686-linux-android- TARGET_ARCH=x64 Seccomp_NO=1 ./cross-do
    • cp cjdroute /path/to/cjdns-android/src/main/assets/x86/
  • for armeabi devices:
    • PATH=$PATH:/path/to/arm-linux-androideabi/bin CROSS_COMPILE=arm-linux-androideabi- TARGET_ARCH=arm Seccomp_NO=1 ./cross-do
    • cp cjdroute /path/to/cjdns-android/src/main/assets/armeabi-v7a/
  • for android-5.0 on x86 (and possibly other archs), you need to cross-do with Seccomp_NO=1
  • cjdroute --genconf > /path/to/cjdns-android/src/main/assets/cjdroute.conf
  1. Create emulator
  • android create avd -n cjdns -t 1 --abi x86 --force
  1. Start emulator
  • emulator -avd cjdns -qemu -m 256 -enable-kvm

Running

  1. build cjdns-android (and clear app cache)
  • ./gradlew installDebug
  1. tail app log
  • adb logcat | grep cjdns
  1. tail cjdroute crashdumps (x86)
  • adb logcat | ndk-trace -sym src/main/assets/x86/
  1. tail cjdroute crashdumps (armeabi)
  • adb logcat | ndk-trace -sym src/main/assets/armeabi-v7a/

Contact

Notes

cjdns-android's People

Contributors

benhylau avatar kpcyrd avatar prurigro avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.