I have two android phones, one rooted the other not. When I run following code without asking for root permission on the two phones,
system("echo \"abc\" > /data/a.txt\n");
the rooted phone returns me error-2 (512); the normal phone returns error-1 (256, permission denied). So my question is, what makes this difference.