From bce08c513647bb1a3d00ba95e4abbe055330e147 Mon Sep 17 00:00:00 2001 From: yuhan6665 <1588741+yuhan6665@users.noreply.github.com> Date: Fri, 8 Jul 2022 20:02:34 -0400 Subject: [PATCH] Update readme --- AndroidLibV2rayLite/README.md | 32 ++++++++++++++++++-------------- README.md | 6 +++--- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/AndroidLibV2rayLite/README.md b/AndroidLibV2rayLite/README.md index 6d7fa28b..118eefcf 100644 --- a/AndroidLibV2rayLite/README.md +++ b/AndroidLibV2rayLite/README.md @@ -1,16 +1,20 @@ # AndroidLibV2rayLite -进入`AndroidLibV2rayLite`文件夹 - -``` -go mod download -``` - - - -编译aar - -``` -gomobile bind -v -o android.aar -target=android ./ -``` - +### Preparation +- latest Ubuntu environment +- At lease 30G free space +- Get Repo [AndroidLibV2rayLite](https://github.com/2dust/AndroidLibV2rayLite) or [AndroidLibXrayLite](https://github.com/2dust/AndroidLibXrayLite) +### Prepare Go +- Go to https://golang.org/doc/install and install latest go +- Make sure `go version` works as expected +### Prepare gomobile +- Go to https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile and install gomobile +- export PATH=$PATH:~/go/bin +- Make sure `gomobile init` works as expected +### Prepare NDK +- Go to https://developer.android.com/ndk/downloads and install latest NDK +- export PATH=$PATH: +- Make sure `ndk-build -v` works as expected +### Make +- sudo apt install make +- Read and understand [build script](https://github.com/2dust/AndroidLibV2rayLite/blob/master/Makefile) diff --git a/README.md b/README.md index ce3938a9..035e07dd 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ A V2Ray client for Android, support [Xray core](https://github.com/XTLS/Xray-core) and [v2fly core](https://github.com/v2fly/v2ray-core) [![API](https://img.shields.io/badge/API-21%2B-yellow.svg?style=flat)](https://developer.android.com/about/versions/lollipop) -[![Kotlin Version](https://img.shields.io/badge/Kotlin-1.6.10-blue.svg)](https://kotlinlang.org) +[![Kotlin Version](https://img.shields.io/badge/Kotlin-1.6.21-blue.svg)](https://kotlinlang.org) [![GitHub commit activity](https://img.shields.io/github/commit-activity/m/2dust/v2rayNG)](https://github.com/2dust/v2rayNG/commits/master) [![CodeFactor](https://www.codefactor.io/repository/github/2dust/v2rayng/badge)](https://www.codefactor.io/repository/github/2dust/v2rayng) [![GitHub Releases](https://img.shields.io/github/downloads/2dust/v2rayNG/latest/total?logo=github)](https://github.com/2dust/v2rayNG/releases) @@ -26,8 +26,8 @@ A V2Ray client for Android, support [Xray core](https://github.com/XTLS/Xray-cor ### Development guide Android project under V2rayNG folder can be compiled directly in Android Studio, or using Gradle wrapper. But the v2ray core inside the aar is (probably) outdated. -The aar can be compiled from the Golang project under AndroidLibV2rayLite folder. For a quick start, read guide for [Go Mobile](https://github.com/golang/go/wiki/Mobile) -and [Makefiles for Go Developers](https://tutorialedge.net/golang/makefiles-for-go-developers/) +The aar can be compiled from the Golang project [AndroidLibV2rayLite](https://github.com/2dust/AndroidLibV2rayLite) or [AndroidLibXrayLite](https://github.com/2dust/AndroidLibXrayLite). +For a quick start, read guide for [Go Mobile](https://github.com/golang/go/wiki/Mobile) and [Makefiles for Go Developers](https://tutorialedge.net/golang/makefiles-for-go-developers/) v2rayNG can run on Android Emulators. For WSA, VPN permission need to be granted via `appops set [package name] ACTIVATE_VPN allow`