HowTo: contributing to app development with crossbuilder



  • Hi,
    I started this topic since I have some spare time during the current holidays and therefore I would like to dig more into how to pro-actively contribute to the development of the our most preferred OS.
    What I'd like to do for the future would be to deploy an app to the store but I don't have enough knowledge right now, so I was more thinking to start choosing one or more 'pet bugs' (copyright @UniSuperBox) on GitHub.
    My first choice was oriented to the keyboard component, for which I'd like to try to change something. In order to do so, I first read the following UBports documentation:
    App development/System Software
    There are 3 different choices highlighted there, but it seemed to me that the suggested one were the one employing crossbuilder. I felt it promising and tailored to my needs because, if I understood well the description, I could change the core app locally on my PC and always locally I could update my modification on my phone to see if working, without affecting anybody. I followed the instructions but I keep getting an error with my phone connected (it's a Meizu Pro5 16.04 devel):
    0_1533053522270_8449254c-3085-4c30-9b96-822a68cd86a1-image.png

    I don't have a clue of what's going on here. Is there anyone who could help me in order to make me work with crossbuilder in the proper way or maybe to point me out to other means to get to my goal?

    Thanks in advance.

    Matteo



  • I would also like to know how we can setup the keyboard-component project, build it and test it.



  • @forgotten Hi, it's nice to see someone else keen to contribute :) Nobody answered to my post up to now and it's kind of strange: I thought this weren't such a difficult question for who already has experience in coding for Ubuntu Touch...but I don't despair and I want to think that it's because it's summertime now and a lot of people are in holidays as I am....unfortunately my free time I wanted to dedicate to Ubuntu Touch coding is running out, so hope I'll find more time later.


  • Community

    Personally, I'll usually run the commands to build the software via an adb shell session rather than using Crossbuilder. I haven't been able to run crossbuilder yet.



  • @unisuperbox thank you for the reply, however would you kindly elaborate that? Is there a guide to follow to understand which commands are needed do be employed in adb shell in order to accomplish to this task? Crossbuilder is not mandatory to me, it only seemed to be the advised tool to be used, according to the UBports documentation.


  • Community

    Ah, I see that it's probably better to fix the problem in Crossbuilder than invent a new way to do all of this... Looks like some work is going on on the front. I'll see if I can look up any more information on it and come back to this.



  • I have some trouble figuring out what's wrong here: the dch tool is part of the devscripts package, which should be installed by crossbuilder in the container. @matteo, can you please verify whether this is the case? Just run:

    crossbuilder shell
    # then, in the container:
    apt-cache policy devscripts
    

    and paste here the output.



  • @mardy here we go with the keyboard component:
    0_1534586094339_b74c19a0-13e2-4343-8795-d2a988ff50ba-image.png

    I tried the same with the network-manager after copying the folder from GitHub into my local folder and I got some additional work done, but I have no idea of what's the meaning:

    0_1534586333024_18112b18-b063-4b4c-bfac-a415d15fb00b-image.png



  • Ok, for the network-manager I found out the output was different because it was the first time I ran it with crossbuilder....If I do it again, I find a similar behavior than with the keyboard-component.



  • It looks like the container was not created properly. Can you please delete it (lxc list to see the container name, then lxc delete <container>) and modify the crossbuilder script by adding the line

    set -x
    

    near the beginning, right after the existing set -e line? Then please run it and post here the full output. By the way, what versions of lxc and Ubuntu are you using?



  • @mardy Hi mardy, sorry if I didn't reply before but I was in a long holidays....just back though. To answer your question, the version of lxc is 2.0.11 and I'm on Ubuntu 16.04 Desktop. Running the first command I got this:
    0_1535991267921_e9995117-ed62-4c51-877b-65aec5f44f33-image.png

    Am I supposed to delete both the environments before to proceed?

    Thank you for your help!



  • Yes, @matteo, please try to delete them. Also, update your crossbuilder, before trying again. Please let me know if the new version somehow helps.



  • @mardy I deleted both the containers, added the new required line in the script and then run the crossbuilder command. Please check here below the output:
    0_1536163811793_006ba3d8-3dbc-4d47-8306-60e6d7b81d58-image.png



  • I tried to re-setup the environment and I got caught in an error (or maybe that's what I feel about). Here below the output:

    https://paste.ubuntu.com/p/DGN3642VNg/

    Then I tried to cross build the OSK package to the connected device, a Pro5, by just typing "crossbuilder" in the OSK directory and this is the result (again a final error it seems):

    https://paste.ubuntu.com/p/Crwm65FyQV/

    Any suggestion?

    Matteo



  • Sorry, if I run the same command "crossbuilder" in the OSK directory, now there is a complain with a missing "dch" command:

    https://paste.ubuntu.com/p/dRpvrK8thY/



  • @mardy I found this issue on Github which explains why my container doesn't connect to the internet as well as experienced by @jonius: https://github.com/ubports/crossbuilder/issues/2

    But now, how to fix it?

    Thank you.

    P.S. my laptop is running Ubuntu 16.04 LTS (Xenial) but I see that in your answer on the Github issue you are indicating that the devscripts are installed by means of a repo available for Vivid?? Could it be the culprit?

    Matteo



  • Hi @matteo! I think your issue might not be related to https://github.com/ubports/crossbuilder/issues/2

    Instead, can you please update your crossbuilder again, then remove all of your existing lxc containers (those created with crossbuilder, at least) and run the crossbuilder setup-lxd command again (and collect the logs in the same way you did before)?



  • @mardy I'm not sure what you do mean for "update crossbuilder"...would you please help me to figure this out? Maybe I'm failing this step...Anyhow, I deleted the previous lxc containers and ran the "crossbuilder setup-lxd" command; this is the output: https://paste.ubuntu.com/p/hhDr699mmH/

    If I re-create the keyboard container with my phone connected I got always the same error: "Container is not connected to the Internet."



  • @mardy I'd need your help on this. Not being able to update crossbuilder as per your request, I just got rid of the previous installation and I started a fresh installation from scratch. Everything went smooth, so I tried again to build the OSK app onto my phone but I still get the error complaining for a missing command dch, I guess near to the end of the building process:

    0_1537096449272_0174bfbe-ba0c-49f8-87eb-653bb5914ecb-image.png

    Thank you in advance.

    Matteo



  • Hi @matteo!
    To update crossbuilder, just go to the directory where it's located and run git pull. As for the error, I would really need to see the full logs, as the real error most likely happens much before that dch line.


Log in to reply
 

Looks like your connection to UBports Forum was lost, please wait while we try to reconnect.