Skip to content

Instantly share code, notes, and snippets.

@programminghoch10
Last active November 26, 2023 02:17
Show Gist options
  • Save programminghoch10/afc363bd873ce5be814ffd044716d609 to your computer and use it in GitHub Desktop.
Save programminghoch10/afc363bd873ce5be814ffd044716d609 to your computer and use it in GitHub Desktop.
Anonymous Snapchat screenshots on LineageOS
appops set com.snapchat.android READ_EXTERNAL_STORAGE deny
appops set com.snapchat.android WRITE_EXTERNAL_STORAGE deny
appops set com.snapchat.android READ_MEDIA_AUDIO ignore
appops set com.snapchat.android WRITE_MEDIA_AUDIO ignore
appops set com.snapchat.android READ_MEDIA_VIDEO ignore
appops set com.snapchat.android WRITE_MEDIA_VIDEO ignore
appops set com.snapchat.android READ_MEDIA_IMAGES ignore
appops set com.snapchat.android WRITE_MEDIA_IMAGES ignore
appops set com.snapchat.android LEGACY_STORAGE ignore
@programminghoch10
Copy link
Author

programminghoch10 commented Jan 21, 2021

This will disable Snapchat to access your internal storage, which will result in Snapchat being unable to detect screenshots.
You will still need to give Snapchat the storage permission.
These commands may need to be run as root.

In contrast to disabling the storage permission, using AppOps Snapchat will think it has access but given an empty folder structure on read.
The app will still work as it should, you only can't see camera photos taken in any other app in the Snapchat camera roll.
Sharing images from another app to Snapchat is still possible.

This is tested to work on LineageOS 17.1. It will work on any ROM with AppOps support.

To undo this, run the same commands, but replace ignore with default.

@knightoflongknives
Copy link

I am new to this. Where should I paste those lines?

@allthingsmustcometoanend

I am new to this. Where should I paste those lines?

if you're on a custom rom, connect phone to pc, turn on usb debugging, open cmd after downloading adb, type adb shell, and paste these one by one

@AlphaZiege
Copy link

Worked fine til Android 12. With the Android 13 update this isnt working anymore. Tested with rooted (OP 8T w/ Pixel Experience plus) and non-rooted Phones (Samsung Galaxy S22 Stock ROM).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment