Feathercoin daemon and wallet production version 0.19.1
Old daemon and wallet version 0.18.3

[Dev] feathercoin-wallet - Version 5 Development - Mobile / Android wallet

  • Moderators | Tip wrapper

    Feathercoin-wallet(v5) - Gradle issues / notes

    There are issues with Gradle, with feathercoin-wallet-2 and with feathercoin-wallet(v5) in android-studio.

    It was noted Litecoin retained the Bitcoin-wallet structure, was this to reduce work customising build scripts?

    What is Gradle?

    Gradle is a build system for Android-studio.

    Before Android Studio a program such as Eclipse were used,for your development purposes, andto build your Android APK .

    It is possible to build on the command line, but you have to learn what each tool (dx, aapt) does in the SDK. Eclipse saved us all from these low level but important, fundamental details by giving us their own build system.

    Using a script to automate build tasks

    Why is the res folder is in the same directory as your src folder?

    The build system automatically takes all the source files (.java or .xml), then applies the appropriate tool (e.g. takes java class files and converts them to dex files), and groups all of them into one compressed file, the APK file.

    The build system uses some conventions: an example of one is to specify the directory containing the source files (in Eclipse it is \src folder) or resources files (in Eclipse it is \res folder) .

    In order to automate all these build tasks, there has to be a script;

    Shell scripting in linux or batch files syntax in windows can be used you can write your own build system.

    Gradle is a build system that takes the best features from other build systems and combines them into one. It is a JVM based build system, which means that you can write your own script in Java, which Android Studio makes use of.

    One cool thing about Gradle is that it is a plugin based system. This means if you have your own programming language and you want to automate the task of building some package (output like a JAR for Java) from sources then you can write a complete plugin in Java or Groovy, and distribute it to rest of world.

    Why did Google use Gradle?

    Google saw one of the most advanced build systems on the market and realized that you could write scripts of your own with little to no learning curve, and without learning Groovy or any other new language. So they wrote the Android plugin for Gradle.

    You must have seen build.gradle file(s) in your project. That is where you can write scripts to automate your tasks. The code you saw in these files is Groovy code. If you write System.out.println(“Hello Gradle!”); then it will print on your console.

    What can you do in a Gradle build script?

    A simple example is that you have to copy some files from one directory to another before the actual build process happens. A Gradle build script can do this.

    Ref: http://stackoverflow.com/questions/16754643/what-is-gradle-in-android-studio

  • Moderators | Tip wrapper

    What is the Gradle build system and how to use it in android studio?


    Exploring the Gradle Files

    Whenever you create a project in Android Studio, the build system automatically generates all the necessary Gradle build files.

    Gradle Build Files

    Gradle build files use a Domain Specific Language or DSL to define custom build logic and to interact with the Android-specific elements of the Android plugin for Gradle.

    Android Studio projects consist of one or more modules, which are components that you can build, test, and debug independently. Each module has its own build file, so every Android Studio project contains two kinds of Gradle build files:

    Top-Level Build File:

    This is where you’ll find the configuration options that are common to all the modules that make up your project.

    Every Android Studio project contains a single, top-level Gradle build file. This build.gradle file is the first item that appears in the Gradle Scripts folder and is clearly marked Project.

    Most of the time, you won’t need to make any changes to this file, but it’s still useful to understand its contents and the role it plays within your project.

    Module-Level Build File:

    Each module has its own Gradle build file that contains module-specific build settings. You’ll spend most of your time editing module-level build file(s) rather than your project’s top-level build file.

    In addition to the project-level Gradle build file, each module has a Gradle build file of its own. Below is an annotated version of a basic, module-level Gradle build file.

    View Gradle config files

    To take a look at these build.gradle files, open Android Studio’s Project panel (by selecting the Project tab) and expand the Gradle Scripts folder. The first two items in the Gradle Scripts folder are the project-level and module-level Gradle build files

    Other Gradle Files

    In addition to the build.gradle files, your Gradle Scripts folder contains some other Gradle files. Most of the time you won’t have to manually edit these files as they’ll update automatically when you make any relevant changes to your project. However, it’s a good idea to understand the role these files play within your project.

    gradle-wrapper.properties (Gradle Version)

    This file allows other people to build your code, even if they don’t have Gradle installed on their machine. This file checks whether the correct version of Gradle is installed and downloads the necessary version if necessary.


    This file references all the modules that make up your project.

    gradle.properties (Project Properties)

    This file contains configuration information for your entire project. It’s empty by default, but you can apply a wide range of properties to your project by adding them to this file.

    local.properties (SDK Location)

    This file tells the Android Gradle plugin where it can find the Android SDK installation.


    local.properties (SDK Location) contains information that’s specific to the local installation of the Android SDK. This means that you shouldn’t keep this file under source control.**


  • Moderators | Tip wrapper

    Feathercoin-wallet Bitcoin Fork build Test / Bitcoin comparison / notes

    Initial build test failed :


    $ gradle clean :native-scrypt:copy test build

    To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.13/userguide/gradle_daemon.html.
    Then :
    FAILURE: Build failed with an exception.

    • Where:
      Build file ‘/home/wrapper/feathercoin-wallet/native-scrypt/build.gradle’ line: 1
    • What went wrong:
      A problem occurred evaluating project ‘:native-scrypt’.

    Failed to apply plugin [class ‘com.android.build.gradle.model.NdkComponentModelPlugin’]
    Could not create plugin of type ‘NdkComponentModelPlugin’.

    • Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    Bitcoin-wallet test build

    FAILURE: Build failed with an exception.

    • Where:
      Build file ‘/home/wrapper/bitcoin-wallet/native-scrypt/build.gradle’ line: 1
    • What went wrong:
      A problem occurred evaluating project ‘:native-scrypt’.

    Failed to apply plugin [class ‘com.android.build.gradle.model.AndroidComponentModelPlugin’]
    Gradle version 2.10 is required. Current version is 2.13.
    If using the gradle wrapper, try editing the distributionUrl in /home/wrapper/.gradle/daemon/2.13/gradle/wrapper/gradle-wrapper.properties to gradle-2.10-all.zip


  • Moderators | Tip wrapper

    @kris_davison Re: java NeoscryptWrapper

    I’m trying to compile / understand/ update the mobile wallet. I understand we may need to compile NeoscryptWrapper.

    ~/neoscrypt-jni-standalone$ printenv JAVA_HOME

    :~/neoscrypt-jni-standalone$ ./build.sh
    Hello World 🙂 !!!
    input-[[email protected]
    Called Neoscrypt function …
    input-[[email protected]
    output-[[email protected]
    *** Error in `java’: free(): invalid next size (fast): 0x00007f02440e6280 ***

    If I run NeoscryptWrapper on it’s own :
    ~/neoscrypt-jni-standalone$ java NeoscryptWrapper

    Exception in thread “main” java.lang.UnsatisfiedLinkError: no neoscryptwrapper in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at NeoscryptWrapper.<clinit>(NeoscryptWrapper.java:5)

  • Moderators | Tip wrapper

    Building the “old” android mobile feathercoin-wallet-2

    feathercoinj - build staus : SUCCESSFULLY built
    I got further last night - using the maven build or Ubuntu 16.10, I was able to compile feathercoinj – SNAPSHOT/feathercoinj-tools-0.97-SNAPSHOT.pom

    feathercoin-wallet-2 - build status : FAILED
    feathercoin-wallet-2 build crashed looking for The POM for com.google:feathercoinj:jar:0.98-SNAPSHOT is missing

    Build status :
    Awaiting advice on the Feathercoin jar version mismatch / further research on POM adjustments or other way forward, push fix.

    Feathercoin-wallet-2 - How to build

    For comparison / research to fork the latest mobile wallet, these are the “old” maven instructions to build the android wallet. The new wallet will use the “gradle” build system.

    Build feathercoinj

    Open a Terminal
    sudo apt install maven
    git clone https://github.com/wellenreiter01/feathercoinj
    cd feathercoinj
    git checkout v0.99
    cd wallet
    mvn clean install -DskipTests

    Build feathercoin-wallet-2

    Open a Terminal
    git clone https://github.com/wellenreiter01/feathercoin-wallet-2
    cd feathercoin-wallet-2
    mvn clean install

  • Moderators | Tip Wellenreiter

    I need to check, what I have changed in feathercoinj-0.98-SNAPSHOT

    could take a day or two…

    quite busy at the moment 😉

  • Moderators | Tip wrapper

    @Wellenreiter looks like feathercoinj master was set to v0.97 ,

    Build Feathercoinj
    git clone https://github.com/wellenreiter01/feathercoinj
    compile feathercoinj
    ‘mvn clean install -DskipTests’ (No space after the -D )`

    I’m just trying git checkout v0.98 now on feathercoinj - see if that compiles :

    Build test feathercoinj Passed .

    Build success

    [INFO] Replacing /home/tony/feathercoinj/tools/target/feathercoinj-tools-0.98-SNAPSHOT.jar with /home/tony/feathercoinj/tools/target/feathercoinj-tools-0.98-SNAPSHOT-shaded.jar

    Build test feathercoin-wallet-2

    Build feathercoin-wallet-2 :
    git clone https://github.com/wellenreiter01/feathercoin-wallet-2
    cd to feathercoin-wallet-2
    mvn clean install -U (-U rebuild all modules)

    [ERROR] Failed to execute goal on project wallet: Could not resolve dependencies for project com.feathercoin.wallet:wallet:apk:3.04: The following artifacts could not be resolved: com.google:feathercoinj:jar:0.98-SNAPSHOT, com.feathercoin.wallet:integration-android:jar:1.0: Could not find artifact com.google:feathercoinj:jar:0.98-SNAPSHOT -> [Help 1]

  • Regular Member | Tip ghostlander

    You’re working with some old NeoScrypt code base of 2015 or so. I suggest to update first.


  • Moderators | Tip wrapper

    Cheers @ghostlander

    Feathercoin-wallet-2 ~~Build now works~~

    I have cloned your new neoscrypt from here:

    git clone https://github.com/ghostlander/NeoScrypt.git

    Then :
    Copied the neoscrypt.c and .h

    into : /feathercoinj/core/jni/ ,

    and recompile feathercoinj

    Test build / audit / feathercoin-wallet-2

    Results of builds

    mvn site --errors

    [INFO] Feathercoin Wallet … SUCCESS [ 8.719 s]

    Errors and warning

    [INFO] Error stacktraces are turned on.

    [WARNING] Some problems were encountered while building the effective model for com.feathercoin.wallet:wallet:apk:3.04
    [WARNING] ‘build.plugins.plugin.version’ for com.jayway.maven.plugins.android.generation2:maven-android-plugin is missing. @ line 185, column 12
    [WARNING] ‘build.plugins.plugin.version’ for org.apache.maven.plugins:maven-jarsigner-plugin is missing. @ line 152, column 13

    [WARNING] Report plugin org.apache.maven.plugins:maven-project-info-reports-plugin has an empty version.

    [WARNING] No project URL defined - decoration links will not be relativized!

    [WARNING] Report plugin org.apache.maven.plugins:maven-project-info-reports-plugin has an empty version.
    [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
    [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
    [INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.9
    [WARNING] No project URL defined - decoration links will not be relativized!
    [INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
    [INFO] Generating “Dependencies” report — maven-project-info-reports-plugin:2.9
    [WARNING] The repository url ‘http://people.apache.org/repo/m2-snapshot-repository’ is invalid - Repository ‘apache.snapshots’ will be blacklisted.

    Still fails with normal build instructions

    mvn clean install -X

    Further work
    Push 3 commits need to get this far.

    I’ll continue to look at what went wrong (error and warning messages) with the maven build for feathercoin-walet-2

    feathercoin-wallet v5 build environment
    Move on to getting the bitcoin-wallet android wallt to compile - ready to start looking at the best way to reintroduce the needed litecoin / feathercoin specific settings.

    Litecoin wallet status
    I note the Litecoin-wallet is also stuck at version 3 - so it would be interesting / good to try and form some collaboration / brance that does both? or could be pushed upstream, to build either, bitcoinj, litecoinj or feathercoinj …

  • Moderators | Tip wrapper

    feathercoin-wallet-2 build environment, Fixing / research on

    Research / experiment with Homebrew to install old version of Maven

    **Build status : failed

    The feathercoinj does compile and appears to be installed in maven2 correctly.

    feathercoin-wallet-2 won’t compile, with the instructions provided. A couple of additional instructions / settings have helped, or may be necessary, have been identified.

    Possible cause needs specific maven version to build

    Information so far shows a change in the development environment, like the version of the build system Maven, is a likely area to cause the problem.

    $ brew doctor

    Warning: Unbrewed header files were found in /usr/local/include.
    If you didn’t put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

    Unexpected header files:

    Warning: Unbrewed static libraries were found in /usr/local/lib.
    If you didn’t put them there on purpose they could cause problems when
    building Homebrew formulae, and may need to be deleted.

    Unexpected static libraries:

    Warning: /usr/bin occurs before /home/tony/.linuxbrew/bin
    This means that system-provided programs will be used instead of those
    provided by Homebrew. The following tools exist at both paths:

    Consider setting your PATH so that /home/tony/.linuxbrew/bin
    occurs before /usr/bin. Here is a one-liner:
    echo ‘export PATH="/home/wrapper/.linuxbrew/bin:$PATH"’ >> ~/.bash_profile

    Warning: Homebrew’s bin was not found in your PATH.
    Consider setting the PATH for example like so
    echo ‘export PATH="/home/wrapper/.linuxbrew/bin:$PATH"’ >> ~/.bash_profile

    Warning: Homebrew’s share was not found in your XDG_DATA_DIRS but you have this variable set to include other locations.
    Some programs like vapigen may not work correctly.

  • Moderators | Tip wrapper

    This is an experimental build of feathercoin-wallet-2 to try to update dependencies and get the original maven build to compile / pull into gradle. Draft build Instructions.

    Instructions to try updated / experimental feathercoin-wallet-2 build

    Follow the guide to install dependencies and set SDK / Ndk and how to compile and feathercoin-wallet-2 v3.04 and feathercoinj, the java wrapper to Neoscrypt.c

    Making sure you have < 150 GB space free, run an android update :
    /media/BigDisk1/Android/Sdk/tools/android update sdk --no-ui --obsolete --force

    Download and build the test versions. :

    Build feathercoinj
    git clone https://github.com/wrapperband/feathercoinj
    compile feathercoinj
    mvn clean install -DskipTests

    Build feathercoin-wallet-2 :
    Open a Terminal : check the path to your android Sdk and :
    export ANDROID_HOME=$HOME/Android/Sdk
    export PATH=$PATH:$ANDROID_HOME/tools

    The Android directory can be large here is it if it is not on /home disk :
    export ANDROID_HOME=/media/BigDisk1/Android/Sdk

    Clone the repository
    git clone https://github.com/wrapperband/feathercoin-wallet-2
    cd to feathercoin-wallet-2

    Compile the wallet and associated modules :
    mvn clean install -U (-U rebuild all modules)

    or compile offline :
    mvn dependency:resolve
    mvn dependency:resolve-plugins
    key to switches : -o = offline -e = errors -X = debug -U = all modules
    mvn clean install -DskipTests -o -e -X -U

    [Current errors compiling feathercoin-wallet-2 🙂

    mvn dependency:resolve

    [ERROR] Failed to execute goal on project wallet: Could not resolve dependencies for project com.feathercoin.wallet:wallet:apk:3.04: Failure to find com.feathercoin.wallet:integration-android:jar:1.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

    mvn clean install -DskipTests -o -e -X -U

    Apache Maven 3.3.9
    Maven home: /usr/share/maven
    Java version: 1.8.0_121, vendor: Oracle Corporation
    Java home: /usr/lib/jvm/java-8-oracle/jre
    Default locale: en_GB, platform encoding: UTF-8
    OS name: “linux”, version: “4.8.0-37-generic”, arch: “amd64”, family: “unix”
    [INFO] Error stacktraces are turned on.
    [INFO] Scanning for projects…
    [WARNING] Some problems were encountered while building the effective model for com.feathercoin.wallet:wallet:apk:3.04
    [WARNING] ‘build.plugins.plugin.version’ for com.jayway.maven.plugins.android.generation2:maven-android-plugin is missing. @ line 185, column 12
    [WARNING] ‘build.plugins.plugin.version’ for org.apache.maven.plugins:maven-jarsigner-plugin is missing. @ line 152, column 13

  • Moderators | Tip wrapper

    Importing the feathercoin wallet 2 a maven build into gradle to make it an android-studio project

    The feathercoin-wallet-2 android wallet won’t compile. The most efficiency way forward is to fork the latest android wallet code and re add FTC specific settings.

    However, on going development and knowledge of other potential fixes that can be applied to the mobile wallet, make it expedient to try to compile the old version.

    Although, compiling the old wallet (v2) in a later (v5) environment has been shown to be very complicated. That experience is useful, when trying to duplicate undocumented one off work.


    Are these the correct settings?
    When the wallet is imported or the new wallet forked, there are some default settings :

    Phone / Tablet
    Minimum SDK (15) : Android 4.0.3 Ice cream sandwich Was 14 was old setting?

    Do we need to release different versions for TVs smart boxes etc very popular?

    Wear : SDK (21)
    TV : (21)
    Auto : (21)
    Glass : (gdk 19)

  • Moderators | Tip wrapper

    Development of Feathercoin Mobile Wallet.

    @Wellenreiter has fixed the compile issue with the mobile wallet and updated the current wallet to be compatible with 0.6.0 wallet.

    Update to include and test V4 bridge compatibility
    Include a privacy statement
    Fix compile issue with Android Studio > 2.4 preview 7
    Include latest Neoscrypt
    Update build instructions.

    Move to head …

    Instructions : for https://github.com/wellenreiter01/feathercoinj

    git clone https://github.com/wellenreiter01/feathercoinj
    git checkout v0.99


    git clone https://github.com/wellenreiter01/feathercoin-wallet-2

  • Moderators | Tip Wellenreiter

    @wrapper said in [Dev] feathercoin-wallet - Version 5 Development - Mobile / Android wallet:

    @Wellenreiter has fixed the compile issue with the mobile wallet and updated the current wallet to be compatible with 0.6.0 wallet.

    To be clear, the actual Android app is the feathercoin-wallet-2 which uses feathercoinj as a library/dependency.
    The gradle settiings I implemented for feathercoinj need to be transfered/adapted to the feathercoin-wallet-2

  • Moderators | Tip wrapper

    I managed to compile the feathercoinj with the gradle command :

    cd feathercoinj
    gradle clean :native-scrypt:copy test build

    I was then able to run gradle init on feathercoin-wallet-2

    gradle init

    That seems to be the first step in updating to gradle. Maven compiled to a common directory where feathercoinj was available.

    note: The Thread how to was followed to install dependancies.
    Most of the notes are irrelevant (failed ways forward / info), especially with the the less work on the old version as possible, but looking back over, the neoscrypt update may be use-able.

    note: not assuming this actually built.

    Gradle Build :

    $ cd feathercoin-wallet-2
    $ gradle clean build

    :clean UP-TO-DATE
    :integration-android:clean UP-TO-DATE
    :sample-integration-android:clean UP-TO-DATE
    :wallet:clean UP-TO-DATE
    :assemble UP-TO-DATE
    :check UP-TO-DATE
    :build UP-TO-DATE
    :integration-android:compileJava UP-TO-DATE
    :integration-android:processResources UP-TO-DATE
    :integration-android:classes UP-TO-DATE
    :integration-android:compileTestJava UP-TO-DATE
    :integration-android:processTestResources UP-TO-DATE
    :integration-android:testClasses UP-TO-DATE
    :integration-android:test UP-TO-DATE
    :integration-android:check UP-TO-DATE
    :sample-integration-android:compileJava UP-TO-DATE
    :sample-integration-android:processResources UP-TO-DATE
    :sample-integration-android:classes UP-TO-DATE
    :sample-integration-android:compileTestJava UP-TO-DATE
    :sample-integration-android:processTestResources UP-TO-DATE
    :sample-integration-android:testClasses UP-TO-DATE
    :sample-integration-android:test UP-TO-DATE
    :sample-integration-android:check UP-TO-DATE
    :wallet:compileJava UP-TO-DATE
    :wallet:processResources UP-TO-DATE
    :wallet:classes UP-TO-DATE
    :wallet:compileTestJava UP-TO-DATE
    :wallet:processTestResources UP-TO-DATE
    :wallet:testClasses UP-TO-DATE
    :wallet:test UP-TO-DATE
    :wallet:check UP-TO-DATE


    Total time: 1.828 secs

  • Moderators | Tip wrapper

    Further to Privacy policy (Link) for mobile wallet and Forum guidelines / policy.

    The mobile wallet needs to point to a privacy statement. Whilst a clone, or even the original Bitcoin Mobile privacy policy is what the (Feathercoin) app does. It has got to be our policy to follow the (paid for) advice Bitcoin wallet uses …

    We may wish to update a more full Forum policy. this seems a succinct version or FTC guidelines.

    I note this project has a very good, and resonably generic policy statement :


    Also, slightly related, they had a good joining statement, we could do that and add a line about saying hello in New Members as your first post …

    From the Hack forum : Member Joining statement :

    Whilst we attempt to edit or remove any messages containing inappropriate, sexually orientated, abusive, hateful, slanderous, or threatening material that could be considered invasive of a persons privacy, or which otherwise violate any kind of law, it is impossible for us to review every message posted on this discussion system. For this reason you acknowledge that all messages posted on this discussion system express the views and opinions of the original message author and not necessarily the views of this bulletin board. Therefore we take no responsibility and cannot be held liable for any messages posted. We do not vouch for or warrant the accuracy and completeness of every message.

    By registering on this discussion system you agree that you will not post any material which is knowingly false, inaccurate, abusive, hateful, harassing, sexually orientated, threatening or invasive of a person’s privacy, or any other material which may violate any applicable laws.

    Failure to comply with these rules may result in the termination of your account, account suspension, or permanent ban of access to these forums. Your IP Address is recorded with each post you make on this discussion system and is retrievable by the forum staff if need-be. You agree that we have the ability and right to remove, edit, or lock any account or message at any time should it be seen fit. You also agree that any information you enter on this discussion system is stored in a database, and that “cookies” are stored on your computer to save your login information.

    Any information you provide on these forums will not be disclosed to any third party without your complete consent, although the staff cannot be held liable for any hacking attempt in which your data is compromised.

    By continuing with the sign up process you agree to the above rules and any others that the Administrator specifies.

  • Moderators | Tip wrapper

    Sweep through Mobile Wallet modifications from Bitcoin to FTC in order to check settings -

    Settings :

    Transaction Fee is CENT in Feathercoin-wallet (Litecoin setting)

    Should fix an exchangerate crash and tx fee issue :: Commit



     -	public static final BigInteger DEFAULT_TX_FEE = Utils.CENT.divide(BigInteger.valueOf(20));
     +	public static final BigInteger DEFAULT_TX_FEE = Utils.CENT; // 0.01

    Check where this was updated to FTC should be 0.001

  • Moderators | Tip wrapper

Log in to reply