Difference between revisions of "PC prerequisites about STM32MPU distribution for Android"

[unchecked revision] [quality revision]
m
 
m



Under construction.png Delivery for Android distribution coming soon

Before downloading and building the STM32MPU distribution for Android, make sure your system meets the following requirements:

  • 64-bit environment.
  • At least 150 Gbytes of free disk space. If you conduct multiple builds or employ ccache, even more space is required.
  • At least 8 Gbytes of RAM/swap. If you are running Linux on a virtual machine, at least 16 Gbytes of RAM/swap are required.

For more détails, refer to Android web site[1].

Use the following commands to install the packages required to build an environment for Android[2] (Distribution Package):

sudo apt-get update
sudo apt-get install openjdk-8-jdk chrpath curl libxml2-utils

To avoid memory allocation errors when less than 16 Gbytes of RAM are available in your system, you can use the ANDROID_JACK_VM_ARGS environment variable to specify how much memory 'Jack' can be used. Most of the time, allocating 50% of your server RAM is enough. Example of a server featuring 8 Gbytes of RAM:

export ANDROID_JACK_VM_ARGS="-Xmx4g -Dfile.encoding=UTF-8 -XX:+TieredCompilation"

You may need to select Java OpenJDK version 8 instead of the existing one. To do this, use the following commands:

$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac

By default, regular users cannot directly access USB devices. To allow such access, the system must be configured as follows:

  • Create the 51-stm-android.rules file within /etc/udev/rules.d/ directory with the following content:
# adb/fastboot protocol on stm
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="df11", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="5270", MODE="0666", GROUP="plugdev"

  • You then have to reload the udev rules by executing the following command:
$ udevadm control --reload-rules

At this stage: Your environment is ready for Android build, debug and test.



Article references:

  1. Android requirements page : https://source.android.com/setup/requirements
  2. Establishing a Build Environment: http://source.android.com/source/initializing.html
<noinclude>

{{ArticleMainWriter | ChristopheG}}
{{ArticleApprovedVersion | ChristopheG | Jean-ChristopheT | Nobody PhilippeR, NicolasL | No previous approved version | Automatic approval (article under construction) | 28Jan’19AnneJ - 17Apr'18 - 7102 | 24Apr'18}}
[[Category:Sub-articles]]</noinclude>
{{UnderConstruction|Delivery for Android distribution coming soon}}

Before downloading and building the STM32MPU distribution for Android, make sure your system meets the following requirements:<br />

*64-bit environment.<br />

*At least 150 Gbytes of free disk space. If you conduct multiple builds or employ ccache, even more space is required.<br />

*At least 8 Gbytes of RAM/swap. If you are running Linux on a virtual machine, at least 16 Gbytes of RAM/swap are required.<br />

For more détails, refer to Android web site<ref>Android requirements page : https://source.android.com/setup/requirements</ref>.<br />


Use the following commands to install the packages required to build an environment for Android<ref>Establishing a Build Environment: http://source.android.com/source/initializing.html</ref> (Distribution Package):
 sudo apt-get update
 sudo apt-get install openjdk-8-jdk chrpath curl libxml2-utils

To avoid memory allocation errors when less than 16 Gbytes of RAM are available in your system, you can use the ANDROID_JACK_VM_ARGS environment variable to specify how much memory 'Jack' can be used. Most of the time, allocating 50% of your server RAM is enough. 
Example of a server featuring 8 Gbytes of RAM:
 export ANDROID_JACK_VM_ARGS="-Xmx'''4g''' -Dfile.encoding=UTF-8 -XX:+TieredCompilation"

You may need to select Java OpenJDK version 8 instead of the existing one. To do this, use the following commands:
 $ sudo update-alternatives --config java
 $ sudo update-alternatives --config javac

By default, regular users cannot directly access USB devices. To allow such access, the system must be configured as follows: 
* Create the ''51-stm-android.rules'' file within /etc/udev/rules.d/ directory with the following content:
 # adb/fastboot protocol on stm
 SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="df11", MODE="0666", GROUP="plugdev"
 SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="5270", MODE="0666", GROUP="plugdev"
* You then have to reload the udev rules by executing the following command:
 $ udevadm control --reload-rules<u>At this stage</u>: Your environment is ready for Android build, debug and test.
{{InternalInfo| For ST employees, installation can be limited to one package: 
 sudo apt-get install st-android-build
}}
{{InternalInfo| For ST employees: Several modules can be cloned from an external server through SSH. For this reason, you have to configure the proxy (using corkscrew).}}
<noinclude>

Article references:<references />
</noinclude>
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 
{{ArticleMainWriter | ChristopheG}}
 
{{ArticleMainWriter | ChristopheG}}
{{ArticleApprovedVersion | ChristopheG | Jean-PhilippeR, NicolasL | No previous approved version | AnneJ - 17Apr'18 - 7102 | 24Apr'18}}
+
{{ArticleApprovedVersion | Jean-ChristopheT | Nobody | No previous approved version | Automatic approval (article under construction) | 28Jan’19}}
 
[[Category:Sub-articles]]
 
[[Category:Sub-articles]]
 
</noinclude>
 
</noinclude>
 
+
{{UnderConstruction|Delivery for Android distribution coming soon}}
Before downloading and building the STM32MPU distribution for Android, make sure your system meets the following requirements:<br />
 
*64-bit environment.<br />
 
*At least 150 Gbytes of free disk space. If you conduct multiple builds or employ ccache, even more space is required.<br />
 
*At least 8 Gbytes of RAM/swap. If you are running Linux on a virtual machine, at least 16 Gbytes of RAM/swap are required.<br />
 
For more détails, refer to Android web site<ref>Android requirements page : https://source.android.com/setup/requirements</ref>.<br />
 
 
 
Use the following commands to install the packages required to build an environment for Android<ref>Establishing a Build Environment: http://source.android.com/source/initializing.html</ref> (Distribution Package):
 
sudo apt-get update
 
sudo apt-get install openjdk-8-jdk chrpath curl libxml2-utils
 
 
 
To avoid memory allocation errors when less than 16 Gbytes of RAM are available in your system, you can use the ANDROID_JACK_VM_ARGS environment variable to specify how much memory 'Jack' can be used. Most of the time, allocating 50% of your server RAM is enough.
 
Example of a server featuring 8 Gbytes of RAM:
 
export ANDROID_JACK_VM_ARGS="-Xmx'''4g''' -Dfile.encoding=UTF-8 -XX:+TieredCompilation"
 
 
 
You may need to select Java OpenJDK version 8 instead of the existing one. To do this, use the following commands:
 
$ sudo update-alternatives --config java
 
$ sudo update-alternatives --config javac
 
 
 
By default, regular users cannot directly access USB devices. To allow such access, the system must be configured as follows:
 
* Create the ''51-stm-android.rules'' file within /etc/udev/rules.d/ directory with the following content:
 
# adb/fastboot protocol on stm
 
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="df11", MODE="0666", GROUP="plugdev"
 
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="5270", MODE="0666", GROUP="plugdev"
 
* You then have to reload the udev rules by executing the following command:
 
$ udevadm control --reload-rules
 
<u>At this stage</u>: Your environment is ready for Android build, debug and test.
 
{{InternalInfo| For ST employees, installation can be limited to one package:
 
sudo apt-get install st-android-build
 
}}
 
{{InternalInfo| For ST employees: Several modules can be cloned from an external server through SSH. For this reason, you have to configure the proxy (using corkscrew).}}
 
 
 
<noinclude>
 
Article references:
 
<references />
 
</noinclude>
 

Attachments

Discussions