-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d4fc717
Showing
42 changed files
with
2,086 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
# Windows thumbnail db | ||
Thumbs.db | ||
|
||
# OSX files | ||
.DS_Store | ||
|
||
# emacs | ||
*~ | ||
|
||
# Android Studio | ||
*.iml | ||
.idea/ | ||
.gradle/ | ||
build/ | ||
|
||
#tfx | ||
.transifexrc | ||
|
||
/external/bin/ | ||
/external/include/ | ||
/external/*-build-stamp | ||
/external/lib/ | ||
/external/test/ | ||
external/patches/* | ||
obj | ||
|
||
# Vagrant | ||
/.vagrant/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
|
||
stages: | ||
- test | ||
- release | ||
|
||
cache: | ||
paths: | ||
- .gradle/wrapper | ||
- .gradle/caches | ||
|
||
|
||
.job-template: &job-template | ||
artifacts: | ||
name: "${CI_PROJECT_PATH}_${CI_JOB_STAGE}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHA}" | ||
paths: | ||
- tor-android-binary/build/outputs/aar | ||
- tor-android-binary/src/main/libs | ||
- external/include | ||
- external/lib | ||
- external/test | ||
expire_in: 1 week | ||
when: always | ||
|
||
after_script: | ||
- echo "Download debug artifacts from https://gitlab.com/${CI_PROJECT_PATH}/-/jobs" | ||
# this file changes every time but should not be cached | ||
- rm -f $GRADLE_USER_HOME/caches/modules-2/modules-2.lock | ||
- rm -fr $GRADLE_USER_HOME/caches/*/plugin-resolution/ | ||
|
||
|
||
.setup-template: &setup-template | ||
- export LC_ALL=C.UTF-8 | ||
- export DEBIAN_FRONTEND=noninteractive | ||
- echo Etc/UTC > /etc/timezone | ||
- echo 'quiet "1";' | ||
'APT::Install-Recommends "0";' | ||
'APT::Install-Suggests "0";' | ||
'APT::Acquire::Retries "20";' | ||
'APT::Get::Assume-Yes "true";' | ||
'Dpkg::Use-Pty "0";' | ||
> /etc/apt/apt.conf.d/99gitlab | ||
- apt-get update | ||
- apt-get -qy dist-upgrade | ||
- apt-get -qy install | ||
autoconf | ||
autogen | ||
automake | ||
autopoint | ||
autotools-dev | ||
gettext-base | ||
git | ||
libtool | ||
make | ||
patch | ||
pkg-config | ||
|
||
- export GRADLE_USER_HOME=$PWD/.gradle | ||
|
||
- git clone --depth=1 --branch=0.4 https://gitlab.com/fdroid/sdkmanager.git | ||
- git -C sdkmanager checkout -B master b5a5640fc4cdc151696b2d27a5886119ebd3a8b7 | ||
- ndkVersion=$(sed -En 's,NDK_REQUIRED_REVISION *:?= *([0-9.]+).*,\1,p' external/Makefile) | ||
- ./sdkmanager/sdkmanager.py "ndk;$ndkVersion" | ||
|
||
- export AVD_SDK=`echo $CI_JOB_NAME | awk '{print $2}'` | ||
- export AVD_TAG=`echo $CI_JOB_NAME | awk '{print $3}'` | ||
- export AVD_ARCH=`echo $CI_JOB_NAME | awk '{print $4}'` | ||
- export AVD_PACKAGE="system-images;android-${AVD_SDK};${AVD_TAG};${AVD_ARCH}" | ||
- echo $AVD_PACKAGE | ||
|
||
|
||
.test-template: &test-template | ||
stage: test | ||
image: registry.gitlab.com/fdroid/ci-images-client:latest | ||
<<: *job-template | ||
script: | ||
- *setup-template | ||
|
||
- export V=0 | ||
- ./tor-droid-make.sh fetch -c | ||
- ./tor-droid-make.sh build -a $AVD_ARCH | ||
- for f in tor-android-binary/src/main/libs/*/libtor.so; do sha256sum $f; done | ||
- for f in external/lib/*/libtor.so; do sha256sum $f; done | ||
|
||
- adb start-server | ||
- start-emulator | ||
- wait-for-emulator | ||
- adb devices | ||
- adb shell input keyevent 82 & | ||
|
||
# adb shell on older emulators didn't pass the return value, so we need tricks | ||
# https://stackoverflow.com/a/58452689 | ||
- EXITVALUE=0 | ||
- for f in test test-memwipe test-slow; do | ||
printf "\n\n------------------------------------------\n$f\n"; | ||
adb -e push external/test/$AVD_ARCH/$f /data/local/tmp/; | ||
adb -e shell "cd /data/local/tmp; ./$f"'; echo -n $? > '"$f.result"; | ||
test `adb -e shell "cat /data/local/tmp/$f.result"` = "0" || EXITVALUE=1; | ||
done | ||
- exit $EXITVALUE | ||
|
||
|
||
no-accel 22 default x86_64: | ||
<<: *test-template | ||
|
||
no-accel 24 default armeabi-v7a: | ||
<<: *test-template | ||
|
||
|
||
release: | ||
stage: release | ||
image: debian:buster | ||
<<: *job-template | ||
script: | ||
- apt-get --quiet update --yes | ||
- apt-get --quiet install --yes | ||
default-jdk-headless | ||
lib32stdc++6 | ||
lib32z1 | ||
python3-requests | ||
tar | ||
|
||
- export ANDROID_HOME=/opt/android-sdk | ||
- mkdir -p $ANDROID_HOME/licenses | ||
- printf "\n8933bad161af4178b1185d1a37fbf41ea5269c55\nd56f5187479451eabf01fb78af6dfcb131a6481e\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > $ANDROID_HOME/licenses/android-sdk-license | ||
- *setup-template | ||
- ./sdkmanager/sdkmanager.py "tools;26.1.1" | ||
|
||
- git clean -fdx | ||
- ./tor-droid-make.sh release -f | ||
- cd tor-android-binary/build/outputs/aar | ||
- for f in *.*; do sha256sum $f; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[submodule "external/tor"] | ||
path = external/tor | ||
url = https://github.com/guardianproject/tor.git | ||
ignore = dirty | ||
[submodule "external/libevent"] | ||
path = external/libevent | ||
url = https://github.com/libevent/libevent.git | ||
ignore = dirty | ||
[submodule "external/openssl"] | ||
path = external/openssl | ||
url = https://github.com/openssl/openssl.git | ||
ignore = dirty | ||
[submodule "external/zstd"] | ||
path = external/zstd | ||
url = https://github.com/facebook/zstd.git | ||
ignore = dirty | ||
[submodule "external/xz"] | ||
path = external/xz | ||
url = https://git.tukaani.org/xz.git | ||
ignore = dirty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
This file lists the authors for Orbot, a free software project to provide | ||
anonymity on the Internet on Android smartphones. | ||
|
||
For more information about Orbot, see https://guardianproject.info/apps/orbot | ||
|
||
If you got this file as a part of a larger bundle, there are probably | ||
other authors that you should be aware of. | ||
|
||
Main Authors: | ||
------------- | ||
Nathan Freitas <nathan@freitas.net> developed the primary Android | ||
application and managed the porting of Tor to Android. | ||
|
||
Jake Appelbaum <jacob@appelbaum.net> regularly gave Nathan a swift kick | ||
in the rear to get this done. He has also provided extensive guidance | ||
and review. Most recently he has been promoted to Chief Application | ||
Resource Editor. | ||
|
||
Derek Halliday <derek@guardianproject.info> has designed and implemented | ||
new user interface components and layouts since the 1.0.4 release. | ||
|
||
Contributors: | ||
------------- | ||
Nick Mathewson <nickm@freehaven.net> wrote some of the patch code to | ||
support the compiling of Tor and Libevent on Android, and generally | ||
provided guidance in the entire effort. | ||
|
||
Adam Langley made the original valiant effort to port Tor to Android. | ||
|
||
Sathyanarayanan <gsathya@torproject.org> created a patch for the wizard | ||
which updated the icon and link for the secure chat app info to point | ||
to Gibberbot, and hopefully will continue to contribute useful patches. | ||
|
||
__sporkbomb <manuel@acanthephyra.net> implemented an updated set of logic | ||
in TorTransProxy for handling the "transproxy all" mode of operation. Before | ||
certain system processes were leaking traffic, and this was also detected | ||
by his excellent auditing. | ||
|
||
Amogh Pradeep <amoghbl1@gmail.com> submitted a patch to address an issue | ||
with the ongoing data transfer notification dying now and then, and is | ||
working on improving the notification display in general | ||
|
||
We found a nice new power button vector set here under the CC license: | ||
http://vector4free.com/vector/free-vector-power-buttons/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
This document explains how to properly build an Android package of Orbot from | ||
source. | ||
|
||
Orbot includes, in the external directory, git repo submodules of: | ||
- Tor | ||
- OpenSSL (statically built and patched for Android) | ||
- LibEvent | ||
- JTorControl: The Tor Control Library for Java | ||
|
||
Please install the following prerequisites (instructions for each follows): | ||
ant: http://ant.apache.org/ | ||
Android Native Dev Kit or NDK (for C/C++ code): | ||
http://developer.android.com/sdk/ndk/index.html | ||
Android Software Dev Kit or SDK (for Java code): | ||
http://developer.android.com/sdk/index.html | ||
AutoMake and AutoConf tool | ||
sudo apt-get install autotools-dev | ||
sudo apt-get install automake | ||
sudo apt-get install autogen autoconf libtool gettext-base autopoint | ||
|
||
You will need to run the 'android' command in the SDK to install the necessary | ||
Android platform supports (ICS 4.x or android-15) | ||
|
||
Be sure that you have all of the git submodules up-to-date: | ||
|
||
./tor-droid-make.sh fetch | ||
|
||
To begin building, from the Orbot root directory, it builds all submodules and | ||
the project. | ||
|
||
./tor-droid-make.sh build | ||
|
||
Now build the Android app | ||
|
||
(gradle / android studio instructions here) | ||
|
||
This will produce an unsigned Tor package APK. | ||
|
||
To produce a usable package, you'll need to sign the .apk. The basics on | ||
signing can be found on the Android developer site: | ||
|
||
http://developer.android.com/guide/publishing/app-signing.html | ||
|
||
|
Oops, something went wrong.