Was it ever considered to contribute aFreeRDP to the free-open-source app repository of F-Droid?
So, aFreeRDP could be installed from F-Droid instead of Google Play.
Refering their contribution page:
@ccpp We did not find the time for that, but if someone is willing to do that it would be great.
@akallabeth @bmiklautz
I created a contribution branch for fdroiddata which contributes aFreeRDP version version 2.0.0-beta1+android11, and is tested to compile and run.
Can you please have a look and see if I can submit that branch as a pull request? I added following modifications:
@ccpp Nice work! Here some notes:
2.0.0-rc0 which is the latest tag we have@ccpp Ok, you can use prebuild=../../../scripts/android-build-freerdp.sh --ndk $$NDK$$ --sdk $$SDK$$ --conf ../../../scripts/android-build-32.conf && ../../../scripts/android-build-freerdp.sh --ndk $$NDK$$ --sdk $$SDK$$ --conf ../../../scripts/android-build-64.conf to build all native libraries.
I don't know the policies regarding patents and OpenH264 but if possible it would be a nice thing to have it enabled.
And as a final note, as far as I can remember the minimum version requirement for aFreeRDP is android-14
@ccpp and for the version update checks, we plan to do release tags now and then. Version scheme is x.y.z or x.y.z-rcX or x.y.z-betaX (you get the idea)
OK I'll try to integrate that. But a sidenote: I think it is not possible to use the same versionCode for different builds aka versions. So, FreeRDP 2.0.0 release version will not build on FDroid unless versionCode is raised. The same holds for each git-tag.
And regarding OpenH264: I'm not sure about whether it can be used, both because of the patents and also because of compilation: it tries to compile using NASM (not from NDK but from build host system). I doubt that the generated code would work on android devices.
Is that the reason why the package is disabled by default? Has this ever been tested for Android?
@ccpp Hmm, I thought FDroid has an automatic versioning when the tag fetch is used, need to recheck.
As for OpenH264: Yes, it is working fine with FreeRDP, but it has been disabled (by default) due to the vague patent situation.
@ccpp As for the NASM issue, you can disable that in the OpenH264 build (search for USE_ASM)
@akallabeth
Tags - The AndroidManifest.xml and build.gradle files in all tagged revisions in the source repository are checked, looking for the highest version code. The appropriateness of this method depends on the development process used by the application鈥檚 developers. You should not specify this method unless you鈥檙e sure it鈥檚 appropriate. It shouldn鈥檛 be used if the developers like to tag unstable versions or are known to forget to tag releases. Like RepoManifest, it will not return the correct value if the directory containing the AndroidManifest.xml has moved. Despite these caveats, it is the often the favourite update check mode.
It is possible to only respect release tags, but still it does not work if FreeRDP does not modify the versionCode in the gradle file for each (rc or release) tag
@ccpp Ok, what issues do you have while linking? I can build the whole native libs without issues on my machine, so I'd be interested to fix that asap ;)
OK I'm not sure if this helps you at all because I could only make it compile with some patches in the first place - but here's the last lines of compilation:
/usr/bin/ccache /home/cpl/Android/android-ndk-r15c/toolchains/mips64el-linux-android-4.9/prebuilt/linux-x86_64/bin/mips64el-linux-android-g++ -shared -o libopenh264.so codec/encoder/core/src/au_set.o codec/encoder/core/src/deblocking.o codec/encoder/core/src/decode_mb_aux.o codec/encoder/core/src/encode_mb_aux.o codec/encoder/core/src/encoder.o codec/encoder/core/src/encoder_data_tables.o codec/encoder/core/src/encoder_ext.o codec/encoder/core/src/get_intra_predictor.o codec/encoder/core/src/md.o codec/encoder/core/src/mv_pred.o codec/encoder/core/src/nal_encap.o codec/encoder/core/src/paraset_strategy.o codec/encoder/core/src/picture_handle.o codec/encoder/core/src/ratectl.o codec/encoder/core/src/ref_list_mgr_svc.o codec/encoder/core/src/sample.o codec/encoder/core/src/set_mb_syn_cabac.o codec/encoder/core/src/set_mb_syn_cavlc.o codec/encoder/core/src/slice_multi_threading.o codec/encoder/core/src/svc_base_layer_md.o codec/encoder/core/src/svc_enc_slice_segment.o codec/encoder/core/src/svc_encode_mb.o codec/encoder/core/src/svc_encode_slice.o codec/encoder/core/src/svc_mode_decision.o codec/encoder/core/src/svc_motion_estimate.o codec/encoder/core/src/svc_set_mb_syn_cabac.o codec/encoder/core/src/svc_set_mb_syn_cavlc.o codec/encoder/core/src/wels_preprocess.o codec/encoder/core/src/wels_task_base.o codec/encoder/core/src/wels_task_encoder.o codec/encoder/core/src/wels_task_management.o codec/encoder/plus/src/welsEncoderExt.o codec/decoder/core/src/au_parser.o codec/decoder/core/src/bit_stream.o codec/decoder/core/src/cabac_decoder.o codec/decoder/core/src/deblocking.o codec/decoder/core/src/decode_mb_aux.o codec/decoder/core/src/decode_slice.o codec/decoder/core/src/decoder.o codec/decoder/core/src/decoder_core.o codec/decoder/core/src/decoder_data_tables.o codec/decoder/core/src/error_concealment.o codec/decoder/core/src/fmo.o codec/decoder/core/src/get_intra_predictor.o codec/decoder/core/src/manage_dec_ref.o codec/decoder/core/src/memmgr_nal_unit.o codec/decoder/core/src/mv_pred.o codec/decoder/core/src/parse_mb_syn_cabac.o codec/decoder/core/src/parse_mb_syn_cavlc.o codec/decoder/core/src/pic_queue.o codec/decoder/core/src/rec_mb.o codec/decoder/plus/src/welsDecoderExt.o codec/processing/src/adaptivequantization/AdaptiveQuantization.o codec/processing/src/backgrounddetection/BackgroundDetection.o codec/processing/src/common/memory.o codec/processing/src/common/WelsFrameWork.o codec/processing/src/common/WelsFrameWorkEx.o codec/processing/src/complexityanalysis/ComplexityAnalysis.o codec/processing/src/denoise/denoise.o codec/processing/src/denoise/denoise_filter.o codec/processing/src/downsample/downsample.o codec/processing/src/downsample/downsamplefuncs.o codec/processing/src/imagerotate/imagerotate.o codec/processing/src/imagerotate/imagerotatefuncs.o codec/processing/src/scenechangedetection/SceneChangeDetection.o codec/processing/src/scrolldetection/ScrollDetection.o codec/processing/src/scrolldetection/ScrollDetectionFuncs.o codec/processing/src/vaacalc/vaacalcfuncs.o codec/processing/src/vaacalc/vaacalculation.o codec/common/src/cpu-features.o codec/common/src/common_tables.o codec/common/src/copy_mb.o codec/common/src/cpu.o codec/common/src/crt_util_safe_x.o codec/common/src/deblocking_common.o codec/common/src/expand_pic.o codec/common/src/intra_pred_common.o codec/common/src/mc.o codec/common/src/memory_align.o codec/common/src/sad_common.o codec/common/src/utils.o codec/common/src/welsCodecTrace.o codec/common/src/WelsTaskThread.o codec/common/src/WelsThread.o codec/common/src/WelsThreadLib.o codec/common/src/WelsThreadPool.o --sysroot=/home/cpl/Android/android-ndk-r15c/platforms/android-14/arch-mips -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-soname,libopenh264.so
/home/cpl/Android/android-ndk-r15c/toolchains/mips64el-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/mips64el-linux-android/4.9.x/../../../../mips64el-linux-android/bin/ld: cannot find crtbegin_so.o: Datei oder Verzeichnis nicht gefunden
/home/cpl/Android/android-ndk-r15c/toolchains/mips64el-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/mips64el-linux-android/4.9.x/../../../../mips64el-linux-android/bin/ld: cannot find -lstdc++
/home/cpl/Android/android-ndk-r15c/toolchains/mips64el-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/mips64el-linux-android/4.9.x/../../../../mips64el-linux-android/bin/ld: cannot find -lm
/home/cpl/Android/android-ndk-r15c/toolchains/mips64el-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/mips64el-linux-android/4.9.x/../../../../mips64el-linux-android/bin/ld: cannot find -lc
/home/cpl/Android/android-ndk-r15c/toolchains/mips64el-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/mips64el-linux-android/4.9.x/../../../../mips64el-linux-android/bin/ld: cannot find -ldl
/home/cpl/Android/android-ndk-r15c/toolchains/mips64el-linux-android-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/mips64el-linux-android/4.9.x/../../../../mips64el-linux-android/bin/ld: cannot find crtend_so.o: Datei oder Verzeichnis nicht gefunden
collect2: error: ld returned 1 exit status
make: *** [libopenh264.so] Fehler 1
make: *** Warte auf noch nicht beendete Prozesse...
[ERROR] make PATH=/home/cpl/Android/android-ndk-r15c:/home/cpl/Android/android-ndk-r15c:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/cpl/src/fdroidserver/:/home/cpl/bin:/opt/gradle-4.2.1/bin OS=android NDKROOT=/home/cpl/Android/android-ndk-r15c TARGET=android-14 NDKLEVEL=14 ARCH=mips ASM=yasm USE_ASM=No -j libraries retured 2
[ERROR] bash /home/cpl/src/fdroiddata/build/com.freerdp.afreerdp/scripts/android-build-openh264.sh --src /home/cpl/src/fdroiddata/build/com.freerdp.afreerdp/scripts/../build/openh264 --dst /home/cpl/src/fdroiddata/build/com.freerdp.afreerdp/scripts/../client/Android/Studio/freeRDPCore/src/main/jniLibs --ndk /home/cpl/Android/android-ndk-r15c --arch mips --target 14 --tag v1.6.0 retured 1
==== detail end ====
INFO: Finished
INFO: 1 build failed
These re the applied patches:
diff --git a/client/Android/Studio/build.gradle b/client/Android/Studio/build.gradle
index 01d2fab33..d7fd120d8 100644
--- a/client/Android/Studio/build.gradle
+++ b/client/Android/Studio/build.gradle
@@ -29,8 +29,6 @@ ext {
println 'COMPILE_SDK: ' + compileSdk
println 'BUILD_TOOLS: ' + buildToolsVersion
println 'VERSION_NAME: ' + versionName
- println 'RELEASE_STORE_FILE: '+ RELEASE_STORE_FILE
- println 'RELEASE_KEY_ALIAS: '+ RELEASE_KEY_ALIAS
println '-----------------------------------------------------------'
}
This one to fix --sysroot (for some reason, gcc is picked and not clang)
diff --git a/cmake/AndroidToolchain.cmake b/cmake/AndroidToolchain.cmake
index d682e28df..fcc47399a 100644
--- a/cmake/AndroidToolchain.cmake
+++ b/cmake/AndroidToolchain.cmake
@@ -1369,6 +1369,10 @@ if( ANDROID_COMPILER_IS_CLANG )
if( BUILD_WITH_ANDROID_NDK )
set( ANDROID_CXX_FLAGS "-gcc-toolchain ${ANDROID_TOOLCHAIN_ROOT} ${ANDROID_CXX_FLAGS}" )
endif()
+else()
+ if( BUILD_WITH_ANDROID_NDK )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} --sysroot=${ANDROID_SYSROOT}" )
+ endif()
endif()
# cache flags
OpenSSL upgrade:
diff --git a/scripts/android-build-32.conf b/scripts/android-build-32.conf
index c2c43d571..c284f816b 100644
--- a/scripts/android-build-32.conf
+++ b/scripts/android-build-32.conf
@@ -18,7 +18,7 @@ NDK_TARGET=14
JPEG_TAG=master
OPENH264_TAG=v1.6.0
-OPENSSL_TAG=OpenSSL_1_1_0c
+OPENSSL_TAG=OpenSSL_1_1_0f
SRC_DIR=$SCRIPT_PATH/..
BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs
diff --git a/scripts/android-build-64.conf b/scripts/android-build-64.conf
index c7f6e81da..1a70b56a1 100644
--- a/scripts/android-build-64.conf
+++ b/scripts/android-build-64.conf
@@ -18,7 +18,7 @@ NDK_TARGET=21
JPEG_TAG=master
OPENH264_TAG=v1.6.0
-OPENSSL_TAG=OpenSSL_1_1_0c
+OPENSSL_TAG=OpenSSL_1_1_0f
SRC_DIR=$SCRIPT_PATH/..
BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs
diff --git a/scripts/android-build.conf b/scripts/android-build.conf
index 04ad66a09..14545b3ff 100644
--- a/scripts/android-build.conf
+++ b/scripts/android-build.conf
@@ -18,7 +18,7 @@ NDK_TARGET=21
JPEG_TAG=master
OPENH264_TAG=v1.6.0
-OPENSSL_TAG=OpenSSL_1_1_0e
+OPENSSL_TAG=OpenSSL_1_1_0f
SRC_DIR=$SCRIPT_PATH/..
BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs
Enable OpenH264 without assembly (Flag --openh264 does not work):
diff --git a/scripts/android-build-32.conf b/scripts/android-build-32.conf
index c2c43d571..36e821e33 100644
--- a/scripts/android-build-32.conf
+++ b/scripts/android-build-32.conf
@@ -10,7 +10,7 @@
# create seperate configurations for each NDK API level
# and architecture you want to support.
WITH_JPEG=0
-WITH_OPENH264=0
+WITH_OPENH264=1
WITH_OPENSSL=1
BUILD_DEPS=1
DEPS_ONLY=0
diff --git a/scripts/android-build-64.conf b/scripts/android-build-64.conf
index c7f6e81da..aafe72fe9 100644
--- a/scripts/android-build-64.conf
+++ b/scripts/android-build-64.conf
@@ -10,7 +10,7 @@
# create seperate configurations for each NDK API level
# and architecture you want to support.
WITH_JPEG=0
-WITH_OPENH264=0
+WITH_OPENH264=1
WITH_OPENSSL=1
BUILD_DEPS=1
DEPS_ONLY=0
diff --git a/scripts/android-build-openh264.sh b/scripts/android-build-openh264.sh
index 76afe5f61..3193414fe 100755
--- a/scripts/android-build-openh264.sh
+++ b/scripts/android-build-openh264.sh
@@ -9,7 +9,7 @@ function build {
BASE=$(pwd)
common_run cd $BUILD_SRC
PATH=$ANDROID_NDK:$PATH
- MAKE="make PATH=$PATH OS=android NDKROOT=$ANDROID_NDK TARGET=android-$2 NDKLEVEL=$2 ARCH=$1 -j libraries"
+ MAKE="make PATH=$PATH OS=android NDKROOT=$ANDROID_NDK TARGET=android-$2 NDKLEVEL=$2 ARCH=$1 ASM=yasm USE_ASM=No -j libraries"
common_run git clean -xdf
common_run export QUIET_AR="$CCACHE "
common_run export QUIET_ASM="$CCACHE "
@ccpp Ok, looks like this is an issue with newer NDK versions, they seem to have changed include/link paths (yet again). My test machine still uses the NDK from debian backports (12b) and with that it works, but not the android studio NDK (16)
@ccpp As for the toolchain stuff, I'm working on a branch https://github.com/akallabeth/freerdp/tree/android_build_update_v2 to integrate the cmake build to gradle (so you only need to build OpenSSL and OpenH264 externally)
@akallabeth Thanks for your hint, downgrading NDK actually worked.
See https://gitlab.com/c7np6r/fdroiddata/commits/contribution-afreerdp for the updated contribution. Do you have any objections against submitting it to FDroid?
@ccpp Ah, good to know :) Actually I wanted to add it to FDroid myself some time ago, but was too busy to complete the whole endeavour (Did have to fix quite a lot of bugs back then).
@akallabeth The app inclusion is submitted at this merge request: https://gitlab.com/fdroid/fdroiddata/merge_requests/2620
@akallabeth Concerning the auto update issue: This can not be done as FreeRDP's gradle is configured currently. Quoting @relan at https://gitlab.com/fdroid/fdroiddata/merge_requests/2620#note_45710461:
Unfortunately, autoupdating won't work. F-Droid can handle only a trivial case when version name and code are constants. FreeRDP uses parameters: https://github.com/FreeRDP/FreeRDP/blob/2.0.0-rc0/client/Android/Studio/aFreeRDP/build.gradle#L12
So, either this must be changed, or new versions have to be added to FDroid manually. Furthermore, in both cases, versionCode must be changed together with versionName.
@ccpp Ah, thank you for this piece of information.
@ccpp I've created a pull that will enable automatic version code generation from the corresponding git tag. This should fix your issue with FDroid versioning. Hope this gets integrated before 2.0.0-rc1
@akallabeth What do you think of this comment at the F-Droid discussion?
They suggest to use the aFreeRDP gradle project, not the parent directory 'Studio.'
It does build, and it includes freeRDPCore project according to console output, so IMHO there should be no problem
@ccpp Well, looks like a FDroid option, so if it then discovers everything correctly it should be ok...
@ccpp Closing this issue as it seems the FDroid stuff is on it's way and does not really need anything from our side anymore?
So, finally it's there. See the "Latest Apps" section at https://f-droid.org/ :)
If you're interested in automatic upgrading, it should be possible as mentioned here: https://github.com/FreeRDP/FreeRDP/pull/4230#issuecomment-346682786
@akallabeth @bmiklautz
There's been no update since two years now... Just noticed you actually released 2.0.0 and 2.1.0.
Would be nice to have it in f-droid ;)
@ccpp created https://gitlab.com/fdroid/fdroiddata/-/merge_requests/6700 but seems like I麓ve missed something in setting up the environment.
So, if anyone has time to check this could get a lot faster ;)
Most helpful comment
So, finally it's there. See the "Latest Apps" section at https://f-droid.org/ :)
If you're interested in automatic upgrading, it should be possible as mentioned here: https://github.com/FreeRDP/FreeRDP/pull/4230#issuecomment-346682786