Coder Social home page Coder Social logo

bitcoin-dot-org / bitcoinwalletmobile Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 20.0 1.72 MB

A simple, well designed and easy to use mobile Bitcoin wallet. Compatible with both Android and iOS. Designed for newbies.

License: MIT License

JavaScript 1.78% TypeScript 92.99% Starlark 0.24% Java 2.79% Objective-C 1.82% Ruby 0.39%

bitcoinwalletmobile's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitcoinwalletmobile's Issues

Please provide build instructions for reproducing the apk from Google Play

I tried to reproduce the app I got from Google Play to make sure it matches the published source code but failed. My findings will be public on WalletScrutiny. The short version of the analysis is:

After running

mkir /tmp/testbitcoinorg
cd /tmp/testbitcoinorg
podman run --rm --volume $PWD:/app --interactive --tty frolvlad/alpine-glibc
apk update
apk add --no-cache openjdk8 git yarn
export ANDROID_SDK_ROOT="/home/appuser/app/sdk"
export ANDROID_HOME="/home/appuser/app/sdk"
export NODE_ENV="production"
mkdir -p "/home/appuser/app/sdk/licenses" "/home/appuser/app/bitcoinorg/"
printf "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > "/home/appuser/app/sdk/licenses/android-sdk-license"
cd /app
git clone https://github.com/bitcoin-dot-org/BitcoinWalletMobile/
cd BitcoinWalletMobile
git checkout v1.0
yarn install --frozen-lockfile --production
cd android
sed -i '/org.gradle.jvmargs/s/^#//g' gradle.properties
./gradlew assembleRelease
./gradlew bundleRelease
cp app/build/outputs/apk/release/app-release.apk .

The diff with what I get from Google Play is huge:

$ unzip /path/to/Bitcoin\ Wallet\ 1.0\ \(org.bitcoin.wallet\).apk -d fromGoogle
$ unzip BitcoinWalletMobile/android/app-release.apk -d fromBuild
$ diff --recursive --brief from*
Files fromBuild/AndroidManifest.xml and fromGoogle/AndroidManifest.xml differ
Only in fromGoogle/assets: index.android.bundle
Only in fromBuild: lib
Only in fromGoogle/META-INF: BNDLTOOL.RSA
Only in fromGoogle/META-INF: BNDLTOOL.SF
Only in fromBuild/META-INF: CERT.RSA
Only in fromBuild/META-INF: CERT.SF
Files fromBuild/META-INF/MANIFEST.MF and fromGoogle/META-INF/MANIFEST.MF differ
Only in fromBuild/res: drawable-anydpi-v21
Only in fromBuild/res: drawable-hdpi-v4
Files fromBuild/res/drawable-ldpi-v4/ic_launcher_foreground.png and fromGoogle/res/drawable-ldpi-v4/ic_launcher_foreground.png differ
Only in fromBuild/res: drawable-ldrtl-hdpi-v17
Only in fromBuild/res/drawable-ldrtl-mdpi-v17: abc_spinner_mtrl_am_alpha.9.png
Only in fromBuild/res: drawable-ldrtl-xhdpi-v17
Only in fromBuild/res: drawable-ldrtl-xxhdpi-v17
Only in fromBuild/res: drawable-ldrtl-xxxhdpi-v17
Only in fromBuild/res/drawable-mdpi-v4: abc_btn_check_to_on_mtrl_000.png
Only in fromBuild/res/drawable-mdpi-v4: abc_btn_check_to_on_mtrl_015.png
Only in fromBuild/res/drawable-mdpi-v4: abc_btn_radio_to_on_mtrl_000.png
Only in fromBuild/res/drawable-mdpi-v4: abc_btn_radio_to_on_mtrl_015.png
Only in fromBuild/res/drawable-mdpi-v4: abc_cab_background_top_mtrl_alpha.9.png
Only in fromBuild/res/drawable-mdpi-v4: abc_ic_star_black_48dp.png
Only in fromBuild/res/drawable-mdpi-v4: abc_ic_star_half_black_48dp.png
Only in fromBuild/res/drawable-mdpi-v4: abc_list_pressed_holo_dark.9.png
Only in fromBuild/res/drawable-mdpi-v4: abc_list_selector_disabled_holo_dark.9.png
Only in fromBuild/res/drawable-mdpi-v4: abc_popup_background_mtrl_mult.9.png
Only in fromBuild/res/drawable-mdpi-v4: abc_scrubber_control_off_mtrl_alpha.png
Only in fromBuild/res/drawable-mdpi-v4: abc_scrubber_control_to_pressed_mtrl_000.png
Only in fromBuild/res/drawable-mdpi-v4: abc_scrubber_control_to_pressed_mtrl_005.png
Only in fromBuild/res/drawable-mdpi-v4: abc_scrubber_primary_mtrl_alpha.9.png
Only in fromBuild/res/drawable-mdpi-v4: abc_scrubber_track_mtrl_alpha.9.png
Only in fromBuild/res/drawable-mdpi-v4: abc_spinner_mtrl_am_alpha.9.png
Only in fromBuild/res/drawable-mdpi-v4: abc_tab_indicator_mtrl_alpha.9.png
Only in fromBuild/res/drawable-mdpi-v4: abc_text_select_handle_left_mtrl_dark.png
Only in fromBuild/res/drawable-mdpi-v4: abc_text_select_handle_left_mtrl_light.png
Only in fromBuild/res/drawable-mdpi-v4: abc_text_select_handle_middle_mtrl_dark.png
Only in fromBuild/res/drawable-mdpi-v4: abc_text_select_handle_middle_mtrl_light.png
Only in fromBuild/res/drawable-mdpi-v4: abc_text_select_handle_right_mtrl_dark.png
Only in fromBuild/res/drawable-mdpi-v4: abc_text_select_handle_right_mtrl_light.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_arrow.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_camera.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_collectionfocus.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_collection.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_copy.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_create.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_currency.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_do_not_loose_it.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_exit.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_eye.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_forward.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_gearfocus.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_gear.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_keep_it_safe.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_language.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_laptop.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_link.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_qrcodeicon.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_receivedbutton.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_receivefocus.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_receive.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_refresh.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_restore.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_sendbutton.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_send.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_sent.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_swap.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_tick.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_warning.png
Only in fromBuild/res/drawable-mdpi-v4: assets_images_write_it_down.png
Only in fromBuild/res/drawable-mdpi-v4: common_google_signin_btn_icon_dark_normal_background.9.png
Only in fromBuild/res/drawable-mdpi-v4: common_google_signin_btn_icon_light_normal_background.9.png
Only in fromBuild/res/drawable-mdpi-v4: common_google_signin_btn_text_dark_normal_background.9.png
Only in fromBuild/res/drawable-mdpi-v4: common_google_signin_btn_text_light_normal_background.9.png
Only in fromBuild/res/drawable-mdpi-v4: design_ic_visibility_off.png
Only in fromBuild/res/drawable-mdpi-v4: design_ic_visibility.png
Only in fromBuild/res/drawable-mdpi-v4: googleg_disabled_color_18.png
Only in fromBuild/res/drawable-mdpi-v4: googleg_standard_color_18.png
Only in fromBuild/res/drawable-mdpi-v4: ic_launcher_foreground.png
Only in fromBuild/res/drawable-mdpi-v4: node_modules_reactnavigation_stack_src_views_assets_backicon.png
Only in fromBuild/res/drawable-mdpi-v4: notification_bg_low_normal.9.png
Only in fromBuild/res/drawable-mdpi-v4: notification_bg_low_pressed.9.png
Only in fromBuild/res/drawable-mdpi-v4: notification_bg_normal.9.png
Only in fromBuild/res/drawable-mdpi-v4: notification_bg_normal_pressed.9.png
Only in fromBuild/res/drawable-mdpi-v4: notify_panel_notification_icon_bg.png
Only in fromBuild/res: drawable-xhdpi-v4
Only in fromBuild/res: drawable-xxhdpi-v4
Only in fromBuild/res: drawable-xxxhdpi-v4
Only in fromGoogle/res/xml: splits0.xml
Files fromBuild/resources.arsc and fromGoogle/resources.arsc differ
Only in fromGoogle: stamp-cert-sha256

The diff ignoring what was only in my build and not in the Google version and the META-INF lines is still huge, with index.android.bundle being obfuscated (minified) code.

$ diff --recursive --brief from* | grep -v "$Only in fromBuild" | grep -v META-INF
Files fromBuild/AndroidManifest.xml and fromGoogle/AndroidManifest.xml differ
Only in fromGoogle/assets: index.android.bundle
Files fromBuild/res/drawable-ldpi-v4/ic_launcher_foreground.png and fromGoogle/res/drawable-ldpi-v4/ic_launcher_foreground.png differ
Only in fromGoogle/res/xml: splits0.xml
Files fromBuild/resources.arsc and fromGoogle/resources.arsc differ
Only in fromGoogle: stamp-cert-sha256

[Android] Publish app in F-Droid

F-Droid URL: https://f-droid.org/
F-Droid Wikipedia: https://www.wikipedia.org/wiki/F-Droid

Contribution/Submit Applications: https://f-droid.org/en/contribute/#submit-applications
Inclusion Policy: https://f-droid.org/en/docs/Inclusion_Policy
Request For Packaging Tickets: https://gitlab.com/fdroid/rfp/issues

F-Droid is application & app store for android apps (alternative to Google Play) that accepts only FLOSS (free/libre and open-source) apps and doesn't require any account creation/login in order to download apps.

The requirements for being included into f-droid are here: https://f-droid.org/en/docs/Inclusion_Policy/

The process for getting an app published to f-droid is outlined here: https://f-droid.org/en/docs/Inclusion_How-To/ https://gitlab.com/fdroid/rfp#submission-queue https://gitlab.com/fdroid/fdroiddata/blob/master/CONTRIBUTING.md

You can open a RFP (Request For Packaging) ticket here: https://gitlab.com/fdroid/rfp or an user can do so, provided you agree to include this app in F-droid (a comment to this issue is enough for it)

Some users don't have play-store on their devices as they are degoogled devices or don't create/use google account (using aurora store app https://auroraoss.com/ in anonymous mode (which is available on f-droid) is solution to still get apps from google-play) or using OS/custom ROMs that don't have it included, such as: (Some bundle f-droid by default)

https://grapheneos.org/ GrapheneOS
https://calyxos.org/ CalyxOS
https://lineageos.org/ LineageOS
https://lineage.microg.org/ LineageOS for microG
https://e.foundation/ /e/
https://www.replicant.us/ Replicant

Downloading APKs from official places like github releases or website, or from unofficial sources like APK downloading sites https://apk.support or https://apkpure.com/ etc... will avoid the play-store/google dependency but it's lack automatic update mechanism unless it's built in into the application, F-Droid solve this.

Once the app is published into f-droid add the below image code into
README.md to show that the app available on f-droid:
Get it on F-Droid
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" alt="Get it on F-Droid" height="80">](https://f-droid.org/en/packages/org.fdroid.fdroid/)

Increase memory in gradle.properties to avoid OOM in android apk compilation

Compiling this app with Containerfile at: https://gitlab.com/walletscrutiny/walletScrutinyCom/-/issues/208

will fail with OOM error unless running the following command sed -i '/org.gradle.jvmargs/s/^#//g' gradle.properties; which used to uncomment this line:

# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

so it's better to increase the defaults to be enough for app compilation.

Use packages from registry instead of github

From packages.json:

    "electrum-client": "https://github.com/BlueWallet/rn-electrum-client",
    "react-native-qrcode-scanner": "https://github.com/moaazsidat/react-native-qrcode-scanner",

it use git repo instead of yarn/npm registry, which require additional git dep to compile the app & repo can be removed/relocated/changed in a way that will break the build, using packages is better.

The react-native-qrcode-scanner can be used as it's available in yarn/npm registries.
https://yarnpkg.com/package/react-native-qrcode-scanner
https://www.npmjs.com/package/react-native-qrcode-scanner

regarding rn-electrum-client it's not available yet, opened issue about it at: BlueWallet/rn-electrum-client#7

Is this org.bitcoin.wallet on google-play?

There is app on google-play: "Bitcoin Wallet: by Bitcoin.org"
https://play.google.com/store/apps/details?id=org.bitcoin.wallet
which use appid org.bitcoin.wallet but this repo use appid com.bitcoinwalletmobile , the org.bitcoin.wallet is used in another repo which is not a mobile wallet?! https://github.com/bitcoin-dot-org/Bitcoin-Wallet/blob/896565580cb1fe162f67bfc59124d8924231e347/vue.config.js#L8 so

So the question is this app in google-play yours? legit? if it's legit please point to it in the README of the repo and also git tag releases/version (so easier to test for reproducibility, etc..)

Expose DevSettingsActivity only in Debug build

The DevSettingsActivity activity is exposed on all releases, as it's declared in main folder at:

<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />

From react documentation at "Android (Java)" > "Configuring permissions":
https://reactnative.dev/docs/integration-with-existing-apps#configuring-permissions

If you need to access to the DevSettingsActivity add to your AndroidManifest.xml:

This is only used in dev mode when reloading JavaScript from the development server, so you can strip this in release builds if you need to.

The source code of "DevSettingsActivity.java" contain comment about this issue:

https://github.com/facebook/react-native/blob/3b31e69e284074da72108edfb11e41ee74d7100e/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSettingsActivity.java#L14-L17

/**
 * Activity that display developers settings. Should be added to the debug manifest of the app. Can
 * be triggered through the developers option menu displayed by {@link DevSupportManager}.
 */

Fix: Declare DevSettingsActivity activity in ./android/app/src/debug/AndroidManifest.xml instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.