title: "Couldn’t install on USB storage or SD card" error installing application on Samsung devices
body: <p>The issue is that I started getting complains from my application's users that they failed to install our client on their devices.</p>
  
  <p>Most of the devices are all kind of Samsungs with OS 2.2 and 2.3</p>
  
  <p>The error they see after the install process is done (or almost done) is: "Couldn’t install on USB storage or SD card"</p>
  
  <p>I already checked and verified that there is enough space to install the application on those devices.</p>
  
  <p>Naturally, I tried to remove the SD card abilities (removed the line "android:installLocation="preferExternal"" from the AndroidManifest.xml file, but this change caused all the problematic devices to restart themselves after installation is done (device simply restarts when installation is about to be finished).</p>
  
  <p>Needless to say, I can't debug it since our application's code did not start running yet.</p>
  
  <p>I found some posts on this issue:
  <a href="http://code.google.com/p/android/issues/detail?id=9593" rel="nofollow">http://code.google.com/p/android/issues/detail?id=9593</a>
  <a href="http://technology-headlines.com/2011/05/12/installation-error-%E2%80%9Ccouldnt-install-on-usb-storage-or-sd-card%E2%80%9D-solution-for-android/" rel="nofollow">http://technology-headlines.com/2011/05/12/installation-error-%E2%80%9Ccouldnt-install-on-usb-storage-or-sd-card%E2%80%9D-solution-for-android/</a>
  <a href="http://www.androidpolice.com/2011/04/19/fixing-the-couldnt-install-on-usb-storage-or-sd-card-problem-on-android/" rel="nofollow">http://www.androidpolice.com/2011/04/19/fixing-the-couldnt-install-on-usb-storage-or-sd-card-problem-on-android/</a></p>
  
  <p>All are instructions for the user to remove the "/mnt/secure/asec/smdl2tmp1.asec" file. This works for most of the problematic devices, but I can't expect my users to go and delete temp files in this manner, they will probably just give up.</p>
  
  <p>Another important point is that I went back to my historical versions and found out that old versions (released more than 8 months ago) works fine on those devices, but those versions are not supporting SD card installation and the gap between them and the current code base is so huge that making diffs and analyzing the changes in elimination process will take forever.</p>
  
  <p>I would be happy to receive any tips on this issue</p>