[Streak 5 Android Development] _n0p_:
libcom_oem_hdmi.so

Well, afaik Java can call external libs (got no Java exp, sorry)

Anyway, quick peek at libcom_oem_hdmi.so:

All operations seems to go via

/dev/graphics/fb1, then MediaServer is notified.

Most probably simpler way would be to write an app that would enable and disable hdmi standalone. And this should work as hdmi is done in external chip.

Both funcs (enable and disable hdmi) take NO parameter, so it should be easy to reimplement.

Got no personal interest, but following code might give some ideas:

.text:00000678 ; isHdmiConnected(void)
.text:00000678 EXPORT _Z15isHdmiConnectedv
.text:00000678 _Z15isHdmiConnectedv ; CODE XREF: sub_728:loc_73Ep
.text:00000678 PUSH.W {R4-R8,LR}
.text:0000067C LDR R4, =(_GLOBAL_OFFSET_TABLE_ - 0x688)
.text:0000067E LDR R0, =(hdmi_ptr - 0x10F8)
.text:00000680 MOV.W R8, #0
.text:00000684 ADD R4, PC
.text:00000686 LDR R7, =(aDevGraphicsFb1 - 0x692)
.text:00000688 LDR R5, =(aLogtagFailedTo - 0x694)
.text:0000068A MOVS R2, #2
.text:0000068C LDR R3, [R4,R0]
.text:0000068E ADD R7, PC ; "/dev/graphics/fb1"
.text:00000690 ADD R5, PC ; "LOGTAG: Failed to open /dev/graphics/fb"...
.text:00000692 STRB R2, [R3]
.text:00000694
.text:00000694 loc_694 ; CODE XREF: isHdmiConnected(void)+46j
.text:00000694 MOVS R1, #2
.text:00000696 MOV R0, R7
.text:00000698 BLX sub_598
.text:0000069C CMP.W R0, #0xFFFFFFFF
.text:000006A0 MOV R6, R0
.text:000006A2 BNE loc_6FC
.text:000006A4 MOVS R1, #0
.text:000006A6 MOVS R0, #6
.text:000006A8 MOV R2, R5
.text:000006AA ADD.W R8, R8, #1
.text:000006AE BLX sub_58C
.text:000006B2 MOVW R0, #0x2710
.text:000006B6 BLX sub_5A4
.text:000006BA CMP.W R8, #0xA
.text:000006BE BNE loc_694
.text:000006C0 MOVS R0, #6
.text:000006C2 MOVS R1, #0
.text:000006C4 MOV R2, R5
.text:000006C6 MOVS R4, #0
.text:000006C8 BLX sub_58C
.text:000006CC B loc_6F6
.text:000006CE ; ---------------------------------------------------------------------------
.text:000006CE
.text:000006CE loc_6CE ; CODE XREF: isHdmiConnected(void)+96j
.text:000006CE BEQ loc_6DC
.text:000006D0 LDR R2, =(aLogtagCanTRetr - 0x6DA)
.text:000006D2 MOVS R0, #6
.text:000006D4 MOVS R1, #0
.text:000006D6 ADD R2, PC ; "LOGTAG: Can't retrieve hdmiInfo!"
.text:000006D8 BLX sub_58C
.text:000006DC
.text:000006DC loc_6DC ; CODE XREF: isHdmiConnected(void):loc_6CEj
.text:000006DC LDR.W R12, =(hdmi_ptr - 0x10F8)
.text:000006E0 LDR.W R2, [R4,R12]
.text:000006E4 LDRB R1, [R2]
.text:000006E6 CMP R1, #1
.text:000006E8 BEQ loc_6EE
.text:000006EA MOVS R4, #0
.text:000006EC B loc_6F0
.text:000006EE ; ---------------------------------------------------------------------------
.text:000006EE
.text:000006EE loc_6EE ; CODE XREF: isHdmiConnected(void)+70j
.text:000006EE ; isHdmiConnected(void)+94j
.text:000006EE MOVS R4, #1
.text:000006F0
.text:000006F0 loc_6F0 ; CODE XREF: isHdmiConnected(void)+74j
.text:000006F0 MOV R0, R6
.text:000006F2 BLX sub_5B0
.text:000006F6
.text:000006F6 loc_6F6 ; CODE XREF: isHdmiConnected(void)+54j
.text:000006F6 MOV R0, R4
.text:000006F8 POP.W {R4-R8,PC}
.text:000006FC ; ---------------------------------------------------------------------------
.text:000006FC
.text:000006FC loc_6FC ; CODE XREF: isHdmiConnected(void)+2Aj
.text:000006FC LDR.W LR, =(hdmi_ptr - 0x10F8)
.text:00000700 LDR R1, =0xC0046D09
.text:00000702 LDR.W R2, [R4,LR]
.text:00000706 BLX sub_5BC
.text:0000070A CMP R0, #0
.text:0000070C BGT loc_6EE
.text:0000070E B loc_6CE
.text:0000070E ; End of function isHdmiConnected(void)
.text:0000070E
.text:0000070E ; ---------------------------------------------------------------------------
.text:00000710 dword_710 DCD 0xC0046D09 ; DATA XREF: isHdmiConnected(void)+88r
.text:00000714 off_714 DCD _GLOBAL_OFFSET_TABLE_ - 0x688
.text:00000714 ; DATA XREF: isHdmiConnected(void)+4r
.text:00000718 off_718 DCD hdmi_ptr - 0x10F8 ; DATA XREF: isHdmiConnected(void)+6r
.text:00000718 ; isHdmiConnected(void):loc_6DCr ...
.text:0000071C off_71C DCD aDevGraphicsFb1 - 0x692
.text:0000071C ; DATA XREF: isHdmiConnected(void)+Er
.text:0000071C ; "/dev/graphics/fb1"
.text:00000720 off_720 DCD aLogtagFailedTo - 0x694
.text:00000720 ; DATA XREF: isHdmiConnected(void)+10r
.text:00000720 ; "LOGTAG: Failed to open /dev/graphics/fb"...
.text:00000724 off_724 DCD aLogtagCanTRetr - 0x6DA
.text:00000724 ; DATA XREF: isHdmiConnected(void)+58r
.text:00000724 ; "LOGTAG: Can't retrieve hdmiInfo!"
.text:00000728
.text:00000728 ; =============== S U B R O U T I N E =======================================
.text:00000728
.text:00000728
.text:00000728 sub_728 ; DATA XREF: .data:0000113Co
.text:00000728 PUSH {R4,LR}
.text:0000072A LDR R2, [R0]
.text:0000072C LDR R1, =(aComAndroidMusi - 0x734)
.text:0000072E LDR R3, [R2,#0x18]
.text:00000730 ADD R1, PC ; "com/android/music/MediaPlaybackService"
.text:00000732 BLX R3
.text:00000734 MOV R4, R0
.text:00000736 CBNZ R0, loc_73E
.text:00000738 LDR R2, =(aLogtagCanTFind - 0x73E)
.text:0000073A ADD R2, PC ; "LOGTAG: Can't find com/android/music/Me"...
.text:0000073C B loc_74E
.text:0000073E ; ---------------------------------------------------------------------------
.text:0000073E
.text:0000073E loc_73E ; CODE XREF: sub_728+Ej
.text:0000073E BL _Z15isHdmiConnectedv ; isHdmiConnected(void)
.text:00000742 MOV R4, R0
.text:00000744 CBZ R0, loc_74A
.text:00000746 MOVS R4, #1
.text:00000748 B loc_756
.text:0000074A ; ---------------------------------------------------------------------------
.text:0000074A
.text:0000074A loc_74A ; CODE XREF: sub_728+1Cj
.text:0000074A LDR R2, =(aLogtagIshdmico - 0x750)
.text:0000074C ADD R2, PC ; "LOGTAG: isHdmiConnected fail"
.text:0000074E
.text:0000074E loc_74E ; CODE XREF: sub_728+14j
.text:0000074E MOVS R0, #6
.text:00000750 MOV R1, R4
.text:00000752 BLX sub_58C
.text:00000756
.text:00000756 loc_756 ; CODE XREF: sub_728+20j
.text:00000756 MOV R0, R4
.text:00000758 POP {R4,PC}
.text:00000758 ; End of function sub_728
.text:00000758
.text:00000758 ; ---------------------------------------------------------------------------
.text:0000075A DCW 0xBF00
.text:0000075C off_75C DCD aComAndroidMusi - 0x734 ; DATA XREF: sub_728+4r
.text:0000075C ; "com/android/music/MediaPlaybackService"
.text:00000760 off_760 DCD aLogtagCanTFind - 0x73E ; DATA XREF: sub_728+10r
.text:00000760 ; "LOGTAG: Can't find com/android/music/Me"...
.text:00000764 off_764 DCD aLogtagIshdmico - 0x750 ; DATA XREF: sub_728:loc_74Ar
.text:00000764 ; "LOGTAG: isHdmiConnected fail"
.text:00000768
.text:00000768 ; =============== S U B R O U T I N E =======================================
.text:00000768
.text:00000768
.text:00000768 ; enableHdmi(void)
.text:00000768 EXPORT _Z10enableHdmiv
.text:00000768 _Z10enableHdmiv ; CODE XREF: sub_808:loc_81Ep
.text:00000768 PUSH.W {R4-R8,LR}
.text:0000076C LDR R4, =(_GLOBAL_OFFSET_TABLE_ - 0x778)
.text:0000076E LDR R0, =(hdmi_ptr - 0x10F8)
.text:00000770 MOV.W R8, #0
.text:00000774 ADD R4, PC
.text:00000776 LDR R7, =(aDevGraphicsFb1 - 0x782)
.text:00000778 LDR R5, =(aLogtagFailedTo - 0x784)
.text:0000077A MOVS R2, #2
.text:0000077C LDR R3, [R4,R0]
.text:0000077E ADD R7, PC ; "/dev/graphics/fb1"
.text:00000780 ADD R5, PC ; "LOGTAG: Failed to open /dev/graphics/fb"...
.text:00000782 STRB R2, [R3]
.text:00000784
.text:00000784 loc_784 ; CODE XREF: enableHdmi(void)+46j
.text:00000784 MOVS R1, #2
.text:00000786 MOV R0, R7
.text:00000788 BLX sub_598
.text:0000078C CMP.W R0, #0xFFFFFFFF
.text:00000790 MOV R6, R0
.text:00000792 BNE loc_7DE
.text:00000794 MOVS R1, #0
.text:00000796 MOVS R0, #6
.text:00000798 MOV R2, R5
.text:0000079A ADD.W R8, R8, #1
.text:0000079E BLX sub_58C
.text:000007A2 MOVW R0, #0x2710
.text:000007A6 BLX sub_5A4
.text:000007AA CMP.W R8, #0xA
.text:000007AE BNE loc_784
.text:000007B0 MOVS R0, #6
.text:000007B2 MOVS R1, #0
.text:000007B4 MOV R2, R5
.text:000007B6 MOVS R4, #0
.text:000007B8 BLX sub_58C
.text:000007BC B loc_7D8
.text:000007BE ; ---------------------------------------------------------------------------
.text:000007BE
.text:000007BE loc_7BE ; CODE XREF: enableHdmi(void)+82j
.text:000007BE IT EQ
.text:000007C0 MOVEQ R4, R0
.text:000007C2 BEQ loc_7D2
.text:000007C4 LDR R2, =(aLogtagCanTRetr - 0x7D0)
.text:000007C6 MOVS R0, #6
.text:000007C8 MOVS R1, #0
.text:000007CA MOVS R4, #0
.text:000007CC ADD R2, PC ; "LOGTAG: Can't retrieve hdmiInfo!"
.text:000007CE BLX sub_58C
.text:000007D2
.text:000007D2 loc_7D2 ; CODE XREF: enableHdmi(void)+5Aj
.text:000007D2 ; enableHdmi(void)+86j
.text:000007D2 MOV R0, R6
.text:000007D4 BLX sub_5B0
.text:000007D8
.text:000007D8 loc_7D8 ; CODE XREF: enableHdmi(void)+54j
.text:000007D8 UXTB R0, R4
.text:000007DA POP.W {R4-R8,PC}
.text:000007DE ; ---------------------------------------------------------------------------
.text:000007DE
.text:000007DE loc_7DE ; CODE XREF: enableHdmi(void)+2Aj
.text:000007DE LDR R1, =(hdmi_ptr - 0x10F8)
.text:000007E0 LDR R2, [R4,R1]
.text:000007E2 LDR R1, =0xC0046D0A
.text:000007E4 BLX sub_5BC
.text:000007E8 CMP R0, #0
.text:000007EA BLE loc_7BE
.text:000007EC MOVS R4, #1
.text:000007EE B loc_7D2
.text:000007EE ; End of function enableHdmi(void)
.text:000007EE
.text:000007EE ; ---------------------------------------------------------------------------
.text:000007F0 dword_7F0 DCD 0xC0046D0A ; DATA XREF: enableHdmi(void)+7Ar
.text:000007F4 off_7F4 DCD _GLOBAL_OFFSET_TABLE_ - 0x778
.text:000007F4 ; DATA XREF: enableHdmi(void)+4r
.text:000007F8 off_7F8 DCD hdmi_ptr - 0x10F8 ; DATA XREF: enableHdmi(void)+6r
.text:000007F8 ; enableHdmi(void):loc_7DEr
.text:000007FC off_7FC DCD aDevGraphicsFb1 - 0x782 ; DATA XREF: enableHdmi(void)+Er
.text:000007FC ; "/dev/graphics/fb1"
.text:00000800 off_800 DCD aLogtagFailedTo - 0x784 ; DATA XREF: enableHdmi(void)+10r
.text:00000800 ; "LOGTAG: Failed to open /dev/graphics/fb"...
.text:00000804 off_804 DCD aLogtagCanTRetr - 0x7D0 ; DATA XREF: enableHdmi(void)+5Cr
.text:00000804 ; "LOGTAG: Can't retrieve hdmiInfo!"
.text:00000808
.text:00000808 ; =============== S U B R O U T I N E =======================================
.text:00000808
.text:00000808
.text:00000808 sub_808 ; DATA XREF: .data:00001130o
.text:00000808 PUSH {R4,LR}
.text:0000080A LDR R2, [R0]
.text:0000080C LDR R1, =(aComAndroidMusi - 0x814)
.text:0000080E LDR R3, [R2,#0x18]
.text:00000810 ADD R1, PC ; "com/android/music/MediaPlaybackService"
.text:00000812 BLX R3
.text:00000814 MOV R4, R0
.text:00000816 CBNZ R0, loc_81E
.text:00000818 LDR R2, =(aLogtagCanTFind - 0x81E)
.text:0000081A ADD R2, PC ; "LOGTAG: Can't find com/android/music/Me"...
.text:0000081C B loc_82E
.text:0000081E ; ---------------------------------------------------------------------------
.text:0000081E
.text:0000081E loc_81E ; CODE XREF: sub_808+Ej
.text:0000081E BL _Z10enableHdmiv ; enableHdmi(void)
.text:00000822 MOV R4, R0
.text:00000824 CBZ R0, loc_82A
.text:00000826 MOVS R4, #1
.text:00000828 B loc_836
.text:0000082A ; ---------------------------------------------------------------------------
.text:0000082A
.text:0000082A loc_82A ; CODE XREF: sub_808+1Cj
.text:0000082A LDR R2, =(aLogtagEnablehd - 0x830)
.text:0000082C ADD R2, PC ; "LOGTAG: enableHdmi fail"
.text:0000082E
.text:0000082E loc_82E ; CODE XREF: sub_808+14j
.text:0000082E MOVS R0, #6
.text:00000830 MOV R1, R4
.text:00000832 BLX sub_58C
.text:00000836
.text:00000836 loc_836 ; CODE XREF: sub_808+20j
.text:00000836 MOV R0, R4
.text:00000838 POP {R4,PC}
.text:00000838 ; End of function sub_808
.text:00000838
.text:00000838 ; ---------------------------------------------------------------------------
.text:0000083A DCW 0xBF00
.text:0000083C off_83C DCD aComAndroidMusi - 0x814 ; DATA XREF: sub_808+4r
.text:0000083C ; "com/android/music/MediaPlaybackService"
.text:00000840 off_840 DCD aLogtagCanTFind - 0x81E ; DATA XREF: sub_808+10r
.text:00000840 ; "LOGTAG: Can't find com/android/music/Me"...
.text:00000844 off_844 DCD aLogtagEnablehd - 0x830 ; DATA XREF: sub_808:loc_82Ar
.text:00000844 ; "LOGTAG: enableHdmi fail"
.text:00000848
.text:00000848 ; =============== S U B R O U T I N E =======================================
.text:00000848
.text:00000848
.text:00000848 ; disableHdmi(void)
.text:00000848 EXPORT _Z11disableHdmiv
.text:00000848 _Z11disableHdmiv ; CODE XREF: sub_8E8:loc_8FEp
.text:00000848 PUSH.W {R4-R8,LR}
.text:0000084C LDR R4, =(_GLOBAL_OFFSET_TABLE_ - 0x858)
.text:0000084E LDR R0, =(hdmi_ptr - 0x10F8)
.text:00000850 MOV.W R8, #0
.text:00000854 ADD R4, PC
.text:00000856 LDR R7, =(aDevGraphicsFb1 - 0x862)
.text:00000858 LDR R5, =(aLogtagFailedTo - 0x864)
.text:0000085A MOVS R2, #2
.text:0000085C LDR R3, [R4,R0]
.text:0000085E ADD R7, PC ; "/dev/graphics/fb1"
.text:00000860 ADD R5, PC ; "LOGTAG: Failed to open /dev/graphics/fb"...
.text:00000862 STRB R2, [R3]
.text:00000864
.text:00000864 loc_864 ; CODE XREF: disableHdmi(void)+46j
.text:00000864 MOVS R1, #2
.text:00000866 MOV R0, R7
.text:00000868 BLX sub_598
.text:0000086C CMP.W R0, #0xFFFFFFFF
.text:00000870 MOV R6, R0
.text:00000872 BNE loc_8BE
.text:00000874 MOVS R1, #0
.text:00000876 MOVS R0, #6
.text:00000878 MOV R2, R5
.text:0000087A ADD.W R8, R8, #1
.text:0000087E BLX sub_58C
.text:00000882 MOVW R0, #0x2710
.text:00000886 BLX sub_5A4
.text:0000088A CMP.W R8, #0xA
.text:0000088E BNE loc_864
.text:00000890 MOVS R0, #6
.text:00000892 MOVS R1, #0
.text:00000894 MOV R2, R5
.text:00000896 MOVS R4, #0
.text:00000898 BLX sub_58C
.text:0000089C B loc_8B8
.text:0000089E ; ---------------------------------------------------------------------------
.text:0000089E
.text:0000089E loc_89E ; CODE XREF: disableHdmi(void)+82j
.text:0000089E IT EQ
.text:000008A0 MOVEQ R4, R0
.text:000008A2 BEQ loc_8B2
.text:000008A4 LDR R2, =(aLogtagCanTRetr - 0x8B0)
.text:000008A6 MOVS R0, #6
.text:000008A8 MOVS R1, #0
.text:000008AA MOVS R4, #0
.text:000008AC ADD R2, PC ; "LOGTAG: Can't retrieve hdmiInfo!"
.text:000008AE BLX sub_58C
.text:000008B2
.text:000008B2 loc_8B2 ; CODE XREF: disableHdmi(void)+5Aj
.text:000008B2 ; disableHdmi(void)+86j
.text:000008B2 MOV R0, R6
.text:000008B4 BLX sub_5B0
.text:000008B8
.text:000008B8 loc_8B8 ; CODE XREF: disableHdmi(void)+54j
.text:000008B8 UXTB R0, R4
.text:000008BA POP.W {R4-R8,PC}
.text:000008BE ; ---------------------------------------------------------------------------
.text:000008BE
.text:000008BE loc_8BE ; CODE XREF: disableHdmi(void)+2Aj
.text:000008BE LDR R1, =(hdmi_ptr - 0x10F8)
.text:000008C0 LDR R2, [R4,R1]
.text:000008C2 LDR R1, =0xC0046D0E
.text:000008C4 BLX sub_5BC
.text:000008C8 CMP R0, #0
.text:000008CA BLE loc_89E
.text:000008CC MOVS R4, #1
.text:000008CE B loc_8B2
.text:000008CE ; End of function disableHdmi(void)
.text:000008CE
.text:000008CE ; ---------------------------------------------------------------------------
.text:000008D0 dword_8D0 DCD 0xC0046D0E ; DATA XREF: disableHdmi(void)+7Ar
.text:000008D4 off_8D4 DCD _GLOBAL_OFFSET_TABLE_ - 0x858
.text:000008D4 ; DATA XREF: disableHdmi(void)+4r
.text:000008D8 off_8D8 DCD hdmi_ptr - 0x10F8 ; DATA XREF: disableHdmi(void)+6r
.text:000008D8 ; disableHdmi(void):loc_8BEr
.text:000008DC off_8DC DCD aDevGraphicsFb1 - 0x862 ; DATA XREF: disableHdmi(void)+Er
.text:000008DC ; "/dev/graphics/fb1"
.text:000008E0 off_8E0 DCD aLogtagFailedTo - 0x864
.text:000008E0 ; DATA XREF: disableHdmi(void)+10r
.text:000008E0 ; "LOGTAG: Failed to open /dev/graphics/fb"...
.text:000008E4 off_8E4 DCD aLogtagCanTRetr - 0x8B0
.text:000008E4 ; DATA XREF: disableHdmi(void)+5Cr
.text:000008E4 ; "LOGTAG: Can't retrieve hdmiInfo!"
.text:000008E8
.text:000008E8 ; =============== S U B R O U T I N E =======================================
.text:000008E8
.text:000008E8
.text:000008E8 sub_8E8 ; DATA XREF: .data:00001124o
.text:000008E8 PUSH {R4,LR}
.text:000008EA LDR R2, [R0]
.text:000008EC LDR R1, =(aComAndroidMusi - 0x8F4)
.text:000008EE LDR R3, [R2,#0x18]
.text:000008F0 ADD R1, PC ; "com/android/music/MediaPlaybackService"
.text:000008F2 BLX R3
.text:000008F4 MOV R4, R0
.text:000008F6 CBNZ R0, loc_8FE
.text:000008F8 LDR R2, =(aLogtagCanTFind - 0x8FE)
.text:000008FA ADD R2, PC ; "LOGTAG: Can't find com/android/music/Me"...
.text:000008FC B loc_90E
.text:000008FE ; ---------------------------------------------------------------------------
.text:000008FE
.text:000008FE loc_8FE ; CODE XREF: sub_8E8+Ej
.text:000008FE BL _Z11disableHdmiv ; disableHdmi(void)
.text:00000902 MOV R4, R0
.text:00000904 CBZ R0, loc_90A
.text:00000906 MOVS R4, #1
.text:00000908 B loc_916
.text:0000090A ; ---------------------------------------------------------------------------
.text:0000090A
.text:0000090A loc_90A ; CODE XREF: sub_8E8+1Cj
.text:0000090A LDR R2, =(aLogtagDisableh - 0x910)
.text:0000090C ADD R2, PC ; "LOGTAG: disableHdmi fail"
.text:0000090E
.text:0000090E loc_90E ; CODE XREF: sub_8E8+14j
.text:0000090E MOVS R0, #6
.text:00000910 MOV R1, R4
.text:00000912 BLX sub_58C
.text:00000916
.text:00000916 loc_916 ; CODE XREF: sub_8E8+20j
.text:00000916 MOV R0, R4
.text:00000918 POP {R4,PC}
.text:00000918 ; End of function sub_8E8
.text:00000918
.text:00000918 ; ---------------------------------------------------------------------------
.text:0000091A DCW 0xBF00
.text:0000091C off_91C DCD aComAndroidMusi - 0x8F4 ; DATA XREF: sub_8E8+4r
.text:0000091C ; "com/android/music/MediaPlaybackService"
.text:00000920 off_920 DCD aLogtagCanTFind - 0x8FE ; DATA XREF: sub_8E8+10r
.text:00000920 ; "LOGTAG: Can't find com/android/music/Me"...
.text:00000924 off_924 DCD aLogtagDisableh - 0x910 ; DATA XREF: sub_8E8:loc_90Ar
.text:00000924 ; .text ends ; "LOGTAG: disableHdmi fail"