• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Cyanogenmod for mediatek devices

Search This thread

superdragonpt

Recognized Developer
Apr 27, 2013
4,923
19,266
Lisbon / Taiwan / USA
www.caixamagica.pt
Hello, I'm working on Pie for MT8163/ Fire HD 8 2018 so somehow there is a lot of crashes and the codecs don't work and the Logs are telling me it's crashing but I don't know what library is causing it.
sometimes i see this in the logcat too.
this is for the audio
Code:
08-06 08:31:32.405   265   385 W StreamHAL: Error from HAL stream in function get_presentation_position: Function not implemented
the sound works fine
video:
Code:
08-07 00:06:15.508  1324  1324 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-07 00:06:15.508  1324  1324 F DEBUG   : LineageOS Version: '16.0-20190807-UNOFFICIAL-karnak'
08-07 00:06:15.508  1324  1324 F DEBUG   : Build fingerprint: 'google/lineage_karnak/karnak:9/PQ3A.190705.003/kai08062329:userdebug/test-keys'
08-07 00:06:15.508  1324  1324 F DEBUG   : Revision: '0'
08-07 00:06:15.508  1324  1324 F DEBUG   : ABI: 'arm'
08-07 00:06:15.508  1324  1324 F DEBUG   : pid: 1324, tid: 1324, name: [email protected]  >>> media.codec <<<
08-07 00:06:15.508  1324  1324 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-07 00:06:15.508  1324  1324 F DEBUG   :     r0  00000000  r1  0000052c  r2  00000006  r3  ef9694a0
08-07 00:06:15.508  1324  1324 F DEBUG   :     r4  0000052c  r5  0000052c  r6  ffbc2bac  r7  0000010c
08-07 00:06:15.508  1324  1324 F DEBUG   :     r8  ef0470b8  r9  ef3c3000  r10 efe16004  r11 ffbc3130
08-07 00:06:15.508  1324  1324 F DEBUG   :     ip  00000074  sp  ffbc2b98  lr  ef8f7095  pc  ef8eee1a
08-07 00:06:15.535  1324  1324 F DEBUG   : 
08-07 00:06:15.535  1324  1324 F DEBUG   : backtrace:
08-07 00:06:15.535  1324  1324 F DEBUG   :     #00 pc 0001ce1a  /system/lib/libc.so (abort+62)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #01 pc 0000a379  /system/lib/libminijail.so (log_sigsys_handler+48)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #02 pc 00019aa0  /system/lib/libc.so
08-07 00:06:15.535  1324  1324 F DEBUG   :     #03 pc 00055fe8  /system/lib/libc.so (sysinfo+8)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #04 pc 00026589  /system/lib/libc.so (get_phys_pages+16)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #05 pc 0000e4bb  /vendor/lib/libvcodecdrv.so (eVEncDrvQueryCapability+26)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #06 pc 0000eacd  /vendor/lib/libMtkOmxVenc.so (MtkOmxVenc::ComponentInit(void*, char*)+52)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #07 pc 0001450d  /vendor/lib/libMtkOmxVenc.so (MtkOmxComponentCreate+188)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #08 pc 00002207  /vendor/lib/libMtkOmxCore.so (Mtk_OMX_GetHandle+418)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #09 pc 0001f129  /system/lib/libstagefright_omx.so (android::eek:MXMaster::makeComponentInstance(char const*, OMX_CALLBACKTYPE const*, void*, OMX_COMPONENTTYPE**)+140)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #10 pc 0002e221  /system/lib/libstagefright_omx.so (android::hardware::media::omx::V1_0::implementation::eek:mx::allocateNode(android::hardware::hidl_string const&, android::sp<android::hardware::media::omx::V1_0::IOmxObserver> const&, std::__1::function<void (android::hardware::media::omx::V1_0::Status, android::sp<android::hardware::media::omx::V1_0::IOmxNode> const&)>)+236)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #11 pc 0002a461  /system/lib/[email protected] (android::hardware::media::omx::V1_0::BnHwOmx::_hidl_allocateNode(android::hidl::base::V1_0::BnHwBase*, android::hardware::Parcel const&, android::hardware::Parcel*, std::__1::function<void (android::hardware::Parcel&)>)+388)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #12 pc 0002a931  /system/lib/[email protected] (android::hardware::media::omx::V1_0::BnHwOmx::onTransact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+256)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #13 pc 00016663  /system/lib/libhwbinder.so (android::hardware::BHwBinder::transact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+54)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #14 pc 0000f82b  /system/lib/libhwbinder.so (android::hardware::IPCThreadState::executeCommand(int)+806)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #15 pc 0000f3f7  /system/lib/libhwbinder.so (android::hardware::IPCThreadState::getAndExecuteCommand()+122)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #16 pc 0000fcb1  /system/lib/libhwbinder.so (android::hardware::IPCThreadState::joinThreadPool(bool)+188)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #17 pc 000014c1  /vendor/bin/hw/[email protected] (main+764)
08-07 00:06:15.535  1324  1324 F DEBUG   :     #18 pc 00089af5  /system/lib/libc.so (__libc_init+48)
08-07 00:06:15.536  1324  1324 F DEBUG   :     #19 pc 00001183  /vendor/bin/hw/[email protected] (_start_main+46)
08-07 00:06:15.536  1324  1324 F DEBUG   :     #20 pc 0000031e  <anonymous:f0a70000>

sometimes that i need help with patching the codecs. when i try to play the video it crashes the surfaceflinger
Thanks, Kai

You need to patch mtk OMX on fw av

Dont go with los... its easier ( and cleaner) to just sync aosp p and go from there

Also, what kernel ( and vendor blobs) is your device running ?
The base android stock?
Cheers
 
Last edited:

Kaijones23

Recognized Developer
Dec 7, 2018
287
622
Las Vegas
Hello, I'm working on Pie for MT8163/ Fire HD 8 2018 so somehow there is a lot of crashes and the codecs don't work and the Logs are telling me it's crashing but I don't know what library is causing it.
sometimes i see this in the logcat too.
this is for the audio

the sound works fine
video:


You need to patch mtk OMX on fw av

Dont go with los... its easier ( and cleaner) to just sync aosp p and go from there

Also, what kernel ( and vendor blobs) is your device running ?
The base android stock?
Cheers
I'm currently running 3.18.19 on pie but I need help upstreaming and also the blobs is from stock nougat. The fire hd 8 runs on fire os 6 nougat.
Device organization:https://github.com/mt8163
 
Last edited:

Rortiz2

Senior Member
Mar 1, 2018
2,179
1,454
Barcelona
Hi all.
I finally succeed building cm13.0 for the Aquaris M8 (mt8163).
I flashed it and it stucks at cyanogenmod bootanimation with libc crashing. This is the logcat:
Code:
[email protected]_m8:/ # logcat
--------- beginning of main
09-22 14:37:13.390   145   145 I auditd  : type=1403 audit(0.0:2): policy loaded auid=4294967295 ses=4294967295
09-22 14:37:13.500     1     1 I init    : type=1400 audit(0.0:3): avc: denied { mounton } for path="/sys/kernel/debug" dev="debugfs" ino=1 scontext=u:r:init:s0 tcontext=u:object_r:debugfs:s0 tclass=dir permissive=1
09-22 14:37:13.740     1     1 I init    : type=1400 audit(0.0:4): avc: denied { create } for name="sdcard" scontext=u:r:init:s0 tcontext=u:object_r:tmpfs:s0 tclass=lnk_file permissive=1
09-22 14:37:13.740     1     1 I init    : type=1400 audit(0.0:5): avc: denied { mounton } for path="/mnt/media_rw" dev="tmpfs" ino=191 scontext=u:r:init:s0 tcontext=u:object_r:mnt_media_rw_file:s0 tclass=dir permissive=1
09-22 14:37:13.870   137   137 I e2fsck  : type=1400 audit(0.0:6): avc: denied { read } for name="mmcblk0p23" dev="tmpfs" ino=7230 scontext=u:r:fsck:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=1
09-22 14:37:13.880   137   137 I e2fsck  : type=1400 audit(0.0:7): avc: denied { open } for path="/dev/block/mmcblk0p23" dev="tmpfs" ino=7230 scontext=u:r:fsck:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=1
09-22 14:37:13.880   137   137 I e2fsck  : type=1400 audit(0.0:8): avc: denied { write } for name="mmcblk0p23" dev="tmpfs" ino=7230 scontext=u:r:fsck:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=1
09-22 14:37:13.880   137   137 I e2fsck  : type=1400 audit(0.0:9): avc: denied { ioctl } for path="/dev/block/mmcblk0p23" dev="tmpfs" ino=7230 ioctlcmd=127c scontext=u:r:fsck:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=1
09-22 14:37:14.172   152   152 I /system/bin/tzdatacheck: tzdata file /data/misc/zoneinfo/current/tzdata does not exist. No action required.
--------- beginning of system
09-22 14:37:14.216   151   151 I vold    : Vold 3.0 (the awakening) firing up
09-22 14:37:14.216   151   151 V vold    : Detected support for: exfat ext4 ntfs vfat
09-22 14:37:14.221   151   151 W Vold    : Tearing down stale mount /storage/usbotg
09-22 14:37:14.221   151   151 W Vold    : Tearing down stale mount /mnt/media_rw
09-22 14:37:14.233   157   157 I Magisk  : Magisk v19.3(19300) daemon started
09-22 14:37:14.234   157   157 I Magisk  : * Device API level: 23
09-22 14:37:14.280     1     1 I init    : type=1400 audit(0.0:10): avc: denied { setattr } for name="subsystem" dev="sysfs" ino=17714 scontext=u:r:init:s0 tcontext=u:object_r:sysfs:s0 tclass=lnk_file permissive=1
09-22 14:37:14.282   151   159 V vold    : /system/bin/sgdisk
09-22 14:37:14.282   151   159 V vold    :     --android-dump
09-22 14:37:14.282   151   159 V vold    :     /dev/block/vold/disk:179_128
09-22 14:37:14.300   169   169 I init    : type=1400 audit(0.0:11): avc: denied { execute_no_trans } for path="/system/bin/boot_logo_updater" dev="mmcblk0p21" ino=31586 scontext=u:r:init:s0 tcontext=u:object_r:system_file:s0 tclass=file permissive=1
09-22 14:37:14.308   151   159 V vold    : DISK mbr
09-22 14:37:14.308   151   159 V vold    : PART 1 c
09-22 14:37:14.339   173   173 I 6620_launcher: get property(service.wcn.driver.ready) is no
--------- beginning of crash
09-22 14:37:14.352   170   170 F libc    : page record for 0xf6fee00c was not found (block_size=64)
09-22 14:37:14.359   166   166 I lowmemorykiller: Using in-kernel low memory killer interface
09-22 14:37:14.360   172   172 I wmt_loader: type=1400 audit(0.0:12): avc: denied { write } for name="property_service" dev="tmpfs" ino=7186 scontext=u:r:init:s0 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=1
09-22 14:37:14.369   172   172 I wmt_loader: external combo chip power on failed
09-22 14:37:14.369   172   172 I wmt_loader: no external combo chip detected, get current soc chipid
09-22 14:37:14.369   172   172 I wmt_loader: soc chipid (0x8163) detected
09-22 14:37:14.370   174   174 I sysinit : Running /system/etc/init.d/00banner 
09-22 14:37:14.370   172   172 I wmt_loader: set property(persist.mtk.wcn.combo.chipid) to 0x8163 succeed.
09-22 14:37:14.370   172   172 I wmt_loader: external combo chip power off succeed
09-22 14:37:14.412   186   186 I cm      : ____ _   _ ____ _  _ ____ ____ ____ _  _ _  _ ____ ___ 
09-22 14:37:14.425   187   187 I cm      : |     \_/  |__| |\ | |  | | __ |___ |\ | |\/| |  | |  \ 
09-22 14:37:14.425   168   168 I SurfaceFlinger: SurfaceFlinger is starting
09-22 14:37:14.425   168   168 I SurfaceFlinger: SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
09-22 14:37:14.435   192   192 I cm      : |___   |   |  | | \| |__| |__] |___ | \| |  | |__| |__/ 
09-22 14:37:14.450   169   169 I boot_logo_updat: type=1400 audit(0.0:13): avc: denied { write } for name="property_service" dev="tmpfs" ino=7186 scontext=u:r:init:s0 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=1
09-22 14:37:14.452   172   172 I wmt_loader: do kernel module init succeed: 0
09-22 14:37:14.453   172   172 I wmt_loader: chown wmt_tm fail:No such file or directory
09-22 14:37:14.454   172   172 I wmt_loader: set property(service.wcn.driver.ready) to yes succeed
09-22 14:37:14.466   197   197 I cm      : Welcome to Android 6.0.1 / CyanogenMod-13.0-20190920-UNOFFICIAL-aquaris_m8 
09-22 14:37:14.467   169   169 D BootLogoUpdater: [boot_logo_updater main 185]boot_logo_updater,
09-22 14:37:14.467   169   169 D BootLogoUpdater: [boot_logo_updater]boot_mode = 0
09-22 14:37:14.467   169   169 E BootLogoUpdater: [boot_logo_updater]boot package = 0
09-22 14:37:14.467   169   169 E BootLogoUpdater: [boot_logo_updater]update boot reason = 0, ret = 2
09-22 14:37:14.467   169   169 D BootLogoUpdater: [boot_logo_updater]schedule on
09-22 14:37:14.468   169   169 D libshowlogo: [libshowlogo: set_draw_mode 171]0 --use framebuffer, 1--use surface flinger ,draw_anim_mode =  :1
09-22 14:37:14.468   169   169 D libshowlogo: [libshowlogo: anim_init 238]
09-22 14:37:14.477   198   198 I sysinit : Running /system/etc/init.d/90userinit 
09-22 14:37:14.523   168   168 E GED     : Failed to get GED Log Buf, err(0)
09-22 14:37:14.530   169   169 I boot_logo_updat: type=1400 audit(0.0:14): avc: denied { write } for name="fb0" dev="tmpfs" ino=7239 scontext=u:r:init:s0 tcontext=u:object_r:graphics_device:s0 tclass=chr_file permissive=1
09-22 14:37:14.530   169   169 I boot_logo_updat: type=1400 audit(0.0:15): avc: denied { ioctl } for path="/dev/graphics/fb0" dev="tmpfs" ino=7239 ioctlcmd=4600 scontext=u:r:init:s0 tcontext=u:object_r:graphics_device:s0 tclass=chr_file permissive=1
09-22 14:37:14.532   200   200 I sysinit : Running /system/etc/init.d/99exfat-support 
09-22 14:37:14.544   169   169 D libshowlogo: [libshowlogo: anim_logo_init 364]show_animationm_ver =  :0
09-22 14:37:14.544   169   169 D libshowlogo: [libshowlogo: anim_fb_init 397]
09-22 14:37:14.544   169   169 D libshowlogo: [libshowlogo: anim_fb_init 421]vinfo:xres  = 800, yres = 1280, xres_virtual =800, bits_per_pixel = 32,red.offset = 0,blue.offset = 16
09-22 14:37:14.544   169   169 D libshowlogo: [libshowlogo: anim_fb_init 424]fb_size =4096000, fb_addr = -174555136,charging_fb_addr=-170459136
09-22 14:37:14.544   169   169 D libshowlogo: [libshowlogo: anim_fb_init 450]MTK_LCM_PHYSICAL_ROTATION = 0
09-22 14:37:14.544   169   169 D libshowlogo: [libshowlogo]phical_screen: width= 800,height= 1280,bits_per_pixel =32,needAllign = 1,allignWidth=800 rotation =0 ,need180Adjust = 1
09-22 14:37:14.545   169   169 D libshowlogo: [libshowlogo: anim_fb_init 467]show old animtion= 1, running show_animationm_ver 0
09-22 14:37:14.545   169   169 D libshowlogo: [libshowlogo: anim_fb_init 468]draw_anim_mode = 1, running mode 1
09-22 14:37:14.545   169   169 D libshowlogo: [libshowlogo: show_kernel_logo 660]show kernel logo, index = 38 
09-22 14:37:14.545   169   169 D libshowlogo: [libshowlogo: anim_show_logo 616]draw_anim_mode=1, show  index =  38
09-22 14:37:14.545   169   169 D libshowlogo: [show_animation_common: check_logo_index_valid 75]logonum =39, index =38
09-22 14:37:14.545   169   169 D libshowlogo: show_animation_common, pinfo[1]=1121142, pinfo[1] - pinfo[2+index] =10811 
09-22 14:37:14.545   169   169 D libshowlogo: show_animation_common, logo_addr=0xf6940000 , in_addr=0xf6a4f13b,  logolen=10811
09-22 14:37:14.545   169   169 D libshowlogo: [decompress_logo decompress_logo 48]in=0xf6a4f13b, out=0xf6540000, inlen=10811, logolen=4096000
09-22 14:37:14.550   202   202 I mkdir   : type=1400 audit(0.0:16): avc: denied { write } for name="media_rw" dev="tmpfs" ino=191 scontext=u:r:sysinit:s0 tcontext=u:object_r:mnt_media_rw_file:s0 tclass=dir permissive=1
09-22 14:37:14.550   202   202 I mkdir   : type=1400 audit(0.0:17): avc: denied { add_name } for name="sdcard1" scontext=u:r:sysinit:s0 tcontext=u:object_r:mnt_media_rw_file:s0 tclass=dir permissive=1
09-22 14:37:14.550   202   202 I mkdir   : type=1400 audit(0.0:18): avc: denied { create } for name="sdcard1" scontext=u:r:sysinit:s0 tcontext=u:object_r:mnt_media_rw_file:s0 tclass=dir permissive=1
09-22 14:37:14.565   176   176 F libc    : page record for 0x7f79ec3010 was not found (block_size=64)
09-22 14:37:14.566   169   169 D libshowlogo: [decompress_logo decompress_logo 101]have=4096000
09-22 14:37:14.566   169   169 D libshowlogo: [show_animation_common: fill_animation_logo 115]raw_data_size = 4096000
09-22 14:37:14.566   169   169 D libshowlogo: [show_animation_common: fill_animation_logo 132]bits = 32
09-22 14:37:14.566   169   169 D libshowlogo: [show_logo_common: fill_rect_with_content 406]
09-22 14:37:14.566   169   169 D libshowlogo: [show_logo_common: fill_rect_with_content_by_32bit_argb8888 107]
09-22 14:37:14.566   169   169 D libshowlogo: [show_logo_common]dst_addr= 0xffffffff, color_addr= 0xffffffff, i= 0, j=0
09-22 14:37:14.566   169   169 D libshowlogo: [show_logo_common]dst_addr= 0xffffffff, color_addr= 0xffffffff, i= 0, j=799
09-22 14:37:14.570   204   204 I mount.exfat: type=1400 audit(0.0:19): avc: denied { read write } for name="mmcblk1p1" dev="tmpfs" ino=66 scontext=u:r:sysinit:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=1
09-22 14:37:14.570   204   204 I mount.exfat: type=1400 audit(0.0:20): avc: denied { open } for path="/dev/block/mmcblk1p1" dev="tmpfs" ino=66 scontext=u:r:sysinit:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=1
09-22 14:37:14.570   204   204 I mount.exfat: type=1400 audit(0.0:21): avc: denied { ioctl } for path="/dev/block/mmcblk1p1" dev="tmpfs" ino=66 ioctlcmd=125e scontext=u:r:sysinit:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=1
09-22 14:37:14.589   204   204 E /system/bin/mount.exfat: exFAT file system is not found
09-22 14:37:14.606   168   168 D libEGL  : loaded /system/lib64/egl/libGLES_mali.so
09-22 14:37:14.620   168   168 I surfaceflinger: type=1400 audit(0.0:22): avc: denied { read write } for name="mali0" dev="tmpfs" ino=7244 scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
09-22 14:37:14.620   168   168 I surfaceflinger: type=1400 audit(0.0:23): avc: denied { open } for path="/dev/mali0" dev="tmpfs" ino=7244 scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
09-22 14:37:14.620   168   168 I surfaceflinger: type=1400 audit(0.0:24): avc: denied { getattr } for path="/dev/mali0" dev="tmpfs" ino=7244 scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
09-22 14:37:14.620   168   168 I surfaceflinger: type=1400 audit(0.0:25): avc: denied { ioctl } for path="/dev/mali0" dev="tmpfs" ino=7244 ioctlcmd=8000 scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
09-22 14:37:14.627   169   169 D libshowlogo: [show_logo_common]dst_addr= 0xffffffff, color_addr= 0xffffffff, i= 1279, j=0
09-22 14:37:14.627   169   169 D libshowlogo: [show_logo_common]dst_addr= 0xffffffff, color_addr= 0xffffffff, i= 1279, j=799
09-22 14:37:14.627   169   169 D libshowlogo: [libshowlogo: anim_fb_disp_update 507]
09-22 14:37:14.639   173   173 I 6620_launcher: get property(service.wcn.driver.ready) is yes
09-22 14:37:14.639   173   173 E 6620_launcher: open device node succeed.(Node:/dev/stpwmt, fd:4) 
09-22 14:37:14.639   173   173 I 6620_launcher: key:(persist.mtk.wcn.combo.chipid)-value:(0x8163),chipId:0x8163
09-22 14:37:14.639   173   173 I 6620_launcher: chip id is 0x8163
09-22 14:37:14.639   173   173 I 6620_launcher: chiId:0x8163, setting to property(persist.mtk.wcn.combo.chipid)
09-22 14:37:14.639   173   173 I 6620_launcher: set property(persist.mtk.wcn.combo.chipid) to 0x8163 succeed.
09-22 14:37:14.639   173   173 I 6620_launcher: chipIdProp:key(persist.mtk.wcn.combo.chipid)value(0x8163)
09-22 14:37:14.639   173   173 I 6620_launcher: chiId:0x8163
09-22 14:37:14.639   173   173 I 6620_launcher: run SOC chip flow
09-22 14:37:14.639   173   173 I 6620_launcher: key:(ro.build.type)-value:(userdebug)
09-22 14:37:14.639   173   173 I 6620_launcher: get coredump_mode property(service.wcn.coredump.mode) failed
09-22 14:37:14.639   173   173 I 6620_launcher: Connectivity coredump is disabled!
09-22 14:37:14.639   173   173 I 6620_launcher: create pwr on thread ok
09-22 14:37:14.640   173   217 I 6620_launcher: enter power on connsys flow
09-22 14:37:14.652   169   169 D libshowlogo: [libshowlogo: anim_deinit 270]
09-22 14:37:14.652   169   169 D libshowlogo: [libshowlogo: anim_logo_deinit 382]
09-22 14:37:14.654   169   169 D libshowlogo: [libshowlogo: anim_fb_deinit 479]
09-22 14:37:14.655   168   168 I gralloc : [Gralloc] refreshRate = 0, info.pixclock = ffffffff
09-22 14:37:14.655   168   168 I gralloc : [Gralloc] info.upper_margin = ffffffff, info.lower_margin = ffffffff
09-22 14:37:14.655   168   168 I gralloc : [Gralloc] info.yres = 500, info.hsync_len = ffffffff
09-22 14:37:14.655   168   168 I gralloc : [Gralloc] info.left_margin = ffffffff, info.right_margin = ffffffff
09-22 14:37:14.655   168   168 I [MALI][Gralloc]: ro_dpi: 213.000000
09-22 14:37:14.655   168   168 I [MALI][Gralloc]: using (fd=16)
09-22 14:37:14.655   168   168 I [MALI][Gralloc]: id           = mtkfb
09-22 14:37:14.655   168   168 I [MALI][Gralloc]: xres         = 800 px
09-22 14:37:14.655   168   168 I [MALI][Gralloc]: yres         = 1280 px
09-22 14:37:14.655   168   168 I [MALI][Gralloc]: xres_virtual = 800 px
09-22 14:37:14.655   168   168 I [MALI][Gralloc]: yres_virtual = 2560 px
09-22 14:37:14.655   168   168 I [MALI][Gralloc]: bpp          = 32
09-22 14:37:14.655   168   168 I [MALI][Gralloc]: r            = 16:8
09-22 14:37:14.655   168   168 I [MALI][Gralloc]: g            =  8:8
09-22 14:37:14.655   168   168 I [MALI][Gralloc]: b            =  0:8
09-22 14:37:14.655   168   168 I [MALI][Gralloc]: width        = 95 mm (213.894730 dpi)
09-22 14:37:14.655   168   168 I [MALI][Gralloc]: height       = 153 mm (212.496735 dpi)
09-22 14:37:14.655   168   168 I [MALI][Gralloc]: refresh rate = 60.00 Hz
09-22 14:37:14.670   168   168 I surfaceflinger: type=1400 audit(0.0:26): avc: denied { net_admin } for capability=12 scontext=u:r:surfaceflinger:s0 tcontext=u:r:surfaceflinger:s0 tclass=capability permissive=1
09-22 14:37:14.673   168   168 I hwcomposer: [PLAT] Initialized, ptr: 0xb4a50240
09-22 14:37:14.681   168   168 W hwcomposer: [EVENT] Start to listen uevent, addr.nl_pid(168)
09-22 14:37:14.684   168   168 D MDP     : [TDSHP][PQDC] DISP_IOCTL_PQ_GET_TDSHP_FLAG()... tuning flag[0]
09-22 14:37:14.685   168   168 D MDP     : [TDSHP][PQDS] got sharpness level 0x00000000, time 0 ms
09-22 14:37:14.685   168   168 D MDP     : [TDSHP][PQDS] registration(10000001)
09-22 14:37:14.685   168   168 D MDP     : [TDSHP][PQDS] createDSHandle(), id[10000001]
09-22 14:37:14.685   168   168 W GuiExt  : Cannot find GuiExtService
09-22 14:37:14.685   168   168 W GuiExt  : Cannot find GuiExtService
09-22 14:37:14.685   168   168 W GuiExt  : Cannot find GuiExtService
09-22 14:37:14.685   168   168 E GuiExt  : [GuiExtC] [android::status_t android::GuiExtClientConsumer::configDisplay(uint32_t, bool, uint32_t, uint32_t, uint32_t)] assertStateLocked fail
09-22 14:37:14.685   168   168 W hwcomposer: [EVENT] HW VSync State(1)
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] Display Information:
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] # fo current devices : 1
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] ------------------------------------
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] Device id   : 0
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] Width       : 800
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] Height      : 1280
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] xdpi        : 188.148148
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] ydpi        : 189.023254
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] vsync       : 1
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] refresh     : 17424638
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] connected   : 1
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] hwrotation  : 0
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] subtype     : 0
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] aspect      : 0.625, 1.600
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] protrait    : [   0,   0, 800,1280]
09-22 14:37:14.685   168   168 I hwcomposer: [DPY] landscape   : [   0,   0, 800,1280]
09-22 14:37:14.685   168   168 I SurfaceFlinger: Using composer version 1.4
09-22 14:37:14.685   168   168 I hwcomposer: [HWC] getConfigs Display(0)
09-22 14:37:14.685   168   168 I hwcomposer: [HWC] getAttributes Display(0)
09-22 14:37:14.685   168   168 I hwcomposer: [HWC] getConfigs Display(1)
09-22 14:37:14.685   168   168 I hwcomposer: [HWC] getAttributes Display(1)
09-22 14:37:14.685   168   168 W hwcomposer: [HWC] Failed to get display attributes (dpy=1 is not connected)
09-22 14:37:14.685   168   168 I hwcomposer: [HWC] getAttributes Display(1)
09-22 14:37:14.685   168   168 W hwcomposer: [HWC] Failed to get display attributes (dpy=1 is not connected)
09-22 14:37:14.686   168   168 I SurfaceFlinger: EGL information:
09-22 14:37:14.686   168   168 I SurfaceFlinger: vendor    : Android
09-22 14:37:14.686   168   168 I SurfaceFlinger: version   : 1.4 Android META-EGL
09-22 14:37:14.686   168   168 I SurfaceFlinger: extensions: EGL_KHR_get_all_proc_addresses EGL_ANDROID_presentation_time EGL_KHR_swap_buffers_with_damage EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_fence_sync EGL_KHR_create_context EGL_KHR_config_attribs EGL_KHR_surfaceless_context EGL_EXT_create_context_robustness EGL_ANDROID_image_native_buffer EGL_KHR_wait_sync EGL_ANDROID_recordable EGL_KHR_partial_update 
09-22 14:37:14.686   168   168 I SurfaceFlinger: Client API: OpenGL_ES
09-22 14:37:14.686   168   168 I SurfaceFlinger: EGLSurface: 8-8-8-8, config=0x7fb2b5a220
09-22 14:37:14.702   168   168 I SurfaceFlinger: OpenGL ES informations:
09-22 14:37:14.702   168   168 I SurfaceFlinger: vendor    : ARM
09-22 14:37:14.702   168   168 I SurfaceFlinger: renderer  : Mali-T720
09-22 14:37:14.702   168   168 I SurfaceFlinger: version   : OpenGL ES 3.1 v1.r7p0-02rel0.92b9caa11cd0e8a7a73c042b1aa8c3c2
09-22 14:37:14.702   168   168 I SurfaceFlinger: extensions: GL_EXT_debug_marker GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisampled_render_to_texture GL_OES_surfaceless_context GL_OES_texture_stencil8 G
09-22 14:37:14.702   168   168 I SurfaceFlinger: GL_MAX_TEXTURE_SIZE = 8192
09-22 14:37:14.703   168   168 I SurfaceFlinger: GL_MAX_VIEWPORT_DIMS = 8192
09-22 14:37:14.703   168   168 D mali_winsys: new_window_surface returns 0x3000
09-22 14:37:14.706   168   168 E ion     : ioctl c0204900 failed with code -1: No such device
09-22 14:37:14.708   168   168 I [MALI][Gralloc]: [+]hnd:0x7fb4a5df00, fd:25, ion_hnd(0x1), req_format(0x5), int_fmt(0x5)  byte_stride(3200), flags(0x4), usage(0x1a00), size(4096000), alloc_size(4096000) 800(800)X1280(1280) pid(168)  sec (0)
09-22 14:37:14.710   168   168 E ion     : ioctl c0204900 failed with code -1: No such device
09-22 14:37:14.712   168   168 I [MALI][Gralloc]: [+]hnd:0x7fb4a5dfa0, fd:26, ion_hnd(0x2), req_format(0x5), int_fmt(0x5)  byte_stride(3200), flags(0x4), usage(0x1a00), size(4096000), alloc_size(4096000) 800(800)X1280(1280) pid(168)  sec (0)
09-22 14:37:14.714   168   168 E ion     : ioctl c0204900 failed with code -1: No such device
09-22 14:37:14.717   168   168 I [MALI][Gralloc]: [+]hnd:0x7fb4a5e040, fd:27, ion_hnd(0x3), req_format(0x5), int_fmt(0x5)  byte_stride(3200), flags(0x4), usage(0x1a00), size(4096000), alloc_size(4096000) 800(800)X1280(1280) pid(168)  sec (0)
09-22 14:37:14.718   168   168 D SurfaceFlinger: Set power mode=2, type=0 flinger=0x7fb4a43c00
09-22 14:37:14.718   168   168 I hwcomposer: [HWC] SetPowerMode(2) Display(0)
09-22 14:37:14.752   173   173 I 6620_launcher: patch name pre-fix:ROMv2_lm_patch
09-22 14:37:14.752   173   173 I 6620_launcher: fwVersion:0x8a00
09-22 14:37:14.752   173   173 I 6620_launcher: /system/etc/firmware//ROMv2_lm_patch_1_1_hdr.bin
09-22 14:37:14.753   173   173 I 6620_launcher: fw Ver in patch: 0x8a00
09-22 14:37:14.753   173   173 I 6620_launcher: read patch info:0x21,0x00,0x0e,0xf0
09-22 14:37:14.753   173   173 I 6620_launcher: gpatchnum = [2]
09-22 14:37:14.753   173   173 I 6620_launcher: gdwonseq = [1]
09-22 14:37:14.753   173   173 I 6620_launcher: /system/etc/firmware//ROMv2_lm_patch_1_0_hdr.bin
09-22 14:37:14.754   173   173 I 6620_launcher: fw Ver in patch: 0x8a00
09-22 14:37:14.754   173   173 I 6620_launcher: read patch info:0x22,0x00,0x06,0x00
09-22 14:37:14.754   173   173 I 6620_launcher: gdwonseq = [2]
09-22 14:37:14.754   173   173 I 6620_launcher: cmd(srh_patch) resp(ok)
09-22 14:37:15.049   168   168 D SurfaceFlinger: SF. shader cache generated - 26 shaders in 226.972458 ms
09-22 14:37:15.099   224   229 E GED     : Failed to get GED Log Buf, err(0)
09-22 14:37:15.100   224   229 D libEGL  : loaded /system/lib64/egl/libGLES_mali.so
09-22 14:37:15.110   229   229 I BootAnimation: type=1400 audit(0.0:27): avc: denied { read write } for name="mali0" dev="tmpfs" ino=7244 scontext=u:r:bootanim:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
09-22 14:37:15.110   229   229 I BootAnimation: type=1400 audit(0.0:28): avc: denied { open } for path="/dev/mali0" dev="tmpfs" ino=7244 scontext=u:r:bootanim:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
09-22 14:37:15.110   229   229 I BootAnimation: type=1400 audit(0.0:29): avc: denied { getattr } for path="/dev/mali0" dev="tmpfs" ino=7244 scontext=u:r:bootanim:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
09-22 14:37:15.110   229   229 I BootAnimation: type=1400 audit(0.0:30): avc: denied { ioctl } for path="/dev/mali0" dev="tmpfs" ino=7244 ioctlcmd=8000 scontext=u:r:bootanim:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
09-22 14:37:15.124   224   229 D mali_winsys: new_window_surface returns 0x3000
09-22 14:37:15.130   224   229 W BootAnimation: Unable to cache the animation
09-22 14:37:15.131   224   229 E BootAnimation: couldn't find audio_conf.txt
09-22 14:37:15.154   224   229 D BootAnimation: Use save memory method, maybe small fps in actual.
09-22 14:37:15.194   168   190 I [MALI][Gralloc]: [+]hnd:0x7fb4549280, fd:30, ion_hnd(0x4), req_format(0x2), int_fmt(0x2)  byte_stride(3200), flags(0x4), usage(0xb00), size(4096000), alloc_size(4096000) 800(800)X1280(1280) pid(168)  sec (0)
09-22 14:37:15.195   224   229 I [MALI][Gralloc]: [+]r_hnd:0x7f82609c80, fd:18, ion_hnd(0x1), req_format(0x2), int_fmt(0x2)  byte_stride(3200), flags(0x4), usage(0xb00), size(4096000), alloc_size(4096000) 800(800)X1280(1280) pid(224)  sec (0)
09-22 14:37:15.209   168   168 I PerfService: PerfServiceNative_notifyDisplayType:0
09-22 14:37:15.271   168   193 I [MALI][Gralloc]: [+]hnd:0x7fb4a5e2c0, fd:31, ion_hnd(0x5), req_format(0x2), int_fmt(0x2)  byte_stride(3200), flags(0x4), usage(0xb00), size(4096000), alloc_size(4096000) 800(800)X1280(1280) pid(168)  sec (0)
09-22 14:37:15.271   224   229 I [MALI][Gralloc]: [+]r_hnd:0x7f82a23500, fd:20, ion_hnd(0x2), req_format(0x2), int_fmt(0x2)  byte_stride(3200), flags(0x4), usage(0xb00), size(4096000), alloc_size(4096000) 800(800)X1280(1280) pid(224)  sec (0)
09-22 14:37:18.679   224   229 D BootAnimation: Use save memory method, maybe small fps in actual.
09-22 14:37:18.718   168   190 I [MALI][Gralloc]: [+]hnd:0x7fb4549320, fd:33, ion_hnd(0x6), req_format(0x2), int_fmt(0x2)  byte_stride(3200), flags(0x4), usage(0xb00), size(4096000), alloc_size(4096000) 800(800)X1280(1280) pid(168)  sec (0)
09-22 14:37:18.719   224   229 I [MALI][Gralloc]: [+]r_hnd:0x7f82609be0, fd:21, ion_hnd(0x3), req_format(0x2), int_fmt(0x2)  byte_stride(3200), flags(0x4), usage(0xb00), size(4096000), alloc_size(4096000) 800(800)X1280(1280) pid(224)  sec (0)
09-22 14:37:19.746   244   244 F libc    : page record for 0x7f92f62010 was not found (block_size=64)
09-22 14:37:24.773   250   250 F libc    : page record for 0x7fb6f2b010 was not found (block_size=64)
09-22 14:37:29.800   255   255 F libc    : page record for 0x7f91fc4010 was not found (block_size=64)
09-22 14:37:34.827   260   260 F libc    : page record for 0x7faee0c010 was not found (block_size=64)
09-22 14:37:39.861   265   265 F libc    : page record for 0x7faabb2010 was not found (block_size=64)
09-22 14:37:44.899   274   274 F libc    : page record for 0x7f7b050010 was not found (block_size=64)
09-22 14:37:49.939   281   281 F libc    : page record for 0x7fa8229010 was not found (block_size=64)
09-22 14:37:54.969   286   286 F libc    : page record for 0x7fb75e8010 was not found (block_size=64)
09-22 14:37:59.995   289   289 F libc    : page record for 0x7fa37c6010 was not found (block_size=64)
09-22 14:38:05.029   294   294 F libc    : page record for 0x7fa3841010 was not found (block_size=64)
09-22 14:38:10.055   297   297 F libc    : page record for 0x7f87558010 was not found (block_size=64)
09-22 14:38:15.008   304   304 F libc    : page record for 0x7f86a17010 was not found (block_size=64)
09-22 14:38:20.035   316   316 F libc    : page record for 0x7fab571010 was not found (block_size=64)
09-22 14:38:25.061   321   321 F libc    : page record for 0x7fb455f010 was not found (block_size=64)
09-22 14:38:30.093   324   324 F libc    : page record for 0x7f938ee010 was not found (block_size=64)
09-22 14:38:35.119   329   329 F libc    : page record for 0x7f93342010 was not found (block_size=64)
09-22 14:38:40.163   334   334 F libc    : page record for 0x7f8bab4010 was not found (block_size=64)
09-22 14:38:45.188   337   337 F libc    : page record for 0x7f97371010 was not found (block_size=64)
09-22 14:38:49.227   342   342 F libc    : page record for 0x7fb19a8010 was not found (block_size=64)
09-22 14:38:54.253   345   345 F libc    : page record for 0x7fafe9a010 was not found (block_size=64)
09-22 14:38:59.277   350   350 F libc    : page record for 0x7f867da010 was not found (block_size=64)
09-22 14:39:04.304   355   355 F libc    : page record for 0x7f8d9c3010 was not found (block_size=64)
09-22 14:39:09.360   362   362 F libc    : page record for 0x7fab1bc010 was not found (block_size=64)
09-22 14:39:14.396   365   365 F libc    : page record for 0x7faf289010 was not found (block_size=64)
09-22 14:39:19.908   372   372 F libc    : page record for 0x7f80997010 was not found (block_size=64)
09-22 14:39:24.936   377   377 F libc    : page record for 0x7fa6d40010 was not found (block_size=64)
09-22 14:39:29.962   382   382 F libc    : page record for 0x7faac30010 was not found (block_size=64)
Any ideas?

EDIT: Fixed it.
 
Last edited:

Rortiz2

Senior Member
Mar 1, 2018
2,179
1,454
Barcelona
Bluetooth Amazon Fire TV 2 sloane

Hi all,
I'm working on a ROM for a locked BL device. In this case, the Amazon Fire TV 2 (mt8173).
Yes, I booted a ROM with locked bootloader using prebuilt boot.img. I only had to set permissive SELinux at boot (not a easy task).
The ROM looks very nice for an mtk device:
  • Working WI-Fi.
  • Working hwcomposer.
  • Working gralloc.

Sadly, neither Audio, OMX and Bluetooth are working. My main goal is fix Bluetooth to be able to use the Fire TV Remote but seems like this is a no-go. In logcat, I only can see a few lines about Bluetooth (Most of them are spammed with OMX stuff):

Code:
D/BluetoothScanner( 1966): stopListening sReceiver=null
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
W/bt-btif ( 1861): bta_dm_check_av:0
D/BluetoothScanner( 1966): startListening
D/BluetoothScanner( 1966): stopListening sReceiver=c[email protected]1a6b5596
D/AMZ-[BT]( 1861): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
D/BluetoothScanner( 1966): mStopTask.run()
D/AMZ-[BT]( 1861): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
D/AMZ-[BT]( 1861): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
D/BluetoothScanner( 1966): stopListening sReceiver=c[email protected]1a6b5596
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
V/BluetoothDiscoveryReceiver( 1369): Received: android.bluetooth.adapter.action.DISCOVERY_FINISHED
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
V/BluetoothDiscoveryReceiver( 1369): Received: android.bluetooth.adapter.action.DISCOVERY_FINISHED
W/bt-btif ( 1861): bta_dm_check_av:0
E/bt-btm  ( 1861): LE Inquiry is active, can not start inquiry
E/bt-btm  ( 1861): Err Starting LE Inquiry.
D/AMZ-[BT]( 1861): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
D/AMZ-[BT]( 1861): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
D/BluetoothScanner( 1966): startListening
V/BluetoothDiscoveryReceiver( 1369): Received: android.bluetooth.adapter.action.DISCOVERY_STARTED
V/WindowManager(  675): Adding window Window{24252c98 u0 com.android.tv.settings/com.android.tv.settings.accessories.AddAccessoryActivity} at 3 of 6 (after Window{1fa2a48b u0 com.android.tv.settings/com.android.tv.settings.MainSettings})
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
W/bt-btif ( 1861): bta_dm_check_av:0
E/bt-btm  ( 1861): LE Inquiry is active, can not start inquiry
E/bt-btm  ( 1861): Err Starting LE Inquiry.

Looking at that strings, I've found that they're from libbt-vendor.so, so I tried building it. Sadly, things got worse so I moved back to amazon's libbt-vendor.so.

For reference, this is my device tree:
https://github.com/R0rt1z2/android_device_amazon_sloane
Cheers.
 
Last edited:

superdragonpt

Recognized Developer
Apr 27, 2013
4,923
19,266
Lisbon / Taiwan / USA
www.caixamagica.pt
Hi all,
I'm working on a ROM for a locked BL device. In this case, the Amazon Fire TV 2 (mt8173).
Yes, I booted a ROM with locked bootloader using prebuilt boot.img. I only had to set permissive SELinux at boot (not a easy task).
The ROM looks very nice for an mtk device:
  • Working WI-Fi.
  • Working hwcomposer.
  • Working gralloc.

Sadly, neither Audio, OMX and Bluetooth are working. My main goal is fix Bluetooth to be able to use the Fire TV Remote but seems like this is a no-go. In logcat, I only can see a few lines about Bluetooth (Most of them are spammed with OMX stuff):

Code:
D/BluetoothScanner( 1966): stopListening sReceiver=null
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
W/bt-btif ( 1861): bta_dm_check_av:0
D/BluetoothScanner( 1966): startListening
D/BluetoothScanner( 1966): stopListening sReceiver=c[email protected]1a6b5596
D/AMZ-[BT]( 1861): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
D/BluetoothScanner( 1966): mStopTask.run()
D/AMZ-[BT]( 1861): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
D/AMZ-[BT]( 1861): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
D/BluetoothScanner( 1966): stopListening sReceiver=c[email protected]1a6b5596
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
V/BluetoothDiscoveryReceiver( 1369): Received: android.bluetooth.adapter.action.DISCOVERY_FINISHED
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
V/BluetoothDiscoveryReceiver( 1369): Received: android.bluetooth.adapter.action.DISCOVERY_FINISHED
W/bt-btif ( 1861): bta_dm_check_av:0
E/bt-btm  ( 1861): LE Inquiry is active, can not start inquiry
E/bt-btm  ( 1861): Err Starting LE Inquiry.
D/AMZ-[BT]( 1861): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
D/AMZ-[BT]( 1861): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
D/BluetoothScanner( 1966): startListening
V/BluetoothDiscoveryReceiver( 1369): Received: android.bluetooth.adapter.action.DISCOVERY_STARTED
V/WindowManager(  675): Adding window Window{24252c98 u0 com.android.tv.settings/com.android.tv.settings.accessories.AddAccessoryActivity} at 3 of 6 (after Window{1fa2a48b u0 com.android.tv.settings/com.android.tv.settings.MainSettings})
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
E/bt-btif ( 1861): bte_scan_filt_param_cfg_evt, 1
W/bt-btif ( 1861): bta_dm_check_av:0
E/bt-btm  ( 1861): LE Inquiry is active, can not start inquiry
E/bt-btm  ( 1861): Err Starting LE Inquiry.

Looking at that strings, I've found that they're from libbt-vendor.so, so I tried building it. Sadly, things got worse so I moved back to amazon's libbt-vendor.so.

For reference, this is my device tree:
https://github.com/R0rt1z2/android_device_amazon_sloane
Cheers.

Hi
You sure hwc is working?
Did you add support on fw native, and lib hardware?

Well as for permissive you can add an cmd line hijacking like @fire855 did (check his GitHub) it's all on ramdisk

Audio: is it completely broken? Or just speakers aren't outputting, does audio works on headset/phones?

You may need to rebuilt audio libs with an updated audio policy, and perhaps even shim some dlopen symbols ( you can grab " lib mtk-symbols" as reference from @fire855 or our mad team repos)

As for bt, you first need working audio before moving to this...
Then just build libbt, you can take it
(if it's for legacy ) from any of my device repos, or from m.a.d. team repos, you have plenty of examples there.
You may also need to patch afterwards external/Bluetooth with some mtk functions,

Cheers
 
Last edited:

Infect_Ed

Senior Member
Jan 10, 2017
215
166
Hi all,
I'm working on a ROM for a locked BL device. In this case, the Amazon Fire TV 2 (mt8173).
Yes, I booted a ROM with locked bootloader using prebuilt boot.img. I only had to set permissive SELinux at boot (not a easy task).
The ROM looks very nice for an mtk device:
Working WI-Fi.
Working hwcomposer.
Working gralloc.


Sadly, neither Audio, OMX and Bluetooth are working. My main goal is fix Bluetooth to be able to use the Fire TV Remote but seems like this is a no-go. In logcat, I only can see a few lines about Bluetooth (Most of them are spammed with OMX stuff):



Hi
You sure hwc is working?
Did you add support on fw native, and lib hardware?

Well as for permissive you can add an cmd line hijacking like @fire855 did (check his GitHub) it's all on ramdisk

Audio: is it completely broken? Or just speakers aren't outputting, does audio works on headset/phones?

You may need to rebuilt audio libs with an updated audio policy, and perhaps even shim some dlopen symbols ( you can grab " lib mtk-symbols" as reference from @fire855 or our mad team repos)

As for bt, you first need working audio before moving to this...
Then just build libbt, you can take it
(if it's for legacy ) from any of my device repos, or from m.a.d. team repos, you have plenty of examples there.
You may also need to patch afterwards external/Bluetooth with some mtk functions,

Cheers


Looks like bt IS running. But looking at the log, dm_verity is checking for bt. I wonder, if he has root access he can set the prop in root terminal

setvar bta_dm_check_av:1
 

Rortiz2

Senior Member
Mar 1, 2018
2,179
1,454
Barcelona
Looks like bt IS running. But looking at the log, dm_verity is checking for bt. I wonder, if he has root access he can set the prop in root terminal

`setvar bta_dm_check_av:1`
Sure I can try.
But will try dragonpt suggestions as well.
Cheers.

Enviado desde mi WAS-LX1A mediante Tapatalk

---------- Post added at 04:42 PM ---------- Previous post was at 03:44 PM ----------

Hi
You sure hwc is working?
Did you add support on fw native, and lib hardware?

Well as for permissive you can add an cmd line hijacking like @fire855 did (check his GitHub) it's all on ramdisk

Audio: is it completely broken? Or just speakers aren't outputting, does audio works on headset/phones?

You may need to rebuilt audio libs with an updated audio policy, and perhaps even shim some dlopen symbols ( you can grab " lib mtk-symbols" as reference from @fire855 or our mad team repos)

As for bt, you first need working audio before moving to this...
Then just build libbt, you can take it
(if it's for legacy ) from any of my device repos, or from m.a.d. team repos, you have plenty of examples there.
You may also need to patch afterwards external/Bluetooth with some mtk functions,

Cheers

Hi,
Thanks for your response:good:
About hwc, yes, I think it's working OK. Basically there's no weird glitches neither weird stuff in logcat so I didn't played deeper with it:p
About SELinux Permissive, yeah I had a look before, he's using a custom_init to edit the proc/cmdline (I'm right?) If so, I don't think will be a good idea since you still need to edit the boot?:confused:
The actual method works perfectly for me. I just modified rbox's 2ndinit:
https://github.com/androidrbox/firetv-2ndinit
As here

About audio, this device doesn't has jack, it's an Android TV (FireOS to be concret huh...);) BTW, they fixed jack in one of the Fire tablets.

I don't know if it's competely broken, I will try to catch a logcat while playing audio. About rebuild, yes, that was my idea but Amazon devices doesn't play very well with non-amazon blobs... But anyway, I will take a look at mtk_symbols.

So, basically you're saying if audio doesn't works, bt will not work too? That's weird, because in tank (Other Fire TV) diego_cr and me, we got bluetooth working without audio:silly:
About libbt-vendor.so, I've tried building it but I already said, things get worse because in stock rom there's no libbluetoothdrv.so ;)
I don't know really, but now that you suggested this, I have more things to try:good:
Thanks.
Regards.
 
Last edited:

Rortiz2

Senior Member
Mar 1, 2018
2,179
1,454
Barcelona
Hi,
@superdragonpt I have some news:eek:
So well, searching a bit, I found the remote was using Wi-Fi direct and not bluetooth.... Anyway, bluetooth wasn't working. I applied a few patches from various repos (fire855, frehung, xen0n, etc) and got bt working:D
About sound, well now it works but if I want sound, the boot time will take a loooot due a proprietary lib from Amazon (libaudiocustparam.so) that is constantly having issues with nvram...
About Wi-Fi direct, it detects the remote, it pairs it but then disconnects and says invited... It's pretty weird, it handshakes it but after that, errors out and disconnects it:confused:
OMX... Well, adding a few missing libs solved a few stuff (spam in logcat) but still not working... Will look for more patches.
I attatch a log so you can take a look (if you want obv xD)
Best Regards and thanks in advance:)
EDIT: Wi-Fi direct is working now. After adding two .sh files from amazon stock fw.
 

Attachments

  • sloane.txt
    380 KB · Views: 19
Last edited:
  • Like
Reactions: bigrammy

cakehonolulu

Senior Member
Sep 5, 2017
53
9
@superdragonpt Hello! I'm building a 3.4.5 6589 kernel, it works on recovery but not on any roms. What am I missing? Does it influence that I'm using a Kitkat 'lk' and 'preloader' for booting a jellybean rom?
 
Last edited:

Rortiz2

Senior Member
Mar 1, 2018
2,179
1,454
Barcelona
@superdragonpt Hello! I'm building a 3.4.5 6589 kernel, it works on recovery but not on any roms. What am I missing? Does it influence that I'm using a Kitkat 'lk' and 'preloader' for booting a jellybean rom?

Hi,

So you're trying to boot a jellybean ROM with lk and preloader from kitkat? The kernel is from kk or jb (I guess jb as is 3.4.5)?

Creo que eso es imposible ;) You should use preloader and lk from jellybean to boot a jb ROM as the kernel depends on the bootloader.

Regards!
 

cakehonolulu

Senior Member
Sep 5, 2017
53
9
Hi,

So you're trying to boot a jellybean ROM with lk and preloader from kitkat? The kernel is from kk or jb (I guess jb as is 3.4.5)?

Creo que eso es imposible ;) You should use preloader and lk from jellybean to boot a jb ROM as the kernel depends on the bootloader.

Regards!

Well, I'm actually trying to boot Lollipop, but booting it on the 6589 *requires* a 3.4.5 patched kernel so I'm out of ideas. On Kitkat lk/preloader, if I build it and flash it alongside twrp, the kernel works on recovery mode (But for some reason it is unable to mount the partitions), but if I flash it on the rom, it doesn't boot (Stays at the bootlogo forever).
 

Rortiz2

Senior Member
Mar 1, 2018
2,179
1,454
Barcelona
Well, I'm actually trying to boot Lollipop, but booting it on the 6589 *requires* a 3.4.5 patched kernel so I'm out of ideas. On Kitkat lk/preloader, if I build it and flash it alongside twrp, the kernel works on recovery mode (But for some reason it is unable to mount the partitions), but if I flash it on the rom, it doesn't boot (Stays at the bootlogo forever).

Hi again,

IIRC blackrebel said he was using jellybean kernel to boot lollipop as with kitkat one was impossible so I think he used preloader and lk from jb (just a guess...).

Yes, I know very right that jellybean kernel needs patches to boot lollipop. You're trying to boot lollipop in the 5HD right? You can try to take a look at dragonpt or blackrebel kernel sources:
- https://github.com/dragonpt/android_kernel_asus_me173x_new
- https://github.com/blackrebel75/HUAWEI89_WE_JB_700

Regards!
 

cakehonolulu

Senior Member
Sep 5, 2017
53
9
Hi again,

IIRC blackrebel said he was using jellybean kernel to boot lollipop as with kitkat one was impossible so I think he used preloader and lk from jb (just a guess...).

Yes, I know very right that jellybean kernel needs patches to boot lollipop. You're trying to boot lollipop in the 5HD right? You can try to take a look at dragonpt or blackrebel kernel sources:
- https://github.com/dragonpt/android_kernel_asus_me173x_new
- https://github.com/blackrebel75/HUAWEI89_WE_JB_700

Regards!

Yes! I'm using dragonpt's old repo commits (Vermagic, binder and SELinux stuff...) so all the kernel patches are already applied, but I can't seem to get the kernel to boot.
 

Rortiz2

Senior Member
Mar 1, 2018
2,179
1,454
Barcelona
Yes! I'm using dragonpt's old repo commits (Vermagic, binder and SELinux stuff...) so all the kernel patches are already applied, but I can't seem to get the kernel to boot.

Hey,

Ok got it. Try flashing lk and preloader from jellybean and see if works but it's weird as you said recovery is working without problems.
Also an unrelated question to lollipop, how did you managed to boot TWRP 3.X.X in that phone? I mean the recovery partition is so small to let you flash newer TWRP:confused:

Regards!
 

cakehonolulu

Senior Member
Sep 5, 2017
53
9
Hey,

Ok got it. Try flashing lk and preloader from jellybean and see if works but it's weird as you said recovery is working without problems.
Also an unrelated question to lollipop, how did you managed to boot TWRP 3.X.X in that phone? I mean the recovery partition is so small to let you flash newer TWRP:confused:

Regards!

Kitkat partition defines reduce system size (Jellybean stock ROM was morre bloated) thus I can use 10+MB but on Jellybean (Which I'm now trying...) I only have about 6.2MB and I'm trying to slim down TWRP as much as possible in order to fit it.
 

Rortiz2

Senior Member
Mar 1, 2018
2,179
1,454
Barcelona
Kitkat partition defines reduce system size (Jellybean stock ROM was morre bloated) thus I can use 10+MB but on Jellybean (Which I'm now trying...) I only have about 6.2MB and I'm trying to slim down TWRP as much as possible in order to fit it.

Hi,

Interesting... I guess without kernel sources I can't do that right.... I have an mt6572 device which has a recovery partition of 6MB and actually I can't flash my compiled TWRP. Since I don't have the kernel sources It's impossible:confused:

Regards.
 

cakehonolulu

Senior Member
Sep 5, 2017
53
9
Hi,

Interesting... I guess without kernel sources I can't do that right.... I have an mt6572 device which has a recovery partition of 6MB and actually I can't flash my compiled TWRP. Since I don't have the kernel sources It's impossible:confused:

Regards.

I mean, maybe your kernel supports Ramdisk XZ compression out-of-the-box (If you're lucky enough) so you might be able to squeeze a bit more space so that you can fit it on the partition. Anyways I've been looking into a way to repartition the device so I can flash TWRP, no matter what it size may be, on the fly.
 
  • Like
Reactions: Rortiz2

superdragonpt

Recognized Developer
Apr 27, 2013
4,923
19,266
Lisbon / Taiwan / USA
www.caixamagica.pt
My Asus memo pad hd7 (MT8125 - 6589 platform) is using JB kernel 3.4.5
( it's actually just 3.4.0... mediatek only cherry-picked couple 3.4.5 kernel commits and named it 3.4.5 ...
Well ..
Took several years to have an working kernel...Asus never released kernel source, so all drivers where done by me... LCM,tp, charging IC, you name.it!
Sure JB 3.4.5 kernel, lk , preloader from JB can boot even Marshmallow I have an booting los13, still on early stages, los14 is still far from booting ( Wana fix some critical stuff on los13 first)
And my los12.1 is already released here on xda
There's plenty of new commits and work I've done for this kernel, make sure you check my Asus memo pad hd7 repos on GitHub

There's no problem in using KK preloader/Lk for JB or vice versa...

Cheers

Edit your kernel boots on recovery, but not on ROM, make sure you have your partitions on kernel right, disable TP and EVERY SINGLE UNNEEDED DRIVER.

Have thru my years of kernel work, lots of cases of kernel not booting due to early panic, caused by "x" drivers, being the TP, and image sensors the main ones
Just clean the kernel out of all those drivers, just use LCM


-just try with your device LCM driver, should boot

-Make sure you've at least upstream kernel selinux to the Android version your trying to boot

-Remove mediatek binder s* ( just take binder from kernel common)

- Set your device partitions right (or it'll die with " mmc panic on early boot)

Etc
 
Last edited:

superdragonpt

Recognized Developer
Apr 27, 2013
4,923
19,266
Lisbon / Taiwan / USA
www.caixamagica.pt
Hey,

Also an unrelated question to lollipop, how did you managed to boot TWRP 3.X.X in that phone? I mean the recovery partition is so small to let you flash newer TWRP:confused:

Regards!

The recovery partitions only haves 6mb so ye small for latest twrp builds...

I actually did it, but you need to edit your "stock" scatter file

Increase recovery partitions by editing the scatters's partition size, you take space from the next partition into /recovery

I made two scatters, one with 11mb another with 24mb

The only problem is , for releasing this , people would messed up things... Haha
Some people can't work with spflashtools, and this involves more work...
Flash an full "modified stock rom" with an modified scatter ( increased recovery part.)
Then let that ROM boot
Back to recovery and erase all
Flash new ROM (Los etc)

Tons of work for the "regular user"...
 
Last edited:
  • Like
Reactions: Rortiz2

Top Liked Posts

  • There are no posts matching your filters.
  • 79
    Hey guys, We are going to try something new for our china phones - cyanogenmod.

    But we need some more devs to get everything going.



    For now we have:

    -Github tree for Lenovo P700i(mediatek 6577, android 4.0.4, kernel 3.0.8)

    -Lens_flare - original port author(may work with system folder and configs)

    -some kernel source from other devices like liquid gallant



    The main problem is getting adb to work that could help a lot on remaining development. For now even zygote not starting, but all partitions seems mounted successfully.

    We need more devs (especially that could assemble working kernel for device), working with p700i may lead to following porting for other mtk devices, as sources are nearly the same.
    40
    Lollipop on MT6577

    Hi there .

    Just to let you know, that lollipop is now booting on ZTE v970 [MT6577- w/ ComBo-Chip MT6620]
    With my custom 3.4.67 KK Kernel + some cherry-picks from the new MTK 3.10.54 LL Kernel

    Still very early, baseband is recognized , but still needs a lot more work on Telephony, Platform, etc.


    ;)

    Regards
    39
    More progress on this one: http://forum.xda-developers.com/showthread.php?t=2467400

    I have 3G data and incoming voice calls working now.

    Next: kitkat.

    Chris

    Please hit the thx button. And please thank also dr shadow and xplodwild from omnirom.
    27
    KitKat Sources MT6582 / 6592

    Since my Cloud host, removed the sources,that i uploaded twice

    Using MEGA now, should be on for some days..


    Edit: no more source leaks, noobies will always be noobies
    I won't be sharing more source stuff

    Learn to comply with GPL and respect others



    Regards
    27
    I'm working now since 1 day on CM13 and here the first screenshot on mt6592 :).