From 7e092212265e25b79ffc2d43c43fde7d75fa6b7a Mon Sep 17 00:00:00 2001 From: fuwa Date: Wed, 28 Aug 2019 19:00:27 +0800 Subject: [PATCH 1/5] update fdroid shell --- script/nix/f-droid-build-shell.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/script/nix/f-droid-build-shell.nix b/script/nix/f-droid-build-shell.nix index 9660b49..cbfbafd 100644 --- a/script/nix/f-droid-build-shell.nix +++ b/script/nix/f-droid-build-shell.nix @@ -5,13 +5,21 @@ with pkgs; let fdroid-python-packages = python-packages: with python-packages; [ - requests + androguard + clint + defusedxml + GitPython + libcloud + mwclient paramiko + pillow + pyasn1 pyasn1-modules - clint + python-vagrant pyyaml - - virtualenvwrapper + qrcode + requests + ruamel_yaml ] ; python-with-fdroid-packages = pkgs.python3.withPackages fdroid-python-packages From 8e67f224ddb0d8532b277caeb17823eff3fcc5da Mon Sep 17 00:00:00 2001 From: fuwa Date: Wed, 6 Nov 2019 13:41:12 +0800 Subject: [PATCH 2/5] use dev-0.7 --- app/CMakeLists.txt | 16 +++++++ app/build.gradle | 12 +++--- external-libs/collect.sh | 2 +- .../android-openssl/build-all-arch.sh | 2 +- script/build-external-libs/build-boost.sh | 2 +- script/build-external-libs/build-libsodium.sh | 2 +- script/build-external-libs/build-wownero.sh | 2 +- script/build-external-libs/collect.sh | 43 +++++++++++++++++-- script/build-external-libs/fetch-wownero.sh | 4 +- script/build-external-libs/patch-wownero.sh | 4 -- .../build-external-libs/post-build-openssl.sh | 2 +- script/build-external-libs/prep-toolchain.sh | 2 +- script/nix/shell.nix | 4 +- 13 files changed, 72 insertions(+), 25 deletions(-) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 22914a5..bb085a9 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -155,6 +155,18 @@ add_library(net STATIC IMPORTED) set_target_properties(net PROPERTIES IMPORTED_LOCATION ${EXTERNAL_LIBS_DIR}/monero/lib/${ANDROID_ABI}/libnet.a) +add_library(hardforks STATIC IMPORTED) +set_target_properties(hardforks PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/monero/lib/${ANDROID_ABI}/libhardforks.a) + +add_library(rpc_base STATIC IMPORTED) +set_target_properties(rpc_base PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/monero/lib/${ANDROID_ABI}/librpc_base.a) + +add_library(blocks STATIC IMPORTED) +set_target_properties(blocks PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/monero/lib/${ANDROID_ABI}/libblocks.a) + ############# # System ############# @@ -189,6 +201,10 @@ target_link_libraries( monerujo multisig version randomx + hardforks + rpc_base + blocks + boost_chrono boost_date_time diff --git a/app/build.gradle b/app/build.gradle index f34a555..2d8cb04 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,8 +10,8 @@ android { // https://source.android.com/security/bulletin/2018-03-01 minSdkVersion 23 targetSdkVersion 28 - versionCode 1220 - versionName '2.6.1.1' + versionCode 1230 + versionName '2.7.0.0' // testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { @@ -50,13 +50,13 @@ android { } } // def abiCodes = ['arm64-v8a': 2] - def abiCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86_64': 4] + def abiCodes = ['arm64-v8a': 2, 'x86_64': 4] splits { abi { enable true reset() // include 'arm64-v8a' - include 'armeabi-v7a', 'arm64-v8a', 'x86_64' + include 'arm64-v8a', 'x86_64' universalApk true } } @@ -68,12 +68,12 @@ android { // abi { // enable true // reset() -// include 'armeabi-v7a', 'arm64-v8a', 'x86_64' +// include 'arm64-v8a', 'x86_64' // universalApk true // } // } // -// abiCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86_64': 4] +// abiCodes = ['arm64-v8a': 2, 'x86_64': 4] // } } // Map for the version code that gives each ABI a value. diff --git a/external-libs/collect.sh b/external-libs/collect.sh index b4ece21..95f64f1 100755 --- a/external-libs/collect.sh +++ b/external-libs/collect.sh @@ -8,7 +8,7 @@ orig_path=$PATH build_root=$EXTERNAL_LIBS_BUILD_ROOT packages=(boost openssl monero libsodium) -archs=(arm arm64 x86_64) +archs=(arm64 x86_64) for arch in ${archs[@]}; do case ${arch} in diff --git a/script/build-external-libs/android-openssl/build-all-arch.sh b/script/build-external-libs/android-openssl/build-all-arch.sh index 149aec4..f9624bd 100755 --- a/script/build-external-libs/android-openssl/build-all-arch.sh +++ b/script/build-external-libs/android-openssl/build-all-arch.sh @@ -8,7 +8,7 @@ set -e rm -rf prebuilt mkdir prebuilt -archs=(arm arm64 x86_64) +archs=(arm64 x86_64) for arch in ${archs[@]}; do xLIB="/lib" diff --git a/script/build-external-libs/build-boost.sh b/script/build-external-libs/build-boost.sh index 6fc0122..217879d 100755 --- a/script/build-external-libs/build-boost.sh +++ b/script/build-external-libs/build-boost.sh @@ -20,7 +20,7 @@ args="--build-type=minimal link=static runtime-link=static --with-chrono \ --toolset=clang-android threading=multi threadapi=pthread target-os=android \ " -archs=(arm arm64 x86_64) +archs=(arm64 x86_64) for arch in ${archs[@]}; do extra_build_flags="" case ${arch} in diff --git a/script/build-external-libs/build-libsodium.sh b/script/build-external-libs/build-libsodium.sh index 0535ebc..68e82ee 100755 --- a/script/build-external-libs/build-libsodium.sh +++ b/script/build-external-libs/build-libsodium.sh @@ -8,7 +8,7 @@ build_root=$EXTERNAL_LIBS_BUILD_ROOT cd $build_root/libsodium ./autogen.sh -archs=(arm arm64 x86_64) +archs=(arm64 x86_64) for arch in ${archs[@]}; do extra_cmake_flags="" case ${arch} in diff --git a/script/build-external-libs/build-wownero.sh b/script/build-external-libs/build-wownero.sh index 1cf586b..25e5c99 100755 --- a/script/build-external-libs/build-wownero.sh +++ b/script/build-external-libs/build-wownero.sh @@ -13,7 +13,7 @@ build_root=$EXTERNAL_LIBS_BUILD_ROOT build_type=release # or debug -archs=(arm arm64 x86_64) +archs=(arm64 x86_64) for arch in ${archs[@]}; do ldflags="" diff --git a/script/build-external-libs/collect.sh b/script/build-external-libs/collect.sh index fb41a05..f0c630c 100755 --- a/script/build-external-libs/collect.sh +++ b/script/build-external-libs/collect.sh @@ -4,9 +4,46 @@ set -e source script/build-external-libs/env.sh +rm -rf external-libs +mkdir external-libs cd external-libs -find . -name "*.a" -exec rm {} \; -find . -name "*.h" -exec rm {} \; +orig_path=$PATH +build_root=$EXTERNAL_LIBS_BUILD_ROOT -./collect.sh +packages=(boost openssl monero libsodium) +archs=(arm64 x86_64) + +for arch in ${archs[@]}; do + case ${arch} in + "arm") + xarch="armeabi-v7a" + ;; + "arm64") + xarch="arm64-v8a" + ;; + "x86") + xarch="x86" + ;; + "x86_64") + xarch="x86_64" + ;; + *) + exit 16 + ;; + esac + + for package in ${packages[@]}; do + OUTPUT_DIR=`pwd`/$package/lib/$xarch + mkdir -p $OUTPUT_DIR + rm -f $OUTPUT_DIR/*.a + cp -a $build_root/build/$package/$arch/lib/*.a $OUTPUT_DIR + + if [ $package = "monero" -a -d "$build_root/build/$package/include" ]; then + rm -rf $OUTPUT_DIR/../../include + cp -a $build_root/build/$package/include $OUTPUT_DIR/../.. + fi + + done +done +exit 0 diff --git a/script/build-external-libs/fetch-wownero.sh b/script/build-external-libs/fetch-wownero.sh index da570df..d9303bf 100755 --- a/script/build-external-libs/fetch-wownero.sh +++ b/script/build-external-libs/fetch-wownero.sh @@ -10,10 +10,8 @@ cd $EXTERNAL_LIBS_BUILD_ROOT # url="$base_dir/vendor/wownero" -# url="https://github.com/wownero/wownero" url="https://github.com/wownero/wownero" -version="v0.6.1.1" -# version="dev-v0.6" +version="dev-v0.7.0" rm -rf wownero diff --git a/script/build-external-libs/patch-wownero.sh b/script/build-external-libs/patch-wownero.sh index 3ba3edd..75f873d 100755 --- a/script/build-external-libs/patch-wownero.sh +++ b/script/build-external-libs/patch-wownero.sh @@ -9,10 +9,6 @@ cd wownero sed -i 's/-Werror/-Wall/g' CMakeLists.txt sed -i 's/program_options locale/program_options/g' CMakeLists.txt -sed -i 's/find_path(ZMQ_INCLUDE_PATH zmq.hpp)//g' CMakeLists.txt -sed -i 's/find_library(ZMQ_LIB zmq)//g' CMakeLists.txt -sed -i 's/message(FATAL_ERROR "Could not find required header zmq.hpp")//g' CMakeLists.txt -sed -i 's/message(FATAL_ERROR "Could not find required libzmq")//g' CMakeLists.txt sed -i 's/bool create_address_file = false/bool create_address_file = true/g' src/wallet/wallet2.h sodium_pattern="find_library(SODIUM_LIBRARY sodium)" diff --git a/script/build-external-libs/post-build-openssl.sh b/script/build-external-libs/post-build-openssl.sh index afad00c..9809941 100755 --- a/script/build-external-libs/post-build-openssl.sh +++ b/script/build-external-libs/post-build-openssl.sh @@ -9,7 +9,7 @@ build_root=$EXTERNAL_LIBS_BUILD_ROOT mkdir -p $build_root/build/openssl/ cp -aL $build_root/android-openssl/openssl-OpenSSL_1_0_2l/include/openssl/ $build_root/build/openssl/include -archs=(arm arm64 x86_64) +archs=(arm64 x86_64) for arch in ${archs[@]}; do mkdir -p $build_root/build/openssl/$arch diff --git a/script/build-external-libs/prep-toolchain.sh b/script/build-external-libs/prep-toolchain.sh index f5e25a8..e839f56 100755 --- a/script/build-external-libs/prep-toolchain.sh +++ b/script/build-external-libs/prep-toolchain.sh @@ -8,7 +8,7 @@ build_root=$EXTERNAL_LIBS_BUILD_ROOT PATH=$ANDROID_NDK_ROOT/build/tools/:$PATH args="--api 23 --stl=libc++" -archs=(arm arm64 x86_64) +archs=(arm64 x86_64) for arch in ${archs[@]}; do diff --git a/script/nix/shell.nix b/script/nix/shell.nix index bea77cb..d19f32d 100644 --- a/script/nix/shell.nix +++ b/script/nix/shell.nix @@ -94,8 +94,8 @@ with nixpkgs; export _JAVA_AWT_WM_NONREPARENTING=1 - export app_version=1220 - export gradle_app_version=2x6x1x1 + export app_version=1230 + export gradle_app_version=2x7x0x0 export release_key=~/.android/fuwa-release-key.jks export USE_CCACHE=1 From f2268c507e8e4a67f0679e3934a6806133ddaed7 Mon Sep 17 00:00:00 2001 From: fuwa Date: Thu, 7 Nov 2019 14:42:02 +0000 Subject: [PATCH 3/5] remove external-libs from source code --- .gitignore | 3 +- external-libs/.gitignore | 1 - external-libs/boost/lib/arm64-v8a/.gitignore | 4 -- .../boost/lib/armeabi-v7a/.gitignore | 4 -- external-libs/boost/lib/x86/.gitignore | 4 -- external-libs/boost/lib/x86_64/.gitignore | 4 -- external-libs/collect.sh | 46 ------------------- external-libs/monero/lib/arm64-v8a/.gitignore | 4 -- .../monero/lib/armeabi-v7a/.gitignore | 4 -- external-libs/monero/lib/x86/.gitignore | 4 -- external-libs/monero/lib/x86_64/.gitignore | 4 -- .../openssl/lib/arm64-v8a/.gitignore | 4 -- .../openssl/lib/armeabi-v7a/.gitignore | 4 -- external-libs/openssl/lib/x86/.gitignore | 4 -- external-libs/openssl/lib/x86_64/.gitignore | 4 -- 15 files changed, 1 insertion(+), 97 deletions(-) delete mode 100644 external-libs/.gitignore delete mode 100644 external-libs/boost/lib/arm64-v8a/.gitignore delete mode 100644 external-libs/boost/lib/armeabi-v7a/.gitignore delete mode 100644 external-libs/boost/lib/x86/.gitignore delete mode 100644 external-libs/boost/lib/x86_64/.gitignore delete mode 100755 external-libs/collect.sh delete mode 100644 external-libs/monero/lib/arm64-v8a/.gitignore delete mode 100644 external-libs/monero/lib/armeabi-v7a/.gitignore delete mode 100644 external-libs/monero/lib/x86/.gitignore delete mode 100644 external-libs/monero/lib/x86_64/.gitignore delete mode 100644 external-libs/openssl/lib/arm64-v8a/.gitignore delete mode 100644 external-libs/openssl/lib/armeabi-v7a/.gitignore delete mode 100644 external-libs/openssl/lib/x86/.gitignore delete mode 100644 external-libs/openssl/lib/x86_64/.gitignore diff --git a/.gitignore b/.gitignore index 5621815..6921ce0 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ opt vendor -external-libs/monero -external-libs/libsodium +external-libs tmp builder diff --git a/external-libs/.gitignore b/external-libs/.gitignore deleted file mode 100644 index d579dbe..0000000 --- a/external-libs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -boost diff --git a/external-libs/boost/lib/arm64-v8a/.gitignore b/external-libs/boost/lib/arm64-v8a/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/external-libs/boost/lib/arm64-v8a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/external-libs/boost/lib/armeabi-v7a/.gitignore b/external-libs/boost/lib/armeabi-v7a/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/external-libs/boost/lib/armeabi-v7a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/external-libs/boost/lib/x86/.gitignore b/external-libs/boost/lib/x86/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/external-libs/boost/lib/x86/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/external-libs/boost/lib/x86_64/.gitignore b/external-libs/boost/lib/x86_64/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/external-libs/boost/lib/x86_64/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/external-libs/collect.sh b/external-libs/collect.sh deleted file mode 100755 index 95f64f1..0000000 --- a/external-libs/collect.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# -# -D BOOST_ROOT=/opt/android/boost_1_58_0 - -set -e - -orig_path=$PATH -build_root=$EXTERNAL_LIBS_BUILD_ROOT - -packages=(boost openssl monero libsodium) -archs=(arm64 x86_64) - -for arch in ${archs[@]}; do - case ${arch} in - "arm") - xarch="armeabi-v7a" - ;; - "arm64") - xarch="arm64-v8a" - ;; - "x86") - xarch="x86" - ;; - "x86_64") - xarch="x86_64" - ;; - *) - exit 16 - ;; - esac - - for package in ${packages[@]}; do - OUTPUT_DIR=`pwd`/$package/lib/$xarch - mkdir -p $OUTPUT_DIR - rm -f $OUTPUT_DIR/*.a - cp -a $build_root/build/$package/$arch/lib/*.a $OUTPUT_DIR - - if [ $package = "monero" -a -d "$build_root/build/$package/include" ]; then - rm -rf $OUTPUT_DIR/../../include - cp -a $build_root/build/$package/include $OUTPUT_DIR/../.. - fi - - done -done -exit 0 - diff --git a/external-libs/monero/lib/arm64-v8a/.gitignore b/external-libs/monero/lib/arm64-v8a/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/external-libs/monero/lib/arm64-v8a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/external-libs/monero/lib/armeabi-v7a/.gitignore b/external-libs/monero/lib/armeabi-v7a/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/external-libs/monero/lib/armeabi-v7a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/external-libs/monero/lib/x86/.gitignore b/external-libs/monero/lib/x86/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/external-libs/monero/lib/x86/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/external-libs/monero/lib/x86_64/.gitignore b/external-libs/monero/lib/x86_64/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/external-libs/monero/lib/x86_64/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/external-libs/openssl/lib/arm64-v8a/.gitignore b/external-libs/openssl/lib/arm64-v8a/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/external-libs/openssl/lib/arm64-v8a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/external-libs/openssl/lib/armeabi-v7a/.gitignore b/external-libs/openssl/lib/armeabi-v7a/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/external-libs/openssl/lib/armeabi-v7a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/external-libs/openssl/lib/x86/.gitignore b/external-libs/openssl/lib/x86/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/external-libs/openssl/lib/x86/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/external-libs/openssl/lib/x86_64/.gitignore b/external-libs/openssl/lib/x86_64/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/external-libs/openssl/lib/x86_64/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore From b8d650482689bf1098077cdd4febeac4f820cc27 Mon Sep 17 00:00:00 2001 From: fuwa Date: Mon, 11 Nov 2019 20:15:09 +0800 Subject: [PATCH 4/5] update height --- .../main/java/com/wownero/wownerujo/util/RestoreHeight.java | 4 ++++ app/src/main/res/values/strings.xml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/wownero/wownerujo/util/RestoreHeight.java b/app/src/main/java/com/wownero/wownerujo/util/RestoreHeight.java index 52c217c..47c961f 100644 --- a/app/src/main/java/com/wownero/wownerujo/util/RestoreHeight.java +++ b/app/src/main/java/com/wownero/wownerujo/util/RestoreHeight.java @@ -57,6 +57,10 @@ public class RestoreHeight { blockheight.put("2019-04", 93000L); blockheight.put("2019-05", 101000L); blockheight.put("2019-06", 110000L); + blockheight.put("2019-07", 119000L); + blockheight.put("2019-08", 128000L); + blockheight.put("2019-09", 137000L); + blockheight.put("2019-10", 146000L); } long latestHeight = 77000L; diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 46ddb7d..ff26e63 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -373,7 +373,7 @@ Send all confirmed funds in this account! Subaddress #%1$d Public Subaddress #%1$d - 2019-06 + 2019-10 Language Use System Language From e1fcb2c41930e338dd748860f94b730e5b8d94da Mon Sep 17 00:00:00 2001 From: fuwa Date: Tue, 12 Nov 2019 15:58:08 +0800 Subject: [PATCH 5/5] use v0.7.0 tag --- script/build-external-libs/fetch-wownero.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/build-external-libs/fetch-wownero.sh b/script/build-external-libs/fetch-wownero.sh index d9303bf..10f8c2b 100755 --- a/script/build-external-libs/fetch-wownero.sh +++ b/script/build-external-libs/fetch-wownero.sh @@ -11,7 +11,7 @@ cd $EXTERNAL_LIBS_BUILD_ROOT # url="$base_dir/vendor/wownero" url="https://github.com/wownero/wownero" -version="dev-v0.7.0" +version="v0.7.0" rm -rf wownero