Hi, Mioze7Ae,
I've build mtd-hack.ko. I'll test it then edit it and re-build it.
Thank you for your instructions!
Edit1:
I've tested. The new part-STR.ko works on my Xt711.
Now, I'm trying to edit it.
Edit2:
I found it's useless after adding mark_logo_writeable() , so I want to debug using adb logcat.
But the logcat can't be used in openrecovery.
It says '/sbin/bash: line 0: exec: logcat: not found'.
I don't know how to handle this.
So I googled, find a linux command 'dmesg' and debug with it.
I found when mtd_init calls mark_logo_writeable(), the logo partition is still unvisible because it is hidden on XT711. So I put mark_logo_writeable() before return.
The final code is below:
Code:
erase /* and */ /* cdt arg */ from this line to mount logo partition:
{ mtd_hack_part( 640, 6784, "logo", MTD_RO ) },
Code:
static int __init mtd_init(void)
{
struct device_driver *devdrv;
int err = 0;
mark_boot_writeable();
devdrv = driver_find("omap2-nand", &platform_bus_type);
printk(KERN_INFO "mtd-hack: found driver %s modname %s\n", devdrv->name, devdrv->mod_name);
err = driver_for_each_device(devdrv, NULL, NULL, create_missing_flash_parts);
printk(KERN_INFO "mtd hack loaded");
mark_logo_writeable(); //move to here!
return 0;
}
And I've changed the moto logo to apple logo, great thanks to Mioze7Ae!