From a0b65cf8e39c3e689e7727b34e8d706b6659426a Mon Sep 17 00:00:00 2001 From: MohammadKhalaj <62938359+mohamadkhalaj@users.noreply.github.com> Date: Sun, 11 Feb 2024 14:30:16 +0330 Subject: [PATCH 1/2] Added README for building --- README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/README.md b/README.md index a5c8682c..97a2702b 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,63 @@ Leveraging `bepass-sdk` and a custom Go implementation of WireGuard, it's design 2. **Install**: Open the APK file to install. 3. **Connect**: Launch Oblivion and hit the switch button. +## Prerequisites +- Java 17 +- Gradle 8 +- Android Gradle Plugin (AGP) 7.4.2 +- NDK r26b (26.1.10909125) +- Go 1.20.0 + +## Building the Project +Follow the steps below to build the Android project: + +Navigate to the libs directory: + +```bash +cd app/libs +``` +Initialize Go modules and install required packages: + +```bash +go mod tidy +go install golang.org/x/mobile/cmd/gomobile@latest +go install golang.org/x/mobile/cmd/gobind@latest +go get golang.org/x/mobile/cmd/gobind +go get golang.org/x/mobile/cmd/gomobile +go get golang.org/x/mobile +``` +Initialize Go mobile: + +```bash +gomobile init +``` +Bind the Go package to Android: + +```bash +gomobile bind -ldflags '-s -w' -o tun2socks.aar -androidapi 21 -target android . +``` +Navigate back to the project root: + +```bash +cd ../.. +``` +Make gradlew script executable: + +```bash +chmod +x ./gradlew +``` +Build the project: + +```bash +./gradlew build +``` +Assemble release build: + +```bash +./gradlew assembleRelease +``` +Once the above steps are completed successfully, the Android project will be built, and the release APK will be assembled. + ## Get Involved We're a community-driven project, aiming to make the internet accessible for all. Whether you want to contribute code, suggest features, or need some help, we'd love to hear from you! Check out our [GitHub Issues](https://github.com/bepass-org/oblivion/issues) or submit a pull request. From 22e300fc31b30ba29cf6ba1670d2840d50bc65b9 Mon Sep 17 00:00:00 2001 From: MohammadKhalaj <62938359+mohamadkhalaj@users.noreply.github.com> Date: Sun, 11 Feb 2024 20:31:09 +0330 Subject: [PATCH 2/2] Added instructions for signing APK --- README.md | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 97a2702b..4517d197 100644 --- a/README.md +++ b/README.md @@ -18,15 +18,19 @@ Leveraging `bepass-sdk` and a custom Go implementation of WireGuard, it's design 2. **Install**: Open the APK file to install. 3. **Connect**: Launch Oblivion and hit the switch button. -## Prerequisites +## Building the Project + +### Prerequisites - Java 17 - Gradle 8 -- Android Gradle Plugin (AGP) 7.4.2 +- Android Gradle Plugin (AGP) 8.1.2 - NDK r26b (26.1.10909125) - Go 1.20.0 -## Building the Project -Follow the steps below to build the Android project: +Follow the steps below to build the Oblivion: + +### Building Go libraries +Open the Terminal tab at the bottom of Android Studio. Navigate to the libs directory: @@ -53,27 +57,23 @@ Bind the Go package to Android: ```bash gomobile bind -ldflags '-s -w' -o tun2socks.aar -androidapi 21 -target android . ``` -Navigate back to the project root: - -```bash -cd ../.. -``` -Make gradlew script executable: - -```bash -chmod +x ./gradlew -``` -Build the project: - -```bash -./gradlew build -``` -Assemble release build: - -```bash -./gradlew assembleRelease -``` -Once the above steps are completed successfully, the Android project will be built, and the release APK will be assembled. +### Generate Signed Bundle/APK: +- In Android Studio, navigate to "Build" in the menu bar. +- Select "Generate Signed Bundle/APK..." +- Choose "APK" and proceed. + +#### Select Keystore: +- Click on "Choose existing..." or "Create new..." to locate your keystore file. +- Enter the keystore password when prompted. + +#### Configure APK Signature: +- Select the appropriate key alias from the dropdown menu. +- Input the key password. +- Continue to the next step. + +#### Select APK Destination: +- Choose the destination folder for the signed APK. +- Finalize by clicking "Finish" to generate the signed APK. ## Get Involved