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

    Anbox installation - Troubleshooting

    Scheduled Pinned Locked Moved Support
    21 Posts 4 Posters 5.6k Views 3 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.
      • M Offline
        markh4b
        last edited by

        Ah, this clears up some of the issues. I also have a libertine container on the M10, maybe I could set up anbox inside that container?

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

          That is an interesting idea... no idea if it would work, though. But there's only one way to find out! πŸ™‚

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

          1 Reply Last reply Reply Quote 0
          • M Offline
            markh4b
            last edited by

            Same problem for the container. Installing snapd does not work because there is not enough space availabel. Guess I'll have to try partitioning then. There is no crucial data on the device, so installing a clean Ubuntu Touch if something fails will not bring me any pain.

            Do you have any instructions on how to do it? I found some instructions, but they were not really explaining what each command does, and there seem to be different approaches.

            advocatuxA 1 Reply Last reply Reply Quote 0
            • advocatuxA Offline
              advocatux @markh4b
              last edited by

              installing a clean Ubuntu Touch if something fails will not bring me any pain

              @markh4b just a reminder. You can do that or just do a "Factory Reset" to have your device in a clean state again πŸ˜‰

              1 Reply Last reply Reply Quote 0
              • M Offline
                markh4b
                last edited by markh4b

                So, back to installing anbox into a libertine container at the moment.

                • First I tried cloning the installer from github. This told me that it is deprecated and that I should install via snap.
                • Installation of snap (to be specific: 'snapd') requires the apparmor package in the container.
                • Installation of apparmor failed:

                E: Sub-process /usr/bin/dpkg returned an error code (1)
                Reading package lists...
                Building dependency tree...
                Reading state information...
                0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                After this operation, 0 B of additional disk space will be used.
                Setting up apparmor (2.10.95-0ubuntu2.9) ...
                mktemp: failed to create file via template: '/run/user/32011/confined/com.ubuntu.terminal/tmp.XXXXXXXXXX': No such file or directory

                • Tried it via adb shell then, with the following output (apparently it already has apparmor)

                libertine-container-manager install-package -p apparmor
                Hit:1 http://ports.ubuntu.com/ubuntu-ports xenial InRelease
                Hit:2 http://ppa.launchpad.net/ci-train-ppa-service/stable-phone-overlay/ubuntu xenial InRelease
                Hit:3 http://ports.ubuntu.com/ubuntu-ports xenial-updates InRelease
                Reading package lists...
                Reading package lists...
                Building dependency tree...
                Reading state information...
                apparmor is already the newest version (2.10.95-0ubuntu2.9).
                0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                1 not fully installed or removed.
                After this operation, 0 B of additional disk space will be used.
                Setting up apparmor (2.10.95-0ubuntu2.9) ...
                update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
                diff: /var/lib/apparmor/profiles/.apparmor.md5sums: No such file or directory
                Reading package lists...
                Building dependency tree...
                Reading state information...
                0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                ChrootContainer.py:235: INFO: _run_ldconfig(): Refreshing the container's dynamic linker run-time bindings...

                • Installing snapd from adb shell worked fine, now on to installing the actual anbox. This gave me massive errors:

                libertine-container-manager exec -c "snap install --devmode --beta anbox"
                panic: user: lookup userid 32011: no such file or directory [recovered]
                panic: user: lookup userid 32011: no such file or directory

                goroutine 1 [running]:
                panic(0xab7e5e78, 0xbbe986d8)
                /usr/lib/go-1.6/src/runtime/panic.go:481 +0x370
                main.main.func1()
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:370 +0x7c
                panic(0xab7e5e78, 0xbbe986d8)
                /usr/lib/go-1.6/src/runtime/panic.go:443 +0x490
                github.com/snapcore/snapd/client.storeAuthDataFilename(0x0, 0x0, 0x0, 0x0)
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/client/login.go:99 +0xb4
                github.com/snapcore/snapd/client.readAuthData(0x0, 0x0, 0x0)
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/client/login.go:135 +0x34
                github.com/snapcore/snapd/client.(*Client).setAuthorization(0xbbe8cff0, 0xbbe55420, 0x0, 0x0)
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/client/client.go:133 +0x34
                github.com/snapcore/snapd/client.(*Client).raw(0xbbe8cff0, 0xab879b08, 0x4, 0xbbea4310, 0xf, 0x0, 0xbbea2780, 0xf56ca6d8, 0xbbe7a780, 0xab33b8dc, ...)
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/client/client.go:191 +0x2c0
                github.com/snapcore/snapd/client.(*Client).do(0xbbe8cff0, 0xab879b08, 0x4, 0xbbea4310, 0xf, 0x0, 0xbbea2780, 0xf56ca6d8, 0xbbe7a780, 0xab7e6500, ...)
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/client/client.go:236 +0x114
                github.com/snapcore/snapd/client.(*Client).doAsyncFull(0xbbe8cff0, 0xab879b08, 0x4, 0xbbea4310, 0xf, 0x0, 0xbbea2780, 0xf56ca6d8, 0xbbe7a780, 0x0, ...)
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/client/client.go:300 +0xc8
                github.com/snapcore/snapd/client.(*Client).doAsync(0xbbe8cff0, 0xab879b08, 0x4, 0xbbea4310, 0xf, 0x0, 0xbbea2780, 0xf56ca6d8, 0xbbe7a780, 0x0, ...)
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/client/client.go:293 +0x7c
                github.com/snapcore/snapd/client.(*Client).doSnapAction(0xbbe8cff0, 0xab87d248, 0x7, 0xffe21818, 0x5, 0xbbe8e7b0, 0x0, 0x0, 0x0, 0x0)
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/client/snap_op.go:167 +0x4ac
                github.com/snapcore/snapd/client.(*Client).Install(0xbbe8cff0, 0xffe21818, 0x5, 0xbbe8e7b0, 0x0, 0x0, 0x0, 0x0)
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/client/snap_op.go:85 +0x68
                main.(*cmdInstall).installOne(0xbbe8e510, 0xffe21818, 0x5, 0xbbe8e7b0, 0x0, 0x0)
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/cmd/snap/cmd_snap_op.go:356 +0x19c
                main.(*cmdInstall).Execute(0xbbe8e510, 0xbbea2500, 0x0, 0x4, 0x0, 0x0)
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/cmd/snap/cmd_snap_op.go:465 +0x278
                github.com/snapcore/snapd/vendor/github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xbbdcfbc0, 0xbbd64098, 0x4, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0)
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/vendor/github.com/jessevdk/go-flags/parser.go:316 +0x918
                github.com/snapcore/snapd/vendor/github.com/jessevdk/go-flags.(*Parser).Parse(0xbbdcfbc0, 0x0, 0x0, 0x0, 0x0, 0x0)
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/vendor/github.com/jessevdk/go-flags/parser.go:186 +0xac
                main.run(0x0, 0x0)
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:391 +0x30
                main.main()
                /build/snapd-754fGy/snapd-2.34.2/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:375 +0xb6c

                Might have to do with git not being installed? Let's try that again. Nope, still the same output with git installed in the container.

                1 Reply Last reply Reply Quote 0
                • M Offline
                  markh4b
                  last edited by

                  Update: Meanwhile I tried repartitioning the device with a method from here: The one that increases the partition size to 6gb (previous partition size was 2gb, checked that beforehand). Now the device still boots correctly and works normally, but adb shell connection gets stuck on updates/installations somewhere between 90% and 100%. Error message is usually that the device is out of memory.

                  arubislanderA 1 Reply Last reply Reply Quote 0
                  • arubislanderA Offline
                    arubislander @markh4b
                    last edited by arubislander

                    @markh4b I get the same results as you trying to install a snap inside a libertine container. I think it has something to do with it the fact that the exec command does not set up the same bindings as the libertine-launch command does.

                    Concerning the errors when installing from the 'repartitioned' filesystem, could you post the exact error message?

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

                    M D 2 Replies Last reply Reply Quote 0
                    • M Offline
                      markh4b @arubislander
                      last edited by

                      @arubislander It was a really generic message, such as "not enough space left on device". I cannot remember exactly, and I can offer to reproduce it from the 12th of August onward. Currently the device is flashed with Android, instead of Ubuntu.

                      arubislanderA 1 Reply Last reply Reply Quote 0
                      • arubislanderA Offline
                        arubislander @markh4b
                        last edited by

                        @markh4b Ah, OK. That's an out-of-storage-space error. Either the extra 4 Gigs were still not enough or the filesystem was not expanded to make use of the extra space.

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

                        M 1 Reply Last reply Reply Quote 0
                        • M Offline
                          markh4b @arubislander
                          last edited by markh4b

                          @arubislander Probably the latter, because I hardly understand whether the commands are sufficient:

                          $ sudo -s
                          # dd if=/dev/null of=/userdata/ubuntu.img bs=1M seek=6000 count=0
                          # resize2fs -f /userdata/ubuntu.img
                          # reboot

                          My best guess is that it seeks 6000 blocks of size 1 megabyte each, and writes those to a file ubuntu.img, then resizes/expands the root partition with this new file and reboots?

                          arubislanderA D 2 Replies Last reply Reply Quote 0
                          • arubislanderA Offline
                            arubislander @markh4b
                            last edited by

                            @markh4b
                            Yes, I don't understand the seek part myself. But my guess is that it just increases the size of whatever file was already there.
                            But the resize command should result in the filesystem using the newly created space.

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

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

                              @arubislander said in Anbox installation - Troubleshooting:

                              @markh4b I get the same results as you trying to install a snap inside a libertine container. I think it has something to do with it the fact that the exec command does not set up the same bindings as the libertine-launch command does.

                              Sounds plausible. Did you try with libertine-launch?

                              arubislanderA 1 Reply Last reply Reply Quote 0
                              • D Offline
                                doniks @markh4b
                                last edited by doniks

                                @markh4b said in Anbox installation - Troubleshooting:

                                @arubislander Probably the latter, because I hardly understand whether the commands are sufficient:

                                $ sudo -s
                                # dd if=/dev/null of=/userdata/ubuntu.img bs=1M seek=6000 count=0
                                # resize2fs -f /userdata/ubuntu.img
                                # reboot

                                My best guess is that it seeks 6000 blocks of size 1 megabyte each, and writes those to a file ubuntu.img, then resizes/expands the root partition with this new file and reboots?

                                I don't understand it either. I simply do resize2fs ubuntu.img 5G from TWRP. No dd needed. (And certainly no sudo !). At most it might want you to fsck -y, but resize2fs will tell you if it's needed

                                1 Reply Last reply Reply Quote 0
                                • arubislanderA Offline
                                  arubislander @doniks
                                  last edited by

                                  @doniks said in Anbox installation - Troubleshooting:

                                  Sounds plausible. Did you try with libertine-launch?

                                  Yes, I did. It tells me it cannot find the snap command. Furhtermore: libertine-launch apt search snap | grep snap returns only

                                  libsnappy1v5/now 1.1.3-2 armhf [installed,local]
                                  

                                  I would have expected at least snapd to appear in that list.

                                  πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                                  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 0
                                  • D Offline
                                    doniks @arubislander
                                    last edited by

                                    @arubislander

                                    Waaait a minute. First you said

                                    @arubislander said in Anbox installation - Troubleshooting:

                                    @markh4b I get the same results as you trying to install a snap inside a libertine container.

                                    I understood that you were referring to @markh4b post where he describes a botched attempt of installing some packages via apt and running out of diskspace, however at the end he has snap installed nevertheless, but not working properly.

                                    Now you say

                                    Furhtermore: libertine-launch apt search snap | grep snap returns only

                                    libsnappy1v5/now 1.1.3-2 armhf [installed,local]
                                    

                                    I would have expected at least snapd to appear in that list.

                                    Now I'm confused. Which way is it? Are you getting the same results as @markh4b or are you failing at a totally different step where snap is not even being offered to be installed from apt?

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

                                      @doniks said in Anbox installation - Troubleshooting:

                                      Which way is it? Are you getting the same results as @markh4b or are you failing at a totally different step where snap is not even being offered to be installed from apt?

                                      It is both. I can do libertine-container-manager install-package -p snapd and the package gets installed. It even shows that it is installed in the Libertine GUI under the Settings. And after that I get the same results as @markh4b did. But the snapd package does not show up in the list with libertine-launch apt search snap | grep snap.

                                      The two things are probably totally unrelated. The reason snapd does not work in the container, I guess, is that since the libertine container is a chroot, it doesn't use systemd, and snapd depends on systemd to work properly. The reason the snapd package does not show up in a apt search snap I cannot begin to guess about.

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

                                      1 Reply Last reply Reply Quote 1
                                      • D Offline
                                        doniks
                                        last edited by

                                        Strange.

                                        arubislanderA 1 Reply Last reply Reply Quote 0
                                        • arubislanderA Offline
                                          arubislander @doniks
                                          last edited by

                                          @doniks
                                          when I do: libertine-container-manager exec -c 'apt update && apt search snapd' I do get the snapd package listed. So, that mystery is also solved.

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

                                          1 Reply Last reply Reply Quote 0
                                          • M Offline
                                            markh4b
                                            last edited by

                                            Another update: Tried anbox on my desktop first, and there are lots of issues with the apps. So most likely I'll leave Android installed on the tablet directly.

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