[GUIDE]Building a Kernel from source{Mediatek} - Miscellaneous Android Development

Guide to Mediatek Building(Guide 1:=Kernel)
Here, we'll be talking about how to build kernels and how they are different than the ones we've built for Qualcomm.
Requisites
A linux machine
Required Packages(Attached in 2nd post)
C programming and a knowledge about Makefiles
NDK
Lets begin,
Step 1(Setting up the build environment):=As always we have to set up the build environment so that the linux knows we are building something.
This is how we do it
Code:
export TARGET_BUILD_VARIANT=user TARGET_PRODUCT=devicename MTK_ROOT_CUSTOM=../mediatek/custom/ TARGET_KERNEL_VERSION=devicename &&export PATH=pathToDir/arm-eabi-4.6/bin:$PATH&&export CROSS_COMPILE=arm-eabi-&&export ARCH=arm
Let me explain what this does
The BUILD_VARIANT specifies what the kernel is going to be built for. A very good article i came across for explaining the build-variants is here.
The TARGET_PRODUCT/TARGET_KERNEL_PRODUCT tells the linux machine what "device specific" files to use
The MTK_ROOT_CUSTOM specifies the directory of the mediatek/custom folder. remember this mide be in the same directory as the kernel source as well.
The PATHThis sets your toolchain executables to your path. Download toolchain(preferably arm-eabi-4.6) Or, if you want to, you could build your own toolchain from source code
The CROSS_COMPILE, A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is running. The toolchain facilitates this function
ARCH=arm, ARM is a family of instruction set architectures for computer processors based on a reduced instruction set computing (RISC) architecture developed by British company ARM Holdings. ARM is also used in Android. Here by typing
Code:
export ARCH=arm
we are telling linux that we are going to be building for the CPU architecture "ARM".
Thats enough theory, lets get our hands dirty
Step 2(Configuring your kernel):=This is the heart to what your phone does so be careful when you do this if you're doubtful about something dont hesitate to ask me in the thread.. the base config is usually present in the kernel_source/mediatek/config/devicename/autoconfig/kconfig/platform. this is your base config which you will use and build with different requirments(Example:SELinux). You can always build a config from the start, I advice you dont do that until you have compiled a few kernels before. for using existing config as a base
Code:
cd kernel_source
cp mediatek/config/devicename/autoconfig/kconfig/platform .config
Now,
Code:
make menuconfig
This will give a graphical interface for you to choose what features you want to add to your phone(Example:I/O Schedule,CPU Governors..) More about this here. You're now ready for compiling
Step 3(Compiling):=This is the moment of truth; This is what youve been waiting for! Now, type
Code:
make zImage
You will get something which says
Code:
arch/arm/boot/zImage Ready
Step 4(Adding MediaTek headers):=[GUIDE]Building Mediatek boot.img{Appending headers}. This is my next guide, follow this to your way to compile a whole ROM for your phone.
Now, use your source code to build a ramdisk for you by typing make bootimage. in the out folder you'll get a folder called root. This folder is the initramfs or the ramdisk. to this follow my next guide to understand how to append mediatek headers
Code:
make modules
This is almost the most important step or your ROMS wont boot. after this is complete go to your sourcedir then in search type ".ko" you'll get a bunch of .ko files copy these to your device tree/ROM to make the rom to work.
If you're moving to a device tree make sure to add this to your device_makefile
Code:
PRODUCT_COPY_FILES += \
$(MOD_SRC)/ccci.ko:$(MOD_TGT)/ccci.ko \
$(MOD_SRC)/ccci_plat.ko:$(MOD_TGT)/ccci_plat.ko \
$(MOD_SRC)/devapc.ko:$(MOD_TGT)/devapc.ko \
$(MOD_SRC)/devinfo.ko:$(MOD_TGT)/devinfo.ko \
$(MOD_SRC)/mtk_fm_drv.ko:$(MOD_TGT)/mtk_fm_drv.ko \
$(MOD_SRC)/mtk_hif_sdio.ko:$(MOD_TGT)/mtk_hif_sdio.ko \
$(MOD_SRC)/mtk_stp_bt.ko:$(MOD_TGT)/mtk_stp_bt.ko \
$(MOD_SRC)/mtk_stp_gps.ko:$(MOD_TGT)/mtk_stp_gps.ko \
$(MOD_SRC)/mtk_stp_uart.ko:$(MOD_TGT)/mtk_stp_uart.ko \
$(MOD_SRC)/mtk_stp_wmt.ko:$(MOD_TGT)/mtk_stp_wmt.ko \
$(MOD_SRC)/mtk_wmt_wifi.ko:$(MOD_TGT)/mtk_wmt_wifi.ko \
$(MOD_SRC)/mtklfb.ko:$(MOD_TGT)/mtklfb.ko \
$(MOD_SRC)/pvrsrvkm.ko:$(MOD_TGT)/pvrsrvkm.ko \
$(MOD_SRC)/scsi_tgt.ko:$(MOD_TGT)/scsi_tgt.ko \
$(MOD_SRC)/scsi_wait_scan.ko:$(MOD_TGT)/scsi_wait_scan.ko \
$(MOD_SRC)/sec.ko:$(MOD_TGT)/sec.ko \
$(MOD_SRC)/vcodec_kernel_driver.ko:$(MOD_TGT)/vcodec_kernel_driver.ko \
$(MOD_SRC)/wlan_mt6628.ko:$(MOD_TGT)/wlan_mt6628.ko
This copies your custom built modules to the Module out folder. In BoardConfig.mk add
Code:
TARGET_PREBUILT_KERNEL := $(DEVICE_FOLDER)/prebuilt/kernel
..
Remember :If you're building kernel for already existing 4.2 roms disable SELINUX support by going into security options inside menuconfig
You're done!!
All Questions and feedbacks are welcome in the thread
Be sure to drop a thanks if you thought this was usefull
Happy Building.
--------------------------------------------------
Links to my next Guides
Building the boot.img{MediaTek}
Building the ROM{MediaTek}

Build Packages
Required packages before building
Python 2.6 -- 2.7, which you can download from python.org.
GNU Make 3.81 -- 3.82, which you can download from gnu.org,
JDK 6 if you wish to build Gingerbread or newer; JDK 5 for Froyo or older. You can download both from java.sun.com.
Git 1.7 or newer. You can find it at git-scm.com.
#Required packages
Code:
sudo apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 git-core lzop ccache gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python gcc g++ cpp gcc-4.8 g++-4.8 && sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Go to etc/udev/rules.d/51-android.rules
Code:
# adb protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>"
# fastboot protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="<username>"
# adb protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="<username>"
# fastboot protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="<username>"
# adb protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="<username>"
# fastboot protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="<username>"
# adb protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="<username>"
# fastboot protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="<username>"
# adb protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="<username>"
# adb protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0600", OWNER="<username>"
# fastboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0600", OWNER="<username>"
# adb protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0600", OWNER="<username>"
# fastboot protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0600", OWNER="<username>"
# adb protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0600", OWNER="<username>"
# fastboot protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee0", MODE="0600", OWNER="<username>"
In bash.rc
Code:
export USE_CCACHE=1
Beter way installing java
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install oracle-java6-installer
Reuqired package check
Code:
sudo apt-get install git-core lzop ccache gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python gcc g++ cpp gcc-4.8 g++-4.8
THIS
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
You're done

@MasterAwesome this went a little bit over my head....
i understood till making zimage,,,,,after that how to make it a boot img...

Avenger4droid said:
@MasterAwesome this went a little bit over my head....
i understood till making zimage,,,,,after that how to make it a boot img...
Click to expand...
Click to collapse
After compiling the zImage, move it to your device tree in your source code. under a folder called prebuilts. Look at my git repo for more reference a210_device_tree. As i said add a flag in the BoardConfig.mk
Code:
TARGET_PREBUILT_KERNEL:=sourcetokernel
. then, we use the the PRODUCT_COPY_FILES to copy the kernel specific files. since modules are kernel specific you'd have to use the modules you built or you'll get a boot loop.

Suggestions for new guides are welcome and I'll try my best to do them.
Sent from my Moto G using XDA Free mobile app
Sent from my Moto G using XDA Free mobile app

@MasterAwesome
Hello..Glad that someone has given a tutorial thread for Kernel developement. I have a few queries for which i am banging my head on for a while...Though i have used slightly diff commands from what u have said the following are my queries.
I tried building kernel for two Micromax devices A117 ( Used Blu life One M source ) & A250 ( Used Blu life One X source ). These are clone devices of Micromax
I personally own a Blu life One M & have booted the kernel succesfully from the source. But i am unable to boot it up in A117.
And i compiled Blu life One X source and tried in A250 and again i wasn't able to bootup. But another guy managed to boot it up in A250 from the same Blu life one X source. ( Proof : http://forum.xda-developers.com/showpost.php?p=50489380&postcount=300 ). On messaging him he said he hasn't made any change in source and just compiled and t booted for him. I wasn't able to get further support for him.
So what could be my mistake. If u can figure out the mistake for me i can boot it up in both Micromax devices. On analysing my logcat i see gpumodule failing !

Santhosh M said:
@MasterAwesome
Hello..Glad that someone has given a tutorial thread for Kernel developement. I have a few queries for which i am banging my head on for a while...Though i have used slightly diff commands from what u have said the following are my queries.
I tried building kernel for two Micromax devices A117 ( Used Blu life One M source ) & A250 ( Used Blu life One X source ). These are clone devices of Micromax
I personally own a Blu life One M & have booted the kernel succesfully from the source. But i am unable to boot it up in A117.
And i compiled Blu life One X source and tried in A250 and again i wasn't able to bootup. But another guy managed to boot it up in A250 from the same Blu life one X source. ( Proof : http://forum.xda-developers.com/showpost.php?p=50489380&postcount=300 ). On messaging him he said he hasn't made any change in source and just compiled and t booted for him. I wasn't able to get further support for him.
So what could be my mistake. If u can figure out the mistake for me i can boot it up in both Micromax devices. On analysing my logcat i see gpumodule failing !
Click to expand...
Click to collapse
Common errors:
Appending the headers
Not adding newly built modules
If you've done both give me the link to the source I'll make a boot.img check it out on your phone.
Sent from my Moto G using XDA Free mobile app

MasterAwesome said:
Common errors:
Appending the headers
Not adding newly built modules
If you've done both give me the link to the source I'll make a boot.img check it out on your phone.
Sent from my Moto G using XDA Free mobile app
Click to expand...
Click to collapse
zImage Header patch i do always by placing the compiled zImage in mediatek/build/tools and using mkbuild to patch it.
I didn't get the second point of adding newly built modules? ( I use the modules generated while compiling )

Santhosh M said:
zImage Header patch i do always by placing the compiled zImage in mediatek/build/tools and using mkbuild to patch it.
I didn't get the second point of adding newly built modules? ( I use the modules generated while compiling )
Click to expand...
Click to collapse
Do a arm-eabi-strip - - strip-unneeded *.ko then push the ko files to /system/lib/modules. Since modules are very kernel specific if you use wrong modules you'll get all sorts of errors.
Sent from my Moto G using XDA Free mobile app

How to do this bro ? If u explain me the commands in detail it would be helpful..
I have pm you the commands I use...Could you have a look at it?
( Without the above command it booted for me in Blu life One M. My concern s why it ain't booting in A117 & A250. A250 has been booted by a guy who used the same source )
Sent from my BLU LIFE ONE M using Tapatalk

Santhosh M said:
How to do this bro ? If u explain me the commands in detail it would be helpful..
I have pm you the commands I use...Could you have a look at it?
( Without the above command it booted for me in Blu life One M. My concern s why it ain't booting in A117 & A250. A250 has been booted by a guy who used the same source )
Sent from my BLU LIFE ONE M using Tapatalk
Click to expand...
Click to collapse
There's your error, don't run make mediatek-Config. Copy the kconfig present in ../mediatek/Config/blue**/autoconfig/kconfig to your source dir as a .config file here edit the file. Using make menuconfig. Also make sure your files are correct if you cloned it from a git repo, do a git reset - - hard. Run a make clean and a make mrproper.
Explanation: using make mediatek-Config will bring in the mt6589 defaults; phones require a little more than that
and make sure to check my next guide on Appending headers or the boot.img don't work. Append headers both on ramdisk and kernel.
Warnjng:git reset - - hard will delete all changes you've made to the kernel source!
Regards and good luck.
Sent from my Moto G using XDA Free mobile app

No I didn't clone from git...I just downloaded source and compiled...I will compile by the method you said today night...
( In blu life one m it booted by make-mediatek config )
This is the link for kernel source http://forum.xda-developers.com/showthread.php?t=2650513&page=3
Post count no 24. Can u give a try ?
Sent from my BLU LIFE ONE M using Tapatalk

Santhosh M said:
No I didn't clone from git...I just downloaded source and compiled...I will compile by the method you said today night...
( In blu life one m it booted by make-mediatek config )
This is the link for kernel source http://forum.xda-developers.com/showthread.php?t=2650513&page=3
Post count no 24. Can u give a try ?
Sent from my BLU LIFE ONE M using Tapatalk
Click to expand...
Click to collapse
I'm actually out for a vacation is it okay if I check by Friday? Sorry :/
Are you sure that blue life m and A117 and A250 all have the same specs. Each and every hardware?
Upload a dmesg I'll look at it and tell you what's wrong. Go to your recovery then type dmesg > /sdcard/dmesg.txt then upload it.
MasterAwesome.
Sent from my Moto G using XDA Free mobile app

Ya sure bro....Your time...I don't own both devices I just want to boot and build kernels for that devices
Yes bro...they are clones with ditto hardware and everything similar...Blu life one x s a clone of A250 and I had shown u the proof of the guy who had booted blu life one x source in A250...Similarly blu life one m s clone of A117.
I depend upon testers for these devices...Dmesg and kmesg I have for builds I made 2 months ago..That time my compilation methods were wrong and the tester at that time was able to give whatever I asked..
My recent build I have only log cat...My new tester says he isn't able to take dmesg and kmesg
Logcat s k ?
Sent from my BLU LIFE ONE M using Tapatalk

tip
MasterAwesome said:
Code:
cd kernel_source
cp mediatek/config/devicename/autoconfig/kconfig/platform .config
Click to expand...
Click to collapse
make mediatek-configs
is better instead of your command
why ? because mtk build scripts merge multiple config files (mediatek/config/devicename/autoconfig/kconfig/platform and mediatek/config/mt6589/autoconfig/kconfig/platform and some in mediatek/config/common/)
If you want to add features, just modify mediatek/config/devicename/autoconfig/kconfig/platform and/or mediatek/config/mt6589/autoconfig/kconfig/platform
simply copying is not advised
EDIT : This is maybe why you got some weird issues :/

Dr-Shadow said:
make mediatek-configs
is better instead of your command
why ? because mtk build scripts merge multiple config files (mediatek/config/devicename/autoconfig/kconfig/platform and mediatek/config/mt6589/autoconfig/kconfig/platform and some in mediatek/config/common/)
If you want to add features, just modify mediatek/config/devicename/autoconfig/kconfig/platform and/or mediatek/config/mt6589/autoconfig/kconfig/platform
simply copying is not advised
EDIT : This is maybe why you got some weird issues :/
Click to expand...
Click to collapse
Typing a make command after you've set the target product does the same thing... Stop the build after it says .config written and I compared it. I got same .config.
I was asking him to disable selinux so I asked him the kconfig from the the devicename. But I automatically assume you're right always and shall follow your method henceforth. Thank you
MasterAwesome
Sent from my Moto G

MasterAwesome said:
Typing a make command after you've set the target product does the same thing... Stop the build after it says .config written and I compared it. I got same .config.
I was asking him to disable selinux so I asked him the kconfig from the the devicename. But I automatically assume you're right always and shall follow your method henceforth. Thank you
MasterAwesome
Sent from my Moto G
Click to expand...
Click to collapse
On which kernel source it gives same .config ?

Dr-Shadow said:
On which kernel source it gives same .config ?
Click to expand...
Click to collapse
Wiko stairway
Sent from my Moto G

MasterAwesome said:
Wiko stairway
Sent from my Moto G
Click to expand...
Click to collapse
This doesn't give same .config
rm .config && make mediatek-configs
diff mediatek-configs ../mediatek/config/wiko/autoconfig/kconfig/project
shows this diff :
http://pastebin.com/Ef7NyksD
Be carefull, ../mediatek/config/wiko/autoconfig/kconfig/project and ../mediatek/config/out/wiko/autoconfig/kconfig are different (the out is generated files from mtk scripts so kconfig is the result of merging project/platform files)

Dr-Shadow said:
This doesn't give same .config
rm .config && make mediatek-configs
diff mediatek-configs ../mediatek/config/wiko/autoconfig/kconfig/project
shows this diff :
http://pastebin.com/Ef7NyksD
Be carefull, ../mediatek/config/wiko/autoconfig/kconfig/project and ../mediatek/config/out/wiko/autoconfig/kconfig are different (the out is generated files from mtk scripts so kconfig is the result of merging project/platform files)
Click to expand...
Click to collapse
Thank you.. Got it
Sent from my Moto G

Related

[Tutorial][S4] How to make your very own Jellybean 4.1.1 on the HTC One S!

Hello everyone! I am anxiously awaiting jellybean for our phone and I know that many of you are also, so I decided to make this thread and help speed things up ! I am currently watching my repo sync so I am hard at work developing this for us but other users can work to, so we get it done faster . So if you are not on ubuntu 10 or 11, LEAVE because this is likely not going to work for you . A few things first: 1. the "$" is an indication of the command, there is one $ before every command and it is already in your terminal so do not type it. 2. You may want to copy and paste commands... 3. This will either not boot or have many bugs, as expected.
There are currently 2 JB roms available, here (by me) and here (by djsubtronic)
GENERAL JELLYBEAN THREAD IS HERE
1) First thing is first, install the required packages:
Open terminal and KEEP IT OPEN FOR ALL OF THIS!!!!!!!!!!!!
Code:
$ sudo apt-get install openjdk-6-jdk
$ sudo apt-get install python
$ sudo apt-get install git-core
Next, download the android sdk for linux and extract it to your home directory. Name it "android-sdk" (without the quotes) for simplicity. In you home folder, show the hidden files (hit Ctrl + H). Open the .bashrc file in the text editor. Add the following lines at the bottom (end) of it:
Code:
# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin
Save it and then go back to the home folder. Edit the .profile file and add this to the end:
Code:
PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
You now have the sdk installed. In your terminal, enter:
Code:
$ cd android-sdk
$ android
When the sdk manager pops up, download platform-tools, and update the tools folder if needed.
If it does not pop up, try one the following 3 commands and see if it does:
Code:
$ cd tools
$ android
Or
Code:
$ cd platfrom-tools
$ android
Code:
$ cd
$ android
And if none of those bring up the manager, close your terminal window. Then open terminal and type:
Code:
$ android
MORE FILES?!?!?! Yes.
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Finally! Past the downloads (for now... wait for the repo sync)
2) Configure the usb:
Code:
$ gksudo gedit /etc/udev/rules.d/51-android.rules
In the blank text field, paste the following:
Code:
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
Save the new text file and close it. Enter this command in your terminal window:
Code:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
3) Installing the repo:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
4) Initialize (init) the repo:
Code:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.1_r1
or, if you want to do CM10, replace the last line (repo init -u blahblahblah) with:
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b jellybean
4.5) If you already have the repo initialized and all of the above done, and are just starting over, do this:
Code:
$ cd WORKING_DIRECTORY
$ repo init -b android-4.1.1_r1
$ repo sync
Don't do it if you are starting new.
5) Sync the needed files (repo)
Code:
$ repo sync -j1
When it asks, enter your REAL name and email
6) Compile:
Code:
$ source build/envsetup.sh
or
Code:
$ . build/envsetup.sh
7) Who's hungry?
Code:
$ lunch
Seriously, you have to!
8) Adding HTC One S (ville) to the list
Code:
$ cd WORKING_DIRECTORY/device
$ mkdir htc
$ cd htc
9) I have no name for this (github sync )
Code:
$ git clone git://github.com/intervigilium/android_device_htc_ville.git -b jellybean-ril ville
or
Code:
$ git clone git://github.com/intervigilium/android_device_htc_ville.git -b jellybean ville
10) Navigate to "ville"
Code:
$ cd ville
11) Connect your HTC One S to the computer and verify that adb is working (usb debugging) and once that is verified do this:
Code:
$ ./extract-files.sh
You can disconnect after this is done.
11.5) Every .cpp file in device/htc/ville/libsensors needs these lines to be added after the #includes section:
Code:
#define LOGE
#define LOGE_IF
The following lines must be added to /device/htc/ville/liblights/lights.c after the #includes section:
Code:
#define LOGE
#define LOGE_IF
#define LOGV
(Thanks to djsubtronic for this step!)
12) Time to build!
Code:
$ cd ~/WORKING_DIRECTORY
then:
Code:
$ source build/envsetup.sh
or
Code:
$ . build/envsetup.sh
13) Verify the ville is there:
Code:
$ lunch
14) Choose from the list
15) Compile!
The # stand for the number of cores plus one (Example: my VAIO has 2 cores so I do -j3, if it were quad core I would do -j5)
Code:
$ make -j#
Flashable zip command (instead of above command):
Code:
$ make -j# otapackage
Thanks to dastin1015 for this (Look at it for a general build): http://forum.xda-developers.com/showthread.php?t=1762641
Thanks to everyone with a ville github account!
Post your results in this thread. Also, ask questions here too!
If I have done something wrong, just tell me politely what it is and I will fix it. It is late here and this is a long thread so there is likely at least one mistake. Thanks!
ERRORS AND FIXES:
Code:
build/core/product_config.mk:205: *** No matches for product "device_ville". Stop.
** Don't have a product spec for: 'device_ville'
** Do you have the right repo manifest?
Add this:
Code:
PRODUCT_NAME := device_ville
PRODUCT_DEVICE := ville
PRODUCT_BRAND := Android
PRODUCT_MODEL := Full Android on ville
to the bottom (end) of device_ville.mk
Ville does not show up in lunch menu? Make the file "vendorsetup.sh". Edit it and add this:
Code:
add_lunch_combo device_ville-userdebug
Nice
Enviado desde mi HTC One S usando Tapatalk 2
Reserved for fixes and updates
Nice one.
You can add that every .cpp file in device/htc/ville/libsensors needs these lines to be added after the #includes section:
Code:
#define LOGE
#define LOGE_IF
djsubtronic said:
Nice one.
Click to expand...
Click to collapse
I'll post pictures tomorrow or the next day
djsubtronic said:
Nice one.
You can add that every .cpp file in device/htc/ville/libsensors needs these lines to be added after the #includes section:
Code:
#define LOGE
#define LOGE_IF
Click to expand...
Click to collapse
How would I say that (under what step do you recommend)
BiteBlaze said:
How would I say that (under what step do you recommend)
Click to expand...
Click to collapse
Needs to be done before make, so I would say just before the build steps.
djsubtronic said:
Needs to be done before make, so I would say just before the build steps.
Click to expand...
Click to collapse
I'll add that now
I won't be able to post pictures until monday so if anyone has screenshots of the terminal window at certain points in the instructions, email me. Goodnight and good luck!
Has anybody tried doing this?
Reviewers said:
Has anybody tried doing this?
Click to expand...
Click to collapse
There is a check the general sections topic on Jelly Bean. There are plenty of people trying. The only one with a booting build thus far is Team Liquid's Nocoast.
Why doesn't it work on ubuntu 10.04?
Add to OP after the libsensors bit:
The following lines must be added to /device/htc/ville/liblights/lights.c after the #includes section
Code:
#define LOGE
#define LOGE_IF
#define LOGV
---------- Post added at 12:31 PM ---------- Previous post was at 12:03 PM ----------
Stuck on this:
in function wpa_driver_nl80211_ops:driver_nl80211.c(.data.rel. ro.wpa_driver_nl80211_ops+0x1c8): error: undefined reference to 'wpa_driver_nl80211_driver_cmd'
Added this line to device/htc/ville/BoardConfig.mk: BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_wl12xx
and then got another error...
make: *** No rule to make target `out/target/product/ville/obj/STATIC_LIBRARIES/lib_driver_cmd_wl12xx_intermediates/lib_driver_cmd_wl12xx.a', needed by `out/target/product/ville/obj/EXECUTABLES/wpa_supplicant_intermediates/LINKED/wpa_supplicant'. Stop.
How to get that file?
Alie360 said:
Why doesn't it work on ubuntu 10.04?
Click to expand...
Click to collapse
It does. It doesn't work on 12
~ BiteBlaze via HTC One S... If I have helped you out, hit the Thanks button
BiteBlaze said:
It does. It doesn't work on 12
~ BiteBlaze via HTC One S... If I have helped you out, hit the Thanks button
Click to expand...
Click to collapse
You wrote "So if you are not on ubuntu 10 or 11, LEAVE because this is likely not going to work for you "...
I was assuming it was working only on 12
Alie360 said:
You wrote "So if you are not on ubuntu 10 or 11, LEAVE because this is likely not going to work for you "...
I was assuming it was working only on 12
Click to expand...
Click to collapse
Haha ok I get it you had it backwards. I mean that only people on 10 or 11 can do this ("If you are NOT on ubuntu 10 or 11, this is likely not going to work for you)
djsubtronic said:
Add to OP after the libsensors bit:
The following lines must be added to /device/htc/ville/liblights/lights.c after the #includes section
Code:
#define LOGE
#define LOGE_IF
#define LOGV
---------- Post added at 12:31 PM ---------- Previous post was at 12:03 PM ----------
Stuck on this:
in function wpa_driver_nl80211_ops:driver_nl80211.c(.data.rel. ro.wpa_driver_nl80211_ops+0x1c8): error: undefined reference to 'wpa_driver_nl80211_driver_cmd'
Added this line to device/htc/ville/BoardConfig.mk: BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_wl12xx
and then got another error...
make: *** No rule to make target `out/target/product/ville/obj/STATIC_LIBRARIES/lib_driver_cmd_wl12xx_intermediates/lib_driver_cmd_wl12xx.a', needed by `out/target/product/ville/obj/EXECUTABLES/wpa_supplicant_intermediates/LINKED/wpa_supplicant'. Stop.
How to get that file?
Click to expand...
Click to collapse
Added to the OP. Did you find the file?
BiteBlaze said:
Added to the OP. Did you find the file?
Click to expand...
Click to collapse
I undid the change from BoardConfig.mk
http://translate.google.co.uk/trans...a=X&ei=crACUOCNFOeY1AXcxNWzBw&ved=0CHAQ7gEwCQ
That link has a link to a git that has drivers for the nl80211, wpa_supplicant, and hostapd. Trying to get it to work using those files.
djsubtronic said:
I undid the change from BoardConfig.mk
http://translate.google.co.uk/trans...a=X&ei=crACUOCNFOeY1AXcxNWzBw&ved=0CHAQ7gEwCQ
That link has a link to a git that has drivers for the nl80211, wpa_supplicant, and hostapd. Trying to get it to work using those files.
Click to expand...
Click to collapse
Good. I will try tomorrow. I am glad to say they are upgrading my internet to about 15MBs! I should get a good build on monday
villainhalf said:
There is a check the general sections topic on Jelly Bean. There are plenty of people trying. The only one with a booting build thus far is Team Liquid's Nocoast.
Click to expand...
Click to collapse
I think I will post a link to the general thread in the OP. Nocoast refuses to release it or give us any more info... hopefully some info comes today... maybe screenshots? Or hopefully what the issues are and maybe a logcat

[DEV] - Pantech Burst - CM10 porting

This thread is for the development of Cyanogenmod for Pantech Burst. Any help is greatly appreciated. Below is somewhere to start from but will be adding more as we progress.
Pantech Burst CM10 Discussion thread <----Use this to ask questions. This thread is for development only
Pantech Burst Forum
Are you a dev? want to help the burst in its custom development journey? JOIN THE CHAT!!!
http://webchat.freenode.net/?channels=#burstroot
mifl said:
For anyone who wants to contribute to the project, I created an organization on Github: https://github.com/PrestoTeam.
Here have been added the five repositories needed to work:
https://github.com/PantechDevTeam/android_device_pantech_presto
https://github.com/PantechDevTeam/android_device_pantech_qcom-common
https://github.com/PantechDevTeam/android_device_pantech_msm8660-common
https://github.com/PantechDevTeam/android_kernel_pantech_p9070
https://github.com/PantechDevTeam/android_vendor_pantech_presto
These are the steps that I think we should follow:
Register an account on "Github". It is simple and there are many tutorials.
Make a backup of local files, to keep the changes you have made ​​each user.
Make a fork of the three repositories is on Github organization, and put in your local_manifest.xml.
Remove your "/ out" dir, $repo sync and compile again.
Well I think we can move faster. Without doubt the changes that each user has done on your computer. So each user, using the button "Pull Request", can send the modifications that wants, to repository team. We can discuss changes in the Github page or in this post.
I hope everyone likes this proposal.
You can try to add your Github account. Don't be angry, if it takes a little time before adding your account, I'm still learning.
------------------------------------------------------------------------------------
To begin working with the repositories, you can follow these links:
http://forum.xda-developers.com/showpost.php?p=35474318&postcount=245
http://forum.xda-developers.com/showpost.php?p=33642150&postcount=1
If you have questions about how to do any of the above steps ask here, we will try to help everyone to be resolved as quickly as possible.
Please friends, remember that this is a post to development our rom.
------------------------------------------------------------------------------------
Greetings.
Click to expand...
Click to collapse
Working / Bugs List yet -
Touch
Mobile Data Both 2G/3G , 4G isn't available here
Bluetooth
Wifi
Audio
Haptic feedback
Backlight on keys
Gallery
ADB
External SD support
Mount USB
GPS
All Apk's And Games worked fine also .
What Is essential to be fixed more to use on daily basis :-
Hardware Decoder , Though videos got played with software decoder .
Camera + flashlight
For a complete stable rom these things also needed to be fixed :-
proximity sensor ( half works )
Magneto sensor ( Needs to be tested )
more to come as we find them
***Last updated 3/15/2013 @ 12:00pm EST***
Compile Unofficial CyanogenMod 10 for Pantech Burst
To compile Unofficial CyanogenMod for Pantech Burst P9070 (presto), following the next steps.
1º - Prepare the Build Environment:
This step is based on the following tutorial: [Tutorial] Compile JB on Ubuntu - Thanks dastin1015.
A) Install Python and Git:
Code:
$ sudo apt-get install python
Code:
$ sudo apt-get install git-core
B) Install Android SDK:
- Download the SDK here: http://developer.android.com/sdk/index.html
- Extract the SDK and place it in your home directory.
- I renamed my SDK to android-sdk to make it easier to navigate to.
- Go to your home folder, press Ctrl+H to show hidden files, and open up your .bashrc file.
- Add these lines at the bottom of the file:
Code:
# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin
- Find your .profile file and add this at the bottom of the file:
Code:
PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
You have now successfully installed the Android SDK.
To check for updates issue this into your terminal:
Code:
$ android
C) Install required packages:
Building on Ubuntu 10.10/11.10:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
On Ubuntu 10.10:
Code:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
On Ubuntu 11.10:
Code:
$ sudo apt-get install libx11-dev:i386
On newer versions of Ubuntu such as 11.10 you may need to do the following:
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
Building on Ubuntu 12.04/10:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386 \
pngcrush optipng
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
D) Install Oracle Java 6:
To install Oracle Java 6 in Ubuntu via PPA: http://www.webupd8.org/2012/11/oracle-sun-java-6-installer-available.html
Code:
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java6-installer
After the installation, check the version of java, using the command:
Code:
$ java -version
Output console:
Code:
java version "1.6.0_38"
Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)
Note: The installed version of java, may have been updated, but should be kept in version 1.6.XX
Verify the symlinks:
Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
Output console:
Code:
lrwxrwxrwx 1 root root 39 ene 17 08:02 /etc/alternatives/java -> /usr/lib/jvm/java-6-oracle/jre/bin/java
lrwxrwxrwx 1 root root 45 ene 17 08:02 /etc/alternatives/java.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/java.1.gz
lrwxrwxrwx 1 root root 36 ene 17 08:02 /etc/alternatives/javac -> /usr/lib/jvm/java-6-oracle/bin/javac
lrwxrwxrwx 1 root root 46 ene 17 08:02 /etc/alternatives/javac.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/javac.1.gz
lrwxrwxrwx 1 root root 38 ene 17 08:02 /etc/alternatives/javadoc -> /usr/lib/jvm/java-6-oracle/bin/javadoc
lrwxrwxrwx 1 root root 48 ene 17 08:02 /etc/alternatives/javadoc.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/javadoc.1.gz
lrwxrwxrwx 1 root root 36 ene 17 08:02 /etc/alternatives/javah -> /usr/lib/jvm/java-6-oracle/bin/javah
lrwxrwxrwx 1 root root 46 ene 17 08:02 /etc/alternatives/javah.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/javah.1.gz
lrwxrwxrwx 1 root root 36 ene 17 08:02 /etc/alternatives/javap -> /usr/lib/jvm/java-6-oracle/bin/javap
lrwxrwxrwx 1 root root 46 ene 17 08:02 /etc/alternatives/javap.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/javap.1.gz
lrwxrwxrwx 1 root root 42 ene 17 08:02 /etc/alternatives/java_vm -> /usr/lib/jvm/java-6-oracle/jre/bin/java_vm
lrwxrwxrwx 1 root root 41 ene 17 08:02 /etc/alternatives/javaws -> /usr/lib/jvm/java-6-oracle/jre/bin/javaws
lrwxrwxrwx 1 root root 47 ene 17 08:02 /etc/alternatives/javaws.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/javaws.1.gz
lrwxrwxrwx 1 root root 34 ene 17 08:02 /etc/alternatives/jar -> /usr/lib/jvm/java-6-oracle/bin/jar
E) Configure your USB:
Code:
$ gksudo gedit /etc/udev/rules.d/51-android.rules
Inside of this blank text file insert:
Code:
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
Save the file and close it and then issue this command:
Code:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
2º - Create the Directories
You will need to set up some directories in your build environment.
Note: For the next steps, I modified the installation path sources, because in this way you can include other repositories (CAF, AOSP, etc ...).
To create them:
Code:
mkdir -p ~/bin
mkdir -p ~/android
mkdir -p ~/android/cyanogenmod
mkdir -p ~/android/cyanogenmod/jellybean
3º - Install the repo:
Enter the following to download make executable the "repo" binary:
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Note:
You may need to reboot for these changes to take effect.
4º - Install the CM10 Repository:
Now enter the following to initialize the CyanogenMod repository:
Code:
cd ~/android/cyanogenmod/jellybean/
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
repo sync -j16
5º - Obtain the presto device tree:
Create/Edit a file with the name roomservice.xml in the ".repo/local_manifests/" directory. To see this directory, you have to press Ctrl-H in your file manager.
Code:
mkdir -p ~/android/cyanogenmod/jellybean/.repo/local_manifests/
gedit ~/android/cyanogenmod/jellybean/.repo/local_manifests/roomservice.xml
Add these lines
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="PantechDevTeam/android_device_pantech_presto" path="device/pantech/presto" remote="github" revision="jellybean" />
<project name="PantechDevTeam/android_device_pantech_qcom-common" path="device/pantech/qcom-common" remote="github" revision="jellybean" />
<project name="PantechDevTeam/android_device_pantech_msm8660-common" path="device/pantech/msm8660-common" remote="github" revision="jellybean" />
<project name="PantechDevTeam/android_kernel_pantech_p9070" path="kernel/pantech/p9070" remote="github" revision="jellybean" />
</manifest>
Synchronize the repositories:
Code:
cd ~/android/cyanogenmod/jellybean/
repo sync
6º - Copy proprietary files:
Option 1:
To compile pantech presto, connect the device to the computer and ensure that ADB is working properly.
Code:
cd ~/android/cyanogenmod/jellybean/device/pantech/presto
./extract-files.sh
Option 2:
You can also include the repository with the necessary files for complilación:
Code:
gedit ~/android/cyanogenmod/jellybean/.repo/local_manifests/roomservice.xml
Add this line
Code:
<project name="PantechDevTeam/android_vendor_pantech_presto" path="vendor/pantech/presto" remote="github" revision="jellybean" />
Synchronize the repositories:
Code:
cd ~/android/cyanogenmod/jellybean/
repo sync
7º - Download RomManager
Note:
This only needs to be done when an update to RomManager is released. If you are-up-to date, you may skip to Building CyanogenMod.
Download RomManager which is needed by the build:
Code:
~/android/cyanogenmod/jellybean/vendor/cm/get-prebuilts
8º - Building CyanogenMod
First, check for updates in the source:
Code:
cd ~/android/cyanogenmod/jellybean/
repo sync
Now, the environment must be configured to build and the ROM compiled.
Code:
. build/envsetup.sh && brunch presto
9º - Install
If you're a little crazy, and at your own risk, you can complete the installation:
Copy your .zip file from ~/android/cyanogenmod/jellybean/out/target/product/presto/cm-10-XXXXX-UNOFFICIAL-presto.zip to the root of the SD card.
Optional: Download Google Apps for CyanogenMod 10 and place it on the root of the SD card.
Flash both of these .zip files from recovery.
-----------------------------------------------------------------------------------------
Update:
In CyanogenMod, ~/.repo/local_manifest.xml file has been changed to ~/.repo/local_manifests/roomservice.xml
----------------------------------------------------------------------------------------------------------------
Greetings.
mifl said:
Hello kagedws6:
I'm trying to porting CM7.
Today I got the first complete compilation, but I am beginning not know if I've done well.
I wish I could share the work and the big developers who are in this forum will help us improve it.
if I can write a little later I followed the steps.
Sorry for my bad English.
Click to expand...
Click to collapse
feel free to post as much information as possible here! The more people we can get involved the better and it will help bring even more people in! We have to let XDA know the burst won't fade away and maybe someday we'll get our own section!
mifl said:
Hello kagedws6:
I'm trying to porting CM7.
Today I got the first complete compilation, but I am beginning not know if I've done well.
I wish I could share the work and the big developers who are in this forum will help us improve it.
if I can write a little later I followed the steps.
Sorry for my bad English.
Click to expand...
Click to collapse
Have you tried installing it on the Burst and if so, will it boot?
mifl said:
Hello kagedws6:
I'm trying to porting CM7.
Today I got the first complete compilation, but I am beginning not know if I've done well.
I wish I could share the work and the big developers who are in this forum will help us improve it.
if I can write a little later I followed the steps.
Sorry for my bad English.
Click to expand...
Click to collapse
If you would like to post any files and any progress you've gotten up for review and tweeking please do. You can upload with dropbox or something like that and post the links up
kagedws6 said:
If you would like to post any files and any progress you've gotten up for review and tweeking please do. You can upload with dropbox or something like that and post the links up
Click to expand...
Click to collapse
I'm making some free time this upcoming week to work on this. The first thing I would like to do is recompile recovery and implement touch support.
One that is done I'll upload the crude device tree to start the rest from.
Sent from my PantechP9070 using xda app-developers app
Compile AOSP Codeaurora for Pantech Burst P9070 (presto)
To compile AOSP Codeaurora for Pantech Burst P9070 (presto) - "REVISION I", following the next steps.
1º - Prepare the Build Environment:
This step is based on the following tutorial: [Tutorial] Compile JB on Ubuntu - Thanks dastin1015.
A) Install Python and Git:
Code:
$ sudo apt-get install python
Code:
$ sudo apt-get install git-core
B) Install Android SDK:
- Download the SDK here: http://developer.android.com/sdk/index.html
- Extract the SDK and place it in your home directory.
- I renamed my SDK to android-sdk to make it easier to navigate to.
- Go to your home folder, press Ctrl+H to show hidden files, and open up your .bashrc file.
- Add these lines at the bottom of the file:
Code:
# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin
- Find your .profile file and add this at the bottom of the file:
Code:
PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
You have now successfully installed the Android SDK.
To check for updates issue this into your terminal:
Code:
$ android
C) Install required packages:
Building on Ubuntu 10.10/11.10:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline-gplv2-dev schedtool lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils
On Ubuntu 10.10:
Code:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
On Ubuntu 11.10:
Code:
$ sudo apt-get install libx11-dev:i386
On newer versions of Ubuntu such as 11.10 you may need to do the following:
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
Building on Ubuntu 12.04/10:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386 \
pngcrush optipng
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
D) Install Oracle Java 6:
To install Oracle Java 6 in Ubuntu via PPA: http://www.webupd8.org/2012/11/oracle-sun-java-6-installer-available.html
Code:
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java6-installer
After the installation, check the version of java, using the command:
Code:
$ java -version
Output console:
Code:
java version "1.6.0_38"
Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)
Note: The installed version of java, may have been updated, but should be kept in version 1.6.XX
Verify the symlinks:
Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
Output console:
Code:
lrwxrwxrwx 1 root root 39 ene 17 08:02 /etc/alternatives/java -> /usr/lib/jvm/java-6-oracle/jre/bin/java
lrwxrwxrwx 1 root root 45 ene 17 08:02 /etc/alternatives/java.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/java.1.gz
lrwxrwxrwx 1 root root 36 ene 17 08:02 /etc/alternatives/javac -> /usr/lib/jvm/java-6-oracle/bin/javac
lrwxrwxrwx 1 root root 46 ene 17 08:02 /etc/alternatives/javac.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/javac.1.gz
lrwxrwxrwx 1 root root 38 ene 17 08:02 /etc/alternatives/javadoc -> /usr/lib/jvm/java-6-oracle/bin/javadoc
lrwxrwxrwx 1 root root 48 ene 17 08:02 /etc/alternatives/javadoc.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/javadoc.1.gz
lrwxrwxrwx 1 root root 36 ene 17 08:02 /etc/alternatives/javah -> /usr/lib/jvm/java-6-oracle/bin/javah
lrwxrwxrwx 1 root root 46 ene 17 08:02 /etc/alternatives/javah.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/javah.1.gz
lrwxrwxrwx 1 root root 36 ene 17 08:02 /etc/alternatives/javap -> /usr/lib/jvm/java-6-oracle/bin/javap
lrwxrwxrwx 1 root root 46 ene 17 08:02 /etc/alternatives/javap.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/javap.1.gz
lrwxrwxrwx 1 root root 42 ene 17 08:02 /etc/alternatives/java_vm -> /usr/lib/jvm/java-6-oracle/jre/bin/java_vm
lrwxrwxrwx 1 root root 41 ene 17 08:02 /etc/alternatives/javaws -> /usr/lib/jvm/java-6-oracle/jre/bin/javaws
lrwxrwxrwx 1 root root 47 ene 17 08:02 /etc/alternatives/javaws.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/javaws.1.gz
lrwxrwxrwx 1 root root 34 ene 17 08:02 /etc/alternatives/jar -> /usr/lib/jvm/java-6-oracle/bin/jar
E) Configure your USB:
Code:
$ gksudo gedit /etc/udev/rules.d/51-android.rules
Inside of this blank text file insert:
Code:
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
Save the file and close it and then issue this command:
Code:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
2º - Create the Directories
You will need to set up some directories in your build environment.
To create them:
Code:
$ mkdir -p ~/bin
$ mkdir -p ~/android
$ mkdir -p ~/android/codeaurora
$ mkdir -p ~/android/codeaurora/ics
Note:
For this step, I modified the installation path sources, because in this way you can include other repositories (CyanogenMod, AOSP, etc ...).
3º - Install the repo:
Enter the following to download make executable the "repo" binary:
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Note:
You may need to reboot for these changes to take effect.
4º - Install the Codeaurora ICS Repository:
Now enter the following to initialize the Codeaurora repository:
Code:
cd ~/android/codeaurora/ics/
$ repo init -u git://codeaurora.org/platform/manifest.git -b ics
$ repo sync -j16
Note:
Remember that the repository, usually requests a username and password.
5º - Obtain proprietary kernel:
Create a file with the name local_manifest.xml in the ".repo" directory. To see this directory, you have to press Ctrl-H in your file manager.
Code:
$ gedit ~/android/codeaurora/ics/.repo/local_manifest.xml.
Add these lines
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="aosp" fetch="https://android.googlesource.com/"/>
<remote name="github" fetch="https://github.com/"/>
<!-- Kernel Pantech presto -->
<remove-project name="kernel/msm"/>
<project name="mifl/android_kernel_pantech_p9070" path="kernel" remote="github" revision="master"/>
</manifest>
Note:
The third and fourth lines, allows you to add repositories: Github and AOSP.
The sixth and seventh lines, if all goes well, delete the repository kernel, and replace it with the official Pantech kernel.
6º - Copy proprietary files:
Unzip the file "vendor-blobs-rev2.zip" attached to the end of the post. In the root: device/qcom/msm8660_surf
To extract proprietary files, connect the device to the computer and ensure that ADB is working properly.
Code:
$ cd ~/android/codeaurora/ics/device/qcom/msm8660_surf
$ ./extract-files.sh
Note:
The file "proprietary-files.txt" can fail depending on the version of Android, you have installed on your device.You should add to the list, You should add to the list the files that are necessary for compilation.
7º - Necessary changes:
These are needed to include the files created in the previous step.
Add these lines, if not already included, to the end of the file: "device/qcom/msm8660_surf/msm8660_surf.mk":
Code:
#============================================
# Also get non-open-source specific aspects if available
$(call inherit-product, vendor/qcom/proprietary/common/msm8660_surf/device-vendor.mk)
Add these lines, if not already included, to the end of the file: "device/qcom/msm8660_surf/BoardConfig.mk":
Code:
#============================================
# Also get non-open-source specific aspects if available
-include vendor/qcom/proprietary/common/msm8660_surf/BoardConfigVendor.mk
Note:
Check each time you synchronize the repository, the lines are on your site.
In these two files, you can include your own code, for example (BT, WI-FI, etc ...).
Part of what is necessary, changing the routes vendor directory, you can find it here: https://github.com/mifl/android_device_pantech_presto.
Working method:
Changes for BoardConfig.mk files, you must make in the file "vendor/qcom/proprietary/common/msm8660_surf/board-presto.mk".
Changes for device.mk files, you must make in the file "vendor/qcom/proprietary/common/msm8660_surf/device-presto.mk".
These two files are created by the script ". / Extract-files.sh". If the files exist, when you run the script again, does not modify the changes you in them before.
Example:
Copy from here: https://github.com/mifl/android_device_pantech_presto/blob/jellybean/BoardConfig.mk:
Code:
# Headers path
TARGET_SPECIFIC_HEADER_PATH: = device/pantech/presto/include
In "vendor/qcom/proprietary/common/msm8660_surf/board-presto.mk", paste and replace the route. It should look like this:
Code:
# Headers path
TARGET_SPECIFIC_HEADER_PATH: = vendor/qcom/proprietary/common/msm8660_surf/include
Now copy the files in the folder /include. To download the entire repository: https://github.com/mifl/android_device_pantech_presto/archive/jellybean.zip
8º - Building ROM
First, check for updates in the source:
Code:
$ cd ~/android/codeaurora/ics/
$ repo sync
Now, the environment must be configured to build and the ROM compiled.
Code:
$ source build/envsetup.sh
$ lunch msm8660_surf-userdebug
$ make -j4 KERNEL_DEFCONFIG=msm8660-perf-PRESTO_TP20_defconfig
9º - Install
If you're a little crazy, and at your own risk, you can complete the installation:
Copy your .zip file from ~/android/codeaurora/ics/out/target/product/msm8660_surf/msm8660_surf-ota-XXX.zip to the root of the SD card.
Flash both of these .zip files from recovery.
Note:
This last step is unconfirmed, google search for how to.
-----------------------------------------------------------------------------------------
Final note
This guide is part of a project I started some time ago. If you find errors, make every effort to solve them by yourself.
To find more information visit:
https://www.codeaurora.org/gitweb/quic/la/.
https://www.codeaurora.org/xwiki/bin/QAEP/.
Greetings.
P.D.:
Specially dedicated to our friend "mrakattack". I hope this guide will be useful.
mifl said:
Hi
In the new project "Cyanogen-presto" on Google Project Hosting, can download the files, used by me to compile CM7.
The download link is: CM presto_device
I hope to update the project, but my job don´t leaves me time.
Join to the project, together we can do a good job
A greeting.
Click to expand...
Click to collapse
I want to thank you so much for taking the steps needed to get this started and to anyone else reading this that has been helping. I have made a few attempts by myself but with as little as I know I haven't gotten them to install threw cwm which is probably a good thing as I may have bricked my phone if I had been sucessful. Hopefully with this we will be able to progress and also get noticed in the process.
kagedws6 said:
I want to thank you so much for taking the steps needed to get this started and to anyone else reading this that has been helping. I have made a few attempts by myself but with as little as I know I haven't gotten them to install threw cwm which is probably a good thing as I may have bricked my phone if I had been sucessful. Hopefully with this we will be able to progress and also get noticed in the process.
Click to expand...
Click to collapse
Couldn't agree more! Thank you mifl! It would seem you've put a lot of work into this, thank you.
Sent from my PantechP9070 using xda app-developers app
stevotdo said:
Couldn't agree more! Thank you mifl! It would seem you've put a lot of work into this, thank you.
Sent from my PantechP9070 using xda app-developers app
Click to expand...
Click to collapse
ty too stevotdo! for all the work you've done to date and also that you've already given urself to do in the future!
stevotdo said:
Couldn't agree more! Thank you mifl! It would seem you've put a lot of work into this, thank you.
Click to expand...
Click to collapse
kagedws6 said:
I want to thank you so much for taking the steps needed to get this started and to anyone else reading this that has been helping. I have made a few attempts by myself but with as little as I know I haven't gotten them to install threw cwm which is probably a good thing as I may have bricked my phone if I had been sucessful. Hopefully with this we will be able to progress and also get noticed in the process.
Click to expand...
Click to collapse
Thanks guys.
I will try continue working: a guide on how to be compiled and advance in the compatibility of the ROM.
But I have to learn to handle the tools of Google Project Hosting, to include sources files, and use the Wiki for tutorials.
Not answer many post, because the lack of English makes me take long to answer them.
If possible I would like people to collaborate on the project. Providing corrections, suggestions and modifications to the code of the ROM.
A greeting.
mifl said:
Thanks guys.
I will try continue working: a guide on how to be compiled and advance in the compatibility of the ROM.
But I have to learn to handle the tools of Google Project Hosting, to include sources files, and use the Wiki for tutorials.
Not answer many post, because the lack of English makes me take long to answer them.
If possible I would like people to collaborate on the project. Providing corrections, suggestions and modifications to the code of the ROM.
A greeting.
Click to expand...
Click to collapse
Need to change the prebuilts and the fstabs. the partition information is wrong in the prebuilts and in the emmc fstab
davepmer said:
Need to change the prebuilts and the fstabs. the partition information is wrong in the prebuilts and in the emmc fstab
Click to expand...
Click to collapse
well I changed the prebuilts and all the partition info I could find. it compiles fine, but will not even bring up adb. not really sure what is wrong.
here are the device files I tried to fix. http://www.4shared.com/zip/0obdiB7y/presto_device_fixed.html?refurl=d1url
fyi I did not flash the boot.img, not brave enough
davepmer said:
well I changed the prebuilts and all the partition info I could find. it compiles fine, but will not even bring up adb. not really sure what is wrong.
here are the device files I tried to fix. http://www.4shared.com/zip/0obdiB7y/presto_device_fixed.html?refurl=d1url
fyi I did not flash the boot.img, not brave enough
Click to expand...
Click to collapse
added your files to the googlecode site
davepmer said:
well I changed the prebuilts and all the partition info I could find. it compiles fine, but will not even bring up adb. not really sure what is wrong.
here are the device files I tried to fix. http://www.4shared.com/zip/0obdiB7y/presto_device_fixed.html?refurl=d1url
fyi I did not flash the boot.img, not brave enough
Click to expand...
Click to collapse
Believe that you need a valid cm7 ramdisk in the boot.img for it to start loading. If you aren't sure about the precompiled kernel you could always split the boot.img and insert your own.
Better yet you could reboot to fastboot and "fastboot boot boot.img" with the cm7 boot.img and on the next boot it will revert to the original boot.img
Sent from my PantechP9070 using xda app-developers app
Hi
The first thank all the work they are doing.
As I said previously my work would begin development of the ROM, and so we could all collaborate.
To add further modifications as soon as possible to the project file and not saturate, they appreciate it used a standard format.
Example:
In the file "recovery.fstab" in the root directory: mmcblk0p14 is data (it has 13)
Change:
Code:
/data ext4 /dev/block/mmcblk0p13
By the following:
Code:
/data ext4 /dev/block/mmcblk0p14
Following this format, the members of the project: "kagedws6", like myself, or anyone who wants to join the project, we add the change as soon as possible.
Thank you all again.
A greeting.
stevotdo said:
Believe that you need a valid cm7 ramdisk in the boot.img for it to start loading. If you aren't sure about the precompiled kernel you could always split the boot.img and insert your own.
Better yet you could reboot to fastboot and "fastboot boot boot.img" with the cm7 boot.img and on the next boot it will revert to the original boot.img
Sent from my PantechP9070 using xda app-developers app
Click to expand...
Click to collapse
when I try to fastboot boot.boot.img I get an image incomplete error. also the size of my boot.img is wrong, it is way too small. My compiled boot.img is 4.6 megs in size. the boot.img from my cwm recovery backup is 10.5 megs. I am missing something in the compiled kernel.
davepmer said:
when I try to fastboot boot.boot.img I get an image incomplete error. also the size of my boot.img is wrong, it is way too small. My compiled boot.img is 4.6 megs in size. the boot.img from my cwm recovery backup is 10.5 megs. I am missing something in the compiled kernel.
Click to expand...
Click to collapse
I ran into that a couple months ago. I still have no idea how to remedy that. I just got done compiling so maybe I can try to figure out what's going on.
I know that the zimage is 4.5 meg (same as when you split the stock boot.img) so I'm wandering what the secret sauce here is we are missing
Edit: I also think it would be worth tearing down the prestoroot.img also. What ever the secret sauce is, it has to be in there too. Since it is the only modified boot.img that we know of that has booted on this thing.
Sent from my PantechP9070 using xda app-developers app
stevotdo said:
I ran into that a couple months ago. I still have no idea how to remedy that. I just got done compiling so maybe I can try to figure out what's going on.
I know that the zimage is 4.5 meg (same as when you split the stock boot.img) so I'm wandering what the secret sauce here is we are missing
Edit: I also think it would be worth tearing down the prestoroot.img also. What ever the secret sauce is, it has to be in there too. Since it is the only modified boot.img that we know of that has booted on this thing.
Sent from my PantechP9070 using xda app-developers app
Click to expand...
Click to collapse
is the ramdisk.gz missing? from what I understand both the zImage and the ramdisk have to be bundled in the boot.img.
*DEV TOOLS* - Pack & Repack Boot.img Files - for Windows USERS shows how to pull it apart and repack it in windows. I'm just going threw the excruciating long download of cygwin

[GUIDE][ROM][S4] How to build your own Baked BlackBean ROM! [AOSP 4.2.1][NOOB-PROOF]

How to compile your own Baked ROM (jb-4.2 branch)​
I have decided to create a guide on how to build your own Baked Blackbean ROM for the HTC One S. I will make this as simple as possible, so even people with no previous knowledge of Linux can follow this tutorial successfully. The ROMs that you compile are for your personal use only...please do not share or post them to show courtesy to TeamBaked. If you have any questions or have any trouble during any part of this tutorial, feel free to post them and I will try to get you sorted out.
I've tried to make this guide as comprehensive as possible, explaining what each step does. It should be fairly thorough and easy enough for anyone with a bit of patience to build.
Click to expand...
Click to collapse
Requirements:
patience (this is the most important)
Ubuntu 12.04 64bit, dual-booted or virtual machine
some space on your Ubuntu partition, I'd say about 50GB to be very safe
an internet connection
Step 1: Setting up your environment
1) You need to install the required packages for compiling AOSP. Open up a terminal, and type this in:
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jre openjdk-6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-4.5-multilib g++-4.5-multilib libxml2-utils libxml2 xsltproc
Lastly:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
OPTIONAL STEPS (Good if you want to do more Android development in the future)
Let's configure our USB access.
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
A text editor should pop up with a blank file. Copy and paste this to the file:
Code:
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
Save and close the file. Now do this to change its permissions:
Code:
sudo chmod a+r /etc/udev/rules.d/51-android.rules
2) Now we will need to download the Android SDK and set it up properly.
Download the SDK here: http://developer.android.com/sdk/index.html
Extract the archive to your home directory and name it android-sdk
In your home folder, press CTRL + H to show hidden files.
Open up your .bashrc and paste this at the end:
Code:
# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin
Open .profile and put this at the end as well:
Code:
PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
The SDK has now been setup properly. You can type
Code:
android
in terminal to bring up the SDK menu and install tools/packages if you want.
Step 2: Getting the source downloaded
1) Installing repo and syncing the repository.
Open a new terminal window and type this in:
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Now let's initialize the Baked repo. I am creating a folder name "baked" which is where I will download the source to.
Code:
mkdir baked
cd baked
repo init -u https://github.com/TeamBAKED/platform_manifest.git -b jb-4.2
Let's download the source.
Code:
repo sync -j#
The '#' refers to how many simultaneous jobs you want. I usually do -j16 since I have fast fiber-optic internet, so my command would be "repo sync -j16".
Now the source is downloading. You can leave your computer alone until it is done.
Step 3: Adding in configurations for ville.
This step is NOT needed anymore, because the One S has been merged into official BAKED. Skip ahead to step 4! :victory:
Because TeamBaked doesn't officially support the One S, we will have to add in the parts for ville manually and ensure buildability. I have pre-made everything, so there is really nothing you need to do on your part. You just need to download the parts and place them in their correct directories.
1) We need to first add a local_manifest.xml so we can integrate the projects needed for ville during repo sync. Luckily, I have already prepared one. In baked/.repo/ create a file named "local_manifest.xml", and paste this in:
Code:
Save and close. Then do another
Code:
repo sync -j#
so we can now fetch the additional ville-related parts. The manifest tracks the CM10.1 repos for the kernel and msm8960 common stuff, but the device tree that it tracks is from my Github because I have modified it for the Baked ROM. I'll try and keep it as updated as the CM10.1 device tree as development continues.
2) Now we need another config file, which tells the build system what to execute and which device-specific parameters to be set. Go into baked/vendor/baked/products/ and create a file named "ville.mk". Paste this in:
Code:
# Inherit AOSP device configuration for ville.
$(call inherit-product, device/htc/ville/device_ville.mk)
# Inherit common product files.
$(call inherit-product, vendor/baked/configs/common.mk)
# Inherit GSM common stuff
$(call inherit-product, vendor/baked/configs/gsm.mk)
# Setup device specific product configuration.
PRODUCT_NAME := baked_ville
PRODUCT_BRAND := HTC
PRODUCT_DEVICE := ville
PRODUCT_MODEL := HTC One S
PRODUCT_MANUFACTURER := HTC
PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=htc_ville BUILD_FINGERPRINT=tmous/ville/ville:4.0.4/IMM76D/96068.7:user/release-keys PRIVATE_BUILD_DESC="=2.35.531.7 CL96068 release-keys" BUILD_NUMBER=96068
# bootanimation
PRODUCT_COPY_FILES += \
vendor/baked/prebuilt/bootanimation/bootanimation_540_960.zip:system/media/bootanimation.zip
Now open up AndroidProducts.mk. We need to tell it to call the configuration file that you just created. Add in
Code:
$(LOCAL_DIR)/ville.mk \
right after vibrantmtd. So the whole file should look something like this (at the time of writing, YMMV):
Code:
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/captivatemtd.mk \
$(LOCAL_DIR)/crespo.mk \
$(LOCAL_DIR)/crespo4g.mk \
$(LOCAL_DIR)/d2att.mk \
$(LOCAL_DIR)/d2mtr.mk \
$(LOCAL_DIR)/d2spr.mk \
$(LOCAL_DIR)/d2tmo.mk \
$(LOCAL_DIR)/d2usc.mk \
$(LOCAL_DIR)/d2vzw.mk \
$(LOCAL_DIR)/endeavoru.mk \
$(LOCAL_DIR)/fascinatemtd.mk \
$(LOCAL_DIR)/galaxysmtd.mk \
$(LOCAL_DIR)/i9300.mk \
$(LOCAL_DIR)/grouper.mk \
$(LOCAL_DIR)/maguro.mk \
$(LOCAL_DIR)/mako.mk \
$(LOCAL_DIR)/manta.mk \
$(LOCAL_DIR)/mesmerizemtd.mk \
$(LOCAL_DIR)/p3113.mk \
$(LOCAL_DIR)/p5wifi.mk \
$(LOCAL_DIR)/toro.mk \
$(LOCAL_DIR)/tf201.mk \
$(LOCAL_DIR)/tf300t.mk \
$(LOCAL_DIR)/tf700t.mk \
$(LOCAL_DIR)/toroplus.mk \
$(LOCAL_DIR)/showcasemtd.mk \
$(LOCAL_DIR)/stingray.mk \
$(LOCAL_DIR)/vibrantmtd.mk \
[COLOR="Red"][B]$(LOCAL_DIR)/ville.mk \[/B][/COLOR]
$(LOCAL_DIR)/wingray.mk
Step 4: Actually building. FInally!
1) Open a terminal, and navigate to the baked/ directory.
2) Type this:
Code:
cp external/kernel-headers/original/sound/asound.h prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/sysroot/usr/include/sound/
You will run into errors if you don't copy over that kernel header. AOSP Jelly Bean glibc sysroot seems to include an asound.h that relies on uint32t which isn't (normally) defined.
3) Type:
Code:
. build/envsetup.sh
lunch
4) You will be brought up with a menu that looks something like this:
Code:
You're building on Linux
Lunch menu... pick a combo:
1. mini_armv7a_neon-userdebug
2. mini_armv7a-userdebug
[B][COLOR="Red"]3. baked_ville-userdebug[/COLOR][/B]
4. full_panda-userdebug
5. baked_toro-userdebug
6. baked_maguro-userdebug
7. baked_mako-userdebug
8. baked_manta-userdebug
9. baked_toroplus-userdebug
10. baked_crespo-userdebug
11. baked_crespo4g-userdebug
12. baked_grouper-userdebug
13. baked_captivatemtd-userdebug
14. baked_d2att-userdebug
15. baked_d2mtr-userdebug
16. baked_d2spr-userdebug
17. baked_d2tmo-userdebug
18. baked_d2usc-userdebug
19. baked_d2vzw-userdebug
20. baked_endeavoru-userdebug
21. baked_fascinatemtd-userdebug
22. baked_galaxysmtd-userdebug
23. baked_i9300-userdebug
24. baked_mesmerizemtd-userdebug
25. baked_p3113-userdebug
26. baked_p5wifi-userdebug
27. baked_showcasemtd-userdebug
28. baked_stingray-userdebug
29. baked_tf201-userdebug
30. baked_tf300t-userdebug
31. baked_tf700t-userdebug
32. baked_vibrantmtd-userdebug
33. baked_wingray-userdebug
Which would you like? [full-eng]
See that baked_ville-userdebug is at number 3. So type in '3' or whatever the corresponding number is.
4) Now wait a minute or two (depending on how fast your computer is) as it calls the makefiles and sets up your build system.
5) When the 'lunch' has finished, you should see something like this:
Code:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.2.1
TARGET_PRODUCT=baked_ville
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_[email protected]_3.20GHz-with-gentoo-2.1
HOST_BUILD_TYPE=release
BUILD_ID=JOP40D
OUT_DIR=/home/klin1344/baked/out
============================================
Now type in
Code:
mka bacon -j#
and the build process will begin! Again, here the -j# is an option on how many simultaneous jobs you want. It's common to use a number between 1 and 2 times the number of hardware threads on the computer being used for the build.
5) When the build is done, you should get a package in baked/out/target/product/ville/.
6) Flash and enjoy!!
Updating / Re-building
Always do a full clean when you want to update your build.
1) Clean out the previous build(s).
Code:
rm -rf out
2) Sync up the repo to get the latest changes.
Code:
repo sync -j#
3) Follow the tutorial again starting from Step 4.
Troubleshooting
Troubleshooting​
Coming soon.
one more just in case.
I was just thinking about this since they wouldn't let you share blackbean 7. Thanks
Sent from my HTC One S using Tapatalk 2
thanks man, to bad you stop developing this;
baked blackbean made by you it's still the best ROM out here in it branch;
their are definitely good at it and also your build from baked6 is way in front of others
to bad we'll never have an (un)official build from baked7 made by profs
I've been thinking about trying to build from source.
But I don't meet the first requirement.
Thanks for the guide! Good work as usual.
Sent from my HTC One S using Tapatalk 2
Thanks a lot klin. Since blackbean 6 was best rom I had on my htc one s and you cannot give out the new version anymore I was thinking about building that rom on my own for the first time. But I didn't know how. I will definetly use that tutorial. I cannot understand why teambaked is so awkward.
I'm back, and I'm going to finish this guide right now. Glad to see that people are looking forward to this and that it'll help quite a few who want to build for themselves.
Sent from my SGH-T999 using Tapatalk 2
Guide is finished and up! If you guys run into ANY errors, feel free to post in the thread and I'll do my best to help you out. Happy building!
klin1344 said:
Guide is finished and up! If you guys run into ANY errors, feel free to post in the thread and I'll do my best to help you out. Happy building!
Click to expand...
Click to collapse
[email protected]:~$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
ln: failed to create symbolic link `/usr/lib/i386-linux-gnu/libGL.so': File exists
essentialmindz said:
[email protected]:~$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
ln: failed to create symbolic link `/usr/lib/i386-linux-gnu/libGL.so': File exists
Click to expand...
Click to collapse
This means that creating a symlink failed because the file already exists. You can just skip this step as there is no need to symlink if the file is there.
Sent from my SGH-T999 using Tapatalk 2
Very detailed and accurate... Thanks for the time you took writing this... Great job.. This makes me wanna build from source again..
Sent from my HTC One S using xda premium
$droyd$ said:
Very detailed and accurate... Thanks for the time you took writing this... Great job.. This makes me wanna build from source again..
Sent from my HTC One S using xda premium
Click to expand...
Click to collapse
droyd, are you perhaps thinking about building this ROM?
Jeez, klin1344! You're THE MAN! I was devastated when the BBB download link was pulled cause I didn't download it in time! This guide of yours is a GREAT initiative and I for one will be following it in the next few days! :good::good::laugh:
Is this going to work for villec2 (S3)??
Sent from my HTC One S using xda app-developers app
mteezey said:
I was just thinking about this since they wouldn't let you share blackbean 7. Thanks
Sent from my HTC One S using Tapatalk 2
Click to expand...
Click to collapse
This is ridiculous, they never said he couldn't share Blackbean 7, they only asked that he not share before they shared! It has not been officially released on any device by teambaked why is this such a sin? I don't understand. I think it's just pure respect and self discipline. I want Blackbean 7 on HTC One S just as much as the rest of us but they simply have chosen not to release it til they are ready. I think it's crazy to think we can have it here before any official builds. We don't have to be mad. They gave permission.
Anyway Thanks for the guide, it is a great offering to help us.
luxandroid said:
Is this going to work for villec2 (S3)??
Sent from my HTC One S using xda app-developers app
Click to expand...
Click to collapse
I don't think so, because there is no cm10 for the c2
Gesendet von meinem Nexus 7 mit Tapatalk 2
CrayzyBoy said:
I don't think so, because there is no cm10 for the c2
Gesendet von meinem Nexus 7 mit Tapatalk 2
Click to expand...
Click to collapse
yeah but who knows maybe with some corrections...just wondering...
many thanks klin, you're the best
I'll give it a chance this week, as I'll have some spare time in a few days
LibertyMonger said:
This is ridiculous, they never said he couldn't share Blackbean 7, they only asked that he not share before they shared! It has not been officially released on any device by teambaked why is this such a sin? I don't understand. I think it's just pure respect and self discipline. I want Blackbean 7 on HTC One S just as much as the rest of us but they simply have chosen not to release it til they are ready. I think it's crazy to think we can have it here before any official builds. We don't have to be mad. They gave permission.
Anyway Thanks for the guide, it is a great offering to help us.
Click to expand...
Click to collapse
I get where you coming from but team Baked had the same issue before and they went about it in a lame way which they did again so that's why some are not happy with it and you got the fact this site about sharing work.
Think I have to give this a try but guess I better give more space to Linux lol.

[GUIDE]Making a ROM from source{Mediatek}

Guide to Mediatek Building(Guide 3:=/system)
Requisites
A Linux machine
The required packages(Look to the 2nd post)
A source code(CyanogenMod,AOKP..)[Look at post 3 for more details]
The Mediatek modified packaged, attached to post]
Lets get started!
I'll reinstate the fact that mediatek is Anti GPL so doesnt release the source codes but some companies recently have started releasing the source and many of you guys asked me how to build a rom for a mediatek device. Here it goes
There are three requirments for building a rom for a phone from source
a)device tree
b)kernel source
c)vendor tree(usually made by the device/setup-makefiles.sh
Step 1(Merging Mediatek files):First. you'd have to merge the package i gave in the post to your source tree.
Step 2(Setting up the environment)Assuming you have a kernel tree) Try to find a device tree for your phone this device tree can either be built from start or can be "forked" of a similar device. What i mean is, suppose you have a mt6589 chipset you can take the device tree from another mt6589 chipset. Here is a link to my device tree for Canvas 4 kitkat mt6589 device tree..kernel source for mt6589. If you are building for very similar devices of canvas 4 you could use my prebuilt kernel too.
Step 3(Obtaining proprietory files):: For wifi,gps and radio to work we have to obtain some files which are "device-specific". We do this by executing the file in the device tree called the "extract-files.sh" or the "proprietory-files.sh". what these files do is they grep the contents from the proprietory-files.txt and pull it from your phone using adb.
Step 4(Building):What we want to do first is setup the build environment. The script is located inside the build folder.This script describes how to set up your local work environment to build the Android source files. You will need to use Linux or Mac OS. Building under Windows is not currently supported.. to execute this script,
Code:
source build/envetup.sh
. We have to now "lunch" the device. What this does is that it initializes the build environment for that particular device.
we use this to tell linux to build it for your device this is done by
Code:
lunch cm_devicename-userdebug or lunch cm_devicename-eng
A very good artical i came across for explaining the build-variants is here. Now is the easy part(Compiling). We now type
Code:
make -j# bacon
what bacon does is create a .zip file which is flashable on your phone. #=no of processors+2. But if your processor is hyperthreaded, add 4 to the no of physical cores.
Step 5(Errors):There is no one solution for all errors but general errors like "Term.apk not found" can be fixed by going to the vendor/cm(aokp..)/get-prebuilts. Other errors are welcome in the thread and I'll try my best to solve them
Hope it helped you!, any feedback on the tutorial is welcome.
Hit that thanks button if you think its worth it
Regards and Good Luck
My first tutorial:building a boot.img for mediatek
Links to my next Guides
Building the boot.img{MediaTek}
Building the Kernel{MediaTek}
Toolchain links are coming up.
Required packages before building
Python 2.6 -- 2.7, which you can download from python.org.
GNU Make 3.81 -- 3.82, which you can download from gnu.org,
JDK 6 if you wish to build Gingerbread or newer; JDK 5 for Froyo or older. You can download both from java.sun.com.
Git 1.7 or newer. You can find it at git-scm.com.
#Required packages
Code:
sudo apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 git-core lzop ccache gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python gcc g++ cpp gcc-4.8 g++-4.8 && sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Go to etc/udev/rules.d/51-android.rules
Code:
# adb protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>"
# fastboot protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="<username>"
# adb protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="<username>"
# fastboot protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="<username>"
# adb protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="<username>"
# fastboot protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="<username>"
# adb protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="<username>"
# fastboot protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="<username>"
# adb protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="<username>"
# adb protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0600", OWNER="<username>"
# fastboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0600", OWNER="<username>"
# adb protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0600", OWNER="<username>"
# fastboot protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0600", OWNER="<username>"
# adb protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0600", OWNER="<username>"
# fastboot protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee0", MODE="0600", OWNER="<username>"
In bash.rc
Code:
export USE_CCACHE=1
Beter way installing java
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install oracle-java6-installer
Reuqired package check
Code:
sudo apt-get install git-core lzop ccache gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python gcc g++ cpp gcc-4.8 g++-4.8
THIS
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
You're done
Source code links
you can get repo script by typing
Code:
curl $ http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Code:
repo init -u <URL to android manifest> -b <branch name>
this is the generalized way to do this.
For cyanogenmod:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
For aokp
Code:
repo init -u https://github.com/AOKP/platform_manifest.git -b kitkat
This is about 14GB and will take time to download. once its downloaded make sure you have the required packages from the second post. To start building follow the first post
Nice guide, will surely try it when i get some time... Subscribed
EnerJon said:
Nice guide, will surely try it when i get some time... Subscribed
Click to expand...
Click to collapse
Have fun!
Regards
Kernel Development guide coming today
Suggestions for new guides are welcome and I'll try my best to do them.
Sent from my Moto G using XDA Free mobile app
I assume this would work on a MT6572, yes?
blakegriplingph said:
I assume this would work on a MT6572, yes?
Click to expand...
Click to collapse
If you have the kernel source, yes it'll work
Sent from my Moto G using XDA Free mobile app
MasterAwesome said:
If you have the kernel source, yes it'll work
Sent from my Moto G using XDA Free mobile app
Click to expand...
Click to collapse
Well, I hope this would work with the Lenovo A369i sources.
blakegriplingph said:
Well, I hope this would work with the Lenovo A369i sources.
Click to expand...
Click to collapse
Looks good to me try it out and give me the results. if it doesnt work i'll try to guide you through alternative steps..
Regards and good luck
MasterAwesome said:
Looks good to me try it out and give me the results. if it doesnt work i'll try to guide you through alternative steps..
Regards and good luck
Click to expand...
Click to collapse
I'm no coder, but I just want to try it out of curiosity. Might do an initial build and leave the rest to the lads for them to mess with.
blakegriplingph said:
Well, I hope this would work with the Lenovo A369i sources.
Click to expand...
Click to collapse
Device looks normal, technically it should work. If you face any errors please ask me and i'll guide you through the process.
Regards and good luck
MasterAwesome said:
Device looks normal, technically it should work. If you face any errors please ask me and i'll guide you through the process.
Regards and good luck
Click to expand...
Click to collapse
Lol you replied to that post already
But yeah, although I was told once that the kernel sources Lenovo provided were apparently a mess.
blakegriplingph said:
Lol you replied to that post already
But yeah, although I was told once that the kernel sources Lenovo provided were apparently a mess.
Click to expand...
Click to collapse
I closed my browser in the middle when I was was typing.. Somehow it got posted .
Yeah Lenovo sources are a mess... I modified it and put a working A820 KERNEL Source on github. https://github.com/IceFlavouredKitkat/A820_kernel
Sent from my Moto G using XDA Free mobile app
MasterAwesome said:
I closed my browser in the middle when I was was typing.. Somehow it got posted .
Yeah Lenovo sources are a mess... I modified it and put a working A820 KERNEL Source on github. https://github.com/IceFlavouredKitkat/A820_kernel
Sent from my Moto G using XDA Free mobile app
Click to expand...
Click to collapse
Nice one dude, I'm just ticked off at how much of a scrooge MTK is, hence why I lol whenever you guys do your part at trolling the company.
blakegriplingph said:
Nice one dude, I'm just ticked off at how much of a scrooge MTK is, hence why I lol whenever you guys do your part at trolling the company.
Click to expand...
Click to collapse
True Dat
Sent from my Moto G using XDA Free mobile app
MasterAwesome said:
True Dat
Sent from my Moto G using XDA Free mobile app
Click to expand...
Click to collapse
Yup. BTW, you mentioned about the source files weighing in at 14GB. Wouldn't that take eons to compile? I've compiled Wine and ReactOS before and boy did I waste an hour or so of my time waiting for the binaries to churn out.
blakegriplingph said:
Yup. BTW, you mentioned about the source files weighing in at 14GB. Wouldn't that take eons to compile? I've compiled Wine and ReactOS before and boy did I waste an hour or so of my time waiting for the binaries to churn out.
Click to expand...
Click to collapse
Depends on your PC and your hard drive and ram. I have an i3-2100(upgrading to a amd 6 core soon) and a Seagate 1TB Harddrive and 8gb ram. Pretty basic stuff it takes about 2:30 hours to compile. It's basically because my pc has just 2 core and even if it were more cores my Harddrive would bottleneck it so... :/
Mounting into tmpfs and using ccache significantly reduces compile time
Sent from my Moto G using XDA Free mobile app
Nice guide Mate.. you r encouraging mtk development
Sent from my Iris 504q using Tapatalk

[GUIDE] Convert Any Phone/Tablet into KaliPwn Phone/Tablet

****i am not responsible for your phone or anything you do with aircrack-ng
this guide will help you do, what a $1,295.00 PWN PHONE can!!
*this guide is based on nexus 5 you can substitute it with any phone/tablet(with otg support) with this guide
------------------------------------------------------------------------------------------------
Things You Need
------------------------------------------------------------------------------------------------
1) Nexus 5 (rooted)
2) OTG Cable
3) list of USB supported
.TP-LINK TL-WN722N(confirmed by me & DragonHunt3r)
.Linksys WUSB600N V2 (confirmed by DragonHunt3r)
.TP-LINK TL-WN725N V1 & V2
.ALFA Network AWUS036H
(if you have other wifi usb then just ask ill try to add it into the guide)
4) Ubuntu (to compile kernel)
------------------------------------------------------------------------------------------------
PART A
(Compiling Kernel)
------------------------------------------------------------------------------------------------
Setting up your ubuntu machine
Code:
$ sudo apt-get update
Code:
$ sudo apt-get install oracle-java6-installer
Code:
$ sudo apt-get install git gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z1-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc libreadline6-dev lib32readline-gplv2-dev libncurses5-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev squashfs-tools pngcrush schedtool dpkg-dev
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/
create a file /etc/udev/rules.d/51-android.rules (as the root user)
copy paste the below code and save
Code:
# adb protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>"
# fastboot protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="<username>"
# adb protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="<username>"
# fastboot protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="<username>"
# adb protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="<username>"
# fastboot protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="<username>"
# adb protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="<username>"
# fastboot protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="<username>"
# adb protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="<username>"
# adb protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0600", OWNER="<username>"
# fastboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0600", OWNER="<username>"
# adb protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0600", OWNER="<username>"
# fastboot protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0600", OWNER="<username>"
# adb protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0600", OWNER="<username>"
# fastboot protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee0", MODE="0600", OWNER="<username>"
<username> must be replaced by the actual username of the user who is authorized to access the phones over USB.
Setting correct paths
Code:
gedit android-path.sh
cope paste the code and save it
Code:
export CC=$(pwd)/arm-eabi-4.6/bin/arm-eabi-
export CROSS_COMPILE=$(pwd)/arm-eabi-4.6/bin/arm-eabi-
export ARCH=arm
export SUBARCH=arm
export PATH=$PATH:$(pwd)/andorid_boot_tools_bin
Make it executable and source to current terminal window.
(you need to source it to your current terminal window before you compile)
Code:
$ chmod +x android-path.sh
$ source android-path.sh
Download Source (any kernel source can be used)
1. HTC
2. Samsung
3. LG
4. Sony
5. Nexus devices
using nexus 5 andoid kernel source
Code:
$ git clone https://android.googlesource.com/kernel/msm.git
Code:
$ cd msm/
$ git branch -a
$ git checkout origin/android-msm-hammerhead-3.4-kitkat-mr2
Code:
$ make hammerhead_defconfig
$ make menuconfig
Adding required drivers
For TP-LINK_TL-WN722N
Code:
quick look in [URL="https://wikidevi.com/wiki/TP-LINK_TL-WN722N"]wikidev[/URL] will tell you that TP-LINK TL-WN722N uses [URL="http://wireless.kernel.org/en/users/Drivers/ath9k_htc"]ath9k_htc[/URL] drivers
Enabling [URL="http://wireless.kernel.org/en/users/Drivers/ath9k"]ath9k[/URL] drivers in kernel
To enable ath9k, you must first enable mac80211 through make menuconfig when compiling your kernel. If you do not know what this means then please learn to compile kernels or rely on your Linux distribution's kernel. Below are the options you need to enable ath9k through make menuconfig.
[CODE]Networking support --->
Wireless --->
< * > cfg80211 - wireless configuration API
< * > Generic IEEE 802.11 Networking Stack (mac80211)
You can then enable ath9k in the kernel configuration under
Code:
Device Drivers --->
[*] Network device support --->
Wireless LAN --->
Atheros Wireless Cards ---->
< * > Atheros 802.11n wireless cards support
< * > Atheros HTC based wireless card support
save and exit menuconfig
check in your .config file if you have them enable(its a hidden file)
Code:
CONFIG_ATH_COMMON=y
CONFIG_ATH9K_HW=y
CONFIG_ATH9K_COMMON=y
CONFIG_ATH9K_HTC=y
[/CODE]
For TP-LINK TL-WN725N V1 & V2
Code:
quick look in [URL="https://wikidevi.com/wiki/TP-LINK_TL-WN725N_v1"]V1[/URL] & [URL="https://wikidevi.com/wiki/TP-LINK_TL-WN725N_v2"]V2[/URL] wikidev will tell you that TP-LINK_TL-WN725N uses [URL="http://wireless.kernel.org/en/users/Drivers/rtl819x"]rtl8192cu[/URL] & [URL="https://github.com/lwfinger/rtl8188eu"]8188eu[/URL] drivers
To enable rtl8192cu & 8188eu, you must first enable rtl8192cu & 8188eu through make menuconfig when compiling your kernel. If you do not know what this means then please learn to compile kernels or rely on your Linux distribution's kernel. Below are the options you need to enable rtl8192cu & 8188eu through make menuconfig.
[CODE]Device Drivers --->
[*] Network device support --->
Wireless LAN --->
[*] Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter
For Linksys WUSB600N V2
Code:
quick look in [URL="https://wikidevi.com/wiki/Linksys_WUSB600N_v2"]wikidev[/URL] will tell you that WUSB600N V2 uses [URL="http://wireless.kernel.org/en/users/Drivers/rt2800usb"]rt2800usb[/URL] drivers
To enable rt2800usb, you must first enable rt2800usb through make menuconfig when compiling your kernel. If you do not know what this means then please learn to compile kernels or rely on your Linux distribution's kernel. Below are the options you need to enable rt2800usb through make menuconfig.
[CODE]Device Drivers --->
[*] Network device support --->
Wireless LAN --->
Ralink driver support ---->
< * > Ralink rt27xx/rt28xx/rt30xx (USB) support -->
< * > rt2800usb - Include support for rt35xx devices (EXPERIMENTAL) (NEW)
< * > rt2800usb - Include support for unknown (USB) devices
For ALFA Network AWUS036H
Code:
quick look in [URL="https://wikidevi.com/wiki/ALFA_Network_AWUS036H"]wikidev[/URL] will tell you that AWUS036H uses [URL="http://wireless.kernel.org/en/users/Drivers/rtl8187"]rtl8187[/URL] drivers
Enabling [URL="http://wireless.kernel.org/en/users/Drivers/ath9k"]rtl8187[/URL] drivers in kernel
To enable rtl8187, you must first enable rtl8187 through make menuconfig when compiling your kernel. If you do not know what this means then please learn to compile kernels or rely on your Linux distribution's kernel. Below are the options you need to enable rtl8187 through make menuconfig.
[CODE]Networking support --->
Wireless --->
< * > Common routines for IEEE802.11 drivers
< * > Generic IEEE 802.11 Networking Stack (mac80211)
You can then enable rtl8187 in the kernel configuration under
Code:
[CODE]
Device Drivers --->
[*] Network device support --->
Wireless LAN --->
[*] Realtek 8187 and 8187B USB support
save and exit menuconfig[/CODE]
save and exit menuconfig if you dint do it
save and exit menuconfig[/CODE]
now your ready to compile
Code:
make -j4
this will take some time to compile
you should get something like this in the end
Code:
Kernel: arch/arm/boot/zImage-dtb is ready
now you need to get a boot.img from any {your device} rom and place it in boot_img (create this folder where you earlier downloaded the toolchain and the kernel)
Code:
$ cd .. # if you was in msm directory
$ git clone https://github.com/pbatard/bootimg-tools.git
$ cd bootimg-tools/
$ make
$ cd cpio/
$ gcc mkbootfs.c -o mkbootfs -I../include
$ cd ../..
$ mkdir andorid_boot_tools_bin
$ cd andorid_boot_tools_bin/
$ cp ../bootimg-tools/mkbootimg/mkbootimg .
$ cp ../bootimg-tools/mkbootimg/unmkbootimg .
$ cp ../bootimg-tools/cpio/mkbootfs .
$ cd ..
time to create your own boot
Code:
$ unmkbootimg -i boot_img/boot.img
$ cp msm/arch/arm/boot/zImage-dtb kernel
$ mkbootimg --base 0 --pagesize 2048 --kernel_offset 0x00008000 --ramdisk_offset 0x02900000 --second_offset 0x00f00000 --tags_offset 0x02700000 --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1' --kernel kernel --ramdisk ramdisk.cpio.gz -o boot.img
install the boot.img to your phone (this wont flash the kernel, it will temporarily boot with this kernel, after you restart you will go back to what ever kernel you had before
(this is for nexus 5 it might work for others also)
Code:
$ adb reboot bootloader
$ sudo fastboot boot boot.img
------------------------------------------------------------------------------------------------
PART B
(setting up your phone)
------------------------------------------------------------------------------------------------
For TP-LINK_TL-WN722N
Code:
download the firmware files [URL="http://wireless.kernel.org/download/htc_fw/1.3/"]here[/URL]
1. htc_7010.fw
2. htc_9271.fw
For TP-LINK TL-WN725N V1 & V2
Code:
Download the firmware files [URL="https://drive.google.com/folderview?id=0Bxm4XqSOJU3YWlVaZ1NFRDF4RTA&usp=sharing"]here[/URL]
For Linksys WUSB600N V2
Code:
Download the firmware files [URL="https://drive.google.com/folderview?id=0Bxm4XqSOJU3YMGZTcjJ2ei10V1k&usp=sharing"]here[/URL]
1. rt2870.bin
For ALFA Network AWUS036H
Code:
hopefully nothing to do here,... if it doesnt work let me know
copy them to your phone
use a file manager with root to copy both of them to /system/etc/firmware/
install Linux deploy on your phone
fire up linux deploy and go to properties-->Distribution and select kali linux
installation path set to /sdcard/linux.img
hit the install button
after installation click start button
start your favorite ssh program and happy aircrack-ng
(SH credentials are “android” for the username (configured via Linux Deploy) and “changeme” as the password.)
​
can u add it for d-link dwa-123
i just want to say you are my hero :good:
ummmm.... super interesting....
you think that work reaver???
this is amazing, does device compatibility play a role with LG G2? I know it doesn't have support for that one wifi monitoring thing on stock anyways.
Hello, it is possible to convert à galaxy s6 into KaliPwn phone? I have the 5.0.2 firmware and origin kernel, can i install? The franco kernel. Thank you very much for your answers
This is really insteresting but also a bit old. Can anyone confirm this still works or redirect me to an updated version of this guide?

Categories

Resources