title: Expansion file - can't load .obb from /sdcard/Android/obb/ on Android 4.2
body: <p>I'm developping the obb integration for the "expansion files". I made it worked in local by copying the .obb file on the sdcard of the device (4.1) but on my 4.2 devices it is not working anymore.</p>
  
  <p>1) On 4.1 tablet: it's working well. I pushed my extension pack file using an adb command on a tablet and then I'm able to find the file and read it :</p>
  
  <pre><code>adb push main.1.mypackage.obb /sdcard/Android/obb/mypackage/
  shell@android:/sdcard/Android/obb/mypackage/ $ ls -al
  -rw-rw-r-- root     sdcard_rw 20314171 2013-08-05 18:01 main.1.mypackage.obb
  </code></pre>
  
  <p>2) On 4.2 : the same procedure as above, the file is not "visible", both exists() and canRead() methods on the main activity return false.</p>
  
  <pre><code>adb push main.1.mypackage.obb /sdcard/Android/obb/mypackage/
  shell@android:/sdcard/Android/obb/mypackage/ $ ls -al
  -rw-rw-r-- root     sdcard_rw 20314171 2013-08-05 18:54 main.1.mypackage.obb
  </code></pre>
  
  <p>Solution : From there, I investigated using the app "Android File Transfer" and I found that the obb folder is empty from the tool… so it is not the same folders I push the data into… </p>
  
  <p>I uploaded the .obb using the app "Android File Transfer" and then it is working… But in that case I don't know where the file are stored (not on the sdcard, I guess ??)</p>
  
  <p><img src="https://i.stack.imgur.com/EeibB.png" alt="Android File Transfer solution that works when uploading manally the file"></p>
  
  <p>So guys, what I need to change on 4.2 for accessing my .obb file? Thanks in advance</p>
  
  <p>Extra informations:</p>
  
  <p>a) I made a basic test to check the file existance using "file.exists() + " canRead=" + file.canRead()" with Environment.getExternalStorageDirectory :</p>
  
  <pre><code>File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath()
              + "/Android/obb/packagename/main.1.packagename.obb");
  </code></pre>
  
  <p>b) The procedure is scripted so the issue is not coming from a manual mistake (and triple check everythings)</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>c) To sum up :</p>
  
  <ul>
  <li><p>With "adb push" on 4.2 it is working for "normal" data: If I put a folder with images in /sdcard/myfolder/ it is working but not below /sdcard/android/.</p></li>
  <li><p>The Android File Transfer shows a "Android/obb" folder at the root and .obb files are visible from the code in that case but:</p></li>
  <li>I cannot confirm it is on the /sdcard from the 'Android File Transfer App', what is disturbing me is that doing an "adb shell ls /sdcard/Android/obb" display that the folder is empty…</li>
  <li>I cannot use the same script for 4.1 and 4.2, validate the production procedure and use it in dev to save a lot of time with a light apk (and save time on build &amp; deployment time)…</li>
  </ul>
  
  <p><strong>SOLUTION USED INTERNALLY</strong></p>
  
  <p>For &lt; 4.1</p>
  
  <pre><code>adb push main.1.mypackage.obb /sdcard/Android/obb/mypackage/
  </code></pre>
  
  <p>For >= 4.2 </p>
  
  <pre><code>adb push main.1.mypackage.obb /mnt/shell/emulated/obb/mypackage/
  </code></pre>