To do direct boot, important files need to be moved to device storage (i.e. not as safe storage). The only thing sensitive is user credentials (server settings in each profile) and the config file passed to libss-*.so. In order to implement direct boot, at least the active profile has to be moved/copied to device storage. This commit keeps profile information (and temporary data used by ProfileConfigFragment) and Shadowsocks config in credential storage and move everything else to device storage. In order to make direct boot work, active profile is also copied into device storage and Shadowsocks config file is created in device storage during direct boot. Cleanup of those information is also implemented. Fixes #1457. NB: * `android:directBootAware` can't be used on application element. That seems to be used by system apps. * Works fine with multi-user; * Old GSM files are not migrated (see App.kt) to device storage.
Shadowsocks for Android
A shadowsocks client for Android, written in Kotlin.
![]()
PREREQUISITES
- JDK 1.8
- Go 1.4+
- Android SDK
- Build Tools 27+
- Android NDK r16+
BUILD
- Set environment variable
ANDROID_HOMEto/path/to/android-sdk - (optional) Set environment variable
ANDROID_NDK_HOMEto/path/to/android-ndk(default:$ANDROID_HOME/ndk-bundle) - Set environment variable
GOROOT_BOOTSTRAPto/path/to/go - Fetch submodules using
$ git submodule update --init --recursive - Build it using Android Studio or gradle script
TRANSLATE
Translators can go to POEditor to help translate shadowsocks-android. Guidelines:
- It's okay to leave some strings untranslated if you think it should use the same string as English (US).
faq_urlshould not be changed. If you'd like to translate FAQ, submit a pull request with the translatedfaq.md(it should be named properly, e.g..github/faq.zh-CN.md). Administrators will take care of the rest.- Do not add/edit/remove comments.
OPEN SOURCE LICENSES
- redsocks: APL 2.0
- mbed TLS: APL 2.0
- libevent: BSD
- tun2socks: BSD
- pcre: BSD
- libancillary: BSD
- shadowsocks-libev: GPLv3
- overture: MIT
- libev: GPLv2
- libsodium: ISC
LICENSE
Copyright (C) 2017 by Max Lv <max.c.lv@gmail.com>
Copyright (C) 2017 by Mygod Studio <contact-shadowsocks-android@mygod.be>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.