cbeuw / Cloak-android

Android client of Cloak
Other
227 stars 32 forks source link

[enhancement]add 64bit version #28

Open chenshaoju opened 1 year ago

chenshaoju commented 1 year ago

Current cloak-android only has a 32-bit version, in some cases, the newest phone maybe not support it. [The Pixel 7 series might be the first 64-bit-only Android phones]

and some phones may show a warning message: QQ图片20221017111546

Thanks for your hard work.

fyrych commented 1 year ago

Hi. Downloaded today, and cannot install this app. Is it possible to create a 64 bit version? Pixel 7 Pro.

bingzhangdai commented 1 year ago

Same here. I am wondering about the effort of migrating to 64 bit. Will build with 64 bit sdk but no code change work?

fyrych commented 1 year ago

Same here. I am wondering about the effort of migrating to 64 bit. Will build with 64 bit sdk but no code change work?

I am changed ROM, installed custom rom for my phone. Problem with 32bit solved.

bingzhangdai commented 1 year ago

Same here. I am wondering about the effort of migrating to 64 bit. Will build with 64 bit sdk but no code change work?

I am changed ROM, installed custom rom for my phone. Problem with 32bit solved.

Yes, I can install the x86 version, but there are some problems when launching the shadowsocks client with cloak plugin. Every time I have to manually open the cloak plugin then return to shadowsocks client (this leaves the cloak plugin running in the background), otherwise, the shadowsocks client won't start. It will complain "unknown plugin cloak". I suspect it is due to the compatibility problems of x86 version app.

bingzhangdai commented 1 year ago

I can see that the build script already compiles the arm64 version apk: https://github.com/cbeuw/Cloak-android/blob/08ad33d70c368d3497c6b3226608ba9a15b6df86/app/src/make.sh#L122. I think the owner can directly put the artifact to release page?

bingzhangdai commented 1 year ago

These android-strip tools are removed from NDK so that the cross platform compile fails. https://github.com/cbeuw/Cloak-android/blob/08ad33d70c368d3497c6b3226608ba9a15b6df86/app/src/make.sh#L96 I commented these strip steps and manually built the apk. I can get the x64 version.

However, "unknown plugin ck-client" is still there.

cbeuw commented 1 year ago

x86_64, arm, and arm64 versions of the native Go lib are included in every APK, so this shouldn't have been the issue.

I was not aware of APKs being architecture specific, I'll look into this.

bingzhangdai commented 1 year ago

@cbeuw This line failed https://github.com/cbeuw/Cloak-android/blob/08ad33d70c368d3497c6b3226608ba9a15b6df86/app/src/make.sh#L124 Commented these strip steps will work. I suggest adding set -e in the beginning of the script to force this build step to fail in Azure DevOps. Then you can notice the error.

cbeuw commented 1 year ago

This alone wouldn't fix the 32-bit APK issue, since existing releases were built successfully when NPK didn't remove strip

bingzhangdai commented 1 year ago

Yes. I tried you project in Azure DevOps build. Actually your cross platform compile does fail. image

You can add set -e in the beginning or simply use && between these commands image

cbeuw commented 1 year ago

Ah yes you are right, it's been failing the whole time...

I'll fix the build script and make a new release

bingzhangdai commented 1 year ago

btw, I found the solution to "unknown plugin": https://github.com/shadowsocks/shadowsocks-android/issues/1428. It is not related to the x64 bit version.

bingzhangdai commented 1 year ago

@cbeuw Thank you. Another request, could you upload it to the play store? It will be more convenient, and the cellphone won't prompt the warning during installation.