account arrowhead-down arrowhead-up mobile-menu search sm-bold-x x-skinny-rounded x-skinny arrowhead-right social-facebook social-googleplus social-instagram social-linkedin social-pinterest social-qzone social-renren social-tencent social-twitter social-vkontakt social-weibo social-youku social-youtube

Please help us improve our website

Take our customer survey to evaluate your visit.

It should only take a few minutes to answer five quick questions. Just click the Launch survey button at the end of your visit to begin.

cancel
Showing results for 
Search instead for 
Did you mean: 
Welcome to the Open Devices community!

This is where we discuss open source and development related questions on our Open Devices initiative.

x compact can't connect to camera - aosp 6.0.1 and 7.0

Inhabitant
Message 11 of 17
681 Views
Message 11 of 17

Re: x compact can't connect to camera - aosp 6.0.1 and 7.0

so I have tested two other cards. One is 2GB, quite old, different manufacturer. This one seems to work fine, gets formated both as internal storage (with warning that sd card is slow) as well as portable storage.
The second one is 32GB (pulled out from our camera), the same model as the other 32GB that did not work. This does not work again. It seems like the card is not even touched - the data staied there after the unsucessful format process. Also, the other 32GB seems to work all right in my old phone (android 2.4 I think). Btw, these are quite fast (reading) cards - continuous read is ~40MB/s, write should be at least 10MB/s.

Highlighted
Message 12 of 17
681 Views
Message 12 of 17

Re: x compact can't connect to camera - aosp 6.0.1 and 7.0

No I did not try to use another app right now. The error seems to be much deeper. It is the can't connect error and I am getting the following logs:

03-21 15:23:53.103   555 14636 E Camera3-Device: Camera 0: threadLoop: RequestThread: Unable to submit capture request 2 to HAL device: No such device (-19)
03-21 15:23:53.193   555 14636 D CameraTraces: Process trace saved. Use dumpsys media.camera to view.
03-21 15:23:53.193   555 14636 W Camera3-OutputStream: A frame is dropped for stream 1
03-21 15:23:53.196 14421 14568 E CAM_FatalErrorHandler: Handling Camera Access Failure:
03-21 15:23:53.196 14421 14568 E CAM_FatalErrorHandler: java.lang.Exception
03-21 15:23:53.196 14421 14568 E CAM_FatalErrorHandler:         at com.android.camera.FatalErrorHandlerImpl.onGenericCameraAccessFailure(FatalErrorHandlerImpl.java:84)
03-21 15:23:53.196 14421 14568 E CAM_FatalErrorHandler:         at com.android.camera.one.v2.Camera2OneCameraOpenerImpl$1.onError(Camera2OneCameraOpenerImpl.java:154)
03-21 15:23:53.196 14421 14568 E CAM_FatalErrorHandler:         at android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks$1.run(CameraDeviceImpl.java:1684)
03-21 15:23:53.196 14421 14568 E CAM_FatalErrorHandler:         at android.os.Handler.handleCallback(Handler.java:751)
03-21 15:23:53.196 14421 14568 E CAM_FatalErrorHandler:         at android.os.Handler.dispatchMessage(Handler.java:95)
03-21 15:23:53.196 14421 14568 E CAM_FatalErrorHandler:         at android.os.Looper.loop(Looper.java:154)
03-21 15:23:53.196 14421 14568 E CAM_FatalErrorHandler:         at android.os.HandlerThread.run(HandlerThread.java:61)
03-21 15:23:53.197 14421 14568 E CAM_CameraUtil: Show fatal error dialog

Happy to provide more logs. However I am also getting errors in bluetooth and wifi. It seems that the Sony specific parts are not beiung used correctly in build.

Inhabitant
Message 13 of 17
675 Views
Message 13 of 17

Re: x compact can't connect to camera - aosp 6.0.1 and 7.0

the best I can try is to provide you with the script that I use, but it's simply a copy-paste of what is given to us by sony + one or two extra commands to circumvent the build errors I get...

Message 14 of 17
671 Views
Message 14 of 17

Re: x compact can't connect to camera - aosp 6.0.1 and 7.0

Would be appreciated. Not sure if it helps, but I can take a look.

Right now I moved one step "down" trying to build 7.1 by the letter to sonys guide. If this works I start from there again with my modifications.

Message 15 of 17
657 Views
Message 15 of 17

Re: x compact can't connect to camera - aosp 6.0.1 and 7.0

So finished a few compiles. Camera works on the stable 7.1 guide. with test-keys and signed. Only thing that is weird, is the selfie camera, which is upside down. I think I found a post for this and will get to that.

Inhabitant
Message 16 of 17
655 Views
Message 16 of 17

Re: x compact can't connect to camera - aosp 6.0.1 and 7.0

there are two things that I had to do:
1) copy the "external/toybox" to "out/target/product/kugo/utilities/" (one of the last commands of the script)
2) "modify" my "/bin/cp" - copy the original "/bin/cp" to e.g. "/bin/cp~" and create script "/bin/cp" that contains:

#!/bin/bash
/bin/cp~ -r "$@"

  - this calls the original cp command but with the "-r" parameter

then you need to download the correct binaries to the root of the AOSP source and run the script below:

 

rm -rf out vendor .repo/local_manifest
cd .repo
git clone https://github.com/sonyxperiadev/local_manifests
cd local_manifests
git checkout n-mr1
cd ../..

unzip SW_binaries_for_Xperia_AOSP_M_MR1_v09.zip
repo sync
cd external/toybox
git fetch https://android.googlesource.com/platform/external/toybox refs/changes/74/265074/1 && git cherry-pick FETCH_HEAD
git cherry-pick d3e8dd1bf56afc2277960472a46907d419e4b3da
git cherry-pick 1c028ca33dc059a9d8f18daafcd77b5950268f41
git cherry-pick cb49c305e3c78179b19d6f174ae73309544292b8
cd ../../hardware/qcom/audio
git revert --no-edit 66796eef5ebf71befa37b74f6507efae80d51ea0
git fetch https://android.googlesource.com/platform/hardware/qcom/audio refs/changes/91/294291/1 && git cherry-pick FETCH_HEAD
git fetch https://android.googlesource.com/platform/hardware/qcom/audio refs/changes/05/333605/1 && git cherry-pick FETCH_HEAD
git fetch https://android.googlesource.com/platform/hardware/qcom/audio refs/changes/35/274235/9 && git cherry-pick FETCH_HEAD
cd ../bt
git revert --no-edit c7dc913784965e4ce705c2045f0a8b43fcd1db1c
cd ../display
git revert --no-edit 51b4299f42c61d3a919c8e86c38a85f40902226b
git revert --no-edit b7d1a389b00370fc9d2a7db1268ce26271ead7e2
git revert --no-edit f026d04dde743a0524235ae57e2ce8ac5364d44b
git revert --no-edit 3261eb2236252f9f2510c008fad451411a780b3b
git fetch https://android.googlesource.com/platform/hardware/qcom/display refs/changes/72/265072/1 && git cherry-pick FETCH_HEAD
git fetch https://android.googlesource.com/platform/hardware/qcom/display refs/changes/73/265073/1 && git cherry-pick FETCH_HEAD
git fetch https://android.googlesource.com/platform/hardware/qcom/display refs/changes/54/274454/1 && git cherry-pick FETCH_HEAD
git fetch https://android.googlesource.com/platform/hardware/qcom/display refs/changes/55/274455/1 && git cherry-pick FETCH_HEAD
cd ../gps
git revert --no-edit 53bf15aab71461f81e27e6f5176afcd1a29af7d4
git revert --no-edit 486ab751599b7f8b5a2f2711d22867ad54fdc79b
cd ../media
git revert --no-edit d2bfc978bc0988b3a5ca83b89fb0fa3c293f8e35
git revert --no-edit 0f135396264b689e5b2478fb0face281c1e0facc
git revert --no-edit 9e8b76d32ece15e79ebf4b02ede869d89807eec6
cd ../keymaster
git revert --no-edit 583ecf5ed2a4be0d05229b8c6726680c3836be8b
git fetch https://android.googlesource.com/platform/hardware/qcom/keymaster refs/changes/70/212570/5 && git cherry-pick FETCH_HEAD
git fetch https://android.googlesource.com/platform/hardware/qcom/keymaster refs/changes/80/212580/2 && git cherry-pick FETCH_HEAD
git fetch https://android.googlesource.com/platform/hardware/qcom/keymaster refs/changes/61/213261/1 && git cherry-pick FETCH_HEAD
cd ../../../system/core
git fetch https://android.googlesource.com/platform/system/core refs/changes/52/269652/1 && git cherry-pick FETCH_HEAD
git fetch https://android.googlesource.com/platform/system/core refs/changes/58/327458/1 && git cherry-pick FETCH_HEAD
cd ../../packages/apps/Nfc
git revert --no-edit 988c3fff5470a1de3a880bd07fa438cc47e283c8
cd ../Music
git cherry-pick 6036ce6127022880a3d9c99bd15db4c968f3e6a3
cd ../../../frameworks/av
git fetch https://android.googlesource.com/platform/frameworks/av refs/changes/69/343069/1 && git cherry-pick FETCH_HEAD
git fetch https://android.googlesource.com/platform/frameworks/av refs/changes/70/343070/1 && git cherry-pick FETCH_HEAD
git fetch https://android.googlesource.com/platform/frameworks/av refs/changes/71/343071/1 && git cherry-pick FETCH_HEAD
cd ../../

cp external/toybox out/target/product/kugo/utilities/
source build/envsetup.sh
lunch <<EOF
aosp_f5321-userdebug
EOF
make -j4 &> make.log

 

Inhabitant
Message 17 of 17
580 Views
Message 17 of 17

Re: x compact can't connect to camera - aosp 6.0.1 and 7.0

so "workaround" for the sd card not working was to buy a new card.

the (two) not-working are PNY (high) Performance, 32GB: https://www.pny.com/high-performance-microSD

 

the working one is SanDisk Extreme Plus 32GB