I believe that the android.com page is a little out of date. There are a lot of different workarounds that are floating around the net. I'll try to summarize what worked for me.
Two helpful, if imperfect, pages are located here:
crashcourse.ca
wildartist
First, it looks like you'll probably want to use java6
and not java5
, judging by some of the group threads . So if you see java5 in instructions, know that you'll need to substitute in either the sun java6 or open java 6.
Here are the packages I needed for my 32-bit system:
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jdk ant gcc-multilib g++-multilib
After those are in place, build repo
:
sudo curl http://android.git.kernel.org/repo -o /usr/local/bin/repo
sudo chmod a+x /usr/local/bin/repo
Then in your build directory:
repo init -u git://android.git.kernel.org/platform/manifest.git
repo sync
The wildartist site continues:
If you encounter the message “command not found” then you can do it with the following commands:
$ sudo sh /usr/local/bin/repo init -u git://android.git.kernel.org/platform/manifest.git
$ sudo sh /usr/local/bin/repo sync
It will take much time to get the code
even though the line is fast as the
project itself is really huge. After
the long waiting, you will find that
the checkout process has been ended.
The next thing to do is MAKE to build
the project. But you will meet a
message that the Java version is not
correct and the build process fails.
Then you can modify the
build/core/main.mk file to change the
text ”1.5″ to “1.6″.
At this point you should have the dependencies and the code take care of. You will still need to make
.
Because the code base and supporting libraries and components are changing, it's hard to keep the instructions perfectly up-to-date, which is why there are so many conflicting how-to's for this process.
You'll need a computer of the same architecture as the offline computer. This computer needs to be the same computer architecture as the offline computer (i.e: i386 32-bit or i686 64-bit). It needs to be running the same release of Ubuntu as the offline computer.
On the online computer:
Download the needed packages:
Create a directory in your home folder named files-downloaded
.
On the online computer, launch Synaptic. Under Ubuntu 11.04, this easily done by pressing the windows button, and then typing synaptic package manager
.
Find the package named flashplugin-installer
, right-click on it and mark it for installation. If it is already installed, mark it for re-installation. ![Marking flashplugin-installer for installation](https://i.stack.imgur.com/9cVWk.png)
If a dialog window asks you to install libnspr4-0d
, click Mark. If this dialog doesn't appear, you will need to find libnspr4-0d
yourself and mark it for re-installation.
Find the package named ttf-mscorefonts-installer
, right-click on it and mark it for installation. If it is already installed, mark it for re-installation.
If a dialog window asks you to install cabextract
, click Mark. If this dialog doesn't appear, you will need to find cabextract
yourself and mark it for re-installation.
Find the package named debconf-utils
and mark it for installation or re-installation as necessary. This package is required later on to set the offline location of the additional files we are going to download.
Click File
->Generate package download script
, and save the script under the files-download
directory with the name download-packages
. ![Generating package download script](https://i.stack.imgur.com/1aLsV.png)
Open a terminal by pressing the windows key and typing terminal
.
Type the following. This will download all the required .deb files to the files-downloaded
folder.
cd ~/files-downloaded
sudo chown username:username download-packages
chmod +x download-packages
./download-packages
Download the fonts:
Save the following code as files-downloaded/download-fonts
:
#!/bin/bash
set -e
FONTS='andale32.exe arial32.exe arialb32.exe comic32.exe courie32.exe
georgi32.exe impact32.exe times32.exe trebuc32.exe verdan32.exe webdin32.exe'
URLROOTS="http://downloads.sourceforge.net/corefonts/
http://switch.dl.sourceforge.net/sourceforge/corefonts/
http://mesh.dl.sourceforge.net/sourceforge/corefonts/
http://dfn.dl.sourceforge.net/sourceforge/corefonts/
http://heanet.dl.sourceforge.net/sourceforge/corefonts/
http://jaist.dl.sourceforge.net/sourceforge/corefonts/
http://nchc.dl.sourceforge.net/sourceforge/corefonts/
http://ufpr.dl.sourceforge.net/sourceforge/corefonts/
http://internode.dl.sourceforge.net/sourceforge/corefonts/
http://voxel.dl.sourceforge.net/sourceforge/corefonts/
http://kent.dl.sourceforge.net/sourceforge/corefonts/
http://internap.dl.sourceforge.net/sourceforge/corefonts/"
for font in $FONTS
do
for website in $URLROOTS
do
if ! wget -c ${website}${font} ; then
continue 1;
fi
break
done
done
echo Done
Open a terminal and type the following:
cd ~/files-downloaded
chmod +x download-fonts
./download-fonts
Download the Flash plugin tarball:
Save the following code as files-downloaded/download-flash
:
#!/bin/bash
set -e
# Ensure that the flash plugin is installed and the latest version:
sudo apt-get install -y flashplugin-installer
FLASH_VERSION_LINE=$(grep -m 1 ^FLASH_VERSION= /var/lib/dpkg/info/flashplugin-installer.postinst)
eval $FLASH_VERSION_LINE
echo Flash version: "$FLASH_VERSION"
FILENAME=adobe-flashplugin_${FLASH_VERSION}.orig.tar.gz
PARTNER_URL=http://archive.canonical.com/pool/partner/a/adobe-flashplugin/$FILENAME
wget -c "$PARTNER_URL"
echo Done
Open a terminal and type the following:
cd ~/files-downloaded
chmod +x download-flash
./download-flash
Transfer:
Now copy the folder named files-downloaded
to a USB stick or use your favourite file synchronising service. This folder should have 11 .exe files, one .tar.gz file, five .deb files and three scripts.
On the offline computer:
Copy the folder named files-downloaded
to your home directory.
Run the following in a terminal:
cd ~/files-downloaded
sudo dpkg -i debconf-utils_*.deb cabextract_*.deb libnspr4-0d_*.deb
echo flashplugin-installer flashplugin-installer/local string ~/files-downloaded/ | sudo debconf-set-selections
echo ttf-mscorefonts-installer msttcorefonts/dldir string ~/files-downloaded/ | sudo debconf-set-selections
sudo dpkg -i flashplugin-installer_*.deb
sudo dpkg -i ttf-mscorefonts-installer_*.deb
echo flashplugin-installer flashplugin-installer/local string | sudo debconf-set-selections
echo ttf-mscorefonts-installer msttcorefonts/dldir string | sudo debconf-set-selections
You're done! That was a lot more complicated than it should have been, but sadly both Adobe and Microsoft restrict the distribution of Flash and their fonts respectively. This is the only legal way to get round their strict licensing.
Just add if you are bugged with install of flashplugin-installer failing due to dependency update-notifier-common you can use the below steps to reinstall update-notifier-common:
Delete the files under /usr/share/package-data-downloads
:
sudo rm -f /usr/share/package-data-downloads/*
Install update-notifier-common again:
sudo apt-get install update-notifier-common
This should now complete without attempting to download flash or fonts
Rerun the script in the last part it should just work
Best Answer
Open a Terminal by pressing CTRL+ALT+T and type:
copy the
urls.txt
to a thumbdrive and move over to a computer with Internet Access. Download all files fromurls.txt
(if the other computer is running Linux you can usewget < urls.txt
) and save them in a folder calleddeb
on your thumbdrive.Go back to your Ubuntu machine, plug in the thumbdrive and open a Terminal