[solved] Problem With Libc When Trying To Port Cm13


reichmyu

Members
Jul 15, 2014
157
40
Hi guys! :D

I have been trying to port CM13 from the Vernee Apollo Lite.
Here is what I have done:
- Editing the boot.img from CM13 to get it working in the Redmi Pro
- fstab changes to solve some bugs caused because the 2 phones have different partition layouts
- Including some libraries from MIUI

However I am getting an error related with libc and the boot logo (which shows up inverted ^^). I have tried many things but I cannot get it working so I leave you here a part of the logcat to see if someone can help.

Thanks in advance :)

Code:
12-08 20:37:06.772   337   337 F libc    : Invalid address 0xf700a068 passed to free: value not allocated

12-08 20:37:06.772   337   337 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 337 (boot_logo_updat)

12-08 20:37:06.772   361   361 I DEBUG   : property debug.db.uid not set; NOT waiting for gdb.

12-08 20:37:06.772   361   361 I DEBUG   : HINT: adb shell setprop debug.db.uid 100000

12-08 20:37:06.772   361   361 I DEBUG   : HINT: adb forward tcp:5039 tcp:5039

12-08 20:37:06.775   384   384 D MsensorDaemon: do not USE_LIBC_SYSTEM_PROPERTIES

12-08 20:37:06.775   384   384 E MsensorDaemon: [65] ''

12-08 20:37:06.777   648   791 W dex2oat : Skipping class com.quicinc.tcmiface.DpmTcmIface from /system/framework/org.apache.http.legacy.boot.jar previously found in /system/framework/okhttp.jar

12-08 20:37:06.794   336   336 E SurfaceFlinger: rejecting buffer: bufWidth=1, bufHeight=1, front.active.{w=312, h=0}

12-08 20:37:06.794   336   336 W hwcomposer: [HWC] (0) PRE/bypass/boot=0.1

12-08 20:37:06.796   336   336 W hwcomposer: [JOB] (0) SET/bypass/nulljob

12-08 20:37:06.824   361   361 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

12-08 20:37:06.824   361   361 F DEBUG   : CM Version: '13.0-20161119-UNOFFICIAL-ApolloLite'

12-08 20:37:06.824   361   361 F DEBUG   : Build fingerprint: 'Xiaomi/cm_omega/omega:6.0.1/MOB31K/cd51a6d3cd:userdebug/test-keys'

12-08 20:37:06.824   361   361 F DEBUG   : Revision: '0'

12-08 20:37:06.824   361   361 F DEBUG   : ABI: 'arm'

12-08 20:37:06.824   361   361 F DEBUG   : pid: 337, tid: 337, name: boot_logo_updat  >>> /system/bin/boot_logo_updater <<<

12-08 20:37:06.824   361   361 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------

12-08 20:37:06.827   361   361 F DEBUG   : Abort message: 'Invalid address 0xf700a068 passed to free: value not allocated'

12-08 20:37:06.827   361   361 F DEBUG   :     r0 00000000  r1 00000151  r2 00000006  r3 f74f3b8c

12-08 20:37:06.827   361   361 F DEBUG   :     r4 f74f3b94  r5 f74f3b44  r6 00000009  r7 0000010c

12-08 20:37:06.827   361   361 F DEBUG   :     r8 f7009008  r9 f746358c  sl 00000001  fp ffaac7cc

12-08 20:37:06.827   361   361 F DEBUG   :     ip 00000006  sp ffaac670  lr f742ce8d  pc f742e308  cpsr 40070010

12-08 20:37:06.827   336   336 E SurfaceFlinger: rejecting buffer: bufWidth=1, bufHeight=1, front.active.{w=312, h=0}

12-08 20:37:06.827   336   336 W hwcomposer: [HWC] (0) PRE/bypass/boot=0.1

12-08 20:37:06.830   336   336 W hwcomposer: [JOB] (0) SET/bypass/nulljob

12-08 20:37:06.843   361   361 F DEBUG   :

12-08 20:37:06.843   361   361 F DEBUG   : backtrace:

12-08 20:37:06.843   361   361 F DEBUG   :     #00 pc 00042308  /system/lib/libc.so (tgkill+12)

12-08 20:37:06.843   361   361 F DEBUG   :     #01 pc 00040e89  /system/lib/libc.so (pthread_kill+32)

12-08 20:37:06.843   361   361 F DEBUG   :     #02 pc 0001c7fb  /system/lib/libc.so (raise+10)

12-08 20:37:06.843   361   361 F DEBUG   :     #03 pc 000199ad  /system/lib/libc.so (__libc_android_abort+34)

12-08 20:37:06.843   361   361 F DEBUG   :     #04 pc 00017560  /system/lib/libc.so (abort+4)

12-08 20:37:06.843   361   361 F DEBUG   :     #05 pc 0001b40f  /system/lib/libc.so (__libc_fatal+16)

12-08 20:37:06.843   361   361 F DEBUG   :     #06 pc 000566a7  /system/lib/libc.so (ifree+202)

12-08 20:37:06.843   361   361 F DEBUG   :     #07 pc 0005958b  /system/lib/libc.so (je_free+374)

12-08 20:37:06.843   361   361 F DEBUG   :     #08 pc 00006dfb  /system/lib/libshowlogo.so (fs_mgr_free_fstab+42)

12-08 20:37:06.843   361   361 F DEBUG   :     #09 pc 0000386b  /system/lib/libshowlogo.so (anim_logo_deinit+26)

12-08 20:37:06.843   361   361 F DEBUG   :     #10 pc 0000413d  /system/lib/libshowlogo.so (anim_deinit+20)

12-08 20:37:06.843   361   361 F DEBUG   :     #11 pc 00000960  /system/bin/boot_logo_updater

12-08 20:37:06.843   361   361 F DEBUG   :     #12 pc 0001740d  /system/lib/libc.so (__libc_init+44)

12-08 20:37:06.843   361   361 F DEBUG   :     #13 pc 00000a30  /system/bin/boot_logo_updater
 

stevedat

Members
Aug 14, 2016
130
30
Hope you can fix it then we will have another good choice for playing around..ah just curious why it is not CM 14 :)
 

reichmyu

Members
Jul 15, 2014
157
40
Hope you can fix it then we will have another good choice for playing around..ah just curious why it is not CM 14 :)
CM13 is Android 6, same as the stock ROM and then it should be easier to port than CM14. And as I am not an experienced dev I thought that it could be a good starting point :D
 
  • Like
Reactions: stevedat

stevedat

Members
Aug 14, 2016
130
30
CM13 is Android 6, same as the stock ROM and then it should be easier to port than CM14. And as I am not an experienced dev I thought that it could be a good starting point :D
Cool.
Hope you can fix it soon and someone can help
 

reichmyu

Members
Jul 15, 2014
157
40
Cool.
Hope you can fix it soon and someone can help
That was fast. I got it working ^^
And surprinsingly it was the bug the was making the bootloop so once I solved it the ROM booted :D
It has some bugs like sound, camera focus and fingerprint sensor but it is booting which is a very big step.
I'll post the ROM zip soon here and in the Global Forum so that people can test this alpha.
Here you have some sneak peek:







Screenshot_20161209_145028.png

Screenshot_20161209_145032.png

Screenshot_20161209_145041.png
 
  • Like
Reactions: stevedat