Makefiles for android need to point towards backend, not old sequoia with all that implies, such as changing .mk, makefiles and includes.
Added libCxx11 to the task list with the same logic as libPEpTransport as they work the same.
Added header link to identity_api.cc this is purely for the sake of android studio and not required, but android studio complains about missing headers without it.
Updated Engine_version_code, will move it to a gradle variable later.
Todo:
Investigate why JNI dislikes using identity without a global variable during handshakes.
Cargo.toml.tmp was used to replace the cargo.toml inside of pEpEngineSequoiaBackend, as the entire lib has been updated to generate the proper libraries, this is no longer necessary.
Fixed Cargo's compile arguments, added crate commands to create a .so, will review them later to see if I require "lib".
Commented the compile only for device arch as it is slightly buggy on emulator.
Added Cargo.toml, mostly to generate a static lib so we don't have to link.
Moved libuuid to static lib as it should be.
TODO: Update MakefileTemplate to reflect these changes.
If we do that, the rule will always run. Instead we need to use real files as prerequisites.
Reference: https://www.gnu.org/software/make/manual/make.html#Phony-Targets:
"A phony target should not be a prerequisite of a real target file; if it is, its recipe will be run every time make goes to update that file."
Using assorted changes gotten from Huss we've managed to make it work with a few caveats:
-You need to open android studio via the terminal
-Certain libraries (OpenSSL) needed to be updated
-Rust Tool Chain has to be updated
-New NDK is 25, which changes and removes certain things from the per-architecture make files to the general make file (LD, AR, AS, RANLIB, STRIP)
Make android build use sequoia v1.3.1 instead of 1.3.0 which just includes:
- Fixed a crash resulting from unconstrained, attacker-controlled heap allocations.
Currently is needed to use rust nightly to cross-build the latest sequoia version for Android.
Before building again is needed to run, on the build machine:
rustup default nightly
rustup update nightly
rustup component add rust-src
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android