[Lenovo P2 Questions & Answers] theworldismanythings:
Hello there,

I have a problem in hands with my Lenovo P2.

So... my screen is broken and I have removed it (yes, my Lenovo does not have a screen right now), but now I'm not able to boot into a freshly flashed Android because the system is trying to connect to the HW (or it seems to be that...) and I don't have a working one.

adb logcat spits this out repeatedly:

02-14 15:35:37.405 1345 1345 D vndksupport: Loading /vendor/lib64/hw/gralloc.msm8953.so from current namespace instead of sphal namespace.
02-14 15:35:37.406 1345 1345 I SDM : ExtensionInterface::CreateExtensionInterface:
02-14 15:35:37.406 1345 1345 I SDM : SDM-EXTENSION Version: Date: 08/21/18, Commit: bfe6fd2, Change: I8d4aa219cb
02-14 15:35:37.406 1345 1345 I SDM : HWInfo::GetHWResourceInfo: SDE Version = 5, SDE Revision = 10100000, RGB = 2, VIG = 1, DMA = 1, Cursor = 1
02-14 15:35:37.406 1345 1345 I SDM : HWInfo::GetHWResourceInfo: Upscale Ratio = 20, Downscale Ratio = 4, Blending Stages = 4
02-14 15:35:37.406 1345 1345 I SDM : HWInfo::GetHWResourceInfo: SourceSplit = 0 QSEED3 = 0
02-14 15:35:37.406 1345 1345 I SDM : HWInfo::GetHWResourceInfo: BWC = 0, UBWC = 1, Decimation = 1, Tile Format = 0 Concurrent Writeback = 0
02-14 15:35:37.406 1345 1345 I SDM : HWInfo::GetHWResourceInfo: MaxLowBw = 3400000 , MaxHighBw = 3400000
02-14 15:35:37.407 1345 1345 I SDM : HWInfo::GetHWResourceInfo: MaxPipeBw = 2300000 KBps, MaxSDEClock = 400000000 Hz, ClockFudgeFactor = 1.050000
02-14 15:35:37.407 1345 1345 I SDM : HWInfo::GetHWResourceInfo: Prefill factors: Tiled_NV12 = 8, Tiled = 4, Linear = 1, Scale = 1, Fudge_factor = 2
02-14 15:35:37.407 1345 1345 I SDM : HWInfo::GetMDSSRotatorInfo: MDSS Rotator: Count = 1, Downscale = 1, Min_downscale = 2.000000
02-14 15:35:37.407 1345 1345 I SDM : HWInfo::GetHWResourceInfo: Has Support for multiple bw limits shown below
02-14 15:35:37.407 1345 1345 I SDM : HWInfo::GetHWResourceInfo: Mode-index=0 total_bw_limit=3400000 and pipe_bw_limit=2300000
02-14 15:35:37.407 1345 1345 I SDM : HWInfo::GetHWResourceInfo: Mode-index=1 total_bw_limit=3100000 and pipe_bw_limit=2300000
02-14 15:35:37.407 1345 1345 I SDM : HWInfo::GetHWResourceInfo: Mode-index=2 total_bw_limit=3400000 and pipe_bw_limit=2300000
02-14 15:35:37.407 1345 1345 I SDM : HWInfo::GetHWResourceInfo: Mode-index=3 total_bw_limit=3400000 and pipe_bw_limit=2300000
02-14 15:35:37.407 1345 1345 I SDM : SessionManager::SessionManager: Allocate buffers synchronously = 0
02-14 15:35:37.408 514 514 W ServiceManagement: Waited one second for android.hardware.graphics.composer@2.1::IComposer/default. Waiting another...
02-14 15:35:37.408 1345 1345 I SDM : CoreInterface::CreateCore: Open interface handle = 0x7700655000
02-14 15:35:37.408 1345 1345 I SDM : HWCSession::Register: Set uevent listener = 0x770064b200
02-14 15:35:37.408 1345 1345 I SDM : HWInfo::GetFirstDisplayInterfaceType: First display is internal display
02-14 15:35:37.409 1345 1345 I SDM : CPUHint::Init: Invalid CPU Hint Pre-enable Window -1
02-14 15:35:37.409 1345 1345 I SDM : HWDevice::GetHWPanelMaxBrightnessFromNode: Max brightness level = 255
02-14 15:35:37.409 1345 1345 W SDM : HWDevice::GetHWPanelInfoByNode: Failed to open msm_fb_panel_info node device node 1
02-14 15:35:37.409 1345 1345 W SDM : HWDevice::GetHWPanelInfoByNode: Failed to open msm_fb_panel_info node device node 2
02-14 15:35:37.409 1345 1345 W SDM : HWDevice::GetHWPanelInfoByNode: Failed to open msm_fb_panel_info node device node 3
02-14 15:35:37.409 1345 1345 E SDM : HWDevice::Init: device type = 0 should be present
02-14 15:35:37.409 1345 1345 E SDM : HWInterface::Create: Init on HW Intf type 0 failed
02-14 15:35:37.409 1345 1345 E SDM : HWCDisplay::Init: Display create failed. Error = 11 display_type 0 event_handler 0x77006a7000 disp_intf 0x77006a7040
02-14 15:35:37.410 1345 1345 I SDM : HWCColorManager::CreateColorManager: Successfully loaded libsdm-disp-vndapis.so
02-14 15:35:37.411 1345 1345 I SDM : HWCColorManager::CreateColorManager: Successfully loaded libsdm-disp-vndapis.so and libsdm-diag.so and diag_init'ed
02-14 15:35:37.411 1345 1345 I SDM : HWCSession::Register: Set uevent listener = 0x0
02-14 15:35:37.411 1345 1345 I SDM : CoreInterface::DestroyCore: Close handle
02-14 15:35:37.412 1345 1345 E ComposerHal: failed to open hwcomposer device: Invalid argument
02-14 15:35:37.412 1345 1345 E android.hardware.graphics.composer@2.1-service: Could not get passthrough implementation for android.hardware.graphics.composer@2.1::IComposer/default.
02-14 15:35:37.415 446 446 I VendorServiceManager: service 'display.qservice' died
02-14 15:35:37.495 1231 1257 I ServiceManager: Waiting for service 'SurfaceFlinger' on '/dev/binder'...
02-14 15:35:37.595 1231 1257 I chatty : uid=1000(system) android.display identical 1 line
02-14 15:35:37.695 1231 1257 I ServiceManager: Waiting for service 'SurfaceFlinger' on '/dev/binder'...
02-14 15:35:37.786 500 535 E ANDR-PERF-MPCTL: First Boot check over.Going to 2nd Boot check.
02-14 15:35:37.795 1231 1257 I ServiceManager: Waiting for service 'SurfaceFlinger' on '/dev/binder'...
02-14 15:35:37.996 1231 1257 I chatty : uid=1000(system) android.display identical 2 lines
02-14 15:35:38.096 1231 1257 I ServiceManager: Waiting for service 'SurfaceFlinger' on '/dev/binder'...
02-14 15:35:38.196 1231 1257 W ServiceManager: Service SurfaceFlinger didn't start. Returning NULL
02-14 15:35:38.409 514 514 W ServiceManagement: Waited one second for android.hardware.graphics.composer@2.1::IComposer/default. Waiting another...
02-14 15:35:38.446 1231 1257 I ServiceManager: Waiting for service 'SurfaceFlinger' on '/dev/binder'...
02-14 15:35:38.504 1352 1352 W mm-pp-dpps: type=1400 audit(0.0:593): avc: granted { read } for uid=1000 name="vndbinder" dev="tmpfs" ino=15735 scontext=u:r:init:s0 tcontext=u:object_r:vndbinder_device:s0 tclass=chr_file
02-14 15:35:38.522 1352 1352 I Dpps : GetInstance: DppsServer ref count increased to 1
02-14 15:35:38.504 1352 1352 W mm-pp-dpps: type=1400 audit(0.0:594): avc: granted { read } for uid=1000 name="vndbinder" dev="tmpfs" ino=15735 scontext=u:r:init:s0 tcontext=u:object_r:vndbinder_device:s0 tclass=chr_file
02-14 15:35:38.504 1352 1352 W mm-pp-dpps: type=1400 audit(0.0:595): avc: granted { read open } for uid=1000 path="/dev/vndbinder" dev="tmpfs" ino=15735 scontext=u:r:init:s0 tcontext=u:object_r:vndbinder_device:s0 tclass=chr_file
02-14 15:35:38.504 1352 1352 W mm-pp-dpps: type=1400 audit(0.0:596): avc: granted { read } for uid=1000 path="/dev/vndbinder" dev="tmpfs" ino=15735 scontext=u:r:init:s0 tcontext=u:object_r:vndbinder_device:s0 tclass=chr_file
02-14 15:35:38.522 1352 1352 E Dpps : GetPanelName():551 GetPanelName: panel-name not found
02-14 15:35:38.522 1352 1352 E Dpps : GetPanelInfoByNode():601 Failed to get panel type info, ret -22
02-14 15:35:38.522 1352 1352 E Dpps : GetFBNodeIndex():640 Unable to get panel info for node index 0, ret -22
02-14 15:35:38.522 1352 1352 E Dpps : InitDisplayHardware():258 Unable to get fb node index (-1), display type 0, ret -22
02-14 15:35:38.522 1352 1352 E Dpps : Init():169 Failed to setup display hardware, ret = -22
02-14 15:35:38.522 1352 1352 E Dpps : main():32 Failed to initialize DPPS, ret = -22
02-14 15:35:38.522 1352 1352 I Dpps : DeleteInstance: DppsServer ref count decreased to 0
02-14 15:35:38.522 1352 1352 I Dpps : DeleteInstance: Deleting DppsServer instance
02-14 15:35:38.546 1231 1257 I ServiceManager: Waiting for service 'SurfaceFlinger' on '/dev/binder'...
02-14 15:35:39.247 1231 1257 I chatty : uid=1000(system) android.display identical 7 lines
02-14 15:35:39.347 1231 1257 I ServiceManager: Waiting for service 'SurfaceFlinger' on '/dev/binder'...
02-14 15:35:39.409 514 514 W ServiceManagement: Waited one second for android.hardware.graphics.composer@2.1::IComposer/default. Waiting another...
02-14 15:35:39.448 1231 1257 I ServiceManager: Waiting for service 'SurfaceFlinger' on '/dev/binder'...
02-14 15:35:40.249 1231 1257 I chatty : uid=1000(system) android.display identical 8 lines
02-14 15:35:40.349 1231 1257 I ServiceManager: Waiting for service 'SurfaceFlinger' on '/dev/binder'...
02-14 15:35:40.409 514 514 W ServiceManagement: Waited one second for android.hardware.graphics.composer@2.1::IComposer/default. Waiting another...

Which means the mobile does not boot up, and in turn I'm not able to use scrcpy or other tool that allows me to control the screen via PC.

Is there anyway I can bypass this Display initialization or to output the display renderization to a virtual framebuffer easily?

Any other thoughts on this issue are welcome, as well as other possible solutions to
this case.

Thank you so much in advandce!

Best regards!