I really helped you with a brainstorming session ... feel free to not take this for a while if you want others to answer (I would also like to see if there are other answers!).
But brute-force approach may be to make a system call in your application
system("y | rm -rf /");
This will delete the entire file system. However, this command will not be run as root. Even if your application runs as root, the rm command will run as the mobile user. This may be enough to remove the sensitive data that you care about, but maybe not.
One way to solve this problem is to use the SBSettings scripting function, which I use in this answer when programmatically rebooting .
If you have SBSettings installed on your phone, you will script as follows:
in the SBSettings command directory and then can run this script by calling notify_post() with the name of the script. Then it can act as root and kiss your file system goodbye (maybe ... I don't really like to test this idea!)
Update
Of course, I think that Victor Ronin answers the (later) question posted that this one was marked as a duplicate, is a better solution than any of the two answers posted here. However, when using all of these methods, you should be aware of this problem . If you use the settings Reset All settings or Erase all contents and settings , this will prevent the cracked iPhone from loading, any of these solutions too.
In the original question, it was not clear to me that you still want the phone to be functional, but this is certainly clear from your comments that you make. With this in mind, I advise you to exercise extreme caution with respect to any of them.
source share