Domanda

I try to understand how this works:

  • When I create an android app and run it from Eclipse, Eclipse takes care of generating the apk file and uses adb to install it on the phone correct?
  • When I have an .apk file that I try to push on the phone and use ADB directly in a command line by calling adb install myApp.apk I can't because my phone isn't rooted?

How does Eclipse manages to install apps then? Is there a way to install from an .apk file on a device without having it rooted ? Obviously Eclipse is able to.

Thanks for any information that may help clarifying this. David

È stato utile?

Soluzione

So the really short answer to your question; You don't need to be rooted to use ADB, all android phones can use ADB without being rooted.

Also, the only reason you would need root is to mess with things on the system level, when installing a regular app you are just installing it like a regular application (to the data partition). Eclipse installs the app using ADB actually, so pushing an app using ADB is the same as installing it through eclipse.

You don't need to be rooted to use ADB, all android phones can use ADB without being rooted. You must be rooted to push applications to /system/apps/ to make them system applications. Also if you download a file explorer like ES File Explorer to your phone, you can transfer an apk file to your phones storage and using a file explorer (I really do recommend ES File Explorer) you can install that app.

Also just a tip, to use ADB command line you must enable ADB on your phone in developer settings.

  1. Go to the settings menu, and scroll down to "About phone." Tap it. Scroll down to the bottom again, where you see "Build number."

  2. Tap it seven (7) times. After the third tap, you'll see a dialog that says you're four taps away from being a developer. Keep on tapping and the developer settings will show up in the settings app. There you can turn on ADB.

Hope this helps.

Further Reading: http://developer.android.com/tools/help/adb.html http://www.androidcentral.com/how-enable-developer-settings-android-42

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top