Fixed
Status Update
Comments
er...@google.com <er...@google.com> #2
Same problem here.
In config.ini, I have set:
sdcard.size=500 MiB
In hardware-qemu.ini, I have set:
hw.sdCard = true
In config.ini, I have set:
sdcard.size=500 MiB
In hardware-qemu.ini, I have set:
hw.sdCard = true
er...@google.com <er...@google.com> #3
The issue is that the sdcard is not writable. You can workaround this by running:
adb shell
su
mount -o rw,remount rootfs /
chmod 777 /mnt/sdcard
But those settings are lost once the emulator is closed.
adb shell
su
mount -o rw,remount rootfs /
chmod 777 /mnt/sdcard
But those settings are lost once the emulator is closed.
ch...@google.com <ch...@google.com>
ch...@google.com <ch...@google.com> #4
I can confirm this an issue I am also having on Android Studio 2.3.
The second comment (https://code.google.com/p/android/issues/detail?id=240155#c2 ) of making the SD card writable, does work for me. The camera continues to say "Insert an SD card before using the camera"
The second comment (
ch...@google.com <ch...@google.com>
vi...@gmail.com <vi...@gmail.com> #5
API 15 galaxy nexus sd card not detected in storage settings
ch...@google.com <ch...@google.com> #6
Is there a solution to this at this point of time?
Having the same issue.
Can't download anything nor take any pictures even the sd card writable workaround does not work for me (API 17).
Having the same issue.
Can't download anything nor take any pictures even the sd card writable workaround does not work for me (API 17).
vi...@gmail.com <vi...@gmail.com> #7
For some reason the sdcard is *not* being mounted in the android system (API 16,17 only, 18 onwards WORKS AS EXPECTED) within the emulator.
adb shell
root@android:/ # df
Filesystem Size Used Free Blksize
/dev 757M 68K 757M 4096
/mnt/secure 757M 0K 757M 4096
/mnt/asec 757M 0K 757M 4096
/mnt/obb 757M 0K 757M 4096
/system 532M 349M 183M 4096
/cache 60M 40K 60M 4096
/data 1G 83M 1G 4096
The above is for a API 17 img, same thing happens with both "Studio Managed" sdcard as well as sdcard img file created both via the GUI and mksdcard.
No clues at all in the dmesg, in logcat there is only:
05-12 03:22:54.430 1154-1154/? D/Vold: Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
05-12 03:22:56.380 1486-1499/system_process D/MountService: got storage path: /mnt/sdcard description: USB storage primary: true removable: false emulated: false mtpReserve: 0 allowMassStorage: false maxFileSize: 0
05-12 03:22:56.380 1486-1499/system_process D/MountService: addVolumeLocked() StorageVolume [mStorageId=0 mPath=/mnt/sdcard mDescriptionId=17040615 mPrimary=true mRemovable=false mEmulated=false mMtpReserveSpace=0 mAllowMassStorage=false mMaxFileSize=0 mOwner=null]
05-12 03:22:56.390 1486-1522/system_process D/MountService: volume state changed for /mnt/sdcard (null -> removed)
05-12 03:22:56.400 1486-1522/system_process I/PackageManager: No secure containers on sdcard
05-12 03:22:58.180 1738-1957/android.process.media W/MediaScanner: Error opening directory '/mnt/sdcard/', skipping: Permission denied.
Just updated to Emulator 26.0.3 and still happening as above.
adb shell
root@android:/ # df
Filesystem Size Used Free Blksize
/dev 757M 68K 757M 4096
/mnt/secure 757M 0K 757M 4096
/mnt/asec 757M 0K 757M 4096
/mnt/obb 757M 0K 757M 4096
/system 532M 349M 183M 4096
/cache 60M 40K 60M 4096
/data 1G 83M 1G 4096
The above is for a API 17 img, same thing happens with both "Studio Managed" sdcard as well as sdcard img file created both via the GUI and mksdcard.
No clues at all in the dmesg, in logcat there is only:
05-12 03:22:54.430 1154-1154/? D/Vold: Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
05-12 03:22:56.380 1486-1499/system_process D/MountService: got storage path: /mnt/sdcard description: USB storage primary: true removable: false emulated: false mtpReserve: 0 allowMassStorage: false maxFileSize: 0
05-12 03:22:56.380 1486-1499/system_process D/MountService: addVolumeLocked() StorageVolume [mStorageId=0 mPath=/mnt/sdcard mDescriptionId=17040615 mPrimary=true mRemovable=false mEmulated=false mMtpReserveSpace=0 mAllowMassStorage=false mMaxFileSize=0 mOwner=null]
05-12 03:22:56.390 1486-1522/system_process D/MountService: volume state changed for /mnt/sdcard (null -> removed)
05-12 03:22:56.400 1486-1522/system_process I/PackageManager: No secure containers on sdcard
05-12 03:22:58.180 1738-1957/android.process.media W/MediaScanner: Error opening directory '/mnt/sdcard/', skipping: Permission denied.
Just updated to Emulator 26.0.3 and still happening as above.
ch...@google.com <ch...@google.com> #8
Hello, I have the same problem. Anyone find a solution?
vi...@gmail.com <vi...@gmail.com> #9
Unfortunately I had to go back to Android Studio 2.2 as I have to work with a SD card.
vi...@gmail.com <vi...@gmail.com> #10
Re: #8 and #9, please refrain from "me too" comments. Each new comment sends out an email to everyone who is subscribed to the defect (and my sincere apologies to everyone for the email that this comment generated!). Please just star the defect to let the devs know that you're interested in it and add a comment only if you have additional debugging/troubleshooting information to add.
vi...@gmail.com <vi...@gmail.com> #11
Having same issue with API 15 emulator
ch...@google.com <ch...@google.com> #12
Have this problem with API 17 - but running with classic engine from command line works for me:
LD_PRELOAD='/usr/$LIB/libstdc++.so.6' ./emulator @Nexus_S_API_17 -verbose -engine classic
LD_PRELOAD='/usr/$LIB/libstdc++.so.6' ./emulator @Nexus_S_API_17 -verbose -engine classic
vi...@gmail.com <vi...@gmail.com> #13
Thank you #12! I can confirm that emulators as far back as API 15 (my earliest supported API) work with that advice.
Specifically, if you need sdcard in the older APIs,
1- I have to use Android Studio (v3.1.4 for me) to create the AVD,
2- then I must boot it once via Android Studio or I will get an error about failed phone encryption, but the sdcard won't be mounted
3- then I may boot the standalone emulator from the command line using the classic engine. I did not need to do the LD_PRELOAD though (Ubuntu 18.04LTS, for me)
My command looked like this and returned this emulator version, working correctly with sdcard access:
$ANDROID_SDK_HOME/emulator/emulator @Nexus_4_API_15 -verbose -engine classic
emulator: Android emulator version 27.3.9.0 (build_id 4899998) (CL:e7b1c928a596dd490b990f4532055950f1409e49)
Specifically, if you need sdcard in the older APIs,
1- I have to use Android Studio (v3.1.4 for me) to create the AVD,
2- then I must boot it once via Android Studio or I will get an error about failed phone encryption, but the sdcard won't be mounted
3- then I may boot the standalone emulator from the command line using the classic engine. I did not need to do the LD_PRELOAD though (Ubuntu 18.04LTS, for me)
My command looked like this and returned this emulator version, working correctly with sdcard access:
$ANDROID_SDK_HOME/emulator/emulator @Nexus_4_API_15 -verbose -engine classic
emulator: Android emulator version 27.3.9.0 (build_id 4899998) (CL:e7b1c928a596dd490b990f4532055950f1409e49)
ch...@google.com <ch...@google.com> #14
Hi, I can't reproduce this with the canary emulator 29.2.3 with the latest revision of the API 16 x86 Google APIs image.
ap...@google.com <ap...@google.com> #15
Thanks for checking, and that's good news - this was logged (and my comment with testing results added) prior to all the work on the emulators, and I've noticed several things in the area that did not work in the past are working now, so it's possible this was resolved as well. I'll re-check in a bit and post back results as my app supports API15+ at the moment and I need these to work. Cheers
ch...@google.com <ch...@google.com> #16
I can no longer reproduce this with Android emulator version 29.2.3.0 (build_id 5916265) (CL:N/A) - on the API16 x86 non-Google APIs image
However, the API15 non-Google APIs image fails to boot completely
They may not have high enough user numbers to resurrect the emulation there but we do still have around a thousand users on API15 and below
So I think the original issue might be solved, but for very old APIs the images might need to be rebuilt by google to work on newer emulators? Or at least the documentation should be altered to note that no emulation is possible below API16?
However, the API15 non-Google APIs image fails to boot completely
They may not have high enough user numbers to resurrect the emulation there but we do still have around a thousand users on API15 and below
So I think the original issue might be solved, but for very old APIs the images might need to be rebuilt by google to work on newer emulators? Or at least the documentation should be altered to note that no emulation is possible below API16?
Description
1.0.0-alpha07
DEVICE NAME: (Nexus 5X, Samsung S6, etc)
name : FUJITSU arrowsM04
Android OS version : 7.1.1
name: FUJITSU F-04J
Android OS version : 6.0.1
name: FUJITSU F-05J
Android OS version : 7.1.1
DESCRIPTION:
We receive following crash report from our app user.
Fatal Exception: java.lang.IllegalArgumentException: Can not get supported output size under supported maximum for the format: 34
at a.c.a.b.k0.a + 98(SupportedSurfaceCombination.java:98)
at a.c.a.b.k0.a + 30(SupportedSurfaceCombination.java:30)
at a.c.a.b.t.a + 22(Camera2DeviceSurfaceManager.java:22)
at androidx.camera.core.k1.a + 98(CameraX.java:98)
at androidx.camera.core.k1.a + 22(CameraX.java:22)
at a.c.b.c.a + 6(ProcessCameraProvider.java:6)
at <out app package name>.CameraFragment.a + 33(CameraFragment.kt:33)
at <out app package name>.CameraFragment.a + 1(CameraFragment.kt:1)
at <out app package name>.CameraFragment$m.run + 1(CameraFragment.kt:1)
at android.os.Handler.handleCallback + 751(Handler.java:751)
at android.os.Handler.dispatchMessage + 95(Handler.java:95)
at android.os.Looper.loop + 154(Looper.java:154)
at android.app.ActivityThread.main + 6262(ActivityThread.java:6262)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run + 890(ZygoteInit.java:890)
at com.android.internal.os.ZygoteInit.main + 780(ZygoteInit.java:780)
REPRODUCIBILITY: (5 of out 5, 1 out of 100, etc)
We receive this crash report from only three devices. And these devices's manufacturer is FUJITSU.
ADDITIONAL INFORMATION:
CODE FRAGMENTS (this will help us troubleshoot your issues):
Our app bind usecases by following code.
private fun bindCameraUseCases(processCameraProvider: ProcessCameraProvider) {
preview = Preview.Builder().apply {
setTargetAspectRatio(AspectRatio.RATIO_4_3)
}.build().apply {
previewSurfaceProvider = binding.previewViewCamera.previewSurfaceProvider
}
imageCapture = ImageCapture.Builder().apply {
setCaptureMode(ImageCapture.CaptureMode.MINIMIZE_LATENCY)
setTargetAspectRatio(AspectRatio.RATIO_4_3)
setFlashMode(FlashMode.OFF)
}.build()
val cameraSelector = CameraSelector.Builder().requireLensFacing(LensFacing.BACK).build()
processCameraProvider.bindToLifecycle(viewLifecycleOwner, cameraSelector, preview, imageCapture)
}