How to Block an Android App from Reading the Clipboard with an ADB Command

Поділитися
Вставка
  • Опубліковано 2 сер 2024
  • If you suspect an Android app is accessing your clipboard for no reason, then I can show you how to stop it from happening again.
    ~~~~~
    Hi! Don't forget to like the video, subscribe to the channel, and hit the "Thanks" button on this video, if you can, and join our channel community here - / @explainingandroid
    Video Description
    ~~~~~~~~~~~~~~~~~
    Android apps can easily access your clipboard and in today's video I'll show you how to list all of the apps with this permission while giving you a command that can prevent it from happening again.
    #Android #GooglePixel #SamsungGalaxy
    There have been many news reports of apps like TikTok spying on your clipboard contents and logging keystrokes with its in-app browser. These features are built into Android and can be useful for some applications. But there are times when you know this isn't needed at all.
    I just read a post on the /r/Android subreddit talking about the MX Player app accessing the clipboard each time it is opened.
    Accessing the clipboard when the user is pasting something is one thing, but accessing it each time the app is opened is an invasion of privacy and shouldn't be allowed. Sadly, there isn't a user-facing way of blocking access to your clipboard in Android, but we can do this with a simple ADB command.
    If you don't have ADB & Fastboot tools installed on your PC, be sure to check the video description below as I'll include a link to an easy tool from an XDA forum member that will install the required files for it to work. Not only that, but it can also add a desktop shortcut that will open up the command prompt in the correct directory.
    We also need to enable USB Debugging Mode on your smartphone or tablet, as well. If you aren't sure of how this is done, you'll find the toggle within the hidden developer options menu. I'll have a link to these steps in the video description as well.
    With all of that done, let's go ahead and connect our phone to the PC with a USB cable and then check to see if ADB can recognize your phone.
    If you have not used this on your device before, you'll notice that ADB can't make a connection because access needs to be granted for USB Debugging. This will be requested on the device itself. And once access is allowed you'll see a response like this where it will list your phone's serial number here.
    With that done, I want to show you a command you can use that will list all of the apps that have access to your clipboard.
    The apps in this list may not seem familiar to you, since it's actually listing the application package name instead of the app name itself. But we actually need the package name in order to block access to the clipboard on Android.
    So one way we can find the package name is by executing this command. I'll have this command listed in the video description below for those who just want to copy/paste it into the command prompt.
    But you can also get the package name for an application on your device by installing an app package name viewer from the Google Play Store. This will list things in a much more user-friendly way.
    Either way, you need to grab the package name for the app you want to block clipboard access to.
    If you get an error message in response here, that means something went wrong. But if you don't get any response after executing this command then that means it worked properly.
    It's sad to see apps abusing these permissions on Android but at least there's a way for you to control this with the help of ADB and without needing to have root access to the smartphone or tablet.
    Mentioned Commands
    ~~~~~~~~~~~~~~~~~~~
    adb shell
    cmd appops query-op --user 0 READ_CLIPBOARD allow
    cmd appops set [package name] READ_CLIPBOARD ignore
    Mentioned Links
    ~~~~~~~~~~~~~~~~~~~
    Install ADB & Fastboot Tools - • Download and Install T...
    Developer Mode - • How to Enable Develope...
    USB Debugging Mode - • How to Enable USB Debu...
    App Package Name Viewer - play.google.com/store/apps/de...
    Step by Step Tutorial
    ~~~~~~~~~~~~~~~~~
    1. Intro [00:00]
    2. Requirements [01:16]
    3. Enter an ADB Shell [02:37]
    4. List Apps with Access [04:05]
    5. Execute the ADB Command [06:47]
    6. Testing it Worked [08:07]
    As an Amazon associate, I may earn a commission on sales from the links below.
    The Gear I Use
    ~~~~~~~~~~~~~~~~~
    5W "Slow" Charger - amzn.to/2OaUMV8
    Fast Charger - amzn.to/3rtBsC6
    MicroUSB Cable - amzn.to/38dkpeM
    USB-C Cable - amzn.to/2OqlTvi
    TPU Cases - amzn.to/38g9b9w
    USB-C to 3.5mm Dongle - amzn.to/3rVt7c3
    USB-C to 3.5mm DAC - amzn.to/3CyksSJ
    NVIDIA Shield TV - bit.ly/3KA17RV
  • Навчання та стиль

КОМЕНТАРІ • 7

  • @t_1337
    @t_1337 2 місяці тому

    Thanks for this video. Ever since Android started telling us when apps do this, I've learned so far that Shopify's Shop app and LinkedIn both read your clipboard on app startup for no acceptable reason. I guess now every time after I install a new app I need to fire up adb shell...

  • @pielumax3301
    @pielumax3301 7 місяців тому

    Agree, I met the same issue as yours, theoretically it's just an illegal invasion for those apps want to steal your personal information. Google should update it immediately. it's weird you can see the notifications for which app is accessing it but can't block it..and didn't ask you for that. Actually there are quite a lot of this issue not just clipboard, some apps can easily bypass the privacy settings by using other associated Apps(especially something you can't live without it) shared vocie or local files even camera data...yeah there are a lot of works to do for Google to stop privacy steal....

  • @ducapelli
    @ducapelli Рік тому

    Great guide, well explained. I su scored the channel. ;) Butni have one question: does the Adb tool works also on Mac?

  • @fixme.96
    @fixme.96 Рік тому +1

    Scary stuff bro. Thanks for this

    • @ExplainingAndroid
      @ExplainingAndroid  Рік тому

      you're welcome and keep your data safe!
      If you're able to, please consider becoming a UA-cam channel member here - www.youtube.com/@ExplainingAndroid/join
      It only costs a buck

  • @technologyman1642
    @technologyman1642 Рік тому +1

    Thanks

    • @ExplainingAndroid
      @ExplainingAndroid  Рік тому

      happy to help :)
      If you're able to, please consider becoming a UA-cam channel member here - www.youtube.com/@ExplainingAndroid/join
      It only costs a buck