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

    Installing additional Android app's in Anbox on Ubuntu Touch

    Scheduled Pinned Locked Moved Support
    12 Posts 7 Posters 7.4k Views 2 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.
      • B Offline
        BlandCorporation
        last edited by

        Hey there

        I'm new to Anbox but am thinking about this as well. As far as I can figure, some APKs are at the directory ~/anbox-data/rootfs/system/app. So, for example, the path of the Android Calendar application is as follows:

        /home/phablet/anbox-data/rootfs/system/app/Calendar/Calendar.apk
        

        I had figured on changing to that directory, creating a directory for a new application and then adding its APK to that new directory. I'm not sure how to kill Anbox properly, but the following steps seem to work somewhat:

        sudo apt install psmisc
        killall anbox
        

        Having "killed" Anbox I want to create a new directory for an application and add the application, in a way like the following:

        mkdir /home/phablet/anbox-data/rootfs/system/app/Funkytunes
        cd /home/phablet/anbox-data/rootfs/system/app/Funkytunes
        wget https://github.com/funkyg/funkytunes/releases/downlad/0.2.1/funkytunes-0.2.1.apk
        chmod 755 funkytunes-0.2.1.apk
        

        However, when I attempt to do this, I am told that the filesystem of Anbox is read-only:

        phablet@ubuntu-phablet:~/anbox-data/rootfs/system/app$ touch Funkytunes
        touch: cannot touch 'Funkytunes': Read-only file system
        

        I'm not sure how to go past this. Any ideas?

        1 Reply Last reply Reply Quote 0
        • T Offline
          tomoqv
          last edited by

          To install apps from apk you need to do the following:

          Copy the apk to /home/phablet/anbox-data/data

          Login to android container on your phone:
          lxc-console -ndefault -P /home/phablet/anbox-data/containers -t0

          cd into data/ then and use pm install [appname].apk

          Sorry, I don't know how to do code formatting on this forum...

          O 1 Reply Last reply Reply Quote 0
          • T Offline
            tomoqv
            last edited by

            I tried out Anbox on my Pro 5 again. Unfortunately it still breaks the SIM discovery, but I was able to install quite a few apps via apk. Most of them start, and pretty rapidly too, but some say they "...don't work without the Google Play services, which are not supported on this unit" while others start fine but can't integrate properly with e.g. bluetooth. None of the Android apps or settings show an OSK, but input is possible via an external BT keyboard.

            It is nice to see that it kind of works, although not all the way. But of course no mobile is a show stopper.

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              Stefano @tomoqv
              last edited by

              @tomoqv Apparently Marius has a updated Anbox image on his desktop, and no more problem with the sim functionality. But he is busy to update the anbox images on the website, or doesn't want to share. I've asked 3 times for it. 🙂

              T 1 Reply Last reply Reply Quote 0
              • T Offline
                tomoqv @Stefano
                last edited by

                @stefano
                C'mon @mariogrip , feed the hungry testers :-D!

                1 Reply Last reply Reply Quote 1
                • P Offline
                  padraic
                  last edited by

                  @tomoqv Thanks for that, it worked for me just this morning.

                  I installed fdroid which was exciting, unfortunately I can't seem to bring up the keyboard in any anbox app so far however.

                  1 Reply Last reply Reply Quote 1
                  • B Offline
                    BlandCorporation
                    last edited by

                    @tomoqv Ah, magic! That worked perfectly, thanks. 😄 Basically all applications I've tried have worked so far which is awesome. Would you happen to know the status for keyboard interactions? Are you aware of a way to get the onscreen Ubuntu keyboard to send keystrokes to the running Anbox application?

                    By the way, the code formatting is done using standard Markdown syntax. So, if I wanna display some Python code, like this:

                    a = 1
                    

                    then I just write some Markdown code like this:

                    ```Python
                    a = 1
                    ```

                    T 1 Reply Last reply Reply Quote 2
                    • T Offline
                      tomoqv @BlandCorporation
                      last edited by

                      @blandcorporation
                      No, I have had no success with the OSK in Android apps. I was hoping that @mariogrip would chime in on this.

                      1+1 = 2
                      

                      Got it, thanks!

                      1 Reply Last reply Reply Quote 0
                      • O Offline
                        oxwivi @tomoqv
                        last edited by oxwivi

                        @tomoqv said in Installing additional Android app's in Anbox on Ubuntu Touch:

                        To install apps from apk you need to do the following:

                        Copy the apk to /home/phablet/anbox-data/data

                        Login to android container on your phone:
                        lxc-console -ndefault -P /home/phablet/anbox-data/containers -t0

                        cd into data/ then and use pm install [appname].apk

                        Sorry, I don't know how to do code formatting on this forum...

                        Sorry for reviving this old thread, but this method didn't work for me. I'm helping a friend with this because there's not enough space to install ADB; first the lxc-console command failed because default was not running, and I found with lxc-ls the container is called android, but again the output was android is not running. I couldn't go to the next step of pm install.

                        For context, the exact commands were:

                        $ sudo lxc-console -ndefault -P anbox-data/containers -t0
                        $ sudo lxc-ls --fancy
                        $ sudo lxc-console -nandroid -P anbox-data/containers -t0
                        
                        LakotaubpL 1 Reply Last reply Reply Quote 0
                        • LakotaubpL Offline
                          Lakotaubp @oxwivi
                          last edited by Lakotaubp

                          @oxwivi There is very little point in restarting an old thread, things have moved on a lot. Please start a new thread and say what device you are trying to install Anbox on. It does not work on all devices I think. Also have a search of the Forum for Anbox issues for that device your issue may already have been solved. Thanks. I will now lock this one.

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