[GUIDE]Compile CM7 AOSP (Kanged edition) For Speedy on Linux - EVO Shift 4G General

Ok so I was searching and searching for a guide on how to compile CM7 source, and finally found a way to do it on the latest Ubuntu 11.10 oneiric
Updated info for non-debian based systems thanks to Vicodan:
If you want to use this on fedora or non-debian based systems you will need to replace every command that says apt-get to yum. Thanks to Vicodan for pointing this out as I do not use fedora myself.
Hardware Requirements:
- A minimum dual core pc, the more ram the better
- A working wifi connection
- Linux Operating System. Either 32-bit or 64-bit will work
NOTE: 64-bit will run faster
Optional Recommended Software:
Many of these can be found in the software center using the search box
If you find multiple versions it's ok to install them all, unless it says
otherwise
- Python
Alternatively open the terminal application and type
Code:
$ sudo app-get install python
Note: Enter your login password to install
- awk and gawk
- 7zip
- RAR
Code:
$ sudo apt-get install rar
Step 1 java:
Setting up java is one of the most important step to getting your pc prepared for a build environment. First check the java version that is installed on your pc
NOTE: On Ubuntu 11.10, and variants, you need to enable the
parter repository to install sun-java6-jdk:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
Code:
$ java -version
The correct version is:
Code:
java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
You must have a 1.6.x to compile on the gingerbread branch of cyanogenmod. If you have the correct version skip down to Step 2.
1a - First install the correct version:
Code:
$ sudo apt-get install sun-java6-jdk sun-java6-jre
1b - Now you will need to manually remove the other java version
Code:
$ sudo nautilus
This will open up a root file explorer. Once it opens click on the "file
system" tab on the left and navigate to the /usr/lib/jvm
Once there you should see two types of java. If you see java open jdk
you need to delete it, along with it's associated bin folder. Close the
root file explorer window
1c - Edit .bashrc
Next navigate to your home folder and open up the .bashrc file. This is
a hidden file so you will have to press Ctrl + H to see it. Add the
following lines to the top section, and change accordingly to your path
Example:
Code:
#JavaDev PATH
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24
export PATH=$PATH:$JAVA_HOME/bin
Save the file and exit, then changes will not take effect until reboot
Verify java version again
Code:
$ java -version
Step 2 - Install git
http://help.github.com/linux-set-up-git/
or
Code:
$ sudo apt-get install git
Step 3 - Prepare the Build Environment
NOTE: You only need to do these steps the first time you build.
If you previously prepared your build environment, skip to Copy
proprietary files.
3a - Install the ADB
Install the Android SDK. http://wiki.cyanogenmod.com/index.php?
title=Howto:_Install_the_Android_SDK
3b - Install the Build Packages
Install using the package manager of your choice:
For 32-bit & 64-bit systems:
Code:
$ [COLOR="red"]sudo apt-get install[/COLOR] 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
For 64-bit only systems:
Code:
$ [COLOR="red"]sudo apt-get install[/COLOR] g++-multilib lib32z1-dev lib32ncurses5-dev [COLOR="Red"]lib32readline-gplv2-dev[/COLOR] [COLOR="Red"]gcc-multilib g++-multilib[/COLOR]
3c - Create the Directories
You will need to set up some directories in your build environment.
To create them:
Code:
$ mkdir -p ~/bin
$ mkdir -p ~/android/system
3d - Install the Repository
Enter the following to download make executable the "repo" binary:
Code:
$ [COLOR="red"]curl https://raw.github.com/android/tools_repo/master/repo > ~/bin/repo[/COLOR]
$ chmod a+x ~/bin/repo
NOTE: You may need to reboot for these changes to take effect.
Now enter the following to initialize the repository:
Code:
$ cd ~/android/system/
$ [COLOR="red"]repo init -u git://github.com/CyanogenMod/android.git -b gingerbread --repo-url=git://github.com/android/tools_repo.git[/COLOR]
$ repo sync
3e - Copy proprietary files
NOTE: This only needs done the first time you build. If you have
already done these steps, you may skip to Download RomManager.
You will need to have a speedy with a working copy of CyanogenMod
install and ADB working on the computer. This script will copy the
proprietary files from the device.
Connect the device to the computer and ensure that ADB is working
properly.
Code:
$ cd ~/android/system/device/htc/speedy/
./extract-files.sh
3f - Download RomManager
NOTE: This only needs to be done when an update to
RomManager is released. If you are-up-to date, you may skip to Building
CyanogenMod. Download RomManager which is needed by the build:
Code:
$ ~/android/system/vendor/cyanogen/get-rommanager
3g - Building CyanogenMod
Check for updates
First, check for updates in the source:
Code:
$ cd ~/android/system/
$ repo sync
$ cp build/core/root.mk -f Makefile
3h - Set up your Compiler
This is optional but helpful for kernel compiling
There are a lot of things that need to be added to the .bashrc to let your
pc know about which type of compiler you want to use. The best way is
to use the one provided in the CM7 work tree.
Code:
[COLOR="red"]#Android[/COLOR]
export ARCH=arm
export CCOMPILE=$CROSS_COMPILE
export PATH=$PATH:~/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
3i - Configure Build & Compile
Now, the environment must be configured to build and the ROM
compiled, from code, for the Speedy.
Code:
$ . build/envsetup.sh && brunch speedy
3j - Install
Copy your .zip file from
~/android/system/out/target/product/speedy/update.cm-XXXXX-
signed.zip to the root of the SD card.
Optional: Download Google Apps for CyanogenMod 7 and place it on the
root of the SD card.
Flash both of these .zip files from recovery.

Nice write up. When I have time I'll see if it works for me.

riggsandroid said:
Nice write up. When I have time I'll see if it works for me.
Click to expand...
Click to collapse
Yeah this was a quick write up. The main thing is you have to reboot every time you edit your .bashrc, or copy and paste it into terminal
Also I'll be doing a how to compile kernel, hopefully soon

Or just when you change your bashrc, just source the bashrc script
. ~/.bashrc
Sent from my PG06100 using XDA App

Has anyone tried a swap file yet? I just set mine up and it seems to speed compiling up quite a bit. I went off of this guide but I made mine 1.6GB in size
https://help.ubuntu.com/community/SwapFaq

You are a savior... I have been trying to get this running on my natty tower, but have had little success... This write up will be very handy... Thank you for the excellent write up and the time for doing it...
Sent from my PG06100 using Tapatalk

New java update?
I noticed that my java was not all the way up to date. I went into recovery and selected fix broken packages and then it updated my java to this version:
~$ java -version
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
On a side note it also updated my python and some other things. Make sure you have internet that is not wifi

guide updated for korg workaround. Changes are labeled in red

Repo not found?
Followed Directions to the T, Currently Hung up on
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b gingerbread --repo-url=git://github.com/android/tools_repo.git
Tells me repo command not Found
EDIT: I'm sorry hows about more info?, Ubuntu 11.10 64bit need anymore just ask

Nice guide. Can I do this on Fedora?

riggsandroid said:
Nice write up. When I have time I'll see if it works for me.
Click to expand...
Click to collapse
...6 months later.
Ya find any of that time yet, Riggs?

JaceAlvejetti said:
Followed Directions to the T, Currently Hung up on
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b gingerbread --repo-url=git://github.com/android/tools_repo.git
Tells me repo command not Found
EDIT: I'm sorry hows about more info?, Ubuntu 11.10 64bit need anymore just ask
Click to expand...
Click to collapse
Did you set up ~/bin/repo yet? Never had that issue before. Probably need to reboot once for the repo to take effect. Just like it says on the OP.
Sent from my PG06100 using xda premium

VICODAN said:
Nice guide. Can I do this on Fedora?
Click to expand...
Click to collapse
I wish I knew more about fedora, but I just don't, sorry.
Sent from my PG06100 using xda premium

sparksco said:
I wish I knew more about fedora, but I just don't, sorry.
Sent from my PG06100 using xda premium
Click to expand...
Click to collapse
It works fine on fedora just change the apt-get to yum

Great guide, thanks sparksco
Sent from my PG06100 using Tapatalk

VICODAN said:
It works fine on fedora just change the apt-get to yum
Click to expand...
Click to collapse
Sweet thanks for pointing that out. I've been meaning to update this guide when I have time later when I get home I'll update more info on it. I've also been wanting to try fedora for quite some time.
Sent from my PG06100 using xda premium

jesusice said:
...6 months later.
Ya find any of that time yet, Riggs?
Click to expand...
Click to collapse
I was wondering about this too
Sent from my PG06100 using xda premium

OP updated
Updated OP to include Vicodan's instructions and this is to build kanged editions of Cyanogenmod. I will also start posting my own versions of the kanged builds here when I get a build that will include my own extra mods.

Awesome guide. I'll be trying this soon. Tonight, if the wife and kids cooperate. Which usually translates to 'a week from now' lol...
Sent from my SPH-D700 using Tapatalk

NawtyB78 said:
Awesome guide. I'll be trying this soon. Tonight, if the wife and kids cooperate. Which usually translates to 'a week from now' lol...
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
Its all good. me and sparksco use regular Ubuntu and it runs great

Related

Building a Development VM

Hello,
Has anyone built a development VM for android? Specifically for native development windows is less that useful.
I've started building up one with all the android tools, is there interest in releasing something like this as a sort of android quick start?
andrew500 said:
Hello,
Has anyone built a development VM for android? Specifically for native development windows is less that useful.
I've started building up one with all the android tools, is there interest in releasing something like this as a sort of android quick start?
Click to expand...
Click to collapse
Think I finally got mine working yesterday.. latest Ubuntu in virtualbox... getting the right java version was the biggest PITA of the whole process. I'll have to go back an look at the size of the VDI but I think it was rather large...
andrew500 said:
Hello,
Has anyone built a development VM for android? Specifically for native development windows is less that useful.
I've started building up one with all the android tools, is there interest in releasing something like this as a sort of android quick start?
Click to expand...
Click to collapse
i'm trying to do it...but does'not able to upload apps on real device... see the post thread number 702847.
bye
andrew500 said:
Hello,
Has anyone built a development VM for android? Specifically for native development windows is less that useful.
I've started building up one with all the android tools, is there interest in releasing something like this as a sort of android quick start?
Click to expand...
Click to collapse
This is what I did... I think my VDI is like 18GB but I have two copies of the android source (eclair & froyo) so it could probably shrink if I removed one.
1) Install Virtual Box (www.virtualbox.org)
2) Create a new linux virtual machine with atleast 25GB dynamic drive
3) Install Ubuntu 10.04 32-bit version (http://www.ubuntu.com)
3a) Install Virtual Box Guest Additions
3b) Perform Ubuntu updates
4) Open Ubuntu Software Center
4a) Edit Menu => Software Sources
4b) Other Software tab and Add "deb http://cz.archive.ubuntu.com/ubuntu jaunty-updates main multiverse"
4c) Search for JDK, install Sun Java(TM) Development Kit (JDK) 5.0 sun-java5-jdk
5) Open System => Administration => Synaptic Package Manager
5a) Uninstall default-jdk, openjdk-6-jdk, openjdk-6-jre-lib, openjdk-6-jre-headless, icedtea-6-jre-cacao, ca-certificates-java
6) Open a terminal window, enter these commands:
$ sudo apt-get install git-core flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
$ cd ~
$ mkdir bin
$ curl http://android.git.kernel.org/repo >~/bin/repo
$ chmod a+x ~/bin/repo
$ mkdir android
$ ~/bin/repo init -u git://android.git.kernel.org/platform/manifest.git
$ ~/bin/repo init
$ cd android
$ make
*cough*
script it
do it that looks interesting to run yet depressing to build... I'll run it before school starts.. wait now I'm tempted to do crazy apt gets as i have karmic installed. maybe I can get away with it?
wow man those instructions look rough... but well worth doing.. from the starting out perspective. I need to stop.
I got an environment going from the android x86 project. but it has no sound, or wacom touchscreen support. the mouse worked differently on the m200 from the test run of the t60. lots of issues. but wifi on both worked. need kernel compiled{,?in?} modules for everything else it seems.
http://forum.xda-developers.com/showthread.php?p=6884690#post6884690
I sent a pm to move the thread.

[Guide] How to compile and install CM10 for Samsung i9300

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
LINKS
This guide is a Device-specific update of one of the following guides:
http://wiki.cyanogenmod.com/wiki/Samsung_Galaxy_S:_Compile_CyanogenMod_(Linux)
http://forum.xda-developers.com/showthread.php?t=1505006
http://forum.xda-developers.com/showthread.php?t=1533711
http://forum.xda-developers.com/showthread.php?t=1779426
DISCLAIMER
Although it's very good described I'm not responsible for any damage to you- or you phone
THANKS
PMOS69
stbenz
rycus86
kasper_h
gmhafiz
REQUIREMENTS:
Linux - Ubuntu/Linux Mint system - 64bit
i9300 with cm10 already installed (grab it from get.cm)
30 GB storage on HD/SSD (SSD is preferable in building speed)
__________________
1 - Install Debian Packages
1.1 - In terminal:
Code:
sudo apt-get install git-core gnupg flex bison python rar original-awk gawk p7zip-full gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool
sudo apt-get install libc6-dev x11proto-core-dev libx11-dev libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils
sudo apt-get install g++-multilib lib32z1-dev ia32-libs lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib xsltproc
2 - Install JAVA
2.1 - Install Java JDK for Linux 64-bit (1.6)
Code:
sudo apt-get install openjdk-6-jdk
3 - Install Android SDK
3.1 - Setup directories:
Code:
cd ~
mkdir android
cd android
mkdir sdk
3.2 - Download Android SDK http://developer.android.com/sdk/index.html
3.3 - Extract SDK contents to ~/android/sdk
3.4 - Add Android SDK Path:
Code:
sudo gedit ~/.bashrc
Enter the Following:
Click to expand...
Click to collapse
Code:
#Android PATH
export PATH=$PATH:~/android/sdk
export PATH=$PATH:~/android/sdk/platform-tools
export PATH=$PATH:~/android/sdk/tools
3.5 - Add Extra Path For Device:
Code:
sudo gedit /etc/udev/rules.d/99-android.rules
Enter this:
Click to expand...
Click to collapse
Code:
#Samsung
SUBSYSTEM==usb, SYSFS{idVendor}==04e8, MODE=0666
SUBSYSTEM=="usb", ATTRS{idVendor}=="####:####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
TEST=="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"
Save/close file and run:
Click to expand...
Click to collapse
Code:
sudo chmod +x /etc/udev/rules.d/99-android.rules
3.6 - Close and open new terminal.
3.7 - Install Android SDK Tools
Code:
android
Check Android SDK Tools and Android SDK platform-tools and Install them
Click to expand...
Click to collapse
4 - Install Repository
4.1 - Download Repo:
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
4.2 - Add Repo Path:
Code:
sudo gedit ~/.bashrc
Enter the following:
Click to expand...
Click to collapse
Code:
export PATH=$PATH:~/bin
4.3 - Close and open new terminal.
4.4 - Initialize Repository & Sync:
Code:
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
repo sync -j16
NOTE: If you have trouble syncing due to connection issues, try repo sync -j1. It's slower but some ISPs have issues with -j16. Want to make sure you didn't get any connection errors and have the complete repository? Just run the repo sync command again. It can't give you ANY errors.
Click to expand...
Click to collapse
4.5 - Get Device Specific Repos:
Code:
. build/envsetup.sh && breakfast i9300
4.6 - Extract files from phone:
Connect your phone (with CM10 installed) to your pc and in terminal type:
Click to expand...
Click to collapse
Code:
adb root
cd ~/android/system/device/samsung/i9300
./proprietary-files.sh
4.7 - Download Extra Files:
Code:
~/android/system/vendor/cm/get-prebuilts
4.8 - Add Toolchain PATH:
Code:
sudo gedit ~/.bashrc
Enter the following:
Click to expand...
Click to collapse
Code:
#Android Toolchain PATH
export ARCH=arm
export CCOMPILE=$CROSS_COMPILE
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:/home/YOUR-USERNAME/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
4.9 - Close and open new terminal
5 - Building Android
Code:
cd ~/android/system
. build/envsetup.sh && brunch i9300
6 - Install on Phone
6.1 - Copy your .zip file from ~/android/system/out/target/product/i9300/cm-10-XXXXXXXXX-UNOFFICIAL-i9300.zip to the root of the SD card.
6.2 - Optional: Download Google Apps for Jelly Bean from http://goo.im/gapps
6.3 - Flash both of these .zip files from recovery.
7 - Update
Code:
cd ~/android/system
repo sync -j16
make installclean
find ./out/ -name 'build.prop' | xargs rm
find ./out/ -name 'cm_i9300-target_files-eng.*.zip' | xargs rm
. build/envsetup.sh && brunch i9300
8 - CyanogenMod 10.1
8.1 - Backup and delete following folders:
Code:
~/android/system/vendor/samsung/i9300
~/android/system/vendor/samsung/smdk4412-common
~/android/system/device/samsung/i9300
8.2 - Initialize Repository & Sync:
Code:
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
repo sync
8.3 - Edit local.manifest.xml
Code:
gedit ~/android/system/.repo/local_manifest.xml
Add this:
Click to expand...
Click to collapse
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_samsung_i9300" path="device/samsung/i9300" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_smdk4412-common" path="device/samsung/smdk4412-common" remote="github" />
</manifest>
8.4 - Get Device Specific Repos:
Code:
. build/envsetup.sh && breakfast i9300
8.5 - Extract files from phone:
Connect your phone (with CM10.1 installed) to your pc and in terminal type:
Click to expand...
Click to collapse
Code:
adb root
cd ~/android/system/device/samsung/i9300
./proprietary-files.sh
or
Click to expand...
Click to collapse
8.5 - Download the following folders/files (and put in vendor/samsung):
https://github.com/TheMuppets/proprietary_vendor_samsung/tree/cm-10.1/i9300
https://github.com/TheMuppets/proprietary_vendor_samsung/tree/cm-10.1/smdk4412-common
8.6 - Building Android:
Code:
cd ~/android/system
. build/envsetup.sh && brunch i9300
9 - Armageddon
Only in emergency and nothing helps to get it back working
Click to expand...
Click to collapse
Code:
make clobber
Nice guide! Building now, hope I set up everything right and didn't forget anything. Couple notes/questions though.
1. You list Debian based system as a requirement, but I think you should make it more clear and change it to Ubuntu based. When installing the packages under Debian 6.0.6 very many didn't have installation candidate under that particular name. With Ubuntu 12.04 on the other hand everything installed smoothly.
2. Am I right in assuming that the step where the proprietary files are fetched from the phone is not needed during the update procedure?
Very happy about this. Had been thinking about learning to build myself but always crumbled in the device specific section and wasn't motivated enough to go on. This guide helped a lot! :good: Maybe now it's time to learn to apply some cherry picks to the rom for myself ^^
Dont need to be running CM10 on phone as long as you have root on stock. It is pulling certain files from the system.
You dont need to add the toolchain to your path. That is handled by the build script.
Dont need SDK either. Part of repo.
Thanks for the guide.
Sent from my GT-I9300 using xda premium
b-eock said:
Dont need to be running CM10 on phone as long as you have root on stock. It is pulling certain files from the system.
You dont need to add the toolchain to your path. That is handled by the build script.
Dont need SDK either. Part of repo.
Thanks for the guide.
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
Ah really? Thanks! Tried to remember what steps I needed to take to build on my
SGSi9000 before, so I haven't done a clean build on a clean system. But if it's not
needed I will take it out of this guide :highfive:.
labbe- said:
Nice guide! Building now, hope I set up everything right and didn't forget anything. Couple notes/questions though.
1. You list Debian based system as a requirement, but I think you should make it more clear and change it to Ubuntu based. When installing the packages under Debian 6.0.6 very many didn't have installation candidate under that particular name. With Ubuntu 12.04 on the other hand everything installed smoothly.
2. Am I right in assuming that the step where the proprietary files are fetched from the phone is not needed during the update procedure?
Very happy about this. Had been thinking about learning to build myself but always crumbled in the device specific section and wasn't motivated enough to go on. This guide helped a lot! :good: Maybe now it's time to learn to apply some cherry picks to the rom for myself ^^
Click to expand...
Click to collapse
1. Sure, my fault. Thought Debian was a more handy and common name for
distro's mentioned (Ubuntu/Linux Mint etc), but I'll change it
2. Indeed, fetching the files from phone has to be done once, after that it's
not necessary anymore.
3. Good luck mate! Let me know if it worked
RATBORG said:
Ah really? Thanks! Tried to remember what steps I needed to take to build on my
SGSi9000 before, so I haven't done a clean build on a clean system. But if it's not
needed I will take it out of this guide :highfive:.
1. Sure, my fault. Thought Debian was a more handy and common name for
distro's mentioned (Ubuntu/Linux Mint etc), but I'll change it
2. Indeed, fetching the files from phone has to be done once, after that it's
not necessary anymore.
3. Good luck mate! Let me know if it worked
Click to expand...
Click to collapse
Left it to build overnight (tried first with VirtualBox on my laptop but it was slow as hell) but it failed. Didn't catch the error message because I was late for work. Going to install dualboot Ubuntu on my desktop machine tonight and try again and hope it goes better.
labbe- said:
Left it to build overnight (tried first with VirtualBox on my laptop but it was slow as hell) but it failed. Didn't catch the error message because I was late for work. Going to install dualboot Ubuntu on my desktop machine tonight and try again and hope it goes better.
Click to expand...
Click to collapse
That's better, I have a Acer laptop with a new SSD, made it single booted
with only Linux Mint x64. Note: you really need x64. VMware can be used
but I always had issue's with it. Maybe you can even try to use Archlinux
(check Codeworkx thread about it).
Nice guide. Been a long time since I seen one.
RATBORG said:
That's better, I have a Acer laptop with a new SSD, made it single booted
with only Linux Mint x64. Note: you really need x64. VMware can be used
but I always had issue's with it. Maybe you can even try to use Archlinux
(check Codeworkx thread about it).
Click to expand...
Click to collapse
Yeah i have 64bit no prob. Is there already a build of the BBQLinux available? I've tried searching but havent found it anywhere.
Unfortunately I don't have a SSD yet, planning to sell my MacBook Pro and buying an Ultrabook instead so with that building would be a little faster.
temasek said:
Nice guide. Been a long time since I seen one.
Click to expand...
Click to collapse
Thanks sir! You too for your efforts here
labbe- said:
Yeah i have 64bit no prob. Is there already a build of the BBQLinux available? I've tried searching but havent found it anywhere.
Unfortunately I don't have a SSD yet, planning to sell my MacBook Pro and buying an Ultrabook instead so with that building would be a little faster.
Click to expand...
Click to collapse
Yep, here: http://download.bbqlinux.org/
Tutorial: http://rootzwiki.com/topic/9287-how-to-setup-android-build-environment-on-arch-linux-64bit/
Ultrabooks are nice :highfive: aswell is the MacBook. But pretty pitty to
abuse a nice MacBook only for building haha
RATBORG said:
Ultrabooks are nice :highfive: aswell is the MacBook. But pretty pitty to
abuse a nice MacBook only for building haha
Click to expand...
Click to collapse
The MacBook is actually my main computer, the desktop tower is only for gaming. I'm planning the Ultrabook because I'm switching job soon which requires more traveling so the 17" MacBook is getting a bit too large.
I tried to build again and now it built succesfully in 30 minutes in virtualbox, so i guess there is no need for dualboot after all ^^ but going to install the BBQLinux anyway to test it.
Thanks for the guide!
Works as it should, but it overshoots a little. It is not necessary to install the complete android sdk. But it doesn't hurt, either
just noticed that the cm buildsystem reported that openjdk-6-jdk is an unsupported java version and it said in cm page that sun-java6-jdk is recommended. well, ubuntu has removed sun-java6-jdk from it's repository due to licencing issues with oracle, but i managed to get it installed with a guide i found while googling..
Code:
mkdir ~/src
cd ~/src
git clone https://github.com/flexiondotorg/oab-java6.git
cd ~/src/oab-java6
sudo ./oab-java.sh
sudo apt-get install sun-java6-plugin sun-java6-jre sun-java6-bin sun-java6-jdk
after that no messages anymore. thought i'd share :good:
Yeah thanks!
On the other hand it's just fine to use OpenJDK.
Sent from my GT-I9300 using xda premium
RATBORG said:
Yeah thanks!
On the other hand it's just fine to use OpenJDK.
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
yeah i know it did it just fine, just an observation=)
After a time of extreme busy work schedule I finally found the time to continue my efforts in regards of building myself.
I was wondering, how do I include external sources to my builds? For example, I want to use temasek's kernel so that would save me the manual flash after every update. I read a little from CM wiki but it's too general for me :/
Also, the commands 'find ./out/ -name 'build.prop' | xargs rm' and 'find ./out/ -name 'cm_i9300-target_files-eng.*.zip' | xargs rm' does not seem to work so I've just skipped them and installed after make installclean, is that ok?
labbe- said:
After a time of extreme busy work schedule I finally found the time to continue my efforts in regards of building myself.
I was wondering, how do I include external sources to my builds? For example, I want to use temasek's kernel so that would save me the manual flash after every update. I read a little from CM wiki but it's too general for me :/
Also, the commands 'find ./out/ -name 'build.prop' | xargs rm' and 'find ./out/ -name 'cm_i9300-target_files-eng.*.zip' | xargs rm' does not seem to work so I've just skipped them and installed after make installclean, is that ok?
Click to expand...
Click to collapse
It is more troublesome to do that than flashing a separate kernel.
There will be commit conflicts and unless u can resolve that then its ok.
Read about git commands
Eg git pull ...git push ...git fetch..git commit ..git remote add xxxyyy github . etc
fixed
How about compiling cm10.1?
krille_java said:
How about compiling cm10.1?
Click to expand...
Click to collapse
repo init -b cm-10.1
repo sync
Aha thank you!

Guide for Compiling a kernel for the Tubuntu app by x3maniac and TF101

Guide for Compiling a kernel for use with the Tubuntu application by x3maniac and TF101.
These insturctions work with 64bit Linux laptop/PC's, version 4.5.4 for the armhf toolchain, and 2.6.36 kernel version. The toolchain and kernel from the github below is the direct source x3maniac makes the kernels we are currently using. Please understand a few things, if you add modules to this build you will need to add them to your Linux image you are using. I'll provide specifics as I work through the learning process as well. If you change compilers or upgrade the software components outside of this guide it may produce errors or problems.
If you are looking for making a version 3 kernel, hardware acceleration with nvidia and things like that you will either have to ask x3maniac or do your own research as this guide does NOT tell you how to do this.
******My directories reference my own username on my laptop, please substitute "thomas" with your username OR your /home directory, or whichever directories you wish to use. I used full paths on purpose for my own learning and to be specific for newcomers to Linux who wish to learn to compile.******
All credit goes to the time and consideration x3maniac took to assist me with doing this!
OP for Tubutnu by x3maniac
1. Open Terminal. Everything will be executed from Terminal.
2. Now type: sudo apt-get abootimg
3. Now type: mkdir /home/thomas/kernelbuild
3a. Now type: cd /home/thomas/kernelbuild
4. Now type: git clone https://github.com/novaspirit/tf101-linux-2.6.36
5. Now type: git clone https://github.com/novaspirit/Ubuntu_initrd-3.x.git
6. Now type: git clone https://github.com/novaspirit/config.git
6a. The config.git has a file called /config/boot.cfg, you could modify the last line called the command line and have it boot from alternate locations, the default is fine and set to /dev/mmcblk0p8. So let's not touch it, you can use nano to edit this file.
7. Now type: git clone https://github.com/novaspirit/android-toolchain-4.5.4.git
8. Now type: cd /home/thomas/kernelbuild/tf101-linux-2.6.36
9. Copy this into Terminal and hit enter: 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
10. Copy this into Terminal and hit enter: sudo apt-get install libgtk2.0-dev libglib2.0-dev libglade2-dev (this allows you to make a GUI of the config file)
11. Now type: make help (you should see a list of build targets. You are looking to see if you have tf101_gnulinux_defconf.)
12. Now type: export ARCH=arm
13. Now type: export CROSS_COMPILE=/home/thomas/kernelbuild/android-toolchain-4.5.4/bin/arm-eabi- (understand the arm-eabi- simply ends with the hypen to include sub components, it's not a typo)
14. Now type: make tf101_gnulinux_defconfig
15. Now type: make gconfig (the GUI pops up and this is where you can select options). Click on split, the options will be on the left. This is where you can select what you wish to add. For example, web cam and GPS functions. HOWEVER, it does not mean this will work nor is it all perfectly set up. There may be some additional research by YOU the reader to find out what will or won't work with this kernel. (NOTE: you must run make gconfig even if you don't change anything otherwise an error will occur when you run make -j2 modules command).
16. If you have made changes it will ask you to save. Go ahead and save it.
17. Now type: make -j2 zImage (j2 represents jobs that can be run concurrently, determined by the kernel build. This option only works if you have 2 cores and also you can use -j4 if you have a 4 core system and so on.)
18. Now type: make -j2 modules (If the github provided by x3maniac doesn't have a module you need, this is where YOU the reader must research what you need to add and place it in the appropriate location).
19. Now type: make modules_install INSTALL_MOD_PATH=/home/thomas/kernelbuild/Ubuntu_initrd-3.x/
20. Now type: cd /home/thomas/kernelbuild/Ubuntu_initrd-3.x/
21. Now type: find .|cpio -H newc -o | gzip -9 > /home/thomas/kernelbuild/initramfs.img
21b. The output should say something similar to 1111 blocks or 14582 blocks, doesn't matter the number. The number and blocks means it has been made successfully.
22. cd /home/thomas/kernelbuild
23. Now type: abootimg --create kernel.img -f /home/thomas/kernelbuild/config/boot.cfg -r initramfs.img -k /home/thomas/kernelbuild/tf101-linux-2.6.36/arch/arm/boot/zImage
23b. abootimg is very strict and will produce an error here if anything is wrong. You are looking for the output of some files created and you should see a kernel.img file in your directory with an ls command.
24. If you are going to flash the kernel using the Tubuntu application, rename kernel.img to linux.img and flash appropriately from the app.
25. If you are going to create another kernel you need to clean it up before repeating steps 12-24. So proceed to step 26.
26. Now type: cd /home/thomas/kernelbuild/tf101-linux-2.6.36
27. Now type: make clean
28. Now type: make mrproper
29. Delete kernel.img from /home/thomas/kernelbuild/
30. If you aren't modifying additional modules and parameters you can save the created initramfs.img file. Otherwise delete it and run through the steps, doesn't take long to do anyways.
31. Profit.
My guide is complete now. Please read everything thoroughly before diving in. It's not as difficult as it looks. I will make kernels and modify the guide to weed out any errors, typos, or wrong steps. Hope everyone enjoys! I do this as much for myself as the community.
Made some edits for consistency and clarity. Please remember to check the github to determine if X3, our dev, has made any changes possibly requiring you to git clone again. If changes have been made, it is my experience that the easiest way to get the newest is to just delete the directories and git clone again. There is probably a way to do this and only grab the changes but I really haven't looked into that.
Thanks for this, going to see if I can add some stability in there since mine is barely usable.
You should replace /home/thomas/ with $HOME/ instead, that way it won't error out for people that don't use mkdir -p or aren't using a thomas username
Lethe6 said:
Thanks for this, going to see if I can add some stability in there since mine is barely usable.
You should replace /home/thomas/ with $HOME/ instead, that way it won't error out for people that don't use mkdir -p or aren't using a thomas username
Click to expand...
Click to collapse
I thought about that but I specified it in the beginning of the post. The purpose was to not make assumptions on what people using Linux did or did not know. For example I didn't realize ~/ represented the home directory till x3 pointed it out to me.
Since the post had such little traction I left it as is to help me out as well.
*****lol, I didn't specify the directories and why they were named that way. Must have been my other guide. I'll fix it up soon.
I added this comment below into the OP to remove confusion on the directories I used.
******My directories reference my own username on my laptop, please substitute "thomas" with your username OR your /home directory, or whichever directories you wish to use. I used full paths on purpose for my own learning and to be specific for newcomers to Linux who wish to learn to compile.******

[GUIDE] How to build CM10.2 for the HTC One with OS X 10.8.X

This is a guide to build CyanogenMOD 10.2 (Android 4.3) for the HTC One. This guide is for OS X Mountain Lion (10.8.X).
[size=+1]Pre Requirements:[/size]
1) go to App Store on your OS X and Download Xcode 4. Once that is installed, open Xcode and go to preferences. There you find a tab “DOWNLOADS”, open it and there you can find “Command line tools” and next to it click INSTALL. It will take a few minutes to download and install
2) Make sure you have the android-sdk downloaded and setup adb and fastboot, so they work. It is recommended to place the android-sdk to /usr/local/
[size=+1]Initializing the build environment[/size]
First we need to set up our OS X to be able to build Android. This needs some extra things compared to for example, building in Linux, but the main stuff is pretty much the same. So let’s get started then, shall we?
Open up Terminal and type
Code:
java
If you don’t have java installed you will get a prompt to install it.
Next we will install homebrew (you can also use macports if you like)
Code:
ruby <(curl -fsSk https://raw.github.com/mxcl/homebrew/go)
Now make sure android-sdk and homebrew are in $PATH
Code:
touch ~/.bash_profile && echo "PATH=/usr/local/bin:/usr/local/sbin:$PATH:/usr/local/android-sdk/tools:/usr/local/android-sdk/platform-tools" >> ~/.bash_profile
I also recommend to add this edit to the .bash_profile file:
Code:
nano –w ~/.bash_profile
Code:
export BUILD_MAC_SDK_EXPERIMENTAL=1
Now run this and see if you need to update anything.
Code:
brew doctor
If you do (and you probably will once a day) type:
Code:
brew update
Now we need to get our dev packages
Code:
brew install git coreutils findutils gnu-sed gnupg pngcrush repo
Once that is done, run
Code:
brew outdated
if it shows anything, run
Code:
brew upgrade
Now run this the correct a few symlinks [Not sure if these are needed anymore]:
Code:
ln -s /usr/local/bin/gfind /usr/local/bin/find && ln -s /usr/local/bin/gsed /usr/local/bin/sed
Now to create our case sensitive image for our CM work [NOTE: the 60g can be changed to anything. It only takes up what it needs but I used 60GB]:
Code:
hdiutil create -type SPARSE -fs "Case-sensitive Journaled HFS+" -size 60g -volname "android" -attach ~/Desktop/Android
Now to create our working directory
Code:
cd /Volumes/Android && mkdir cm10.2 && cd cm10.2
[size=+1]Getting the source[/size]
Now to initialize the git and to download it
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
Download the sources:
Code:
repo sync
Wait until it is finished. It will take a long time, depending on your internet connection.
[size=+1]Obtain the device build files and proprietary files:[/size]
To do this we will use CyanogenMods "tool" called roomservice. Roomservice is replacing the old local_manifest.xml file. Just run the code below to create the file directly into the folder.
Code:
nano -w /Volumes/android/cm10.2/.repo/local_manifests/roomservice.xml
Paste the following lines into the file:
Code:
<manifest>
<project name="TheMuppets/proprietary_vendor_htc.git" path="vendor/htc" remote="github" revision="cm-10.2"/>
</manifest>
It seems that nowadays you only need to have the TheMuppets repo there, the roomservice process takes care of the rest and downloads the needed mako bits automatically. And actually it doesn't matter what you name the xml file under the local_manifests directory. The process loads every xml file from there in a alphabetical order. If you still have that local_manifest.xml file in your .repo directory, i suggest you remove that, because at that case that file will be read first and after that all the other from the local_manifests folder
Save the file. And rerun the code:
Code:
repo sync
Download the necessary pre-builts:
Code:
/Volumes/android/cm10.2/vendor/cm/get-prebuilts
That is all. The sources are now ready.
[size=+1]Building CyanogenMOD[/size]
If you build now, you're probably gonna get kernel build errors regarding the missing elf.h header (this error might be device specific). Fortunately, we already have this file downloaded, so we only need to copy it to /usr/local/include:
Code:
cp /Volumes/android/cm10.2/external/elfutils/libelf/elf.h /usr/local/include
FINALLY, we are ready to build:
Code:
cd /Volumes/android/cm10.2 && source build/envsetup.sh && brunch m7ul
The upper command will start the build for the international version for the HTC One (m7ul). Just change the m7ul part to the right codename (check it from f.ex www.get.cm webpage).
Then we just let the Mac do the rest. Remember that it will take a while to do the build, and meantime you Macs fans will scream for mercy while CM punishes your system ☺
After the build is finished successfully you can find your newly created flashable zip by typing:
Code:
cd $out
Look for .zip file with a tag UNOFFICIAL
Happy building!
donk
I just might give this a try. Thanks for the tutorial!
Sent from my One using Tapatalk 4
inffy said:
Hey there!
Only Thing that comes to mind is that you forgot to get the prebuilts. Or you flashed incompatible kernel
Click to expand...
Click to collapse
Not that I'm aware of, but I must've messed something up. I nuked it all and started over.
It works fine now (and more importantly I got myself a new "theme aware" aapt that doesn't think that drawable-xxhdpi is an invalid folder name )
Thanks again for a nice guide.
i can add packages of apk github
help
thanks
packhex said:
i can add packages of apk github
help
thanks
Click to expand...
Click to collapse
What do you mean, sry
Strange error
I get this error when I try to save the manifests xml file.
[ Error writing /Volumes/android/cm10.2/.repo/local_manifests/roomservice.xml: ]
Please help me figure this out...
Okay, I figured I hade the wrong directory..
now when I try to brunch, I get this error:
Don't have a product spec for: 'cm_m7ul'
Do you have the right repo manifest?
Please help!

[GUIDE][NOOB FRIENDLY]How to compile TWRP from source step by step

Hi guys,
Today because of the continuous requests of help to compile the TWRP on the developers' dedicated thread, I decided to write a guide for those who know very little about Linux and Android development but want to LEARN
Initial requirements:
1)Linux, I suggest Ubuntu 64bit
2)Willpower
3)A brain of course
Chapter 1: Setting up Build Environment
First requirement is Java. The version you need depends on what Android version you want to compile
Open the terminal and type: java -version
From Gingerbred to Kitkat you have to use openjdk 6
For Lollipop and MM you can use openjdk 7 or opendjk8
Notice: for openjdk8 before start the compilation with "make recoveryimage"
Type: export EXPERIMENTAL_USE_JAVA8=true and press enter.
Code:
If you have the wrong version type: sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Follow the on-scren instructions to remove it.
Now install the jdk you need
For Openjdk 6
Code:
Type the following commands:
sudo add-apt-repository ppa:openjdk/ppa
sudo apt-get update && sudo apt-get install openjdk-6-jdk
For Openjdk 7
Code:
Type the following commands:
sudo add-apt-repository ppa:openjdk/ppa
sudo apt-get update && sudo apt-get install openjdk-7-jdk
Next requirement are libraries and build tools
Open a fresh terminal prompt, copy and paste this:
Code:
sudo apt-get install git ccache automake lzop bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 g++-multilib python-networkx libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools pngcrush schedtool dpkg-dev liblz4-tool make optipng
Now let's get a copy of "repo", it is a program that lets you communicate with git servers and download the source code.
Code:
1)mkdir ~/bin -This command creates the bin folder that will contain the repo command
2) curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo -This command downloads the repo command in the bin folder
3) chmod a+x ~/bin/repo -Give the repo command right permissions
4)sudo nano ~/.bashrc At the very bottom(Use page down key) add this line: export PATH=~/bin:$PATH
Then press Ctrl+O and Enter to save and Ctrl+X to exit.
After that type: source ~/.bashrc
-With these commands you add repo to .bashrc file that allows you to call the command from every path.
Chapter 2: Repo sync Android sources
At this point you are almost ready to compile whatever you want but first you need Sources.
These are divided in:
-Android base sources
-Device sources
Let's obtain the first one
If you want to compile ROMs such as CyanogenMod you MUST repo sync the entire sources but if you want to compile only the TWRP recovery you CAN sync minimal sources
Full Sources
NOTICE: replace "BRANCH" with the version of android you want
-Omnirom Sources
Available Android branches:
android-6.0
android-5.1
android-5.0
android-4.4
android-4.3
--Open a fresh terminal and type the followng commands.
mkdir ~/NameOfTheFolder It's your choice
cd ~/NameOfTheFolder
repo init -u git://github.com/omnirom/android.git -b BRANCH
repo sync -jN N=numbers of parallel downloads, it depends on your connection Example: repo sync -j2
-CyanogenMod Sources
Available Android branches:
cm-13.0
cm-12.1
cm-12.0
cm-11.0
--Open a fresh terminal and type the followng commands.
mkdir ~/NameOfTheFolder It's your choice
cd ~/NameOfTheFolder
repo init -u git://github.com/CyanogenMod/android.git -b BRANCH
repo sync -jN N=numbers of parallel downloads, it depends on your connection Example: repo sync -j2
Minimal Sources
NOTICE: replace "BRANCH" with the version of android you want
Thanks to @lj50036 for the minimal manifests
-Omnirom Minimal Sources
Available branches:
twrp-6.0
twrp-5.1
twrp-4.4
--Open a fresh terminal and type the followng commands.
mkdir ~/NameOfTheFolder It's your choice
cd ~/NameOfTheFolder
repo init -u git://github.com/lj50036/platform_manifest_twrp_omni.git -b BRANCH
repo sync -jN N=numbers of parallel downloads, it depends on your connection Example: repo sync -j2
-CyanogenMod Minimal Sources
Available branches:
twrp-13.0
twrp-12.1
--Open a fresh terminal and type the followng commands.
mkdir ~/NameOfTheFolder It's your choice
cd ~/NameOfTheFolder
repo init -u git://github.com/lj50036/platform_manifest_twrp_cm.git -b BRANCH
repo sync -jN N=numbers of parallel downloads, it depends on your connection Example: repo sync -j2
The download of the sources will take a bit ^^
Device sources are divided in
1)Kernel
2)Device Tree
3)Vendors
Sorry, I can't help here cause every device has its own sources
For further informations consult this page: https://www.google.it/url?sa=t&rct=..._intro&usg=AFQjCNGBwIUXnLmxTMEb6ltZvbVyzW9ybw it is for CM but it is valid for almost everything.
About TWRP device tree flags this thread is very very useful, thanks to @MSF Jarvis
http://forum.xda-developers.com/android/software/twrp-flags-boardconfig-mk-t3333970
NOTICE
If you repo synced CyanogenMod Full sources you don't have TWRP sources so go here, select the branch you want and download it.
https://github.com/omnirom/android_bootable_recovery
Extract the archive in /home/username/NameOfTheFolder/bootable
Rename the folder to "recovery-twrp" without quotes ----> Warning: Be sure that in NameOfTheFolder/device/vendor/devicename/Boardconfig.mk there is RECOVERY_VARIANT := twrp
Chapter 3: TWRP compilation
I'm going to use a device as example
Once you had your sources organised as follow:
/home/username/NameOfTheFolder/device/vendor/devicename
/home/username/NameOfTheFolder/kernel/vendor/devicename
/home/username/NameOfTheFolder/vendor/vendor/devicename
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Notice: You can use @lj50036 minimal device tree to compile TWRP, remember to adapt it to your phone.
https://github.com/lj50036/android_device_vendor_codename
Download and extract it in /home/username/NameOfTheFolder/device/vendor/ them rename the folder to your devicename
Open a fresh terminal and type the following commands:
Code:
[LIST=1]
[*]cd ~/NameOfTheFolder
[*]source build/envsetup.sh
[*]lunch
[*]Type the number of your device and press enter. For example in my case the number 16 is my device
[*]mka recoveryimage ---> This command will start the compilation of the recovery.
[/LIST]
I hope I have been clear, Enjoy ​
Reserved
@Hacker432
Maybe link my minimal device tree, for building twrp only ?
https://github.com/lj50036/android_device_vendor_codename
I need to clean it up, and add a cm based one too, I will have to start on that, is weekend.
Also we should add a section on how to use local_manifest.xml .....
Thx Josh
@lj50036, delete your branch, rename mine to master and voila! Its done
Sent from my Pixel V1 using XDA Labs
It had crossed my mind earlier today to do this, you beat me to it :good:
Good Job and Great Initiative @Hacker432
NepoRood said:
It had crossed my mind earlier today to do this, you beat me to it :good:
Good Job and Great Initiative @Hacker432
Click to expand...
Click to collapse
Thanks, I thought it too when I saw @MSF Jarvis with Pavlex4 ^^
Sent from my Y550-L01 using Tapatalk
Hacker432 said:
Thanks, I thought it too when I saw @MSF Jarvis with Pavlex4 ^^
Click to expand...
Click to collapse
How do you say 'It was hell' without actually saying it was hell?
Sent from my Pixel V1 using XDA Labs
Some Tips/Tricks...
Being a Windows user most of my life, I've adapted (and picked up from others) some stuff to Linux, it saves a lot of typing in a terminal
1) Right Click, Create New Folder
Just as quick as the "mkdir" command, but more Windowsy (<-- I made a new word) and you see immediate results
2) Right Click, Open In Terminal
Click your way through folders, when you get where you want to be, simply right click on an open space, and choose open in terminal. No need to cd ~/all/the/folder/names/to/your/device
Works in the "out" directory too, when pushing your new recovery to the device. No need to type path to recovery, as you're already there
3) Drag and Drop a Bash Script
On your desktop, create a new file, name it "build_recovery", set permissions to make it exacuteable, then use this example inside the file:
Code:
#!/usr/bin/env bash
make clean
. build/envsetup.sh
lunch cm_X10-eng
mka recoveryimage
Simply drop it on your terminal window and hit enter :good: (can also be used to "mka bacon")
4) Clone Directly into Folder
Using "Tip 2", go to empty folder (folder must be empty), open your terminal then put a . (<-- that's a dot) at the end of your clone URL, example:
Code:
path: /nepo/android/cm12.1/device/TabletExpress/X10
# Open terminal and type/paste:
git clone https://github.com/neporood/device_TabletExpress_X10.git .
This will clone everything from the repo into the empty folder, no need to download and change names
5) Use a Local Manifest
A great guide, full of information, can be found here
NOTE: if using one of the "minimal" manifests in the OP, there's no need for a local manifest
6) Ramdisk Customization
Sometimes when compiling TWRP, you will need some custom and/or stock recovery files in the ramdisk, such as: init.rc, twrp.fstab, and/or some kernel modules (ko files), just to name a few. This is easily done by creating a "recovery/root" directory in your device folder, everything in "root" will be added when you compile.
Example:
path: /nepo/android/cm12.1/device/TabletExpress/X10/recovery/root/etc/twrp.fstab
When you compile, the twrp.fstab file will be inside the "etc" folder of your ramdisk
Hope this helps other newbies like myself,
Nepo
NepoRood said:
Being a Windows user most of my life, I've adapted (and picked up from others) some stuff to Linux, it saves a lot of typing in a terminal [emoji14]
1) Right Click, Create New Folder
Just as quick as the "mkdir" command, but more Windowsy (<-- I made a new word) and you see immediate results
2) Right Click, Open In Terminal
Click your way through folders, when you get where you want to be, simply right click on an open space, and choose open in terminal. No need to cd ~/all/the/folder/names/to/your/device
Works in the "out" directory too, when pushing your new recovery to the device. No need to type path to recovery, as you're already there
3) Drag and Drop a Bash Script
On your desktop, create a new file, name it "build_recovery", set permissions to make it exacuteable, then use this example inside the file:
Code:
#!/usr/bin/env bash
make clean
. build/envsetup.sh
lunch cm_X10-eng
mka recoveryimage
Simply drop it on your terminal window and hit enter :good: (can also be used to "mka bacon")
4) Clone Directly into Folder
Using "Tip 2", go to empty folder (folder must be empty), open your terminal then put a . (<-- that's a dot) at the end of your clone URL, example:
Code:
path: /nepo/android/cm12.1/device/TabletExpress/X10
# Open terminal and type/paste:
git clone https://github.com/neporood/device_TabletExpress_X10.git .
This will clone everything from the repo into the empty folder, no need to download and change names
Hope this helps other newbies like myself,
Nepo
Click to expand...
Click to collapse
Good addition, thanks
Sent from my Y550-L01 using Tapatalk
I have problem:
1. I created empty folder and named it twrp
2. I run this command: repo init -u git://github.com/lj50036/platform_manifest_twrp_cm.git -b twrp-13.0
3. I did repo sync -j3
4. I created folder /kernel/samsung/s3ve3g and put kernel source inside it.
5. I create folder /device/samsung/s3ve3g and put device tree inside it.
6. I create folder /device/samsung/s3ve3g and put vendor files inside it.
7. I run this command: . build/envsetup.sh
8.When I run this command I get error: https://postimg.org/image/6f8f5oypt/
I fixed problem by adding this sources to /device/samsung folder:
https://github.com/CyanogenMod/andro...ce_qcom_common
https://github.com/CyanogenMod/andro...ng_qcom-common
https://github.com/MSM8226-Samsung/a...msm8226-common
I am trying to make recoveryimage for multirom.I have problem TW_THEME is not valid: https://postimg.org/image/m33wfg6nb/
@Pavlex4 can you give me source links?
Sent from my Y550-L01 using Tapatalk
Hacker432 said:
@Pavlex4 can you give me source links?
Sent from my Y550-L01 using Tapatalk
Click to expand...
Click to collapse
Source for what?
Pavlex4 said:
Source for what?
Click to expand...
Click to collapse
Your device what else?
Sent from my Y550-L01 using Tapatalk
Hacker432 said:
Your device what else?
Sent from my Y550-L01 using Tapatalk
Click to expand...
Click to collapse
https://github.com/MSM8226-Samsung/android_device_samsung_s3ve3g
https://github.com/MSM8226-Samsung/android_kernel_samsung_s3ve3g/tree/cm-13.0
https://github.com/TheMuppets/proprietary_vendor_samsung/tree/cm-13.0/s3ve3g
https://github.com/CyanogenMod/android_device_samsung_qcom-common
https://github.com/MSM8226-Samsung/android_device_samsung_msm8226-common
I am trying to make recoveryimage for multirom.I have problem TW_THEME is not valid: https://postimg.org/image/m33wfg6nb/
Pavlex4 said:
https://github.com/MSM8226-Samsung/android_device_samsung_s3ve3g
https://github.com/MSM8226-Samsung/android_kernel_samsung_s3ve3g/tree/cm-13.0
https://github.com/TheMuppets/proprietary_vendor_samsung/tree/cm-13.0/s3ve3g
https://github.com/CyanogenMod/android_device_samsung_qcom-common
https://github.com/MSM8226-Samsung/android_device_samsung_msm8226-common
Click to expand...
Click to collapse
Try use this value in Boardconfig
Pavlex4 said:
I am trying to make recoveryimage for multirom.I have problem TW_THEME is not valid: https://postimg.org/image/m33wfg6nb/
Click to expand...
Click to collapse
Because you're device tree is not adapted for TWRP
Where are TWRP's flags?
Where is the twrp.fstab? TWRP uses its own fstab format
Also, regarding Multirom, I don't see the device name, are you sure you did again source/blabla lunch(enter) then device number?
NOTICE: https://github.com/TeamWin/android_device_samsung_s3ve3g/blob/android-5.1
This could help you a lot
Hacker432 said:
Try use this value in Boardconfig
Because you're device tree is not adapted for TWRP
Where are TWRP's flags?
Where is the twrp.fstab? TWRP uses its own fstab format
NOTICE: https://github.com/TeamWin/android_device_samsung_s3ve3g/blob/android-5.1
This could help you a lot
Click to expand...
Click to collapse
I have twrp flags inside boardconfig.
I added now twrp.fstab inside recovery folder.
Do I need to change something inside boardconfig?
Pavlex4 said:
I have twrp flags inside boardconfig.
I added now twrp.fstab inside recovery folder.
Do I need to change something inside boardconfig?
Click to expand...
Click to collapse
The line I suggested regarding Recovery Partition
Try that value instead of the size
Sent from my Y550-L01 using Tapatalk
Hacker432 said:
The line I suggested regarding Recovery Partition
Try that value instead of the size
Sent from my Y550-L01 using Tapatalk
Click to expand...
Click to collapse
I cannot access site!!!

Categories

Resources