Shadowsocks-android: "Process 'command 'sh'' finished with non-zero exit value 255" build apk error

Created on 31 Mar 2018  ·  7Comments  ·  Source: shadowsocks/shadowsocks-android

Hello

when I am going to build app from android studio then I got below error,

Process 'command 'sh'' finished with non-zero exit value 255

all path set as per README.md

Environment

  • Android version: 7.0.0
  • Device: MOTO G5
  • Shadowsocks version: v4.0.9

Please help

Thanks

question

Most helpful comment

Update

I build success. These suggestions hope to be useful to people who have the same mistakes.

  1. you can run bash core/overture/src/make.bash, if you get some error, fix them and build. the enviroment $ANDROID_HOME maybe is null

Update

I use command

$NDK/build/tools/make-standalone-toolchain.sh \
--arch=arm --platform=android-21 --install-dir=/path/to/shadowsocks-android/core/src/overture/.deps/android-toolchain-21-arm
$NDK/build/tools/make-standalone-toolchain.sh \
--arch=arm64 --platform=android-21 --install-dir=/path/to/shadowsocks-android/core/src/overture/.deps/android-toolchain-21-arm64
$NDK/build/tools/make-standalone-toolchain.sh --arch=x86 --platform=android-21 --install-dir=/path/to/shadowsocks-android/core/src/overture/.deps/android-toolchain-21-x86

================

@yx601 How to install toolchains? I found toochains in ndk-bundle/toolchains:


## Update

-rw-r--r-- 1 huyinghuan staff 197 8 27 17:05 NOTICE-MIPS
-rw-r--r-- 1 huyinghuan staff 201 8 27 17:05 NOTICE-MIPS64
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 aarch64-linux-android-4.9
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 arm-linux-androideabi-4.9
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 llvm
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 mips64el-linux-android-4.9
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 mipsel-linux-android-4.9
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 renderscript
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 x86-4.9
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 x86_64-4.9



and I echo `ANDROID_ARM_TOOLCHAIN`, `ANDROID_ARM64_TOOLCHAIN`, `ANDROID_X86_TOOLCHAIN`  in `overutre/make.bash` ,get result 

/android-workspace/shadowsocks-android/core/src/overture/.deps/android-toolchain-21-arm
android-workspace/shadowsocks-android/core/src/overture/.deps/android-toolchain-21-arm64
android-workspace/shadowsocks-android/core/src/overture/.deps/android-toolchain-21-x86
```

I cannot find the same directory in ndk-bundle/toolchains. What are directory I should copy?

All 7 comments

i have the same problem
i tried to run core/src/overture/make.bash 21, then build ,it will not fail , but the app seems not good , i got " Dial DNS upstream with SOCKS5 proxy failed: dial tcp 127.0.0.1:1080: connect: connection refused" in logcat
i use netstat -tlnp , and there is no port 1080, it seems shadowsocks not run
then restart and log libss
i find libss-local.so crashed when use network

A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 13261 (libss-local.so)

need help

you need install toolchains in the .deps folder

hello,

upper build error solved by below command

./gradlew assembleDebug check

Fail to detect internet connection : Connection close by peer

javax.net.ssl.SSLHandshakeException: Connection closed by peer

When Enable DNS forwarding then getting below error
java.net.SocketException: Network is unreachable

Environment

Android version: 7.0.0
Device: MOTO G5
Shadowsocks version: v4.0.9

Configuration

_Put an x inside the [ ] that applies._

  • [x ] IPv4 server address
  • [ ] IPv6 server address
  • [x] Client IPv4 availability
  • [ ] Client IPv6 availability
  • Encrypt method: RC4-MD5
  • Route

    • [x ] All

    • [ ] Bypass LAN

    • [ ] Bypass China

    • [ ] Bypass LAN & China

    • [ ] GFW List

    • [ ] China List

    • [ ] Custom rules

  • [ ] IPv6 route
  • [x ] Apps VPN mode

    • [ ] Bypass mode

  • Remote DNS: 8.8.8.8
  • [x ] DNS Forwarding
  • Plugin configuration (if applicable):
  • [ ] Auto Connect
  • [x ] TCP Fast Open
  • If you're not using VPN mode, please supply more details here:

What did you do?

I going to connect ss-client to my ss-server via vpn. but when i test connection by touch at below I getting upper error.

What did you expect to see?

I expected that traffic going through ss-server.

What did you see instead?

i getting upper errror.

Update

I build success. These suggestions hope to be useful to people who have the same mistakes.

  1. you can run bash core/overture/src/make.bash, if you get some error, fix them and build. the enviroment $ANDROID_HOME maybe is null

Update

I use command

$NDK/build/tools/make-standalone-toolchain.sh \
--arch=arm --platform=android-21 --install-dir=/path/to/shadowsocks-android/core/src/overture/.deps/android-toolchain-21-arm
$NDK/build/tools/make-standalone-toolchain.sh \
--arch=arm64 --platform=android-21 --install-dir=/path/to/shadowsocks-android/core/src/overture/.deps/android-toolchain-21-arm64
$NDK/build/tools/make-standalone-toolchain.sh --arch=x86 --platform=android-21 --install-dir=/path/to/shadowsocks-android/core/src/overture/.deps/android-toolchain-21-x86

================

@yx601 How to install toolchains? I found toochains in ndk-bundle/toolchains:


## Update

-rw-r--r-- 1 huyinghuan staff 197 8 27 17:05 NOTICE-MIPS
-rw-r--r-- 1 huyinghuan staff 201 8 27 17:05 NOTICE-MIPS64
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 aarch64-linux-android-4.9
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 arm-linux-androideabi-4.9
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 llvm
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 mips64el-linux-android-4.9
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 mipsel-linux-android-4.9
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 renderscript
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 x86-4.9
drwxr-xr-x 3 huyinghuan staff 102 8 27 17:05 x86_64-4.9



and I echo `ANDROID_ARM_TOOLCHAIN`, `ANDROID_ARM64_TOOLCHAIN`, `ANDROID_X86_TOOLCHAIN`  in `overutre/make.bash` ,get result 

/android-workspace/shadowsocks-android/core/src/overture/.deps/android-toolchain-21-arm
android-workspace/shadowsocks-android/core/src/overture/.deps/android-toolchain-21-arm64
android-workspace/shadowsocks-android/core/src/overture/.deps/android-toolchain-21-x86
```

I cannot find the same directory in ndk-bundle/toolchains. What are directory I should copy?

--arch=arm --platform=android-21 --install-dir=/path/to/shadowsocks-android/core/src/overture/.deps/android-toolchain-21-arm

您好 ,我也遇到了相同的问题,按照您写的步骤,我可能操作的有问题,现在还是跑不了。
我有配置android sdk的路径到环境变量
您回复的update那一步 我这里总提示找不到文件夹 应该是操作的不对 可否请教下?

--arch=arm --platform=android-21 --install-dir=/path/to/shadowsocks-android/core/src/overture/.deps/android-toolchain-21-arm

您好 ,我也遇到了相同的问题,按照您写的步骤,我可能操作的有问题,现在还是跑不了。
我有配置android sdk的路径到环境变量
您回复的update那一步 我这里总提示找不到文件夹 应该是操作的不对 可否请教下?

@huyinghuan

@xinyangmaojian /path/to 这里需要改成你自己的文件的位置

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mcmxciv picture mcmxciv  ·  3Comments

sakuranagashi picture sakuranagashi  ·  5Comments

Rabbit1623 picture Rabbit1623  ·  5Comments

theScrabi picture theScrabi  ·  5Comments

iKirby picture iKirby  ·  4Comments