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

Share data between ub and waydroid

Scheduled Pinned Locked Moved Waydroid
9 Posts 6 Posters 3.2k 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.
    • 0 Offline
      007fred50
      last edited by 15 Jun 2022, 14:22

      Hello,

      Is it posible to share data from ubuntu touch and waydroid??

      Best regards
      007fred50

      L 1 Reply Last reply 15 Jun 2022, 14:43 Reply Quote 0
      • L Offline
        Luksus @007fred50
        last edited by Luksus 15 Jun 2022, 14:43

        @007fred50 my way, if I need it really, is to copy a file directly into the waydroid container data, using the therminal, for example:
        sudo cp myFile /home/phablet/.local/share/waydroid/data/media/0/Documents

        /home/phablet/.local/share/waydroid/data/media/0 is the users home directory in the android container.

        Devices: BQ e4.5, Fairphone 2, Fairphone 3, Lenovo X605F, Pinephone, Moto Z2 Force, OnePlus5T

        E 1 Reply Last reply 15 Jun 2022, 16:21 Reply Quote -1
        • E Offline
          Emphrath @Luksus
          last edited by 15 Jun 2022, 16:21

          @luksus yep, same here. I made a folder named waydroid pictures where i copy pictures I want to be able to use in the container, and then I usz cp -r * to copy the contents to the relevant waydroid data folder

          1 Reply Last reply Reply Quote 0
          • L Offline
            Luksus
            last edited by Luksus 16 Jun 2022, 07:11

            I found a better way:

            1. Create a folder for example "share" in /home/phablet, so the resulting path is /home/phablet/share.
            2. Then edit the file nano /var/lib/waydroid/lxc/waydroid/config_nodes:
              • add a new mount entry at the end:
                lxc.mount.entry = /home/phablet/share data/media/0/share none bind,create=dir,optional 0 0
            3. Save and close (Ctrl-X) and start/restart waydroid.

            Then you will have access to all files in the folder "share" from both sides.

            EDIT
            Somehow, the lxc container is changing directory permissions on the mounted directory, which makes "share" only accessible by sudo from the UT-side... Maybe the mount entry must be adjusted, but I don't know how yet.
            Hm, somehow Android is changing permissions as soon as the folder is accessed.
            So that is not an optimal solution currently...

            Devices: BQ e4.5, Fairphone 2, Fairphone 3, Lenovo X605F, Pinephone, Moto Z2 Force, OnePlus5T

            Z 0 2 Replies Last reply 16 Jun 2022, 07:26 Reply Quote 0
            • Z Offline
              zubozrout @Luksus
              last edited by 16 Jun 2022, 07:26

              @luksus This looks great. But I've noticed that when I run sudo waydroid upgrade it will overwrite any changes so one may need to insert it to "/var/lib/waydroid/lxc/waydroid/config_nodes" every time an update is executed.

              I 1 Reply Last reply 20 Jun 2022, 12:23 Reply Quote 0
              • I Offline
                isndwx @zubozrout
                last edited by 20 Jun 2022, 12:23

                For me the best working solution was to configure a samba server and share some directories for waydroid. Here is the problem, that the next OTA-Update will destroy the configuration (when i have time, i will try libertine to configure a samba server). So i changed to this solution:

                • on waydroid i installed termux and termux:boot
                • in termux i installed filebrowser: https://github.com/filebrowser/filebrowser
                • for termux:boot i wrote a startup script to start filebrowser at boot time

                Now i can access the IP from filebrowser in the webbrowser and there i can download and upload files.

                K 1 Reply Last reply 20 Jun 2022, 16:40 Reply Quote 0
                • K Online
                  Keneda @isndwx
                  last edited by 20 Jun 2022, 16:40

                  @isndwx said in Share data between ub and waydroid:

                  Here is the problem, that the next OTA-Update will destroy the configuration

                  Not necessarily, as it depends on wich files/folder are updated/overwrited.

                  I for example modded a file in messaging app to custom bubble text colors, and for the last 3 OTA, it stayed like that as the modded file was not updated.

                  On the other hand, if you switch channel, all files are overwrited, and there you loose any mod.

                  But as you said, better is to stay in known territory.

                  2015-2023 : Meizu MX4 ☠️⚰️✝️
                  2023-2024 : Nexus 5 ☠️⚰️✝️
                  2024-***** : FPOS Fairphone 5 waiting UT for freedom 😉
                  🇲🇫🇬🇧

                  1 Reply Last reply Reply Quote 0
                  • 0 Offline
                    007fred50 @Luksus
                    last edited by 27 Jun 2022, 20:48

                    @luksus hello

                    i trying to make folder share between ubuntu touch and waydroid

                    i use (lxc.mount.entry = /home/phablet/share data/media/0/share none bind,create=dir,optional 0 0)

                    but no data in waydroid side.

                    Best Regards
                    007fred50

                    1 Reply Last reply Reply Quote 0
                    • 0 Offline
                      007fred50
                      last edited by 29 Jun 2022, 18:18

                      Hello,

                      Can i use (lxc.mount.entry) to share my sdcard ???
                      Or do i have to share a folder inside home folder like (/home/phablet/share)???

                      Thanks for your time

                      Best Regards
                      007fred50

                      1 Reply Last reply Reply Quote 0
                      • K Keneda referenced this topic on 13 Dec 2022, 05:45
                      • C chris_bavaria referenced this topic on 15 Feb 2023, 14:42
                      • C chris_bavaria referenced this topic on 15 Feb 2023, 14:42
                      • First post
                        Last post