View Single Post
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#694
Originally Posted by gemfield View Post
Thanks for your answer.
1, My N9 is in closed mode. in order to use ubiboot, now I am learning to be familiar with the N9 OS
2, Here is my code:
RM696-21-3_PR_003:~# cat mtd.c
3, Here is the result:
RM696-21-3_PR_003:~# gcc mtd.c -o mtd
RM696-21-3_PR_003:~#./mtd
4, Seems that there have no warning or error, but mtd0 data is still old(i.e. write to mtd0 failed in fact).

5, What is the reason that write to mtd0 looks success but in fact failed?
6, If I reboot my N9, any risk here?

Thanks.
Ah, I see you are really delibrately trying to write into mtd0. Risque, that is

Well, for starters, even as you are in Closed Mode, you do not have enought credentials to do what you're after.
The device has pretty good safeguards against that, so even as you run that code as root it still will fail silently due to missing credentials. Now, if you do want to destroy your device permanently, you can run your code under Inception to gain privilidges to make the write happen for real.

As for booting the device now, you should be safe as your code did not really modify mtd0.