Contribution : Android SDK Installer

32 views
Skip to first unread message

snpe

unread,
Nov 21, 2010, 8:35:29 AM11/21/10
to Android Contributors
Hi,

I have made Android SDK Installer as described in thread
http://groups.google.com/group/android-contrib/t/99293cd39f429cfc
It made as separate plugin (for now). See http://code.google.com/p/adt-addons/.
Shortly, you can try it using the
https://adt-addons.googlecode.com/svn/trunk/installer/com.android.ide.eclipse.installer.update/
update site (ADT plugin will be also downloaded if it doesn't exist).
The source code is on http://adt-addons.googlecode.com/svn/trunk/installer/
.

The plugin work as follows:

There is the org.eclipse.ui.startup ext. point. This class checks if
Android SDK preferences is empty and if so, show the Android SDK
Installer dialog - http://www.snpe.rs/androidsdkdialog.png
The user can set an existing ADK environment, download the latest SDK
Tools and platform or ignore dialog.

The "Hello, world" Eclipse cheat-sheet is bonus.

Would you like me to contribute (adapt) this feature ?

Regards,
Peco

Rafiul Sabbir

unread,
Nov 22, 2010, 11:49:02 AM11/22/10
to android...@googlegroups.com
I'm new in android & want to know in details about the installation.Can you please let me know this clearly so that I can install all the important things easily? It takes too much time to install all the things(SDK,API,Google API,SDK Tools etc etc),can you say me any short way to install all these?

If yes,please let me know :)
--
Sincerely;
Rafiul Sabbir
United International University
Dhanmondi,Dhaka
+8801915686454

That's not a dream you see when u asleep,that's the dream which makes you sleepless

snpe

unread,
Nov 22, 2010, 12:41:23 PM11/22/10
to Android Contributors
Hi Rafiul,

You can follows these steps:

1) Install Eclipse for your platform from: http://www.eclipse.org/downloads/
Recommended : Eclipse IDE for Java Developers

2) unpack archive and start Eclipse executable

3) select Help>Install New Software

4) in the Install dialog click Add

5) in the Add Repository dialog enter
Name : Android SDK Installer
Location: https://adt-addons.googlecode.com/svn/trunk/installer/com.android.ide.eclipse.installer.update/
and click OK

6) select Android SDK Installer in the "Work with:" combo

7) uncheck "Group items by category"

8) check "Android SDK Installer"

Click Next

10) click Next on the "Install Details" dialog

11) accept the terms of the license agreements and click Finish

12) accept installing unsigned plugin when you asked

13) restart Eclipse when you asked

Note: ADT plugin and their requirements will be downloaded
automatically

14) after restarting you will got dialog http://www.snpe.rs/androidsdkdialog.png

15) click Install

It will download SDK tools 7, Android SDK 2.2 platform and create
default AVD.

Note: Google Maps API, Samples, Documentation, Windows USB drivers
won't be downloaded, but I can add them if it is interested.
For now, you can download them (as well as additional platforms) using
Android SDK and AVD manager from ADT plugin

16) Close the dialog

17) call Help>Cheat Sheets...>Android Development>Hello, world

and follow instruction in the Cheat Sheets view.

The tutorial will create the Hello, world android application for you,
show you base concepts, start android application on emulator, set
breakpoint, debug android application etc

Regards,
Peco


On Nov 22, 5:49 pm, Rafiul Sabbir <oparth...@gmail.com> wrote:
> I'm new in android & want to know in details about the installation.Can you
> please let me know this clearly so that I can install all the important
> things easily? It takes too much time to install all the
> things(SDK,API,Google API,SDK Tools etc etc),can you say me any short way to
> install all these?
>
> If yes,please let me know :)
>
>
>
> On Sun, Nov 21, 2010 at 7:35 PM, snpe <snp...@gmail.com> wrote:
> > Hi,
>
> > I have made Android SDK Installer as described in thread
> >http://groups.google.com/group/android-contrib/t/99293cd39f429cfc
> > It made as separate plugin (for now). See
> >http://code.google.com/p/adt-addons/.
> > Shortly, you can try it using the
>
> >https://adt-addons.googlecode.com/svn/trunk/installer/com.android.ide...
> > update site (ADT plugin will be also downloaded if it doesn't exist).
> > The source code is on
> >http://adt-addons.googlecode.com/svn/trunk/installer/
> > .
>
> > The plugin work as follows:
>
> > There is the org.eclipse.ui.startup ext. point. This class checks if
> > Android SDK preferences is empty and if so, show the Android SDK
> > Installer dialog -http://www.snpe.rs/androidsdkdialog.png

Xavier Ducrohet

unread,
Nov 24, 2010, 8:47:41 PM11/24/10
to android...@googlegroups.com
Hi!

This is definitively somewhere we want to go.
I haven't looked at your code and can't unless you upload it for review.

I think the UI should probably display the available platforms and let
the user choose which one(s) to install.

Creating a default AVD is a tricky business, there's too many open
preferences, so I would probably leave that out for now and focus on
installing the tools, and platform(s).

Are you re-using classes of sdklib.jar to do the actual install?

Xav

--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. Thanks!

snpe

unread,
Nov 25, 2010, 10:48:20 AM11/25/10
to Android Contributors
Hi Xavier,

On Nov 25, 2:47 am, Xavier Ducrohet <x...@android.com> wrote:
> Hi!
>
> This is definitively somewhere we want to go.
> I haven't looked at your code and can't unless you upload it for review.

Will do it ASAP. Could a please answer me a few question below ?

Do you want change against tools_r8 or against master ?

>
> I think the UI should probably display the available platforms and let
> the user choose which one(s) to install.
>

Will add them.
However, I thought to create simple UI with minimal artifacts
(tools,the latest platform and AVD) for beginners to easy start. A lot
platforms can confuse the beginners. The user can add other platforms
and drivers later using SDK and AVD manager. The Android SDK Installer
dialog have button to call SDK and AVD manager in order to install
other platforms.

> Creating a default AVD is a tricky business, there's too many open
> preferences, so I would probably leave that out for now and focus on
> installing the tools, and platform(s).
>

I have created some AVD, because Hello World cheat sheet requires at
least one AVD.
The user can select to doesn't create it.
IMO, this cheat sheet looks great for beginners. Please look at
http://screencast.com/t/ODYxNTk5Z.
I also planned to add NotePad tutorial.
Would you like me to add the Hello world cheat sheet at all ?

BTW Intelli jIDEA Android plugin create AVD when it is required.

> Are you re-using classes of sdklib.jar to do the actual install?
>

Yes, I have added sdklib.jar and sdkuilib.jar to my plugin. I need
both sdklib.jar and sdkuilib.jar because ADT doesn't export these
packages.
Could I make this feature in separate plugin or integrate to ADT? If
you want me to make separate plugin can I add export packages
declaration for sdk and sdkui in ADT's manifest ?

BTW It would be nice if it is possible to have tools r8 zip before
releasing. I can make it and if it is same as tools in repository,
then it isn't necessary.

Thanks,
Peco

> Xav
>
>
>
> On Sun, Nov 21, 2010 at 5:35 AM, snpe <snp...@gmail.com> wrote:
> > Hi,
>
> > I have made Android SDK Installer as described in thread
> >http://groups.google.com/group/android-contrib/t/99293cd39f429cfc
> > It made as separate plugin (for now). Seehttp://code.google.com/p/adt-addons/.
> > Shortly, you can try it using the
> >https://adt-addons.googlecode.com/svn/trunk/installer/com.android.ide...
> > update site (ADT plugin will be also downloaded if it doesn't exist).
> > The source code is onhttp://adt-addons.googlecode.com/svn/trunk/installer/
> > .
>
> > The plugin work as follows:
>
> > There is the org.eclipse.ui.startup ext. point. This class checks if
> > Android SDK preferences is empty and if so, show the Android SDK
> > Installer dialog -http://www.snpe.rs/androidsdkdialog.png

Xavier Ducrohet

unread,
Nov 30, 2010, 2:05:06 PM11/30/10
to android...@googlegroups.com
On Thu, Nov 25, 2010 at 7:48 AM, snpe <snp...@gmail.com> wrote:
> Hi Xavier,
>
> On Nov 25, 2:47 am, Xavier Ducrohet <x...@android.com> wrote:
>> Hi!
>>
>> This is definitively somewhere we want to go.
>> I haven't looked at your code and can't unless you upload it for review.
>
> Will do it ASAP. Could a please answer me a few question below ?
>
> Do you want change against tools_r8 or against master ?

Always master.

> I have created some AVD, because Hello World cheat sheet requires at
> least one AVD.
> The user can select to doesn't create it.
> IMO, this cheat sheet looks great for beginners. Please look at
> http://screencast.com/t/ODYxNTk5Z.
> I also planned to add NotePad tutorial.
> Would you like me to add the Hello world cheat sheet at all ?
>
> BTW Intelli jIDEA Android plugin create AVD when it is required.

I agree that we should improve that workflow. However, creating a
random AVD that may not be the one the user choose is not necessarily
the right thing to do, imo.

While I do realize it would be nice to not have to think about Android
targets when starting Android development, I think it might be a
disservice to beginners to completely hide this from them (even if
it's just at first).

I'd rather have a wizard of sort that drives them while making their
first AVD. This wizard could pop-up the first time an AVD is needed
and there isn't one.

>> Are you re-using classes of sdklib.jar to do the actual install?
>>
>
> Yes, I have added sdklib.jar and sdkuilib.jar to my plugin. I need
> both sdklib.jar and sdkuilib.jar because ADT doesn't export these
> packages.
> Could I make this feature in separate plugin or integrate to ADT? If
> you want me to make separate plugin can I add export packages
> declaration for sdk and sdkui in ADT's manifest ?

inside ADT would be fine.

> BTW It would be nice if it is possible to have tools r8 zip before
> releasing. I can make it and if it is same as tools in repository,
> then it isn't necessary.

I'm not sure what you need there?

Xav

snpe

unread,
Nov 30, 2010, 2:50:30 PM11/30/10
to Android Contributors
> I'd rather have a wizard of sort that drives them while making their
> first AVD. This wizard could pop-up the first time an AVD is needed
> and there isn't one.

OK. I will change Hello world cheat sheet that enable user to create
some AVD.
Would you like me to contribute this cheat sheet ?

>> BTW It would be nice if it is possible to have tools r8 zip before
>> releasing. I can make it and if it is same as tools in repository,
>> then it isn't necessary.

>I'm not sure what you need there?

I found Tools SDK in Google repository (https://dl-ssl.google.com/
android/repository/repository.xml) and parsed file with RepoSource
class.
Google repository contains the tools_r07-<OS>.zip. This file is
similar to http://dl.google.com/android/android-sdk_r07-<OS>.zip, but
they aren't same.
https://dl-ssl.google.com/android/repository/tools_r07-<OS>.zip
contains only the tools directory and I have to create the platforms,
add-ons and temp directories in order to install the latest platform
SDK. It works fine for Tools SDK 7 because these directories are
empty . However, Tools 8 changes this structure (there is the platform-
tools directory and it isn't empty). I know the structure of Tools SDK
which built from source (https://dl-ssl.google.com/android/repository/
tools_r08-<OS>.zip), but I don't know what will you set to
https://dl-ssl.google.com/android/repository/tools_r08-<OS>.zip when
Tools SDK 8 be released.
Because of that I can't make reliable test for Tools SDK 8. I suppose
that ToolArchive.install(...) will make correct structure, but it
would be nice when I could test it before releasing.

Xavier Ducrohet

unread,
Nov 30, 2010, 4:52:06 PM11/30/10
to android...@googlegroups.com
On Tue, Nov 30, 2010 at 11:50 AM, snpe <snp...@gmail.com> wrote:
>> I'd rather have a wizard of sort that drives them while making their
>> first AVD. This wizard could pop-up the first time an AVD is needed
>> and there isn't one.
>
> OK. I will change Hello world cheat sheet that enable user to create
> some AVD.
> Would you like me to contribute this cheat sheet ?

Hmm this is kind of cool. We would probably need to have our doc
writers take a look at the content though (unless you grabbed it from
developer.android.com already?)

>>> BTW It would be nice if it is possible to have tools r8 zip before
>>> releasing. I can make it and if it is same as tools in repository,
>>> then it isn't necessary.
>
>>I'm not sure what you need there?
>
> I found Tools SDK in Google repository (https://dl-ssl.google.com/
> android/repository/repository.xml) and parsed file with RepoSource
> class.
> Google repository contains the tools_r07-<OS>.zip. This file is
> similar to http://dl.google.com/android/android-sdk_r07-<OS>.zip, but
> they aren't same.
> https://dl-ssl.google.com/android/repository/tools_r07-<OS>.zip
> contains only the tools directory and I have to create the platforms,
> add-ons and temp directories in order to install the latest platform
> SDK. It works fine for Tools SDK 7 because these directories are
> empty . However, Tools 8 changes this structure (there is the platform-
> tools directory and it isn't empty). I know the structure of Tools SDK
> which built from source (https://dl-ssl.google.com/android/repository/
> tools_r08-<OS>.zip), but I don't know what will you set to
> https://dl-ssl.google.com/android/repository/tools_r08-<OS>.zip when
> Tools SDK 8 be released.
> Because of that I can't make reliable test for Tools SDK 8. I suppose
> that ToolArchive.install(...) will make correct structure, but it
> would be nice when I could test it before releasing.


ah I see, and that's a good point.

The file at http://dl.google.com/android/android-sdk_r07-<OS>.zip is
the full archive, meant to be manually downloaded, while anything in
the repo is only the component itself, thus the tools folder only.

First, we should download from the repository always.

Then, I think we may update the SDK Updater part to create folder if
they don't exist (if it doesn't already do it, I'd have to check).
All you should do is create the main SDK folder and install stuff into it.

- tools, docs and platform-tools should be installed always, no need
to show these packages to the user.
- platforms, add-ons, samples should be selectable by the user.

Raphaël Moll

unread,
Nov 30, 2010, 6:10:23 PM11/30/10
to android...@googlegroups.com
No, ToolArchive won't create the structure.

 
ah I see, and that's a good point.

The file at http://dl.google.com/android/android-sdk_r07-<OS>.zip is
the full archive, meant to be manually downloaded, while anything in
the repo is only the component itself, thus the tools folder only.

Then, I think we may update the SDK Updater part to create folder if
they don't exist (if it doesn't already do it, I'd have to check).
All you should do is create the main SDK folder and install stuff into it.

It currently requires the SDK directory to at least have a "platforms" and an "add-ons" folder, even if empty.
That's because historically we used that hint to detect the SDK folder. We're not really using this anymore, so we should remove that.

 
- tools, docs and platform-tools should be installed always, no need
to show these packages to the user.
- platforms, add-ons, samples should be selectable by the user.

Although a "newbie" workflow would be to allow them to simply get the latest platform available. I want to redo/simplify the sdk manager some day and that was one of my ideas.

That said, I kind of lost track in this thread of the original goal, what are you trying to achieve. I'm not against changing part of the install workflow to make it easier to reuse.

R/

snpe

unread,
Nov 30, 2010, 5:09:18 PM11/30/10
to Android Contributors


On Nov 30, 10:52 pm, Xavier Ducrohet <x...@android.com> wrote:
> On Tue, Nov 30, 2010 at 11:50 AM, snpe <snp...@gmail.com> wrote:
> >> I'd rather have a wizard of sort that drives them while making their
> >> first AVD. This wizard could pop-up the first time an AVD is needed
> >> and there isn't one.
>
> > OK. I will change Hello world cheat sheet that enable user to create
> > some AVD.
> > Would you like me to contribute this cheat sheet ?
>
> Hmm this is kind of cool. We would probably need to have our doc
> writers take a look at the content though (unless you grabbed it from
> developer.android.com already?)
>
>

It is based on http://developer.android.com/intl/fr/resources/tutorials/hello-world.html
You can check content on
http://adt-addons.googlecode.com/svn/trunk/installer/com.android.ide.eclipse.cheatsheets/cheatsheets/helloworld.xml
It would be better if this cheat sheet (and some future) would be in
separate plugin. Correct ?

>
> >>> BTW It would be nice if it is possible to have tools r8 zip before
> >>> releasing. I can make it and if it is same as tools in repository,
> >>> then it isn't necessary.
>
> >>I'm not sure what you need there?
>
> > I found Tools SDK in Google repository (https://dl-ssl.google.com/
> > android/repository/repository.xml) and parsed file with RepoSource
> > class.
> > Google repository contains the tools_r07-<OS>.zip. This file is
> > similar tohttp://dl.google.com/android/android-sdk_r07-<OS>.zip, but
> > they aren't same.
> >https://dl-ssl.google.com/android/repository/tools_r07-<OS>.zip
> > contains only the tools directory and I have to create the platforms,
> > add-ons and temp directories in order to install the latest platform
> > SDK. It works fine for Tools SDK 7 because these directories are
> > empty . However, Tools 8 changes this structure (there is the platform-
> > tools directory and it isn't empty). I know the structure of Tools SDK
> > which built from source (https://dl-ssl.google.com/android/repository/
> > tools_r08-<OS>.zip), but I don't know what will you set to
> >https://dl-ssl.google.com/android/repository/tools_r08-<OS>.zip when
> > Tools SDK 8 be released.
> > Because of that I can't make reliable test for Tools SDK 8. I suppose
> > that ToolArchive.install(...) will make correct structure, but it
> > would be nice when I could test it before releasing.
>
> ah I see, and that's a good point.
>
> The file athttp://dl.google.com/android/android-sdk_r07-<OS>.zip is
> the full archive, meant to be manually downloaded, while anything in
> the repo is only the component itself, thus the tools folder only.
>
> First, we should download from the repository always.
>
> Then, I think we may update the SDK Updater part to create folder if
> they don't exist (if it doesn't already do it, I'd have to check).
> All you should do is create the main SDK folder and install stuff into it.
>
> - tools, docs and platform-tools should be installed always, no need
> to show these packages to the user.
> - platforms, add-ons, samples should be selectable by the user.
>

OK

Haris Peco

unread,
Nov 30, 2010, 7:23:21 PM11/30/10
to Android Contributors
> No, ToolArchive won't create the structure.

toolArchive.install(sdkFolder ...) unpacks
https://dl-ssl.google.com/android/repository/tools_r07-<OS>.zip to the
$sdkFolder/tools directory.
It is easy because SDK Tools 7 have content in only one directory (tools)
Tools SDK 8 have content in tools and platform-tools directories. I
hope that calling
toolArchive.install(sdkFolder...) will unpack Tools SDK content correctly to :
$sdkFolder/tools and $sdkFolder/platform-tools
If it would be work on this way, I won't have to change code after
releasing SDK Tools. SDK Updater would be have to do that. It have to
update tools and platform-tools.
Other folder are empty and they can be created.

Anyway, I will create a change with this assumption. It could be
change when SDK tools 8 be released.

Regards,
Peco

snpe

unread,
Nov 30, 2010, 7:35:46 PM11/30/10
to Android Contributors


On Dec 1, 12:10 am, Raphaël Moll <r...@android.com> wrote:
....
> Although a "newbie" workflow would be to allow them to simply get the latest
> platform available. I want to redo/simplify the sdk manager some day and
> that was one of my ideas.
>
> That said, I kind of lost track in this thread of the original goal, what
> are you trying to achieve. I'm not against changing part of the install
> workflow to make it easier to reuse.
>
> R/

I am not sure if I understand, but you can try start with pure Eclipse
Helios SR1 for Java Developers, update SDK Installer using the
https://adt-addons.googlecode.com/svn/trunk/installer/com.android.ide.eclipse.installer.update/
update site (you don't need any other update site; it will find ADT
0.9.9 correctly) and restart Eclipse.
If you install SDK, when Installer SDK dialog ask you, you can follows
Hello, world cheat sheet.
You need add one update site and a few clicks to start developing an
Android application.

I don't request any change in SDK updater, I just don't know how it
will work with Tools SDK 8 (who knows? :) )

Regards,
Peco

Xavier Ducrohet

unread,
Nov 30, 2010, 7:47:30 PM11/30/10
to android...@googlegroups.com
oh you missed something.

The platform-tools folder will be its own component. The tools package
from the repository will not contain the platform-tools.
So all you have to do is download both the tools component and the
platform-tools component.

Xav

--

snpe

unread,
Dec 1, 2010, 4:46:02 AM12/1/10
to Android Contributors
Great.
I have seen ADT 0.9.9 that doesn't contain PlatformToolPackage.
Will create change ASAP

Thanks,
Peco

Xavier Ducrohet

unread,
Dec 1, 2010, 1:52:25 PM12/1/10
to android...@googlegroups.com
oh yeah this is in adt 8.0.0 and beyond only.

snpe

unread,
Dec 5, 2010, 10:23:18 AM12/5/10
to Android Contributors
Xavier, Raphaël,

I have add the https://review.source.android.com/#change,19332.

Please tell me if you want me to add the Hello, world cheat sheet.

Regards,
Peco
Reply all
Reply to author
Forward
0 new messages