UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Starting Development on the Nexus 5 - Basic Questions Within

    Scheduled Pinned Locked Moved Support
    5 Posts 5 Posters 723 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • T Offline
        TimWinter
        last edited by

        Hi All!

        I got Convergence working (a decent connector will do that, apparently!) and am excited to play around with my new ultra-ultra-portable device.

        The first thing I'd like to do is write some simple scripts, and to do that I need to have my source control running. I know it's generally against the rules to apt-get install git, but I'm not familiar with libertine containers. How do I get basic cli tools running in libertine containers, or is there a better way to do this?

        1 Reply Last reply Reply Quote 0
        • dobeyD Offline
          dobey
          last edited by

          Really, you just create the container, and then you can apt install anything in the Ubuntu repository that's built for armhf, in that container.

          You can run a shell inside the container, and do whatever you want within it, for the most part, as if it were a traditional Linux distro install. Do not instlal the sudo package or attempt to use it though. It's not necessary as the container is unprivileged.

          1 Reply Last reply Reply Quote 0
          • arubislanderA Online
            arubislander
            last edited by arubislander

            Hi @TimWinter,

            I have written a guide (for myself as reference actually) that walks through creating a container and installing some command line tools. I have copied some of the info under here. I assume an adb shell connection to the device:

            First you create your container. I am calling mine Xerus and giving it the id xenial:

            $ libertine-container-manager create-container -i xenial -n "Xerus"
            

            This might take a while to complete. Next install the command line tools we want to use in the newly created container.

            $ libertine-container-manager install-package -i xenial -p git
            $ libertine-container-manager install-package -i xenial -p screenfetch
            

            To invoke the tools use libertine-launch. I will illustrate with screenfetch:

            $ libertine-launch -i xenial screenfetch
            : DISPLAY environment variable not set!
            [[ ! ]] awk: fatal: cannot open file `/sys/devices/system/cpu/cpu0/
            cpufreq/scaling_max_freq' for reading (Permission denied)
                                      ./+o+-       phablet@android
                              yyyyy- -yyyyyy+      OS: Ubuntu 16.04 xenial
                           ://+//////-yyyyyyo      Kernel: aarch64 Linux 3.10.93+
                       .++ .:/++++++/-.+sss/`      Uptime: 2m
                     .:++o:  /++++++++/:--:/-      Packages: 679
                    o:+o+:++.`..```.-/oo+++++/     Shell: 21829
                   .:+o:+o/.          `+sssoo+/    CPU: MT8163
              .++/+:+oo+o:`             /sssooo.   RAM: 1324MiB / 1962MiB
             /+++//+:`oo+o               /::--:.  
             \+/+o+++`o++o               ++////.  
              .++.o+++oo+:`             /dddhhh.  
                   .+.o+oo:.          `oddhhhh+   
                    \+.++o+o``-````.:ohdhhhhh+    
                     `:o+++ `ohhhhhhhhyo++os:     
                       .o:`.syhhhhhhh/.oo++o`     
                           /osyyyyyyo++ooo+++/    
                               ````` +oo+++o\:    
                                      `oo++.      
            

            You can optionally add aliases to the commands you install in the container in your ~/.bash_aliases file:

            alias git='libertine-launch -i xenial git'
            alias screenfetch='libertine-launch -i xenial screenfetch'

            Hope this helps

            πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
            Happily running Ubuntu Touch
            Google Pixel 3a (20.04 DEV)
            JingPad (24.04 preview)
            Meizu Pro 5 (16.04 DEV)

            D 1 Reply Last reply Reply Quote 2
            • H Offline
              haveaniceday
              last edited by

              The part with the aliases is clever.

              1 Reply Last reply Reply Quote 0
              • D Online
                doniks @arubislander
                last edited by

                @arubislander said in Starting Development on the Nexus 5 - Basic Questions Within:

                You can optionally add aliases to the commands you install in the container in your ~/.bash_aliases file:
                alias git='libertine-launch -i xenial git
                alias screenfetch='libertine-launch -i xenial screenfetch

                nice πŸ™‚ https://github.com/ubports/docs.ubports.com/pull/148

                1 Reply Last reply Reply Quote 2
                • First post
                  Last post