almondnguyen / android_device_samsung_grandppltedx

Device tree for Samsung Galaxy J2 Prime/Grand Prime Plus | MT6737T platform.
18 stars 10 forks source link

Stuck in boot animation #1

Closed almondnguyen closed 5 years ago

almondnguyen commented 5 years ago

Currently: 06-28 12:48:26.371 6403 6403 F libc : CANNOT LINK EXECUTABLE "/system/bin/mtk_agpsd": cannot locate symbol "UCNV_FROM_U_CALLBACK_STOP_55" referenced by "/system/bin/mtk_agpsd"...

[ mtk_agpsd ~ UCNV_FROM_U_CALLBACK_STOP_55 ]

it seems that lib mtk_symbols (mtk/mtk_symbols) doesn't work or something, as it should include this symbol (./icu55.c)

TBM13 commented 5 years ago

Nougat uses ICU56, and Marshmallow ICU55

Maybe this can help you: https://github.com/xen0n/android_device_meizu_arale/commit/40c0561fdc07cf60222181b69cf3f3e82f1d7056

almondnguyen commented 5 years ago

Thank you! This does help solve the symbol. Now it is this error 07-03 03:55:48.359 847 847 D MALI : gles_state_set_error_internal:58: GLES error info:failed to allocate CPU memory (is logcat)

I suppose this is due to legacy libs?

E: oh, i should include a tombstone too~ tomb0.txt

E2: aaaand a 50s logcat logcat_gles.txt

honestly I dont know where to start with this bug .-.

TBM13 commented 5 years ago

E MALI : gles_state_set_error_internal:57: GLES ctx: 0xb3b00008, error code:0x505

0x505 seems to be GL_OUT_OF_MEMORY.

The function that seems to fail is eglSwapBuffers in DisplayDevice::swapBuffers(HWComposer& hwc) in surfaceflinger/DisplayDevice.cpp (https://android.googlesource.com/platform/frameworks/native/+/nougat-release/services/surfaceflinger/DisplayDevice.cpp#295)

I'm not sure why is happening and how to fix it. If i find something i will write another comment.

TBM13 commented 5 years ago

Listing some errors that maybe are related: E SurfaceFlinger: Couldn't set SCHED_FIFO E SurfaceFlinger: hwcomposer module not found E Gralloc1On0Adapter: gralloc0 allocation failed: -12 (Out of memory) E GraphicBufferAllocator: Failed to allocate (540 x 960) format 1 usage 6656: 5 E : GraphicBufferAlloc::createGraphicBuffer(w=540, h=960) failed (Out of memory), handle=0x0 E BufferQueueProducer: [FramebufferSurface] allocateBuffers: failed to allocate buffer (0 x 0, format 1, usage 6656) E : Runtime and build version of gralloc private structure does not match. Errors will likely follow.

almondnguyen commented 5 years ago

ol'key, was thinking this is a swap problem, so I searched the rootdir with 'sswap' (because, well, it literally has swap in its name lol) Did not know this is a thing from Samsung (rootdir/init.rc)

write /proc/sys/vm/extra_free_kbytes ${sys.sysctl.extra_free_kbytes} ( here is AOSP as checked in ROM/init.rc )

# Activate Background Compaction on property:sys.sysctl.compact_memory=1 setprop sys.sysctl.compact_memory 0 start compact_memory

service compact_memory /sbin/bgcompact user root seclabel u:r:sswap:s0 oneshot disabled

# "tcp_default_init_rwnd" Is too long! (AOSP stuff)

also in rootdir/init.project.rc, Samsung #-ed all reference to sswap so no wonder it does nothing. Might try adding this to init.samsung.rc, add the blob (it exists) and get back ASAP

almondnguyen commented 5 years ago

nope, does no good. Worth the try tho~

almondnguyen commented 5 years ago

you know what. I took hwcomposer & gralloc lib from porridge (which Melek based on to make the Port ROMs) and put them in system/lib/hw and the boot animation is now here! (heheXD)

(There are other bugs though, I see some lines mentioning "retry: x", x increases)

E: new 50s logcat (with grep "E" to search for *most error lines and also 25s logcat spews 45 MB text file)

logcat_bootanim.txt

E2: 10s logcat that is small enough & not contains repeated info logcat_bootanim_nonE.txt

E3: and a tombstone (all of 10 are installd related, so only upload 1) tomb0.txt

almondnguyen commented 5 years ago

hmm, i managed to fix installd stuffs by removing references to Samsung's PlayReady DRM in rootdir. Still bin/sn is retrying something infinitely~

check logcat above, it didn't change; tombstone (E: this is the only tombstone, _01 to _09 doesn't exist): tomb0_sn.txt

--

E2: eh no sn is not guilty. E System : ************ Failure starting system services and 100k+ lines of repeated stuffs logcat_bootanim5.txt

E3: and.. is it possible to disable ConsumerIR feature? 07-06 08:05:59.423 611 611 I SystemServer: StartConsumerIrService 07-06 08:05:59.424 611 611 E ConsumerIrService: Can't open consumer IR HW Module, error: -2

almondnguyen commented 5 years ago

oh i forgot about this lol. New commit coming!

TBM13 commented 5 years ago

So now it boots without needing to replace the things that Melekpro replaced in the zip?

almondnguyen commented 5 years ago

erm, idk how GitHub works lol yea I fixed all stuffs so boot requires no hacks anymore

Vào Th 3, 9 thg 7, 2019 vào lúc 21:25 TBM notifications@github.com đã viết:

So now it boots without needing to replace the things that Melekpro replaced in the zip?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/almondnguyen/android_device_samsung_grandppltedx/issues/1?email_source=notifications&email_token=AKDWOPKBFH4D5XPBLPL3GITP6SNW5A5CNFSM4H45MT4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZQN3EI#issuecomment-509664657, or mute the thread https://github.com/notifications/unsubscribe-auth/AKDWOPO23AGDCX2FSMD4C4LP6SNW5ANCNFSM4H45MT4A .