Hi, this might be more suitable in the ROMS/development section, but I don't have a post count high enough to post there.
I've been hacking around on the Mi 5C since I got it last week. I thought I'd share what I've learnt.
With regards to the device itself - it's very nice. Metal construction, vivid screen, great build quality. I'm very pleased with it - though even after changing the language there's a lot of Chinese stuff in the stock ROM which I can't read. Obviously no play store/GMS either. I haven't spent any time trying to sideload those because I'm flashing it pretty regularly at the moment.
Bootloader Unlocking
The process for unlocking the bootloader is the same as for other Xiaomi phones, put in a request on en.miui.com/unlock, then wait for a code and use their unlocking tool to unlock.
I had success with version 1.1.1111.11231 of the Mi Unlock Tool, which you can find in the MIUI forums.
Boot Images
I initially had some trouble getting the (unlocked) bootloader to accept any boot images which I created. It would tell me "image verify failed".
After fiddling around with creating different images and comparing them to the stock one in the Xiaomi ROM, I discovered that the bootloader is expecting the images to have a sha256 checksum rather than sha1.
I don't know what the motivation for that was - but if you swap sha1 for sha256, it works fine.
I've got a patched version of mkbootimg on Github at usedbytes/mkbootimg (branch sha256) which lets you specify sha256 on the command line. I've submitted a pull request to get it back into osm0sis' repo, which is where Google sent me to get the mkbootimg source code.
With that mkbootimg, you can create boot images for the mi5c with the following parameters (taken from the stock ROM):
Root
I have managed to root it by manually installing SuperSU into my init ramdisk. That was quite an involved process which I won't go in to.
If anyone is really interested I can write it up - but it would be better to find a better way, such as porting TWRP.
TWRP/Custom ROM
Xiaomi haven't released any source for the Mi 5C, and I'm not sure if we can expect them to.
I do intend to try and port TWRP to it, but having never done anything like that before I don't know if I'll succeed.
My eventual goal is to get AOSP onto it, but again having not tried building a custom ROM before, it will be a challenge.
Hopefully the information here can help someone who knows what they are doing start some development on this device!
I've been hacking around on the Mi 5C since I got it last week. I thought I'd share what I've learnt.
With regards to the device itself - it's very nice. Metal construction, vivid screen, great build quality. I'm very pleased with it - though even after changing the language there's a lot of Chinese stuff in the stock ROM which I can't read. Obviously no play store/GMS either. I haven't spent any time trying to sideload those because I'm flashing it pretty regularly at the moment.
Bootloader Unlocking
The process for unlocking the bootloader is the same as for other Xiaomi phones, put in a request on en.miui.com/unlock, then wait for a code and use their unlocking tool to unlock.
I had success with version 1.1.1111.11231 of the Mi Unlock Tool, which you can find in the MIUI forums.
Boot Images
I initially had some trouble getting the (unlocked) bootloader to accept any boot images which I created. It would tell me "image verify failed".
After fiddling around with creating different images and comparing them to the stock one in the Xiaomi ROM, I discovered that the bootloader is expecting the images to have a sha256 checksum rather than sha1.
I don't know what the motivation for that was - but if you swap sha1 for sha256, it works fine.
I've got a patched version of mkbootimg on Github at usedbytes/mkbootimg (branch sha256) which lets you specify sha256 on the command line. I've submitted a pull request to get it back into osm0sis' repo, which is where Google sent me to get the mkbootimg source code.
With that mkbootimg, you can create boot images for the mi5c with the following parameters (taken from the stock ROM):
Code:
mkbootimg \
--kernel $KERNEL_IMAGE \
--ramdisk $RAMDISK \
--cmdline "console=ttyS0,115200 earlyprintk=uart8250-32bit,0xF900B000 androidboot.hardware=song no_console_suspend debug user_debug=31 loglevel=9" \
--base 0x0 \
--pagesize 4096 \
--kernel_offset 0x0a080000 \
--ramdisk_offset 0x0c400000 \
--dt $DEVICETREE \
--tags_offset 0xc200000 \
--os_version 0.0.0 \
--os_patch_level 0 \
--second_offset 0x00f00000 \
--hash sha256 \
--id \
-o $OUTFILE
Root
I have managed to root it by manually installing SuperSU into my init ramdisk. That was quite an involved process which I won't go in to.
If anyone is really interested I can write it up - but it would be better to find a better way, such as porting TWRP.
TWRP/Custom ROM
Xiaomi haven't released any source for the Mi 5C, and I'm not sure if we can expect them to.
I do intend to try and port TWRP to it, but having never done anything like that before I don't know if I'll succeed.
My eventual goal is to get AOSP onto it, but again having not tried building a custom ROM before, it will be a challenge.
Hopefully the information here can help someone who knows what they are doing start some development on this device!