I found a code to do factory reset function.
But it seems does not allow the 3rd applicaiton to do it.
My role is not the manufacture, so I won't have the signature key of the os.
I am curios if it is possible to install the application to the system particiation under the user's permission.
Or the user need to grant the root permission to install the app by itself.
http://android.git.kernel.org/?p=platfo ... 46b114aaa7
892 android:protectionLevel="signatureOrSystem" />