Open Giszmo opened 3 years ago
@Giszmo - we did look at this as to how to make the wallet reproducible but had some issues before we could do that. @AliMeer will look into this and connect with you.
@Giszmo Thanks for your interest and apologies you couldn’t build the project. I have made a note to include release build instructions in the read me.
Regarding verifying the play store apk, we do all our release builds in appcentre which is configured with the build steps and environment information, it also pushes our builds for publishing to Play Store. I can add you to our AppCentre team and you will be able to build the app the same way the play store apk is built. You will also be able to review the build process in detail. Please let me know if this seems like a viable option.
If that doesn’t work for you we can look to provide you with information to build the app.
I can add you to our AppCentre team and you will be able to build the app the same way the play store apk is built. You will also be able to review the build process in detail. Please let me know if this seems like a viable option.
The point is public auditability. Is there not a way to share the build script in the scope of general build instructions?
@Giszmo I checked our build config the dev flavour of our app can be built in debug mode. The build script to create a release apk of our production version is not in the project.
I will add this to the project and add instructions on how to build it. I can’t specify a ETA for this right now but it will be done soon.
On a side note, I did 2 builds one after the other on AppCentre to see if they are the same. using Android APK analyser I could still see some differences; very tiny differences in a couple of auto generated files. I am keen to understand if you will be using APK analyser to verify builds or will it be a straight diff
comparison of binaries, or something else.
I will add this to the project and add instructions on how to build it. I can’t specify a ETA for this right now but it will be done soon.
No rush. Just make sure to update this issue here so I get a notification. You can also open an issue on WalletScrutiny's GitLab but please only if I don't react within 2 days.
I am keen to understand if you will be using APK analyser to verify builds or will it be a straight diff comparison of binaries, or something else.
I use apktool but am thinking of just unzipping the apk from my build and from Google Play. Then I do a folder diff. This diff may only contain signature related files. Look at this wallet's Analysis to see an acceptable diff.
Once these 2 issues are done we need to do builds via command line and verify if they are reproducible and then mark this issue as fixed.
Is this issue still unresolved? It's been a while since last activity.
Opened issue regarding pod error (which can be ignored) at: https://github.com/bithyve/hexa/issues/5911 Missing .env.example file at: https://github.com/bithyve/hexa/issues/5910
Containerfile was based on some changes made in not merged PR: https://github.com/bithyve/hexa/pull/5909 which is helpful as it bring option to compile the app with fastlane and contain needed patch for build.gradle file
compiling latest version with:
podman build --rm -t hexa_build_apk_dev -f Containerfile
FROM debian:sid-slim
RUN set -ex; \
apt-get update; \
DEBIAN_FRONTEND=noninteractive apt-get install --yes -o APT::Install-Suggests=false --no-install-recommends \
git \
yarnpkg \
node-gyp \
openjdk-11-jdk ; \
rm -rf /var/lib/apt/lists/*; \
useradd -ms /bin/bash appuser;
USER appuser
ENV ANDROID_SDK_ROOT="/home/appuser/app/sdk" \
ANDROID_HOME="/home/appuser/app/sdk" \
NODE_ENV="development"
RUN set -ex; \
mkdir -p "/home/appuser/app/sdk/licenses" "/home/appuser/app/hexa2/"; \
printf "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > "/home/appuser/app/sdk/licenses/android-sdk-license"; \
cd /home/appuser/app/hexa2/; \
git clone https://github.com/bithyve/hexa.git; \
cd hexa; \
git checkout v2.0.80;
WORKDIR /home/appuser/app/hexa2/hexa/
in container:
podman run --rm -uroot --name hexa_build_apk_dev -ti hexa_build_apk_dev
Commands to run in container: (ignore the pod not found error
)
yarnpkg install;
cd android;
then add below code at bottom of build.gradle
file (which is in android
directory):
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 30
buildToolsVersion "30.0.1"
}
}
}
}
Then run command ./gradlew assembleRelease
and if it fail (likely if node version is not LTS), run the command:
NODE_OPTIONS=--openssl-legacy-provider ./gradlew assembleRelease
which will generate APK at:
./android/app/build/outputs/apk/production/release/app-production-release-unsigned.apk
comparing it to APK on github at https://github.com/bithyve/hexa/releases/download/v2.0.80/Hexa_Wallet_2.0_Android_v2.0.80.apk with diff --recursive --brief
Files ./LocalBuild/AndroidManifest.xml and ./FromGithub/AndroidManifest.xml differ
Only in ./FromGithub/META-INF: EXTRACTO.RSA
Only in ./FromGithub/META-INF: EXTRACTO.SF
Files ./LocalBuild/META-INF/MANIFEST.MF and ./FromGithub/META-INF/MANIFEST.MF differ
Files ./LocalBuild/assets/index.android.bundle and ./FromGithub/assets/index.android.bundle differ
Files ./LocalBuild/classes.dex and ./FromGithub/classes.dex differ
Files ./LocalBuild/classes2.dex and ./FromGithub/classes2.dex differ
Files ./LocalBuild/classes3.dex and ./FromGithub/classes3.dex differ
Files ./LocalBuild/lib/arm64-v8a/libc++_shared.so and ./FromGithub/lib/arm64-v8a/libc++_shared.so differ
Files ./LocalBuild/lib/arm64-v8a/libcrashlytics-common.so and ./FromGithub/lib/arm64-v8a/libcrashlytics-common.so differ
Files ./LocalBuild/lib/arm64-v8a/libcrashlytics-handler.so and ./FromGithub/lib/arm64-v8a/libcrashlytics-handler.so differ
Files ./LocalBuild/lib/arm64-v8a/libcrashlytics-trampoline.so and ./FromGithub/lib/arm64-v8a/libcrashlytics-trampoline.so differ
Files ./LocalBuild/lib/arm64-v8a/libcrashlytics.so and ./FromGithub/lib/arm64-v8a/libcrashlytics.so differ
Files ./LocalBuild/lib/arm64-v8a/libfb.so and ./FromGithub/lib/arm64-v8a/libfb.so differ
Files ./LocalBuild/lib/arm64-v8a/libfbjni.so and ./FromGithub/lib/arm64-v8a/libfbjni.so differ
Files ./LocalBuild/lib/arm64-v8a/libfolly_futures.so and ./FromGithub/lib/arm64-v8a/libfolly_futures.so differ
Files ./LocalBuild/lib/arm64-v8a/libfolly_json.so and ./FromGithub/lib/arm64-v8a/libfolly_json.so differ
Files ./LocalBuild/lib/arm64-v8a/libgifimage.so and ./FromGithub/lib/arm64-v8a/libgifimage.so differ
Files ./LocalBuild/lib/arm64-v8a/libglog.so and ./FromGithub/lib/arm64-v8a/libglog.so differ
Files ./LocalBuild/lib/arm64-v8a/libglog_init.so and ./FromGithub/lib/arm64-v8a/libglog_init.so differ
Files ./LocalBuild/lib/arm64-v8a/libhermes-executor-debug.so and ./FromGithub/lib/arm64-v8a/libhermes-executor-debug.so differ
Files ./LocalBuild/lib/arm64-v8a/libhermes-executor-release.so and ./FromGithub/lib/arm64-v8a/libhermes-executor-release.so differ
Files ./LocalBuild/lib/arm64-v8a/libhermes-inspector.so and ./FromGithub/lib/arm64-v8a/libhermes-inspector.so differ
Files ./LocalBuild/lib/arm64-v8a/libimagepipeline.so and ./FromGithub/lib/arm64-v8a/libimagepipeline.so differ
Files ./LocalBuild/lib/arm64-v8a/libjsc.so and ./FromGithub/lib/arm64-v8a/libjsc.so differ
Files ./LocalBuild/lib/arm64-v8a/libjscexecutor.so and ./FromGithub/lib/arm64-v8a/libjscexecutor.so differ
Files ./LocalBuild/lib/arm64-v8a/libjsijniprofiler.so and ./FromGithub/lib/arm64-v8a/libjsijniprofiler.so differ
Files ./LocalBuild/lib/arm64-v8a/libjsinspector.so and ./FromGithub/lib/arm64-v8a/libjsinspector.so differ
Files ./LocalBuild/lib/arm64-v8a/libnative-filters.so and ./FromGithub/lib/arm64-v8a/libnative-filters.so differ
Files ./LocalBuild/lib/arm64-v8a/libnative-imagetranscoder.so and ./FromGithub/lib/arm64-v8a/libnative-imagetranscoder.so differ
Files ./LocalBuild/lib/arm64-v8a/libreactnativeblob.so and ./FromGithub/lib/arm64-v8a/libreactnativeblob.so differ
Files ./LocalBuild/lib/arm64-v8a/libreactnativejni.so and ./FromGithub/lib/arm64-v8a/libreactnativejni.so differ
Files ./LocalBuild/lib/arm64-v8a/libstatic-webp.so and ./FromGithub/lib/arm64-v8a/libstatic-webp.so differ
Files ./LocalBuild/lib/arm64-v8a/libtool-checker.so and ./FromGithub/lib/arm64-v8a/libtool-checker.so differ
Files ./LocalBuild/lib/arm64-v8a/libyoga.so and ./FromGithub/lib/arm64-v8a/libyoga.so differ
Files ./LocalBuild/lib/armeabi-v7a/libc++_shared.so and ./FromGithub/lib/armeabi-v7a/libc++_shared.so differ
Files ./LocalBuild/lib/armeabi-v7a/libcrashlytics-common.so and ./FromGithub/lib/armeabi-v7a/libcrashlytics-common.so differ
Files ./LocalBuild/lib/armeabi-v7a/libcrashlytics-handler.so and ./FromGithub/lib/armeabi-v7a/libcrashlytics-handler.so differ
Files ./LocalBuild/lib/armeabi-v7a/libcrashlytics-trampoline.so and ./FromGithub/lib/armeabi-v7a/libcrashlytics-trampoline.so differ
Files ./LocalBuild/lib/armeabi-v7a/libcrashlytics.so and ./FromGithub/lib/armeabi-v7a/libcrashlytics.so differ
Files ./LocalBuild/lib/armeabi-v7a/libfb.so and ./FromGithub/lib/armeabi-v7a/libfb.so differ
Files ./LocalBuild/lib/armeabi-v7a/libfbjni.so and ./FromGithub/lib/armeabi-v7a/libfbjni.so differ
Files ./LocalBuild/lib/armeabi-v7a/libfolly_futures.so and ./FromGithub/lib/armeabi-v7a/libfolly_futures.so differ
Files ./LocalBuild/lib/armeabi-v7a/libfolly_json.so and ./FromGithub/lib/armeabi-v7a/libfolly_json.so differ
Files ./LocalBuild/lib/armeabi-v7a/libgifimage.so and ./FromGithub/lib/armeabi-v7a/libgifimage.so differ
Files ./LocalBuild/lib/armeabi-v7a/libglog.so and ./FromGithub/lib/armeabi-v7a/libglog.so differ
Files ./LocalBuild/lib/armeabi-v7a/libglog_init.so and ./FromGithub/lib/armeabi-v7a/libglog_init.so differ
Files ./LocalBuild/lib/armeabi-v7a/libhermes-executor-debug.so and ./FromGithub/lib/armeabi-v7a/libhermes-executor-debug.so differ
Files ./LocalBuild/lib/armeabi-v7a/libhermes-executor-release.so and ./FromGithub/lib/armeabi-v7a/libhermes-executor-release.so differ
Files ./LocalBuild/lib/armeabi-v7a/libhermes-inspector.so and ./FromGithub/lib/armeabi-v7a/libhermes-inspector.so differ
Files ./LocalBuild/lib/armeabi-v7a/libimagepipeline.so and ./FromGithub/lib/armeabi-v7a/libimagepipeline.so differ
Files ./LocalBuild/lib/armeabi-v7a/libjsc.so and ./FromGithub/lib/armeabi-v7a/libjsc.so differ
Files ./LocalBuild/lib/armeabi-v7a/libjscexecutor.so and ./FromGithub/lib/armeabi-v7a/libjscexecutor.so differ
Files ./LocalBuild/lib/armeabi-v7a/libjsijniprofiler.so and ./FromGithub/lib/armeabi-v7a/libjsijniprofiler.so differ
Files ./LocalBuild/lib/armeabi-v7a/libjsinspector.so and ./FromGithub/lib/armeabi-v7a/libjsinspector.so differ
Files ./LocalBuild/lib/armeabi-v7a/libnative-filters.so and ./FromGithub/lib/armeabi-v7a/libnative-filters.so differ
Files ./LocalBuild/lib/armeabi-v7a/libnative-imagetranscoder.so and ./FromGithub/lib/armeabi-v7a/libnative-imagetranscoder.so differ
Files ./LocalBuild/lib/armeabi-v7a/libreactnativeblob.so and ./FromGithub/lib/armeabi-v7a/libreactnativeblob.so differ
Files ./LocalBuild/lib/armeabi-v7a/libreactnativejni.so and ./FromGithub/lib/armeabi-v7a/libreactnativejni.so differ
Files ./LocalBuild/lib/armeabi-v7a/libstatic-webp.so and ./FromGithub/lib/armeabi-v7a/libstatic-webp.so differ
Files ./LocalBuild/lib/armeabi-v7a/libtool-checker.so and ./FromGithub/lib/armeabi-v7a/libtool-checker.so differ
Files ./LocalBuild/lib/armeabi-v7a/libyoga.so and ./FromGithub/lib/armeabi-v7a/libyoga.so differ
Files ./LocalBuild/lib/x86/libc++_shared.so and ./FromGithub/lib/x86/libc++_shared.so differ
Files ./LocalBuild/lib/x86/libcrashlytics-common.so and ./FromGithub/lib/x86/libcrashlytics-common.so differ
Files ./LocalBuild/lib/x86/libcrashlytics-handler.so and ./FromGithub/lib/x86/libcrashlytics-handler.so differ
Files ./LocalBuild/lib/x86/libcrashlytics-trampoline.so and ./FromGithub/lib/x86/libcrashlytics-trampoline.so differ
Files ./LocalBuild/lib/x86/libcrashlytics.so and ./FromGithub/lib/x86/libcrashlytics.so differ
Files ./LocalBuild/lib/x86/libfb.so and ./FromGithub/lib/x86/libfb.so differ
Files ./LocalBuild/lib/x86/libfbjni.so and ./FromGithub/lib/x86/libfbjni.so differ
Files ./LocalBuild/lib/x86/libfolly_futures.so and ./FromGithub/lib/x86/libfolly_futures.so differ
Files ./LocalBuild/lib/x86/libfolly_json.so and ./FromGithub/lib/x86/libfolly_json.so differ
Files ./LocalBuild/lib/x86/libgifimage.so and ./FromGithub/lib/x86/libgifimage.so differ
Files ./LocalBuild/lib/x86/libglog.so and ./FromGithub/lib/x86/libglog.so differ
Files ./LocalBuild/lib/x86/libglog_init.so and ./FromGithub/lib/x86/libglog_init.so differ
Files ./LocalBuild/lib/x86/libhermes-executor-debug.so and ./FromGithub/lib/x86/libhermes-executor-debug.so differ
Files ./LocalBuild/lib/x86/libhermes-executor-release.so and ./FromGithub/lib/x86/libhermes-executor-release.so differ
Files ./LocalBuild/lib/x86/libhermes-inspector.so and ./FromGithub/lib/x86/libhermes-inspector.so differ
Files ./LocalBuild/lib/x86/libimagepipeline.so and ./FromGithub/lib/x86/libimagepipeline.so differ
Files ./LocalBuild/lib/x86/libjsc.so and ./FromGithub/lib/x86/libjsc.so differ
Files ./LocalBuild/lib/x86/libjscexecutor.so and ./FromGithub/lib/x86/libjscexecutor.so differ
Files ./LocalBuild/lib/x86/libjsijniprofiler.so and ./FromGithub/lib/x86/libjsijniprofiler.so differ
Files ./LocalBuild/lib/x86/libjsinspector.so and ./FromGithub/lib/x86/libjsinspector.so differ
Files ./LocalBuild/lib/x86/libnative-filters.so and ./FromGithub/lib/x86/libnative-filters.so differ
Files ./LocalBuild/lib/x86/libnative-imagetranscoder.so and ./FromGithub/lib/x86/libnative-imagetranscoder.so differ
Files ./LocalBuild/lib/x86/libreactnativeblob.so and ./FromGithub/lib/x86/libreactnativeblob.so differ
Files ./LocalBuild/lib/x86/libreactnativejni.so and ./FromGithub/lib/x86/libreactnativejni.so differ
Files ./LocalBuild/lib/x86/libstatic-webp.so and ./FromGithub/lib/x86/libstatic-webp.so differ
Files ./LocalBuild/lib/x86/libtool-checker.so and ./FromGithub/lib/x86/libtool-checker.so differ
Files ./LocalBuild/lib/x86/libyoga.so and ./FromGithub/lib/x86/libyoga.so differ
Files ./LocalBuild/lib/x86_64/libc++_shared.so and ./FromGithub/lib/x86_64/libc++_shared.so differ
Files ./LocalBuild/lib/x86_64/libcrashlytics-common.so and ./FromGithub/lib/x86_64/libcrashlytics-common.so differ
Files ./LocalBuild/lib/x86_64/libcrashlytics-handler.so and ./FromGithub/lib/x86_64/libcrashlytics-handler.so differ
Files ./LocalBuild/lib/x86_64/libcrashlytics-trampoline.so and ./FromGithub/lib/x86_64/libcrashlytics-trampoline.so differ
Files ./LocalBuild/lib/x86_64/libcrashlytics.so and ./FromGithub/lib/x86_64/libcrashlytics.so differ
Files ./LocalBuild/lib/x86_64/libfb.so and ./FromGithub/lib/x86_64/libfb.so differ
Files ./LocalBuild/lib/x86_64/libfbjni.so and ./FromGithub/lib/x86_64/libfbjni.so differ
Files ./LocalBuild/lib/x86_64/libfolly_futures.so and ./FromGithub/lib/x86_64/libfolly_futures.so differ
Files ./LocalBuild/lib/x86_64/libfolly_json.so and ./FromGithub/lib/x86_64/libfolly_json.so differ
Files ./LocalBuild/lib/x86_64/libgifimage.so and ./FromGithub/lib/x86_64/libgifimage.so differ
Files ./LocalBuild/lib/x86_64/libglog.so and ./FromGithub/lib/x86_64/libglog.so differ
Files ./LocalBuild/lib/x86_64/libglog_init.so and ./FromGithub/lib/x86_64/libglog_init.so differ
Files ./LocalBuild/lib/x86_64/libhermes-executor-debug.so and ./FromGithub/lib/x86_64/libhermes-executor-debug.so differ
Files ./LocalBuild/lib/x86_64/libhermes-executor-release.so and ./FromGithub/lib/x86_64/libhermes-executor-release.so differ
Files ./LocalBuild/lib/x86_64/libhermes-inspector.so and ./FromGithub/lib/x86_64/libhermes-inspector.so differ
Files ./LocalBuild/lib/x86_64/libimagepipeline.so and ./FromGithub/lib/x86_64/libimagepipeline.so differ
Files ./LocalBuild/lib/x86_64/libjsc.so and ./FromGithub/lib/x86_64/libjsc.so differ
Files ./LocalBuild/lib/x86_64/libjscexecutor.so and ./FromGithub/lib/x86_64/libjscexecutor.so differ
Files ./LocalBuild/lib/x86_64/libjsijniprofiler.so and ./FromGithub/lib/x86_64/libjsijniprofiler.so differ
Files ./LocalBuild/lib/x86_64/libjsinspector.so and ./FromGithub/lib/x86_64/libjsinspector.so differ
Files ./LocalBuild/lib/x86_64/libnative-filters.so and ./FromGithub/lib/x86_64/libnative-filters.so differ
Files ./LocalBuild/lib/x86_64/libnative-imagetranscoder.so and ./FromGithub/lib/x86_64/libnative-imagetranscoder.so differ
Files ./LocalBuild/lib/x86_64/libreactnativeblob.so and ./FromGithub/lib/x86_64/libreactnativeblob.so differ
Files ./LocalBuild/lib/x86_64/libreactnativejni.so and ./FromGithub/lib/x86_64/libreactnativejni.so differ
Files ./LocalBuild/lib/x86_64/libstatic-webp.so and ./FromGithub/lib/x86_64/libstatic-webp.so differ
Files ./LocalBuild/lib/x86_64/libtool-checker.so and ./FromGithub/lib/x86_64/libtool-checker.so differ
Files ./LocalBuild/lib/x86_64/libyoga.so and ./FromGithub/lib/x86_64/libyoga.so differ
Files ./LocalBuild/res/drawable-anydpi-v21/design_ic_visibility.xml and ./FromGithub/res/drawable-anydpi-v21/design_ic_visibility.xml differ
Files ./LocalBuild/res/drawable-v21/$avd_hide_password__0.xml and ./FromGithub/res/drawable-v21/$avd_hide_password__0.xml differ
Files ./LocalBuild/res/drawable-v21/$avd_hide_password__1.xml and ./FromGithub/res/drawable-v21/$avd_hide_password__1.xml differ
Files ./LocalBuild/res/drawable-v21/$avd_show_password__0.xml and ./FromGithub/res/drawable-v21/$avd_show_password__0.xml differ
Files ./LocalBuild/res/drawable-v21/$avd_show_password__1.xml and ./FromGithub/res/drawable-v21/$avd_show_password__1.xml differ
Files ./LocalBuild/res/layout/abc_action_mode_close_item_material.xml and ./FromGithub/res/layout/abc_action_mode_close_item_material.xml differ
Files ./LocalBuild/res/layout/abc_screen_toolbar.xml and ./FromGithub/res/layout/abc_screen_toolbar.xml differ
Files ./LocalBuild/res/layout/abc_search_view.xml and ./FromGithub/res/layout/abc_search_view.xml differ
Files ./LocalBuild/res/layout/design_bottom_sheet_dialog.xml and ./FromGithub/res/layout/design_bottom_sheet_dialog.xml differ
Files ./LocalBuild/res/layout/mtrl_calendar_month_navigation.xml and ./FromGithub/res/layout/mtrl_calendar_month_navigation.xml differ
Files ./LocalBuild/res/layout/mtrl_picker_actions.xml and ./FromGithub/res/layout/mtrl_picker_actions.xml differ
Files ./LocalBuild/res/layout/mtrl_picker_header_fullscreen.xml and ./FromGithub/res/layout/mtrl_picker_header_fullscreen.xml differ
Files ./LocalBuild/res/layout/mtrl_picker_text_input_date.xml and ./FromGithub/res/layout/mtrl_picker_text_input_date.xml differ
Files ./LocalBuild/res/layout/mtrl_picker_text_input_date_range.xml and ./FromGithub/res/layout/mtrl_picker_text_input_date_range.xml differ
Files ./LocalBuild/res/layout/redbox_view.xml and ./FromGithub/res/layout/redbox_view.xml differ
Files ./LocalBuild/res/layout/test_action_chip.xml and ./FromGithub/res/layout/test_action_chip.xml differ
Files ./LocalBuild/res/layout/test_reflow_chipgroup.xml and ./FromGithub/res/layout/test_reflow_chipgroup.xml differ
Files ./LocalBuild/res/layout-v26/abc_screen_toolbar.xml and ./FromGithub/res/layout-v26/abc_screen_toolbar.xml differ
Only in ./FromGithub/res/xml: splits0.xml
Files ./LocalBuild/resources.arsc and ./FromGithub/resources.arsc differ
Any updates on this?
Hello, it's 2024, just thought I'd re-open this for re-verification.
Heyy, keraliss here from walletscrutiny. I tried to build the wallet, and faced some error. I made this dockerfile
# Use an official OpenJDK image with Java 11
FROM openjdk:11-jdk AS builder
# Install required packages and dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
wget \
git \
unzip \
lib32stdc++6 \
lib32z1 \
build-essential \
ruby \
ruby-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Install Node.js (version 18.x or later) and Yarn
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs && \
npm install -g yarn && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Install CocoaPods
RUN gem install cocoapods
# Create Android SDK directory
RUN mkdir -p /usr/local/android-sdk/cmdline-tools
# Set environment variables for Android SDK
ENV ANDROID_SDK_ROOT /usr/local/android-sdk
ENV PATH ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin:${ANDROID_SDK_ROOT}/platform-tools:$PATH
# Download and install Android SDK command line tools
RUN cd ${ANDROID_SDK_ROOT}/cmdline-tools && \
wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip -O tools.zip && \
unzip tools.zip -d ${ANDROID_SDK_ROOT}/cmdline-tools && \
mv ${ANDROID_SDK_ROOT}/cmdline-tools/cmdline-tools ${ANDROID_SDK_ROOT}/cmdline-tools/latest && \
rm tools.zip
# Install Android SDK components and accept licenses
RUN yes | sdkmanager --licenses && \
sdkmanager "platform-tools" "platforms;android-33" "build-tools;33.0.0"
# Find and set the correct JAVA_HOME
RUN java_path=$(readlink -f /usr/bin/java | sed "s:bin/java::") && \
echo "export JAVA_HOME=$java_path" >> /etc/environment && \
echo "JAVA_HOME=$java_path" >> /etc/environment
# Source the environment file to set JAVA_HOME in the current shell
RUN . /etc/environment
# Verify JAVA_HOME
RUN echo "JAVA_HOME is set to $JAVA_HOME" && \
ls -l $JAVA_HOME
# Create the /bitcointribe directory
RUN mkdir -p /bitcointribe
# Clone the Bitcoin Tribe repository and check out the v2.4.2 tag
WORKDIR /bitcointribe
RUN git clone https://github.com/bithyve/bitcointribe.git . && \
git checkout tags/v2.4.2 -b v2.4.2-branch
# Set the working directory to the Android directory
WORKDIR /bitcointribe/android
# Make gradlew executable
RUN chmod +x ./gradlew
# Install dependencies, update packages, clean, and build the APK
RUN yarn config set registry https://registry.npmjs.org/ && \
yarn install --network-timeout 600000 && \
yarn upgrade && \
./gradlew clean && \
./gradlew assembleDebug --stacktrace --info --console=plain \
-Dorg.gradle.jvmargs="-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError" \
-Dorg.gradle.daemon=false \
-Dorg.gradle.workers.max=2 \
-Dorg.gradle.vfs.watch=true
# Create output directory and copy APK
RUN mkdir -p /output && \
find /bitcointribe/android -name "*.apk" -exec cp {} /output/hexawallet-debug.apk \;
# Final stage
FROM alpine:latest
# Copy the APK from the builder stage
COPY --from=builder /output/hexawallet-debug.apk /hexawallet-debug.apk
# Set the entrypoint to echo the location of the APK
CMD ["echo", "APK built and located at /hexawallet-debug.apk"]
Which resulted in this error -
at org.gradle.execution.plan.Node.isCanCancel(Node.java:232)
at org.gradle.execution.plan.FinalizerGroup.isCanCancel(FinalizerGroup.java:155)
at org.gradle.execution.plan.CompositeNodeGroup.isCanCancel(CompositeNodeGroup.java:101)
at org.gradle.execution.plan.Node.isCanCancel(Node.java:232)
at org.gradle.execution.plan.FinalizerGroup.isCanCancel(FinalizerGroup.java:155)
at org.gradle.execution.plan.CompositeNodeGroup.isCanCancel(CompositeNodeGroup.java:101)
at org.gradle.execution.plan.Node.isCanCancel(Node.java:232)
at org.gradle.execution.plan.FinalizerGroup.isCanCancel(FinalizerGroup.java:155)
at org.gradle.execution.plan.CompositeNodeGroup.isCanCancel(CompositeNodeGroup.java:101)
at org.gradle.execution.plan.Node.isCanCancel(Node.java:232)
at org.gradle.execution.plan.FinalizerGroup.isCanCancel(FinalizerGroup.java:155)
at org.gradle.execution.plan.CompositeNodeGroup.isCanCancel(CompositeNodeGroup.java:101)
at org.gradle.execution.plan.Node.isCanCancel(Node.java:232)
at org.gradle.execution.plan.FinalizerGroup.isCanCancel(FinalizerGroup.java:155)
at org.gradle.execution.plan.CompositeNodeGroup.isCanCancel(CompositeNodeGroup.java:101)
at org.gradle.execution.plan.Node.isCanCancel(Node.java:232)
at org.gradle.execution.plan.FinalizerGroup.isCanCancel(FinalizerGroup.java:155)
==============================================================================
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
BUILD FAILED in 41m 41s
1515 actionable tasks: 1510 executed, 5 up-to-date
The command '/bin/sh -c yarn config set registry https://registry.npmjs.org/ && yarn install --network-timeout 600000 && yarn upgrade && ./gradlew clean && ./gradlew assembleDebug --stacktrace --info --console=plain -Dorg.gradle.jvmargs="-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError" -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2 -Dorg.gradle.vfs.watch=true' returned a non-zero code: 1
you can check the steps i took and the issues i faced detailed here
would be extremely helpful if you can guide on how to build the apk , or share your build process, or provide a dockerfile to build the apk!
I tried to rebuild the app from Google Play but failed to do so. My write-up as it also can be found on WalletScrutiny:
So it's "Non Custodial Bitcoin Wallet". There is also a link to their Github and while not equipped with a FOSS license, it is public source code of a wallet.
So the build instructions looked lacking from the start as there is no word about building the apk but only about running the app, we tried it nevertheless:
and as the above is only the good guesses out of 35 commands typed so far, this is where we give up and consider the app not verifiable due to lacking build instructions.