[Sony Xperia E1] Arekjk76:
Hi, in order to get camera working you have to do two things: build custom kernel and add one proprietary driver from stock rom.

I'm almost at the end, if anyone could help me I would be thankful.

Sony E1 uses Samsung CMOS sensor s5k5ca, it's SoC (snapdragon doesn't encoding videos from this sensor). It was introduced in 2010.

How to build custom kernel:

git clone https://github.com/TeamVee-SS/android_kernel_sony_msm8x10.git

make ARCH=arm shuang_defconfig

make ARCH=arm menuconfig

from there change kernel compression from Gzip to XZ, because kernel will be bigger..

Go to "Device Drivers", "Multimedia support"; Enable following:

MSM videobuf2 extensions

Qualcomm MSM camera and video capture support ---> Qualcomm MSM camera and video capture support

Qualcomm MSM camera and video capture 2.0 support --->

Qualcomm MSM V4L2 based video driver --->

go to "Qualcomm MSM camera and video capture 2.0 support" and enable following:

Qualcomm MSM camera sensor support Qualcomm MSM Camera Post Processing Engine support Qualcomm MSM Camera Control Interface support Qualcomm MSM Image Signal Processing interface support Qualcomm MSM Image Signal Processing interface support Sensor S5K5CA (YUV 3MP)

in "Qualcomm MSM camera and video capture 2.0 support"

Qualcomm MSM V4l2 video overlay device

Qualcomm MSM camera sensor support

Also you need to uncomment two lines, revert the one commit, see:

dts: shuang: Disable camera allocation · TeamVee-SS/android_kernel_sony_msm8x10@45e29a8

Change-Id: I85d6b698d9ca0e20717ab79f2f09ea05a635a2cf Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>

github.com

then compile kernel by:

make -j8 ARCH=arm CROSS_COMPILE=/opt/toolchains/arm-eabi-4.9/bin/arm-eabi- CONFIG_NO_ERROR_ON_MISMATCH=y

rebuild your mkbootimg but use the same initrd(ramdisk) as was for your custom rom

Spoiler content hidden.

If you want to use kernel with stock rom use mkqcdtbootimg

Spoiler content hidden.

After you boot into system you should see if kernel finds this image sensor

Spoiler content hidden.

In some cases you can see this:

Spoiler content hidden.

2. Vendor qcom propriety driver

It was leaked, see:

https://github.com/psychopnk/camera-1/tree/master/vendor/qcom/proprietary/mm-camera

https://github.com/baksosapi/camera/tree/master/vendor/qcom/proprietary/mm-camera

https://github.com/bullik01/camera-1/tree/master/vendor/qcom/proprietary/mm-camera

https://github.com/dfyuan/camera/tree/master/vendor/qcom/proprietary/mm-camera

https://github.com/Puzhenwei/camera/tree/master/vendor/qcom/proprietary/mm-camera

https://github.com/rx78gp01/camera/tree/master/vendor/qcom/proprietary/mm-camera

https://github.com/sandeepbhuyan/camera-1/tree/master/vendor/qcom/proprietary/mm-camera

https://github.com/usernamegemaoa/camera/tree/master/vendor/qcom/proprietary/mm-camera

https://github.com/Vimalraj1/camera-1/tree/master/vendor/qcom/proprietary/mm-camera

https://github.com/Dabi01/camera-1/tree/master/vendor/qcom/proprietary/mm-camera

https://github.com/Bigcountry907/HTC_a13_vzw_Kernel/tree/master/vendor/qcom/proprietary

All this repos has been taken down, but if you search you can get full source code but it's nothing there, support for s5k3l1yx, s5k4e1_u and several other chips but no s5k5ca. If we had leak of git repo of this we could gain what we want.

https://github.com/pier11/kernel_huawei_u8220/wiki/Cameras

According to this page libqcamera.so is filename for our driver, we must use this file directly from stock rom. It's configurable during compilation, it means it have support for sensors only selected during compilation.

We must delete "camera" part of hardware_qcom and other things, add this vendor file and so on. It's for Android 2 but works on 4.4 and it will work on newer Android.

We can use Huawei's/Foxconn's driver for s5k5ca from it's kernel source code but it's complicated.

You can view how many devices use this camera using this site:

Device Info HW Database

Devices and their components database

deviceinfohw.ru

Logcat from working rom:

https://stackoverflow.com/questions/14257760/android-camera-wont-take-picture

List of devices using the same camera sensor:

Nokia X (they managed to get camera full working on lineage 11!)

See https://xdaforums.com/t/rom-unofficial-lineage-os-11-for-nokia-x-xl.3628794/

and https://github.com/Nokia-xl-legacy/vendor_xl/

Huawei Prism II

Huawei-U8687

MediaPad 7 Youth

HUAWEI U8666E

HP Slate 7

I'll fix shuang vendor files, based on vendor_xl and stock rom, then I'll post simplest solution, or ready to go compiled rom, with working camera and gps, as installable zip or image.

Cairo ported sony e1 to other kernel because with stock source we cannot make bootable image using aosp mkbootimg, we must use mkqcdtbootimg. Please note that Cairo disabled camera allocation in dtb. Working blobs are present in lineage 14.1

Currently, I downgraded to stock rom and I will check if custom kernel can handle camera