Skip to content

Commit

Permalink
MobileInsight 5.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanjieli committed Jul 1, 2020
1 parent 29df8be commit 04c249d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 32 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It will run and compile a MobileInsight apk, and run an offline MobileInsight an

When the process finish install and returns the shell, a MobileInsight app is already compiled and copied to your path (`/path/to/dev`). You can install it on supported Android phone and try it out immediately using `adb`.

adb install MobileInsight-4.0.0-debug.apk
adb install MobileInsight-5.0.0-debug.apk

You can stop the virtual machine using either command:

Expand Down Expand Up @@ -74,7 +74,6 @@ We love pull requests and discussing novel ideas. You can open issues here to re

The following Slack group is used exclusively for discussions about developing the MobileInsight and its sister projects:

+ Dev Slack Group: https://mobileinsight-dev.slack.com (join via this [link](https://goo.gl/htJGqT))
+ Email: [email protected]

For other advanced topics, please refer to the wiki and the [MobileInsight website](http://www.mobileinsight.net).
83 changes: 53 additions & 30 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,45 @@
# vi: set ft=ruby :

# MobileInsight Vagrant Installation Script
# Copyright (c) 2019 MobileInsight Team
# Copyright (c) 2017 MobileInsight Team
# Author: Zengwen Yuan, zyuan (at) cs.ucla.edu
# Version: 1.3
# Version: 1.2

$INSTALL_BASE = <<SCRIPT
apt-get update
apt-get -y install build-essential pkg-config git ruby ant
apt-get -y install autoconf automake zlib1g-dev libtool
apt-get -y install bison byacc flex ccache
apt-get -y install bison byacc flex ccache libffi-dev
apt-get -y install openjdk-8-jdk openjdk-8-jre
update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
apt-get -y install python-dev python-setuptools python-wxgtk3.0
apt-get -y install python3-dev python3-setuptools python3-pip
apt-get -y install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
apt-get -y install libgtk-3-dev libpulse-dev
gem install android-sdk-installer
easy_install pip
pip install cython==0.25.2
pip install pyyaml
pip install xmltodict
pip install pyserial
pip install virtualenv
pip install virtualenvwrapper
# # Use Python3.7. Python3.8 has bugs with P4A
# add-apt-repository -y ppa:deadsnakes/ppa
# apt-get update
# apt-get -y install python3.7
# Set default Python to Python3
# alias python=python3.7
alias python=python3
# easy_install pip
pip3 install --upgrade pip
pip3 install cython
pip3 install pyyaml
pip3 install xmltodict
pip3 install pyserial
pip3 install virtualenv
pip3 install virtualenvwrapper
pip3 install Jinja2
pip3 install colorama
pip3 install sh==1.12.1
# pip3 install wxpython
SCRIPT

Expand All @@ -34,13 +51,17 @@ mkdir /home/vagrant/mi-dev
cd /home/vagrant/mi-dev
# Clone MobileInsight-core repo
# git clone -b dev-py3 https://github.com/mobile-insight/mobileinsight-core.git
git clone https://github.com/mobile-insight/mobileinsight-core.git
# Clone MobileInsight-mobile repo
# git clone -b dev-py3 https://github.com/mobile-insight/mobileinsight-mobile.git
git clone https://github.com/mobile-insight/mobileinsight-mobile.git
# Clone python-for-android repo
git clone https://github.com/mobile-insight/python-for-android.git
# git clone -b dev-mi5 https://github.com/mobile-insight/python-for-android.git
# git clone -b p4a-MI https://github.com/luckiday/python-for-android.git
SCRIPT

Expand All @@ -62,8 +83,8 @@ debug: true
ignore_existing: true
components:
- platform-tools
- build-tools;25.0.3
- platforms;android-19
- build-tools;27.0.3
- platforms;android-27
- extras;android;m2repository
EOF
Expand All @@ -74,25 +95,25 @@ export ANDROID_HOME=/home/vagrant/android-sdk
android-sdk-installer
echo 'ANDROID_SDK_HOME=/home/vagrant/android-sdk' >> ~/.bashrc
# Replace SDK tool with version 25.2.5 to use ant build
cd $ANDROID_HOME
rm -rf tools
wget https://dl.google.com/android/repository/tools_r25.2.5-linux.zip
unzip tools_r25.2.5-linux.zip
rm tools_r25.2.5-linux.zip
# # Replace SDK tool with version 27.0.3 to use ant build
# cd $ANDROID_HOME
# rm -rf tools
# wget https://dl.google.com/android/repository/build-tools_r27.0.3-linux.zip
# unzip build-tools_r27.0.3-linux.zip
# rm build-tools_r27.0.3-linux.zip
# Download and setup Android NDK r10e
# Download and setup Android NDK r19
cd ~
wget https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip
unzip android-ndk-r10e-linux-x86_64.zip
echo 'ANDROID_NDK_HOME=/home/vagrant/android-ndk-r10e' >> ~/.bashrc
wget https://dl.google.com/android/repository/android-ndk-r19b-linux-x86_64.zip
unzip android-ndk-r19b-linux-x86_64.zip
echo 'ANDROID_NDK_HOME=/home/vagrant/android-ndk-r19b' >> ~/.bashrc
echo 'PATH=$PATH:$ANDROID_NDK_HOME:$ANDROID_SDK_HOME:$ANDROID_SDK_HOME/tools:$ANDROID_SDK_HOME/tools/bin:$ANDROID_SDK_HOME/platform-tools' >> ~/.bashrc
source ~/.bashrc
rm android-ndk-r10e-linux-x86_64.zip
rm android-ndk-r19b-linux-x86_64.zip
# Install python-for-android
cd /home/vagrant/mi-dev/python-for-android
sudo python setup.py install
sudo python3 setup.py install
# Prepare MobileInsight Android app compilation
cd /home/vagrant/mi-dev/mobileinsight-mobile
Expand All @@ -103,19 +124,21 @@ make config
# Use default config to compile a python-for-android distribution
make dist
# Use example keystore to compile and sign a release version of MobileInsight
# keystore and key password: mobileinsight
# # Use example keystore to compile and sign a release version of MobileInsight
# # keystore and key password: mobileinsight
make apk_debug
# Copy MobileInsight apk to local folder
# Please exit vagrant ssh shell and use adb to install
cp MobileInsight-4.0.0-debug.apk /vagrant
# # Copy MobileInsight apk to local folder
# # Please exit vagrant ssh shell and use adb to install
cp MobileInsight*.apk /vagrant/
SCRIPT

Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/xenial64"
# config.vm.box = "bento/ubuntu-16.04"
# config.vm.box_version = "201708.22.0"
config.vm.box = "bento/ubuntu-20.04"
config.vm.box_version = "202004.27.0"

config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
Expand Down

0 comments on commit 04c249d

Please sign in to comment.