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

    How to use camera via terminal v4l on Pixel 3A

    Scheduled Pinned Locked Moved Google Pixel 3a/3a XL
    11 Posts 2 Posters 102 Views 1 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.
      • F Offline
        foxx
        last edited by

        I have purchased recently Google Pixel 3a with hope that running Ubuntu Touch on this device will let to access camera via terminal.
        To me the whole point of linux phone was terminal, and it looks obvious. Linux was started in attempt to make terminal to university computer work.

        Camera app both front and back camera works, thogh, it doesn't let to choose capture without flash light.

        Terminal command ls shows
        /dev/video32
        /dev/video33,
        but I couldn't find any documentation on how to manage camera via terminal, which, I hate to write it, looks inferior to termux, though, it's expected.

        Could you please tell, provide links to documentation on how to access camera via terminal, or how to make this function work, i. e. program it, if it doesn't exist?

        Probably someone could maintain camera / video subsystem for Ubuntu Touch and even commit something back to the Linux Kernel, so this featurecan be reused in other distribution, ndon't you think?

        Thank you for your reply.

        ikozI 1 Reply Last reply Reply Quote 0
        • ikozI Offline
          ikoz @foxx
          last edited by

          @foxx You can only see cameras through Qt, see this post for more details.

          May the source be with you

          F 2 Replies Last reply Reply Quote 0
          • F Offline
            foxx @ikoz
            last edited by foxx

            @ikoz thank you, I have already seen this 6 years old post and thought something have changed since then.

            Camera is a proprietary device in itself, it's up to manufacturer to support it.
            All this android HAL could be bypassed altogether, if manufacturers of devices are interested.

            The problem of linux phone is not lack of apps, the problem is no advantages over android/iPhone due to relying on HAL, termux works on both better, than on Ubuntu Touch, let alone other apps.

            There is no addressable market here.
            Hate to write it, but Ubuntu Touch either tries to solve a problem that doesn't exist, or do it in a wrong way.

            Something is missing here.

            ikozI 1 Reply Last reply Reply Quote 0
            • F Offline
              foxx @ikoz
              last edited by

              @ikoz. Well, it addresses the post market android devices, but manufacturers still have no interest to support it whatsoever.
              Somehow it would be nice for linux to support mobile devices too, all these billions of old phones could be used , if linux supports them without HAL, hardware android layer.

              Canonical tried to push Unity using pretty useless Ubuntu Touch, when actual problem was on hardware manufacturers' incentives layer to make unified drivers, so some organization could make actual linux, not gnomes and package managers without underlying layer.

              If there are drivers, and kernel, people could assemble there own display and package managers on top of it.

              Android is the Linux for mobile devices, except it's owned by Google, which might be a good thing.
              Making Android independent from Google probably would facilitate its development, so, this would be Microsoft Windows for smartphones, and deliver unified experience.

              There is no way to reuse obsolete, not supported smartphones, Google and manufacturers are more interested to force customers to buy new devices every couple of years.
              Throwing Capacity of all these phones away is a huge waste, nobody would feel they need raspberries, if their old phones would support linux, because in this way these phones would become free pis with huge bonus of touch screen and battery.

              Probably government could oblige manufacturers to provide drivers , which should comply with some POSIX standards for smartphones and tablets in order to be allowed to sell to the public, so, people could reuse them as personal smart home /web servers by community effort, so, manufacturers also could recoup their investment, and good phones are not thrown away, polluting environment, all these old phones could be assigned for home chores , if there are law, drivers, kernels developers, drivers developers and community behind them.

              Linux complies with POSIX, there is a need for such compliance for smartphone and tablet pcs market.
              As with USB C, some laws could also be introduced and enforced in this regard.

              Any thoughts?

              ikozI 1 Reply Last reply Reply Quote 0
              • ikozI Offline
                ikoz @foxx
                last edited by

                @foxx How does termux work better? Even if you have a rooted device, you still aren't using the familiar GNU/Linux stack. Termux is still an emulator, it modifies the syscalls, and you don't have access to every directory.

                In UT you can do everything you would on a desktop Linux distro but it is more difficult, mainly due to relying on hardware abstraction.
                The only solution to this is using an upstream kernel with complete driver support. This is however a much harder task than the already hard porting process. PostmarketOS does that, and that's why almost none of their devices work fully.

                All manufacturers should mainline their device drivers but none do, instead they use ancient downstream (often bugged) kernels so they can release their product quicker (and cheaper).
                There are exceptions such as the Pinephone(s), which have full mainline kernel support, and allow using devices such as camera in the same way as in a normal Linux device.

                In my view, Ubuntu Touch does solve a problem. It is the closest you can currently get to a normal GNU/Linux system, while retaining the phone's intended functionality (telephony, camera, etc).

                May the source be with you

                1 Reply Last reply Reply Quote 2
                • ikozI Offline
                  ikoz @foxx
                  last edited by

                  @foxx said in How to use camera via terminal v4l on Pixel 3A:

                  Canonical tried to push Unity using pretty useless Ubuntu Touch, when actual problem was on hardware manufacturers' incentives layer to make unified drivers, so some organization could make actual linux, not gnomes and package managers without underlying layer.

                  That's why they wanted to become the manufacturers themselves and started crowdfunding Ubuntu Edge, which would have been an awesome device but it never reached its funding target.

                  Probably government could oblige manufacturers to provide drivers , which should comply with some POSIX

                  People don't understand any of these. Politicians not only don't care about privacy, standards etc, but are busy pushing those stupid laws forbidding end-to-end encryption, I wouldn't expect anything from them.

                  The world is far from perfect and it will always be like that, so you have to make compromises.

                  May the source be with you

                  F 4 Replies Last reply Reply Quote 1
                  • F Offline
                    foxx @ikoz
                    last edited by

                    @ikoz said in How to use camera via terminal v4l on Pixel 3A:

                    @foxx said in How to use camera via terminal v4l on Pixel 3A:

                    Probably government could oblige manufacturers to provide drivers , which should comply with some POSIX

                    People don't understand any of these. Politicians not only don't care about privacy, standards etc, but are busy pushing those stupid laws forbidding end-to-end encryption, I wouldn't expect anything from them.

                    The world is far from perfect and it will always be like that, so you have to make compromises.

                    It depends how you look at it.
                    Europe does not make any money on this market, the US and China does, so European politicians would be interested in such laws to protect their sovereignty.
                    So, people can count on politicians, they listen for interesting initiatives very carefully.

                    European businesses, such as Fairphone , and world community would benefit from such laws.

                    If there were no Netscape litigation, which is based on Political incentives and laws, iPhone would be called Windows Mobile now.

                    1 Reply Last reply Reply Quote 1
                    • F Offline
                      foxx @ikoz
                      last edited by foxx

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • F Offline
                        foxx @ikoz
                        last edited by

                        @ikoz only politicians can force businesses like apple to make their products usable beyond their eol, for instance, Iphone S5 with touch screen and battery is far better than raspberry pi 3 and even 4,
                        If some laws would force manufacturers to publish drivers for post market devices, billions of these phones could work as , for instance, home security cameras, absolutely for free, without competition to manufacturers' offerings.

                        I would prefer to run linux on iphone 5s , would pay for it, instead of using pinephone of any model.
                        They could even make it unusable as a phone for calls, let use it's other capacities.

                        These devices are totally wasted. Some laws can let to utilize them even not as phones, but simply as smart devices.

                        Laws are needed, businesses do not care about this tremendous waste, politicians should.

                        1 Reply Last reply Reply Quote 0
                        • F Offline
                          foxx @ikoz
                          last edited by foxx

                          @ikoz this is freaking stupid.
                          Everyone have old , like 2015 smartphone, which can very easily do ip camera work,and much more.
                          But you can't use it due to bad laws.

                          Instead you ought to buy raspberry pi, buy camera module, find suitable battery, it's like 5-10 times more, than this smartphone's price.
                          And time to assemble it all.

                          You could simply use discharged phone, save $200 right on the spot.

                          Laws, regulation and enforcement are needed to fix it.
                          Government should help free market because free market can't fix itself.

                          ikozI 1 Reply Last reply Reply Quote 0
                          • ikozI Offline
                            ikoz @foxx
                            last edited by

                            @foxx This is getting very off topic, politics are not that related to the issue. I never said that you cannot use your camera, it just has to be interfaced through Halium. You can quickly make an app with Qt that captures frames from the camera, and maybe use the Qt Networking framework to broadcast.

                            May the source be with you

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