Compiling Openssl android and libsuplaclient.so

Post Reply
Guigeek
Posts: 6
Joined: Mon Jan 27, 2020 10:53 am

Hello everyone :)

These days i'm trying to make my own supla-android app.
I don't want to conflic my phone with the native Supla Android app, so I need to change the applicationid and repertory in Android Studio.

So, i did the refactor thing for folders, and changed all the directories (org/supla/android -> com/adelo/android for example), same in manifest and gradle.

(for informations, i'm running on Ubuntu 18 x64)

My app keeps crashing on virtual device and i understood i have to generate my own libsuplaclient.so with my directories/applicationid in it.

Image

To preceed, i understood i need to generate files with open-ssl-for-android and then, generate files with supla-core/supla-client/Android/build_android.sh (and edited supla_client_jni.c)

So, i've downloaded from supla github the Open-SSL-for-Android files, edited the build_android.sh with my needs.

All folders are in /home/dev/ , chmod ok

Image



But when i'm running openssl build_android.sh, i've trouble when it comes to patch termios:

Image


This is the header of my build_android.sh:

Code: Select all

#!/bin/sh

WORKDIR=`pwd`"/work"
OPENSSL="openssl-1.0.2r"
OPENSSLURL="https://www.openssl.org/source/openssl-1.0.2r.tar.gz"
NDKDIR="/home/dev/ndk-r14b"
TOOLCHAIN="arm-linux-androideabi-4.8"
PLATFORM="android-12"
archs=(armeabi armeabi-v7a arm64-v8a x86 x86_64)
#archs=(arm64-v8a)
.................
Do you have any idea how to figure this out?

Many thanks and have a good day!
Guigeek
Posts: 6
Joined: Mon Jan 27, 2020 10:53 am

Up, does anybody as an answer, or precompiled Openssl libraries for this project?

I saw someone already as a similar problem here: https://en-forum.supla.org/viewtopic.php?t=2215
User avatar
pzygmunt
Posts: 18207
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Verify your path to android toolchain.
Guigeek
Posts: 6
Joined: Mon Jan 27, 2020 10:53 am

Thanks i'll try to figure it out by searching this way.

I'm a little bit lost since i think my toolchains path is good cause i can build the start of this script.
Just errors with x86 and patching termios.h and signal.h


I'll try me best, thanks for replying.
User avatar
pzygmunt
Posts: 18207
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Any logs ?
Guigeek
Posts: 6
Joined: Mon Jan 27, 2020 10:53 am

pzygmunt wrote: Fri May 08, 2020 2:08 pmAny logs ?
Hi, sorry it's been a while.
My problem was randomly solved, sadly i don't really know what happened. I've tested many things and one time the compilation went smooth...
Post Reply

Return to “Help”