title: Android: couldn't move app to SD card
body: <p>I have created an empty app with the Eclipse wizard, </p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.locationtest"
      android:versionCode="1"
      android:versionName="1.0"
      android:installLocation="auto"
      &gt;
      &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="18" /&gt;
  </code></pre>
  
  <p>the <strong>Move to SD card</strong> button is enabled, but when I press it I finally get a <strong>couldn't move app</strong> message.</p>
  
  <p>How do I move an app to the SD card?</p>
  
  <p>UPDATE:</p>
  
  <p>when I set</p>
  
  <pre><code>android:installLocation="preferExternal"
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>Installation error: INSTALL_FAILED_CONTAINER_ERROR
  </code></pre>
  
  <p>in Eclipse and in the log:</p>
  
  <pre><code>D/AndroidRuntime( 8127): &gt;&gt;&gt;&gt;&gt;&gt; AndroidRuntime START com.android.internal.os.RuntimeInit &lt;&lt;&lt;&lt;&lt;&lt;
  D/AndroidRuntime( 8127): CheckJNI is ON
  D/AndroidRuntime( 8127): Calling main entry com.android.commands.pm.Pm
  W/ActivityManager( 2207): No content provider found for permission revoke: file:///data/local/tmp/LocationTest.apk
  D/VoldCmdListener( 2119): asec list
  I/PackageHelper( 6435): Size of container 2 MB
  D/VoldCmdListener( 2119): asec create smdl2tmp1 2 fat {} 10010
  E/Vold    ( 2119): Error opening devmapper (No such file or directory)
  E/Vold    ( 2119): ASEC device mapping failed (No such file or directory)
  E/PackageHelper( 6435): Failed to create secure container smdl2tmp1
  E/DefContainer( 6435): Failed to create container smdl2tmp1
  W/ActivityManager( 2207): No content provider found for permission revoke: file:///data/local/tmp/LocationTest.apk
  D/dalvikvm( 2207): GC_EXPLICIT freed 1131K, 38% free 15050K/24007K, paused 2ms+7ms
  D/AndroidRuntime( 8127): Shutting down VM
  D/dalvikvm( 8127): GC_CONCURRENT freed 123K, 82% free 467K/2560K, paused 0ms+1ms
  D/dalvikvm( 8127): Debugger has detached; object registry had 1 entries
  D/dalvikvm( 8127): Compiler shutdown in progress - discarding request
  D/dalvikvm( 8127): Compiler shutdown in progress - discarding request
  I/AndroidRuntime( 8127): NOTE: attach of thread 'Binder Thread #3' failed
  </code></pre>
  
  <p>UPDATE 2:</p>
  
  <p>It looks like this happens on devices of only one particular manufacturer.
  Or maybe this is because of an SD card left in some improper state (no idea what could be wrong).</p>