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

root partition's size on different phone

Scheduled Pinned Locked Moved Support
aptopencvroot partitionroot
13 Posts 6 Posters 1.7k 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
      bigwang
      last edited by 28 Jun 2020, 10:45

      After the nexus 5 mobile phone is installed with ubuntu touch, the root partition is only 2Gb, and I basically have no way to install any packages using apt. I checked some information and community posts, there is no feasible way to help make the root partition bigger.

      I have a few questions

      1. What is the basis for ubuntu touch to assign the root partition;
      2. If I install ubuntu touch with a large storage phone, does the root partition become larger?

      Advanced issues

      1. Is there any way to adjust the root partition as needed
      2. How to install opencv on ubuntu touch

      Thanks to everyone who tried to help

      1 Reply Last reply Reply Quote 0
      • L Offline
        Lakotaubp
        last edited by 28 Jun 2020, 12:13

        Apt outside of a Libertine container is a very bad idea so much so it got anther mention in a Q&A https://ubports.com/blog/ubports-blog-1/post/ubuntu-touch-q-a-77-279 Libertine setup is in the System Settings if you want to try, but you probably no that all ready.

        B 1 Reply Last reply 5 Jul 2020, 10:16 Reply Quote 0
        • K Offline
          kugiigi
          last edited by 28 Jun 2020, 14:58

          As mentioned, apt isn't really supported in UT because its rootfs is mounted as read-only. You can still use apt though and even resize the rootfs if you really want and accept the risk and consequences. In general, using apt won't break your device unless maybe you remove a vital package in the system. OTA updates may remove all your changes in the root or in rare instances perhaps have conflict with your changes and break your system.

          Anyway, if you really want to resize your rootfs, you can search in this forum, I believe there's a post with the commands on how to do it.

          B 1 Reply Last reply 5 Jul 2020, 10:19 Reply Quote 0
          • B Offline
            bigwang @Lakotaubp
            last edited by 5 Jul 2020, 10:16

            @Lakotaubp Thanks for the reply, but I need to use apt to install, for example, I want to install opencv. Why is there so little root partition capacity? If installing with a large-capacity mobile phone, can the root partition become larger?

            1 Reply Last reply Reply Quote 0
            • B Offline
              bigwang @kugiigi
              last edited by 5 Jul 2020, 10:19

              @kugiigi Thanks for the reply, but I need to use apt to install, for example, I want to install opencv. Tried some of the methods provided in the community, and it was unsuccessful. Why is there so little root partition capacity? If installing with a large-capacity mobile phone, can the root partition become larger?

              K 1 Reply Last reply 5 Jul 2020, 11:05 Reply Quote 0
              • K Offline
                kugiigi @bigwang
                last edited by 5 Jul 2020, 11:05

                @bigwang I think the size is mainly because of the limitation in android-based devices...I believe it's the cache partition which is used for applying updates. These are the commands I used to resize on my Nexus 5. DO THIS AT YOUR OWN RISK AND DON"T BLAME ME FOR ANYTHING THAT WILL HAPPEN :face_with_tears_of_joy:
                This resizes it to 5GB.

                sudo dd if=/dev/null of=/userdata/system.img bs=1MiB seek=5000 count=0
                sudo e2fsck -f /userdata/system.img
                sudo resize2fs -f /dev/loop0
                
                B 1 Reply Last reply 5 Jul 2020, 11:42 Reply Quote 0
                • L Offline
                  Lakotaubp
                  last edited by 5 Jul 2020, 11:14

                  Or if you insist on using apt you break the system 🙂

                  B 1 Reply Last reply 5 Jul 2020, 11:46 Reply Quote 0
                  • B Offline
                    bigwang @kugiigi
                    last edited by 5 Jul 2020, 11:42

                    @kugiigi Thanks, I know the risks. But after I executed three commands in sequence, the root partition was still 2G. I don't know what went wrong.WechatIMG2.jpeg WechatIMG1.jpeg

                    K 1 Reply Last reply 6 Jul 2020, 04:00 Reply Quote 0
                    • B Offline
                      bigwang @Lakotaubp
                      last edited by 5 Jul 2020, 11:46

                      @Lakotaubp Well, because I have to install OpenCV. If you know how to install or whether the root partition of a large-capacity mobile phone will also become larger, please let me know, thank you.

                      A 1 Reply Last reply 5 Jul 2020, 12:02 Reply Quote 0
                      • A Offline
                        AppLee @bigwang
                        last edited by 5 Jul 2020, 12:02

                        @bigwang
                        You need to install OpenCV ?
                        That is not a utility program, but a library.
                        So if you're trying to build an app using OpenCV then you should start by reading how to make apps for Ubuntu Touch.
                        Dependencies are a bit tricky and you can either copy the binary lib within you click package or compile the library along with your code.

                        If OpenCV is a dependency for another app, then use Libertine container.

                        Understand what is blocking you and follow our instructions. Insisting in your direction won't probably help you achieve your goal. Resizing the rootfs and mounting it RW is 99% a bad idea.

                        1 Reply Last reply Reply Quote 1
                        • S Offline
                          stefwe
                          last edited by 5 Jul 2020, 14:08

                          Camera scanner is using opencv https://open-store.io/app/camerascanner.jonnius

                          if your app also needs opencv you can look there how to handle that dependencie

                          Meizu MX4 16.04 | Nexus 5 16.04

                          1 Reply Last reply Reply Quote 1
                          • K Offline
                            kugiigi @bigwang
                            last edited by 6 Jul 2020, 04:00

                            @bigwang Sorry, I forgot to say that this doesn't work while booted anymore. It was working before but now it's not. You have to do it in recovery or fastboot

                            1 Reply Last reply Reply Quote 0
                            • D Offline
                              dobey
                              last edited by 6 Jul 2020, 18:28

                              Why can't you install OpenCV in libertine?

                              1 Reply Last reply Reply Quote 0
                              3 out of 13
                              • First post
                                3/13
                                Last post