#!/bin/bash
### Issues:
# 1) http://ubuntuforums.org/showthread.php?t=2182653
# 2) GYP_DEFINES use host_os and host_arch
# 3) no we do not support Mac, Windows Good, but Linux also not working, which one then do you support?https://code.google.com/p/chromium/wiki/AndroidBuildInstructions
# 4) Use OpenJDK 6 (not 7 not 8)
#sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
#oracle-java7-installer
sudo apt-get install git subversion gcc g++ openjdk-7-jdk
sudo update-alternatives --config javac
sudo update-alternatives --config java
sudo update-alternatives --config javaws
sudo update-alternatives --config javap
sudo update-alternatives --config jar
sudo update-alternatives --config jarsigner
rm -fr ~/git
mkdir -p ~/git/working
cd ~/git/working
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
rm -fr ~/.bash_aliases
echo "PATH=$PATH:$HOME/git/working/depot_tools" >> ~/.bash_aliases
. ~/.bash_aliases
gclient config http://webrtc.googlecode.com/svn/stable/
echo "target_os = ['android', 'unix']" >> .gclient
# this revision get build success but useless does not work in Smartphone or Emulator
#gclient sync --nohooks --revision r4699
# tried revision but all failed
#gclient sync --nohooks --revision r6039
#gclient sync --nohooks --revision r6001
#gclient sync --nohooks --revision r5540
# take a vacation and come back later to see it completes
gclient sync --nohooks
source ~/git/working/stable/build/android/envsetup.sh
export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_java=1"
export GYP_GENERATORS="ninja"
export GYP_DEFINES="$GYP_DEFINES OS=android host_os=linux host_arch=x64 target_arch=ia32" android_gyp
#export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out"
#export GYP_CROSSCOMPILE=1
#export JAVA_HOME="/usr/lib/jvm/java-7-oracle"
export JAVA_HOME="/usr/lib/jvm/java-6-openjdk-amd64"
sudo ~/git/working/stable/build/./install-build-deps-android.sh
sudo ~/git/working/stable/build/./install-build-deps.sh --no-chromeos-fonts
cp -R ~/git/working/stable ~/git/working/trunk
gclient runhooks
cd trunk
ninja -C out/Debug AppRTCDemo
### Download eclipse and sdk
cd ~/Downloads/adt-bundle-linux-x86_64-20140321/sdk/platform-tools
./adb devices
./adb install -r ~/git/working/trunk/out/Debug/AppRTCDemo-debug.apk
gclient config http://webrtc.googlecode.com/svn/stable/
/Users/megamind/programming/depot_tools/third_party/boto/pyami/config.py:75: UserWarning: Unable to load AWS_CREDENTIAL_FILE ()warnings.warn('Unable to load AWS_CREDENTIAL_FILE (%s)' % full_path)Failure: 'NoneType' object is not callable.
________ running '/usr/bin/python trunk/build/cp.py trunk/../chromium_gn/.gn trunk' in '/home/sun/git/working'
________ running 'download_from_google_storage --no_resume --platform=win32 --no_auth --bucket chromium-gn -s trunk/tools/gn/bin/win/gn.exe.sha1' in '/home/sun/git/working'
________ running 'download_from_google_storage --no_resume --platform=darwin --no_auth --bucket chromium-gn -s trunk/tools/gn/bin/mac/gn.sha1' in '/home/sun/git/working'
________ running 'download_from_google_storage --no_resume --platform=linux* --no_auth --bucket chromium-gn -s trunk/tools/gn/bin/linux/gn.sha1' in '/home/sun/git/working'
0> Downloading trunk/tools/gn/bin/linux/gn...
________ running 'download_from_google_storage --no_resume --platform=linux* --no_auth --bucket chromium-gn -s trunk/tools/gn/bin/linux/gn32.sha1' in '/home/sun/git/working'
0> Downloading trunk/tools/gn/bin/linux/gn32...
________ running 'download_from_google_storage --no_resume --platform=win32 --no_auth --bucket chromium-clang-format -s trunk/third_party/clang_format/bin/win/clang-format.exe.sha1' in '/home/sun/git/working'
________ running 'download_from_google_storage --no_resume --platform=darwin --no_auth --bucket chromium-clang-format -s trunk/third_party/clang_format/bin/mac/clang-format.sha1' in '/home/sun/git/working'
________ running 'download_from_google_storage --no_resume --platform=linux* --no_auth --bucket chromium-clang-format -s trunk/third_party/clang_format/bin/linux/clang-format.sha1' in '/home/sun/git/working'
0> Downloading trunk/third_party/clang_format/bin/linux/clang-format...
________ running '/usr/bin/python trunk/tools/clang/scripts/update.py --if-needed' in '/home/sun/git/working'
________ running '/usr/bin/python trunk/webrtc/build/download_vs_toolchain.py update' in '/home/sun/git/working'
________ running '/usr/bin/python trunk/third_party/binutils/download.py' in '/home/sun/git/working'
0> Downloading /home/sun/git/working/trunk/third_party/binutils/Linux_x64/binutils.tar.bz2...
Downloading /home/sun/git/working/trunk/third_party/binutils/Linux_x64/binutils.tar.bz2
Extracting /home/sun/git/working/trunk/third_party/binutils/Linux_x64/binutils.tar.bz2
________ running 'download_from_google_storage --directory --recursive --num_threads=10 --no_auth --bucket chromium-webrtc-resources trunk/resources' in '/home/sun/git/working'
4> Downloading trunk/resources/verizon4g-uplink.rx...
3> Downloading trunk/resources/verizon3g-uplink.rx...
5> Downloading trunk/resources/short_mixed_stereo_48.pcm...
6> Downloading trunk/resources/near16_stereo.pcm...
2> Downloading trunk/resources/near44_stereo.pcm...
1> Downloading trunk/resources/near8_stereo.pcm...
0> Downloading trunk/resources/foreman_cif_short.yuv...
9> Downloading trunk/resources/near32_stereo.pcm...
7> Downloading trunk/resources/sprint-uplink.rx...
8> Downloading trunk/resources/far8_stereo.pcm...
9> Downloading trunk/resources/verizon3g-downlink.rx...
1> Downloading trunk/resources/e2e_audio_in.pcm...
6> Downloading trunk/resources/synthetic-trace.rx...
3> Downloading trunk/resources/foreman_cif.yuv...
8> Downloading trunk/resources/att-downlink.rx...
5> Downloading trunk/resources/near48_stereo.pcm...
7> Downloading trunk/resources/ref03.aecdump...
2> Downloading trunk/resources/deflicker_before_cif_short.yuv...
4> Downloading trunk/resources/far44_stereo.pcm...
9> Downloading trunk/resources/att-uplink.rx...
1> Downloading trunk/resources/far16_stereo.pcm...
6> Downloading trunk/resources/verizon4g-downlink.rx...
5> Downloading trunk/resources/far48_stereo.pcm...
0> Downloading trunk/resources/speech_and_misc_wb.pcm...
1> Downloading trunk/resources/short_mixed_stereo_48.dat...
4> Downloading trunk/resources/foremanColorEnhanced_cif_short.yuv...
5> Downloading trunk/resources/short_mixed_mono_48.dat...
9> Downloading trunk/resources/short_mixed_mono_48.pcm...
8> Downloading trunk/resources/far32_stereo.pcm...
1> Downloading trunk/resources/tmobile-uplink.rx...
7> Downloading trunk/resources/paris_qcif.yuv...
5> Downloading trunk/resources/audioproc.aecdump...
0> Downloading trunk/resources/sprint-downlink.rx...
9> Downloading trunk/resources/tmobile-downlink.rx...
8> Downloading trunk/resources/video_coding/pltype103.rtp...
1> Downloading trunk/resources/video_coding/ssrcs-2.pcap...
0> Downloading trunk/resources/video_coding/ssrcs-3.pcap...
6> Downloading trunk/resources/video_coding/frame-loopback.pcap...
8> Downloading trunk/resources/video_coding/frame-ethernet-ii.pcap...
9> Downloading trunk/resources/rtp_rtcp/RTCPPacketTMMBR4.bin...
2> Downloading trunk/resources/rtp_rtcp/H263_CIF_IFRAME.bin...
1> Downloading trunk/resources/rtp_rtcp/H263_QCIF_IFRAME.bin...
4> Downloading trunk/resources/rtp_rtcp/H263Foreman_CIF_Pframe.bin...
6> Downloading trunk/resources/rtp_rtcp/H263_CIF_PFRAME.bin...
0> Downloading trunk/resources/rtp_rtcp/RTCPPacketTMMBR0.bin...
8> Downloading trunk/resources/rtp_rtcp/RTCPPacketTMMBR5.bin...
9> Downloading trunk/resources/rtp_rtcp/RTCPPacketTMMBR3.bin...
2> Downloading trunk/resources/rtp_rtcp/RTCPPacketTMMBR2.bin...
1> Downloading trunk/resources/rtp_rtcp/RTCPPacketTMMBR4_2.bin...
4> Downloading trunk/resources/rtp_rtcp/RTCPPacketTMMBR4_1.bin...
6> Downloading trunk/resources/rtp_rtcp/H263Foreman_CIF_Iframe.bin...
0> Downloading trunk/resources/rtp_rtcp/RTCPPacketTMMBR1.bin...
9> Downloading trunk/resources/voice_engine/audio_long16.wav...
8> Downloading trunk/resources/voice_engine/audio_long16.pcm...
2> Downloading trunk/resources/voice_engine/audio_tiny22.wav...
1> Downloading trunk/resources/voice_engine/audio_tiny32.wav...
4> Downloading trunk/resources/voice_engine/audio_long16big_endian.pcm...
5> Downloading trunk/resources/voice_engine/audio_long8mulaw.wav...
7> Downloading trunk/resources/voice_engine/audio_short16.pcm...
6> Downloading trunk/resources/voice_engine/audio_tiny48.wav...
0> Downloading trunk/resources/voice_engine/audio_tiny8.wav...
2> Downloading trunk/resources/voice_engine/audio_tiny11.wav...
3> Downloading trunk/resources/voice_engine/audio_long16noise.pcm...
1> Downloading trunk/resources/voice_engine/audio_tiny44.wav...
9> Downloading trunk/resources/voice_engine/audio_tiny16.wav...
8> Downloading trunk/resources/voice_engine/audio_long8.pcm...
5> Downloading trunk/resources/audio_coding/F01_tlm10.OUT20...
7> Downloading trunk/resources/audio_coding/F02.BIT30...
6> Downloading trunk/resources/audio_coding/F03.OUT20...
0> Downloading trunk/resources/audio_coding/neteq4_universal_ref_win_32.pcm...
2> Downloading trunk/resources/audio_coding/F04.BIT30...
3> Downloading trunk/resources/audio_coding/F02.INP...
1> Downloading trunk/resources/audio_coding/speech_mono_32_48kHz.pcm...
9> Downloading trunk/resources/audio_coding/neteq4_universal_ref.pcm...
8> Downloading trunk/resources/audio_coding/F04.BIT20...
7> Downloading trunk/resources/audio_coding/F01.BIT20...
5> Downloading trunk/resources/audio_coding/neteq4_rtcp_stats.dat...
6> Downloading trunk/resources/audio_coding/neteq_universal.rtp...
2> Downloading trunk/resources/audio_coding/F00_tlm10.OUT20...
0> Downloading trunk/resources/audio_coding/neteq_universal_new.rtp...
4> Downloading trunk/resources/audio_coding/F05.BIT20...
7> Downloading trunk/resources/audio_coding/testfile32kHz.pcm...
3> Downloading trunk/resources/audio_coding/neteq_universal_ref_win_32.pcm...
8> Downloading trunk/resources/audio_coding/F02_tlm10.OUT20...
5> Downloading trunk/resources/audio_coding/F00.BIT20...
2> Downloading trunk/resources/audio_coding/music_stereo_48kHz.pcm...
4> Downloading trunk/resources/audio_coding/F00_tlm10.OUT30...
7> Downloading trunk/resources/audio_coding/F00.OUT20...
5> Downloading trunk/resources/audio_coding/F04.INP...
6> Downloading trunk/resources/audio_coding/F01_tlm10.OUT30...
8> Downloading trunk/resources/audio_coding/neteq_network_stats_win_32.dat...
4> Downloading trunk/resources/audio_coding/F03.OUT30...
3> Downloading trunk/resources/audio_coding/tlm10.chn...
9> Downloading trunk/resources/audio_coding/neteq_network_stats.dat...
0> Downloading trunk/resources/audio_coding/F05.INP...
7> Downloading trunk/resources/audio_coding/F05.BIT30...
6> Downloading trunk/resources/audio_coding/F04.OUT20...
8> Downloading trunk/resources/audio_coding/F00.OUT30...
5> Downloading trunk/resources/audio_coding/F05.OUT30...
1> Downloading trunk/resources/audio_coding/F02.OUT20...
2> Downloading trunk/resources/audio_coding/F01.OUT20...
3> Downloading trunk/resources/audio_coding/F06.INP...
4> Downloading trunk/resources/audio_coding/F00.INP...
9> Downloading trunk/resources/audio_coding/F02.OUT30...
0> Downloading trunk/resources/audio_coding/F01.OUT30...
7> Downloading trunk/resources/audio_coding/clean.chn...
6> Downloading trunk/resources/audio_coding/F05.OUT20...
8> Downloading trunk/resources/audio_coding/F06.BIT20...
5> Downloading trunk/resources/audio_coding/teststereo32kHz.pcm...
1> Downloading trunk/resources/audio_coding/neteq4_network_stats_win_32.dat...
2> Downloading trunk/resources/audio_coding/neteq4_network_stats.dat...
7> Downloading trunk/resources/audio_coding/F00.BIT30...
4> Downloading trunk/resources/audio_coding/F04.OUT30...
0> Downloading trunk/resources/audio_coding/F06.OUT30...
9> Downloading trunk/resources/audio_coding/neteq_rtcp_stats.dat...
3> Downloading trunk/resources/audio_coding/F03.BIT30...
8> Downloading trunk/resources/audio_coding/F03.INP...
6> Downloading trunk/resources/audio_coding/F01.BIT30...
5> Downloading trunk/resources/audio_coding/F06.BIT30...
1> Downloading trunk/resources/audio_coding/F02_tlm10.OUT30...
2> Downloading trunk/resources/audio_coding/neteq_universal_ref.pcm...
7> Downloading trunk/resources/audio_coding/F03.BIT20...
4> Downloading trunk/resources/audio_coding/F01.INP...
3> Downloading trunk/resources/audio_coding/F06.OUT20...
8> Downloading trunk/resources/audio_coding/F02.BIT20...
6> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin...
9> Downloading trunk/resources/audio_coding/speech_mono_16kHz.pcm...
0> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin...
5> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin...
1> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin...
7> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin...
4> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin...
3> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin...
8> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin...
6> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin...
2> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin...
5> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin...
1> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin...
9> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin...
7> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin...
4> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin...
3> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin...
8> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin...
6> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin...
5> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin...
2> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin...
1> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin...
9> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin...
0> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin...
7> Downloading trunk/resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin...
4> Downloading trunk/resources/video_engine/renderStartImage.jpg...
8> Downloading trunk/resources/video_engine/renderTimeoutImage.jpg...
3> Downloading trunk/resources/images/renderStartImage.jpg...
6> Downloading trunk/resources/images/captureDeviceImage.jpg...
2> Downloading trunk/resources/images/renderTimeoutImage.jpg...
5> Downloading trunk/resources/images/webrtc_logo.jpg...
1> Downloading trunk/resources/audio_device/audio_short48.pcm...
9> Downloading trunk/resources/audio_device/audio_short8.pcm...
0> Downloading trunk/resources/audio_device/audio_short44.pcm...
7> Downloading trunk/resources/audio_device/audio_short16.pcm...
Hook 'download_from_google_storage --directory --recursive --num_threads=10 --no_auth --bucket chromium-webrtc-resources trunk/resources' took 69.50 secs
________ running '/usr/bin/python trunk/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0' in '/home/sun/git/working'
Updating projects from gyp files...
ninja: Entering directory `out/Debug'
ninja: warning: multiple rules generate icudtl.dat. builds involving this target will not be correct; continuing anyway
[1651/2330] CC obj.host/third_party/yasm/source/patched-yasm/modules/objfmts/bin/yasm.bin-objfmt.o
../../third_party/yasm/source/patched-yasm/modules/objfmts/bin/bin-objfmt.c: In function 'dosexe_objfmt_output':
../../third_party/yasm/source/patched-yasm/modules/objfmts/bin/bin-objfmt.c:1869:18: warning: ignoring return value of 'ftruncate', declared with attribute warn_unused_result [-Wunused-result]
[2330/2330] ACTION AppRTCDemo: build_apprtcdemo_apk_535bc85b93183dc3b2a7625a652bd5e0--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
{
# Download test resources, i.e. video and audio files from Google Storage.
"pattern": "\\.sha1",
"action": ["download_from_google_storage",
"--directory",
"--recursive",
"--num_threads=10",
"--no_auth",
"--bucket", "chromium-webrtc-resources",
Var("root_dir") + "/resources"],
},I guess (as also pointed out somewhere in this group) this issue occurs due to network interruption during sync. Since my internet connection is significantly slow and there was network interruption every time I tried to sync, this seems a valid issue. I would like to request the repository maintainers to improve the recovery of sync from any network interruption.I would look forward to a permanent solution to this issue.