Hello,
i want to compile supla client because i have renamed the directories. do i need to follow this
cd /usr/src
sudo mkdir openssl
sudo wget https://www.openssl.org/source/openssl- ... ilt.tar.gz
sudo tar zxvf openssl-1.0.1t.tar.gz
cd openssl-1.0.1t
sudo ./config --prefix=/usr/src/openssl shared
*edit Makefile and remove no-ssl2 flags
sudo make depend
sudo make install
sudo cp /usr/src/openssl/lib/*.so /usr/lib/supla-server/
sudo rm -rf cp /usr/src/openssl
then changing headers
and then build_android.sh
supla client compile
-
- Posts: 19474
- Joined: Tue Jan 19, 2016 9:26 am
- Location: Paczków
#!/bin/sh
rm -r openssl-1.0.1t
tar zxvf openssl-1.0.1t.tar.gz
cd openssl-1.0.1t
export NDK=/Users/AC/Devel/projekty/Android/ndk-r10c
$NDK/build/tools/make-standalone-toolchain.sh --platform=android-12 --toolchain=arm-linux-androideabi-4.8 --install-dir=`pwd`/android-toolchain-arm
export TOOLCHAIN_PATH=`pwd`/android-toolchain-arm/bin
export TOOL=arm-linux-androideabi
export NDK_TOOLCHAIN_BASENAME=${TOOLCHAIN_PATH}/${TOOL}
export CC=$NDK_TOOLCHAIN_BASENAME-gcc
export CXX=$NDK_TOOLCHAIN_BASENAME-g++
export LINK=${CXX}
export LD=$NDK_TOOLCHAIN_BASENAME-ld
export AR=$NDK_TOOLCHAIN_BASENAME-ar
export RANLIB=$NDK_TOOLCHAIN_BASENAME-ranlib
export STRIP=$NDK_TOOLCHAIN_BASENAME-strip
export ARCH_FLAGS="-mthumb"
export ARCH_LINK=
export CPPFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 "
export CXXFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions "
export CFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 "
export LDFLAGS=" ${ARCH_LINK} "
./Configure android
PATH=$TOOLCHAIN_PATH:$PATH make
mv lib*.a ../armeabi/
rm -r openssl-1.0.1t
tar zxvf openssl-1.0.1t.tar.gz
cd openssl-1.0.1t
export NDK=/Users/AC/Devel/projekty/Android/ndk-r10c
$NDK/build/tools/make-standalone-toolchain.sh --platform=android-12 --toolchain=arm-linux-androideabi-4.8 --install-dir=`pwd`/android-toolchain-arm
export TOOLCHAIN_PATH=`pwd`/android-toolchain-arm/bin
export TOOL=arm-linux-androideabi
export NDK_TOOLCHAIN_BASENAME=${TOOLCHAIN_PATH}/${TOOL}
export CC=$NDK_TOOLCHAIN_BASENAME-gcc
export CXX=$NDK_TOOLCHAIN_BASENAME-g++
export LINK=${CXX}
export LD=$NDK_TOOLCHAIN_BASENAME-ld
export AR=$NDK_TOOLCHAIN_BASENAME-ar
export RANLIB=$NDK_TOOLCHAIN_BASENAME-ranlib
export STRIP=$NDK_TOOLCHAIN_BASENAME-strip
export ARCH_FLAGS="-mthumb"
export ARCH_LINK=
export CPPFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 "
export CXXFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions "
export CFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 "
export LDFLAGS=" ${ARCH_LINK} "
./Configure android
PATH=$TOOLCHAIN_PATH:$PATH make
mv lib*.a ../armeabi/
-
- Posts: 19474
- Joined: Tue Jan 19, 2016 9:26 am
- Location: Paczków
#!/bin/sh
rm -r openssl-1.0.1t
tar zxvf openssl-1.0.1t.tar.gz
cd openssl-1.0.1t
export NDK=/Users/AC/Devel/projekty/Android/ndk-r10c
$NDK/build/tools/make-standalone-toolchain.sh --platform=android-12 --toolchain=arm-linux-androideabi-4.8 --install-dir=`pwd`/android-toolchain-arm
export TOOLCHAIN_PATH=`pwd`/android-toolchain-arm/bin
export TOOL=arm-linux-androideabi
export NDK_TOOLCHAIN_BASENAME=${TOOLCHAIN_PATH}/${TOOL}
export CC=$NDK_TOOLCHAIN_BASENAME-gcc
export CXX=$NDK_TOOLCHAIN_BASENAME-g++
export LINK=${CXX}
export LD=$NDK_TOOLCHAIN_BASENAME-ld
export AR=$NDK_TOOLCHAIN_BASENAME-ar
export RANLIB=$NDK_TOOLCHAIN_BASENAME-ranlib
export STRIP=$NDK_TOOLCHAIN_BASENAME-strip
export ARCH_FLAGS="-march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16"
export ARCH_LINK="-march=armv7-a -Wl,--fix-cortex-a8"
export CPPFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 "
export CXXFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions "
export CFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 "
export LDFLAGS=" ${ARCH_LINK} "
./Configure android-armv7
PATH=$TOOLCHAIN_PATH:$PATH make
mv lib*.a ../armeabi-v7a/
~
rm -r openssl-1.0.1t
tar zxvf openssl-1.0.1t.tar.gz
cd openssl-1.0.1t
export NDK=/Users/AC/Devel/projekty/Android/ndk-r10c
$NDK/build/tools/make-standalone-toolchain.sh --platform=android-12 --toolchain=arm-linux-androideabi-4.8 --install-dir=`pwd`/android-toolchain-arm
export TOOLCHAIN_PATH=`pwd`/android-toolchain-arm/bin
export TOOL=arm-linux-androideabi
export NDK_TOOLCHAIN_BASENAME=${TOOLCHAIN_PATH}/${TOOL}
export CC=$NDK_TOOLCHAIN_BASENAME-gcc
export CXX=$NDK_TOOLCHAIN_BASENAME-g++
export LINK=${CXX}
export LD=$NDK_TOOLCHAIN_BASENAME-ld
export AR=$NDK_TOOLCHAIN_BASENAME-ar
export RANLIB=$NDK_TOOLCHAIN_BASENAME-ranlib
export STRIP=$NDK_TOOLCHAIN_BASENAME-strip
export ARCH_FLAGS="-march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16"
export ARCH_LINK="-march=armv7-a -Wl,--fix-cortex-a8"
export CPPFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 "
export CXXFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions "
export CFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 "
export LDFLAGS=" ${ARCH_LINK} "
./Configure android-armv7
PATH=$TOOLCHAIN_PATH:$PATH make
mv lib*.a ../armeabi-v7a/
~
-
- Posts: 19474
- Joined: Tue Jan 19, 2016 9:26 am
- Location: Paczków
#!/bin/sh
rm -r openssl-1.0.1t
tar zxvf openssl-1.0.1t.tar.gz
cd openssl-1.0.1t
export NDK=/Users/AC/Devel/projekty/Android/ndk-r10c
$NDK/build/tools/make-standalone-toolchain.sh --platform=android-12 --toolchain=x86-4.6 --install-dir=`pwd`/android-toolchain-x86
export TOOLCHAIN_PATH=`pwd`/android-toolchain-x86/bin
export TOOL=i686-linux-android
export NDK_TOOLCHAIN_BASENAME=${TOOLCHAIN_PATH}/${TOOL}
export CC=$NDK_TOOLCHAIN_BASENAME-gcc
export CXX=$NDK_TOOLCHAIN_BASENAME-g++
export LINK=${CXX}
export LD=$NDK_TOOLCHAIN_BASENAME-ld
export AR=$NDK_TOOLCHAIN_BASENAME-ar
export RANLIB=$NDK_TOOLCHAIN_BASENAME-ranlib
export STRIP=$NDK_TOOLCHAIN_BASENAME-strip
export ARCH_FLAGS="-march=i686 -msse3 -mstackrealign -mfpmath=sse"
export ARCH_LINK=
export CPPFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 "
export CXXFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions "
export CFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 "
export LDFLAGS=" ${ARCH_LINK} "
./Configure android-x86
PATH=$TOOLCHAIN_PATH:$PATH make
mv lib*.a ../x86/
~
rm -r openssl-1.0.1t
tar zxvf openssl-1.0.1t.tar.gz
cd openssl-1.0.1t
export NDK=/Users/AC/Devel/projekty/Android/ndk-r10c
$NDK/build/tools/make-standalone-toolchain.sh --platform=android-12 --toolchain=x86-4.6 --install-dir=`pwd`/android-toolchain-x86
export TOOLCHAIN_PATH=`pwd`/android-toolchain-x86/bin
export TOOL=i686-linux-android
export NDK_TOOLCHAIN_BASENAME=${TOOLCHAIN_PATH}/${TOOL}
export CC=$NDK_TOOLCHAIN_BASENAME-gcc
export CXX=$NDK_TOOLCHAIN_BASENAME-g++
export LINK=${CXX}
export LD=$NDK_TOOLCHAIN_BASENAME-ld
export AR=$NDK_TOOLCHAIN_BASENAME-ar
export RANLIB=$NDK_TOOLCHAIN_BASENAME-ranlib
export STRIP=$NDK_TOOLCHAIN_BASENAME-strip
export ARCH_FLAGS="-march=i686 -msse3 -mstackrealign -mfpmath=sse"
export ARCH_LINK=
export CPPFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 "
export CXXFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions "
export CFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 "
export LDFLAGS=" ${ARCH_LINK} "
./Configure android-x86
PATH=$TOOLCHAIN_PATH:$PATH make
mv lib*.a ../x86/
~
-
- Posts: 19474
- Joined: Tue Jan 19, 2016 9:26 am
- Location: Paczków
Then you must modify paths in
https://github.com/SUPLA/supla-core/blo ... android.sh
and run
./build_android.sh
If you have changed application package names you must modify all function prefixes (Java_org_supla_android_lib_)
https://github.com/SUPLA/supla-core/blo ... ient_jni.c
https://github.com/SUPLA/supla-core/blo ... android.sh
and run
./build_android.sh
If you have changed application package names you must modify all function prefixes (Java_org_supla_android_lib_)
https://github.com/SUPLA/supla-core/blo ... ient_jni.c
-
- Posts: 19474
- Joined: Tue Jan 19, 2016 9:26 am
- Location: Paczków
You can also use precompiled opennssl libraries (*.a) from attachment to build your own libsuplaclient.so library.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 74
- Joined: Mon Jul 03, 2017 2:50 pm
Hi Thankyou Pzygmunt,
Will work on this,
Yes i was trying to change a package name because it was conflicting with the native.
Changing Application Id didn't effect so i change the package name and directories name but because of openssl compiled library it was giving an error. so now i want to change the directory path and prefixes in the jni.c and recompiled the openssl library again. But the code you have shared i need to understand that first
.
Thankyou..
Will work on this,
Yes i was trying to change a package name because it was conflicting with the native.
Changing Application Id didn't effect so i change the package name and directories name but because of openssl compiled library it was giving an error. so now i want to change the directory path and prefixes in the jni.c and recompiled the openssl library again. But the code you have shared i need to understand that first

Thankyou..
-
- Posts: 74
- Joined: Mon Jul 03, 2017 2:50 pm
Hello pzymunt ,
i have compiled new libsuplaclient.so through your given precompiled library with android-ndk-r15c because did not find ndk-r10c version
but while compiling it stopped with an error but file generated successfully in the library i.e. libsuplaclient.so
i just want to confirm is it normal
i have compiled new libsuplaclient.so through your given precompiled library with android-ndk-r15c because did not find ndk-r10c version
but while compiling it stopped with an error but file generated successfully in the library i.e. libsuplaclient.so
i just want to confirm is it normal
-
- Posts: 74
- Joined: Mon Jul 03, 2017 2:50 pm
successfully compiled with 10e version worked with native jni file but when i modify prefixes compilation giving an error
-
- Posts: 74
- Joined: Mon Jul 03, 2017 2:50 pm
i have changed these 3 part everywhere in jni file
suppose: package is : com.website.android
from org/supla/android/lib/SuplaVersionError to com/website/android/lib/SuplaVersionError
Lorg/supla/android/lib/SuplaChannelValue to Lcom/website/android/lib/SuplaChannelValue
Java_org_supla_android_lib_ to Java_com_website_android_lib_
is this correct what i am missing
suppose: package is : com.website.android
from org/supla/android/lib/SuplaVersionError to com/website/android/lib/SuplaVersionError
Lorg/supla/android/lib/SuplaChannelValue to Lcom/website/android/lib/SuplaChannelValue
Java_org_supla_android_lib_ to Java_com_website_android_lib_
is this correct what i am missing