2

I am a beginner to android programming and I want to use my personal phone that I use daily to test my programs, but I am not sure if that is a good idea.

Is it possible to somehow corrupt my phone by trying out my programs on it? In what ways might this be possible?

The phone is unrooted; would it be possible in a rooted phone?

  • 3
    In general, you should be ok. But, it really depends on what your program does. You haven't provided much detail. – rrirower Dec 23 '14 at 0:35
  • for now they are just basic things like create activity, create threads, create UI elements, control the microphone and speaker and file handling – user17915 Dec 23 '14 at 2:04
  • the thing is that at this point point I am not sure what kind of work has a potential for corrupting the phone. From what I understand it should not be possible even if I wanted to, since the android OS as well as perhaps some custom features included by the phone manufacturer might prevent user level apps from tampering with the underlying system, but I would like to know about the various scenarios where it might be theoretically possible to corrupt my phone. For example, perhaps if the phone is rooted then I am able write to sections of memory the OS would normally restrict? – user17915 Dec 23 '14 at 2:08
  • or may be the NDK allows me to go to the depths of the hardware layer and corrupt it somehow, even if the phone is not rooted? For the record, the phone I will be working on will not be rooted – user17915 Dec 23 '14 at 2:09
  • Please edit your question with the additional info provided in your comments. So as to make your question complete and fully explained. – HasH_BrowN Dec 23 '14 at 6:59
8

No, you can't. As you surmise, if you root your phone and write programs that use root to change system files or settings that you can't normally change, then you can break the phone that way. The risk is not really any different to running root programs that other people have written. If you don't root the phone, or don't use root in the apps you're writing, then you can only do what any other app might do. You might run the battery down extra quickly, or (if your app has the appropriate permissions) delete pictures, contacts, &c., but debugging your own app won't cause any kind of system corruption or random problems.

4

You can use your Android for development. In fact, you should use your Android device for development. The emulators are OK for very little things, but it's far from being enough.

You can't break your phone if you're doing beginner development and you're not touching system files on the device. In the wooooorst case you would need to format it.

You said you'd work with Java NDK and that doesn't exist. Is Java or NDK. Java it's, well... Java (High level language used by Android). And NDK is the Native Development Kit and that's C and C++ languages (mainly used for game development).

A beginner programmer should start with Java inside Android because of its goodies and development tools.

What are you going to do with the device? The listviews, arrays, images, buttons or anything else you'd use in the development can't break it.

2

There is only one potential risk - I was using several phones to test my apps and I noticed that battery health suffers a lot, especially in older devices.

You should use real phone instead of emulator if you have the chance. Emulators are good, but require a lot of RAM and hardly emulates all the cases you will get on real device.

  • Personally, I disagree with this answer. If you use your phone for testing purposes then you're running your own developed apps in it. If you use your device for non-development related purposes then you are using apps too, but developed by other people. No difference. You ever use apps. If you are programming them correctly, why the battery would drain faster? There's no relation other than the use itself. – Joaquin Iurchuk Jan 6 '15 at 2:29
  • I do not mean battery drain, I mean battery constantly charging (and discharging) and using device hard with battery fully charged. – Nuwisam Jan 6 '15 at 2:30
  • You can use your phone for testing via ADB over network. I do it and it's exactly the same but no wires. All over WiFi. – Joaquin Iurchuk Jan 6 '15 at 12:34
  • Thats really good idea, somehow I never thought about it. Thanks! – Nuwisam Jan 6 '15 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.