开发者

Is there any reason to root for developing apps?

Just as the question says. I was curious because my development phone will also be m开发者_JAVA技巧y everyday phone (Galaxy S2) so of course I would want to be sure I'm voiding my warranty for a good reason.

Is it also simple to reverse roots without bricking the phone. Will unrooting be detectable, or will it look as it did beforehand? Also, what does unrooting do to installed apps that require root? Are they merely unable to launch until the phone is rooted again?


I have two phones that I use when developing at work: my personal phone (an EVO) and a phone my employer bought (a Fascinate). I spend most of my time developing and testing on my EVO because it's rooted. The main thing that you lose without root is that you can't access /data, which can be a pain when debugging. Root also lets you easily install busybox from the Market, which contains a lot of useful tools (like grep and cp).

As an example: if you save any data to your app's default file directory, it will live in /data/data/<package_name>/files. Trying to debug an issue when loading data that's stored in a file gets hugely obnoxious when you can't actually see the contents of the file, but you won't have permission to view it without root. The same is true of any databases that you create for an app (they live in /data/data/<package_name>/databases by default).

So in my personal/professional opinion, it's helpful to have at least one rooted device for development so that you can access files and directories you would otherwise not have permission to see.


eldarerathis has sufficiently answered your title question, I think, so let me address the rest.

The Galaxy S II is quite easy to unroot, largely because of a tool called Odin. You can flash the original unrooted firmware easily and blow away everything currently on the phone (see this XDA guide). It can be unrooted via other methods that leave all of your data and apps intact, as well (see this root/unroot method over on XDA).

Unrooting does absolutely nothing to apps that use root. Some will fail, some will tell you they can't be used, others will work until you try to do something that requires root. They can all be launched, since launching doesn't require root.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜