[Heimdall 1.4.2] How to install Heimdall 1.4.2 on Ubuntu 21.10. - Android General

Install Heimdall 1.4.2 on Ubuntu 21.10
ABOUT
Heimdall is a cross-platform (runs on Linux, Windows and Mac OSX), open source Odin alternative which uses the same protocol as Odin to interact with a device in download mode, that can be used to flash Android ROMs or Kernels onto Samsung Galaxy S phones.
Ubuntu 21.10 doesn't run qt5 so you have to install the dependencies and make a fake qt5 pkg.
FIRST STEP
open Tilex and install some pkgs.
$ sudo apt install git wget snap unzip
SECOND STEP
Make a fake qt5 default.
$ sudo apt-get update
$ sudo apt-get install equivs
$ cd ~/Downloads
$ cat <<EOF > qt5-default-control
Package: qt5-default
Source: qtbase-opensource-src
Version: 5.99.99+fake-13ubuntu37
Architecture: all
Depends: qtbase5-dev, qtchooser
Suggests: qt5-qmake, qtbase5-dev-tools
Conflicts: qt4-default
Section: libdevel
Priority: optional
Homepage: http://qt-project.org/
Description: Qt 5 development defaults fake package
EOF
$ equivs-build qt5-default-control
$ cd Downloads
$ sudo apt-get install ./qt5-default_5.99.99+fake-13ubuntu37_all.deb
THIRD STEP
Build Heimdall 1.4.2
Download Heimdall from https://gitlab.com/BenjaminDobell/Heimdall/tree/v1.4.2
Unzip and cd into the Heimdall folder.
Install dependencies:
$ sudo apt install qt5-default libgl1-mesa-dev build-essential cmake zlib1g-dev libusb-1.0-0-dev
Create build directory & cd into it:
$ mkdir build
$ cd build
build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make
Heimdall is now compiled and the binary is found in the build/bin folder.

Related

[HOW TO]Building Kernel Source For Any Device

Hello All. I have received several requests for how to build a kernel from source so I figured I would make a guide for anyone looking.
WARNING: I CANNOT BE HELD RESPONSIBLE FOR ANY DAMAGE YOU CAUSE TO YOUR PHONE, PERSONAL RELATIONSHIPS, LIFE, OR CAR. YOU HAVE ALREADY ROOTED YOUR DEVICE SINCE YOU ARE READING THIS SO YOU KNOW IT VOIDS YOUR WARRANTY.
Now that thats over. I will walk you through how to set up a kernel building environment and walk you through building a kernel.
I.) Requirements
1.)You will need a computer. Just about any computer running linux will work, even a Virtual Machine. I will be using Ubuntu Oneiric, Server Edition for my guide. (Most commands are the same across Ubuntu Editions as well as Linux in general.)
2.)Internet Access- the faster the better
3.)Knowledge of the android kernel and what does what.
4.)The Master Branch from Google as well as the source for your device.
5.)ALOT of time.
6.)Common Sense
II.) Installing The Necessary Tools
1.)First we must download the neccesary tools.
To install java, you need to know which version of android you will be developing for.
Froyo and Lower:
Code:
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk
Gingerbread and Newer:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
2.)Next we willl download the tools needed(You need to know if you are on a 64 bit system or 32 bit.)
For 64 bit:
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 xsltproc
Also you must link one thing based on your Ubuntu Version:
For 10.10:
Code:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
For 11.10:
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
For 32 bit:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown libxml2-utils xsltproc
No linking is necessary.
NOTE: You can set up CCache on either setup. However, you will not need it necessarily due to the source is not that big compared to building a rom and therefore will not take as long.http://dnssearch.rr.com/index.php?origURL=http://www.goog.gl/&r=
III.) Downloading The Source
1.)If you already have an android Directory set up, then skip this step. If not, follow these commands. (NOTE:THIS GUIDE FOLLOWS AS IF YOU USE THIS STEP. BE CAREFUL)
Code:
$ cd $HOME
$ mkdir android
$ cd android
2.)Set up your source directory.
Code:
$ mkdir source
$ cd source
$ mkdir aosp (YOUR DEVICE)_kernel repo
$ cd repo
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ./repo
$ chmod 755 repo
$ export PATH=$PATH:$HOME/android/source/repo/
OR
$ sudo cp repo /usr/bin/repo
$ cd ../aosp
$ mkdir master
$ cd master
3.)You are now ready to grab the source. You will need the master branch. So while in the master directory:
Code:
$ repo init -u https://android.googlesource.com/platform/manifest
THIS WILL TAKE A WHILE SO SIT BACK AND RELAX.
4.)Now you need your specific devices source. So follow those steps accordingly to get the source into the directory for you device kernel @ $HOME/android/source/(YOUR DEVICE)_kernel
You now have all the source you need.
V.) Building The Kernel
1.)Now we will set up the environment for the build.
Code:
$ export ARCH=arm
$ export CROSS_COMPILER=arm-eabi-
$ export CROSS_COMPILE=arm-eabi-
$ export PATH=$PATH:$HOME/android/source/aosp/master/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
2.)Now you go into your device's kernel directory.
Code:
$ cd $HOME/android/source/(YOUR DEVICE)_kernel
3.)And begin the configuration.
If you like a gui like menu:
Code:
$ make menuconfig
If you like to answer questions:
Code:
$ make config
4.)Configure your kernel how you want it.
5.)Then, once thats done:
Code:
$ make -j4
This will build the kernel. This can take anywhere from 15 minutes to an hour and a half+.
VI.)Grabbing The Newly Made Kernel
1.) Your kernel will be located at:
Code:
$ $HOME/android/source/(YOUR DEVICE)_kernel/arch/arm/boot/zImage
2.) Your Wireless Module Will depend on your device. For the Ally, it would be:
Code:
$ $HOME/android/source/ally_kernel/drivers/net/wireless/bcm4329/wireless.ko
CONGRATULATIONS!!!
You have built your own kernel.
Now follow http://forum.xda-developers.com/showthread.php?t=748106 to flash it.
Any problems or questions, let me know. Either a PM or I'm almost always in #asus-transformer on IRC.
Wanna donate to me and help me with bills? Follow this link to Donate Via PayPal:
http://goo.gl/ReRPs
Gonna try this. Thanks for sharing...
Sent using my brain
Thanks for working on this. On first look, I think you intended to put a repo sync after the init command here:
3.)You are now ready to grab the source. You will need the master branch. So while in the master directory:
Code:
$ repo init -u https://android.googlesource.com/platform/manifest
THIS WILL TAKE A WHILE SO SIT BACK AND RELAX.
Click to expand...
Click to collapse
Android device
For the device, should it be what our device is named by the company for marketing, etc or is it what is in the build.prop under ro.product.device?? Thanks
pramathesh said:
Gonna try this. Thanks for sharing...
Sent using my brain
Click to expand...
Click to collapse
Sent using my brain <- lol, made my day !
android_owl said:
Sent using my brain <- lol, made my day !
Click to expand...
Click to collapse
glad you liked
@OP: Do I've to make any changes if I were to build from Glitch (SGS) sources for CM7?? Or everything remains the same?
what does (Your device) mean ? its name (example: samsung galaxy ace) or the codename ( example: GT-S5830) ????
Codename
Sent from my Galaxy Nexus using Tapatalk 2

[TUTORIAL] How to build your own AOKP (ICS branch) from source

Here my source if you want build your own AOKP ICS for hTC Pico, you need linux OS (recommended ubuntu 12.04 or ubuntu 12.10 amd64 bit architecture <- im using this) or another distribution linux like latest Debian / Arch. Use Google or wiki how to install linux !!!.
Open terminal application (CTRL+ALT+T) and follow all this step :
1) First update your OS :
Code:
$ sudo apt-get update
$ sudo apt-get upgrade
2) Download the package needed :
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 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 libncurses5-dev:i386 schedtool optipng pngcrush libbluetooth-dev
3) Fix the libGL shortcut issue :
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
4) Download sun-java6 by oracle via ppa :
Code:
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java6-installer
5) Setup installing 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) Create the working folder :
Code:
$ mkdir aokp_ics
$ cd aokp_ics
7) Download the AOKP source code
Code:
$ repo init -u https://github.com/AOKP/platform_manifest.git -b ics
8) Fix issue repositories, hardware, etc with my manifests :
Code:
$ cd .repo/manifests
$ gedit default.xml
9) And replace with this :
Code:
[URL="http://pastebin.com/BZ4gwm7Q"]http://pastebin.com/BZ4gwm7Q[/URL]
10) Sync repository :
Code:
$ cd ../..
$ repo sync
*note : this will take a long time you need fast connection because the size repositories is 8 ~ 12 GB
11) Compile !
Code:
$ . build/envsetup.sh && brunch pico
or
$ source build/envsetup.sh && brunch pico
your patch is very welcome, just forked my repository and pull requests. thank you. happy coders !
source :
http://source.android.com
http://github.com/AOKP
http://github.com/CyanogenMod
http://github.com/digitalcode
reserved
Good tut bro ........
Still many DEVs left including u for our little pico .........
Sent from my HTC Explorer A310e using xda premium
thanks for the great tutorial.
how bout the fixesif got errors?
if AOKP release new build how can we update it without going all the painful 8gb downloading?
sorry noob here.. i hav linux machine here but seldom use.
so i guess i would like to learn how to build.
am looking forward also into MIUI. do you know how to build one from source ?
Do we really need to download that much???
I don't mind downloading 8 to 12 GB, but, I have frequent power fluctuations at my home... So, is there any way by which I can resume the sync-ing process...
//And, to the main question, I use a 32-bit pc. So is it ok to use? Or do I need a 64 bit one?//*never mind.
P.S: I don't seem to understand why we require 8 - 12 GB for compiling something that would be max 200 mB? Is there any reason for this? or can we reduce the download ammount or something like that?
edit: sorry people... i really didn't read the amd64 architecture requirement...
vineethraj49 said:
I don't mind downloading 8 to 12 GB, but, I have frequent power fluctuations at my home... So, is there any way by which I can resume the sync-ing process...
And, to the main question, I use a 32-bit pc. So is it ok to use? Or do I need a 64 bit one?
P.S: I don't seem to understand why we require 8 - 12 GB for compiling something that would be max 200 mB? Is there any reason for this? or can we reduce the download ammount or something like that?
Click to expand...
Click to collapse
ctrl-z to pause
flowish said:
Here my source if you want build your own AOKP ICS for hTC Pico, you need linux OS (recommended ubuntu 12.04 or ubuntu 12.10 <- im using this) or another distribution linux like latest Debian / Arch. Use Google or wiki how to install linux !!!.
Open terminal application (CTRL+ALT+T) and follow all this step :
1) First update your OS :
Code:
$ sudo apt-get update
$ sudo apt-get upgrade
2) Download the package needed :
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 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 libncurses5-dev:i386 schedtool optipng pngcrush libbluetooth-dev
3) Fix the libGL shortcut issue :
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
4) Download sun-java6 by oracle via ppa :
Code:
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java6-installer
5) Setup installing 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) Create the working folder :
Code:
$ mkdir aokp_ics
$ cd aokp_ics
7) Download the AOKP source code
Code:
$ repo init -u https://github.com/AOKP/platform_manifest.git -b ics
8) Fix issue repositories, hardware, etc with my manifests :
Code:
$ cd .repo/manifests
$ gedit default.xml
9) And replace with this :
Code:
[URL]http://pastebin.com/BZ4gwm7Q[/URL]
10) Sync repository :
Code:
$ cd ../..
$ repo sync
*note : this will take a long time you need fast connection because the size repositories is 8 ~ 12 GB
11) Compile !
Code:
$ . build/envsetup.sh && brunch pico
or
$ source build/envsetup.sh && brunch pico
your patch is very welcome, just forked my repository and pull requests. thank you. happy coders !
source :
http://source.android.com
http://github.com/AOKP
http://github.com/CyanogenMod
http://github.com/digitalcode
Click to expand...
Click to collapse
Can I compile cm10.1 from this by just changing the source link ?
Sent from my HTC Explorer A310e using xda premium
vineethraj49 said:
I don't mind downloading 8 to 12 GB, but, I have frequent power fluctuations at my home... So, is there any way by which I can resume the sync-ing process...
And, to the main question, I use a 32-bit pc. So is it ok to use? Or do I need a 64 bit one?
P.S: I don't seem to understand why we require 8 - 12 GB for compiling something that would be max 200 mB? Is there any reason for this? or can we reduce the download ammount or something like that?
Click to expand...
Click to collapse
First of all you require 20GB+ for a Single build and upto 80-100 GBs for a complete set of builds.
Not just 8-12GB
---------- Post added at 09:19 PM ---------- Previous post was at 09:18 PM ----------
DanceOff said:
Can I compile cm10.1 from this by just changing the source link ?
Sent from my HTC Explorer A310e using xda premium
Click to expand...
Click to collapse
Yes.. but you need to add kernel source, device tree and vendors from Sakinidia's github into manifest.xml
Please don't quote the main thread...
It makes the page kind'a long and lengthy to load and read. kindly don't quote the main thread...
vineethraj49 said:
It makes the page kind'a long and lengthy to load and read. kindly don't quote the main thread...
Click to expand...
Click to collapse
ya plz don't do that
aokp ics
Getting this error while compiling aokp ics for galaxy fit...using this device config
http://pastebin.com/PhVVx9kC

[GUIDE][DEV] Compile any source built rom for your device [ULTRA NOOB FRIENDLY]

I know there are many other guides avalable regarding this, But I tried to focus on the small points also that many guides overlook
that's why I have this for you. Do let know if I have missed something or more details have to be included in case still there is a difficulty in compiling
This thread on Madteam Forums: http://madteam.co/forum/development...lt-rom-for-your-device-(ultra-noob-friendly)/
So lets start with simple things
Basic FAQ:
Q: What is a Source built rom?
A: Source Built Roms are roms that are compiled from source on a Linux Platform! They are not themed manually.
Q: How do we build these type of roms?
A: Setup Linux and then follow this guide.
Click to expand...
Click to collapse
This post/guide is divided into 4 parts:
1. Setting up build environment
2. Machine specifications etc.
3. Device Tree and source basics
4. Syncing Source and Building
PART 1: Setting up build environment​
Type sudo su and then your password to get rid of Admin Permissions
#Installing Python
STEP 1: Open terminal (CTRL + ALT + T)
Then execute the following commands in terminal one by one
Code:
sudo apt-get install build-essential gcc
cd Downloads
wget http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz
tar -xvzf Python-2.5.6.tgz
cd Python-2.5.6
./configure --prefix=/usr/local/python2.5
make
sudo make install
sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5
Now Python is configured
#Installing JDK
As far as I know PPA which was the earlier method of installing JDK etc. doesn't exist's anymore, So I used another way!
Step 1: Open Terminal (CTRL + ALT + T)
STEP 2: Now we need to download the JDK 6 Binary by executing this command in terminal
Code:
wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
STEP 3: Then we need to run the binary and move it to a shared location:
Code:
chmod +x jdk-6u45-linux-x64.bin
sudo ./jdk-6u45-linux-x64.bin
sudo mv jdk1.6.0_45 /usr/lib/jvm/
STEP 4: Now you have to install all binaries and give them highest priority, This will also overwrite the previous version of Java Binaries in your computer
Code:
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
STEP 5: Now check if JDK 1.6 is selected on this:
Code:
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
sudo update-alternatives --config jar
sudo update-alternatives --config javadoc
Now JDK is configured! To check if it is done
Execute this is Terminal
Code:
java -version
Output will be similar to this
Code:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
#Installing GNU Make
Code:
cd Downloads
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvzf make-3.81.tar.gz
cd make-3.82
./configure
sudo make install
These commands are for Make 1.81 if you want to install Make 1.82 Execute these
Code:
cd
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.82.tar.gz
tar -xvzf make-3.82.tar.gz
cd make-3.82
./configure
sudo make install
Now GNU make is configures
#Installing Android SDK
STEP ONE: Download the SDK from http://developer.android.com/sdk/index.html and extract it in a folder called "sdk" in the Downloads folder
STEP TWO: Now, Execute these commands in terminal
Code:
cd ~/Downloads/sdk/tools/
./android sdk
SDK is configured now :victory:
#Installing required packages:
STEP 1: Open Terminal
Now execute these commands:
Code:
apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils xsltproc pngcrush gcc-multilib lib32z1 schedtool
Good, Now you have successfully setup linux build environment!​
PART 2: Machine specifications and other misc. stuff​
Basic Computer Specs:
2Ghz Dual Core Processor
2GB Minimum ram
50GB File Space (For only one rom source)
*PLEASE NOTE*: This is the basic specification, It really depends on the condition of your ram and cpu!
If you want to use other apps while compilation you should make a 5GB minimum swap partition!
If ram is more than 4GB ram then you don't swap partition!
PART 3: DEVICE TREE AND SOURCE BASICS​
Basic source folders:
/packages - Proprietary rom applications
/framework - Framework (Overall rom UI and stuff)
/device - Device config
/vendor - Vendor Tree and other vendor files
/hardware - Hardware drivers
Q: What is BoardConfig.mk?
A: It's the file where you setup path's to files like toolchain etc. and enable/disable stuff, its very easy to understand. You can find it in your device's tree
Q: Where is build.prop in source?
A. Build.prop is available in the source in the form of system.prop in the device tree!
Q: How to remove ringtones, video editor, CM wallpapers from bulid?
A: Go to device/releasetools/extras.txt and Delete anything you don't want in your build
PART 4: Syncing Source and Building​
# Installing Repo Package
Code:
mkdir ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
STEP 2: Now it is recommended to reboot your computer (No need of sudo su after reboot)
STEP 3: Now make directory:
Code:
mkdir -p ~/rom/android/system
STEP 4: Go into directory and set path for Repo Package
Code:
cd ~/rom/android/system
PATH=~/bin:$PATH
STEP 5: NOW ITS TIME FOR SYNCING:
Their are different sources for different roms:
Some are listed bellow:
MIUI - www.github.com/micode/
Rootbox - www.github.com/Root-Box/
rasbeanjelly - www.github.com/rascarlo/
Xylon AOSP - www.github.com/xyaosp/
PAC-Man - www.github.com/PAC-Man/
CyanogenMod - www.github.com/Cyanogenmod/
CarbonROM - www.github.com/carbondev/
SaberMOD - www.github.com/SaberMOD/
AOKP - www.github.com/AOKP/
From the above collection some are Gingerbread some are ICS and some are JB 4.1/4.2 you have to visit these links via browser and see which source is which and follow the commands given at android.git/platform_manifest.git
Click to expand...
Click to collapse
For CM10.1 source execute this:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm10.1
For syncing CM10 source execute:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
You have to find for the rest!!
PS: You don't have to execute all the repo init commands written above
Now to sync execute this after the the repo init command
Code:
repo sync
Once it finishes without breaking all the folders will appear in rom/android/system folder
now execute this:
Code:
mkdir -p ~/rom/android/system/device/<ManufacturerName>/<DeviceCodeName>
and extract the device config/tree here
for me its samsung/totoro (galaxy Y, Don't mind )
then do the following:
Code:
mkdir -p ~/rom/android/system/vendor/<ManufacturerName>/<DeviceCodename>
Its the same as for the device folder
Now for compiling:
Code:
. build/envsetup.sh
lunch cm_<DeviceCodename>-eng
brunch cm_<DeviceCodename>-eng
Your build will be located at /rom/android/system/out as <RomName>-date/month/year-UNOFFICIAL-<DeviceCodeName>.zip
HAPPY COMPILING ​
Credits:
MadTeam (motafoca, whitexp etc.) for MADTeam Forums and many help
Team Broadcom CM (bieltv.3, SpaceCaker, Psychogame etc.) for giving my device a quite stable cm.. I learnt to compile because of them! Cheers
BeerGang
mithun46
abhisahara
galaxyfreak
cybojenix
Sniper Killer for supporting me a lot! Thanks dude
prototype-U for Supporting..
Others who supported me
IF YOU LIKE MY GUIDE, DO RATE THIS THREAD A FIVE STAR!
THOSE WHO ARE FACING ERRORS, DO POST YOUR PROBLEM at speed_bot's Source Building Help Thread ​
Good good !! Nicely compiled
abhisahara said:
Good good !! Nicely compiled
Click to expand...
Click to collapse
Thanks
I'll update this guide whenever I get time
Good work on this, I found it quite clear keep up the good work!
Sent from my GT-I9505 using Tapatalk 4 Beta
nicely copied
Aniruddh Chandratre said:
nicely copied
Click to expand...
Click to collapse
Just read what I said at the begging of the thread!
If you are too lazy then:
I know there are many other guides avalable regarding this, But I tried to focus on the small points also that many guides overlook
that's why I have this for you. Do let know if I have missed something or more details have to be included in case still there is a difficulty in compiling
Click to expand...
Click to collapse
And yes, I took reference from others guide... I do give credits!
Have you ever compiled it(successfully) yourself?
Sent from my HTC Desire X using xda app-developers app
prototype-U said:
Have you ever compiled it(successfully) yourself?
Sent from my HTC Desire X using xda app-developers app
Click to expand...
Click to collapse
Yes.. I did..
Thanks for your support
Arnav.G said:
Yes.. I did..
Thanks for your support
Click to expand...
Click to collapse
Where is it?
Sent from my HTC Desire X using xda app-developers app
prototype-U said:
Where is it?
Sent from my HTC Desire X using xda app-developers app
Click to expand...
Click to collapse
It will come...
Please don't spam the thread now! I know you are a RC and you know the rules but still.. Please
http://xda-university.com/as-a-developer/getting-started-building-android-from-source
Nice simplifications...
Noob friendly? Lol! Did you test it on yourself!
When I run the binaries on jdk
I get errors on the 2nd command-Syntax error
Why >
Fang Leone said:
When I run the binaries on jdk
I get errors on the 2nd command-Syntax error
Why >
Click to expand...
Click to collapse
Can you please explain your problem in a little more details?
"This Story Ends Where It Began" - Octavarium (Dream Theater)
Sent from my GT-I9505
Great Guide!!
This is very kind of you to make this helpful thread. It really helped me alot after setting up my new build environment. I ran into an error on you post that you may want to correct, other than that, great work! Here is the typo
"cd Downloads
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvzf make-3.81.tar.gz<--this is correct.
cd make-3.82<---it changes here.
./configure
sudo make install"
Hello guys!
I have an error at brunch:
Code:
host Java: guavalib (/home/richard/android/system/out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/classes)
logtags: /home/richard/android/system/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/content/EventLogTags.java <= frameworks/base/core/java/android/content/EventLogTags.logtags
logtags: /home/richard/android/system/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/speech/tts/EventLogTags.java <= frameworks/base/core/java/android/speech/tts/EventLogTags.logtags
logtags: /home/richard/android/system/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/webkit/EventLogTags.java <= frameworks/base/core/java/android/webkit/EventLogTags.logtags
[B]make: *** No rule to make target `/home/richard/android/system/out/host/linux-x86/bin/dx', needed by `/home/richard/android/system/out/target/common/obj/APPS/Apollo_intermediates/proguard.classes-with-local.dex'. Stop.[/B]
make: *** Waiting for unfinished jobs....
logtags: /home/richard/android/system/out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/src/src/java/com/android/internal/telephony/EventLogTags.java <= frameworks/opt/telephony/src/java/com/android/internal/telephony/EventLogTags.logtags
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Anyone knows what's causing it? It couldn't be the roomservice.xml in local_manifest as I used the one which another person successfully built CM with. I also repo sync'ed a few times already. I tried make clobber and built again, but nothing :crying:
I am building PACMAN ROM (4.3) now by the way.
All help is appreciated (with a thank!)
Greedings everyone
For some time now i am trying to download and compile CyanongenMod Sources for my Device. I Install VirtualBox + Linux Mint + all the needed stuff. Then i do the repo init and everything looks ok but when i do the repo sync it always throw me a error fetch stop because of sync errors. Ive done it a lot of time with no luck. Also i tried the repo sync -f which finaly finishes fetching things but stops at getting the project tree. Can anyone help me? :/ its really frustrating
vale amicis said:
I know there are many other guides avalable regarding this, But I tried to focus on the small points also that many guides overlook
that's why I have this for you. Do let know if I have missed something or more details have to be included in case still there is a difficulty in compiling
This thread on Madteam Forums: http://madteam.co/forum/development...lt-rom-for-your-device-(ultra-noob-friendly)/
So lets start with simple things
Basic FAQ:
This post/guide is divided into 4 parts:
1. Setting up build environment
2. Machine specifications etc.
3. Device Tree and source basics
4. Syncing Source and Building
PART 1: Setting up build environment​
Type sudo su and then your password to get rid of Admin Permissions
#Installing Python
STEP 1: Open terminal (CTRL + ALT + T)
Then execute the following commands in terminal one by one
Code:
sudo apt-get install build-essential gcc
cd Downloads
wget http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz
tar -xvzf Python-2.5.6.tgz
cd Python-2.5.6
./configure --prefix=/usr/local/python2.5
make
sudo make install
sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5
Now Python is configured
#Installing JDK
As far as I know PPA which was the earlier method of installing JDK etc. doesn't exist's anymore, So I used another way!
Step 1: Open Terminal (CTRL + ALT + T)
STEP 2: Now we need to download the JDK 6 Binary by executing this command in terminal
Code:
wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
STEP 3: Then we need to run the binary and move it to a shared location:
Code:
chmod +x jdk-6u45-linux-x64.bin
sudo ./jdk-6u45-linux-x64.bin
sudo mv jdk1.6.0_45 /usr/lib/jvm/
STEP 4: Now you have to install all binaries and give them highest priority, This will also overwrite the previous version of Java Binaries in your computer
Code:
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
STEP 5: Now check if JDK 1.6 is selected on this:
Code:
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
sudo update-alternatives --config jar
sudo update-alternatives --config javadoc
Now JDK is configured! To check if it is done
Execute this is Terminal
Code:
java -version
Output will be similar to this
Code:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
#Installing GNU Make
Code:
cd Downloads
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvzf make-3.81.tar.gz
cd make-3.82
./configure
sudo make install
These commands are for Make 1.81 if you want to install Make 1.82 Execute these
Code:
cd
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.82.tar.gz
tar -xvzf make-3.82.tar.gz
cd make-3.82
./configure
sudo make install
Now GNU make is configures
#Installing Android SDK
STEP ONE: Download the SDK from http://developer.android.com/sdk/index.html and extract it in a folder called "sdk" in the Downloads folder
STEP TWO: Now, Execute these commands in terminal
Code:
cd ~/Downloads/sdk/tools/
./android sdk
SDK is configured now :victory:
#Installing required packages:
STEP 1: Open Terminal
Now execute these commands:
Code:
apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils xsltproc pngcrush gcc-multilib lib32z1 schedtool
Good, Now you have successfully setup linux build environment!​
PART 2: Machine specifications and other misc. stuff​
Basic Computer Specs:
2Ghz Dual Core Processor
2GB Minimum ram
50GB File Space (For only one rom source)
*PLEASE NOTE*: This is the basic specification, It really depends on the condition of your ram and cpu!
If you want to use other apps while compilation you should make a 5GB minimum swap partition!
If ram is more than 4GB ram then you don't swap partition!
PART 3: DEVICE TREE AND SOURCE BASICS​
Basic source folders:
/packages - Proprietary rom applications
/framework - Framework (Overall rom UI and stuff)
/device - Device config
/vendor - Vendor Tree and other vendor files
/hardware - Hardware drivers
Q: What is BoardConfig.mk?
A: It's the file where you setup path's to files like toolchain etc. and enable/disable stuff, its very easy to understand. You can find it in your device's tree
Q: Where is build.prop in source?
A. Build.prop is available in the source in the form of system.prop in the device tree!
Q: How to remove ringtones, video editor, CM wallpapers from bulid?
A: Go to device/releasetools/extras.txt and Delete anything you don't want in your build
PART 4: Syncing Source and Building​
# Installing Repo Package
Code:
mkdir ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
STEP 2: Now it is recommended to reboot your computer (No need of sudo su after reboot)
STEP 3: Now make directory:
Code:
mkdir -p ~/rom/android/system
STEP 4: Go into directory and set path for Repo Package
Code:
cd ~/rom/android/system
PATH=~/bin:$PATH
STEP 5: NOW ITS TIME FOR SYNCING:
For CM10.1 source execute this:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm10.1
For syncing CM10 source execute:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
You have to find for the rest!!
PS: You don't have to execute all the repo init commands written above
Now to sync execute this after the the repo init command
Code:
repo sync
Once it finishes without breaking all the folders will appear in rom/android/system folder
now execute this:
Code:
mkdir -p ~/rom/android/system/device/<ManufacturerName>/<DeviceCodeName>
and extract the device config/tree here
for me its samsung/totoro (galaxy Y, Don't mind )
then do the following:
Code:
mkdir -p ~/rom/android/system/vendor/<ManufacturerName>/<DeviceCodename>
Its the same as for the device folder
Now for compiling:
Code:
. build/envsetup.sh
lunch cm_<DeviceCodename>-eng
brunch cm_<DeviceCodename>-eng
Your build will be located at /rom/android/system/out as <RomName>-date/month/year-UNOFFICIAL-<DeviceCodeName>.zip
HAPPY COMPILING ​
Click to expand...
Click to collapse
I had two things to ask
1)Was installing android-sdk needed
2)If device not yet had a cm build or device tree how to get them

[How to][Build ZOMBI ][ TF700T ][ UBUNTU BASED 64bit]

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...
Make sure unless it says to that you run all these commands in the home folder....
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 lzop ccache gedit
Code:
mkdir -p ~/bin
Code:
mkdir -p ~/android/system/zombi
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/zombi
Code:
repo init -u git://github.com/zombi-x/platform_manifest.git -b lp5.1
You will be prompt to give your email and name just follow the steps on screen
Then run the init command again
Code:
repo init -u git://github.com/zombi-x/platform_manifest.git -b lp5.1
Prepare to wait for a massive download 3 to 10 hours depending on your internet speed...
Code:
repo sync
OPEN JDK
Code:
sudo apt-get install openjdk-7-jdk
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/zombi
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
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 zombi for your TF700T, ROM for the Asus Transformer TF700
Contributors
lj50036, sbdags, hardslog
ROM OS Version: 5.1.x KitKat
Based On: OMNIROM
Version Information
Status: Beta
Beta Release Date: 2014-09-01
Created 2014-09-02
Last Updated 2014-09-08
GAPPS
This building of the ROM will only give you the base ROM .....
It will not have aroma, it will not have alot of stuff .....
You will need a gapps of some kind ......
MORE TO COME
Reserved
Thanks. Going with 32bit Mint on an old laptop... and 64bit in virtual machine on desktop
This post is gold
Thanks Josh, looking forward to building a rom myself later on when I am back home
Sent from my K00C using XDA Premium HD app
Hi Josh, I have just built my first rom using your instructions, I will test flash it tomorrow keeping all my fingers crossed
Thanks
Sent from my K00C using XDA Premium HD app
sbdags said:
This post is gold
Click to expand...
Click to collapse
yep, I have just installed my first build on to my old tf201, cheers lads
Sent from my K00C using XDA Premium HD app
If you use fedora, you need to downgrade the java packages:
sudo rpm -ivh http://www.nic.funet.fi/pub/Linux/I....7.0-openjdk-1.7.0.60-2.4.3.0.fc20.x86_64.rpm http://www.nic.funet.fi/pub/Linux/I...penjdk-devel-1.7.0.60-2.4.3.0.fc20.x86_64.rpm http://www.nic.funet.fi/pub/Linux/I...jdk-headless-1.7.0.60-2.4.3.0.fc20.x86_64.rpm --nodeps
Click to expand...
Click to collapse
and fix the old java to be used instead of the current one:
sudo alternatives --config java
sudo alternatives --config javac
Click to expand...
Click to collapse
and select the older java for the both.

Compile Heimdall 1.4.2

Hello,
I try to install LineageOS on a Samsung Galaxy A5 (2016).
I'm following the instructions on the Lineage website (I can't post links for now) but I had issues with Heimdall 1.4.0, I read I had to install and compile Heimdall 1.4.2 so I followed those instructions :
Compile with CMake
Download and install MSYS2 to set up a MinGW-W64 build environment. After installing, a terminal will launch. Issue the following commands:
$ pacman -Syu
$ pacman -S mingw-w64-x86_64 mingw-w64-x86_64-clang mingw-w64-x86_64-cmake mingw-w64-x86_64-libusb mingw-w64-x86_64-qt5-static make git
$ export PATH="/mingw64/bin:$PATH"
$ git clone git://github.com/Benjamin-Dobell/Heimdall.git
$ mkdir -p Heimdall/build
$ cd Heimdall/build
$ cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DQt5Widgets_DIR=/mingw64/qt5-static/lib/cmake/Qt5Widgets ..
$ make
It worked until the part in which I have to enter this command :
$ cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DQt5Widgets_DIR=/mingw64/qt5-static/lib/cmake/Qt5Widgets ..
I have the following message : CMake Error: The source directory "..." does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Do you have a solution ?
I read people claiming it's easier to use Odin and others claiming I should stick with Heimdall... For now I'd like to try with Heimdall and if I really can't find a solution for this I'll try with Odin.
Thank you !

Categories

Resources