[android-developers] Re: help for encryption of sd card storage?
I was wondering if there is any size limit for storing on shared preferences. Could not find any such info on developer.android.com. Is anyone aware of such space limit on internal storage ? On Apr 14, 12:51 am, Streets Of Boston flyingdutc...@gmail.com wrote: If your file is not huge, why not store it in your app's sandbox? Take a look at these methods of Context: getDir(...) and getCacheDir(...) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: help for encryption of sd card storage?
To answer original question of HitendraSinh - Here is one very simple encryption algo: http://www.ecestudents.ul.ie/Course_Pages/Btech_ITT/Modules/ET4263/More%20Samples/CEncrypt.java.html Simpler than you can imagine :) On Apr 14, 11:07 am, Kacee komal...@gmail.com wrote: I was wondering if there is any size limit for storing on shared preferences. Could not find any such info on developer.android.com. Is anyone aware of such space limit on internal storage ? On Apr 14, 12:51 am, Streets Of Boston flyingdutc...@gmail.com wrote: If your file is not huge, why not store it in your app's sandbox? Take a look at these methods of Context: getDir(...) and getCacheDir(...) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: help for encryption of sd card storage?
On Thu, Apr 14, 2011 at 3:07 PM, Kacee komal...@gmail.com wrote: I was wondering if there is any size limit for storing on shared preferences. Could not find any such info on developer.android.com. Is anyone aware of such space limit on internal storage ? Interesting question. Since each app is a different user, you'd have to use quotas to do this. I haven't checked, but I doubt Android's kernel has support for this. So unless the frameworks is imposing some restrictions (does it?), your xml files can grow until there is internal storage left. Depending on how parsing is done, though, you might run into memory problems with big preferences files. You'd better use separate files and/or a database if you need to store a lot of data. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: help for encryption of sd card storage?
Yes to avoid memory issues later with preferences, we are storing temp files(in MB) on sdcard which then crops up problems of encryption/ file permissions/ etc. Aah... we can not expect desktop facilities from a device :) On Apr 14, 11:25 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Thu, Apr 14, 2011 at 3:07 PM, Kacee komal...@gmail.com wrote: I was wondering if there is any size limit for storing on shared preferences. Could not find any such info on developer.android.com. Is anyone aware of such space limit on internal storage ? Interesting question. Since each app is a different user, you'd have to use quotas to do this. I haven't checked, but I doubt Android's kernel has support for this. So unless the frameworks is imposing some restrictions (does it?), your xml files can grow until there is internal storage left. Depending on how parsing is done, though, you might run into memory problems with big preferences files. You'd better use separate files and/or a database if you need to store a lot of data. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: help for encryption of sd card storage?
Thanks Dianne... I think I have not put it in write way. In my particular case, SharedPreferences, Database are not applicable due to large file(.xml, html,etc) size My temp files may consume 1MB to say 10MB space. However, app deletes them as soon as they r not needed. Since temp filesize is little more, i am not sure if its a good option to store on device internal Storage. Hence one option left is SDCARD, but there to protect data, encryption needs to be applied...which probably i'll be doing now. On Apr 14, 12:40 pm, Dianne Hackborn hack...@android.com wrote: You are mixing up all kinds of things. Each application has a directory on internal storage where its *private* data goes. This is shared with all apps on internal storage; there is no per-app quota, though if the overall storage starts getting low a notification will displayed to the user which takes them to a list of apps sorted by how much storage each one is taking, for them to deal with the culprits. SharedPreferences is *one* way to put data in your private internal storage area. It is in no way shape or form intended for large amounts of data. It is for small settings data. Databases are another way to put data in your private internal storage. This also is not intended for big blobs of binary data, but works well for large amounts (megabytes) of structured data. Or you can just put whatever files you want in your internal storage, in whatever format you want. The sd card / external storage is generally for *shared* data that does not need to be protected from other apps. That said, you *can* protect it basically as well as you can protect your private data if you do some work -- for example generate a random key that you put in your internal storage (so other apps can't get to it) which you use to encrypt the data on external / sd card storage. This is basically how apps on SD card works -- the system generates a random key for created encrypted filesystems on the SD card in which it installs an application. On Thu, Apr 14, 2011 at 12:17 AM, Kacee komal...@gmail.com wrote: Yes to avoid memory issues later with preferences, we are storing temp files(in MB) on sdcard which then crops up problems of encryption/ file permissions/ etc. Aah... we can not expect desktop facilities from a device :) On Apr 14, 11:25 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Thu, Apr 14, 2011 at 3:07 PM, Kacee komal...@gmail.com wrote: I was wondering if there is any size limit for storing on shared preferences. Could not find any such info on developer.android.com. Is anyone aware of such space limit on internal storage ? Interesting question. Since each app is a different user, you'd have to use quotas to do this. I haven't checked, but I doubt Android's kernel has support for this. So unless the frameworks is imposing some restrictions (does it?), your xml files can grow until there is internal storage left. Depending on how parsing is done, though, you might run into memory problems with big preferences files. You'd better use separate files and/or a database if you need to store a lot of data. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: help for encryption of sd card storage?
Dianne, It's my understanding that even if your app is installed on the SD card with preferExternal, the database is still stored in the private space on internal memory. However based on your description of how external installed apps work (with an encrypted file system) I'm now doubting that understanding :) I would actually *like* the DB's to be stored on the SD card with the app, particularly for our mail app as it tends to be a large DB, but maybe you can clarify that for me. - Brill Pappin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: help for encryption of sd card storage?
I would actually *like* the DB's to be stored on the SD card with the app, particularly for our mail app as it tends to be a large DB, but maybe you can clarify that for me. K-9 Mailer allows user to keep DB on SD card, so you may want to take a peek at the sources if you need Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... *Date In Tray* http://bit.ly/dateintraypro - current date at glance... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: help for encryption of sd card storage?
1MB is perfectly fine to store on internal storage. There is NO reason to avoid internal storage for such a file. Just write a file there and don't worry about it. For some devices, 10MB may be getting a *little* large... but if this is a temporary file, it shouldn't be an issue. On Thu, Apr 14, 2011 at 1:45 AM, Kacee komal...@gmail.com wrote: Thanks Dianne... I think I have not put it in write way. In my particular case, SharedPreferences, Database are not applicable due to large file(.xml, html,etc) size My temp files may consume 1MB to say 10MB space. However, app deletes them as soon as they r not needed. Since temp filesize is little more, i am not sure if its a good option to store on device internal Storage. Hence one option left is SDCARD, but there to protect data, encryption needs to be applied...which probably i'll be doing now. On Apr 14, 12:40 pm, Dianne Hackborn hack...@android.com wrote: You are mixing up all kinds of things. Each application has a directory on internal storage where its *private* data goes. This is shared with all apps on internal storage; there is no per-app quota, though if the overall storage starts getting low a notification will displayed to the user which takes them to a list of apps sorted by how much storage each one is taking, for them to deal with the culprits. SharedPreferences is *one* way to put data in your private internal storage area. It is in no way shape or form intended for large amounts of data. It is for small settings data. Databases are another way to put data in your private internal storage. This also is not intended for big blobs of binary data, but works well for large amounts (megabytes) of structured data. Or you can just put whatever files you want in your internal storage, in whatever format you want. The sd card / external storage is generally for *shared* data that does not need to be protected from other apps. That said, you *can* protect it basically as well as you can protect your private data if you do some work -- for example generate a random key that you put in your internal storage (so other apps can't get to it) which you use to encrypt the data on external / sd card storage. This is basically how apps on SD card works -- the system generates a random key for created encrypted filesystems on the SD card in which it installs an application. On Thu, Apr 14, 2011 at 12:17 AM, Kacee komal...@gmail.com wrote: Yes to avoid memory issues later with preferences, we are storing temp files(in MB) on sdcard which then crops up problems of encryption/ file permissions/ etc. Aah... we can not expect desktop facilities from a device :) On Apr 14, 11:25 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Thu, Apr 14, 2011 at 3:07 PM, Kacee komal...@gmail.com wrote: I was wondering if there is any size limit for storing on shared preferences. Could not find any such info on developer.android.com. Is anyone aware of such space limit on internal storage ? Interesting question. Since each app is a different user, you'd have to use quotas to do this. I haven't checked, but I doubt Android's kernel has support for this. So unless the frameworks is imposing some restrictions (does it?), your xml files can grow until there is internal storage left. Depending on how parsing is done, though, you might run into memory problems with big preferences files. You'd better use separate files and/or a database if you need to store a lot of data. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where
Re: [android-developers] Re: help for encryption of sd card storage?
Btw, on your device go to Manage Applications to see a list of how much internal storage each app is taking. This should give you some perspective on how much space is reasonable. Also Settings Storage tells you the total available and used space on internal storage. On Thu, Apr 14, 2011 at 11:10 AM, Dianne Hackborn hack...@android.comwrote: 1MB is perfectly fine to store on internal storage. There is NO reason to avoid internal storage for such a file. Just write a file there and don't worry about it. For some devices, 10MB may be getting a *little* large... but if this is a temporary file, it shouldn't be an issue. On Thu, Apr 14, 2011 at 1:45 AM, Kacee komal...@gmail.com wrote: Thanks Dianne... I think I have not put it in write way. In my particular case, SharedPreferences, Database are not applicable due to large file(.xml, html,etc) size My temp files may consume 1MB to say 10MB space. However, app deletes them as soon as they r not needed. Since temp filesize is little more, i am not sure if its a good option to store on device internal Storage. Hence one option left is SDCARD, but there to protect data, encryption needs to be applied...which probably i'll be doing now. On Apr 14, 12:40 pm, Dianne Hackborn hack...@android.com wrote: You are mixing up all kinds of things. Each application has a directory on internal storage where its *private* data goes. This is shared with all apps on internal storage; there is no per-app quota, though if the overall storage starts getting low a notification will displayed to the user which takes them to a list of apps sorted by how much storage each one is taking, for them to deal with the culprits. SharedPreferences is *one* way to put data in your private internal storage area. It is in no way shape or form intended for large amounts of data. It is for small settings data. Databases are another way to put data in your private internal storage. This also is not intended for big blobs of binary data, but works well for large amounts (megabytes) of structured data. Or you can just put whatever files you want in your internal storage, in whatever format you want. The sd card / external storage is generally for *shared* data that does not need to be protected from other apps. That said, you *can* protect it basically as well as you can protect your private data if you do some work -- for example generate a random key that you put in your internal storage (so other apps can't get to it) which you use to encrypt the data on external / sd card storage. This is basically how apps on SD card works -- the system generates a random key for created encrypted filesystems on the SD card in which it installs an application. On Thu, Apr 14, 2011 at 12:17 AM, Kacee komal...@gmail.com wrote: Yes to avoid memory issues later with preferences, we are storing temp files(in MB) on sdcard which then crops up problems of encryption/ file permissions/ etc. Aah... we can not expect desktop facilities from a device :) On Apr 14, 11:25 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Thu, Apr 14, 2011 at 3:07 PM, Kacee komal...@gmail.com wrote: I was wondering if there is any size limit for storing on shared preferences. Could not find any such info on developer.android.com. Is anyone aware of such space limit on internal storage ? Interesting question. Since each app is a different user, you'd have to use quotas to do this. I haven't checked, but I doubt Android's kernel has support for this. So unless the frameworks is imposing some restrictions (does it?), your xml files can grow until there is internal storage left. Depending on how parsing is done, though, you might run into memory problems with big preferences files. You'd better use separate files and/or a database if you need to store a lot of data. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For
Re: [android-developers] Re: help for encryption of sd card storage?
On Thu, Apr 14, 2011 at 9:11 AM, Brill Pappin bpap...@sixgreen.com wrote: It's my understanding that even if your app is installed on the SD card with preferExternal, the database is still stored in the private space on internal memory. Correct Apps on SD card only puts the application itself on the SD card, not its data. However based on your description of how external installed apps work (with an encrypted file system) I'm now doubting that understanding :) Don't doubt, the encrypted fs is only for storing the app (and unpacked shared libs etc). -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: help for encryption of sd card storage?
On Fri, Apr 15, 2011 at 1:11 AM, Brill Pappin bpap...@sixgreen.com wrote: It's my understanding that even if your app is installed on the SD card with preferExternal, the database is still stored in the private space on internal memory. However based on your description of how external installed apps work (with an encrypted file system) I'm now doubting that understanding :) You already got an answer, but if you want to explore, just run 'mount' in a shell. Then you can examine the contents of each app's directory (every app is mounted on a separate mount point) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: help for encryption of sd card storage?
I have a similar situation, where my application stores some file on SDCARD and dont want anyone else to be able to see the contents or use the file. Encryption is one solution. However I was thinking if there is any way to restrict file permission on SDCARD. Since the file is created by my application, which has a unique UserId, is there any way to set permissions like chmod on file ? Cheers, Kacee On Apr 11, 12:17 pm, Xun Sun xun.sun...@gmail.com wrote: Hi, On Mon, Apr 11, 2011 at 2:47 PM, Hitendrasinh Gohil hitendra.virtuei...@gmail.com wrote: hi, I am downloading file from server and write this file to sd card.now i want to encrypt this file so that only my application can access this file. i) if i can encrypt the file path only that can be access on decrypting it? Are you looking into encrypting individual files? org.bouncycastle.* have the crypto functions that you can use to encrypt a file. You might also want to check this policy: http://developer.android.com/reference/android/app/admin/DeviceAdminI... which is the best encryption algorithem i can use for? There are symmetric ones and asymmetric ones. You are likely more interested in symmetric encryption, where the keys used for encryption and decryption are the same. DES and ASE are the most popular ones. thankx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks regards Xun Sun -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: help for encryption of sd card storage?
The memory card uses FAT32, which does not support Unix-style owner and permission info. -- Kostya 13.04.2011 13:35, Kacee пишет: Encryption is one solution. However I was thinking if there is any way to restrict file permission on SDCARD. Since the file is created by my application, which has a unique UserId, is there any way to set permissions like chmod on file ? -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: help for encryption of sd card storage?
13.04.2011 15:49, Kacee пишет: I agree , Sdcard has FAT32. But since , android linux kernel accesses FAT32 to create file on it, isnt there any way to supply more information (like permissions) along with creating a file command ? I checked this post but cudnt get how to do it or even if it is of any Even if there was a way to restrict on-device applications, the user can still eject the memory card and read the files somewhere else. http://groups.google.com/group/android-developers/browse_thread/thread/7ca63e1dd9a71ce2 CAn anything be done with /etc/fstab ? The fstab cannot be changed by SDK applications, doing this requires root, which not everyone has. You could possibly implement some restrictions in your own firmware, but even then you won't be able to prevent the users from taking out the memory card. -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: help for encryption of sd card storage?
I agree , Sdcard has FAT32. But since , android linux kernel accesses FAT32 to create file on it, isnt there any way to supply more information (like permissions) along with creating a file command ? I checked this post but cudnt get how to do it or even if it is of any use. http://groups.google.com/group/android-developers/browse_thread/thread/7ca63e1dd9a71ce2 CAn anything be done with /etc/fstab ? On Apr 13, 3:56 pm, Kostya Vasilyev kmans...@gmail.com wrote: The memory card uses FAT32, which does not support Unix-style owner and permission info. -- Kostya 13.04.2011 13:35, Kacee пишет: Encryption is one solution. However I was thinking if there is any way to restrict file permission on SDCARD. Since the file is created by my application, which has a unique UserId, is there any way to set permissions like chmod on file ? -- Kostya Vasilyev --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: help for encryption of sd card storage?
There is a lot of if's here... how much data, what type of encryption etc. If its a fairly small amount of data and you want password based encryption, I had to do it in my notes app (https://market.android.com/details?id=sixgreen.aos.itap.notes) and don't mind sharing the code, which is actually pretty standard code. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: help for encryption of sd card storage?
If your file is not huge, why not store it in your app's sandbox? Take a look at these methods of Context: getDir(...) and getCacheDir(...) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en