[GUIDE] How to build firefoxOS from source with Ubuntu 12.10/13.04 x64 - Nexus S General

I have yet to see a good, COMPLETE, step by step tutorial for building firefoxOS, so since I figured it out thought I would document the steps I took and get a good guide going for us.
**This guide is written with Samsung Nexus S 4G (crespo4G) specifically in mind, but it can easily be adapted to any officially supported device
what you will need:
a nexus s 4g (or other officially supported device)
a pc capable of compiling android from source (ie: minimum 2x core cpu, 4gb ram)
ubuntu 12.10 or 13.04 64-bit (google it, it's open source!)
broadband internet (trust me, you want a minimum of 10mbit/sec)
a basic understanding of terminal command, adb and fastboot
ok, let's get started!!
I'll assume you've already installed ubuntu and gotten the network set up. If not, do so now.
First, set up the build environment....
Install java:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
Code:
$ sudo apt-get update
Code:
$ sudo apt-get install sun-java6-jdk
If you have multiple java installations you need to change the version your system is using
Code:
$ wget http://webupd8.googlecode.com/files/update-java-0.5b
Code:
$ chmod +x update-java-0.5b
Code:
$ sudo ./update-java-0.5b
(it says java 0.5, but it's java 6 don't worry)
choose any java 6 installation and save.
Install android sdk:
download the sdk from android dev site
http://developer.android.com/sdk/index.html
extract it to ~/android/sdk/.....
Code:
$ cd ~/android/sdk/tools
Code:
$ ./android update sdk
update all packages
Install adb & fastboot:
Code:
$ sudo add-apt-repository ppa:nilarimogard/webupd8
Code:
$ sudo apt-get update
Code:
$ sudo apt-get install android-tools-adb android-tools-fastboot
test it!!!
Code:
$ adb devices
Install dependancies:
ubuntu 12.10+ dependancies
Code:
$ sudo apt-get install autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib gcc-4.6 g++-4.6 g++-4.6-multilib git ia32-libs lib32ncurses5-dev lib32z1-dev libgl1-mesa-dev libx11-dev make
64 bit dependancies
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Clone the repo:
Code:
$ git clone git://github.com/mozilla-b2g/B2G.git
Code:
$ cd ~/B2G
Download the source:
Plug in your device, ensure ICS or newer is installed, then enable usb debugging
Code:
$ ./config.sh nexus-s-4g
This is where you can change the guide to work with any supported device. The proper syntax is as follows
Code:
$ ./config.sh (device name)
where (device name) is one of the following:
- galaxy-s2
- galaxy-nexus
- nexus-s
- nexus-s-4g
- otoro
- unagi
- pandaboard
- emulator
- emulator-x86
This takes about an hour
When the source is done downloading, create a file called .userconfig with gedit containing the following two lines of code then save and drop it in ~/B2G
export CC=gcc-4.6
export CXX=g++-4.6
Building from source:
if you're not already there
Code:
$ cd ~/B2G
Code:
$ ./build.sh
*if you get build errors, use a -j option. -j1 option tells your pc to use only one cpu core. -j2 tells it to use 2, and so on...
Using less cpu cores can lead to a more stable build environment and reduce errors
If you use a -j1 option, the syntax is as follows:
Code:
$ ./build.sh -j1
This takes HOURS (probably 4-5)
Flashing b2g:
when it's done, find the .img files in ~/B2G/out/product/target/crespo4g
Code:
$ cd ~/B2G/out/product/target/crespo4g
Boot your device to the bootloader
Code:
$ sudo fastboot flash boot boot.img
Code:
$ sudo fastboot flash system system.img
Code:
$ sudo fastboot flash userdata userdata.img
To create a flashable zip:
plug in your device and enable usb debugging
Code:
$ sudo adb pull /system ~/Documents/crespo4g/b2g
Code:
$ sudo adb pull /data ~/Documents/crespo4g/b2g
add the meta-inf from another nexus s 4g flashable zip
create a .zip with the 3 directories (meta-inf, system and data) and the boot.img you just created
flash in recovery after a FULL wipe (system, boot, data, cache, dalvik)

reserved

Reserved again

Thanks ! Will try this !
Sent from my Nexus s using xda app-developers app

Big Thx Good Guide

Related

[GUIDE] Setting up a build environment for CDMA Hero

this is a guide for setting up a build environment on ubuntu 10.10. there has been similar guides but i did not have any luck with them. i'll just post step by step what i did to get a good build environment set up and compile jaybob's source.
install ubuntu 10.10
install ubuntu, install all the latest updates, DO NOT INSTALL UBUNTU 11.04 I MADE THIS FOR 10.10!!!
restart ubuntu
go to system, administration, update manager
go to settings
go to other software
check both canonical partners and click close
download python
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python2.5
download jdk 6
sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
download sdk
download link: http://dl.google.com/android/android-sdk_r15-linux.tgz
take android-sdk-linux folder and move it inside your home folder
open terminal
cd android-sdk-linux
cd tools
./android
the sdk manager will open. download the platform tools and any sdk versions you wish to have
download git
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git-core
install required build packages
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
configure your usb
gksudo gedit /etc/udev/rules.d/51-android.rules
in the blank file that opens, paste this next line in the file:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
save and close the file.
then run in terminal:
sudo chmod a+r /etc/udev/rules.d/51-android.rules
cd
gedit .bashrc
in the file that opens, add these next lines to the top of the file:
#AndroidDev PATH
export PATH=${PATH}:${HOME}/android-sdk-linux/platform-tools/
save and close the file, then in terminal, type:
source ~/.bashrc
then in terminal type:
which adb
which adb will show you your adb path. if it says "/home/YOURLINUXNAME/android-sdk-linux/platform-tools//adb" your path is good.
connect your phone, do not mount usb, make sure debugging is checked, then in terminal type:
adb devices
my device showed up as "0123456789ABCDEF device", as long as it says device at the end its good.
create directories
mkdir -p ~/bin
mkdir -p ~/android/system
download repo and make executable
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
initialize the repository
cd ~/android/system/
repo init -u git://github.com/TeamHeroC/manifest_aosp_heroc.git
(the repo above is jaybob's repo, there are a couple different repos you can choose from, you can download the AOSP repo, or cyanogenmod's repo aswell from the wiki)
repo sync
copy proprietary files
(must have jaybob's or a cm based rom already flashed to phone)
cd ~/android/system/device/htc/heroc/
./extract-files.sh
build the source
. build/envsetup.sh
lunch aosp_heroc-eng
mka bacon
if all goes well, your rom zip will be in ~/android/system/out/target/product/heroc/
*** when youre initializing the repository, if youre are compiling cyanogenmod's, follow the instructions in the wiki when you get to that section. if you are compiling aosp, follow the instructions on the aosp website. everything before that step should give you a good build environment to decide which source you want to build.***
Thank you:
dastin1015 - i used some of his guide and he is a great developer.
jaybob413 - for being a great developer and for his repo.
cyanogenmod - for the source and some of their guide.
sykopompos - i used some of his guide.
mTeryk - for helping me figure out my adb issue.
youdug - for finding some of the sources and helping me figure everything out.
*reserved*
*second reserved*
glenny buster said:
copy proprietary files
(must have jaybob's or a cm based rom already flashed to phone)
cd ~/android/system/device/htc/heroc/
./extract-files.sh
Click to expand...
Click to collapse
This step should no longer be needed when building from the TeamHeroC repos. I added the proprietary files some time ago to set up one-stop shopping and eliminate the need to do anything other than init, sync, lunch, and build (yes, I am just that lazy). The vendor device makefiles and proprietary files should already be pulled from the vendor_htc_heroc repo into vendor/htc/heroc. If something got trashed, the proprietary files can also be copied from the device/htc/heroc/prebuilt/proprietary folder, and the vendor device makefiles can be regenerated by running setup-makefiles.sh in the device/htc/heroc folder.
It is true that if building from CM7 or other repos, you will probably need to populate the proprietary files into the vendor/htc/heroc/... directories by running extract-files.sh or pulling them from koush's proprietary_vendor_htc repo (where vendor files for all CM7 supported htc devices are stored). You can clone his repo by running (in some other folder/location):
Code:
git clone git://github.com/koush/proprietary_vendor_htc.git
Then copying the heroc folder to vendor/htc/heroc.
This can come in handy if your mobile doesn't have a TeamHeroC or CM7 based ROM loaded, you can't connect to the machine you are building on, or your device is experiencing technical difficulties.
After an initial successful build you should be able to generate an update by another repo sync, lunch, mka bacon.
I would generally recommend doing a make clobber to wipe out the previous build artifacts and ensure a clean build when you generate the update. This does mean that you will recompile everything, so if you are working with a machine that takes a long time to build you may only want to do this if you are having problems or seeing unexpected results. My current build system can do a complete build from scratch in about 15 minutes, so I am now in the habit of doing this every time I build. The machine I originally used to build took over 90 minutes, so I was less likely to invoke clobbering time unless I had issues or was ready to post a release.
awesome guide!!! you the man!

[Guide] Building CyanogenMod 7 (CM7) on Mac OSX Lion

This is a guide to build your own CM7 on Mac OSX Lion. I can't guarantee 100% that this will work for everyone, but it worked for me. I want to thank Paul from Modaco, CyanogenMod team, Batista Harahap, ahbeng, and anyone else I can't remember atm.
1. Download and install Xcode, Java Mac OS X 10.5 SDK (later versions don't seem to work)
2. I recommend uninstalling existing MacPorts (using the codes below) and then install a fresh copy just to be safe.
Code:
$ sudo port -fp uninstall --follow-dependents installed
$ sudo rm -rf /opt/local /Applications/DarwinPorts /Applications/MacPorts /Library/LaunchDaemons/org.macports.* /Library/Receipts/DarwinPorts*.pkg /Library/Receipts/MacPorts*.pkg /Library/StartupItems/DarwinPortsStartup /Library/Tcl/darwinports1.0 /Library/Tcl/macports1.0 ~/.macports
3. Follow these steps below to teleport String errors at compile time
Code:
$ sudo vi /opt/local/etc/macports/sources.conf
* press ]]
* press i
* Append # at the beginning of the line
* Press Enter
* Add the following lines
Code:
file:///Users/Shared/dports
rsync://rsync.macports.org/release/ports/
* Press Esc
* Type :wq and press enter
4. Update Macports and install the necessary packages and revert gmake to 3.81 (This takes a long time)
Code:
$ sudo port selfupdate
$ POSIXLY_CORRECT=1 sudo port install gmake libsdl git-core gnupg e2fsprogs gsed curl libiptcdata xorg-libX* pngcrush findutils
$ sudo ln -s /opt/local/bin/gsed /opt/local/bin/sed
$ sudo ln -s /opt/local/libexec/gnubin/find /opt/local/bin/find
$ vi /opt/local/etc/macports/sources.conf
$ mkdir /Users/Shared/dports
$ cd /Users/Shared/dports
$ svn co --revision 50980 http://svn.macports.org/repository/macports/trunk/dports/devel/gmake/ devel/gmake/
$ portindex /Users/Shared/dports
$ sudo port install gmake @3.81
5. comment a line in one of Darwin’s C Library to get rid of compile time errors
Code:
$ sudo vi /usr/include/string.h
* Press :143
* Press i
* Append //
* Press Esc
* Type :wq!
* Press enter
6. Add a symlink for 10.5 SDKs
Code:
$ sudo ln -s /Developer/SDKs/MacOSX10.6.sdk /Developer/SDKs/MacOSX10.5.sdk
7. Create a sparseimage with a Case Sensitive FS
a. Open the Disk Utility (/Applications/Utilities/Disk Utility.app).
b. Click on New Image.
c. Save as "cyanogenmod.sparseimage" and set the following parameters as followed:
d. Name: "cyanogenmod"
e. Size: 15 GB is minimum recommended (A sparseimage will save unused space)
f. Format: Mac OS Extended (CASE-SENSITIVE, Journaled)
g. Encryption: none, Partition- Single Apple Partition Map
h. Image Format: Sparse Disk Image (this will save you disk space)
i. Save this wherever you like, and then double-click the sparseimage file to mount.
j. Your workspace will be: /Volumes/cyanogenmod/
8. Macports version of e2fsprogs will fail to compile, download the source and compile it yourself
Code:
$ mkdir -p ~/src
$ cd ~/src
$ git clone http://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
$ cd e2fsprogs
$ ./configure --prefix=/opt/local
$ make -j4 && sudo make install
9. Set up the pre-requisites for CyanogenMod to compile, there are
Code:
$ cd /Volumes/cyanogenMod
$ mkdir -p bin
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > bin/repo
$ chmod a+x bin/repo
$ mkdir -p android/system/
$ PATH=${PATH}:/Volumes/cyanogenmod/bin:
$ echo "PATH=\${PATH}:/Volumes/cyanogenmod/bin:" >> ~/.profile
10. Clone CyanogenMod repository into our sparse image (This takes a long time)
Code:
$ cd /Volumes/cyanogenmod/android/system
$ repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
$ repo sync
11. Now to get all closed source binaries from the device and into our device build folder (replace *company* and *model* with the device you want e.g. /lge/p990)
Code:
$ cd /Volumes/cyanogenmod/android/system/device/*company*/*model*
$ ./extract-files.sh
12. ROMManager is a requirement for CyanogenMod
Code:
$ /Volumes/cyanogenmod/android/system/vendor/cyanogen/get-rommanager
13. edit cm source to make it compile on lion
Add lines in red to android/system/external/elfutils/config-compat-darwin.h:
Code:
[COLOR="Red"]#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070
[/COLOR]
static inline size_t strnlen (const char *__string, size_t __maxlen)
{

int len = 0;
while (__maxlen-- && *__string++)
len++;

return len;
}
[COLOR="red"]#endif[/COLOR]
Comment out every line in android/system/external/qemu/Android.mk:
Code:
# the following test is made to detect that we were called
# through the 'm' or 'mm' build commands. if not, we use the

# standard QEMU Makefile
#
#ifeq ($(DEFAULT_GOAL),droid)
# LOCAL_PATH:= $(call my-dir)
# include $(LOCAL_PATH)/Makefile.android
#else
# include Makefile.qemu
#endif
14. Now here comes the real fun, let’s compile CyanogenMod. (replace *model* with the device you want e.g. cyanogen_p990)
Code:
$ cd /Volumes/gingerbread/android/system/
$ cp ./vendor/cyanogen/products/cyanogen_*model*.mk ./buildspec.mk
$ . build/envsetup.sh
$ lunch cyanogen_*model*-eng
$ make -j`sysctl -an hw.logicalcpu` bacon
If the build was successful, there should be an update-cm-X.X.X-RC0-KANG-signed.zip in the /android/system/out/target/product/*model* folder.
If you were successful, go get yourself a treat.

[Tutorial] Compile JB on Ubuntu for SII [Originaly By Dastin1015]

Please not that i don't take credits for this tutorial its dastin1015 who made this! but as many people don't look in other forums except the forum for their devices i would like to give you the info here about how to build JB from source​
Original Thread;Here=)
dastin1015 said:
To compile Jellybean on Ubuntu I'm going to first give you steps to set up your computer to get this thing rolling. Also note that this appears to be a development preview source code.
This will NOT make a fully functional ROM, but will give you a place to start. Also I CANNOT fix every error you run into.
Note: The source download is approximately 6GB in size. You will need 25GB free to complete a single build, and up to 80GB (or more) for a full set of builds.
1) You need the following:
-JDK 6 if you wish to build Jellybean. You can download it from java.sun.com. Or:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
-Python 2.4 -- 2.7, which you can download from python.org. Or:
Code:
$ sudo apt-get install python
-Git 1.7 or newer. You can find it at git-scm.com. Or:
Code:
$ sudo apt-get install git-core
-Android SDK:
Download the SDK here: http://developer.android.com/sdk/index.html
Extract the SDK and place it in your home directory.
I renamed my SDK to android-sdk to make it easier to navigate to.
Go to your home folder, press Ctrl+H to show hidden files, and open up your .bashrc file.
Add these lines at the bottom of the file:
Code:
# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin
Find your .profile file and add this at the bottom of the file:
Code:
PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
You have now successfully installed the Android SDK.
To check for updates issue this into your terminal:
Code:
$ android
2) Install required packages. 64-bit (recommended)
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils
On newer versions of Ubuntu such as 11.10 you may need to do the following:
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
Building on Ubuntu 12.04 is currently only experimentally supported and is not guaranteed to work on branches other than master.
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
3) Configure your USB.
Code:
$ gksudo gedit /etc/udev/rules.d/51-android.rules
Inside of this blank text file insert:
Code:
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
4) Save the file and close it and then issue this command: [CODE]$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
5) Install the repo:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
6) Initialize the repo:
Code:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.1_r1
6.1) For people who have already done a repo init:
Code:
$ cd WORKING_DIRECTORY
$ repo init -b android-4.1.1_r1
$ repo sync
7) When prompted, enter your real name and email address.
8) Gather the files: [CODE]$ repo sync
9) Compiling:
Code:
$ source build/envsetup.sh
Or:
Code:
$ . build/envsetup.sh
10) Issue:
Code:
$ lunch
11) Pick your poison.
12) Now issue (The '#' is the number of cores your processor has plus 1, ex. I have a dual core processor so I type 'make -j3':
Code:
$ make -j#
~How To Add A Device To The List~
1) Find the github for your device you wish to add. (For me it is the HTC Evo 3D CDMA)
2) Now navigate to the location you are going clone the device tree to:
Code:
$ cd WORKING_DIRECTORY/device
$ mkdir samsung
3) Clone the github device tree from remote to local: (The shooter would be whatever you want that folder to be named so make sure it is whatever standard name would be for your device, example: Nexus One [passion], Nexus S [crespo], Motorola Droid [sholes], HTC Incredible [inc], etc.)
Code:
$ git clone git://github.com/CyanogenMod/android_device_htc_shooter.git shooter
4) Now navigate into the folder:
Code:
$ cd shooter
5) Connect phone to computer and make sure USB debugging is enabled and you have adb set up.
6) Extract Device Proprietary Files:
Code:
$ ./extract-files.sh
7) Navigate back to your home directory for building:
Code:
$ cd ~/WORKING_DIRECTORY
8) Prepare To Compile:
Code:
$ source build/envsetup.sh
Or:
Code:
$ . build/envsetup.sh
9) Get your list of devices:
Code:
$ lunch
10) Pick your poison.
11) Now compile:
Code:
$ make -j#
Or for a flashable zip:
Code:
$ make -j# otapackage
~NOTE~
If you are running into issues such as:
Code:
Which would you like? [full-eng] 5
build/core/product_config.mk:209: *** No matches for product "full_shooter". Stop.
Device shooter not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Repository for shooter not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifest.xml.
build/core/product_config.mk:209: *** No matches for product "full_shooter". Stop.
** Don't have a product spec for: 'full_shooter'
** Do you have the right repo manifest?
What you need to do is to edit your blob to match the PRODUCT_NAME to the file name. For example with mine I have full_shooter.mk therefore in this file I need to have PRODUCT_NAME to match it. Whatever error it is looking for you just need to change the PRODUCT_NAME line to match what the error shows.
Click to expand...
Click to collapse
reserved for Q/A
It's frowned upon to re-distribute threads across multiple forums, trust me it wasn't allowed for a thread compiled by RC's so the same will go for this and any other thread especially one that was published on the portal as has been made aware to alot of people. Regardless of them reading other forums its clear to see thanks to the new 2013 theme having the new sidebar with top stories where I saw it earlier today. Just a heads up
AvRS said:
It's frowned upon to re-distribute threads across multiple forums, trust me it wasn't allowed for a thread compiled by RC's so the same will go for this and any other thread especially one that was published on the portal as has been made aware to alot of people. Regardless of them reading other forums its clear to see thanks to the new 2013 theme having the new sidebar with top stories where I saw it earlier today. Just a heads up
Click to expand...
Click to collapse
theres alot of people like me who never goes to the porta, dunno why tough
LastStandingDroid said:
theres alot of people like me who never goes to the porta, dunno why tough
Click to expand...
Click to collapse
Either way if it's already posted somewhere it's not advised to repeat the information in device specific forums as it's not device specific and why it's been put in a general section.
Yeah, listen to AvRS, you can face some warnings because it counts as duplicate thread spam. Calling a mod here to decide. Thanks! :good:
protomanez said:
Yeah, listen to AvRS, you can face some warnings because it counts as duplicate thread spam. Calling a mod here to decide. Thanks! :good:
Click to expand...
Click to collapse
thats amazing i never heard of it,
ill make this as much as possible for the SII
Thread closed
AvRS said:
Either way if it's already posted somewhere it's not advised to repeat the information in device specific forums as it's not device specific and why it's been put in a general section.
Click to expand...
Click to collapse
protomanez said:
Yeah, listen to AvRS, you can face some warnings because it counts as duplicate thread spam. Calling a mod here to decide. Thanks! :good:
Click to expand...
Click to collapse
LastStandingDroid said:
thats amazing i never heard of it,
ill make this as much as possible for the SII
Click to expand...
Click to collapse
And the mod has decided, as stated above, the thread is in General for a reason, it's applicable across phones.

[CLOSED][How to][Build CMB ROMS][TF300T][Mint64bit]

This will guide you thought the setup of Mint. The setup of your build environment, and finely the output of a flashable CMB ROM for your 700
First anything that starts with a bullet point is just for your reference.. Do not copy these things into your bash window...
Anything that is a code is copied one line at a time into your bash window and than enter
Now Install Mint 64 bit and a PC.. We will need at least a 250 GB hard drive...
This is a work in progress so let me know if anyone has any questions...
You can Find Mint here Click Me
Update System
Code:
sudo apt-get update
Code:
sudo apt-get upgrade
Build Env
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl
Code:
sudo apt-get install libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils xsltproc android-tools-fastboot android-tools-adb
Code:
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib meld ia32-libs lzop ccache gedit
Code:
mkdir -p ~/bin
Code:
mkdir -p ~/android/system
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Code:
export PATH=${PATH}:~/bin
Code:
gedit ~/.bashrc
Copy & Paste at bottom of bashrc on its own line
Code:
export PATH=${PATH}:~/bin
END-Paste
Code:
cd ~/android/system/
Code:
repo init -u git://github.com/cmbroms/platform_manifest.git -b kk4.4
You will be prompt to give your email and name just follow the steps on screen
Prepare to wait for a massive download 3 to 10 hours depending on your internet speed...
Code:
repo sync
Code:
cd ~/android/system/vendor/cmb
Code:
./get-prebuilts
Java
Code:
su
Code:
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
Code:
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
Code:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
Code:
apt-get update
Code:
apt-get install oracle-java6-installer
Code:
exit
Code:
sudo apt-get install oracle-java6-set-default
Ccache
Code:
gedit ~/.bashrc
Copy & Paste at bottom of bashrc on its own line
Code:
export USE_CCACHE=1
Code:
export CCACHE_DIR=~/ccache
END-Paste
Code:
source ~/.bashrc
Code:
ccache -M 50G
Building a ROM
Code:
cd ~/android/system
Make sure your in sync with the repo, you will do this every time right before you build.
Code:
repo sync
Code:
source build/envsetup.sh
Code:
lunch
Pick the number of the rom you would like to build
I maintain the 700,300,m7vzw so those are the only ones I can help with
the -j* is how may cpu cores you would like to give to the build process
So -j2 would tell the build process that you have 2 core you would like to use to build
Code:
make clean && make bacon -j2
The flash-able zip will be in the out folder of your build directory
Code:
XDA:DevDB Information
How to build CMB ROM for your TF300T, a Tool/Utility for the Asus Transformer TF300T
Contributors
lj50036
Version Information
Status: Testing
Created 2014-01-17
Last Updated 2014-01-17
Sources
CMB github Click Me
ASOP Click Me
CM wiki Click Me
Java Click Me
Reserved
Download Tab
I posted a downloadable .txt file, so you don't have to have a browser open, for the process.. The download is available in the download tab at the top of every page of this forum... Thx as always lj

[GUIDE] How to Build AOSP Pie Custom ROM for Xperia Devices

WARNING: This guide is only for experienced users only. I will not responsible for any damages that you had been done during modifying your android device!
Prerequisite before setup for custom ROM building:
1. An unlocked Xperia device, which have its support for Pie ROM. See the list of device here
2. Ubuntu 18.04 OS (either on actual installation on HDD or installed on virtualbox only)
3. A powerful PC/laptop
4. 100Mbps internet connection
5. A brain
NOTE: If your device is not unlocked yet, please follow the official guide given by Sony here.
Steps for building the custom ROM:
1. Install OpenJDK JDK version
Code:
sudo apt-get install openjdk-8-jdk
2. Install all of these stuffs (you might need to copy these into text editor and save it as script file:
Code:
sudo apt install -y bc build-essential ccache curl g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop m4 openjdk-8-jdk pngcrush repo rsync schedtool squashfs-tools xsltproc zip zlib1g-dev bison gperf libxml2-utils make zlib1g-dev:i386 liblz4-tool libncurses5 lunch unzip clang
3. Download repo tool (you might be prompted to set up git account access when running curl command):
Code:
mkdir ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
4. Open up .bashrc file:
Code:
nano ~/.bashrc
5. Put these line at the end of the file and save:
Code:
export PATH=~/bin:$PATH
export LC_ALL=C
export USE_CCACHE=1
Then, configure cache limit to 20GB (you have to declare very specific because running ccache -M 20G only straight from the terminal won't work)
Code:
prebuilts/misc/linux-x86/ccache/ccache -M 20G
6. Reload bash variables:
Code:
source ~/.bashrc
7. Initialize repo tree:
Code:
mkdir ~/android
cd ~/android
repo init -u https://android.googlesource.com/platform/manifest -b android-9.0.0_r35
8. Clone the local manifests from GitHub:
Code:
cd .repo
git clone https://github.com/sonyxperiadev/local_manifests
cd local_manifests
git checkout android-9.0.0_r35
cd ../..
9. Downloading the 30-40GB of source codes!:
Code:
repo sync
10. Cherry-pick the upstream patches:
Code:
./repo_update.sh
11. Initializing device type for ROM building:
Code:
source build/envsetup.sh && lunch
or
Code:
source build/envsetup.sh && lunch aosp_[device_model]-userdebug
12. Building the custom ROM ( it will take at about 4-5 hours):
Code:
make -j[number of CPU cores]
13. Flashing your AOSP images (ROM images can be found at android/out/target/product/<device>/ directory):
Code:
fastboot erase cache
fastboot erase userdata
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
14. Flashing OEM images (Download the vendor image corresponding to your device here):
Code:
fastboot flash oem SW_binaries_for_Xperia_AOSP_O_MR0_4.4_<release version>_<platform>.img
15. Reboot your device:
Code:
fastboot reboot
If the device able to boot, then congratulations!...
Guide reference: https://developer.sony.com/develop/...build-instructions/build-aosp-android-p-9-0-0
ADDITIONAL NOTES:
If you're want Google apps installed, follow these steps below:
1. Download OpenGapps from the website here and put the opengapps zip file into microsd card or USB OTG drive.
2. Download Magisk zip file here and put it into microsd card or USB OTG drive.
3. Download the TWRP image here according to your device and flash the recovery or just boot it directly
Code:
fastboot flash recovery TWRP.img
or
Code:
fastboot boot TWRP.img
4. Go to Install and select microSD or USB OTG storage and install opengapps package first.
5. Then, install Magisk package for patching in order to enable Google apps functionalities on AOSP ROM.
6. Wipe cache and reboot the device.
Thanks for the advice
This guide really came in handy, i'm not quite fixed up just yet, but so far has been a real help, thank you

Categories

Resources