anessen973383701 has quit [Ping timeout: 260 seconds]
Guest37 has joined #linux-amlogic
Guest37 has quit [Client Quit]
GXL-BL2 has joined #linux-amlogic
<GXL-BL2>
Hi, has anyone managed to load/disassemble 2019 Amlogic GXL BL2 that is compiled with AArch32? I dont think IDA/Ghidra is handling it well.
<f_>
GXL-BL2: I never bothered
<f_>
But when I tried just setting arch correctly did the trick
<f_>
in any case I just went with the older AArch64 ones
<f_>
given they seemed to be working just fine
<f_>
GXL-BL2: why? Is there something in AArch32 bl2 that's not in the older AArch64 BL2? Well, there are obviously differences, but I'm interested to know which you're interested in
<GXL-BL2>
Thank you for your reply
<f_>
you're welcome!
<GXL-BL2>
im currently working on rooting xiaomi android box. its with gxl. My goal is to modify BL2 (disable Secure Boot and Anti Roll Back)
<f_>
Which box is it?
<GXL-BL2>
Current state is that, I am able to run unsigned code with BL0 exploit, Already decrypted BL2 with dumped AES256 key
<GXL-BL2>
MDZ-16-AB
<f_>
xiaomi-once/mi box 3?
<f_>
(also, it's BL1, BL0 isn't a thing in amlogic world)
<GXL-BL2>
correct. thanks for pointing, ill say BL1 from now on ;)
<f_>
I did do that kind of stuff on a Mi TV Stick before
<f_>
but I didn't bother modifying BL2, instead I used my wip u-boot-spl thing with adjustments to work on TV Stick
<f_>
that, coupled with mainline u-boot and mainline tf-a BL31 as well as some bl30 from some radxa repo, made me able to boot
<f_>
but I didn't do anything wrt android, for these experiments I just dumped the eMMC for research and wiped the whole thing
<f_>
(because frankly I'm not interested in working with android)
<GXL-BL2>
my goal is to root it while BL32 (TEE) is in function as well. To do this, I need to modify BL2. I only worked on latest BL2 which is compiled with AArch32. Maybe I should check older firmware's BL2
<GXL-BL2>
so I was hoping to be able to disassemble it properly so I can edit them but it seems to be not able to do it with IDA/Ghidra somehow
<GXL-BL2>
it just cant reference any strings
<GXL-BL2>
I just checked oldest firmware that I can get for the target. Its still compiled with AArch32, damn it :(
<f_>
Anyway I never bothered with TEE/BL32, it's not needed to boot, and all I wanted was for it to boot, so I just didn't use it
<f_>
All of the secureboot checks are done in BL1 and BL2, so if you manage to get BL1 to load whatever you want as BL2 and you remove BL2's secureboot checking abilities (or just replace it completely) you can have lots of fun
<f_>
Not even the SCP checks its firmware's signature and such before running it, so you can go nuts and pick whatever BL30.bin you want (provided it works for your board)
<GXL-BL2>
Yes that is my goal. unfortunately, aarch32 is stopping me from disassembling, making my life to hard to patch BL2
<f_>
GXL-BL2: can you tell me which params did you tell ghidra
<GXL-BL2>
"It looks like this was made to save a bit of space somehow?" When I checked BL1 of GXL, it had hardcoded max size of 0xC000, so i guess they really needed extra space
<f_>
In theory BL1 only reads 0xc000
<f_>
in practise you only have 0xb000 available
<GXL-BL2>
because of 0x1000 @AML Header right?
<f_>
yep
<f_>
well, the @AML header itself isn't really 0x1000 long
<f_>
but there's that padding for alignement
<f_>
the bootrom loads everything in one go
<GXL-BL2>
yeap yeap, and for ghida question, i mostly use IDA, ghidra is just for backup.
<f_>
Oh, ok. I'm not familiar with IDA, always used ghidra
<GXL-BL2>
i should get close with Ghidra haha
<f_>
but like, my aquaman-bl2 dump which is AArch32 bl2 (and a very new version, even), just setting aarch32 and the correct base address (0xd9001000) did the trick