User:Joel Reymont/Android Notes: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 37: Line 37:
</pre>
</pre>


3. make
3. make sdk
 
You should see something like this if everything goes well
 
<pre>
ls out/host/darwin-x86/sdk/
android-sdk_eng.joelr_mac-x86 sdk_deps.mk
android-sdk_eng.joelr_mac-x86.zip
</pre>
 
One more step is needed
 
<pre>
export PATH=$PATH:`pwd`/out/host/darwin-x86/sdk/android-sdk_eng.joelr_mac-x86/tools/
cd prebuilt && ln -s darwin-x86 darwin-x86_64
</pre>
 
Verify that everything works
 
<pre>
android list targets
 
Available Android targets:
id: 1
    Name: Android 1.6
    Type: Platform
    API level: 4
    Revision: 1
    Skins: HVGA (default), QVGA, WVGA800, WVGA854
</pre>


4. You are set and you can now run the emulator, e.g.
4. You are set and you can now run the emulator, e.g.
Line 43: Line 72:
<pre>
<pre>
export AND_HOME=/Volumes/android/mydroid
export AND_HOME=/Volumes/android/mydroid
export AND_BIN=$AND_HOME/out/host/darwin-x86/bin
export AND_BIN=$AND_HOME/out/host/darwin-x86/sdk/android-sdk_eng.joelr_mac-x86/tools
export AND_PROD=$AND_HOME/out/target/product/generic
export AND_PROD=$AND_HOME/out/target/product/generic
export AND_QEMU=$AND_HOME/prebuilt/android-arm/kernel/kernel-qemu
export AND_QEMU=$AND_HOME/prebuilt/android-arm/kernel/kernel-qemu

Revision as of 17:59, 7 October 2009

Intro

This page collects my notes on porting Firefox to Android.

Current status

October 7, 2009

Previous statuses

Android Notes

Building Android on Snow Leopard

1. Get the sources.

2. Apply these changes

cd system/core && git pull git://android.git.kernel.org/platform/system/core refs/changes/45/11845/2 && cd ../..
cd external/qemu && git pull git://android.git.kernel.org/platform/external/qemu refs/changes/46/11846/2 && cd ../..
cd prebuilt && git pull git://android.git.kernel.org/platform/prebuilt refs/changes/14/12014/1 && cd ..
cd prebuilt && git pull git://android.git.kernel.org/platform/prebuilt refs/changes/75/12075/1 && cd ..
cd build && git pull git://android.git.kernel.org/platform/build refs/changes/74/12074/1 && cd ..
cd build && git pull git://android.git.kernel.org/platform/build refs/changes/93/12093/1 && cd .. 

The following almost works but resets the head each time. Both of the last two changes are needed but the Java one gets written over by the very last change. Also, changes downloaded this way get blown away on repo sync.

repo download platform/system/core 11845/2
repo download platform/external/qemu 11846/2
repo download platform/prebuilt 12014/1
repo download platform/prebuilt 12075/1
repo download platform/build 12074/1
repo download platform/build 12093/1

3. make sdk

You should see something like this if everything goes well

ls out/host/darwin-x86/sdk/
android-sdk_eng.joelr_mac-x86		sdk_deps.mk
android-sdk_eng.joelr_mac-x86.zip

One more step is needed

export PATH=$PATH:`pwd`/out/host/darwin-x86/sdk/android-sdk_eng.joelr_mac-x86/tools/
cd prebuilt && ln -s darwin-x86 darwin-x86_64

Verify that everything works

android list targets

Available Android targets:
id: 1
     Name: Android 1.6
     Type: Platform
     API level: 4
     Revision: 1
     Skins: HVGA (default), QVGA, WVGA800, WVGA854

4. You are set and you can now run the emulator, e.g.

export AND_HOME=/Volumes/android/mydroid
export AND_BIN=$AND_HOME/out/host/darwin-x86/sdk/android-sdk_eng.joelr_mac-x86/tools
export AND_PROD=$AND_HOME/out/target/product/generic
export AND_QEMU=$AND_HOME/prebuilt/android-arm/kernel/kernel-qemu
export AND_IMG=$AND_HOME/out/target/product/generic/userdata.img

hdiutil attach ~/work/android/android.dmg -mountpoint /Volumes/android

$AND_BIN/emulator -sysdir $AND_PROD -kernel $AND_QEMU -system $AND_IMG

Vlad's Android Notes

Can be found here.