I just spent several days trying to get the android sdk installed and running on my linux box, and I ran into quite a few problems that I couldn't find answers to on the web sites. Ultimately, I "scaled back my programming environment" to a minimal set and found that everything worked; however, here is a summary of problems that I encountered which point out deficiencies in the installation instructions and some bugs in the sdk.
First, there are network connection issues when using the dl- ssl.google.com/android/repository/repository.xml repo. Whether or not I selected the "force http" option, downloads from this site from within the "Android SDK and AVD Manager" application were unacceptably slow, i.e. rates < 0.5 kbps over a lightly used 10 Mbps cablemodem. I suspect this had something to do with one or more firewalls on my local network, but I could find no mention in the android developers group from others who may have had the same problem. I resolved this problem by downloading the archives using wget on a colo machine, and then ftp'ing those files to my local workstation. Once that hurdle had been crossed, it took quite a while to find that the archives simply needed to be unzipped in one of three locations, as follows. In ~/android-sdk-linux/platforms/ use the following commands: % unzip android-1.1_r1-linux.zip ; mv android-1.1_r1-linux android-1.1 % unzip android-1.5_r03-linux_x86.zip ; mv android-1.5_r03- linux_x86 android-1.5 % unzip android-1.6_r01-linux_x86.zip ; mv android-1.6_r01- linux_x86 android-1.6 % unzip android-2.0_r01-linux.zip ; mv android-2.0_r01-linux.zip android-2.0 In ~/android-sdk-linux/ % unzip docs-2.0_r01-linux.zip ; mv docs-2.0_r01-linux docs-2.0 In ~/android-sdk-linux/add-ons/ % unzip google_apis-3-r03.zip % unzip google_apis-4-r01.zip % unzip google_apis-5-r01.zip The next hurdle involved segmentation faults from "emulator". No matter which avd platform I created or used, emulator would segfault with very little information as to why, and no core dump produced for analysis. After some *trace hacking I found that the problem seemed to be with connecting to my xserver! Some background on my development environment is necessary to understanding why this was happening. In order to track my time on various development projects, I use different accounts (uids) on my system for each project. This also allows me to control which toolset is used for each project, which is especially important as a software tools developer. Therefore, I had created an "android specific" user account on my system, and (as usual) used "su - andruser" to access that account. From my base account (the one owning the xserver) I had of course issued "xhost +andruser@". I've been doing this for years, it works. That given, I discovered that I also could not run the emulator from my base account (the one used for logging in to the workstation), but for different reasons. After doing a "cp -a ~andruser/.android ~/.android" and editting the ~/.android/avd/*.ini files to change the hard paths to point to their new location in my base user account's home directory, the emulator still died at the same point, but with a different error message. It now gave the error "NAND: [...] Permission denied". I was quite surprised to discover that each time emulator runs, it creates a new files in /tmp/android/ (another hardcoded path). Since that directory had been created by the andruser account it was also owned by that account, and the directory mode was set to octal 0700! This effectively prevented any other user from using the emulator on the same host workstation! The workaround was of course to chmod 0777 /tmp/android and also chown root:root /tmp/android -- but I refer to this as a workaround only. This is a bug in the sdk, since it makes the erroneous assumption that every workstation is used by only one uid. After the above changes, I was able to start the emulator from my base account; however, I still was not able to start the emulator from the "su - andruser" shell. I also tried starting the emulator from an "ssh andru...@localhost" shell login, but found the same result. The only workaround that allowed me to run the emulator from the andruser account was to "Start new session" under gnome or kde. This workaround is not preferable, since it creates much higher overhead on both the machine and my time required to switch between project accounts; however, for the time being this is the only method that allows me to effectively use the full sdk tools. So in summary, I'm posting this for two reasons: 1) I couldn't find resolutions to these issues from searching this group or the web in general, 2) these problems are bugs that should be fixed in the SDK and tools. The summary of the bugs is as follows: 1) directory and file ownership and permissions must allow for multiuser environments 2) hardcoded paths in initialization and config files are incorrect 3) emulator temporary files are not automatically deleted (i.e. no cleanup) 4) avd downloads can be enormously slowed down by some firewall configurations - further investigation needs to be done to explain what causes this situation. Thanks, Fred -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en