• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root anyone try to port Android L?

rbheromax

Android Expert
i started fiddling around with the nexus 5 android l build, tried to port to awe.
i sorta get to what is supposed to be the bootanimation, its a grey screen with tons of lines, so framebuffer issue due to gralloc module not being loaded

so far adb works


Some background:
for starters, they updated the init binary to include some new stuff (real booting from offline charging, selinux starting at init, native 64 bit starting with init?)

in the init process, on boot, it spawns most of the processes android needs using the zygote. in android L they took this and gave it its own init script and definition (to allow 64 bit to selected)
https://android.googlesource.com/platform/system/core.git/+/4456a55ce69cd5b8ad39349ed55d3efc3512bffa

now with this, since selinux was introduced, it has to be marked in "context" and if not, it will not execute. selinux is killing me, and stops the zygote process from spawning effectively halting boot. i do get adb and root.

in the android L preview they replaced logcat with an incompatible? logcat, so i took the one from stock and its necessary libs (liblog.so and one other) and stuck them in the port, and logcat started working but it only gets to error out where screen goes wonky and thats all that displays.

dmesg shows that selinux is kiliing what would be considered "rogue" processes since some stuff isnt defined in the selinux context.

i'll have some more info and logs if anyone wants to help out
 
lpv79-nex-port-prealpha6

thats what I got so far, it seems there are still multiple problems still but the biggest of them all right now are selinux and the nexus 4 port using opengles3 and were still stuck on opengles2 (afaik.) This throws up a bunch of errors about specific things that the android l port is looking to do but opengles2 doesnt support, I dont know if that can be worked around without full source at this point.

anyone want to dl it and see if you can get further than me? im at my wits end already and could use another set of eyes on it.

edit: forgot to say that I somewhat got it booting, still nothing on screen but lines like rbheromax reported but the logcat shows its doing stuff like dex2oat and things that are encouraging!
 
lpv79-nex-port-prealpha6

thats what I got so far, it seems there are still multiple problems still but the biggest of them all right now are selinux and the nexus 4 port using opengles3 and were still stuck on opengles2 (afaik.) This throws up a bunch of errors about specific things that the android l port is looking to do but opengles2 doesnt support, I dont know if that can be worked around without full source at this point.

anyone want to dl it and see if you can get further than me? im at my wits end already and could use another set of eyes on it.

edit: forgot to say that I somewhat got it booting, still nothing on screen but lines like rbheromax reported but the logcat shows its doing stuff like dex2oat and things that are encouraging!
We use opengles3
 
are you sure about that phenom?

in the build.prop for your cm11, i found this:

#
# system prop for opengles version
#
# 131072 is decimal for 0x20000 to report version 2
ro.opengles.version=131072

which chipset do we have anyway? lol. every site on a google search is saying something different, pdadb says we have an s4 msm8625 with adreno 203 graphics, and another says msm8630 with adreno 305. now im confused, i used this https://play.google.com/store/apps/details?id=com.Bfield.CpuIdentifier&hl=en and it seems to support the adreno 305 and opengles3 compatible theory. i dont know, im tired and have been trying to get android L preview to boot for 2 days straight.

also, thank you so much for bringing a stable cm to the awe, you are awesome!
 
are you sure about that phenom?

in the build.prop for your cm11, i found this:

#
# system prop for opengles version
#
# 131072 is decimal for 0x20000 to report version 2
ro.opengles.version=131072

which chipset do we have anyway? lol. every site on a google search is saying something different, pdadb says we have an s4 msm8625 with adreno 203 graphics, and another says msm8630 with adreno 305. now im confused, i used this https://play.google.com/store/apps/details?id=com.Bfield.CpuIdentifier&hl=en and it seems to support the adreno 305 and opengles3 compatible theory. i dont know, im tired and have been trying to get android L preview to boot for 2 days straight.

also, thank you so much for bringing a stable cm to the awe, you are awesome!
I'm pretty sure we have a MSM8930 with a 305 Adreno GPU
 
Could a script be executed on boot, to set selinux to permissive mode, just until startup? Came across this on xda, it might be a step in the right direction. I think the selinix enforcement mode is enabled in the kernel by default for 4.3+ Obviously you couldn't run this app without it booting first, but it might hold the key to getting around the boot issue.

[APP][4.3++]SELinuxModeChanger[PRE-ALPHA] - XDA Forum

Edit: A custom kernal also comes to mind. If you drum anything up that might work I'll be happy to test it.
 
Can you post your device tree? My initial guess is that you should be using the sepolicy folder from mako.

*edit* pardon my momentary stupidity, you're modding the prebuilt, not going from the partial source dump. Try porting the Nexus 4 preview instead of Nexus 5, it should be more or less compatible due to hardware similarity.
 
I'm pretty sure we have a MSM8930 with a 305 Adreno GPU

Yes. There's also the 8930aa and 8930ab out there, but we're using plain 8930. Only difference between them however is higher cpu clock speeds, so the code is pretty much compatible between them. Most of the kernel code is shared with the MSM8960 / APQ8064 anyways.
 
Can you post your device tree? My initial guess is that you should be using the sepolicy folder from mako.

*edit* pardon my momentary stupidity, you're modding the prebuilt, not going from the partial source dump. Try porting the Nexus 4 preview instead of Nexus 5, it should be more or less compatible due to hardware similarity.

hey spock,

im using this: [L][5.0][PORT] Android L pv-79 Developer preview for Nexus 4 [BETA] - XDA Forum, i think its an sdk dump from the emulator. is there an actual nexus 4 preview like the 5 got?

is the sepolicy folder part of rom, ramdisk or kernel? that could be the problem, as it seems like auditd is denying everything from reading logcats. any easy way to edit that using prebuilt stuff from the thread linked above and phenom's cm11 ramdisk? I used the ramdisk from the nexus 4 port above to mod our cm11 ramdisk, and even added in the new things like init.zygote32.rc, and tried to make sure that anything selinux related I copied into it. Using the bootclasspath from phenom's cm11 kernel, I got it booting on cm11 but not the android L port.

heres the nexus 4 ramdisk im working from: https://github.com/Android-L-Porting-Team/Android-L-Mako/tree/master/boot/ramdisk

i downloaded this: http://forum.xda-developers.com/showthread.php?t=2721136 and put /lib/egl and /etc/firmware from it in the rom and the surfaceflinger dying problem seems to have gotten better, it gets further in loading the egl stuff in logcat

ill see if i can upload what im working on now, it took an hour to upload what i posted above

thanks for the help everyone, and if you have any more ideas please do tell, im running short on them
 
anyone feel like looking at a logcat for me? i could use a second set of eyes

[url=http://www.mediafire.com/view/eayjplupa1k7m5n/log4.txt]log4[/URL]

dmesg soon to come, and an update rom zip that gets further than the older one. now i get the green android dude, then a blue flash like the display wants to load, after that black and adb access for about 5 minutes until surfaceflinger crashes too many times and causes it to reboot.

surfaceflinger is still dying on me, which causes around 4 other display services to die too, its all in the logcat. im pretty sure im still getting selinux errors too, but someone smarter than me can hopefully verify that.

im uploading the rom with alot of google bloat (gmail, hangouts, plusone, etc) cut out and will post the link once done

edit: uploaded new rom: http://www.mediafire.com/download/j2ivtmtf2cd8wvm/lpv79-nex-new-test2-goodslim.zip

edit2: this seems to fix a few more errors in logcat: http://www.mediafire.com/download/0181286l5tupu5s/testfixforslim1nexlibs.zip
 
First off..... take /system/lib/libmm-abl.so and /system/lib/libmm-abl-oem.so and put them in their respective places. This allows the "ppd" service to run, which "surfaceflinger" needs, but isn't being reported to logcat as failing to run. Then on to getting "surfaceflinger" stable(-er)....

Quick TUT:
adb shell

once in, run "/system/bin/surfaceflinger" manually
it'll throw an error about the libs it wants
take them from the CM11 ROM (repeat process until it starts asking for specific strings instead of files)
then it'll start to bug you about specific strings, you can grep for those:
grep '<string>' (CM11 lib folder location) -r
throw in the libs it says (minus anything important and rom specific like libaudioflinger.so or libbinder.so, so use good judgement)
and then it'll finally bug you about this string: "fdprintf", which is listed in a bunch of camera and video libs, but i think using those would break stuff, so I have yet to move past this point. but its at least progress. I think I'm done for the night, gonna work on some of my music. If I get back to it, and fix it, I'll post again
 
First off..... take /system/lib/libmm-abl.so and /system/lib/libmm-abl-oem.so and put them in their respective places. This allows the "ppd" service to run, which "surfaceflinger" needs, but isn't being reported to logcat as failing to run. Then on to getting "surfaceflinger" stable(-er)....

Quick TUT:
adb shell

once in, run "/system/bin/surfaceflinger" manually
it'll throw an error about the libs it wants
take them from the CM11 ROM (repeat process until it starts asking for specific strings instead of files)
then it'll start to bug you about specific strings, you can grep for those:
grep '<string>' (CM11 lib folder location) -r
throw in the libs it says (minus anything important and rom specific like libaudioflinger.so or libbinder.so, so use good judgement)
and then it'll finally bug you about this string: "fdprintf", which is listed in a bunch of camera and video libs, but i think using those would break stuff, so I have yet to move past this point. but its at least progress. I think I'm done for the night, gonna work on some of my music. If I get back to it, and fix it, I'll post again

thanks for the advice, im trying to do what you listed but im failing at just about all of it. could you upload a rom zip of what you have at the fdprintf part? if so, thanks in advance
 
I think I have some info that might help you guys. I just used this tool called rom porter that I got from XDA and made some progress. I got to the boot animation and then got stuck in a boot loop. Now< I know that's not a lot but at least it's something. I used cm11 for zte awe that i got from here for the base rom and then used the nexus 4 android l ported rom from XDA for the prt rom. hope this helps you guys and also if I said something that you already knew, im sorry but this is my first time on these forms and im also not that experienced with rom porting. thanks!
 
We use opengles3

Ogles3 isnt working properly on your roms, just fyi. Ive been trying to get this mentioned to you multiple times dunno if it ever got through. Maybe it hasnt been ported properly?

If it gets fixed there maybe itll help for L.

I have been wondering if anyone would BOTHER porting 4.3 from the N4 since its tree seems to be used often enough. Could help further progress, but I'm not a porter/competent enough dev to attempt myself so take my post as a willing tester instead I suppose
 
the last point i was at with it was a blank screen (due to opengles 3/surfaceflinger problems,) but mostly booting port. dex2oat seemed to be doing its job mostly, but would get hung up on something and reboot the device. the guys over at xda in the gnex forums are talking about the same thing now though, so i'm keeping an eye on what they are doing to fix it and if it will help us.
 
newest logcat if anyone wants to take a peek, rebased off of nexus 7 at the suggestion of the nexus 4 android L port creator, sykopompos from xda

here

audio still needs fixed, ive been trying different combos of files and cant get it just right, and surfaceflinger is a big one, it just dies over and over so theres no output to the screen. this in turn causes display.qservice to die constantly, and media.audiopolicy/flinger/camera/player to die constantly also. but the underlying system is working, which is excellent news, just need to find a way to get screen output and audio then it might boot.
 
anyone feel like looking at a logcat for me? i could use a second set of eyes

[url=http://www.mediafire.com/view/eayjplupa1k7m5n/log4.txt]log4[/URL]

dmesg soon to come, and an update rom zip that gets further than the older one. now i get the green android dude, then a blue flash like the display wants to load, after that black and adb access for about 5 minutes until surfaceflinger crashes too many times and causes it to reboot.

surfaceflinger is still dying on me, which causes around 4 other display services to die too, its all in the logcat. im pretty sure im still getting selinux errors too, but someone smarter than me can hopefully verify that.

im uploading the rom with alot of google bloat (gmail, hangouts, plusone, etc) cut out and will post the link once done

edit: uploaded new rom: lpv79-nex-new-test2-goodslim

edit2: this seems to fix a few more errors in logcat: http://www.mediafire.complete/download/0181286l5tupu5s/testfixforslim1nexlibs.zip

So I have some questions about this. If I flash this, will I still be able to boot back into recovery without ADB? I ask because I noticed the recovery patch file in there. Also, did anyone get SELinux to stop halting the zygote processes? I have some edits I want to try out in the ramdisk that might just get this thing working better.
 
So I have some questions about this. If I flash this, will I still be able to boot back into recovery without ADB? I ask because I noticed the recovery patch file in there. Also, did anyone get SELinux to stop halting the zygote processes? I have some edits I want to try out in the ramdisk that might just get this thing working better.

hey modhatter,

the recovery patch file is just a leftover remnant, it doesnt actually do anything. its removed in the updated zip files im working with, just ignore it. the only thing that wont let you get back to recovery through adb is the fact that the phone freezes up from services dying and dex2oat stalling, so you have to be quick with what you try to do.

on another related note:
from what i gather, the big problem around the display is the fact that I am using phenom's cm11 kernel(which is amazing by the way :) ), which probably uses caf display drivers? (i have no clue, just what i read on the interwebz.) people are saying that we would need to revert to aosp style display drivers in kernel to get output on the screen, if anyone can shed some more light on that and is good with kernel work please lemme know.
 
Back
Top Bottom