yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] DesolateEgo:
Like the previous poster said images are stored in /data/data/com.snapchat.android/cache/received_image_snaps. They are deleted when they are viewed though so you must copy them to your sdcard or wherever and change the file extension before viewing them. Videos are stored in /data/media/0/Android/data/com.snapchat.android/cache/tcs_pahn
[Android Q&A, Help & Troubleshooting] JCBucks:
Samsung Infuse

Where can I find these files on my Samsung Infuse? I go into /data/data/com.snapchat.android/cache but the folder is empty.
[Android Q&A, Help & Troubleshooting] mvmacd:
I have not had time to check this location, however I have sort of discovered a workaround. [HTC Rezound CM10.1]

Ideally you should have a wifi toggle in the statusbar.

Open snapchat and then click on your snaps, after it loads the images [It will say "Loading image..", then "Tap to view"], turn off WiFi. Then you can view the snapchats [pic or video], and before enabling wifi, wipe Snapchat's data.

This way you can screenshot while offline and they will not know.

Alternatively you can use TitaniumBackup. Backup app while logged in, after viewing snapchat offline, restore data from backup so you do not constantly have to login. :)
[Android Q&A, Help & Troubleshooting] CaseyJames22:
same here....

Galaxy Nexus CM 10.1
[Android Q&A, Help & Troubleshooting] quantemplation:
If you can't find the video folder, it's because it deletes it and the videos when they are not loaded. They are stored under /data/media/Android/data/com.snapchat.android/cache/received_video_snaps/ in mp4 format with a .nomedia file extension. As soon as you navigate away from the app, they are deleted, so I set up a tasker gesture to allow me to copy them while they are loaded.

As people said before, the images are stored in /data/data/com.snapchat.android/cache/received_image_snaps/ with the jpg.nomedia extension. If that folder doesn't exist, try making sure you've received and loaded a snapchat first. The images seem to stay until they're viewed.
[Android Q&A, Help & Troubleshooting] incarceration:
That location you name for videos doesn't exist on my phone.

- I have /data/media/ "0" and "obb" are the only 2 folders within there

- I have also read that the videos are stored in /Storage (SD CARD)/Android/data/com.snapchat.android/cache/... but there isn't anything further from here, my 'cache' folder is empty, there's never been a "received_video_snaps" folder, let alone any content within here.

- I am able to get the photos from /data/data/com.snapchat.android/cache/received_image_snaps/ but never been able to intercept videos

Note: this is all done BEFORE "viewing" the material and allowing it to "load" and show "tap to view" from within SC

I'm using the EVO 3D CDMA version
[Android Q&A, Help & Troubleshooting] quantemplation:
I'm running TouchWiz. I wonder if you are on a 4.2.2 ROM or something, cause I've experienced the sdcard being moved around before...

Does your "0" folder have any subdirectories? such as Android/data/com.snapchat.android/cache/

In any case, videos are special: You need to actually click "load" (but don't hold, or else you'll actually view it before saving) if it doesn't do that automatically. Unless I misinterpreted, you didn't do that step. I think they might load automatically on Wi-Fi or something, though. For a general rule: As soon as it says "Load", the video is no longer (or never was) on your device. Furthermore, the sneaky little application deletes the folder at the same time, which is why you're never seeing "received_video_snaps" within the cache folder you found (assuming that one actually stores the videos in your version) because in my experience, almost everytime you navigate away from Snapchat, it unloads the video.

If you want to test for whether a file exists in a particular directory using Tasker, mess around with different directories in a File Modified profile (and have the associated task flash something). It'll flash as soon as something is added to that folder (including another folder, it seems).

Otherwise, check out my thread for this here.
[Android Q&A, Help & Troubleshooting] nannus:
I'm not familiar with Tasker. is it possible to have it automagically copy and rename the files that show up in the picture cache folder upon receiving a snap?

-edit-

From reddit:

Couldn't post link =/
[Android Q&A, Help & Troubleshooting] quantemplation:
Is it possible, yes. Will it work flawlessly, not really.
[Android Q&A, Help & Troubleshooting] kprz24:
Once I move the file and remove the no media extension. I can open the image but it is blank. Any ideas? Anyone know how to retrieve deleted Images
[Android Q&A, Help & Troubleshooting] quantemplation:
Deleted images are deleted. That's the point of Snapchat. As for the file you moved (I'd recommend you copy it instead, cause Snapchat'll show a blank screen when you view it if you moved the file), make sure it ends in .jpg (for images) or .mp4 (for videos).
[Android Q&A, Help & Troubleshooting] mvmacd:
Actually there is a program called PhotoRec that scans a disk for files using the headers. So as long as the file is unfragmented and not been written over, you can retrieve it with the software. Of course you'll have to either plug in your phone to your PC with usb mass storage mode [if your phone supports it], or else put it in a card reader.
[Android Q&A, Help & Troubleshooting] quantemplation:
Nice! I didn't think that technology was available on phones at this point.
[Android Q&A, Help & Troubleshooting] mvmacd:
Well actually it's not run from the phone [as I mentioned in my previous post], you must plug your card into your PC with usb mode in order for it to work.

I have used PhotoRec in the past and it has worked pretty well. The only thing, and it's not PhotoRec's fault, your files will have a random number. There's no way to know what the old filename/path used to be, so you have to figure that part out on your own.

In short, always backup your sdcard unless you don't mind losing everything, and depending on the damage, might be able to recover the files, but only the ones not fragmented and they will be randomly named.
[Android Q&A, Help & Troubleshooting] filllip:
I developed an easy way to sync the received pictures and videos with your Dropbox account.

If it is interesting you can check my thread here
[Android Q&A, Help & Troubleshooting] jaredkent:
Using the Droid DNA and looking in com.snapchat.android and the cache folder is there, but that is empty. There is no received images folder. Anyone know why this is the case? I know I've gotten plenty of images from snapchat.
[Android Q&A, Help & Troubleshooting] 215alexdx:
The same thing is happening with my Galaxy S3
[Android Q&A, Help & Troubleshooting] innovationzde:
Make sure you open the SnapChat application and refresh your inbox before checking the following path:

"/data/data/com.snapchat.android/cache/received_image_snaps"
[Android Q&A, Help & Troubleshooting] dnlvry:
Wrong thread, sorry!
[Android Q&A, Help & Troubleshooting] imp3r10:
Care to share that Tasker task? I can get Tasker to do something based off an actual file but not a whole folder
[Android Q&A, Help & Troubleshooting] Ray4:
Can you recover opened snapchats?
[Android Q&A, Help & Troubleshooting] quantemplation:
Not unless you can access the deleted file. You'd have to use one of those file recoverer things. You'd also have to get that program to read your phone's storage. This was mentioned somewhere before.

Besides that, the answer is no. As soon as you view the file, it's gone.
[Android Q&A, Help & Troubleshooting] elport:
Sent Snaps

Has anyone tried to locate where the sent snaps would go to?
[Android Q&A, Help & Troubleshooting] Asaucytaco11:
I created an account.

Just to post here there is an easy way to recover videos, Look for an App called Dumpster. The App is supposed to recover deleted content from your android phone. sort of like recycle bin, but recovers snapchat videos as well. although they appear multiple times on the app, it all works the same and you can view the video again. I can't make a post yet sadly so I hope this gets out.
[Android Q&A, Help & Troubleshooting] angelamar90:
For android phone data recovery, you may refer to this guide: how to recover data from android phone

the guide gives step by step instruction and works well for me. so you may try it.
[Android Q&A, Help & Troubleshooting] neverends:
As of the 4.0 update, after removing the .nomedia at the end of the jpg file name - the image seems corrupt and cant be seen
[Android Q&A, Help & Troubleshooting] RTNDO128:
I noticed this as well. Hopefully someone can figure this out.
[Android Q&A, Help & Troubleshooting] quantemplation:
If you revert back before version 4 then it'll work again, but you can't get the "stories" feature then.

My guess is that the image files are now split up and joined upon viewing, because I can find them stored in two locations now, with different filesizes. I could be wrong though.
[Android Q&A, Help & Troubleshooting] mvmacd:
guys, here's the simplest solution that has worked for me even with the new update.

it requires a Wi-Fi status bar toggle (or mobile data if you use that), and hold back app kill, in CM developer settings.

go to snapchat, when it says " tap to view" (after it says loading), turn off Wi-Fi (or mobile data) from toggle. open the snap, screenshot with button combo (might work via power menu screenshot). now immediately kill the app holding back down, then turn on Wi-Fi, load snapchat and you can view normally, while you actually have the screenshot!
[Android Q&A, Help & Troubleshooting] renzer0:
is there a way to "decrypt" the pics and vids I copied a few days ago when snapchat got the 4.0 update so I can see them..?

I reverted back my snapchat since then but I just wanted to know if it's possible to see those :)
[Android Q&A, Help & Troubleshooting] quantemplation:
I never found a way to. Doesn't mean it isn't possible, but I'm thinking that the Snapchat dev team finally figured out how to prevent the simple copying of the file technique. I'm probably sticking with version 3 until somebody figures it out.

For anyone curious, here are the folders in which I found images stored:

/data/data/com.snapchat.android/cache/received_image_snaps

/sdcard/Android/com.snapchat.android/cache/received_image_snaps

/data/media/Android/data/com.snapchat.android/cache/received_image_snaps

However, without further testing, the files in the latter two are the exact same, indicating a probable symbolic link of folders. On the other hand, when I browse through the "stories" folders around the same locations, the first one has different files cached than the other two locations, which is why I made my earlier hypothesis.

Unfortunately, they all appear to remain corrupted in some manner.
[Android Q&A, Help & Troubleshooting] andy7456:
Decrypt snaps

The snaps are encrypted before sending to client. Prior to the recent 4.0 update, the snaps were decrypted then stored in the cache. These coould be viewed directly.

After the update, the snaps are stored in the cache before decrypt, so the file needs to be decrypted. I wrote a quick hack to decrypt the images from the cache. It wasn't hard to find the info.

The stories images appear to be encrypted using either a different key or different encryption method, so they are not currently recoverable.

Andy
[Android Q&A, Help & Troubleshooting] lucastonon:
Could you tell us the encryption method they are using?

Thanks.
[Android Q&A, Help & Troubleshooting] gobig89:
Yes, please share lol
[Android Q&A, Help & Troubleshooting] andy7456:
Ask google. It was too easy

Now it was a bit more of a challenge to set it up to automatically dump all received snaps to my dropbox.

Andy
[Android Q&A, Help & Troubleshooting] DieterHolvoet:
Well in fact I can't find anything on Google, can you at least point us in the right direction?
[Android Q&A, Help & Troubleshooting] apristel:
Why aren't you guys using xposed framework and the keepchat module? does all this for you.. :)
[Android Q&A, Help & Troubleshooting] andy7456:
Snapchat encryption

Search snapchat encryption key - 2 of first 6 results have the info.

Search snapchat api - there are a few implementations of a library to interface with the snapchat server. They also have the info.

Andy

---------- Post added at 01:59 PM ---------- Previous post was at 01:55 PM ----------

Where's the fun in that?

Andy
[Android Q&A, Help & Troubleshooting] andy7456:
Has anyone looked into this and found the encryption info yet?

The method is AES,CBC but I haven't yet found the key or IV.

Andy
[Android Q&A, Help & Troubleshooting] Xzanthurus Gorthamus:
the key for videos and pictures is M02cnQ51Ji97vwT4. i haven't figured out how to decrypt stories yet though. if you're interested, i have an app that saves the videos and pictures on the android market (snap saver by thomas grothe)
[Android Q&A, Help & Troubleshooting] andy7456:
Ya, I knew the key for snaps and videos. Still looking for the key and IV for stories. They use AES,CBC. So far nobody seems to have it.

Andy
[Android Q&A, Help & Troubleshooting] jaxwithanx:
So I jumped on the KeepChat train a little late but grabbed an encrypted vid before getting that all setup. As of right now, there isn't a damn thing I can do with it, correct?
[Android Q&A, Help & Troubleshooting] pandazing:
I figured out how to decrypt stories today. The good news is that the keys are actually hiding in plain view if you know where to look. The bad news is that the keys are unique for each and every 'part' of a story. If a one-minute story includes ten photos and a video, you're dealing with 11 Key/IV combos.

Probably not bad if you're building an app, but a pain in the butt for folks like myself who want to decode using an OpenSSL command line. :P

As for the how, the keys are downloaded (presumably along with the media) and stored in /data/data/com.snapchat.android/databases/tcspahn.db
[Android Q&A, Help & Troubleshooting] trojanteacher:
Program?

Is there a program available for this for those of us that don't know how to program?

BTW, long time lurker, first time poster. I use to know how to program C/C++, but that was the extent to my learning. Haha.
[Android Q&A, Help & Troubleshooting] trojanteacher:
Also, I've tried to run some of the Ruby scripts, but I'm not sure if I'm executing them correctly via the command prompt (I did use the command prompt that came with the Ruby Installer)
[Android Q&A, Help & Troubleshooting] mvmacd:
In case anyone wants to try it, here's a completely free (and open source I believe) recovery software.

http://www.cgsecurity.org/wiki/PhotoRec

Used it on Linux (but works on all desktop os) and it recovered lost mp3 and images just fine. (No original filename but that's to be expected).
[Android Q&A, Help & Troubleshooting] trojanteacher:
I've used that program, but it doesn't bring back the encrypted files. I've used PhotoRec in conjuction with DeleteFixPhoto ($$) and have recovered many deleted photos from deleted SD cards and albums from photographers. Great programs to use.

Do you know how to run those ruby scripts? This is the one that I think needs to be run:

> data = File.open('x', 'r:ASCII-8BIT').read; nil
=> nil
> c = OpenSSL::Cipher.new('AES-128-ECB')
=> #<OpenSSL::Cipher:0x007f8182658618>
> c.decrypt
=> #<OpenSSL::Cipher:0x007f8182658618>
> c.key = 'M02cnQ51Ji97vwT4'
=> "M02cnQ51Ji97vwT4"
> o = ''.force_encoding('ASCII-8BIT')
=> ""
> data.bytes.each_slice(16) {|s| o += c.update(s.map(&:chr).join)}
=> nil
> o += c.final; nil
=> nil
> o[0...60]
=> "\xFF\xD8\xFF\xE0\0\x10JFIF\0\x01\x01\0\0\x01\0\x01\0\0\xFF\xDB\0C\0\x14\x0E\
x0F\x12\x0F\r\x14\x12\x10\x12\x17\x15\x14\x18\x1E2!\x1E\x1C\x1C\x1E=,.$2I@LKG@FE
PZ"
>

But I'm not sure. Like I said before, I don't know how to program using this type of code.
[Android Q&A, Help & Troubleshooting] 3ric15:
I managed to decrypt a SnapChat. It was a relatively simple process.

1. Load the snapchat in the app, but don't view it.

2. Copy the .nomedia file from the "/data/data/com.snapchat.android/cache/received_image_snaps/" to your SD card.

3. This part you may be able to do on the phone but I emailed the file to myself so I could mess with it on my desktop computer. Make a copy of this file just in case.

4. Go to http://aes.online-domain-tools.com/. Change the input type to "file", upload the picture, set function to "AES", set mode to "ECB". CAUTION: It says on the website that data is transmitted over their network UNENCRYPTED!!! So be careful!

5. Using the key Xzanthurus provided, "M02cnQ51Ji97vwT4", paste that into the "key" input area on the site. Press "decrypt".

6. Once decrypted, download that as a binary file.

7. Change the extension to ".jpg" instead of ".dat".

There's your picture! (assuming you did everything correctly lol).

Eric

EDIT: For more information on getting the actual key: click here.
[Android Q&A, Help & Troubleshooting] renzer0:
[MENTION=4934071]3ric15[/MENTION]: thank you, it works perfectly!
[Android Q&A, Help & Troubleshooting] trojanteacher:
AWESOME, thanks a lot! Just wish it didn't have to be used over the internet, but I'll take what I can get. THANKS!!
[Android Q&A, Help & Troubleshooting] trojanteacher:
CryptoStudio

I found this program called "CryptoStudio" that does "Symmentric Ciphering" on your own computer. So the files don't have to pass through the internet. The only problem is that I can't figure out all the settings. I'm going to play with the program and see if I can get it to work. Does anyone here use this?
[Android Q&A, Help & Troubleshooting] trojanteacher:
Argh. I can't figure out the program. Anyone out there with better skills than I give this program a shot?
[Android Q&A, Help & Troubleshooting] trojanteacher:
Anyone?
[Android Q&A, Help & Troubleshooting] molier:
Snapchat script?

So I've been with this thread from the beginning... I made a script that runs when I open snapchat

version 3.x

it saves my incoming snaps and videos just fine but I'm looking for an improvement so that my script can work with the latest encryption technique from Snapchat.

so I'm asking Andy and Eric and practically anybody what for help...

please someone reply

oscar

SCRIPT,improve me

//NOTE, convert to .sh for executable script

#!/system/bin/sh

set -x verbose

cd /data/data/com.snapchat.android/cache/received_image_snaps/

if ls *.nomedia &> /dev/null; then

for file in *.nomedia

do

cat "$file" > "/data/Snapchat/${file/.nomedia}"

done

fi

cd /sdcard/Android/data/com.snapchat.android/cache/received_video_snaps/

if ls *.nomedia &> /dev/null; then

for file in *.nomedia

do

cat "$file" > "/data/Snapchat/${file/.nomedia}"

done

fi

exit
[Android Q&A, Help & Troubleshooting] Mkvarner:
Any suggestions about how I can do this with a video? File is too large.
[Android Q&A, Help & Troubleshooting] quantemplation:
I'm also interested in this. I have a Tasker profile set up to do it automatically in Snapchat version 3, but the encryption breaks it in version 4 (I was going to make an app until I realized I didn't understand java. I'm taking a programming class next semester so maybe that'll be possible. I like the way I have it set up, so that's why I won't use the other apps out there).

I couldn't find the functionality within android to run the commands that thing lists. Like I would have to install some other program it seemed.

Could someone confirm and if possible explain what feature/program/shell command I would use to decrypt them within android? For the life of me I can't get it to decrypt successfully. I have tried downloading the openssl binary and using

openssl enc -aes-128-ecb -d -in "[file location]" -out "[destination location]" -k M02cnQ51Ji97vwT4

with many variations, including adding the parameter -a and replacing the "-k ..." with "-pass pass:M02cnQ51Ji97vwT4". No matter what I do, I either get an error or end up with a 0kb file.

edit: I landed upon this website. I think it is important and could be useful. http://gibsonsec.org/snapchat/fulldisclosure/
[Android Q&A, Help & Troubleshooting] manjubaba123:
decryption with ruby

found this script here: h t t p s : / / gist.github.com/jamescmartinez/6913761

works perfectly!

#!/usr/bin/env ruby

require 'openssl'

data = File.open('blob', 'r:ASCII-8BIT').read
c = OpenSSL::Cipher.new('AES-128-ECB')
c.decrypt
c.key = 'M02cnQ51Ji97vwT4'
o = ''.force_encoding('ASCII-8BIT')
data.bytes.each_slice(16) { |s| o += c.update(s.map(&:chr).join) }
o += c.final
File.open('blob.jpg', 'w') { |f| f.write(o) }
[Android Q&A, Help & Troubleshooting] trojanteacher:
Do you have to run that as a ruby script? Or just a batch file? That is what I'm no sure about.
[Android Q&A, Help & Troubleshooting] polobunny:
You guys know we have a wonderful Xposed module called Keepchat that works wonderfully and is currently maintained by Ramis here?

Sources are also available, if you want to check.
[Android Q&A, Help & Troubleshooting] manjubaba123:
decryption with ruby

i do it like this:

$ chmod +x decrypt.rb
$ ruby decrypt.rb

i don't know if it is necessary to start it with ruby but it works.
[Android Q&A, Help & Troubleshooting] quantemplation:
I finally caved and installed this. It works fabulously. The only thing I'd add is to make the filename start with the display name instead of the username. But I'm not too upset about the way it is anyway. I'm sure I could make a tasker function switch the names, but it'd be a hassle that I'm not worried about. Thanks for the push; I'd heard of it but held back.
[Android Q&A, Help & Troubleshooting] polobunny:
I understand that if you're not running Xposed framework or using Android 4.4 in ART mode then it seems like a bit more painful than using an app, but the whole process is so transparent that it would be silly to ignore it otherwise. :)
[Android Q&A, Help & Troubleshooting] thesquealunit:
Question:

I'm trying to decrypt and view some snaps I opened on my iPad. I found (what I think are) the encrypted snaps stored in root/var/mobile/applications/71A.../Library/Caches/com.toyopagroup.picaboo/fsCachedData. Only some of them would decrypt using aes.online-domain-tools and none would open after renaming the .bat to .jpg. And I'm not literate enough to use y'alls fancy scripts to try the same.

Any ideas?
[Android Q&A, Help & Troubleshooting] trojanteacher:
I'm with you, I realize many here use LINUX, but I use Windows 7. What kind of DOS commands would I do to create these decryptions? I've attempted to run ruby scripts, but I'm sure I'm doing it wrong. If anyone is willing to help us out with this, it would be much appreciated.
[Android Q&A, Help & Troubleshooting] mvmacd:
I suggest downloading Virtual Box on Windows, and also the Ubuntu disk image.

Point the virtual CD drive to the iso and you can run Linux inside Windows.

Swiped from my Nexus 10 using xda-developers app
[Android Q&A, Help & Troubleshooting] serstylz2:
Snapchat must have updated to overcome this woraround, i am getting:

"Decryption failed. Provided encrypted text is not valid."
[Android Q&A, Help & Troubleshooting] Cloudlin:
I am getting decryption failed too.

I went ahead and thoroughly read this through h t t p s://kivikakk.ee/2013/05/10/snapchat.html"]https://kivikakk.ee/2013/05/10/snapchat.html

and decompiled the latest snapchat version 4.1.07.

Found this in com.snapchat.android.util.crypto named as "SnapEncryptionAlgorithm.java"

Not entirely sure what to make of it, but it seems to me that there is another private key a long with the original public key involved in the encryption process? Correct me if I'm wrong.

If anyone wants to poke around with the decompiled jar file I have uploaded it. You can extract it with winrar.
[Android Q&A, Help & Troubleshooting] xnotte:
I want to recover the deleted .nomedia files, that are deleted by snapchat after viewed. They have to be in memory still if there's no overwriting in that sector.

My problem it's the Hex Signature key. I need to have a Signature key to customize the recovery programs. Anyone can tell me the signature key of the .nomedia file type ?