android_device_meizu_arale icon indicating copy to clipboard operation
android_device_meizu_arale copied to clipboard

CM14.0 porting progress

Open xen0n opened this issue 9 years ago • 22 comments
trafficstars

Expect progress to be very indeterminate; not only are the upstream branches floating, my free time is heavily fragmented too.

Don't drop by here often! ~~Guaranteed to be a waste of time before the cm-14.0 branch (without the staging prefix) appears.~~ cm-14.0 has just graduated from staging a while ago, but I'll still do my port slowly. Don't expect much progress at least until December.

  • [x] Bringup
    • [x] LD_PRELOAD not carried over into environment
    • [x] surfaceflinger
      • [x] workaround selinux
      • [x] hwcomposer crash
    • [x] wifi
  • [ ] Major functions
    • [ ] N-compatible init.rc services without hacks
    • [ ] audio
  • [ ] HAL
    • [ ] GPS interface redo
    • [ ] vibrator
    • [ ] sensor
    • [ ] brightness etc.
    • [ ] power
    • [ ] camera
    • [ ] video
    • [ ] OpenMAX
  • [ ] Telephony

xen0n avatar Sep 10 '16 18:09 xen0n

No SELinux is non-workaround-able now since CyanogenMod/android_system_core@4800dbf1da2b7d866c67c7375a55057f2b6c6d52, ALL services need an SELinux context to even get considered by init. Some serious troubles coming...

xen0n avatar Sep 13 '16 17:09 xen0n

does this mean a prebuilt kernel is a long way off?

afaulkner420 avatar Sep 26 '16 19:09 afaulkner420

@afaulkner420 No I have already worked around the SELinux part, but the most serious blocker now is gralloc blob segfaulting on SystemUI init. Can't seem to debug this for now 😕

xen0n avatar Sep 30 '16 09:09 xen0n

Just thought about giving dumpsys a shot and immediately got this:

Hardware Composer state (version 01040000):
  mDebugForceFakeVSync=0
  Display[0] configurations (* current):
    * 0: 1152x1920, xdpi=418.010986, ydpi=416.820007, refresh=16820857, colorTransform=0
  numHwLayers=3, flags=00000000
    type   |  handle  | hint | flag | tr | blnd |   format    |     source crop (l,t,r,b)      |          frame         | name 
-----------+----------+------+------+----+------+-------------+--------------------------------+------------------------+------
      GLES | 00000000 | 0000 | 0001 | 00 | 0105 | ? ffffffff  |   -0.2,   -0.2,   -0.8,   -0.8 |    0,    0, 1152, 1920 | DimLayerController/Stack=0
      GLES | b6592300 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,    0.0, 1152.0, 1920.0 |    0,    0, 1152, 1920 | BootAnimation
 FB TARGET | b692af00 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,    0.0, 1152.0, 1920.0 |    0,    0, 1152, 1920 | HWC_FRAMEBUFFER_TARGET

Seems interesting... Going deeper.

xen0n avatar Oct 01 '16 06:10 xen0n

Synced to latest sources and voila!

Please do note that I'll still be slow on the porting. Don't expect much progress at least until December.

screenshot_20161001-150106

xen0n avatar Oct 01 '16 07:10 xen0n

So it was a bug all over? That's interesting lol! Will we all be able to get to this stage now? I want to bring it up on mt6592...

afaulkner420 avatar Oct 01 '16 07:10 afaulkner420

@afaulkner420 Maybe, the crash originated in the MT6595 blob so I know nothing about them... I however applied a workaround in libgralloc_extra.so silently ignoring the bad queries with null handles, that wasn't pushed to GitHub. I'll remove the workaround to see how everything goes. That's precisely why the staging branch is distinct from the usual dev branch; it's meant for the unstable bits!

As for portability to other MTK chips, I have almost 100% confidence that the code is portable, considering the MTK chips are nearly identical looking from user-space. But you'd better wait until the official CM14.0 announcement is out, or be prepared with frequent rebases throughout the tree. 😄

xen0n avatar Oct 01 '16 07:10 xen0n

Ahhh that's understandable. I'm not looking for anything stable as such. I'm just wanting to play. I want to get a head start for later on down the line. I'll resync my tree and get going I think... I know there's going to be a lot of changes, but if I can get to this stage too ;) then all is good! Its still progress ;) And the more people doing it, I recon the quicker things may become more stable ;) Is there any clues as to when the actual cm14 repo may come about?

afaulkner420 avatar Oct 01 '16 07:10 afaulkner420

@afaulkner420 I don't know of any such "clue", but if things go fine I think it'll be early 2017? CM13.0 arrived several months after the Marshmallow code drop I remember.

BTW all my modifications are pushed to GitHub, so if you look closely at my repos you should be able to reproduce my progress (except vendor blobs perhaps). Good luck to your porting!

xen0n avatar Oct 01 '16 07:10 xen0n

Yeah that makes sense. They have alot of changes to make! Then getting it all stable aswelll... Can't be an easy task... And funny you should say that, I was just looking at ur commits in ur staging forks... I see some cloning and a bit of git format-patch coming along ;) Thanks for that! Good luck to you too! Whenever u get the time anyway! If I get anywhere with anything, I'll be sure to keep u posted and post on here!

afaulkner420 avatar Oct 01 '16 07:10 afaulkner420

Any further progress for mediatek platform ? @xen0n @afaulkner420

DarkKnight6499 avatar Dec 06 '16 14:12 DarkKnight6499

device : gionee m2 , chipset : mt6582 , kernel : prebuilt 3.4.67 , ROM : CM-14.1 , status : recursive reboot to bootlogo

ISSUE : adb detects my device , but i cant get a logcat

error like this persist : error: exec '/system/bin/sh' failed: No such file or directory

ps: that sh file is present though

last_kmsg : http://hastebin.com/titoliqito.md

Thnaks in advance

@xen0n @ferhung-mtk

diparthshah avatar Dec 18 '16 11:12 diparthshah

加油大神,期待android7.0,么么哒

liyuhao56 avatar Dec 24 '16 08:12 liyuhao56

Any news on this? It's really cool someone is taking care of MX4 users :)

ghost avatar Jan 24 '17 10:01 ghost

I'm really busy with academics and don't have time for this until June or maybe July. Sorry for the silence!

xen0n avatar Jan 26 '17 10:01 xen0n

No problem, good luck for your academics !!!

ghost avatar Jan 26 '17 16:01 ghost

Hey, whats new? When i will be able to download the rom?

TommyGunn52 avatar May 29 '17 11:05 TommyGunn52

Hi xen0n, Thank you and the others involved for all the work on mx4! I built the cm-14 version and indeed it boots into UI and wifi works. :+1: I was thinking I could look at the missing bits but I know very little about Android. :-( Is there something that needs to be done that is not particularly difficult? Looking at your list above, I see "N-compatible init.rc services without hacks" but that probably requires quite some android knowledge. What about audio? Could you (or anybody else here) point me to things to look at?

Looking at the sources I also have some questions:

  • the device-specific code seems to originally come from some MTK BSP (?) (for example android_frameworks_opt_telephony_mtk/src/java/com/mediatek/*) - what is the source? Is this the latest version available? Is the original BSP available anywhere?
  • if I understand git logs correctly the binaries (kernel, stuff in vendor/meizu/arale) come from Flyme OS. They were updated to 5.1.8.0A, right? I see there is now 5.1.12.0G available. Would it make sense to update these?
  • what about switching to Lineage? Is it something that makes sense only after the cm-14 version is up and running or are there perhaps some useful fixes in Lineage?

zub2 avatar Jun 10 '17 12:06 zub2

On Elephone P9000 we have all running on Nougat except video recording and playback of 1080p and 1080p 60fps.

You have any idea how to solve this last bigger issue?

THX

tribual avatar Oct 26 '17 12:10 tribual

Yandex.Translate: Hello, I am asking you to resume work on the project.

kosoymiki avatar Mar 06 '18 09:03 kosoymiki

@kosoymiki Unfortunately my arale's battery died, and my mx4 was lost. I'm so occupied in real life that I can't resume porting at least until very late in the year, if at all...

xen0n avatar Mar 06 '18 09:03 xen0n

@xen0n without your work on my kernel, there will never be a android 7, I really hope that you will have the time and energy and you will still finish what you started.

kosoymiki avatar Apr 25 '18 14:04 kosoymiki