[android-developers] Re: Working Around Samsung Double-SD Problem

2010-09-10 Thread Pent
 Looks close for the Galaxy S, but on my retail Euro version Build.MODEL
 is GT-I9000.

Sugar.

 Build.PRODUCT and Build.DEVICE have the same value, as well.

Double sugar.

 Also, /sdcard/sd exists even when the external memory card is not
 installed, in that case, writing to /sdcard/sd places files on the
 internal memory card

1kg bag of sugar.

 (the usual rule with a mount point that has not
 been mounted).

The usual rule where ? Default linux it should be an empty directory.

So any solution to this is going to be extremely messy in other words.

In any case thanks for course for the info.

Pent

-- 
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: Working Around Samsung Double-SD Problem

2010-09-10 Thread Chris Stratton
How about reading /proc/self/mounts or /proc/partitions ...and of
course falling back to default if none of that works.

You could also bury a user modifiable path string somewhere in a
config menu


Pent wrote:
  Looks close for the Galaxy S, but on my retail Euro version Build.MODEL
  is GT-I9000.

 Sugar.

  Build.PRODUCT and Build.DEVICE have the same value, as well.

 Double sugar.

  Also, /sdcard/sd exists even when the external memory card is not
  installed, in that case, writing to /sdcard/sd places files on the
  internal memory card

 1kg bag of sugar.

  (the usual rule with a mount point that has not
  been mounted).

 The usual rule where ? Default linux it should be an empty directory.

 So any solution to this is going to be extremely messy in other words.

 In any case thanks for course for the info.

 Pent

-- 
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: Working Around Samsung Double-SD Problem

2010-09-10 Thread Alessandro Pellizzari
Il Fri, 10 Sep 2010 05:28:17 -0700, Pent ha scritto:

 if ( android.os.Build.MODEL contains-case-insensitive Vibrant /
 Incredible / Galaxy ) {
if ( dirExists( /sdcard/sd ) )
 // use that one
else if ( dirExists( /emmc ) )
 // use that one

Hardcoding paths is always bad.

Put an advanced settings entry (with a disclaimer) in your menu and ask 
the user where he wants to save the data. Else save them in getExternal...

On Android 2.2 (GAOSP for Samsung Galaxy) those paths changed to
/mnt/sdcard/ and /mnt/sdcard/sd/ and some apps stopped working. The same 
could happen on official GalaxyS Froyo update.

Bye.


-- 
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: Working Around Samsung Double-SD Problem

2010-09-10 Thread Kostya Vasilyev

 10.09.2010 18:46, Pent пишет:

(the usual rule with a mount point that has not
  been mounted).

The usual rule where ? Default linux it should be an empty directory.

So any solution to this is going to be extremely messy in other words.

In any case thanks for course for the info.

Pent

I believe so.

Just because some directory (e.g. /sdcard/sd) is listed in /etc/fstab 
(or whatever file Android uses) as a directory where something might be 
mounted in the future, doesn't mean that until then, this directory 
can't have any content.


Mounting a device at a directory location hides whatever was in that 
directory before (in the parent file system).


What I actually saw is that My Backup Pro writes its data to 
/sdcard/sd/rerware/., even though I don't have an external memory 
card in this phone.


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- 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