Easy build environment with Docker for Zombi & Omni - Asus Transformer TF700

I like to have the barrier to build a ROM as low as possible. Nowadays Docker is getting to be de-facto delivery model for development environments. So I thought to give a try to create a docker env for building Zombi ROM for Asus TF700 . It can be used also to build TF300 and any OMNI ROM with minor modifications. So here's how to use it:
Preparations with Docker.
This needs to be done only once. I keep the git repo in different path as the docker base, but you can have them in the same directory as done below for simplicity:
Install Docker if you don't have it: https://docs.docker.com/
Make a directory where you have ~70GB free space:
Code:
mkdir -p /srv/docker_android && cd /srv/docker_android
Clone my fork of docker-android-builder
Code:
git clone https://github.com/ikke-t/docker-android-builder.git -b zombi-lp5.1 .
Run Docker image, and build Android.
I do the following in tmux terminal. It starts the docker image for android building. If the docker image is not done once, it will build it first.
Run the script to build docker image:
Code:
./run.sh
After you are in docker promt, build android:
Code:
build-android
Building the ubuntu docker image will take about half an hour, depending on your network speed and computer power. Leave it running and go have dinner. The next time it starts immediately, as it doesn't need to be built again.
The build-android will hog huge amount of bandwith, as it downloads all the android stuff from github, and that's several gigs. Once it's done, it will build the android for you. That again might take up to 5 hours depending on your computing power.
Once the build is done, it will promt you where the zombi rom is. You can access it from your host system, just drop the .zip to your TF700 and flash it
Do not try adb from docker image, it won't work, as the docker image is a black box which cannot access any devices. To exit the buyo terminal once build is ready, just logout normally (ctrl-d).
Have fun!
ikkeT
BTW, the docker-android-build is not originally written by me, credits to those that deserve it. See the Readme. I just made the Zombi changes, and added some selinux stuff that was missing.

if you need space for the exercise...
If you need disk-space for the exercise and you have LVM on your machine, here's what I did on my Fedora:
Code:
sudo mkdir -p /srv/docker_shared/omnirom
sudo lvcreate vg_whipper -n docker_omnirom -L 80GB
echo "/dev/mapper/vg_whipper-docker_omnirom /srv/docker_shared/omnirom ext4 defaults 1 0" | sudo tee -a /etc/fstab
sudo mkfs.ext4 /dev/mapper/vg_whipper-docker_omnirom
sudo mount /srv/docker_shared/omnirom
# in case you have selinux, fix the labeling:
sudo chcon -R -t svirt_sandbox_file_t /srv/docker_shared/omnirom/

See more info on github: https://github.com/ikke-t/docker-android-builder

Nice!

I added the ability to build also TF700T OmniRom, in case you wish to help Joshua fix the selinux problems I tested it builds, didn't flash it though.
Activate the config by uncommenting the lines in config/android-build-vars.sh (and naturally commenting out the current ones)
Code:
## Example - these parameters will build the android-5.1 (lollipop)
## branch of OmniRom for the Asus TF700T
# BUILD_NAME="OmniRom"
# REPO="git://github.com/omnirom/android.git"
# BRANCH="android-5.1"
# DEVICE="tf700t"
# BRLUNCH="brunch"
# MAKE=""
do that, and this is what you get:
Code:
Package complete: /root/android/out/target/product/tf700t/omni-5.1-20150324-tf700t-HOMEMADE.zip

Related

How-to compile a fresh Android!

Hi all.
In this thread I'd like to collect all the information I've found scattered in various threads in order to compile Android system and kernel, directly from GIT repo.
Hoping this help who wants to try to compile Froyo from the GIT repo but really doesn't know where to start!!!
All credits for this infos, obviously, doesn't go to me but to all the great persons I've found in this forum, helping me with a lot of informations: Dzo, l1q1d, Kalt_Kaffe, Incubus and many others.
If something of the things written below is not correct... first of all forgive me! I'm only a newbie trying to do something useful for others like me!!! Then please... help me to correct the mistakes!!!
And then, please, forgive my really bad english! Any correction is appreciated!
DISCLAIMER: even if this steps have been personally tested by me everything u'll decide to do u'll do at ur own risk. The flashing procedure may brick your device.
I've implanted all the compiling environment in a virtual machine with the latest Ubuntu (10.04).
NOTE ABOUT VIRTUAL MACHINE: if you are using a virtual machine it's important that you setup it with at least 1,5GB or RAM. With less RAM than this your Android will not compile.
All you need to obtain a fresh Android System is only a lot of time (and patience) and at least 10GB of free disk space.
10GB is the very minimum disk space you need. If you decide to try in a virtual machine I suggest to create a virtual disk at least 20GB.
1) Install needed software
As in the latest Ubuntu version the repositories have the "sun-java6-jdk", with which you cannot compile Android, you have to install the previous Java version from the Jaunty repo. To do this edit, with your favourite text editor and using "sudo", the "etc/apt/sources.list" file adding the following two lines:
Code:
deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse
and then, from a terminal, run the following commands:
Code:
sudo apt-get update
sudo apt-get install sun-java5-jdk
After this you can delete/comment the two lines added above in the sources.list file.
Then, according to the instruction described here, install the needed software with the following command:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind
2) Installing repo and configuring the environment
After the installation of the needed software follow this steps to create the right environment for ur compilation. I assume to work in my "/home/virtual" directory. If d'u like to work in another directory simply replace this path with yours in the commands.
Code:
$ mkdir bin
$ PATH=$PATH:/home/virtual/bin/
$ curl http://android.git.kernel.org/repo > /home/virtual/bin/repo
$ chmod a+x /home/virtual/bin/repo
$ mkdir mydroid
$ cd mydroid
3) Downloading, syncing and compiling the source
Now that you are in the destination directory (I've called it "mydroid" but obviously you can call it with every name you want) you've to init and syncing your repo with the one on the server.
The "init" step have to be executed only the first time. Then you can start directly from the "sync" command.
The following steps may need a looooooot of time (about 3 hours in my virtual machine) so you can have one (or two maybe!!!) coffee in the further coffee bar in your city!!!
Anyway let's go:
Code:
$ repo init -u git://androidhtc.git.sourceforge.net/gitroot/androidhtc/manifest -b froyo
$ repo sync
$ . build/envsetup.sh
$ lunch full_vogue-userdebug
$ make
With these commands you'll obtain a system with all languages in it.
You'll find the "system" folder under "out/target/product/vogue". Simply tar it and you're in!!!
4) Compiling the kernel
If you only want to compile the kernel you have to follow this steps (from your repo dir - "mydroid" in my case)
Code:
$ cd kernel
Open, with your favourite text editor, the file "Makefile" and change the CROSS_COMPILE line like the following:
Code:
CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
then run the following commands:
Code:
make vogue_defconfig
make
After the compilation you'll find the "zImage" file into "kernel/arch/arm/boot/" and use it like you want (I.E. I compile it with NBHCreator in order to flash it into my Polaris).
That's all, folks!!!
Enjoy!
Initializing project gps ...
fatal: The remote end hung up unexpectedly
error: Cannot fetch gps
way not?
did it finish or did it get stuck and there is more to fetch?

[HOWTO][VM][Compile]Setup Lubuntu for Android compiling (VirtualBox Option)

This Guide is intended to fast-track the curious Windows user into the world of Compiling Android With Linux
It does not cover Linux in depth and does not cover hacking the code.
It does include an introduction to git by way of an example (replacing the default Kernel)
I hope it proves helpful
Below I shall run through setting up VirtualBox and installing Lubuntu.
Lubuntu is a lighter alternative to Ubuntu targeted at older/low powered hardware which makes it ideally suited to running in a VM.
Before we start, I would like to make it clear that unless you have a powerful,memory rich PC, compiling Android inside a VM is not ideal.
Having said that, You can probably get some mileage on a reasonably spec'ed Machine. And this should prove helpful to those who are not quite ready to take the plunge and install a native linux.​
The latter half of the guide detailing Lubuntu will also work running native on the bare metal. Just ignore the VB driver parts.
If you haven't already, Download an iso from http://cdimages.ubuntu.com/lubuntu/releases/11.10/release/
I will be working through the desktop version
if you have a 64-bit PC *AND* your current OS is 64-bit get the lubuntu-11.10-desktop-amd64.iso
if your PC or OS is 32-bit then lubuntu-11.10-desktop-1386.iso is what you want.
As well as a {L}ubuntu disk, you will need:
VirtualBox https://www.virtualbox.org/ optionally grab the extension pack for usb2 support
At least 25 GB free disk space with large file support
A working internet connection, the CM source is 9GB so have that in mind.
VirtualBox Installation
Bit of a no brainer, just install it like any other program
At some point it may prompt you to download Additions, not to be confused with the extension pack.
The Additions Pack is an .iso containing drivers for the guest OS's, video, clipboard etc.
VirtualBox Setup
Once VirtualBox has installed open it
If you downloaded the extensions pack install it as follows:
file >> preferences >> extensions
click the add package icon and navigate to the download
Now create a virtual machine
click new >> next
give it a name like "AndroidCompiler"
OS Type "Linux"
Version "Ubuntu" >> next
The Version is not particularly important, as far as I know it is just for the icon.​
increase the memory , keeping it in the green >> next
create new disk >> next
VDI >> next
Fixed size >> next
select the location (for example your second hard drive X: or whatever)
change the size to 5.00 GB, if the slider is a pita just type it >> next
If you can afford it a larger disk will not hurt, 10GB should be plenty​
review and >> create >> create again
The basic VM is now complete
Fine tune the VM Settings
Highlight the new VM and hit Settings
system
Motherboard tab
in boot order select hdd and 'move' it to the top of the list with the up icon
Processor tab
tick enable PAE/NX
select number of CPUs
Note that if you use all of your cpu cores it will slow down your host​
Display
Video tab
tick enable 3D
Network
Adapter 1 tab
Attached to Bridge Adaptor
Name < select your NIC >
Advanced >
Promiscuous Mode : Allow All
Storage
highlight the empty CD
click the cd icon to the far right
Choose a virtual cd/dvd, (your iso d/l)
highlight the sata Controller
add hard disk (3 stacked disks icon) >> create new disk
create a new disk called AndroidSrc or something, it must be at least 20GB (40GB recommended)
if you plan on playing with ics then triple it​
Shared Folders
add new folder
tick auto mount
navigate to a folder (or create a new one)
this will be used to transfer files between your OS and the VM​
Now click OK, and then start
Installation of Lubuntu
You will be presented with a rather ugly language selection, pick one
Then select install Lubuntu
Ignore any errors about smbpii4 bios blah blah..
Language selection (again but nicer looking) >> continue
Tick download updates while installing >> continue
select something else >> continue
select /dev/sda >> new partition table
select /dev/sda free space >> add
type = logical
size = 555
location = end
use as = swap area
>> OK
Normally Linux Distos create a swap the same size as physical memory.
This is so physical memory can be dumped to swap when going into hibernation (save state with no power use)
Since VirtualBox has it's own Save State feature we don't need it.
And for what it's worth I have always found the resume after hibernate to be painfully slow​
select /dev/sda free space >> add
type = primary
size = <what it says>
location = beginning
use as ext4
mount point = /
>> ok
tick format for /dev/sda2
select /dev/sdb >> new partition table
select /dev/sdb free space >> add
type = primary
size = <what it says>
location = beginning
use as ext4
mount point = /Android
>> ok
tick format for /dev/sdb1
unless you are re-using an old Android source disk​
>> install now
Where are You?
Lubuntu guesses from your IP, if needed correct it​ >> continue
Keyboard setup >> continue
username / password >> continue
wait for it to finish
>> restart now! -- press enter when prompted
You should now be booted to Lubuntu
Ignore the update manager, we will get the script to deal with that.
VirtualBox Drivers
Next to the clock should be a pci card icon
click it
install drivers
activate >> input your password
wait .....
when finished >> close
bottom left is some strange icon, it is the main menu
click it >> logout >> logout (no need to reboot yet) >> login again
Shared Folders
Main Menu >> system tools >> users and groups
Manage Groups >> vboxsf >> Properties >> tick your username
Main Menu >> Accessories >> LXTerminal (right click >> add to desktop, if you like)
The reason for the earlier logout and back in was to activate the VB host to VM clipboard
The below script will install the required packages
It will work for both 32 and 64 bit
The script is based on instructions for 11.10
It will probably work on 11.04 and may even work on 10.xx but I have only tested against Lubuntu 11.10 both 32 and 64 bit
It is not specific to Lubuntu and should work with any Ubuntu 11.10 derivative
To paste with the keyboard ctrl+shift+v *NOT* ctrl+v
ctrl+shift+c to copy​copy and paste this to the term.
Code:
cat > ~/setup.sh << "EOF"
#!/bin/bash
sudo apt-get update
# Reference : http://source.android.com/source/initializing.html
case $(uname -m) in
x86_64) # packages for 64-bit
sudo apt-get -y install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
sudo apt-get -y install lib32readline-gplv2-dev || \
sudo apt-get -y install lib32readline5-dev
case $(awk -F"=" '/DISTRIB_RELEASE/ {print $NF}' /etc/lsb-release) in
11.10|11.04) sudo apt-get -y install libx11-dev:i386 ;;
10.10|10.04) sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so ;;
esac ;;
i?86) # packages for 32-bit
sudo apt-get -y 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 ;;
*) echo "Error: Machine type not recognised" && exit 1;;
esac
# Extras for CyanogenMod builds
sudo apt-get -y install squashfs-tools \
pngcrush libsdl1.2-dev \
libesd0-dev \
libwxgtk2.6-dev \
schedtool
# system update
sudo apt-get -y upgrade
# install sun java jdk
# Reference : top google hit for " ubuntu 11.10 sun-java6-jdk "
# http://www.gaggl.com/2011/10/installing-java6-jdk-on-ubuntu-11-10/
case $(awk -F"=" '/DISTRIB_RELEASE/ {print $NF}' /etc/lsb-release) in
11.10) codename=oneiric;;
11.04) codename=natty;;
10.10) codename=maverick;;
11.10) codename=lucid;;
*) echo "Error: Unrecognised ubuntu version";exit 1;;
esac
test -e /etc/apt/sources.list.d/ferramroberto-java-${codename}.list || \
echo | sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get -y install sun-java6-jdk sun-java6-plugin
# The default lubuntu install does not include java
# but other ubuntu derivatives may include openjdk
Java6Sun=$(echo | update-alternatives --config java | awk '/java-6-sun/ && ($1 !~ /*|^There/){print $1}')
test "$Java6Sun" != "" && echo $Java6Sun | sudo update-alternatives --config java
# create ~/bin if it does not exist
install -v -d ~/bin
# clean up
rm $0
EOF
Now run the script
Code:
bash ~/setup.sh
It will ask for your password
eventually you will be asked to read and accept the Sun Java licence
Once all that is done..
The updates will have installed a new kernel, and we still haven't loaded the VMs special video/shared folder drivers yet so it is time for a reboot
Like the logout we did earlier, but reboot.
Now that you have rebooted lets fix the permissions for our source partition
open a term
Code:
sudo chown $USER:$USER /Android
replace Android with the mount point you gave for your source drive
make a directory for the CM src
Code:
mkdir /Android/CM
cd /Android/CM
Now to get the src
#
# http://source.android.com/source/downloading.html
# http://wiki.cyanogenmod.com/wiki/HTC_Dream_&_Magic:_Compile_CyanogenMod_(Linux)
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -c -j16
The CM wiki advises repo sync -j16
You will be downloading 9 GB, depending on the speed of your connection this may take some time
Reduce the number of threads(16) if you don't want to saturate your connection
NEW : 2012-03-10
added -c to the repo sync.
-c tells repo to only fetch the current branch which will save time and diskspace
If you are interested in comparing branches then leave out -c
don't forget to include -c with all future repo syncs
using -c will save approx 2GB diskspace as well as network bandwidth (7GB instead of 9GB)​
use this table to get an approximation of how long it will take
Code:
10GB @ 60 Mbit/s 0.46 hrs ( 28 mins)
10GB @ 40 Mbit/s 0.69 hrs ( 42 mins)
10GB @ 20 Mbit/s 1.39 hrs ( 83 mins)
10GB @ 10 Mbit/s 2.78 hrs ( 167 mins)
10GB @ 5 Mbit/s 5.56 hrs ( 333 mins)
10GB @ 2.5 Mbit/s 11.11 hrs ( 667 mins)
10GB @ 1 Mbit/s 27.78 hrs ( 1667 mins)
Assumes Max throughput
When setting up the VM we created a bridge to one of your NICs
If you are on a laptop and switch between wire and wireless, you can also with the VM
Devices >> network adaptors (the VirtualBox Menu)
You could try setting up a 2nd adapter, one for wire and the other wireless, net traffic should be routed automatically
You can only add adaptors while the VM is Powered Off​
When repo sync has completed
Setting up the Environment
Setting up the Environment needs to be done with each new shell session
make sure you are in the repo root
A quick glance at your command prompt should tell you where you are
Code:
source build/envsetup.sh
alternative:
Code:
. build/envsetup.sh
that is <dot><space>bui​
Setting up the build
ccache
not to be confused with compcache, ccache can help speed up recompilations
More information can be found on cm's wiki here
and in google's http://source.android.com/source/initializing.html
Code:
export USE_CCACHE=1
# for reboots and new shell sessions
echo "export USE_CCACHE=1" >> ~/.bashrc
by default ccache uses ~/.ccache we won't have enough space
Code:
export CCACHE_DIR=/Android/.ccache
# for reboots and new shell sessions
echo "export CCACHE_DIR=/Android/.ccache" >> ~/.bashrc
The default max cache size is 976.6 MB (that is what is reported,could be a / 1024 screwup ), this will just about fit our min sized 20GB drive
http://source.android.com/source/initializing.html recommends between 50 and 100 GB. I imagine this is to accommodate multiple targets
space permitting between 5 and 10 GB should be fine for a single device
if you have a 20GB Android drive then leave it at the default
If you opted for a larger drive, adapt to suit
for 5 GB :
Code:
prebuilt/linux-x86/ccache/ccache -M 5G
The setting is stored in CCACHE_DIR so unless you want to change it forget about it.
Lets do lunch
don't ask me why it is called lunch. My best guess is a play on Menu
Code:
lunch
and select your target
when you get bored of seeing that lunch menu
Code:
lunch cyanogen_dream_sapphire-eng
Proprietary Files
The Proprietary Files need to be put into the vendor tree
You have two options:
Extract from a zip
Extract from your device
I'm going to walk through Option 1
Remember the Shared Folder we created?
Well we are going to use that now.
On your Host system copy a recent ROM zip to the folder your shared with the VM
good choices are : ezginger, ADS_magpie, dw9906
in your VM's terminal,
Code:
ls /media/
you should see a folder sf_<Name> and in that folder your rom zip
There are two scripts in device/htc/dream_sapphire/
unzip-files.sh and extract-files.sh
Unfortunately the unzip-files.sh script is not up to date with extract
You can manually fix it or use my script which converts the extract script to an unzip script
to use it:
set a environment var like so
Code:
ROM=/me<tab>s<tab><tab>
<tab> is the tab key, please don't type <tab>
read this to get an idea of what is happening​eventually you should have something like
ROM=/media/sf_5gb/ADS_magpie-V1.0-signed.zip
Code:
pushd device/htc/dream_sapphire
#awk '/adb pull/{sub(/adb pull/,"unzip '$ROM'")sub(/\.\./,"-o ..")};{print}' extract-files.sh | sh
# 2012-03-19 corrected the above script, it should be :
awk '/adb pull/{sub(/adb pull \//,"unzip -o '$ROM' ")sub(/.*/,"-d ../../../vendor/htc/$DEVICE/proprietary/",$NF)};{print}' extract-files.sh | sh
popd
pushd and popd
The above step only needs to be done the once
that is unless the proprietary files require changes, for instance a switch to open sourced versions
Kernel
The DS kernel in CM is old so I added ezterry's latest
I shall show you how, but we are taking the scenic route
We shall create our own git repo and add that to a local_manifest
Configure git
This is a global config, you should only need to do it once per user
Code:
git config --global user.name "Your Name Comes Here"
git config --global user.email [email protected]
taken from file:///usr/share/doc/git-doc/gittutorial.html
Install git docs with
Code:
sudo apt-get install git-doc
Create a git repo and push to it
Code:
git init /Android/my_git_repos/device_htc_dream_sapphire
cd /Android/CM/device/htc/dream_sapphire
git push file:///Android/my_git_repos/device_htc_dream_sapphire github/gingerbread
Now let's have a look
Code:
cd /Android/my_git_repos/device_htc_dream_sapphire
ls
you will see it is empty
But wait.. is it empty?
Code:
ls .<tab><tab>
Code:
git branch -a
git checkout gingerbread
ls
git log # q to exit
git log -p
now lets make some changes
Remember the shared folder?
Well I hope you have ezterry kernel pack in there
Code:
unzip /media/sf_<REPLACEME>/ezgb-2636-v1.5.2_S.zip *2708*
mv 2708-zImage kernel
mv mod-2708/modules.sqf prebuilt/
rmdir mod-2708/
git status
edit full_dream_sapphire.mk
change
device/htc/dream_sapphire/prebuilt/wlan.ko:/system/lib/modules/wlan.ko \
to
device/htc/dream_sapphire/prebuilt/modules.sqf:/system/lib/modules/modules.sqf \
we can do this with a simple sed
Code:
sed -i -e 's[/wlan.ko[/modules.sqf[g' full_dream_sapphire.mk
now
Code:
git diff
Code:
git add full_dream_sapphire.mk kernel prebuilt/modules.sqf
Since the wlan.ko is of no use to us (we replaced the kernel it was for) we need to remove it
but not just from the filesystem but git as well
Code:
git rm prebuilt/wlan.ko
Have another look at git status and git diff
notice that git diff produces no output
now try git diff --cached
commit the staged changes with
Code:
git commit
The default editor for git is nano
^ == ctrl
^O == ctrl+o
write commit notes
Code:
Updated Kernel and kmodules to 2708 ezgb-2636-v1.5.2
http://forum.xda-developers.com/showpost.php?p=14768272&postcount=2427
to save Ctrl+o<enter>
to exit Ctrl+x
if you prefer vim
Code:
git config --global core.editor vim
don’t forget to install vim​Adding a local_manifest.xml
Code:
cat > /Android/CM/.repo/local_manifest.xml << "EOF"
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="Local"
fetch="file:///Android/my_git_repos/" />
<project path="device/htc/dream_sapphire" remote="Local" name="device_htc_dream_sapphire" revision="gingerbread" />
</manifest>
EOF
Apologies My initial post had an error in the above codebox
it should be fetch="file:///Android/my_git_repos/" not fetch="file:///Android/my_git_repos/device_htc_dream_sapphire/"​
make sure you are in /Android/CM/
repo sync
Then look in device/htc/dream_sapphire to see if your changes were applied
Code:
pushd device/htc/dream_sapphire
git branch -a # look for remotes/m/gingerbread -> Local/gingerbread
git log -p # you should see your commit notes
popd
Remove RomManager
Optionally remove RomManager from the build
Code:
sed -i '/RomManager/d' vendor/cyanogen/products/common.mk
The above is not permanent, when you repo sync it will be reverted
That is unless you commit the change​if you want RomManager then
Code:
./vendor/cyanogen/get-rommanager
finally build it
Code:
mka bacon
It is going to take a while depending on the speed of your machine and the memory/cpu cores you gave the VM (if you are using a VM)
Lets hope you don't get any build errors
If all goes well you should end up with a zipfile in /Android/CM/out/target/product/dream_sapphire/
Don't forget your /media/sf_ folder, cp the completed zip to that and from there you can treat it like any other rom
I hope you had fun following this
reserved for extras
like editors, linux tipsntricks, github, eclipse
moar extraz
I was under the impression that 64-bit linux was required now to compile android from source.
I compiled AOSP froyo with the following specs fine:
Ubuntu 10.04 (tried both native and vm)
Pentium 4 3.20ghz Hyper-Threaded
32-bit of course
3.12 GB of RAM
It took about two hours but not as bad as I thought, and it worked
Anyways thank you Scrip for this wonderful guide (yes I'll thank you in a second).
I knew 70%ish of this, and you helped fill up the rest of the holes for me
Thanks a lot man.
I'm sorry for kinda yelling back at you earlier
One question: Is there any hope for grabbing the cm6 source? It's been broken with a lot of files missing for a while now.
select /dev/sda free space >> add
type = primary
size = <what it says>
location = beginning
use as ext4
mount point = /
>> ok
tick format for /dev/sda2
Click to expand...
Click to collapse
Tried this and no matter how many times I do it it still makes the entire 12GB sda partition the SWAP space.
EDIT: So solution is not to type in "555" but to use the arrow selection button to drop it down to "555".
wergeld said:
I was under the impression that 64-bit linux was required now to compile android from source.
Click to expand...
Click to collapse
Pointless and inaccurate post
Come back when you can prove 32-bit won't compile Android
Post the appropriate errors and I will do my best to resolve it
Scrip said:
Pointless and inaccurate post
Come back when you can prove 32-bit won't compile Android
Post the appropriate errors and I will do my best to resolve it
Click to expand...
Click to collapse
Woah, just asking. I saw this:
Ubuntu 10.04 64-bit is recommended. Building using a newer version of Ubuntu or a 32-bit Ubuntu is currently only experimentally supported and is not guaranteed to work on branches other than master.
Click to expand...
Click to collapse
This is taken from http://source.android.com/source/initializing.html
I just wanted to make sure that yes, you can compile against 32-bit before I spend a while setting this up.
wergeld said:
Tried this and no matter how many times I do it it still makes the entire 12GB sda partition the SWAP space.
EDIT: So solution is not to type in "555" but to use the arrow selection button to drop it down to "555".
Click to expand...
Click to collapse
no idea what is wrong there
try the other way round
with a clean 12gb partition
primary = < size - 555 >
use as = ext4
mount point = /
you could just let ubuntu set everything up
downside is
I will need to add instruction to mount the /Android drive
+ wasted diskspace
but again, I don't see why
Scrip said:
no idea what is wrong there
try the other way round
with a clean 12gb partition
primary = < size - 555 >
use as = ext4
mount point = /
you could just let ubuntu set everything up
downside is
I will need to add instruction to mount the /Android drive
+ wasted diskspace
but again, I don't see why
Click to expand...
Click to collapse
No worries on that. Ghost in the Machine maybe. Coming from TFS and VS2010 I have come accustomed to oddball things like this.
So far so good. Best part is the package script you have up there. Waiting to finish package installs...
frankdrey said:
I compiled AOSP froyo with the following specs fine:
Ubuntu 10.04 (tried both native and vm)
Pentium 4 3.20ghz Hyper-Threaded
32-bit of course
3.12 GB of RAM
It took about two hours but not as bad as I thought, and it worked
Anyways thank you Scrip for this wonderful guide (yes I'll thank you in a second).
I knew 70%ish of this, and you helped fill up the rest of the holes for me
Thanks a lot man.
I'm sorry for kinda yelling back at you earlier
One question: Is there any hope for grabbing the cm6 source? It's been broken with a lot of files missing for a while now.
Click to expand...
Click to collapse
I can't say it will build
look at the repo init command
-b <branch>
so if you replace gingerbread with froyo you will checkout cm6
if you have already added the local_manifest then you need to delete that before a repo sync
I will probably cover this in post 2/3
post 1 is basic
my idea is to get people interested
posts 2 and 3 will deal with extras, in post 1 I skipped basics like text editing
mostly because I have no idea how to deal with that.
Personally I use vim or kate
But I plan (if there is interest) on adding eclipse, which would make a text editor redundant
Yes I have downloaded the source for froyo before
A lot of the files are missing and repo sync doesn't complete
I know that all alsa-related files are missing, but there is more that I might have forgotten by now
frankdrey said:
Yes I have downloaded the source for froyo before
A lot of the files are missing and repo sync doesn't complete
I know that all alsa-related files are missing, but there is more that I might have forgotten by now
Click to expand...
Click to collapse
if post (or better pastebin.com)
the errors I can look
I've not tested these instructions against froyo , but I did at least get a zip from froyo asop a while back
missing files stinks of a screwed up prop mk
Yes AOSP works fine
CM6 doesn't
I'll post the errors when I find the time to get it all set up.
That may not be for a while though .
frankdrey said:
Yes AOSP works fine
CM6 doesn't
I'll post the errors when I find the time to get it all set up.
That may not be for a while though .
Click to expand...
Click to collapse
I think cm6 still points to android.git.kernel.org (which is gone). I was gonna fork from cm and change it to the right place but I haven't got around to it yet....
tvall said:
I think cm6 still points to android.git.kernel.org (which is gone). I was gonna fork from cm and change it to the right place but I haven't got around to it yet....
Click to expand...
Click to collapse
Yes I fixed that part.
but there were a whole buncha repos missing, the alsa one is all i can remember right now
WOW! Very well done! I love how you cited your sources and everything.
I appreciate the time and effort you put into this. Definately makes for a great reference.
Sent from my HTC PH39100 using Tapatalk
Thank you very much for this great tutorial! Even if I knew already most of the things, it's very useful to have such a tutorial here. We will see if this tutorial helps to increase the number of active android developers ...
Btw.: this thread should become sticky.
AndDiSa said:
Btw.: this thread should become sticky.
Click to expand...
Click to collapse
+1
Sent from my HTC PH39100 using Tapatalk
Left for work and set up the repo sync. Hopefully when I get home I can get a compile going. Thanks!

[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

[GUIDE] Native Debian on Samsung Galaxy i7500

Hello fellow phone enthusiasts,
there are some sources on the internet describing how to run Debian on the Samsung Galaxy i7500 (Samsung's first Android device). Unfortunately, none of these sources can act as a complete guide, so I thought I could try to fill this void. This guide is far from complete and will hopefully grow over time. Anyway, I hope this is helpful for some people that are trying to do the same.
Note that this post should have gone into the development section, but I'm not senior enough to post there. Also the URLs in this guide are messed up for the same reason. Each messed up URL is marked with "(FIX this url)". I will fix these things as soon as possible, if there is any interest in this guide.
Best regards,
Frank
0. WARNING
This guide is for experienced users only. You might brick your phone while following this guide. I will not take responsibilty for any harm that may happen to you, your phone or those around you when following this guide. Please read and understand the complete guide before doing the first step. You have been warned.
Make a nandroid backup (can be done in the recovery image). Really, do it. Even if you think there's no valuable data, you must do a nandroid backub, because you will need to have the boot.img to boot back into android after debian has been installed. You must also copy your nandroid backup onto your PC.
1. Credits
A few years ago, there has been quite an active development community for the Galaxy i7500. Unfortunately, these forums have now pretty much died and I was not an active member of that community, because I was using it as my primary device back then and had no interest in hacking it.
Anyway, a HUGE THANK YOU goes to the fine fellas from drakaz.com and the GAOSP. You guys are awesome!
The actual hard technical work for this guide has been done by the authors of the following guides. I'm simply trying to understand what they did and write a step-by-step guide using their expertise:
(FIX this url)https :// code . google . com/p/linux-on-android/wiki/BasicSteps
(FIX this url)https :// wiki . debian . org/ChrootOnAndroid
(FIX this url)http :// www . bananenfisch . net/?p=1056
(FIX this url)https :// sven . killig . de/android/console.html
2. Overview
The goal of this guide is to have a running Debian Squeeze (Debian 6) running natively on a Samsung Galaxy i7500. Debian will not be run in a chroot environment on top of android, but instead the phone will directly boot into debian when powering it on. Debian will be installed on a SD card, so that we could still boot into Android, should we really mess things up at some point. It will not be true dual boot though (i.e. you have to reflash the boot section from a PC to boot into Android).
2.1 Primary goals
In the end, I'd like have the following functionality:
WLAN
Bluetooth
X Window / Graphical User Interface
All this is possible with below description now.
But this means we will loose the ability to make phone calls, send text messages, use GPS, connect to the internet through 3G or anything else you would normally expect from a smartphone. It's very likely possible to also have this functionality included, but I simply don't need it for my project. If someone else is willing to investigate this, I would be interested in the results though.
2.2 Prerequisites
Things you'll need include:
good Linux knowlegde
1 rooted Samsung Galaxy i7500 (I recommend to flash GAOSP)
1 micro SD card (I'm using an 8 GiB class 4 card)
1 computer running Linux with the following software installed (I'm using Debian & Fedora, but any distribution that has debootstrap should work)
debootstrap
git
fastboot (I suggest to use the version that comes with your distro, but you can also try the one from the Android SDK)
GCC cross-compiler for ARM in order to compile the kernel (Debian and Fedora come with compiler versions, that didn't work for me, so I'm using version 7 of the Android NDK, i. e. GCC version 4.4.3)
3. Installing Debian
Note that I had already GAOSP2 beta 3 installed on the i7500. I don't know if any of these steps are possible without installing GAOSP first.
3.1 Prepare partitions on SD card
The Samsung Galaxy i7500 has an "internal SD card" which will be preserved for use with Android, the recovery image, a.s.o. The external SD card will be used for debian. ALL data on the external card will be lost after below steps.
Put the SD card into an SD card reader or boot the i7500 into recovery mode (press "vol-" and "call" buttons when switching on the phone). Note that using GAOSP directly didn't work for me, because for some reason only the first partition was shown on the PC.
Code:
cfdisk /dev/sdX
(replace X with the correct letter for your SD card, and then create the one big enough partition for your needs, I created one 4GiB primary partition leaving me 4GiB for playing around later)
Code:
sudo mke2fs /dev/sdX1
3.2 Build debian filesystem structure
Create a directory for the newly created debian partition (I assume it' s called "debian") and run the following commands
Code:
sudo mount /dev/sdX1 ./debian/
Code:
sudo debootstrap --verbose --arch armel --foreign squeeze ./debian/ (FIX this url) http :// ftp . de . debian . org/debian
Code:
sudo umount ./debian/
3.3 Finalize the debian installation
The following is based on the steps as described here (FIX this url) wiki. debian.org/ChrootOnAndroid and www . bananenfisch .net/?p=1056.
Boot phone into GAOSP
Open terminal
Code:
su
Code:
cd /data/local
Code:
mkdir debian
Code:
mount /dev/block/mmcblk1p1 /data/local/debian
Finalize bootstrap:
Code:
chroot /data/local/debian /debootstrap/debootstrap --second-stage
Mount special file systems and chroot into Debian:
Code:
for f in dev dev/pts proc sys ; do mount -o bind /$f /data/local/debian /$f ; done
Code:
chroot /data/local/debian /bin/bash
Finalise the installation:
Code:
echo "deb (FIX this url) http :// ftp . de . debian . org/debian/ squeeze main non-free contrib" > /etc/apt/sources.list
Code:
apt-get update
Code:
rm -f /etc/mtab
Code:
ln -s /proc/mounts /etc/mtab
Code:
passwd root
Code:
echo i7500 > /etc/hostname
Code:
apt-get install openssh-server
Code:
apt-get clean && apt-get autoclean
The ssh-sever can be started whenever you like through
Code:
/etc/init.d/ssh start
Afterwards you can log in from your PC using "ssh [email protected]" into the chroot environment.
3.4 Configure locale
We need to set the locale for the system (otherwise there will always be warning messages, e.g. when installing new software):
Code:
apt-get install locales console-data keyboard-configuration
You might want to tweak a few more settings (especially if your locale is not en_US). You can use:
Code:
echo export LANG=en_US.UTF-8 >> /root/.bashrc
Code:
export LC_ALL="en_US.utf8"
Code:
dpkg-reconfigure locales
Code:
dpkg-reconfigure console-data
Code:
dpkg-reconfigure keyboard-configuration
3.5 Installing additional software
You can now start installing additional software that you might need (I suggest you log into your phone through ssh as described above). You'll be needing an editor to edit configuration files (I choose vim). For setting up WiFi the package "wpasupplicant" is needed.
Code:
apt-get install vim less wpasupplicant
3.6 Chroot into debian
If you at a later time want to chroot into your debian environment, I recommend to store the following commands in a shell script (I stored it in /data/local/debian.sh) which you can then run as root.
Code:
#!/bin/sh
mount /dev/block/mmcblk1p1 /data/local/debian
for f in dev dev/pts proc sys ; do mount -o bind /$f /data/local/debian/$f ; done
chroot /data/local/debian /bin/bash
4. Create boot image
4.1 Build kernel
Perform the following steps on your PC:
Download the Galaxo kernel sources: git clone (FIX this url) https :// github . com/drakaz/GalaxoKernel.git
Apply the patch described on (FIX this url) https :// code . google . com/p/linux-on-android/wiki/BasicSteps (themddi_toshiba_smd.c patch doesn't work, do the change manually)
Apply patch as described here: (FIX this url) http :// sven . killig . de/android/console.html
copy attached config.txt file to .config
I will eventually create a branch on github containing the patches and default config. But for now, you'll have to do the patching yourself.
Code:
make ARCH=arm CROSS_COMPILE=/path/to/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- oldconfig
Code:
make ARCH=arm CROSS_COMPILE=/path/to/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
Code:
make ARCH=arm CROSS_COMPILE=/path/to/android/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- modules
4.2 Install modules
The modules need to be installed on the SD card partition, so you need to boot your phone into recovery and mount the SD card. Then execute the following command.
Code:
sudo make ARCH=arm CROSS_COMPILE=/path/to/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- INSTALL_MOD_PATH=/path/to/sdcard modules_install
In order for the WLAN kernel module to work the following files need to be copied from the GAOSP ROM to the /etc/ folder on the phone:
rtecdc.bin
nvram.txt
4.3 Minimal boot file system
A boot file system (a.k.a. initramfs) is needed to start the debian boot process. Create a folder called minimal_initramfs with the follwoing content:
Code:
minimal_initramfs/
|-- dev/
|-- init*
|-- mnt/
| `-- root/
|-- proc/
|-- sbin/
| `-- busybox*
`-- sys/
A binary of busybox can be downloaded from the busybox website (use busybox-armv4tl). The file "init" is actually a shell script with the following content:
Code:
#!/sbin/busybox sh
# initramfs pre-boot init script
# Something (what?) needs a few cycles here
/sbin/busybox sleep 1
# Populate /dev
/sbin/busybox mknod /dev/mmcblk1p1 b 179 9
# Mount the root filesystem, second partition on micro SDcard
/sbin/busybox mount -t ext2 -o noatime,nodiratime /dev/mmcblk1p1 /mnt/root
# Transfer root to SDcard
exec /sbin/busybox switch_root /mnt/root /sbin/init
The directory structure must then be compressed. To do this run the following sequence of commands when in the minimal_initramfs directory:
Code:
find . | cpio --quiet -H newc -o | gzip > ../minimal.cpio.gz
4.4 Creating the image
For creating the image you need the tool mkbootimg which you can find in android_bootimg_tools.tar.gz. Run the following command to create the boot image from the initramfs and the kernel you created above:
Code:
./mkbootimg --kernel /path/to/Galaxo-kernel/arch/arm/boot/zImage --ramdisk /path/to/minimal.cpio.gz --cmdline "fbcon=font:VGA8x8" --pagesize 2048 --base 10000000 -o debian_boot.img
5. Configuring network
5.1 Setting up the interface
Your /etc/network/interfaces file on the phone should look like this:
Code:
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf
5.2 Setting up wireless encryption
For network configuration we'll be using wpa_supplicant which we already installed in one of the above steps. On the phone create the file /etc/wpa_supplicant.conf with the following content. Please enter the correct values for ssid, psk and key_mgmt for your network:
Code:
network={
ssid="YourSSID"
psk="YourSecretPassword"
key_mgmt=WPA-PSK
priority=11
}
5.3 Loading drivers
In order for the WLAN kernel module to be loaded add the following line to /etc/modules:
Code:
bcm4325 firmware_path=/etc/rtecdc.bin nvram_path=/etc/nvram.txt
6. Flashing the boot image and booting into Debian
Now it's finally time to finally flash the previously created boot image. At this time, be sure that you only have your Galaxy connected to your PC. Otherwise you might brick any other connected phone. On the PC run
Code:
sudo fastboot flash boot debian_boot.img
Then boot the Galaxy into fastboot mode by pressing "call" when powering on the phone.
When the process is finished the phone will boot into Debian and automatically connect to your wireless network (if the set-up was correct). You can now connect to the phone through ssh and enjoy your new pocket server.
If you may ever want to boot into android again, you just need to flash the original boot.img that you created with nandroid:
Code:
sudo fastboot flash boot boot.img
7. Bluetooth
7.1 Compile brcm_patchram_plus
For getting bluetooth operational it is necessary to use Broadcom's brcm_patchram_plus software. As it is not available as a Debian Squeeze package, we need to compile it ourselves. So we need to install the following packages on the phone:
Code:
apt-get install git gcc make libbluetooth-dev
Then it's possible to download the sources:
Code:
git clone (FIX this url)https :// github . com / MarkMendelsohn / brcm_patchram.git
And compile the tool using:
Code:
make
7.2 Activating bluetooth
In order for bluetooth to work the following files need to be copied from the GAOSP ROM to the same folder on the phone that you compiled the brcm_patchram_plus in:
BCM4325D1_004.002.004.0153.0156.hcd
After that it's possible to execute the followig commands:
Code:
echo 0 > /sys/class/rfkill/rfkill0/state
echo 1 > /sys/class/rfkill/rfkill0/state
./brcm_patchram_plus -d --enable_hci --baudrate 3000000 --use_baudrate_for_download --patchram BCM4325D1_004.002.004.0153.0156.hcd /dev/ttyHS0
The last command will never terminate and you will get a lot of output due to the (-d) switch. After starting a new console, you will be able to scan for bluetooth devices using:
Code:
hcitool -i hci0 scan
7.3 Connecting a keyboard
I'm using a Rapoo E6100 keyboard and the following procedure worked fine for me. It should be similar with other keyboards.
Code:
apt-get install python-bluez python-gobject python-dbus bluez-compat
Code:
cd /usr/share/doc/bluez/examples
Press pairing button on keyboard then
Code:
./simple-agent hci0 6C:xx:xx:xx:xx:xx
(use the bluetooth address of your keyboard, according to the scan in the previous chapter)
The script will ask for a PIN. I entered 0000 on both the keyboard and phone and the keyboard was registered.
Code:
./test-device trusted 6C:xx:xx:xx:xx:xx yes
(again use the bluetooth address of your keyboard)
Code:
hidd --connect 6C:xx:xx:xx:xx:xx
Now you should be good to use your keyboard.
7.4 Automate patchram
Right now, the KB is not automatically connected on boot, because the patchram command from above needs to be executed on every boot. Hence the following commands should be added to /etc/rc.local (before the exit 0):
Code:
#Activate bluetooth
echo 0 > /sys/class/rfkill/rfkill0/state
echo 1 > /sys/class/rfkill/rfkill0/state
/path/to/brcm_patchram_plus --enable_hci --baudrate 3000000 --use_baudrate_for_download --patchram /path/to/BCM4325D1_004.002.004.0153.0156.hcd /dev/ttyHS0 &
8. Setting the clock
I was having trouble with my clock forgetting the day and time after each reboot. It was a flaw in my kernel config. In the current version of attached config file this is fixed. Anyway, I'm also running NTP to have the clock more accurate.
Code:
apt-get install ntpdate
NTP already come nicely pre-configured (thanks, Debian maintainers!). After that the timezone can be selected using
Code:
dpkg-reconfigure tzdata
9. GUI (X.org)
X.org works almost out-of-the-box since we already pathed the kernel as described in chapter 4 above. Based on the description from (FIX this url)https :// code . google . com/p/linux-on-android/wiki/BasicSteps only two minor changes have been made:
The framebuffer device is at /dev/fb0 instead of /dev/graphcics/fb0
I use evdev instead of tslib, because it provided better results for me (thanks to pabs from #debian-mobile for pointing me there)
9.1 Install X.org
All we need to do is download the software
Code:
apt-get install xorg xserver-xorg-video-fbdev xserver-xorg-input-evdev
9.2 Configuring X.org
Now create /etc/X11/xorg.conf:
Code:
Section "InputDevice"
Identifier "Touchscreen"
Driver "evdev"
Option "Device" "/dev/input/event2"
EndSection
Section "Device"
Identifier "Configured Video Device"
Driver "fbdev"
Option "fbdev" "/dev/fb0"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
Option "DPMS" "false"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection
Section "ServerLayout"
Identifier "Default"
Screen "Default Screen"
InputDevice "Touchscreen" "CorePointer"
EndSection
Section "ServerFlags"
Option "DefaultServerLayout" "Default"
EndSection
9.3 Testing X.org
For testing X.org I've installed icewm and created the following /root/.xsession
Code:
#!/bin/sh
xterm&
exec icewm
Then just type in startx from the console and you have X. Of course you will have to change this to whatever you need or maybe even make X start on boot.
9.4 Boot into Browser
For my target system I want the phone to directly boot into a browser. This can easily be achieved by using the nodm package:
Code:
apt-get install nodm
and midori as browser:
Code:
apt-get install midori
We'll also need a user account. I called my user "default". But naturally you can of course choose whatever you like.
Code:
adduser default
Then nodm has to be configured in /etc/default/nodm:
Code:
# nodm configuration
# Set NODM_ENABLED to something different than 'false' to enable nodm
NODM_ENABLED=true
# User to autologin for
NODM_USER=default
# xinit program
NODM_XINIT=/usr/bin/xinit
# First vt to try when looking for free VTs
NODM_FIRST_VT=7
# X session
NODM_XSESSION=/etc/X11/Xsession
# Options for the X server
NODM_X_OPTIONS='vt7 -nolisten tcp'
# If an X session will run for less than this time in seconds, nodm will wait an
# increasing bit of time before restarting the session.
NODM_MIN_SESSION_TIME=60
And we have to create ~/.xsession for our user:
Code:
#!/bin/bash
midori -e Fullscreen &
exec icewm
A few tweaks in the icewm config (~/.icewm/preferences) will make the window manager look more nicely:
Code:
WorkspaceNames=" 1 "
TaskBarShowCPUStatus=0
TaskBarDoubleHeight=0
TaskBarShowWorkspaces=0
TaskBarShowMailboxStatus=0
TaskBarShowNetStatus=0
TimeFormat="%H:%M"
TaskBarShowWindowListMenu=1
TaskBarShowShowDesktopButton=0
10. Power management
The kernel is already configured with many different frequency govenors. Also the default govenor is set to "ondemand" but for some reason the when looking at /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor it's using the "performance" govenor. This can be solved by simply installing cpufreq-utils:
Code:
apt-get install cpufrequtils
The default settings are already using "ondemand", which seems to be a good choice. Anyway, further optimisations can be done in /etc/default/cpufrequtils if needed.
The phone still gets a little too warm for my taste (I think warmer than in android). Maybe there's something that could fix this, but I'm not an expert.
11. Known shortcomings
The whole set-up is in a really, REALLY early alpha stage
If any of the hardware buttons is touched in text mode the phone crashes (does not happen when in X.org)
The screen will time-out after some time, I have no idea how to wake it up again
Did I mention this is in an alpha stage?
12. Future improvements
Switching to a newer kernel version: The latest version of GAOSP runs on kernel version 2.6.35, while this guide is using 2.6.27. I have experimented with 2.6.29, but I had trouble getting a working frame buffer.
Switching to the latest version of debian (wheezy).
History
History:
2013-12-27:
Initial version
2013-12-30:
Minimized the the init script by removing mounts for /dev, /proc, and /sys. These are not necessary and mounting /dev prevents Debian's udev from working correctly.
2014-01-19:
Added description for bluetooth.
2014-01-25:
Added description for graphical user interface (X.org).
2014-01-25:
Boot into X/Browser and power management
2014-01-26:
Updated clock settings
Video proof
Hi all,
to get a better understanding what this is all about please watch the attached video. Please excuse the poor quality and the fingerprints on the screen.
As you can see the framebuffer output has a few quirks, but hopefully this will work out as soon as X is working.
BR,
Frank
All goals achieved
Okay, I think I now have achieved all goals. I can connect to WiFi and bluetooth. And there is a graphical user interface. Now the tweaking can start (first thing that comes to mind is powersaving). I really created this guide for myself, but I'd be happy to know if anyone else has interest in this topic.
Nice, I am interested. One question!
frank47 said:
Okay, I think I now have achieved all goals. I can connect to WiFi and bluetooth. And there is a graphical user interface. Now the tweaking can start (first thing that comes to mind is powersaving). I really created this guide for myself, but I'd be happy to know if anyone else has interest in this topic.
Click to expand...
Click to collapse
Nice, I am interested. One question!
I would like to use this device to get some data from the sensors. I have tested some apps in Android GAOSP to read the sensors in the i7500, but instead of using android apps, it could be very interesting to have a debian.
Have you tried to do it? Do you think it is possible? Is it too tricky to get a stable debian running an app to send sensors' data to another debian? I could help if you see it is interesting.
What is your opinion? Thank you...
Hi PabloGN,
there are a lot of entries in /proc and /sys. I think it's likely to be possible te access the sensors. For now, I have only looked at the battery status. Don't know if you'd consider that a sensor. Anyway, you would probably have to re-write your software to use those devices instead of using already existing Java libs for android. Hard to tell,*if it's worth the effort.
BR,
Frank
PabloGN said:
I would like to use this device to get some data from the sensors.
Click to expand...
Click to collapse
This is the list of input devices on my the i7500:
Code:
[email protected]:~# cat /proc/bus/input/devices
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="I7500_headset"
P: Phys=
S: Sysfs=/devices/virtual/input/input0
U: Uniq=
H: Handlers=kbd event0
B: EV=3
B: KEY=4 0 0 0 0 0 0 0
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="I7500_keypad"
P: Phys=
S: Sysfs=/devices/virtual/input/input1
U: Uniq=
H: Handlers=kbd event1
B: EV=3
B: KEY=800180 100000 0 41000800 1c1ec0 0 0 0
I: Bus=0000 Vendor=0000 Product=0000 Version=0033
N: Name="melfas-tsi-touchscreen"
P: Phys=
S: Sysfs=/devices/virtual/input/input2
U: Uniq=
H: Handlers=event2
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=11000003
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="compass"
P: Phys=
S: Sysfs=/devices/virtual/input/input3
U: Uniq=
H: Handlers=event3
B: EV=9
B: ABS=20305ff
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="proximity_i2c"
P: Phys=
S: Sysfs=/devices/virtual/input/input4
U: Uniq=
H: Handlers=event4
B: EV=1
So, it should at least be possible to read the compass and proximity sensor data form /dev/input/event3 and /dev/input/event4. Maybe there's more and I just haven't compiled it into the kernel or it's accessed in some other way. Sorry, the sensors are not part of my use case so far.
I'm only using /dev/input/event2 (touchscreen) in my xorg.conf as an input device. Works like a charm.
Good luck with your endeavour. If you want me to test something or send you the output of some command, just ask here or by PM.

[GUIDE]DualBootPatcher Use, Build from Source/using Docker/Travis And Add New Devices

Hi all DualBootPatcher fans, in this thread i'll try to explain all things about DualBootPatcher, so if your user please read this post carefully then continue to other posts, and if you developer you can skip it and go to post #2 directly
Part 0: Introduction & How to use DualBootPatcher?
What is DualBootPatcher?
DualBootPatcher is an open-source app that allows multiple ROMs to be installed on a single Android device. It does its best to work with existing code and does not require explicit support from ROMs. There are currently 270+ supported devices and their variations.
It's originally developed by the amazing developer @chenxiaolong with help of many contributors
Click to expand...
Click to collapse
What does the app do ?:
It patches...
Custom kernels for dual boot support
ROMs so that they can be installed as secondary
Google Apps packages for AOSP-based ROMs
SuperSU so that it can be used in the secondary ROM
Where can i find it?
Website
XDA Main Thread
Github
What's supported ?
Except Toaster and Alarm clocks pretty much everything is supported.
Click to expand...
Click to collapse
How to use the App?
- Download, install and open the app.
- Swipe to the right to open the menu. Click "ROMS". Now if this is the first time you use it, it will ask you if you want to set kernel. Do so!
- After it has finished go to ROM Settings (primary ROM 3 dot menu) and select Update Ramdisk. It will update it and will ask you to reboot. Press Reboot Now, or Reboot later.
- Now Download any ROM you like and open the app again and open the menu and open Patch Zip File from the menu. Ensure that your Device is set to (yourdevicename) and under Partition configuration select secondary/dataslot (will install 2nd ROM in /system) or data slot.
- Click continue and select where to save the patched file.
- You should see the file is being put in "Queue". Just click the confirm button to the upper right.
Note: If you want to go back, just swipe the ROM in queue to right and start over.
- The app will patch the zip. When done, go back to "ROMs".
- Click "Flash zip files" (the big pink button on the lower right). Click the pink plus button to add your previously patched zip file.
- Locate the file you have patched in step 7. Unless you have changed the name there, it should be something like ROM_name_partition_config_ID.zip (like RR-N-v5.8.3-20170707-cheeseburger-Unofficial_dual.zip).
- Click on that file and choose "Keep location". Now confirm the flash with the button on the upper right side.
Note: You can also install the patched zip files in recovery.
- It will now open the terminal and begin flashing the file. This requires some patience. After it has flashed the file you'll see success message in green.
- Now click back and you should see your newly installed ROM along with the Primary ROM.
Note: You can find more options by clicking on the three buttons on each ROM.
- Now reboot and wait till finishing 2nd ROM first boot. install DualBootPatcher apk so you can easily switch ROMs, there is another way to change ROMs: flash DualBootUtilities.zip and switch ROM manually.
Note: Using Bootui:
- Open app then select settings and press install (update) bootui. then Swipe to the right to open the menu. Click "ROMS" again and open secondary ROM Settings) and select Update Ramdisk, Now you can change ROMs simply using boot ui (something like grub bootloader but it works like twrp)
Partitions Configurations:
The patcher offers several locations for installing ROMs:
Primary: This is normally used for installing a zip to the primary ROM. It is not required, but is strongly recommended because it has code to prevent the zip from inadvertently affecting other ROMs.
Dual: Dual/Secondary is the first multiboot installation location. It installs to the system partition. This is a good spot for installing a second ROM because it doesn't take any space away from the internal storage.
Multi-slots: There are 3 multislots: multi-slot-1, multi-slot-2, multi-slot-3. These install to the cache partition. This is specifically for devices, like the Galaxy S4, that have a massive cache partition.
Data-slots: There can be an unlimited number of data slots. These install to the data partition and eat up space on the internal storage. This is useful for devices where the system partition is nearly full and the cache partition is tiny. These slots are named "data-slot-[id]", where "id" is something you provide in the app.
Extsd-slots: There can be an unlimited number of extsd slots. These install to the external SD card, which is useful as it keeps the ROMs off of the internal storage. Note that the ROM's data files are still stored on the data partition.
Apps and Data sharing:
DualBootPatcher very recently got support for sharing apps and their data across ROMs. Maybe sharing is somewhat of a misleading term. The feature actually makes Android load the shared apps and data from a centralized location, /data/multiboot/_appsharing. So you're not sharing apps from one ROM to another per se. The ROMs are just loading the apps from one shared location. Let me make this clearer with an analogy.
Think of the people in a company office as ROMs. You want to share with your coworkers some documents (apps). Instead of telling them to come over to your desk to see those documents (sharing apps from one ROM to another), everyone goes to the conference room to look at the documents together (loading apps from a shared location). That's how app and data sharing is implemented.
Click to expand...
Click to collapse
To use app sharing, follow these steps in every ROM that you want to use app sharing: (doesn't work with JB ROMs)
Install the app you want to share
Open DualBootPatcher and go to "App Sharing" in the navigation drawer
Enable individual app sharing
Tap "Manage shared applications" and enable APK/data sharing for the app
Reboot
When you uninstall an app that's shared, it simply become unshared for the current ROM. That way, other ROMs are not affected. To continue the analogy above, if you quit your job, you won't shred the documents that everybody else was looking at.
If you unshare an app's data, it will go back to using the data it had before it was shared. In other words, you leave the conference room and go back to work on your own documents at your desk.
Click to expand...
Click to collapse
How to Tips:
How to boot to another ROM ?
This is simple ... There is no reboot to primary, secondary or whatever. So all you have to do is:
1) Go to ROMs section of the App.
2) Click on the ROM you want to boot to. You should see "Switching ROM" message. After few seconds, you should see a report message saying that "ROM successfully switched".
3) Now just do a normal reboot of your device. See the magic! It should boot to the ROM you have switched on step 2.
Note: You can find more options by selecting the three buttons on each ROMs (like creating reboot widgets for directly rebooting to specific rom).
You also need to install the App to all of the ROMs you install. Otherwise, you want be able to boot to other ROMs!
Other How to ?
Wipe /cache, /data, /system, or dalvik-cache?
The easiest way is to do it from the app while booted in another ROM. Just go to "Roms" in the navigation drawer, tap the 3 dots options menu for the ROM you want to wipe, and tap "Wipe ROM".
Update the primary ROM?
Patch the zip for primary and flash it. The "primary" installation target is designed so that other ROMs won't be affected when you want to flash something for the primary ROM.
Update a non-primary ROM?
Patch and flash the zip exactly like how you did it the first time.
Flash a mod or custom kernel for the primary ROM?
Patch it for primary before flashing. If the zip does not wipe /cache, it is also safe to flash it directly.
Flash a mod or custom kernel for a non-primary ROM?
Just patch and flash it
Now, You're perfect DualBootPatcher user,so let's enter the main guide !
Guide Index:
Part 1: How to build DualBootPatcher from source manually?
Part 2: How to build DualBootPatcher using docker images?
Part 3: How to build DualBootPatcher using TravisCI?
Part 4: How to add new Devices to DualBootPatcher?
Part 5: How to submit new Devices to official DualBootPatcher support?
Extra: How to share apps (apk) between ROMs? (soon!)
Before we start you should know that DBP is not just android app, there is versions for windows and linux also and in this guide i'll talk about app and linux version only, i don't use windows
Part 1: How to build DualBootPatcher from source?
When you deeply exploring DualBootPatcher repository you'll find all information and guides you need but for some people instructions isn't clear enough, so let me explain it here
- You'll need linux, whichever distribution you use. but i'm sure building works on [Debian-Ubuntu-Fedora-Arch] and all its derivations.
A) Prerequisites:
- You'll need these packages whatever version you want to build:
Android NDK
Currently NDK r15 is required to build, you can get it here
Download, Extract and rename it to "android-ndk"
Code:
wget https://dl.google.com/android/repository/android-ndk-r15-linux-x86_64.zip && unzip android-ndk-r15-linux-x86_64.zip && mv android-ndk-r15 android-ndk
And then export android ndk:
Code:
echo "export ANDROID_NDK=$(pwd)/android-ndk" >> ~/.bashrc
echo "export ANDROID_NDK_HOME=$(pwd)/android-ndk" >> ~/.bashrc
cmake
DBP needs cmake 3.7.2 or higher. you need to download it here
Downloading & Extract command:
Code:
wget https://cmake.org/files/v3.7/cmake-3.7.2.tar.gz && tar xzf cmake-3.7.2.tar.gz
extract to folder and run the following commands in cmake folder
Code:
sed -i 's|cmake_options="-DCMAKE_BOOTSTRAP=1"|cmake_options="-DCMAKE_BOOTSTRAP=1 -DCMAKE_USE_OPENSSL=ON"|' bootstrap
./bootstrap
make
sudo make install
OpenSSL
i'm successfully build using openssl-1.1.0c, download here and extract.
Code:
wget https://www.openssl.org/source/openssl-1.1.0c.tar.gz && tar xzf openssl-1.1.0c.tar.gz
open openssl-1.1.0c folder and install it
Code:
./config shared --prefix=/usr/local/ssl --openssldir=/usr/local/ssl
make
sudo make install
echo 'PATH=${PATH}:/usr/local/ssl' >> ~/.bashrc
gtest
Install on Ubuntu / Debian:
Code:
sudo apt-get install libgtest-dev
On Fedora:
Code:
sudo dnf install gtest-devel
On Archlinux:
Code:
sudo pacman -S gtest
yaml-cpp
Install on Ubuntu / Debian using
Code:
sudo apt-get install libyaml-cpp-dev
On Fedora
Code:
sudo dnf install yaml-cpp-devel
On Archlinux:
Code:
sudo pacman -S yaml-cpp
Other General packages that must be installed: [Skip this if you have android build environment :good: ]
Ubuntu / Debian:
Code:
sudo apt-get install ccache libboost-dev libssl-dev openssl python-minimal build-essential libfontconfig1 findutils git make libprocps-dev unzip zip gcc-multilib g++-multilib lib32ncurses5-dev transifex-client gnupg mesa-common-dev libglu1-mesa-dev
Fedora:
Code:
sudo dnf install ccache findutils gcc-c++ git make procps-ng unzip zip gnupg ncurses-compat-libs transifex-client openssl-devel
Archlinux:
Code:
sudo pacman -S ccache boost openssl lib32-openssl findutils git make procps-ng unzip zip gnupg gcc-multilib ncurses
Code:
sudo pacaur -S transifex-client ncurses5-compat-libs lib32-ncurseslib32-ncurses5-compat-libs
- For building android app you need:
Android SDK
You need to install SDK using android studio ( build-tools 25.0.3, platforms android-25, platform-tools and tools )
or install from terminal:
Code:
mkdir -p android-sdk && cd android-sdk
wget -q https://dl.google.com/android/repository/platform-tools_r25.0.3-linux.zip && unzip -qq platform-tools_r25.0.3-linux.zip
wget -q https://dl.google.com/android/repository/build-tools_r25.0.3-linux.zip && unzip -qq build-tools_r25.0.3-linux.zip
wget -q https://dl.google.com/android/repository/tools_r25.2.3-linux.zip && unzip -qq tools_r25.2.3-linux.zip
Then Export it:
Code:
echo "export ANDROID_HOME=$(pwd)" >> ~/.bashrc
echo "export PATH=${PATH}:${ANDROID_HOME}/tools" >> ~/.bashrc
JDK 1.8
Ubuntu / Debian:
Code:
sudo apt-get install openjdk-8-jdk openjdk-8-jdk-headless
Fedora:
Code:
sudo dnf install java-1.8.0-openjdk-devel java-1.8.0-openjdk-headless
Archlinux:
Code:
sudo pacman -S jdk8-openjdk
Other packages:
Ubuntu / Debian:
Code:
sudo apt-get install lib32stdc++-6-dev
Fedora:
Code:
sudo dnf install glibc.i686 libstdc++.i686
Archlinux:
Code:
sudo pacman -S glibc libstdc++5 lib32-libstdc++5
- And for linux version you need:
qt5
it must be 5.3 or higher
Ubuntu / Debian:
Code:
sudo apt-get install qttools5-dev-tools libqt5core5a
Fedora:
Code:
sudo dnf install qt5-qtbase-devel
Archlinux:
Code:
sudo pacman -S qt5-base
Other packages:
Ubuntu / Debian:
Code:
sudo apt-get install libarchive-dev liblz4-tool liblzma-dev lz4-dev zlib1g-dev lib32z-dev
Fedora:
Code:
sudo dnf install libarchive-devel lz4-devel xz-devel
Archlinux:
Code:
sudo pacman -S libarchive lz4 xz lib32-xz lzip
- Some final touches:
Enable cache:
Code:
echo "export USE_CCACHE=1" >> ~/.bashrc
Reload bash environment:
Code:
source ~/.bashrc
- Cloning the source:
Code:
git clone --recursive https://github.com/chenxiaolong/DualBootPatcher.git
B) Building Android APP:
- Open DualBootPatcher folder and make new folder "build" and open it.
Code:
mkdir build && cd build/
- Now Build the app:
Code:
cmake .. -DMBP_BUILD_TARGET=android -DMBP_BUILD_TYPE=debug
make
cpack -G TXZ
make apk
And you'll find built apk in DualBootPatcher/Android_GUI/build/outputs/apk/Android_GUI-debug.apk
C) Building Utilities Zip:
Utilities Zip is AROMA based zip which enable you to switch ROMs form twrp or wipe ROM when something went wrong.
- In build folder run these commands:
Code:
make android-system_armeabi-v7a
make -C data/devices
./utilities/create.sh
you'll find built utilities.zip in DualBootPatcher/build/utilities/DualBootUtilities-9.2.0.zip
D) Building Linux App:
- In build folder run these commands:
Code:
cmake .. -DMBP_BUILD_TARGET=desktop -DMBP_PORTABLE=ON
make
cpack -G TXZ
or to pack it to zip file:
Code:
cpack -G ZIP
Special Thanks:
@oF2pks For helping me setup build environment on arch
@Ahmed Hady & @androidlover5842 Without their helps i won't be here
Part 2: How to build DualBootPatcher using docker images?
What is docker? [in case you don't know it ]
Docker is the world’s leading software container platform. Developers use Docker to eliminate “works on my machine” problems when collaborating on code with co-workers. Operators use Docker to run and manage apps side-by-side in isolated containers to get better compute density. Enterprises use Docker to build agile software delivery pipelines to ship new features faster, more securely and with confidence for both Linux, Windows Server, and Linux-on-mainframe apps.
Click to expand...
Click to collapse
Firstly, make sure you have docker installed, if not install it
From here you should choose a method you'll follow, Building docker images manually or use pre-built docker images.
A) Building docker images manually:
@chenxiaolong sir has made docker image configuration files here
all you need to do after sync the repo like part 1 is entering the following commands in DualBootPatcher directory:
Code:
./docker/generate.sh
./docker/build.sh
Note that building the docker images will take a long time and consume a lot of bandwidth--multiple gigabytes at the very least. It will download all the dependencies for building DualBootPatcher for all supported targets.
Click to expand...
Click to collapse
B) Using ready-made docker images:
i have made docker images and uploaded them to docker hub
to download "pull" it enter these commands:
Code:
docker pull yshalsager/dualbootpatcher:9.3.0-4-base
docker pull yshalsager/dualbootpatcher:9.3.0-4-android
docker pull yshalsager/dualbootpatcher:9.3.0-4-linux
Building DualBootPatcher using docker:
- To enter docker container and build DualBootPatcher make folder "builder" in DualBootPatcher directory
Code:
cd DualBootPatcher && mkdir -p builder
- Then run this to enter android build container
Code:
docker run --rm -it -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -v "$(pwd):/builder/DualBootPatcher:rw,z" -v "${HOME}/.android:/builder/.android:rw,z" -v "${HOME}/.ccache:/builder/.ccache:rw,z" -v "${HOME}/.gradle:/builder/.gradle:rw,z" yshalsager/dualbootpatcher:9.3.0-4-android bash
- After this you'll continue like normal building:
Code:
cd DualBootPatcher/builder && cmake .. -DMBP_BUILD_TARGET=android -DMBP_BUILD_TYPE=debug && make -j16 && rm -rf assets && cpack && make apk -j16
make android-system_armeabi-v7a -j16 && make -C data/devices -j16
- Now exit from container and enter linux build one:
Code:
docker run --rm -it -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -v "$(pwd):/builder/DualBootPatcher:rw,z" -v "${HOME}/.android:/builder/.android:rw,z" -v "${HOME}/.ccache:/builder/.ccache:rw,z" -v "${HOME}/.gradle:/builder/.gradle:rw,z" yshalsager/dualbootpatcher:9.3.0-4-linux bash
- Build utilities ZIP:
Code:
cd DualBootPatcher/builder && ./utilities/create.sh
- And build linux app
Code:
cmake .. -DMBP_BUILD_TARGET=desktop -DMBP_PORTABLE=ON && make -j16 && cpack
- You'll find output files in your local "builder" folder like normal build.
Part 3: How to build DualBootPatcher using TravisCI?
Travis CI is free open-source continues integration service, which simply take your project from GitHub and test / build it for you !
it's amazing solution if you don't have time/free space/mind lol :cyclops: to test your code.
- you'll need to signup Travis account, go here and press signup, enter your GitHub account details then approve Travis needed permissions and done.
- Now Fork DualBootPatcher repository to your account and create .travis.yml file in project root.
- Copy my Travis configuration to your .travis.yml
Code:
sudo: required
services:
- docker
before_install:
# Clone DualBootPatcher Repository
- git clone --recursive https://github.com/yshalsager/DualBootPatcher -b master DualBootPatcher/
# Pull docker images
- docker pull yshalsager/dualbootpatcher:9.3.0-4-base
- docker pull yshalsager/dualbootpatcher:9.3.0-4-android
- docker pull yshalsager/dualbootpatcher:9.3.0-4-linux
script:
# Make work directories
- mkdir $HOME/.android
- mkdir -p ${TRAVIS_BUILD_DIR}/DualBootPatcher/builder/ && cd ${TRAVIS_BUILD_DIR}/DualBootPatcher/
# Build APK
- |
docker run --rm -i -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -v "$(pwd):/builder/DualBootPatcher:rw,z" -v "${HOME}/.android:/builder/.android:rw,z" yshalsager/dualbootpatcher:9.3.0-4-android bash << EOF
cd DualBootPatcher/builder && cmake .. -DMBP_BUILD_TARGET=android -DMBP_BUILD_TYPE=debug && make -j16 && rm -rf assets && cpack && make apk -j16
make android-system_armeabi-v7a -j16 && make -C data/devices -j16
exit
EOF
- |
docker run --rm -i -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -v "$(pwd):/builder/DualBootPatcher:rw,z" -v "${HOME}/.android:/builder/.android:rw,z" yshalsager/dualbootpatcher:9.3.0-4-linux bash << EOF
# Build Utilities Zip
cd ~/DualBootPatcher/builder && ./utilities/create.sh
# Build Linux
cmake .. -DMBP_BUILD_TARGET=desktop -DMBP_PORTABLE=ON && make -j16 && cpack
exit
EOF
after_success:
- export TRAVIS_CURRENT_DATE=$(date +"%d%m%y-%Hh%Mm")
# Check output & md5sum
- ls -l ${TRAVIS_BUILD_DIR}/DualBootPatcher/Android_GUI/build/outputs/apk/debug/Android_GUI-debug.apk
- md5sum ${TRAVIS_BUILD_DIR}/DualBootPatcher/Android_GUI/build/outputs/apk/debug/Android_GUI-debug.apk
- ls -l ${TRAVIS_BUILD_DIR}/DualBootPatcher/builder/utilities/DualBootUtilities-9.3.0.zip
- md5sum ${TRAVIS_BUILD_DIR}/DualBootPatcher/builder/utilities/DualBootUtilities-9.3.0.zip
- ls -l ${TRAVIS_BUILD_DIR}/DualBootPatcher/builder/DualBootPatcher-9.3.0-Linux.zip
- md5sum ${TRAVIS_BUILD_DIR}/DualBootPatcher/builder/DualBootPatcher-9.3.0-Linux.zip
# Upload to transfer.sh
- cd ${TRAVIS_BUILD_DIR}/DualBootPatcher/Android_GUI/build/outputs/apk/debug/ && curl --upload-file ./Android_GUI-debug.apk https://transfer.sh/Android_GUI-debug-${TRAVIS_CURRENT_DATE}.apk
- cd ${TRAVIS_BUILD_DIR}//DualBootPatcher/builder/utilities/ && curl --upload-file ./DualBootUtilities-9.3.0.zip https://transfer.sh/DualBootUtilities-9.3.0-${TRAVIS_CURRENT_DATE}.zip
- cd ${TRAVIS_BUILD_DIR}/DualBootPatcher/builder/ && curl --upload-file ./DualBootPatcher-9.3.0-Linux.zip https://transfer.sh/DualBootPatcher-9.3.0-${TRAVIS_CURRENT_DATE}-Linux.zip
- Edit line 8 with your Repository and branch you want to build.
Code:
- git clone --recursive https://github.com/yshalsager/DualBootPatcher -b master DualBootPatcher/
- This simple TravisCI configuration builds both of apk and utilities.zip and deploy them to transfer.sh
- Now open Travis and add your DualBootPatcher fork to projects and start building :good:
- You'll find built apk md5 and links from line at the end Travis log
- Build takes about 25 mins
- When you add new commits to repository Travis will always build new apk for you !
- If you want to change something in configuration, always check its syntax to make sure it's valid YAML using this site
Part 4: How to add new Devices to DualBootPatcher?
To add your/new device to DualBootPatcher you need to get some information first then add it to DualBootPatcher devices:
- Flash GetLogs-20161128-1.zip using recovery [TWRP highly recommended]
- Copy /sdcard/logs/[Date&Time].tar to PC, extract it and let's start.
- This is new device template:
Code:
- name: (Device Name)
id: (device id)
codenames:
- (device codename1)
- (device codename2)
- (device codename3)
architecture: (device architecture)
block_devs:
base_dirs:
- (/dev/block/bootdevice/by-name)
system:
- (/dev/block/bootdevice/by-name/system)
cache:
- (/dev/block/bootdevice/by-name/cache)
data:
- (/dev/block/bootdevice/by-name/userdata)
boot:
- (/dev/block/bootdevice/by-name/boot)
recovery:
- (/dev/block/bootdevice/recovery)
extra:
- (/dev/block/bootdevice/modem)
boot_ui:
supported: true
flags:
- (TW_HAS_DOWNLOAD_MODE)
graphics_backends:
- fbdev
brightness_path: (/sys/class/leds/lcd-backlight/brightness)
max_brightness: (255)
default_brightness: (162)
pixel_format: (RGBX_8888)
theme: portrait_hdpi
- You'll edit all values between brackets.
- open logs/system/build.prop, you'll find:
ro.product.model= is your (Device Name)
ro.product.name= and ro.product.device= is your (device id) and (device codename1), if you know more names for your device add it in (device codename2) / (device codename3)
ro.product.cpu.abi= is your (device architecture)
- open logs/recovery/recovery.fstab, you'll find main device mount points, copy each mount point to it name
- open logs/recovery/recovery.log, you'll find TW_BRIGHTNESS_PATH := /sys/class/leds/lcd-backlight/brightness this is your (brightness_path)
I:Got max brightness 255 is (max_brightness)
setting GGL_PIXEL_FORMAT_RGBA_8888 is (pixel_format)
- Note: you can get these info from BoradConfig.mk in your device twrp tree.
- Now read "Partition Logs:" in recovery.log
it'll tell us second mount point, as example /system | /dev/block/mmcblk0p41
so you should add it like
Code:
system:
- /dev/block/bootdevice/by-name/system
- /dev/block/mmcblk0p41
and so on with other partitions.
- Checking more mounts: (not necessary but i recommend it)
open logs/listings/dev_full and scroll down to /dev/block/platform/soc.0 you'll find another main mount point which contain by-name and by-num folders like /dev/block/platform/soc.0/f9824900.sdhci
from /dev/block/platform/soc.0/f9824900.sdhci/by-name list copy each partition mount point to your device
- Now we're done, you should have something like
Code:
- name: Xiaomi Mi4S
id: aqua
codenames:
- aqua
architecture: arm64-v8a
block_devs:
base_dirs:
- /dev/block/bootdevice/by-name
- /dev/block/platform/soc.0/f9824900.sdhci/by-name
system:
- /dev/block/bootdevice/by-name/system
- /dev/block/platform/soc.0/f9824900.sdhci/by-name/system
- /dev/block/mmcblk0p41
cache:
- /dev/block/bootdevice/by-name/cache
- /dev/block/platform/soc.0/f9824900.sdhci/by-name/cache
- /dev/block/mmcblk0p42
data:
- /dev/block/bootdevice/by-name/userdata
- /dev/block/platform/soc.0/f9824900.sdhci/by-name/userdata
- /dev/block/mmcblk0p44
boot:
- /dev/block/bootdevice/by-name/boot
- /dev/block/platform/soc.0/f9824900.sdhci/by-name/boot
- /dev/block/mmcblk0p37
recovery:
- /dev/block/bootdevice/by-name/recovery
- /dev/block/platform/soc.0/f9824900.sdhci/by-name/recovery
- /dev/block/mmcblk0p38
boot_ui:
supported: true
graphics_backends:
- fbdev
flags:
- TW_QCOM_RTC_FIX
pixel_format: RGBX_8888
brightness_path: /sys/class/leds/lcd-backlight/brightness
max_brightness: 255
default_brightness: 162
theme: portrait_hdpi
- Open DualBootPatcher/data/devices/(your device manufacturer).yml and add your device codes. then Check your code syntax here if everything is right, make commit to add your device to your repository.
- Build apk using any method explained above to test it.
Part 5: How to submit new Devices to official DualBootPatcher support?
Once you checked everything is working, it's time to contribute to DualBootPatcher and add your device to official devices:
- First, Check you made all needed changes to add your device without problems, again check for YAML syntax because if it's wrong build won't work.
- Open DualBootPatcher Repository, press New pull request button.
- Press compare across forks and change the head fork to your username/DualBootPatcher
- Give a name and a description to your pull request, some thing like: "Add (Device Name) support" or "data: Add (device name)
- Now click the "Create pull request" green button
- Wait for your changes to be verified and merged to the project, the developer received your code and he will review, try and add it to the source code. You will be notified when your code merged.
Supported Devices by me
Here is my all contributions to DualBootPatcher:
Nokia X/XL
Nokia X2
Samsung Galaxy Win & Core
Xiaomi Mi 6
Xiaomi Redmi 4A
OnePlus 5
HTC Desire Eye
YU YUREKA BLACK
Xiaomi Mi 4S
Xiaomi Redmi Pro
Samsung Galaxy S8/S8+ [Exynos & Snapdragon]
Zenfone 2 Laser [Z00ED]
Lenovo Vibe K6
Samsung Tab S2
Samsung Galaxy Note 8 (Exynos)
If you can't add your device, you can pm me with logs tar file and i'll add it for you
Hii reserved
---------- Post added at 02:20 AM ---------- Previous post was at 02:20 AM ----------
I will tell u, how to sync apps between roms, without using double storage space for apk and libs.
---------- Post added at 02:25 AM ---------- Previous post was at 02:20 AM ----------
also can be used as multi profile
Support Nokia 6?
Qualcomm s430 Full root...
taicracker said:
Support Nokia 6?
Qualcomm s430 Full root...
Click to expand...
Click to collapse
Flash get logs
And send me
taicracker said:
Support Nokia 6?
Qualcomm s430 Full root...
Click to expand...
Click to collapse
Read this man! https://forum.xda-developers.com/showpost.php?p=73551957&postcount=5
or if you can't do it i can help, just give me the logs tar file
yshalsager said:
Read this man! https://forum.xda-developers.com/showpost.php?p=73551957&postcount=5
or if you can't do it i can help, just give me the logs tar file
Click to expand...
Click to collapse
The file where you say is located on the device. I will upload it to you soon ?
---------- Post added at 05:27 PM ---------- Previous post was at 04:28 PM ----------
yshalsager said:
Read this man! https://forum.xda-developers.com/showpost.php?p=73551957&postcount=5
or if you can't do it i can help, just give me the logs tar file
Click to expand...
Click to collapse
https://drive.google.com/file/d/0B-7MZC8TPIGtTjQyOFVydzNHV1U/view?usp=drivesdk
This is the logs file. (.tar.gz)
I am not on a PC right now. You help me. Do you need the build.prop file on your device?
addy692 said:
Flash get logs
And send me
Click to expand...
Click to collapse
https://drive.google.com/file/d/0B-7MZC8TPIGtTjQyOFVydzNHV1U/view?usp=drivesdk
?
taicracker said:
https://drive.google.com/file/d/0B-7MZC8TPIGtTjQyOFVydzNHV1U/view?usp=drivesdk
This is the logs file. (.tar.gz)
I am not on a PC right now. You help me. Do you need the build.prop file on your device?
Click to expand...
Click to collapse
I got it, apk will be here soon
yshalsager said:
I got it, apk will be here soon
Click to expand...
Click to collapse
Ok. Thanks
taicracker said:
Ok. Thanks
Click to expand...
Click to collapse
@taicracker
Here you are, please test and report me
https://transfer.sh/rqmJs/Android_GUI-debug-290817-12h43m41s.apk
yshalsager said:
@taicracker
Here you are, please test and report me
https://transfer.sh/rqmJs/Android_GU...-12h43m41s.apk
Click to expand...
Click to collapse
link die
taicracker said:
link die
Click to expand...
Click to collapse
Sorry
https://transfer.sh/rqmJs/Android_GUI-debug-290817-12h43m41s.apk
yshalsager said:
Sorry
https://transfer.sh/rqmJs/Android_GUI-debug-290817-12h43m41s.apk
Click to expand...
Click to collapse
Ok Thanks. I'm downloading. Installation is complete and then I do next. My Nokia 6 does not have a compatible room at all
I installed apk file and what do i do next?

Categories

Resources