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

    Is it possible to block ads via hosts file on UT?

    Scheduled Pinned Locked Moved Solved Support
    hostsadsblock
    32 Posts 8 Posters 5.1k 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.
      • AppLeeA Offline
        AppLee @Opolork
        last edited by

        @opolork I don't remember,
        But I think it can be turned off.
        What is important is to select the proper blacklist(s) and to update them once in a while.
        Also I noticed a couple of time the app crashed silently, but a reboot fixed it for months.

        OpolorkO 1 Reply Last reply Reply Quote 0
        • OpolorkO Offline
          Opolork @AppLee
          last edited by

          @applee said in Is it possible to block ads via hosts file on UT?:

          @opolork I don't remember,
          But I think it can be turned off.
          What is important is to select the proper blacklist(s) and to update them once in a while.
          Also I noticed a couple of time the app crashed silently, but a reboot fixed it for months.

          I checked all the blocked lists, it's now updated to today. 🙂

          How can you trust that an app really won't send some company your location data, when you tell it not to? The only way you can trust a program not to do something it isn't supposed to do is if it is free software. ~ RMS

          1 Reply Last reply Reply Quote 1
          • OpolorkO Offline
            Opolork
            last edited by

            Does uAdBlock rewrite the whole /etc/hosts file everytime it updates it or does it only change it's own entries? In other words - do custom entries someone would make in /etc/hosts be overwritten every time uAdBlock does its stuff?

            How can you trust that an app really won't send some company your location data, when you tell it not to? The only way you can trust a program not to do something it isn't supposed to do is if it is free software. ~ RMS

            AppLeeA 1 Reply Last reply Reply Quote 0
            • AppLeeA Offline
              AppLee @Opolork
              last edited by

              @opolork
              I don't know about that.
              Maybe you can make some tests if nobody knows...

              Good question though

              1 Reply Last reply Reply Quote 1
              • OpolorkO Offline
                Opolork
                last edited by

                Is it possible to access the /etc/hosts from my PC? I find editing on a smartphone to be too cumbersome. I'd like to open them the hosts file on a text editor on my PC (Debian 11) and do a few edits.

                How can you trust that an app really won't send some company your location data, when you tell it not to? The only way you can trust a program not to do something it isn't supposed to do is if it is free software. ~ RMS

                AppLeeA 1 Reply Last reply Reply Quote 0
                • AppLeeA Offline
                  AppLee @Opolork
                  last edited by

                  @opolork
                  You can do it using ADB or SSH...

                  OpolorkO 1 Reply Last reply Reply Quote 0
                  • OpolorkO Offline
                    Opolork @AppLee
                    last edited by

                    @applee Which is easier? Do you know a basic/quick method?

                    How can you trust that an app really won't send some company your location data, when you tell it not to? The only way you can trust a program not to do something it isn't supposed to do is if it is free software. ~ RMS

                    FuseteamF AppLeeA 2 Replies Last reply Reply Quote 0
                    • FuseteamF Offline
                      Fuseteam @Opolork
                      last edited by

                      @opolork do keep in mind that the hosts file is readonly for a reason. any changes will be lost after an ota update, uAdBlock know how to restore it changes, but it might become tedious for you to restore your changes

                      OpolorkO 1 Reply Last reply Reply Quote 1
                      • OpolorkO Offline
                        Opolork @Fuseteam
                        last edited by

                        @fuseteam Ok, it'd be best to let uAdBlock maange it so. Thank you. 🙂

                        How can you trust that an app really won't send some company your location data, when you tell it not to? The only way you can trust a program not to do something it isn't supposed to do is if it is free software. ~ RMS

                        1 Reply Last reply Reply Quote 1
                        • AppLeeA Offline
                          AppLee @Opolork
                          last edited by

                          @opolork

                          Both are really simple.
                          For ADB (which I do not use) you can type a single command like this adb shell sh after connecting your device with USB cable.

                          SSH allows you to avoid the cable and use the wifi instead.
                          But you need to configure it first using UT Tweak Tool.
                          I don't remember if it's required, but I will advise to push a public key to your device so you won't have to enter a passphrase.
                          To connect with SSH you just type ssh phablet@<ip_address>...

                          OpolorkO 2 Replies Last reply Reply Quote 3
                          • D Offline
                            domubpkm
                            last edited by

                            uAdBlock blocks at the DNS level and unfortunately some lists cannot act and be installed at this level. This means that uAdBlock, although useful, is becoming less and less effective as time goes by, unfortunately, given the evolution of technologies for installing crap on computers...

                            1 Reply Last reply Reply Quote 1
                            • N Offline
                              nero355 @Opolork
                              last edited by nero355

                              @opolork said in Is it possible to block ads via hosts file on UT? [Resolved]:

                              That seems a bit too complex and involved for my liking.

                              I am using it now for about 5 years or so and it's AWESOME!!! 😄

                              I can recommend running Pi-Hole + Unbound to pretty much EVERYONE who has a spare Raspberry Pi laying around!

                              @domubpkm said in Is it possible to block ads via hosts file on UT? [Resolved]:

                              uAdBlock blocks at the DNS level and unfortunately some lists cannot act and be installed at this level. This means that uAdBlock, although useful, is becoming less and less effective as time goes by, unfortunately, given the evolution of technologies for installing crap on computers...

                              Things like DNS over HTTPS and ads beeing hosted on the same server as the content (YouTube for example!) are becoming a much bigger issue IMHO :pouting_face:

                              But fortunately you can still block a lot of stuff via DNS so I am very happy with that method on my home network! 🙂

                              My phones :

                              • BQ Aquaris E5 HD Ubuntu Phone Edition - Ubuntu Touch 16.04 LTS
                              • ZUK Z2 Pro - ZUI Android 8.x
                              • Xiaomi Mi 9T - Jolla SailFish 3.4.x Community Build

                              P.S. : I am NOT a developer! ;)

                              OpolorkO 1 Reply Last reply Reply Quote 1
                              • OpolorkO Offline
                                Opolork @AppLee
                                last edited by Opolork

                                @applee said in Is it possible to block ads via hosts file on UT? [Resolved]:

                                For ADB (which I do not use) you can type a single command like this adb shell sh after connecting your device with USB cable.

                                Hi AL.

                                So I just need to install the adb package on my PC?

                                Is the adb shell sh run from my PC?

                                How can you trust that an app really won't send some company your location data, when you tell it not to? The only way you can trust a program not to do something it isn't supposed to do is if it is free software. ~ RMS

                                AppLeeA 1 Reply Last reply Reply Quote 0
                                • OpolorkO Offline
                                  Opolork @nero355
                                  last edited by

                                  @nero355 Hi Nero. Thanks but I'll stick to the simpler method for now. 🙂

                                  Merry Xmas!

                                  How can you trust that an app really won't send some company your location data, when you tell it not to? The only way you can trust a program not to do something it isn't supposed to do is if it is free software. ~ RMS

                                  1 Reply Last reply Reply Quote 1
                                  • AppLeeA Offline
                                    AppLee @Opolork
                                    last edited by

                                    @opolork
                                    Yes you should open a console and type it on your computer with the device attached to it.

                                    OpolorkO 1 Reply Last reply Reply Quote 1
                                    • OpolorkO Offline
                                      Opolork @AppLee
                                      last edited by

                                      @applee Ok, cheers, AL. 🙂

                                      Merry Xmas!

                                      How can you trust that an app really won't send some company your location data, when you tell it not to? The only way you can trust a program not to do something it isn't supposed to do is if it is free software. ~ RMS

                                      1 Reply Last reply Reply Quote 1
                                      • OpolorkO Offline
                                        Opolork @AppLee
                                        last edited by

                                        @applee said in Is it possible to block ads via hosts file on UT? [Resolved]:

                                        For ADB (which I do not use) you can type a single command like this adb shell sh after connecting your device with USB cable.

                                        I got this:

                                        adb shell sh

                                        error: no devices/emulators found

                                        How can you trust that an app really won't send some company your location data, when you tell it not to? The only way you can trust a program not to do something it isn't supposed to do is if it is free software. ~ RMS

                                        N 1 Reply Last reply Reply Quote 0
                                        • N Offline
                                          nero355 @Opolork
                                          last edited by

                                          @opolork
                                          Did you Enable Developer Mode and USB Debugging ?! 😉

                                          My phones :

                                          • BQ Aquaris E5 HD Ubuntu Phone Edition - Ubuntu Touch 16.04 LTS
                                          • ZUK Z2 Pro - ZUI Android 8.x
                                          • Xiaomi Mi 9T - Jolla SailFish 3.4.x Community Build

                                          P.S. : I am NOT a developer! ;)

                                          OpolorkO 1 Reply Last reply Reply Quote 1
                                          • OpolorkO Offline
                                            Opolork @nero355
                                            last edited by Opolork

                                            @nero355 Hi. Dev mode is enabled. I don't see any option to enable USB debugging.

                                            Edit: I did a reboot and was then able to run adb shell sh to connect to the phone from my PC. The shell doesn't seem to have tab auto complete. Also when I opened a text file on the phone, I couldn't save any changes I made in nano (Ctrl-x did nothing).

                                            How can you trust that an app really won't send some company your location data, when you tell it not to? The only way you can trust a program not to do something it isn't supposed to do is if it is free software. ~ RMS

                                            N 1 Reply Last reply Reply Quote 0
                                            • N Offline
                                              nero355 @Opolork
                                              last edited by

                                              @opolork
                                              Which file were you editing ??

                                              Perhaps because the system needs to be remounted in write mode in order to edit certain files ?

                                              My phones :

                                              • BQ Aquaris E5 HD Ubuntu Phone Edition - Ubuntu Touch 16.04 LTS
                                              • ZUK Z2 Pro - ZUI Android 8.x
                                              • Xiaomi Mi 9T - Jolla SailFish 3.4.x Community Build

                                              P.S. : I am NOT a developer! ;)

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