yashsingh1/xdaforums huggingface dataset:
[Xperia Z1 Original Android Development] nailyk:
Not OSS ;)

Your /dev/socket/tad-socket is probably not created.

BTW I really think you should try with shinano sources.

Like flash a z3c rom on your device.

Oblivious lot of things will be borken but will be a good proof of concept to get camera started.

The only way to debug that credmgrd crap is strace:

DAEMON=q ; stop $DAEMON && start $DAEMON && strace -s 256 -f -p $(ps | grep $DAEMON | cut -d" " -f3,4,5,6,7) 2> /tmp/$DAEMON

You could ask on TG for the link to the dev pad. I wont post it publicly. (nothing to hide, just it is free writing by design, wont spam on it).

I would like to bought a z1 to help you on this but, as you probably know, I broke my z3 and am currently buying a new one so no chance before a while to get a z1.
[Xperia Z1 Original Android Development] SuperLamic:
Is it gonna work? Should I use honami's kernel or that doesn't matter too?
[Xperia Z1 Original Android Development] nailyk:
Dunno what exact differences between rhina & shinano. But basically same board.

If you use our actual kernel with your defconfig it should be very usable.

You will obviously have broken things like ril, wifi etc... but if pmic and usb port use the same chipset on both family you should be 'fine'.

Fixing the camera on shinano (almost from scratch) took us more than 1 month, with full weeks on it.

IMHO it is better to start from others works.

If you got a pad access you can notice the camera libs should works on every device, you 'just' need to add the spencific sensor binaries.

The problematic part was all that init process.
[Xperia Z1 Original Android Development] SuperLamic:
I know, I tried to copy all the things I thought were related to cam: https://github.com/SuperLamic?tab=repositories

I doubt that shinano's dts would work... but init should be okay, so I'll try to use my ramdisk+kernel and z3 rom.
[Xperia Z1 Original Android Development] nailyk:
Use shinano ramdisk then. Probably the most important.

I guess tomascus imported your dts while making our kernel.

Using the actual sony-stock-cm/kernel_msm8974 should be pretty straightforward.

Keep me informed :)
[Xperia Z1 Original Android Development] SuperLamic:
It wouldn't. Your kernel is shinano-only. He used old cm-12.1 kernel. All sources are on my github.
[Xperia Z1 Original Android Development] nailyk:
Damn. I was sure [MENTION=4675360]tomascus[/MENTION] merged rhine too. Best will be to talk with him about this.

Am planning a new push into official repo in the coming days. Will be good if we can include rhine in it.
[Xperia Z1 Original Android Development] sepi.nick:
how can i install it on my phone?
[Xperia Z1 Original Android Development] optimumpro:
From what I have heard, the first thing OEM's do, when they get hardware from chip makers, they cloak/change/modify addresses and file patents on their modifications. So, whatever you find in Code Aurora/Linux, won't work with an OS. I don't like Microsoft much, but one thing they did right: make it a condition for hardware manufacturers to have proper blobs and unlocked bootloaders. Microsoft could do this because they controlled 95% of PC market. Google can do the same, but they choose not to for various reasons. After all, you can't have a smart phone (except IOS) without Android...
[Xperia Z1 Original Android Development] adarsh:
Please upload the file on any other mirror, mega doesnt work in my region. I even tried downloading with some apps but all the time it fails.

Thanks.
[Xperia Z1 Original Android Development] LeoYL:
I just successfully flashed release 9/9 on C6902. Definitely bootable, but C6902 modem file is the prerequisite, otherwise the system doesn't start.
[Xperia Z1 Original Android Development] team_div:
good job

error with camera, its totaly dead.

Everything seems good.

my device xperia z1 c6902

unlocked bootloader
[Xperia Z1 Original Android Development] munjeni:
Found why camera can't start. There is some strange switches, curently I'm trying to figure out which vendor lib loads libchromatix_imxXXX_XXX libs, I found when libchromatix_imx132_XXX is loaded camera gets some NULL default parameters like preview size, video size, thubnail size...etc, and it crashes since null pointer... but somehow when camera switches to libchromatix_imx200_XXX camera start working, default parameters is not NULL but stil gets wrong parameters. For preview size it need to chose preview_table[0], sometimes it loads 1280x720 but sometimes it loads 640x480 which is strange since hal loads first one from table which is 1280x720. On picture size it loads last one parameter in table so probably we need to modify function call in hall to use first one from table instead of last one since last one for picture size is 280x128 if I am right. I think these libchromatix_imx gives wrong parameters about preview...etc since if you look more into logcat you can see sometimes diferent preview width and height, sometimes its 1280x720 sometimes its 640x480 which is strange. These libchromatix_imx libs is nothing than an function which returns static *array with bunt of huge parameters:

_UNKNOWN *__fastcall load_chromatix()
{
return &unk_4008;
}

probably we can use right ibchromatix_imxXXX lib from stock rom and rename it to ibchromatix_imx200 and allso make simlink it to other ibchromatix_imxXXX ! I'm tried to figure out which ibchromatix_imx lib is chosed in stock rom during camera load, didn't found in logcat, have no idea which one is default one on stock rom.
[Xperia Z1 Original Android Development] caki25:
Is there a way to help out with a stock based Z1? Let me know if there is anything I can do...
[Xperia Z1 Original Android Development] drakonizer:
I think stock blobs use a different numbering system, because there are no common libs.

Besides, I believe the camera issue is due to some missing clocks in the kernel for msm8974, and not vendor related.
[Xperia Z1 Original Android Development] munjeni:
Did you look into logcat? You can see how wrong parameters camera gets from camera sensor blobs! Firmware is also invalid on some moments! Some pinctrl error on kernel too... Which I not understand, why jerpelea and co changed kernel branch, is that was realy need?
[Xperia Z1 Original Android Development] munjeni:
You can start logcat like this before you start camera?

logcat | grep imx

Than start camera and give me if logcat gives you something about imx
[Xperia Z1 Original Android Development] drakonizer:
I believe a new branch was made to accommodate the newer Sony devices in the unified kernel. I haven't seen the logcat yet, because for some reason usb debugging (or usb storage/charging for that matter) doesn't work for me. I'll need to get that fixed first. But I remember jerpelea mentioned that the camera is broken cause of missing clocks in the kernel
[Xperia Z1 Original Android Development] caki25:
nope, no info on imx. I will try to install true stock rom later and try again. I'm running a camera mod and that threw a couple errors, but nothing imx related.
[Xperia Z1 Original Android Development] Animeshkr.:
Lose Recovery.

Plz u knw how to root as I want to flash twrp . After flashing this ROM I lose my recovery and I want to revert back. I dont have my laptop . Plzz
[Xperia Z1 Original Android Development] LeoYL:
Here is a workaround: Use Flashtool to flash TWRP .img file as kernel. After you reboot your phone, TWRP will boot, then you may perform further operations.
[Xperia Z1 Original Android Development] SuperLamic:
flash recovery via fastboot. (download twrp img, reboot to fastboot - fastboot flash recovery twrp.img). When phone starts (sony logo) you can see orange light. Press volume down button then.

about root - flash supersu zip.
[Xperia Z1 Original Android Development] Animeshkr.:
Recovery

I don't have laptop and im out of station ..isn't dr any other way.
[Xperia Z1 Original Android Development] drakonizer:
This is what happens when you flash a WIP Alpha ROM on your device, without thinking of the implications. If you knew what you were doing, you would've updated your bootloader to support the new recovery partition and would've flashed TWRP to that, which would've survived the Nougat flash. Being in a hurry to update to the latest version of the platform results in loss, as you now know.

The only way to root AOSP N is to flash systemless SuperSU, but obviously that is not possible. The rooting apps like Kingroot don't have any known exploits for N. Basically you're stuck as you are and no amount of 'z' in"Plzz" is going to get you out of it.
[Xperia Z1 Original Android Development] Animeshkr.:
Wll. Thank u . I just asked for help . Never mind
[Xperia Z1 Original Android Development] ->---:
Did you install sonys new recovery once? http://developer.sonymobile.com/201...for-a-range-of-unlocked-xperia-devices-video/

Than you can enter the fallback recovery that's not part of a kernel as described there:

1) Turn your device off.

2) At the same time, press the Power button and Volume down until your device vibrates.

3) Quickly release the Power button, but keep pressing Volume down.

4) When you see the screen shown in the image below, release Volume down. You have now successfully entered recovery mode.
[Xperia Z1 Original Android Development] SuperLamic:
It doesn't matter if you use init recovery loader or updated bootloader recovery boot.

In both cases you need a computer available which he doesn't have. (to flash recovery img)
[Xperia Z1 Original Android Development] ->---:
Isn't this the recovery that's in the Sony TA partition - if you once installed it?

I just can say, I have two recoverys. One when I press vol down when the led at startup is lit and one if I start the phone by the procedure I mentioned in my last post.
[Xperia Z1 Original Android Development] SuperLamic:
And do you use this rom or stock one? Because many stock roms come with built-in recovery. I thought that all recoveries that we use are stored in fota partition.

If you have two recoveries, how did you flash the second one?
[Xperia Z1 Original Android Development] drakonizer:
[MENTION=4120742]munjeni[/MENTION]

If you wanna get camera logs, you need to execute:

adb shell setprop persist.camera.hal.debug 1

adb shell setprop persist.camera.global.debug 1

as root and reboot. Apparently camera logging is disabled by default.
[Xperia Z1 Original Android Development] munjeni:
You can flash boot.img or better idea recovery.img to boot partition directly with terminal emulator and DD command:

dd if=pathtothe_recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/boot
[Xperia Z1 Original Android Development] munjeni:
Fouund it, it is libchromatix_s5k3l1yx_XXX , I removed the rest of libchromatix_ and camera working normaly, so definitely its libchromatix_s5k3l1yx :) Don't know why aosp uses libchromatix_200_ , probably that's reason why camera not working
[Xperia Z1 Original Android Development] ->---:
I am still on Barebones. Just following this thread because I think it is useless to wait for a fully functional MM if there is already a nearly working N release.

Well, I am not sure how I did it. I followed this http://developer.sonymobile.com/201...for-a-range-of-unlocked-xperia-devices-video/ , did that http://xdaforums.com/showpost.php?p=52501509&postcount=990 and the other recovery is from custom kernel.
[Xperia Z1 Original Android Development] gauravbhakuni90:
So the legendary developer has find a way to start the camera in 7.0 nougat??

This is gonna be awesome. :) fingers crossed
[Xperia Z1 Original Android Development] drakonizer:
Won't work. He doesn't have root.
[Xperia Z1 Original Android Development] munjeni:
Probably this commit https://github.com/sonyxperiadev/kernel/commit/adc2a02e46b813d7a18dc1370e0e4f78fd6a4165 is potentialy fix for splited camera picture :)

Edit:

Allready implemented in new hal :( Anybody have ide why camera picture is split?? What cause this?
[Xperia Z1 Original Android Development] brickhayabusa:
probably and i seen on xperia dev github a commit than fixes the rqbalance hotplug and says "for a better power management"

What do you think?
[Xperia Z1 Original Android Development] Masterblop:
I read that dates back to August 21, 2015
[Xperia Z1 Original Android Development] munjeni:
Is camera working on 6.0.1 ?

Is camera working on 6.0 ?
[Xperia Z1 Original Android Development] SuperLamic:
Already built in latest build.

I have used settings from shinano - from what I have seen more power conserving than the settings that rhine got.

Only with "old" 1.2.2 kernel and "old" blobs. If you use 1.3.3 kernel and latest blobs it's the same what we have here.
[Xperia Z1 Original Android Development] munjeni:
Which "old" blobs is working with 1.2.2 kernel ?
[Xperia Z1 Original Android Development] SuperLamic:
I think all blobs since the "experimental ones" are for 1.3.3 kernel.

http://developer.sonymobile.com/open-devices/latest-updates/
[Xperia Z1 Original Android Development] munjeni:
Is camera working on 6.0.1 android?
[Xperia Z1 Original Android Development] SuperLamic:
It' crappy but yeah. On old branch yep.
[Xperia Z1 Original Android Development] drakonizer:
From what I hear, the camera issues in the old branch were due to the blobs not being calibrated properly. When we switched to the new branch, the newer binaries for this branch have been perfectly calibrated, as seen by the sample pictures of the Z5 series running AOSP. Apparently our issue is with the kernel.
[MENTION=4120742]munjeni[/MENTION] I suggest you get in touch with Alin Jerpelea. He will explain the issue in more detail.
[Xperia Z1 Original Android Development] munjeni:
Where you found that info? As I know camera never worked on new branch 1.3.3, so can't be caled calibrated, maybe you mean for z5, but as this thread is honami on honami (z1c, z2,z3 too) its broken completely on 1.3.3!
[Xperia Z1 Original Android Development] optimumpro:
He is referring to 2 photos posted on a Z5 forum: one showing buildings, which is pretty good and another close distance (a plate with fries), which is out of focus.

The development for Z1/Z2/Z3 has been cut. The question that should be asked is this: if there are 2 sets of blobs one DRM protected for stock roms and another (dumbed down) for AOSP, why would Sony not publish the dumbed down code for AOSP blobs? I bet Jerplea and Co don't have that source either. And the answer is on the surface: if they publish the code, someone (like yourself) may actually improve it, but Sony doesn't want that for any of their devices. You can look at Z5, there isn't any stable custom rom there. We are luckier, because we have stable KK and LP. Z5 doesn't have that luxury. So, their only option is stock and that's exactly what Sony wants..,.
[Xperia Z1 Original Android Development] drakonizer:
I heard it from Alin Jerpelea himself. Camera never worked for 1.3.3 yes, but he says that's not a fault in the binaries, but an issue in the kernel. Blobs for 1.3.3 for all devices work as they should, is what he said.
[Xperia Z1 Original Android Development] munjeni:
I was contacted too and got some info about camera. Camera don't working since vfe0 is not working, only vfe1 by now, its all kernel related, if it is right. I am not sure since I found strange things in blobs (random switchings between 3 diferent sensors, imx200, imx132, imx134) but hope it is related to broken vfe0. Main problem is we don't know what excatly is broken, is it hal, is it kernel, or is it proprietary blobs :(
[Xperia Z1 Original Android Development] munjeni:
Anybody have free time to find folowing patch: https://lwn.net/Articles/640291/ ??

We have missing that in our kernel and probably that patch will solve some of the problems:

[ 60.158380] msm_camera_pinctrl_init:1260 Getting pinctrl handle failed
[ 60.159286] msm_csid_init: CSID_VERSION = 0x30000000
[ 60.163964] msm_camera_power_up:1301 Initialization of pinctrl failed
[ 60.163985] msm_camera_power_up index 0
[ 60.163989] msm_camera_power_up type 2
[ 60.167818] msm_camera_power_up index 1
[ 60.167820] msm_camera_power_up type 2
[ 60.168149] MSM-CPP cpp_init_hardware:1045 CPP HW Version: 0x10010000
[ 60.168156] MSM-CPP cpp_init_hardware:1066 stream_cnt:0
[ 60.174167] msm_camera_power_up index 2
[ 60.174169] msm_camera_power_up type 2
[ 60.177453] msm_camera_power_up index 3
[ 60.177455] msm_camera_power_up type 2
[ 60.180328] msm_camera_power_up index 4
[ 60.180336] msm_camera_power_up type 1
[ 60.180341] msm_camera_power_up:1363 gpio set val 94
[ 60.182367] msm_camera_power_up index 5
[ 60.182372] msm_camera_power_up type 1
[ 60.182377] msm_camera_power_up:1363 gpio set val 94
[ 60.183199] MSM-CPP cpp_load_fw:1191 MC Bootloader Version: 0x312e3176
[ 60.184019] MSM-CPP cpp_load_fw:1204 CPP FW Version: 0x1002000a
[ 60.184489] msm_camera_power_up index 6
[ 60.184494] msm_camera_power_up type 0
[ 60.186622] msm_cci_pinctrl_init:1111 devm_pinctrl_get cci_pinctrl failed
[ 60.192368] msm_cci_init:1258 Initialization of pinctrl failed
[ 60.164738] msm_csid_init: Failed in getting TOP gdscr regulator handle
[ 60.198392] msm_cci_init: Failed in getting TOP gdscr regulator handle<6>[ 60.205121] msm_cci_init:1310: hw_version = 0x10000008
[ 60.205173] msm_camera_power_up exit
[Xperia Z1 Original Android Development] munjeni:
This definitely missing in 1.2.2 kernel dtbs:

&gdsc_venus {
-	vfe0-vdd-supply = <&gdsc_vfe>;
-	vfe1-vdd-supply = <&gdsc_vfe>;

and few other things related to vfe0 and vfe1. As a result you can see something in dmesg like:

amami:/ # dmesg | grep gdsc
[ 0.340093] gdsc_venus: no parameters
[ 0.340397] gdsc_mdss: no parameters
[ 0.340771] gdsc_jpeg: no parameters
[ 0.341409] gdsc_vfe: no parameters
[ 0.341641] gdsc_oxili_gx: no parameters
[ 0.341724] gdsc_oxili_gx: supplied by 8841_s4_corner
[ 0.341945] gdsc_oxili_cx: no parameters
[ 0.342143] gdsc_usb_hsic: no parameters
[ 6.993192] gdsc_oxili_gx: disabling
[ 21.211261] msm_cci_init: Failed in getting TOP gdscr regulator handle
[ 21.413800] msm_cci_init: Failed in getting TOP gdscr regulator handle
[ 21.538944] msm_csid_init: Failed in getting TOP gdscr regulator handle<6>[ 21.540239] msm_csid_init: CSID_VERSION = 0x30000000
[ 21.540814] msm_csid_init: Failed in getting TOP gdscr regulator handle<3>[ 21.556797] msm_audio_get_copp_idx_from_port_id: Invalid FE, exiting
[ 21.935857] msm_csid_init: Failed in getting TOP gdscr regulator handle
[ 21.973098] msm_cci_init: Failed in getting TOP gdscr regulator handle<6>[ 21.977134] MSM-CPP cpp_load_fw:1191 MC Bootloader Version: 0x312e3176
[ 27.215091] msm_csid_init: Failed in getting TOP gdscr regulator handle
[ 27.221913] msm_cci_init: Failed in getting TOP gdscr regulator handle
[ 1651.256456] msm_csid_init: Failed in getting TOP gdscr regulator handle
[ 1651.263085] msm_cci_init: Failed in getting TOP gdscr regulator handle
[ 1656.584351] msm_csid_init: Failed in getting TOP gdscr regulator handle
[ 1656.591272] msm_cci_init: Failed in getting TOP gdscr regulator handle
[ 1662.498172] msm_csid_init: Failed in getting TOP gdscr regulator handle
[ 1662.505001] msm_cci_init: Failed in getting TOP gdscr regulator handle

probably if we fix this we can get camera up
[Xperia Z1 Original Android Development] munjeni:
I have contacted jerpelea about imx, his reaply was: "imx is the sensor and camera cant load another sensor unless you force it to load the wrong one

i have fixed part of the issue in blobs but we still have only vfe1 up", but if you look more into logcat line related to function name "sensor_get_cur_chromatix_name" you can see that it loads on every boot diferent cromatix_imx :( , I'm realy confused. Probably blobs have bug? It can't be kernel related?

09-24 17:21:43.474 529 529 E mm-camera: module_sensor_query_mod:5294led flash is not supported for this sensor.
09-24 17:21:43.474 529 529 I mm-camera: sensor_get_cur_chromatix_name:2466hal version 0 capture intent 0 cur_stream_mask 1
09-24 17:21:43.474 529 529 E mm-camera: sensor_get_cur_chromatix_name:2516Error: Load default preview chroamtix
09-24 17:21:43.474 529 529 I mm-camera: sensor_get_cur_chromatix_name:2522chromatix_lib_name[0] = libchromatix_imx132_snapshot.so
09-24 17:21:43.474 529 529 I mm-camera: sensor_get_cur_chromatix_name:2522chromatix_lib_name[1] = libchromatix_imx132_snapshot.so
09-24 17:21:43.474 529 529 I mm-camera: sensor_get_cur_chromatix_name:2523chromatix_lib_name[2] = NULL
09-24 17:21:43.474 529 529 I mm-camera: sensor_get_cur_chromatix_name:2522chromatix_lib_name[3] = libchromatix_imx132_common.so
09-24 17:21:43.474 529 529 I mm-camera: sensor_get_cur_chromatix_name:2522chromatix_lib_name[4] = libchromatix_imx132_cpp_preview.so
09-24 17:21:43.474 529 529 I mm-camera: sensor_get_cur_chromatix_name:2522chromatix_lib_name[5] = libchromatix_imx132_cpp_snapshot.so
09-24 17:21:43.474 529 529 I mm-camera: sensor_get_cur_chromatix_name:2523chromatix_lib_name[6] = NULL
09-24 17:21:43.474 529 529 I mm-camera: sensor_get_cur_chromatix_name:2523chromatix_lib_name[7] = NULL
09-24 17:21:43.474 529 529 I mm-camera: sensor_get_cur_chromatix_name:2523chromatix_lib_name[8] = NULL
09-24 17:21:43.474 529 529 I mm-camera: sensor_get_cur_chromatix_name:2522chromatix_lib_name[9] = libchromatix_imx132_cpp_video.so
09-24 17:21:43.474 529 529 I mm-camera: sensor_get_cur_chromatix_name:2522chromatix_lib_name[10] = libchromatix_imx132_postproc.so
09-24 17:21:43.475 529 529 I mm-camera: sensor_get_cur_chromatix_name:2522chromatix_lib_name[11] = libchromatix_imx132_default_preview.so
09-24 17:21:43.475 529 529 E mm-camera-isp2: isp_resource_query_mod:145 num_isp_preallocate 0 num_session_opened 1 dual_vfe_enabled 0

As a result camera loads default chromatix (everytime diferent one):

mm-camera: sensor_get_cur_chromatix_name:2516Error: Load default preview chroamtix

and allso torch disapears from notifications togle since bug in chromatix:

mm-camera: module_sensor_query_mod:5294led flash is not supported for this sensor. Wrong sensor chosed as a result :(

Ideas???
[Xperia Z1 Original Android Development] munjeni:
Stil not understand why jerpelea not use sony sensors https://github.com/sonyxperiadev/ke...x/drivers/media/platform/msm/camera_v2/sensor
[Xperia Z1 Original Android Development] brickhayabusa:
I think that he can't use them because the compatibility with android versions and kernel.
[Xperia Z1 Original Android Development] munjeni:
Is 3.4 kernel boot with nougat?
[Xperia Z1 Original Android Development] markakash:
[MENTION=4120742]munjeni[/MENTION] I am not sure abt nougat, but 3.4 booted on mm. But nothing worked. No camera, no ril, no wifi/bluetooth only speaker.
[Xperia Z1 Original Android Development] brickhayabusa:
idk, at least [MENTION=5258151]drakonizer[/MENTION] says that he are working on 3.4 kernel.
[Xperia Z1 Original Android Development] drakonizer:
The folks over at the Z3 forums have a nearly stable cm13.0 build with the 3.4 kernel, with most things except camera working.
[Xperia Z1 Original Android Development] munjeni:
look into drivers/clk/qcom/mdss/mdss-dsi-pll-28hpm.c for idea, I can see than 1.3.3 uses msm8976 clocks which probably is wrong, I have done some patches from 1.2.2 but... http://pastebin.com/63qV23MR
[Xperia Z1 Original Android Development] munjeni:
Some things which I colected by now from stock libs trought ida, for reference about camera for z1 and z1c:

camera sensors on z1 and z1c:

1. firmware for sony camera 0: SEM02BN1 which indead point to the imx 200

2. firmware for sony camera 1: LGI02BN1 which indead point to the imx 132

So definitelly jerpelea have right sensors (imx200a and imx132)!

camera chomatix:

1. default chromatix which z1 and z1c uses is chromatix s5k3l1yx, so jerpelea definitelly uses wrong one. Somebody need to tell him to change it to s5k3l1yx , as a result we have wrong calibration!

Camera is v4l2 default on stock rom (we have kernel source code for it, but we don't use them. Why?), we don't uses them on any aosp rom?
[Xperia Z1 Original Android Development] raschad:
on Xperia Zr made android N working with cameras and Kernel 3.4

what is wrong with Xperia Z1???

sorry for my bad english.
[Xperia Z1 Original Android Development] munjeni:
VFE0 is broken, its runing only on VFE1 and we curently have half screen green and seccond half of the screen have 2 diferent previews like dual camera. You can provide url link to post of Zr nougat?