Transparent Encrpytion - Android Apps and Games

Okay what I want is a way to encrypt files on my SD Card transparently. For example, when I make a "Compressed Folder" in Astro File Manager called "b" it makes a file called "b.acd"
What I want is a way to encrypt file like that, where it makes a file on the SD Card but like b.acd, it's encrypted (I assume b.acd isn't because I am assuming anyone who has Astro can read it).
So I want the folder to act like any other folder on my phone (and in order to access it I have to unlock my phone, no one who doesn't know my unlock pattern can't use it) and if they take out the card and use a card reader all they see is a file that they cannot open.
I guess whatever app does this will ask me for a key when I install it so then the app will encrypt and decrypt the data as I am using it.
I have searched the market for encryption software, but with the apps I found I had to manually encrypt and decrypt the files myself unlike how Astro uses ACD archives...
Possibly maybe there could be a program I can run on my PC to access the encrypted files when I provide it with the key...

I have a similar requirement
What I did was make a disk image and call it pagefile.sys
Then I mount the image to a folder when I want access
If you use an ext filesystem on the image when you plug it into windows all you see is a 1gig file called pagefile.sys and can't access it.
It is not very secure, but hidden well enough so someone can't stumpble upon it. Unless they are a bit computer savvy.
So it depends what your hiding and who your hiding it from.

Where did you put the file, on your card? How did you mount it to a folder? I want something a little more secure. Should the phone get stolen or something, even if the crackhead that steals it doesn't know how to access the files, they might find someone who can...

Yep. The file can go anywhere on the SD and be called anything.
it is mounted with a terminal emulator to any folder in the same way you would in Linux.
the command would be
# mount -o loop -w -t ext2 filename foldername
If you want something more secure I would look elsewhere.
Truecrypt is excellent. But you won't be able to access your files on your phone. Truecrypt for android would be the nuts if someone wants to port it. It is open source.

Oh so you can get a termnal emulator? Where did you get yours from, the market?

Yep. Connectbot is the best.

It says ConnectBot is an SSH client, so do you have to connect to localhost or something?

That's right. You get 3 options in connectbot.
Telnet
SSH
Local.
You can set a shortcut to local on your homescreen if you like.

Anyways, does anyone here know how to actually encrypt the files?
I found a program on the Market that lets you store text and pictures (in the paid version) and acesss them directly without encrypting and decrypting them. But it would be nice if there was a free app that let you store files like normal...

APG is what you want if you want security.
An android port of GPG, which is basically NSA quality encryption depending on how you set your keys.
Create your filesystem as mentioned above, and then encrypt it using APG. Delete the original. Now you have an encrypted filesystem. When you want to access, decrypt, mount, make changes, unmount, reencrypt, delete original.
A pain in the butt, but you won't be able to be more secure.

Would you have to repeat those steps everytime you change the filesystem?

Related

HOWTO: Backup SMS Database

Playing around with the ls -R command, I found where the SMS database is kept, and it's somewhat readable in a text editor...
UPDATE (thanks staulkor): This database is viewable, and searchable using an SQLite database viewer.
Code:
/data/data/com.android.providers/telephony/databases/mmssms.db
Just run the following command to back it up to the SD Card:
Code:
busybox cp /data/data/com.android.providers.telephony/databases/mmssms.db /sdcard
Happy hacking
You can use an SQLite viewer to read the database correctly
Would seem simple enough to write a script to run on a PC/Mac to back up the database and load it into some sort of viewer... searchable perhaps?
I'm not too familar with databases, but would seem simple enough to make a lightweight app to keep the SMS archive...
Cool, maybe we'll soon see a port of PIM Backup. Would be nice...
Hmm...
/data/data/com.android.providers/telephony/databases/mmssms.db
Click to expand...
Click to collapse
and
busybox cp /data/data/com.android.providers.telephony/databases/mmssms.db /sdcard
Click to expand...
Click to collapse
are two different paths - I think both are supposed to be
Code:
/data/data/com.android.providers.telephony/databases/
(since I can't cd to the other one).
At any rate - thanks for the tip, but can anyone else confirm this works for them? On my android (R30) I get "opendir failed, Permission denied" if I try to read the contents of that directory.
Seeing as it's fully possible to write an application to back up the database to the sdcard (or even to a website), wouldn't that make more sense?
Afterall, there's no need to have the actual database -- and the method is highly restrictive to both people with root on their phones and those with a USB cable and computer handy.
Also, backing up this database will not backup any MMS attachments, which are stored here:
/data/data/com.android.providers.telephony/app_parts/
Refer to the "part" table for an index matching the files there to messages/filenames. (For each MMS, there should be an XML file that helps identify the type of message, and then the file itself, such as a jpeg).
is this the best and safest way to back up sms database as of yet? I have about 1000 sms and it slows down my messaging so I've been try to find a way to free that up. Backing them up would be great so i can clear them.
If anyone has tried this, please share with the rest of us on its effect on the phone.
Thank you,
Hbguy
P.S: This site is truely GREAT because pros are patient with noobs
i don't understand this...i downloaded the file managers on marketplace, and cannot when i click on data file, there is nothing in there..so i dowonloaded a terminal program and still don't understand how to use the commands to move sms from memory to sim...can u do a quick step-by-step? do i have to use any specific programs to do this? sorry, so used to the simplicity of WM6 on my old phone, having trouble adapting to this platform..thanks for any help.
jazzmanmonty said:
i don't understand this...i downloaded the file managers on marketplace, and cannot when i click on data file, there is nothing in there..so i dowonloaded a terminal program and still don't understand how to use the commands to move sms from memory to sim...can u do a quick step-by-step? do i have to use any specific programs to do this? sorry, so used to the simplicity of WM6 on my old phone, having trouble adapting to this platform..thanks for any help.
Click to expand...
Click to collapse
You need to have root on your phone to follow the instructions given above (if you don't know what that means, you don't have it). For non-root users, most of the Android system on the G1 is locked down -- including /data and all its subfolders.
If you do have root on the phone, you can follow the instructions at the top from a terminal while logged in as root. You can verify you are root by running the program "id":
# id
uid=0(root) gid=0(root)
From there, to copy the SMS/MMS database to your sdcard, you can follow the above instructions. If you don't have busybox (ie, "busybox: not found"), you can use the "cat" command as so:
cat /data/data/com.android.providers.telephony/databases/mmssms.db > /sdcard/mmssms.db
You may also want any files stored here:
/data/data/com.android.providers.telephony/app_parts/
Which are from MMSs (if you've no MMSs saved, then you've no need to bother).
Also, not sure if there is a clarification needed for you. The instructions provided offer no way to access SMSs stored on the SIM, as Android uses a PDU interface that doesn't use the SIM's SMS storage space. It is possible to read SMSs off the SIM, however, and into the internal memory storage. See the settings window in the messaging application.
If someone does take the time to create an application to do this, then it would not require root access. Applications are allowed to access the SMS/MMS database, provided the user grants them permission, and could then be used to read the data from the database and into a new database or other file (eg, csv).
do ya think it would be posible to move these permanently to the memory card? ummmm.... ill try if i get a chance ..... ya can connect to phone via adb in recovery mode right ? an undo whatwver i break?
how would you view your backed up sms messages using staulkors sql database?
step by step would be great
hbguy
Just to be clear - for most people on RC30, this probably will not work.
Per http://forum.xda-developers.com/showthread.php?t=442480 the hacks to gain root access have been blocked since RC30 was deployed in early November. Someone should write an application to support this, but instead everybody is busy creating new useless calculators and niche geolocation applications.
If I'm wrong about the above, it would be terrific for anyone to chime in and clarify that.
goodwinm said:
Cool, maybe we'll soon see a port of PIM Backup. Would be nice...
Click to expand...
Click to collapse
https://github.com/jberkel/sms-backup-plus

[Q] eCryptFS Key

Hey Folks,
I have a Motorola Droid X. I was running Encryption on it via the built in Android encryption option. I assume the key was derived from the pattern lock? I did not specify anything when I encrypted my phone, so I assume the Android device used eCryptFS to encrypt the files on my phone using a key derived from my pattern lock? Anyone have any information on how Android encrypts it's files and how it derives it's key when using the built in encryption options?
I read through this article \h\t\t\p\:\/\/\source.android.com/tech/encryption/android_crypto_implementation.\h\t\m\l (sorry about the fake tags, forums didn't want me spamming the place up) and can glean SOME information off of it.
The reason I ask these questions, and what my situation is, is as follows,
I had encrypted my device sometime ago. SD card and NAND. I wanted to reset my phone for freshness back to factory default (no root, etc etc). So I plugged 'er in and copied off my dcim folder directory. I noticed that the image/video files from the date of encryption were not accessible etc etc. (due to the encryption i'm sure.) So I turned off the encryption on the device, it rebooted itself and did it's thing. Great. I figured my files were decrypted at this point. I copy off the DCIM folder and reset the phone, wipe everything, etc etc. Well whatdya know? In my brilliance I forgot to check the DCIM folder I copied off the second time to make sure I could check out my images. Still couldn't, still encrypted? I assume as such.
I copy the DCIM folder to the formatted SD card, hoping that if I use the same pattern lock and enable encryption, my phone could then access those files. No go.
So as it stands, I have a bunch of encrypted files. I carved the MSD card sometime ago using test disk, just for grins, and it pulled a bunch of eCryptFS files out of it. That's why I assume eCryptFS.
At this point I am thinking, perhaps if I could figure out how Android derives the encryption key, and it's method of encryption. I could work some trickery decrypt those files. However through reading that link, I feel as if I have diminished hope. It would stand to reason that FS encryption would... encrypt the entire file system Obviously I could still see the directory structure so the fat tables and all that good stuff was still clear text, so I wonder if the files were individually encrypted file system wide?
I need to pull some more info, I did some light googling and searched over these forums and didn't see much that was of any value.
Any input is great! Thanks

[Q] Possible to Assign Multiple Group ID's to an App (UID) in Android?

Hey guys, I've been searched for many hours trying to find a solution to this problem I'm having. Let me first explain what I'm trying to do and the reason for it.
Basically I have Dropbox setup to auto sync encrypted files to a folder on my sdcard, lets say:
/storage/sdcard1/encrypted_notes/
Then I have Cryptonite installed and have created an encfs mount in my data folder here:
/data/data/share.encrypted/
I've created the mount point there because simply put, I don't want my decrypted files on the sdcard accessible by every other app that has access to the entire sdcard.
At the moment, /data/data/share.encrypted is chowned by the uid & gid that is assigned to Cryptonite.
Now I want my note reading app to be able to access all files in that folder so my plan was to simple add the note reading apps' UID to the GID of Cryptonite.
That's what I've been searching google to figure out how to do, add a UID of an app to a GID of another app in android.
Sounds simple enough, but I have no idea how to do it. There is no "groupadd" command in android as far as I can tell, nor does busybox have this command.
Is there some other way to do do this?
Or even... some other way I can setup my system so the decrypted notes are still available by both apps and no other app?
Any help is really appreciated. Thanks
I thought I had something going, I managed to change the group owner of the notes folder
/data/data/share.encrypted/ to uid of the notes program and gid of cryptonite and successfully mounted
/storage/sdcard1/encrypted_notes/ into that directory using cryptonite, and on top of that was able to edit the files in the notes program only to discover two things.
Firstly, mounting that encrypted notes folder to the data folder uses the filesystem permissions of the encrypted_notes folder on the SD Card (obviously), something I didn't think of - basically making /data/data/share.encrypted/ world write/readable to any app that has access to SD Card.
So doesn't really help me in terms of keeping things secure.
So then I thought of a new idea, creating a separate partition ext4 on my SD Card, making *that* folder my encrypted notes sync folder owned by the notes program uid and cryptonite as group and instead mount that, until I then realized, I need a 3rd app to have r/w access to this encrypted notes folder... my notes syncing app - FolderSync -
So now I think I'm back to square one. The easiest way to do all of this that I can think of (on a Linux system) would be to add the 3 apps to a group and just have the folder r/w by that group (and therefore those 3 apps).
But after lots of continued research the past few days... I'm finding that Android is very very anti-this-idea in the fact that it really really doesn't like apps sharing data (except universally shared data on the SD Card) and I can't figure out a way to assign apps to additional groups beyond their initial group that is created just for them. :crying:
I found another similar discussion about the non-security of storing your cryptonite unencrypted notes on world readable sd card here:
http://forum.xda-developers.com/showthread.php?t=1561339
With the following two points which are my personal concern as well:
http://forum.xda-developers.com/showpost.php?p=25837127
http://forum.xda-developers.com/showpost.php?p=26265852
I'm having a really difficult & frustrating time here.
Any thoughts anyone?

File Encrypter

Hi there,
I downloaded SSE and used it.
I want to know is there anything better than this? I want to install the best one.
Thanks
I like EDS a lot. You can open truecrypt containers you make on the PC with it (must use specific encryption etc...). If you have root you can also mount the volume directly on the device.
Most of these types of programs (that don't mount) cache up a part of, or all of the file locally so you can access it meaning there is an unsecured copy on the devices file system while you access it. With mount you open directly from inside the encrypted container bypassing that insecurity.
I think you have to have the pay version to mount, this is the free one:
https://play.google.com/store/search?q=eds
Also it will leave a notification in your notification area saying EDS is loaded but you can hide that by going to the app in settings -> apps and unticking the show notifications checkbox.

Need an efficient method to extract all of my memos.

I have an old Samsung A3 using Android 7 and over the years I've journaled on the default Memo app, now that I have a new phone I want to extract all of these memos and have them saved somewhere on my PC before I factory reset. The issue is that you can only share one memo at a time and I have over 1100 entries. This would take forever. Is there a way to extract all of them in a convenient way that wouldn't involve tediously sharing each and every one of them to my drive?? Are they all located somewhere in a folder?
Youb could try using SmartSwitch for just that.
Android 11 will likely puke all over it though unless there's an updated version of that app.
It probably won't work as R doesn't like to share databases... you feeling secure?
Be careful you don't lose all of it...
It's stored in it's own folder or in the Android folder in the data folder. It may be encoded for just that app... if so danger Will Robinson, danger!
Sometimes the only way is the hard way
I use ColorNote, it automatically backs up to my SD card. For the cardless victim users it offers cloud backup.
blackhawk said:
Youb could try using SmartSwitch for just that.
Android 11 will likely puke all over it though unless there's an updated version of that app.
It probably won't work as R doesn't like to share databases... you feeling secure?
Be careful you don't lose all of it...
It's stored in it's own folder or in the Android folder in the data folder. It may be encoded for just that app... if so danger Will Robinson, danger!
Sometimes the only way is the hard way
I use ColorNote, it automatically backs up to my SD card. For the cardless victim users it offers cloud backup.
Click to expand...
Click to collapse
I downloaded SmartSwitch and backed up memos and this was what I got.
I'm assuming it's encrypted. Is there a way to decrypt this so I'm able to have all of them in a readable format. I feel like I should theoretically have 1100 files but it's just one?
That's a great question and I have no clue.
I see 2 options.
If you can load that app on your new phone then inject that folder data into it's new folder you may get lucky.
Or you have a day or two of work ahead...
With ColorNote you can use hyperlinks that open directly from the "note" in the browser. No cut and paste needed. I use it for bookmarks too.
I also use an old free copy of WPS to create word documents to avoid this kind of fubar.
I doubt that app copy would even load on R however it did install on Q.
Android has screwed up their platform so badly with R that I will be running on Q for at least 2 more years. I simply won't tolerate R trashing my trusted apps... and I have other better options.
@eu7tFeTyT7vfPy
Rename the file memo.nmmm to memo.zip and then extract the ZIP-file.
You'll get a file named memo.bk wherein all the memos are stored. Take not that this file may be encrpyted unless you opted for "No encryption" in Smart Switch app's settings.
jwoegerbauer said:
@eu7tFeTyT7vfPy
Rename the file memo.nmmm to memo.zip and then extract the ZIP-file.
You'll get a file named memo.bk wherein all the memos are stored. Take not that this file may be encrpyted unless you opted for "No encryption" in Smart Switch app's settings.
Click to expand...
Click to collapse
I have it in .bk but how would I read it?
IIRC then the contents of memo.bk is a SQlite (version 3) database, filename is mmssms.db.
Use this to read db: DB Browser for SQLite 3.12.0
jwoegerbauer said:
IIRC then the contents of memo.bk is a SQlite (version 3) database, filename is mmssms.db.
Use this to read db: DB Browser for SQLite 3.12.0
Click to expand...
Click to collapse
I'm not familiar with this type of stuff but I've downloaded it and tried "open new database" and then selecting memo.bk which tells me isn't a database. Am I doing something wrong?

Categories

Resources