yashsingh1/xdaforums huggingface dataset:
[Xperia Z3 Original Android Development] :
here's the start of the new device tree...

https://github.com/aosp-8x74/android_device_sony_leo/tree/n7.0

still lots of work to do though.
[Xperia Z3 Original Android Development] yecomixer:
[MENTION=3771760]aclegg2011[/MENTION] You will change the Kernel 3.4 or 3.10 will follow with?
[Xperia Z3 Original Android Development] :
I'm going to try my best to get one of the aosp 3.4 kernels to work.
[Xperia Z3 Original Android Development] yecomixer:
Thank you for your courage and effort into this work, I'm taking my first steps as a developer and hope to learn from your great work.
[Xperia Z3 Original Android Development] tomascus:
[MENTION=3771760]aclegg2011[/MENTION],

Hi, I have got a 3.4 kernel working with wifi.

Please feel free to browse https://github.com/tunturn/z3concept/commits/n-wifi if you need any reference

Bluetooth is broken, which I will have a look at
[Xperia Z3 Original Android Development] o0TzB0o:
sol26

can i flash this rom on sol 26 ?. z3 au ?
[Xperia Z3 Original Android Development] nailyk:
Should be fine but unsure about ril. Is it a D6603?

If your bootloader is unlocked, worst case scenario is: no more bootable with only fastboot access remaining. Take a full backup before (don't forget, twrp doesn't include /data/media aka /sdcard).
[Xperia Z3 Original Android Development] o0TzB0o:
is a japanese version not international like 6603
[Xperia Z3 Original Android Development] fooby_sjz:
Can 6633 do it ?
[Xperia Z3 Original Android Development] :
aclegg2011: yeah auo/sharp have those glitches .... unfortunatelly but even my leo has JDI also seems main devs have JDI too....

alviteri: so the only way to fix this is, is by using a 3.4x kernel? if I wanted to fix this myself locally, should I be looking at the .dtsi files?

aclegg2011: I mean you having that panel .... you can play and fix it eventually ..... becuase main devs having not the hardware to test ... is little complicated
[Xperia Z3 Original Android Development] nailyk:
#wontfix

I'm currently building with a q&d dtsi patch just to give a shot. I really don't know where to start...
[Xperia Z3 Original Android Development] :
android N preview 3 boot.img:

https://www.androidfilehost.com/?fid=24723757092307431

android N preview 3 system dump:

https://github.com/aclegg2011/android_vendor_sony_leo_n-prev3
[Xperia Z3 Original Android Development] :
So i decided Im done messing with this janky 3.10 kernel. I'll just be working with the 3.4 kernel from now on. Odviously Sony thinks its a good choice, otherwise they'd be using 3.10 too right?
[Xperia Z3 Original Android Development] tomascus:
What are your plans with the camera? As far as I know, Oneplus One still uses a camera wrapper in cm13 and cm14 to make it work.
[Xperia Z3 Original Android Development] :
for now Im not worried about cm 13 or cm 14. Right now Im still working on merging all three device trees together. Which Im about 75% done. Then I need to find a z3 3.4 kernel that'll boot on N. I have the full vendor with everything in it dumped from android N preview 3. Libs, camera stuff, apps, everything. Once we get everything locked into place on the AOSP side it'll be a little easier to work on the CM part of things. This is all my goal anyways.

https://github.com/aosp-8x74/android_device_sony_leo here's my current device tree. Im going to try to seperate the configs out a little better so it'd easier to update for cm use.
[Xperia Z3 Original Android Development] nailyk:
Iirc someone already post you this kernel: n preview.

According to this pull request there is missing part in the hal aosp display for msm8974 as our soc is in an abandoned state (confirmed by the aosp gerrit). Which hal do you plan to use aosp or caf variant?

Where you able to build the sodp LA.BR.1.3.3_rb2.14 variant?

Thank for your work!

Hum... Sounds logical. Blobs are build for older version, so they can't work with the new hal... And what about the hammerhead?

If i have time i will open the cross-dev chan + thread + github today.

edit:

I'm still unsure: the blobs on your rom, drm protected are build for 3.4 kernels. The released blobs from sony for customs rom are build to be working on 3.10 kernels...

Edit:

I'm too noob to know that so i need your expert advices:

assumption:

in the kernel 3.4 :

struct msm_cam_stream {
int a;
int b;
int c;
}

in the kernel 3.10 :

struct msm_cam_stream {
int a;
int b;
char d;
}

blobs made for 3.4 kernels will not work with 3.10 kernel as they will look at int in 3 parameter and found char instead and vice-versa. Am-I wrong?
[Xperia Z3 Original Android Development] tomascus:
I think it's more complicated that that...

Structs need to end with ; and char is missing size or pointer

example:

struct naik {

int foo;

char *dog;

};
[Xperia Z3 Original Android Development] nailyk:
Sure! thanks. But what i can't get is, if a blob build using the struct 'a' and in the next kernel this struct is update, call them 'b', does the blobs will continue to work? My guess is we will go into segfault as the blob will look at the 'a' struct and the driver will provide the 'b' struct.
[Xperia Z3 Original Android Development] tomascus:
If the blobs are proprietary, it would be hard to even see what happens due to lack of source code.

But in general, it would probably crash since it can't find the right struct members.

edit: those are just header files, declaring the structs, which are used by the actual code somewhere else
[Xperia Z3 Original Android Development] :
I've got my device tree to build! Its not ready to be tested yet. I need to configure somethings, fix the camera hals, and sepolicy.
[Xperia Z3 Original Android Development] :
Using my device tree, I couldn't get the z3concept kernel to boot. I switched the boot.IMG from the z3concept kernel to the 3.10 kernel and n boots.
[Xperia Z3 Original Android Development] tomascus:
Can you describe the issue you have ? Logs? Dmesg?
[Xperia Z3 Original Android Development] :
It just sits at the sony screen. I already switched to android n preview kernel.
[Xperia Z3 Original Android Development] tomascus:
Does the screen brightness decrease like 20 sec after? Or just purely stuck on boot logo at full brightness? You could try FXP Ramdisk https://drive.google.com/file/d/0B3bfLXY54yW-RndrWF9xQjlucVU/view?usp=sharing, worked for me
[Xperia Z3 Original Android Development] :
No, it does t even get to the boot animation. I was thinking of cracking open the android n preview 3 boot.IMG and using that ramdisk on the android n preview kernel.
[Xperia Z3 Original Android Development] tomascus:
You can try my kernel that worked (at least for me), i'll build it for leo and upload, won't be a moment. [MENTION=3771760]aclegg2011[/MENTION] https://drive.google.com/open?id=0B3bfLXY54yW-bTZoQ20yclpHY00

If it gets stuck on boot screen, but screen darkens, try adb push the stock display+media I use https://drive.google.com/file/d/0B3bfLXY54yW-X0VWRV9hUEtrZFU/view
[Xperia Z3 Original Android Development] :
Before I went to work I tested the android n preview kernel (I got it to build by using two files from hammerheads kernel), but it woukdnt boot. So I checked kmsg in twrp and ended up having selinux issues. I disabled selinux through the kernel and had a build going before going to work.
[Xperia Z3 Original Android Development] nailyk:
My bad! I totaly forget talking about that!

All the 3.4 kernel i test were not selinux up-to-date so they only support policy <= 26.

To get it build on cm i use a external/sepolicy fork + 3 lines + some sepolicy changes to get the right permissions.

Hope it helps.

---------- Post added at 19:32 ---------- Previous post was at 19:31 ----------

Nice work btw! But sorry i can't hit thanks no more :(
[Xperia Z3 Original Android Development] :
you're cgtest.img boot loops at the Sony screen.
[Xperia Z3 Original Android Development] :
so I've tried three kernels. The 3.10 kernel, the cgtest.img kernel and the DP3.img kernel. None of them will boot but the 3.10 kernel. I even tried switching out the ramdisks and zImages, but no go. Hrmmmm. What is it about the 3.10 kernel that the 3.4 doesn't have?
[Xperia Z3 Original Android Development] tomascus:
I accidentally packed that with ramdisk from Aries actually.. you tried switching ramdisk though yeah?
[Xperia Z3 Original Android Development] :
yea, I saw that. ;) , SO much for sony being aosp like. :p I never had issues with kernels on a Nexus device before. I wonder if the only AOSP kernel is the 3.10 kernel? And the other opensource kernels sony releases are for their sony roms?
[Xperia Z3 Original Android Development] tomascus:
LNX branch is 3.4 but it's super old
[Xperia Z3 Original Android Development] :
I was thinking about trying the 3.4 cm13 kernel. I know it was last updated back in 2015, but the last half. This is pretty crappy. Im not really a kernel dev, so I can't really fix the panel bug either.
[Xperia Z3 Original Android Development] tomascus:
I'll build another properly within the hour.... It works fine for me :silly:
[Xperia Z3 Original Android Development] :
If the phone boots on an old 3.4 cm kernel Im going to lmao. :p That also means it'll take a while to bring that kernel up to speed. :(
[Xperia Z3 Original Android Development] tomascus:
I patched cm12 kernel already https://github.com/nailyk-fr/android_kernel_sony_msm8974/commits/cm-13.0_work just missing selinux stuff, nailyk said it worked on cm13
[Xperia Z3 Original Android Development] :
Well, that's another kernel I could try :p One of these besides the janky 3.10 kernel has to atleast boot.
[Xperia Z3 Original Android Development] tomascus:
https://drive.google.com/open?id=0B3bfLXY54yW-a0IwOTVkY0FEZVE

I'm not at my linux machine so I can't mkbootimg atm.

Sigh, last attempt! cmd line is "console=ttyHSL0,115200,n8 vmalloc=300M user_debug=31 androidboot.selinux=permissive msm_rtb.filter=0x3F ehci-hcd.park=3 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y coherent_pool=8M androidboot.hardware=leo"

I put aries in there last time....

Don't give up on me! Hahaha
[Xperia Z3 Original Android Development] :
I just cloned it in to my kernel dir and changed the defconfig to the cms. fingers crossed.

BOARD_KERNEL_CMDLINE += console=ttyHSL0,115200,n8

BOARD_KERNEL_CMDLINE += vmalloc=300M

BOARD_KERNEL_CMDLINE += androidboot.hardware=leo

BOARD_KERNEL_CMDLINE += user_debug=31 androidboot.selinux=permissive

BOARD_KERNEL_CMDLINE += msm_rtb.filter=0x3F ehci-hcd.park=3

BOARD_KERNEL_CMDLINE += dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y

BOARD_KERNEL_CMDLINE += coherent_pool=8M

that's my command line. I haven't combined it all into one yet. :p
[Xperia Z3 Original Android Development] tomascus:
Ahhh I always build my kernel out of tree hahaha.

Fingers crossed it works.
[Xperia Z3 Original Android Development] :
nope, bootloops.
[Xperia Z3 Original Android Development] tomascus:
can you access recovery before it bootloops i.e purple light indicator comes on?

last_kmsg would be good to diagnose this.

I can't fathom it, it works fine on aries...
[Xperia Z3 Original Android Development] :
yea, I get into twrp. where is last_kmsg located at?
[Xperia Z3 Original Android Development] tomascus:
proc/last_kmsg

so you can easily:

adb shell "cat proc/last_kmsg"
[Xperia Z3 Original Android Development] :
no such file or directory
[Xperia Z3 Original Android Development] tomascus:
Did you let it bootloop it least once for it to dump crash into last_kmsg?

Contents gets cleared if you manually power off device.
[Xperia Z3 Original Android Development] :
yep. if I let it do it twice the LED turns orange.
[Xperia Z3 Original Android Development] tomascus:
ahh man, try the absolute path "cat /proc/last_kmsg"
[Xperia Z3 Original Android Development] :
nope. nothing dude. So if you want AOSP you're stuck on 3.10. it seems.
[Xperia Z3 Original Android Development] tomascus:
Damn that really sucks, I'll have another look when I have time. Btw, do you have Hangouts or something so we don't clutter this thread?
[Xperia Z3 Original Android Development] :
Yea, I have hangouts, aclegg2011@gmail.com
[Xperia Z3 Original Android Development] :
As of today Im dropping support for this device. And recommend looking at other companies that actually care about the the open souce community and know what they're doing. Thank you to everyone that's helped with this project!
[Xperia Z3 Original Android Development] yecomixer:
That means you'd stop work on AOSP Android Nougat for Z3 or am I wrong? I expected an update with Kernel 3.4:crying:
[Xperia Z3 Original Android Development] :
No, I couldn't get any 3.4 kernels to work with n. ???? I'm actually running android n preview 3 now.
[Xperia Z3 Original Android Development] yecomixer:
Is that since I broke the screen and change from the original is no longer with me with Kernel 3.10 and earlier do believe I've seen a few cases forum CM13 having the same case, really do not know where this incompatibility screen because I could before mounting any rom with 3.10 Kernel
[Xperia Z3 Original Android Development] Allexandre09:
Xperia Z3 - Nougat

Olá! Demora aproximadamente quanto tempo? Fiz esses procedimentos mais no final o aparelho ficou com a LOGO do Sony por mais de três horas... E desisti e voltei para uma outra ROM.
[Xperia Z3 Original Android Development] Me Gusta:
2 things.

1. English.

2. Don't quote the entire OP.
[Xperia Z3 Original Android Development] Allexandre09:
Hello! It takes approximately how long? I made these procedures but in the end the appliance got the LOGO Sony for more than three hours ... and I gave up and went back to another ROM.
[Xperia Z3 Original Android Development] nailyk:
The sony logo should disappear after a few seconds. Sadly, for some devices with replaced LCD panels the 3.10 kernel will never start...
[Xperia Z3 Original Android Development] Nojus33:
I don't want to sound rude, but I have a question. What is stopping developers to make stable custom roms for this device? Most are good but about all of them don't have working camera, which is important. Lack of sources, maybe no one is interested in this device? And one more thing, is it even possible that sooner or later Z3 will get fully working Nougat rom?
[Xperia Z3 Original Android Development] Swidilator:
A significant amount of devices experience a screen tearing effect(bad enough to make it unbearable) due to having a certain type of display panel, however the Sony devs that make the 3.10 kernel don't have this panel and therefore can't help fix it. Also, from what I know, if you have a replacement panel, the 3.10 kernel simply won't boot.

The camera is touchy on 3.10, and thus far nobody has gotten a 3.4 kernel to boot Nougat, and if they did, the camera would require older blobs that then need a wrapper written to make it compatible.

Thirdly, a lot of people have moved on to newer phones, or dropped support due to the above-mentioned difficulties.

Basically, we need talent, and drive, which at the moment is in short supply, with only a couple devs still active with our device.
[Xperia Z3 Original Android Development] tomascus:
See post http://xdaforums.com/showpost.php?p=68598112&postcount=34

Kernel 3.4 works, no BS.

Anyway, as far as I know, it's merely only me and one another working on this device. Actually I did make some strides in the camera - the HAL appears to successfully load but I got stumped on another error which I don't have time to solve since I need my phone as both a dev device and a daily driver.

We are working on getting kernel 3.4 with working camera in cm13 first, then use that as a stepping stone to Nougat.

Extra help would be nice, all I see on XDA is people eagerly waiting for things to happen, yet don't take time to help out with development itself. :p
[Xperia Z3 Original Android Development] :
Don't count me out completely yet. I have some more tricks up my sleeve.
[Xperia Z3 Original Android Development] Nima Alami:
Please support from dual SIM(D6633).
[Xperia Z3 Original Android Development] redlabour:
No because there is no Driver for our Snapdragon that works with 7.0.
[Xperia Z3 Original Android Development] Nojus33:
Development was and is so dead for this device. Afrer my contract is over, i'm switching to oneplus
[Xperia Z3 Original Android Development] tomascus:
I've spent hours upon hours trying to get the damn camera to work alongside others but it doesn't look like it's happening.

Btw, thanks for the not so very useful post, consider helping us with development so it'll be less dead. :p
[Xperia Z3 Original Android Development] Nojus33:
OK, I was too rough, sorry about that. It just makes me sad that nobody can do anything about it, and I don't know what to blame. Anyway good luck for you all developers who are at least trying to do something. Sorry for previous post.
[Xperia Z3 Original Android Development] tomascus:
No problem man :)

Yes I agree, I am also quite sad and frustrated that I can't get it working well.

To be honest Sony doesn't seem like a very developer friendly device to work with - AOSP and Cyanogenmod on our devices never ever had fully functioning camera, we merely relied on using camera blobs from Jelly Bean from the Xperia Z1, which ultimately had issues like the infamous fish eye effect.

I do highly appreciate Sony's efforts with their "Open source programs" and such but urghh..... camera.

Issue with 3.4 kernel used in stock - camera won't work due to DRM protection on blobs, even if we could use JB blobs from Z1, we'd still have annoying fish eye effect.

Issue with 3.10 kernel (1.3.3 branch) used by sonyxperiadev - camera shows a half green display and quality is shockingly bad, and no one can figure out why/

Issue with 3.10 kernel (1.2.2 branch) - vidc/iommu bug causing random reboots every now and then, camera is "OK-ish"

So yeah... it's really tough :P
[Xperia Z3 Original Android Development] henk_j:
As a user I would rather have 7.0 with back ports for what's not working. Rather with fisheye than with no camera. And then development can do their tricks. And hopefully all the back ports can be solved and in the end a true nougat will hit my z3 (running 7.0b4 at the moment.)
[Xperia Z3 Original Android Development] pickandrew:
Hello, this ROM is also compatible with the version Xperia Z3 D6602, D6643 or D6653?

Thank you!
[Xperia Z3 Original Android Development] BiscuitEdi:
Got the 6603 laying around and decided to look into roms.

This looks interesting but considering that it's not for daily use I will have to wait.

Hopefully it's updated soon, cheers!
[Xperia Z3 Original Android Development] TheXorg:
Are there no updates because nobody is compiling it with changes made (seems like there were some fixes on camera) or are those issues still present with current sources from github? It's really a shame that there's just such a unuseable AOSP 7.0 ROM, while older devices like Nexus 4, Moto G, etc. having 7.1 roms that are nearly stable.
[Xperia Z3 Original Android Development] Nacholaborde:
Work z3 dual (d6633)??
[Xperia Z3 Original Android Development] h1ghland3r:
Yeah, it's really sad =( Sony is not good for AOSP development.

Sent from my Xperia Z3
[Xperia Z3 Original Android Development] henk_j:
http://www.xda-developers.com/sony-...to-build-android-7-1-aosp-for-xperia-devices/

Perhaps skip a step?
[Xperia Z3 Original Android Development] TheXorg:
Mhh currently I dont think so :crying:
[Xperia Z3 Original Android Development] TheXorg:
Sony also published how to build AOSP 7.0, but as you've seen, that did never help to get a perfectly working Rom, e.g. camera was/is always a problem (AFAIK)
[Xperia Z3 Original Android Development] Nojus33:
Even if camera gets fixed in another thread, probably nobody will be able to build fully functional AOSP. Seriously, the lack of developers is just insane. Infact all the "ROMS" available for this device were based on stock. I just call these "ROMS" kits of premade stuff. They are all f**king same!!! And when Sony released final .291 build few of these good "developers" which build these "kits of premade stuff" just disappeared. Coincidence? I think not. I thought they could buid AOSP roms easily, but looks like no. Maybe I sound like complete jerk, but I couldn't hold it anymore. Yes, there still are some great people trying to fix something, but it's sad that this device didn't get much development in first place.
[Xperia Z3 Original Android Development] Sahaab:
there was a new AOSP camera release by sony for xperia z5, wud it be possible to port that to z3?
[Xperia Z3 Original Android Development] Antonio1967:
I think there's a fully functional "alpha" android 7.1 rom for the s5. Is it possible that Google made it easier to make a rom for sd801 devices
[Xperia Z3 Original Android Development] flrenato:
Has this been seen already?

developer.sonymobile.com/open-devices/aosp-build-instructions/how-to-build-aosp-nougat-for-unlocked-xperia-devices/#build-experimental-aosp-nougat-7-1
[Xperia Z3 Original Android Development] Rajeev:
Post No : 128
[Xperia Z3 Original Android Development] -Happy Feet-:
Works the camera, or not?
[Xperia Z3 Original Android Development] Omario-242:
There isn't even a working rom based on AOSP 7.0 for the Z3 yet and you ask for a working camera?

This whole discussion in this thread is useless. The dev that created this thread and was or is working on this project

hasn't responded in quite some time (and that's ok).

The incompatibility of AOSP 7.0 and our processor in combination with the problems regarding camera and wifi chipsets

will probably result in no rom for Z3 based on 7.0 / 7.1 at all.

The problem with Sony's instructions to build AOSP is, that they are not referring to our device but "unlocked Xperia devices" in general,

which means that AOSP for Z3 isn't as easy to build as it may seam since Qualcomm dropped the SD801 support .

I would love to see a working AOSP rom but I think that won't happen.

So please keep this thread clean, it is still a Development thread.
[Xperia Z3 Original Android Development] Nojus33:
It's not just qualcomm. For example Nexus 5 with SD 800 has almost fully working AOSP. The real problem is lack of source and developers.
[Xperia Z3 Original Android Development] Omario-242:
Just read through that (http://www.androidauthority.com/android-7-0-snapdragon-800-801-712930/) and it seems you're right.

Technically the processors and our devices are able to support Nougat, but it seems that Google doesn't allow the official update

because of hardware encryption, which was introduced with SD 805.

So it is like you said, probably the source problems, which I find kind of sad tbh.

Sony always states that it is developer and community friendly but releases pretty much useless sources or only proprietary ones

that won't work on a daily-used, AOSP based rom.

Kind of a bummer.
[Xperia Z3 Original Android Development] :
Actually, 7.1 should be buildable. No guarantee everything will work though.
[Xperia Z3 Original Android Development] heorung:
Actually the camera for z1,z2,z3 device was fixed and the blob was released. Rom for Z2 and Z2 tablet build on AOSP has working camera.

http://xdaforums.com/showpost.php?p=69405173&postcount=1527
[Xperia Z3 Original Android Development] Rajeev:
Autofocus not works atm. And the camera have problems. Its failed to start some times and the output clarity is not good..
[Xperia Z3 Original Android Development] heorung:
Yes it is , but this is just the early stage
[Xperia Z3 Original Android Development] Rajeev:
Yes i know.. ;)
[Xperia Z3 Original Android Development] Antonio1967:
One noobish question. Sorry to ask because it not really related to aosp.Can z4/z5/xp/xz nougat roms be ported to the z3?
[Xperia Z3 Original Android Development] nailyk:
It work sort of that way. The kernel we use is unified between xperia so it is the same for all devices. But families are different (rhine, shinano, tone, kitakami, etc...) and all of them have different hardware, so different drivers. And the buggy part for our rhine & shinano are this sort of drivers.