[Q] how to develop a rom - myTouch 3G, Magic Android Development

hi im a new on development of android rom ...
so could you please tell me how to do it ???
i'm thinking at first port froyo from original android to my htc magic 32a to increase my knowlege and then porting greanberg
could some one help in this project????
i'm sorry for the bad english

Welcome.
Please check wiki first.

arthurcswang said:
Welcome.
Please check wiki first.
Click to expand...
Click to collapse
i already have checked and i but i dont any thing
if you some post please post the link

danielgek said:
i already have checked and i but i dont any thing
if you some post please post the link
Click to expand...
Click to collapse
You don't... what?
Do you know Linux?

may be u'll find some help in the Kitchen

Binary100100 said:
You don't... what?
Do you know Linux?
Click to expand...
Click to collapse
im sorry i hadn't found anything
i have good knowleged of linux
i have tried that kitchen but i want to compile the code and with tha kitchen i cant

danielgek said:
im sorry i hadn't found anything
i have good knowleged of linux
i have tried that kitchen but i want to compile the code and with tha kitchen i cant
Click to expand...
Click to collapse
http://source.android.com/

danielgek said:
im sorry i hadn't found anything
i have good knowleged of linux
i have tried that kitchen but i want to compile the code and with tha kitchen i cant
Click to expand...
Click to collapse
get source code .
make
download to handset.
that's all

arthurcswang said:
get source code .
make
download to handset.
that's all
Click to expand...
Click to collapse
how can i download the source for a espefific device??? like sappire????
and then i heard something about editing boot.img what i have to do to that file????

I would start with compiling cyanogenmod or ezgingerbread. They have guides
Sent from my Gingerbread on Sapphire using XDA Premium App

The recommended system for downloading and compiling Android OS from source (AOSP - Android Open-Source Project) is Ubuntu. I have a Mac with Snow Leopard, so I use VirtualBox to run a virtual machine that has Ubuntu installed on it. Once you have Ubuntu installed on the virtual machine, you need to prepare it so that you can download and compile successfully AOSP.
First, make sure your OS is up-to-date, by running the Update Manager from the System>Administration menu. Once that is completed, go to Applications>Accessories and open Terminal.
Type this command to install all the needed libraries (this is all one line) - Ubuntu 10.04 64Bits:
Code:
sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind lib32readline5-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
Type this command to install all the needed libraries (this is all one line) - Ubuntu 32Bits (thanks to Szusz!):
Edit your /etc/apt/sources.list and add these lines on the end:
Code:
deb pl.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb pl.archive.ubuntu.com/ubuntu/ jaunty universe
Code:
sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind libreadline5-dev gcc-multilib g++-multilib libc6-dev libncurses5-dev x11proto-core-dev libx11-dev libreadline5-dev libz-dev
Prepare the OS to run Java 5.0, which is the only compatible Java version for compiling. Recent versions of Ubuntu don't need this step (10.04+).
Code:
sudo update-java-alternatives -s java-1.5.0-sun
Fix a dependency with X11 (64Bits):
Code:
sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so
Fix a dependency with X11 (32Bits):
Code:
sudo ln -s /usr/lib/libX11.so.6 /usr/lib/libX11.so
That's it for the Operative system. Now the tool that Google uses to control the source files is Repo. To install type this:
Code:
cd ~
mkdir bin
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
PATH="$HOME/bin:$PATH"
Now to download the source files, compile etc, all you need to do is to copy this text to a file in Ubuntu (to create one, just type "gedit android.sh"):
PHP:
#!/bin/bash
#Created by dferreira ([email protected])
#Checkout and compile master repositories out of source.android.com
SOURCE_FOLDER=~/magicDroid
BRANCH="master";
KERNEL="android-msm-2.6.32";
#Check for Repo
if [ ! -f ~/bin/repo ]
then
cd ~
mkdir bin
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
PATH="$HOME/bin:$PATH"
fi
#Create project folder
if [ ! -d $SOURCE_FOLDER ]
then
mkdir $SOURCE_FOLDER
fi
cd $SOURCE_FOLDER
#clean old compiled files, there can be new stuff!
make installclean
make clean
#Get updated source files from AOSP
repo init -u git://android.git.kernel.org/platform/manifest.git -b $BRANCH
git clone git://android.git.kernel.org/kernel/msm.git -b $KERNEL #clone latest kernel project
cd $SOURCE_FOLDER/msm
git pull #check if anything new
cd $SOURCE_FOLDER
repo sync #update repo's
#Get HTC drivers if they don't exist already on folder
cd ~/magicDroid
if [ ! -f sapphire_update.zip ]
then
wget --referer=http://developer.htc.com/google-io-device.html http://member.america.htc.com/download/RomCode/ADP/signed-google_ion-ota-14721.zip?
mv signed-google_ion-ota-14721.zip sapphire_update.zip
fi
#unzip the proprietary files from HTC for Sapphire
if [ ! -d vendor/htc/sapphire/proprietary ]
then
cd $SOURCE_FOLDER/device/htc/sapphire/
./unzip-files.sh
fi
#Compile latest kernel
cd $SOURCE_FOLDER/msm
make ARCH=arm msm_defconfig
make ARCH=arm CROSS_COMPILE=$SOURCE_FOLDER/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- zImage -j4
#copy kernel to source if success!
if [ -f $SOURCE_FOLDER/msm/arch/arm/boot/zImage ]
then
cp $SOURCE_FOLDER/msm/arch/arm/boot/zImage $SOURCE_FOLDER/device/htc/dream-sapphire/kernel
fi
#Compile wifi module to match the kernel
cd $SOURCE_FOLDER/system/wlan/ti/sta_dk_4_0_4_32
make KERNEL_DIR=$SOURCE_FOLDER/msm/ ARCH=arm CROSS_COMPILE=$SOURCE_FOLDER/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- -j4
#copy updated wlan.ko that matches the kernel
if [ -f $SOURCE_FOLDER/system/wlan/ti/sta_dk_4_0_4_32/wlan.ko ]
then
cp $SOURCE_FOLDER/system/wlan/ti/sta_dk_4_0_4_32/wlan.ko $SOURCE_FOLDER/device/htc/dream-sapphire/wlan.ko
fi
#setup compiling environment and build images
cd $SOURCE_FOLDER
. build/envsetup.sh
#cd $SOURCE_FOLDER
lunch
make -j4
#get to compiled folder
cd $SOURCE_FOLDER/out/target/product/sapphire/
echo 'Your files ready for flashing are here:'
ls *.img
Save the file and make it executable with:
Code:
chmod 755 android.sh
To run it, just type:
Code:
./android.sh
That's it! Now just follow the instructions. It should ask for your name, email and then later to what device are you compiling. The script that you put on the text file is meant for Sapphire, so you should choose option that has sapphire on it, US version or EU version, with ENG on it, which will make the compiled OS with root access.
In the end, you'll have a set of .img files, ready to be installed on your device.
Using your favourite recovery, wipe everything before flashing the OS and then boot into fastboot. I'm pretty sure that if you really want to compile your own OS, you already know how to use fastboot. But anyway:
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash userdata userdata.img
Reboot your device and enjoy your own OS.
If you run into trouble, let me know.
Some fixes you might be interested:
Enable JIT on DalvikVM
Edit dalvik/vm/Android.mk
Code:
ifeq ($(TARGET_ARCH_VARIANT),armv5te)
WITH_JIT := true
endif
Edit vendor/htc/sapphire/BoardConfigVendor.mk
Code:
WITH_JIT := true
ENABLE_JSC_JIT := true
Add support for audio+video recording on camera
Code:
We need to add BUILD_WITH_FULL_STAGEFRIGHT := true to your vendor's Buildxxx.mk to be able to record audio+video on the camera.
Another property that needs to be active: Thanks to Jubeh
If you want to run this on 32A's, you need to replace the kernel for a 32A one and you should be good to go.
Fix the prelinks issues. Make sure to make a backup of the file (build/core/prelink-linux-arm.map) because I'm almost sure it will get officially fixed in the future.
PHP:
# 0xC0000000 - 0xFFFFFFFF Kernel
# 0xB0100000 - 0xBFFFFFFF Thread 0 Stack
# 0xB0000000 - 0xB00FFFFF Linker
# 0xA0000000 - 0xBFFFFFFF Prelinked System Libraries
# 0x90000000 - 0x9FFFFFFF Prelinked App Libraries
# 0x80000000 - 0x8FFFFFFF Non-prelinked Libraries
# 0x40000000 - 0x7FFFFFFF mmap'd stuff
# 0x10000000 - 0x3FFFFFFF Thread Stacks
# 0x00000000 - 0x0FFFFFFF .text / .data / heap
# Note: The general rule is that libraries should be aligned on 1MB
# boundaries. For ease of updating this file, you will find a comment
# on each line, indicating the observed size of the library, which is
# one of:
#
# [<64K] observed to be less than 64K
# [~1M] rounded up, one megabyte (similarly for other sizes)
# [???] no size observed, assumed to be one megabyte
# core system libraries
libdl.so 0xAFF00000 # [<64K]
libc.so 0xAFD00000 # [~2M]
libstdc++.so 0xAFC00000 # [<64K]
libm.so 0xAFB00000 # [~1M]
liblog.so 0xAFA00000 # [<64K]
libcutils.so 0xAF900000 # [~1M]
libthread_db.so 0xAF800000 # [<64K]
libz.so 0xAF700000 # [~1M]
libevent.so 0xAF600000 # [???]
libssl.so 0xAF400000 # [~2M]
libcrypto.so 0xAF000000 # [~4M]
libsysutils.so 0xAEF00000 # [~1M]
# bluetooth
liba2dp.so 0xAEE00000 # [~1M]
audio.so 0xAED00000 # [~1M]
input.so 0xAEC00000 # [~1M]
libbluetoothd.so 0xAEA00000 # [~2M]
libbluedroid.so 0xAE900000 # [<64K]
libbluetooth.so 0xAE800000 # [~1M]
libdbus.so 0xAE700000 # [~1M]
# extended system libraries
libril.so 0xAE600000 # [~1M]
libreference-ril.so 0xAE500000 # [~1M]
libwpa_client.so 0xAE400000 # [<64K]
libnetutils.so 0xAE300000 # [~1M]
# core dalvik runtime support
libandroid_servers.so 0xAE200000 # [~1M]
libicuuc.so 0xADE00000 # [~4M]
libicui18n.so 0xAD900000 # [~5M]
libandroid_runtime.so 0xAD300000 # [~6M]
libnativehelper.so 0xAD100000 # [~2M]
libdvm-ARM.so 0xAD000000 # [???]
libdvm.so 0xACA00000 # [~6M]
# Note: libicudata.so intentionally omitted
# graphics
libpixelflinger.so 0xAC900000 # [~1M]
# libcorecg is for backward-compatibility with donut
libcorecg.so 0xAC800000 # [???]
libsurfaceflinger_client.so 0xAC700000 # [~1M]
libsurfaceflinger.so 0xAC500000 # [~2M]
libGLES_android.so 0xAC400000 # [~1M]
libagl.so 0xAC300000 # [???]
libGLESv1_CM.so 0xAC200000 # [~1M]
libGLESv2.so 0xAC100000 # [~1M]
libOpenVG_CM.so 0xAC000000 # [???]
libOpenVGU_CM.so 0xABF00000 # [???]
libEGL.so 0xABE00000 # [~1M]
libETC1.so 0xABD00000 # [<64K]
libacc.so 0xABC00000 # [~1M]
libexif.so 0xABB00000 # [~1M]
libcamera_client.so 0xABA80000 # [~1M]
libui.so 0xAB900000 # [~1M]
# libsgl is for backward-compatibility with donut
libsgl.so 0xAB800000 # [???]
libskia.so 0xAB100000 # [~7M]
librs_jni.so 0xAB000000 # [~1M]
libRS.so 0xA9E00000 # [~2M]
libjnigraphics.so 0xA9D00000 # [<64K]
libskiagl.so 0xA9C00000 # [~1M]
# audio
libFLAC.so 0xA9B00000 # [???]
libaudiopolicy.so 0xA9A00000 # [~1M]
libaudiopolicygeneric.so 0xA9900000 # [???]
libsoundpool.so 0xA9800000 # [~1M]
libgps.so 0xA9700000 # [~1M]
libspeech.so 0xA9600000 # [~1M]
liboemcamera.so 0xA9400000 # [~1M]
libmedia_jni.so 0xA9300000 # [~1M]
libmediaplayerservice.so 0xA9200000 # [~1M]
libmedia.so 0xA9000000 # [~2M]
libFFTEm.so 0xA8F00000 # [~1M]
libSR_AudioIn.so 0xA8E00000 # [~1M] for external/srec
libaudioflinger.so 0xA8D00000 # [~1M]
# assorted system libraries
libsqlite.so 0xA8B00000 # [~2M]
libexpat.so 0xA8A00000 # [~1M]
libwebcore.so 0xA8300000 # [~7M]
libbinder.so 0xA8200000 # [~1M]
libutils.so 0xA8100000 # [~1M]
libcameraservice.so 0xA8000000 # [~1M]
libhardware.so 0xA7F00000 # [<64K]
libhardware_legacy.so 0xA7E00000 # [~1M]
libapp_process.so 0xA7D00000 # [???]
libsystem_server.so 0xA7C00000 # [~1M]
libime.so 0xA7B00000 # [???]
libaudio.so 0xA7A00000 # [~1M]
libcamera.so 0xA7900000 # [~1M]
libsonivox.so 0xA7800000 # [~1M]
libvorbisidec.so 0xA7700000 # [~1M]
libdiskconfig.so 0xA7600000 # [<64K]
libemoji.so 0xA7500000 # [<64K]
libjni_latinime.so 0xA7400000 # [~1M]
libjni_pinyinime.so 0xA7300000 # [~1M]
libttssynthproxy.so 0xA7200000 # [~1M] for frameworks/base
libttspico.so 0xA7000000 # [~2M] for external/svox
# pv libraries
libpvasf.so 0xA6F00000 # [???]
libpvasfreg.so 0xA6E00000 # [???]
libomx_sharedlibrary.so 0xA6D00000 # [~1M]
libopencore_download.so 0xA6C00000 # [~1M]
libopencore_downloadreg.so 0xA6B00000 # [~1M]
libopencore_net_support.so 0xA6800000 # [~3M]
libopencore_rtsp.so 0xA6200000 # [~6M]
libopencore_rtspreg.so 0xA6100000 # [~1M]
libopencore_author.so 0xA5D00000 # [~4M]
libomx_aacdec_sharedlibrary.so 0xA5B00000 # [~2M]
libomx_amrdec_sharedlibrary.so 0xA5A00000 # [~1M]
libomx_amrenc_sharedlibrary.so 0xA5900000 # [~1M]
libomx_avcdec_sharedlibrary.so 0xA5800000 # [~1M]
libomx_avcenc_sharedlibrary.so 0xA5700000 # [???]
libomx_m4vdec_sharedlibrary.so 0xA5600000 # [~1M]
libomx_m4venc_sharedlibrary.so 0xA5500000 # [???]
libomx_mp3dec_sharedlibrary.so 0xA5400000 # [~1M]
libopencore_mp4local.so 0xA5200000 # [~2M]
libopencore_mp4localreg.so 0xA5100000 # [~1M]
libopencore_player.so 0xA4800000 # [~9M]
# opencore hardware support
libmm-adspsvc.so 0xA4700000 # [<64K]
libOmxCore.so 0xA4600000 # [<64K]
libOmxMpeg4Dec.so 0xA4500000 # [~1M]
libOmxH264Dec.so 0xA4400000 # [~1M]
libOmxVidEnc.so 0xA4300000 # [~1M]
libopencorehw.so 0xA4200000 # [~1M]
libOmxVdec.so 0xA4100000 # [~1M]
libmm-omxcore.so 0xA4000000 # [<64K]
# pv libraries
libopencore_common.so 0xA3900000 # [~7M]
libqcomm_omx.so 0xA3800000 # [<64K]
# stagefright libraries
libstagefright_amrnb_common.so 0xA3700000 # [~1M]
libstagefright_avc_common.so 0xA3600000 # [~1M]
libstagefright_color_conversion.so 0xA3500000 # [<64K]
libstagefright_omx.so 0xA3400000 # [~1M]
libstagefrighthw.so 0xA3300000 # [~1M]
libstagefright.so 0xA2F00000 # [~4M]
# libraries for specific hardware
libgsl.so 0xA2E00000 # [~1M]
libhtc_acoustic.so 0xA2D00000 # [<64K]
libhtc_ril.so 0xA2C00000 # [~1M]
liblvmxipc.so 0xA2B00000 # [~1M] for vendor/nxp
libreference-cdma-sms.so 0xA2A00000 # [<64K] for hardware/ril
# libraries for specific apps or temporary libraries
libcam_ipl.so 0x9F000000 # [???]
libwbxml.so 0x9EF00000 # [???]
libwbxml_jni.so 0x9EE00000 # [~1M]
libxml2wbxml.so 0x9EB00000 # [~1M]
libdrm1.so 0x9EA00000 # [~1M]
libdrm1_jni.so 0x9E900000 # [<64K]
libwapcore.so 0x9E800000 # [???]
libstreetview.so 0x9E700000 # [???]
libwapbrowsertest.so 0x9E600000 # [???]
libminiglobe.so 0x9E500000 # [???]
libearth.so 0x9E400000 # [???]
libembunit.so 0x9E300000 # [<64K]
libneon.so 0x9E200000 # [???]
libjni_example.so 0x9E100000 # [???]
libjni_load_test.so 0x9E000000 # [???]
libjni_lib_test.so 0x9DF00000 # [???]
librunperf.so 0x9DE00000 # [???]
libctest.so 0x9DD00000 # [<64K]
libUAPI_jni.so 0x9DC00000 # [???]
librpc.so 0x9DB00000 # [~1M]
libtrace_test.so 0x9DA00000 # [???]
libsrec_jni.so 0x9D800000 # [~2M]
libjpeg.so 0x9D700000 # [~1M]
libiprouteutil.so 0x9D600000 # [~1M] for external/iproute2
libnetlink.so 0x9D500000 # [<64K] for external/iproute2
libpagemap.so 0x9D400000 # [<64K] for system/extras/libpagemap
libstlport.so 0x9D100000 # [~3M] for external/stlport
libzxing.so 0x9D000000 # [<64K] for goggles
libinterstitial.so 0x9CF00000 # [<64K] for goggles
liblept.so 0x9CA00000 # [~5M] for external/leptonica
How to fix the camera:
http://forum.xda-developers.com/showpost.php?p=7405081&postcount=502 Drivers part
http://forum.xda-developers.com/showpost.php?p=7136150&postcount=447 Kernel part
well as you can seen had finded the solution after lot's and lot's of research
so thank'a anyway to all

Related

[HOW-TO] Compile AOSP Froyo + [ROM] Latest AOSP Froyo for Sapphire

Tired of using someone else wrapped up Android OS? If you are like me, you probably would like to take control over what you are using on your device. There isn't any Market or any Google Applications on this. This is intended for developing applications and have a working phone using the latest Android OS for HTC Magic/Sapphire's.
The recommended system for downloading and compiling Android OS from source (AOSP - Android Open-Source Project) is Ubuntu. I have a Mac with Snow Leopard, so I use VirtualBox to run a virtual machine that has Ubuntu installed on it. Once you have Ubuntu installed on the virtual machine, you need to prepare it so that you can download and compile successfully AOSP.
First, make sure your OS is up-to-date, by running the Update Manager from the System>Administration menu. Once that is completed, go to Applications>Accessories and open Terminal.
Type this command to install all the needed libraries (this is all one line) - Ubuntu 10.04 64Bits:
Code:
sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind lib32readline5-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
Type this command to install all the needed libraries (this is all one line) - Ubuntu 32Bits (thanks to Szusz!):
Edit your /etc/apt/sources.list and add these lines on the end:
Code:
deb pl.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb pl.archive.ubuntu.com/ubuntu/ jaunty universe
Code:
sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind libreadline5-dev gcc-multilib g++-multilib libc6-dev libncurses5-dev x11proto-core-dev libx11-dev libreadline5-dev libz-dev
Prepare the OS to run Java 5.0, which is the only compatible Java version for compiling. Recent versions of Ubuntu don't need this step (10.04+).
Code:
sudo update-java-alternatives -s java-1.5.0-sun
Fix a dependency with X11 (64Bits):
Code:
sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so
Fix a dependency with X11 (32Bits):
Code:
sudo ln -s /usr/lib/libX11.so.6 /usr/lib/libX11.so
That's it for the Operative system. Now the tool that Google uses to control the source files is Repo. To install type this:
Code:
cd ~
mkdir bin
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
PATH="$HOME/bin:$PATH"
Now to download the source files, compile etc, all you need to do is to copy this text to a file in Ubuntu (to create one, just type "gedit android.sh"):
PHP:
#!/bin/bash
#Created by dferreira ([email protected])
#Checkout and compile master repositories out of source.android.com
SOURCE_FOLDER=~/magicDroid
BRANCH="master";
KERNEL="android-msm-2.6.32";
#Check for Repo
if [ ! -f ~/bin/repo ]
then
cd ~
mkdir bin
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
PATH="$HOME/bin:$PATH"
fi
#Create project folder
if [ ! -d $SOURCE_FOLDER ]
then
mkdir $SOURCE_FOLDER
fi
cd $SOURCE_FOLDER
#clean old compiled files, there can be new stuff!
make installclean
make clean
#Get updated source files from AOSP
repo init -u git://android.git.kernel.org/platform/manifest.git -b $BRANCH
git clone git://android.git.kernel.org/kernel/msm.git -b $KERNEL #clone latest kernel project
cd $SOURCE_FOLDER/msm
git pull #check if anything new
cd $SOURCE_FOLDER
repo sync #update repo's
#Get HTC drivers if they don't exist already on folder
cd ~/magicDroid
if [ ! -f sapphire_update.zip ]
then
wget --referer=http://developer.htc.com/google-io-device.html http://member.america.htc.com/download/RomCode/ADP/signed-google_ion-ota-14721.zip?
mv signed-google_ion-ota-14721.zip sapphire_update.zip
fi
#unzip the proprietary files from HTC for Sapphire
if [ ! -d vendor/htc/sapphire/proprietary ]
then
cd $SOURCE_FOLDER/device/htc/sapphire/
./unzip-files.sh
fi
#Compile latest kernel
cd $SOURCE_FOLDER/msm
make ARCH=arm msm_defconfig
make ARCH=arm CROSS_COMPILE=$SOURCE_FOLDER/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- zImage -j4
#copy kernel to source if success!
if [ -f $SOURCE_FOLDER/msm/arch/arm/boot/zImage ]
then
cp $SOURCE_FOLDER/msm/arch/arm/boot/zImage $SOURCE_FOLDER/device/htc/dream-sapphire/kernel
fi
#Compile wifi module to match the kernel
cd $SOURCE_FOLDER/system/wlan/ti/sta_dk_4_0_4_32
make KERNEL_DIR=$SOURCE_FOLDER/msm/ ARCH=arm CROSS_COMPILE=$SOURCE_FOLDER/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- -j4
#copy updated wlan.ko that matches the kernel
if [ -f $SOURCE_FOLDER/system/wlan/ti/sta_dk_4_0_4_32/wlan.ko ]
then
cp $SOURCE_FOLDER/system/wlan/ti/sta_dk_4_0_4_32/wlan.ko $SOURCE_FOLDER/device/htc/dream-sapphire/wlan.ko
fi
#setup compiling environment and build images
cd $SOURCE_FOLDER
. build/envsetup.sh
#cd $SOURCE_FOLDER
lunch
make -j4
#get to compiled folder
cd $SOURCE_FOLDER/out/target/product/sapphire/
echo 'Your files ready for flashing are here:'
ls *.img
Save the file and make it executable with:
Code:
chmod 755 android.sh
To run it, just type:
Code:
./android.sh
That's it! Now just follow the instructions. It should ask for your name, email and then later to what device are you compiling. The script that you put on the text file is meant for Sapphire, so you should choose option that has sapphire on it, US version or EU version, with ENG on it, which will make the compiled OS with root access.
In the end, you'll have a set of .img files, ready to be installed on your device.
Using your favourite recovery, wipe everything before flashing the OS and then boot into fastboot. I'm pretty sure that if you really want to compile your own OS, you already know how to use fastboot. But anyway:
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash userdata userdata.img
Reboot your device and enjoy your own OS.
If you run into trouble, let me know.
Some fixes you might be interested:
Enable JIT on DalvikVM
Edit dalvik/vm/Android.mk
Code:
ifeq ($(TARGET_ARCH_VARIANT),armv5te)
WITH_JIT := true
endif
Edit vendor/htc/sapphire/BoardConfigVendor.mk
Code:
WITH_JIT := true
ENABLE_JSC_JIT := true
Add support for audio+video recording on camera
Code:
We need to add BUILD_WITH_FULL_STAGEFRIGHT := true to your vendor's Buildxxx.mk to be able to record audio+video on the camera.
Another property that needs to be active: Thanks to Jubeh
If you want to run this on 32A's, you need to replace the kernel for a 32A one and you should be good to go.
Fix the prelinks issues. Make sure to make a backup of the file (build/core/prelink-linux-arm.map) because I'm almost sure it will get officially fixed in the future.
PHP:
# 0xC0000000 - 0xFFFFFFFF Kernel
# 0xB0100000 - 0xBFFFFFFF Thread 0 Stack
# 0xB0000000 - 0xB00FFFFF Linker
# 0xA0000000 - 0xBFFFFFFF Prelinked System Libraries
# 0x90000000 - 0x9FFFFFFF Prelinked App Libraries
# 0x80000000 - 0x8FFFFFFF Non-prelinked Libraries
# 0x40000000 - 0x7FFFFFFF mmap'd stuff
# 0x10000000 - 0x3FFFFFFF Thread Stacks
# 0x00000000 - 0x0FFFFFFF .text / .data / heap
# Note: The general rule is that libraries should be aligned on 1MB
# boundaries. For ease of updating this file, you will find a comment
# on each line, indicating the observed size of the library, which is
# one of:
#
# [<64K] observed to be less than 64K
# [~1M] rounded up, one megabyte (similarly for other sizes)
# [???] no size observed, assumed to be one megabyte
# core system libraries
libdl.so 0xAFF00000 # [<64K]
libc.so 0xAFD00000 # [~2M]
libstdc++.so 0xAFC00000 # [<64K]
libm.so 0xAFB00000 # [~1M]
liblog.so 0xAFA00000 # [<64K]
libcutils.so 0xAF900000 # [~1M]
libthread_db.so 0xAF800000 # [<64K]
libz.so 0xAF700000 # [~1M]
libevent.so 0xAF600000 # [???]
libssl.so 0xAF400000 # [~2M]
libcrypto.so 0xAF000000 # [~4M]
libsysutils.so 0xAEF00000 # [~1M]
# bluetooth
liba2dp.so 0xAEE00000 # [~1M]
audio.so 0xAED00000 # [~1M]
input.so 0xAEC00000 # [~1M]
libbluetoothd.so 0xAEA00000 # [~2M]
libbluedroid.so 0xAE900000 # [<64K]
libbluetooth.so 0xAE800000 # [~1M]
libdbus.so 0xAE700000 # [~1M]
# extended system libraries
libril.so 0xAE600000 # [~1M]
libreference-ril.so 0xAE500000 # [~1M]
libwpa_client.so 0xAE400000 # [<64K]
libnetutils.so 0xAE300000 # [~1M]
# core dalvik runtime support
libandroid_servers.so 0xAE200000 # [~1M]
libicuuc.so 0xADE00000 # [~4M]
libicui18n.so 0xAD900000 # [~5M]
libandroid_runtime.so 0xAD300000 # [~6M]
libnativehelper.so 0xAD100000 # [~2M]
libdvm-ARM.so 0xAD000000 # [???]
libdvm.so 0xACA00000 # [~6M]
# Note: libicudata.so intentionally omitted
# graphics
libpixelflinger.so 0xAC900000 # [~1M]
# libcorecg is for backward-compatibility with donut
libcorecg.so 0xAC800000 # [???]
libsurfaceflinger_client.so 0xAC700000 # [~1M]
libsurfaceflinger.so 0xAC500000 # [~2M]
libGLES_android.so 0xAC400000 # [~1M]
libagl.so 0xAC300000 # [???]
libGLESv1_CM.so 0xAC200000 # [~1M]
libGLESv2.so 0xAC100000 # [~1M]
libOpenVG_CM.so 0xAC000000 # [???]
libOpenVGU_CM.so 0xABF00000 # [???]
libEGL.so 0xABE00000 # [~1M]
libETC1.so 0xABD00000 # [<64K]
libacc.so 0xABC00000 # [~1M]
libexif.so 0xABB00000 # [~1M]
libcamera_client.so 0xABA80000 # [~1M]
libui.so 0xAB900000 # [~1M]
# libsgl is for backward-compatibility with donut
libsgl.so 0xAB800000 # [???]
libskia.so 0xAB100000 # [~7M]
librs_jni.so 0xAB000000 # [~1M]
libRS.so 0xA9E00000 # [~2M]
libjnigraphics.so 0xA9D00000 # [<64K]
libskiagl.so 0xA9C00000 # [~1M]
# audio
libFLAC.so 0xA9B00000 # [???]
libaudiopolicy.so 0xA9A00000 # [~1M]
libaudiopolicygeneric.so 0xA9900000 # [???]
libsoundpool.so 0xA9800000 # [~1M]
libgps.so 0xA9700000 # [~1M]
libspeech.so 0xA9600000 # [~1M]
liboemcamera.so 0xA9400000 # [~1M]
libmedia_jni.so 0xA9300000 # [~1M]
libmediaplayerservice.so 0xA9200000 # [~1M]
libmedia.so 0xA9000000 # [~2M]
libFFTEm.so 0xA8F00000 # [~1M]
libSR_AudioIn.so 0xA8E00000 # [~1M] for external/srec
libaudioflinger.so 0xA8D00000 # [~1M]
# assorted system libraries
libsqlite.so 0xA8B00000 # [~2M]
libexpat.so 0xA8A00000 # [~1M]
libwebcore.so 0xA8300000 # [~7M]
libbinder.so 0xA8200000 # [~1M]
libutils.so 0xA8100000 # [~1M]
libcameraservice.so 0xA8000000 # [~1M]
libhardware.so 0xA7F00000 # [<64K]
libhardware_legacy.so 0xA7E00000 # [~1M]
libapp_process.so 0xA7D00000 # [???]
libsystem_server.so 0xA7C00000 # [~1M]
libime.so 0xA7B00000 # [???]
libaudio.so 0xA7A00000 # [~1M]
libcamera.so 0xA7900000 # [~1M]
libsonivox.so 0xA7800000 # [~1M]
libvorbisidec.so 0xA7700000 # [~1M]
libdiskconfig.so 0xA7600000 # [<64K]
libemoji.so 0xA7500000 # [<64K]
libjni_latinime.so 0xA7400000 # [~1M]
libjni_pinyinime.so 0xA7300000 # [~1M]
libttssynthproxy.so 0xA7200000 # [~1M] for frameworks/base
libttspico.so 0xA7000000 # [~2M] for external/svox
# pv libraries
libpvasf.so 0xA6F00000 # [???]
libpvasfreg.so 0xA6E00000 # [???]
libomx_sharedlibrary.so 0xA6D00000 # [~1M]
libopencore_download.so 0xA6C00000 # [~1M]
libopencore_downloadreg.so 0xA6B00000 # [~1M]
libopencore_net_support.so 0xA6800000 # [~3M]
libopencore_rtsp.so 0xA6200000 # [~6M]
libopencore_rtspreg.so 0xA6100000 # [~1M]
libopencore_author.so 0xA5D00000 # [~4M]
libomx_aacdec_sharedlibrary.so 0xA5B00000 # [~2M]
libomx_amrdec_sharedlibrary.so 0xA5A00000 # [~1M]
libomx_amrenc_sharedlibrary.so 0xA5900000 # [~1M]
libomx_avcdec_sharedlibrary.so 0xA5800000 # [~1M]
libomx_avcenc_sharedlibrary.so 0xA5700000 # [???]
libomx_m4vdec_sharedlibrary.so 0xA5600000 # [~1M]
libomx_m4venc_sharedlibrary.so 0xA5500000 # [???]
libomx_mp3dec_sharedlibrary.so 0xA5400000 # [~1M]
libopencore_mp4local.so 0xA5200000 # [~2M]
libopencore_mp4localreg.so 0xA5100000 # [~1M]
libopencore_player.so 0xA4800000 # [~9M]
# opencore hardware support
libmm-adspsvc.so 0xA4700000 # [<64K]
libOmxCore.so 0xA4600000 # [<64K]
libOmxMpeg4Dec.so 0xA4500000 # [~1M]
libOmxH264Dec.so 0xA4400000 # [~1M]
libOmxVidEnc.so 0xA4300000 # [~1M]
libopencorehw.so 0xA4200000 # [~1M]
libOmxVdec.so 0xA4100000 # [~1M]
libmm-omxcore.so 0xA4000000 # [<64K]
# pv libraries
libopencore_common.so 0xA3900000 # [~7M]
libqcomm_omx.so 0xA3800000 # [<64K]
# stagefright libraries
libstagefright_amrnb_common.so 0xA3700000 # [~1M]
libstagefright_avc_common.so 0xA3600000 # [~1M]
libstagefright_color_conversion.so 0xA3500000 # [<64K]
libstagefright_omx.so 0xA3400000 # [~1M]
libstagefrighthw.so 0xA3300000 # [~1M]
libstagefright.so 0xA2F00000 # [~4M]
# libraries for specific hardware
libgsl.so 0xA2E00000 # [~1M]
libhtc_acoustic.so 0xA2D00000 # [<64K]
libhtc_ril.so 0xA2C00000 # [~1M]
liblvmxipc.so 0xA2B00000 # [~1M] for vendor/nxp
libreference-cdma-sms.so 0xA2A00000 # [<64K] for hardware/ril
# libraries for specific apps or temporary libraries
libcam_ipl.so 0x9F000000 # [???]
libwbxml.so 0x9EF00000 # [???]
libwbxml_jni.so 0x9EE00000 # [~1M]
libxml2wbxml.so 0x9EB00000 # [~1M]
libdrm1.so 0x9EA00000 # [~1M]
libdrm1_jni.so 0x9E900000 # [<64K]
libwapcore.so 0x9E800000 # [???]
libstreetview.so 0x9E700000 # [???]
libwapbrowsertest.so 0x9E600000 # [???]
libminiglobe.so 0x9E500000 # [???]
libearth.so 0x9E400000 # [???]
libembunit.so 0x9E300000 # [<64K]
libneon.so 0x9E200000 # [???]
libjni_example.so 0x9E100000 # [???]
libjni_load_test.so 0x9E000000 # [???]
libjni_lib_test.so 0x9DF00000 # [???]
librunperf.so 0x9DE00000 # [???]
libctest.so 0x9DD00000 # [<64K]
libUAPI_jni.so 0x9DC00000 # [???]
librpc.so 0x9DB00000 # [~1M]
libtrace_test.so 0x9DA00000 # [???]
libsrec_jni.so 0x9D800000 # [~2M]
libjpeg.so 0x9D700000 # [~1M]
libiprouteutil.so 0x9D600000 # [~1M] for external/iproute2
libnetlink.so 0x9D500000 # [<64K] for external/iproute2
libpagemap.so 0x9D400000 # [<64K] for system/extras/libpagemap
libstlport.so 0x9D100000 # [~3M] for external/stlport
libzxing.so 0x9D000000 # [<64K] for goggles
libinterstitial.so 0x9CF00000 # [<64K] for goggles
liblept.so 0x9CA00000 # [~5M] for external/leptonica
How to fix the camera:
http://forum.xda-developers.com/showpost.php?p=7405081&postcount=502 Drivers part
http://forum.xda-developers.com/showpost.php?p=7136150&postcount=447 Kernel part
---------------------
In case you don't want to do it yourself, you can just download this package, and flash it from recovery.
AOSP FROYO 2.2 v3.1
v3.1 - thanks to Jack for debugging it!
- Bootanimation is working!
- Wifi + Kernel from Cyanogen, as mine went boggus and I can't test it if it works without a device.
- Full APN list
- Known bugs: camera onscreen controls do FC sometimes. Switching from camera to camcorder works, but fc when reverting back.
v3
- Live wallpapers support.
- Sound recorder is now visible to the user to use.
- All available languages are included.
- Fixed missing sound files.
- Cyanogen's camera fixes are included. Really a pleasure to learn from what he has done!
v2.1
- Fixed camera - Use v2 and replace the boot.img with this one
What's on it:
v2
- Fixed GPS (was missing gps.conf + libgps.so was being allocated to wrong prelink).
- Fixed all prelink errors by mapping all the libraries to the correct mmap banks (edited build/core/prelink-linux-arm.map).
- Replaced Gallery3D (not complete at sources) by old enhanced Gallery (multitouch working!)
- Added the Text-To-Speech libraries from source (got those from sdk.mk)
- Fixed missing sounds (Lock.ogg and Unlock.ogg in OriginalSounds.mk)
- Camera still not working, but now we don't have a prelink error, so should be fixable by replacing liboemcamera.so by one that works - maybe Cyanogen's??)
- Bootanimation still not working... (i've looked into it and I can't figure out why it doesn't!)
v1
- AOSP 2.2 Froyo
- WiFi + Kernel 2.6.32 up and running.
- 3D Drivers
- JIT + JIT JSC enabled
- Multi-touch zoom on browser
Doesn't work:
- No boot animation, screen stays blank while booting but you can check it out using "adb logcat"
- Camera
- Gallery has missing mdpi graphics, I'll fix it later
thanks at all
Awesome, I'd love to start poking around with this.
Is there a way to flash an update with a camera fix on top of this?
Thanks for posting!
I never figured out how to add NCommander's hacked camera drivers that work with Eclair. If anyone knows how to do it, please share so that we can add it to the script. Maybe we can turn this script into something that will allow anyone build their own AOSP ROM
cant find package sun-java5-jdk...
ododoo said:
cant find package sun-java5-jdk...
Click to expand...
Click to collapse
Try it with whatever version comes with your Ubuntu. It's been a while since I had setup the system to compile and I have updated to Ubuntu 10.04 and it's compiling fine.
Just ignore that line
So actually everythings work except camera?
How is this in terms of speed? : D
dferreira said:
Try it with whatever version comes with your Ubuntu. It's been a while since I had setup the system to compile and I have updated to Ubuntu 10.04 and it's compiling fine.
Just ignore that line
Click to expand...
Click to collapse
Tnx! Works like a charm! How can you add apps and such?
Saving to: `signed-google_ion-ota-14721.zip'
100%[======================================>] 53*965*203 91,0K/s in 18m 50s
2010-06-17 23:30:19 (46,7 KB/s) - `signed-google_ion-ota-14721.zip' saved [53965203/53965203]
make: *** No rule to make target `installclean'. Stop.
make: *** No rule to make target `clean'. Stop.
./android.sh: line 27: repo: command not found
./android.sh: line 28: repo: command not found
./android.sh: line 32: build/envsetup.sh: No such file or directory
./android.sh: linje 35: cd: /home/ododoo/magicDroid/vendor/htc/sapphire-open/: No such file or directory
./android.sh: line 36: ./unzip-files.sh: No such file or directory
./android.sh: line 39: lunch: command not found
make: *** No targets specified and no makefile found. Stop.
./android.sh: linje 43: cd: /home/ododoo/magicDroid/out/target/product/sapphire-open/: No such file or directory
Your files ready for flashing are here:
ls: kan ikke åpne *.img: No such file or directory
Click to expand...
Click to collapse
Did not get any question about anything.. Made a .zip file, but not sure if i dare to flash it...
ododoo said:
Did not get any question about anything.. Made a .zip file, but not sure if i dare to flash it...
Click to expand...
Click to collapse
According to that output it did not create the img files you would need to flash. Looks like your missing some binaries required in the script.
ododoo said:
Did not get any question about anything.. Made a .zip file, but not sure if i dare to flash it...
Click to expand...
Click to collapse
The .zip you have there is later used to extract the proprietary drivers. The output is saying that you don't have "repo", which is the tool Google uses to control the source files. My guess is you skipped this:
Code:
cd ~
mkdir bin
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
PATH="$HOME/bin:$PATH"
DopyG said:
So actually everythings work except camera?
How is this in terms of speed? : D
Click to expand...
Click to collapse
The speed is not an issue. All the rest works, orientation, LED's etc. Only the camera doesn't because there is no open-source drivers for it on the repositories.
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl zlib1g-dev valgrind gcc-multilib g++-multilib x11proto-core-dev libx11-dev
Click to expand...
Click to collapse
this is the first line that works for me... Had to remove alot.
sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so
Click to expand...
Click to collapse
Does not work
[email protected]:~$ cd ~
[email protected]:~$ mkdir bin
mkdir: kan ikke opprette katalog «bin»: File exists
[email protected]:~$ curl http://android.git.kernel.org/repo >~/bin/repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 17211 0 17211 0 0 25840 0 --:--:-- --:--:-- --:--:-- 53952
[email protected]:~$ chmod a+x ~/bin/repo
[email protected]:~$
Click to expand...
Click to collapse
This is what i get..
Still get the same error when i try to compile.
Awesome work mate!
Two questions though.
1. Which Radio version is required?
2. Can I install the gapps from Cyanogenmod for instance?
Cheers,
Szusz
Szusz said:
Awesome work mate!
Two questions though.
1. Which Radio version is required?
2. Can I install the gapps from Cyanogenmod for instance?
Cheers,
Szusz
Click to expand...
Click to collapse
Any radio will work. And yes, you can add gapps add-on from Cyanogen if you wish.
ododoo said:
this is the first line that works for me... Had to remove alot.
Does not work
This is what i get..
Still get the same error when i try to compile.
Click to expand...
Click to collapse
Don't forget this:
PATH="$HOME/bin:$PATH"
So that Repo can be run by the script. I'll change the script to do this automatically for us.
Edit: Just updated the script, he checks for Repo, downloads it and sets it up for you now.
Thanks a lot for this!
Seems to be working now!
Edit: Too soon.....
Checking out files: 100% (641/641), done.g out files: 21% (136/641)
Syncing work tree: 48% (77/159) error: git checkout-index: unable to write file tessdata/chi_sim5.inttemp
error: git checkout-index: unable to write file tessdata/chi_sim5.ukai.tif
error: git checkout-index: unable to write file tessdata/chi_sim5.uming.tif
error: git checkout-index: unable to write file tessdata/chi_sim5.word-dawg
fatal: cannot create directory at 'tessdata/configs': No space left on device
Traceback (most recent call last):
File "/home/ododoo/magicDroid/.repo/repo/main.py", line 235, in <module>
_Main(sys.argv[1:])
File "/home/ododoo/magicDroid/.repo/repo/main.py", line 217, in _Main
repo._Run(argv)
File "/home/ododoo/magicDroid/.repo/repo/main.py", line 123, in _Run
cmd.Execute(copts, cargs)
File "/home/ododoo/magicDroid/.repo/repo/subcmds/sync.py", line 299, in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/ododoo/magicDroid/.repo/repo/project.py", line 638, in Sync_LocalHalf
self._InitWorkTree()
File "/home/ododoo/magicDroid/.repo/repo/project.py", line 1152, in _InitWorkTree
raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree
./android.sh: linje 35: cd: /home/ododoo/magicDroid/vendor/htc/sapphire-open/: No such file or directory
./android.sh: line 36: ./unzip-files.sh: No such file or directory
You're building on Linux
generic-eng simulator
Lunch menu... pick a combo:
1. generic-eng
2. simulator
Which would you like? [generic-eng] 1
find: `frameworks/base/api': No such file or directory
find: `frameworks/base/api': No such file or directory
find: `frameworks/base/api': No such file or directory
find: `frameworks/base/api': No such file or directory
find: `frameworks/base/api': No such file or directory
find: `frameworks/base/api': No such file or directory
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.1-update1
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
============================================
find: `frameworks/base/api': No such file or directory
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.1-update1
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
============================================
find: `frameworks/base/api': No such file or directory
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
Your version is: java version "1.6.0_18".
The correct version is: 1.5.
Please follow the machine setup instructions at
http://source.android.com/download
************************************************************
build/core/main.mk:111: *** stop. Stop.
./android.sh: linje 43: cd: /home/ododoo/magicDroid/out/target/product/sapphire-open/: No such file or directory
Your files ready for flashing are here:
ls: kan ikke åpne *.img: No such file or directory
[email protected]:~$
Click to expand...
Click to collapse
So close...
OK, compiled it (one note though, Ubuntu 10.4 uses OpenJava JDK instead of SunJava, so it has to be removed before compiling)
Got a lot of warnings and an error
Code:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar] Błąd 41
make: *** Oczekiwanie na niezakończone zadania....
elapsed seconds: 306
wrote generated Main_*.java files to out/host/linux-x86/obj/EXECUTABLES/vm-tests_intermediates/main_files
Your files ready for flashing are here:
boot.img ramdisk.img userdata.img
As you can see above there's no system.img file.
I belive that dferreira is using a 64bit OS and that's why the packages are like this
Code:
lib32readline5-dev lib32z-dev
so my apt line looks the one below (I'm on a 32bit OS; added a repo from Dapper Drake)
Code:
sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind libreadline5-dev gcc-multilib g++-multilib libc6-dev libncurses5-dev x11proto-core-dev libx11-dev libreadline5-dev libz-dev
I'm on a 2 core proc, so change the android.sh script to have
Code:
make -j2
Trying to compile for the second time. Didn't work.
Updated SunJava JDK to 1.5.18 and it did work. Created all img files properly. Flashed three mentioned in the first post to the phone and now waiting for about 5 minutes for the phone to boot up. Hopefully it will work.
Yes, I'm using 64bit version Ubuntu 10.04
@ododoo: Your download of the source code was interrupted for some reason, re-run the script until it finishes successfully.
@Szusz: I'll add your apt-get line to the initial post, so that others can follow. Can you tell me what you added to /etc/apt/sources.list from DDrake?
Another thing I feel I should mention. The rom has an unoptimized version of the linux kernel + wlan that matches it. This rom is intended to allow us to have up-to-date OS built from source, for development, not to be a speed rocket.

[Guide] Installing Debian on Android 4.2

Requirements:
An ARMv7 chipset (with VPFv3 if using armhf arch)
Loopback kernel support (if using img file as per this guide, otherwise could use dedicated partition on sdcard).
Rooted device
Busybox
Preparing an image:
On a linux machine setup filesystem for mounting on the android device, below I create a 2GB loopback image.
Code:
# dd if=/dev/zero of=wheezy-armhf.img bs=1M count=0 seek=2048
# mkfs.ext4 -F wheezy-armhf.img
# mount -o loop wheezy-armhf.img /debian
Now we populate the filesystem with the files to complete the debian installation.
Code:
# debootstrap --arch=armhf --variant=minbase --foreign wheezy /debian $DEBIANURL
# umount /debian
Complete installation:
Now on the android device we complete the debian installation.
Code:
# mount -o rw,remount rootfs /
# export LINUXROOT=/linux
# mkdir $LINUXROOT
# busybox mknod /dev/block/loop100 b 7 100
# losetup /dev/block/loop100 /path/to/wheezy-armhf.img
# mount -t ext4 /dev/block/loop100 $LINUXROOT
# busybox chroot $LINUXROOT /debootstrap/debootstrap --second-stage
# mount -t proc none $LINUXROOT/proc
# mount -t sysfs none $LINUXROOT/sys
# mount -o bind /dev $LINUXROOT/dev
# mount -t devpts none $LINUXROOT/dev/pts
Now you can setup any other mounts you want, for example I bind mount my external USB storage etc. Now to login to the debian environment and install ssh server:
Code:
# export TMPDIR=/tmp
# export USER=root
# export HOME=/root
# export SHELL=/bin/bash
# export TERM=linux
# export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin
# export LC_ALL=C
# export LANGUAGE=C
# export LANG=C
# busybox chroot $LINUXROOT /bin/bash
We are now inside debian envrionment and perform some first time setup:
Code:
# passwd root
# groupadd -g 3001 aid_net_bt_admin
# groupadd -g 3002 aid_net_bt
# groupadd -g 3003 aid_inet
# groupadd -g 3004 aid_net_raw
# groupadd -g 3005 aid_net_admin
# groupadd -g 3006 aid_net_bw_stats
# groupadd -g 3007 aid_net_bw_acct
# groupadd -g 3008 aid_net_bt_stack
# echo "deb $DEBIANURL wheezy main" >/etc/apt/sources.list
# apt-get update
# apt-get install openssh-server
# exit
# sync
Now have a SSH service running that allows to login via ssh. Note that if you wish to use networking for other user accounts add them to the aid_inet and aid_net_raw groups. For example for transmission I did:
Code:
# apt-get install transmission-daemon
# usermod -a -G aid_inet,aid_net_raw debian-transmission
# invoke-rc.d transmission-daemon restart
chroot: can't change root directory to '/debootstrap/debootstrap': No such file or di
Hi!
First, thanks for your guide, the only one I've seen for Android 4.2
So I have a nexus 4 on Android 4.3 with Paranoid Android custom ROM and rooted with busybox 1.21 JB bionic (included with the ROM). I've done all the steps above until chroot, which gave me an error:
Code:
[email protected]:/ # busybox chroot $LINUXROOT /debootstrap/debootstrap --second-stage
[COLOR="red"]E: No pkgdetails available; either install perl, or build pkgdetails.c from source[/COLOR]
1|[email protected]:/ #
So what now? how do I install Perl for android? Do I have to install microperl from busybox's site?
Please help me, I'm trying to install Debian for 4 days.
Pickout said:
Hi!
First, thanks for your guide, the only one I've seen for Android 4.2
So I have a nexus 4 on Android 4.3 with Paranoid Android custom ROM and rooted with busybox 1.21 JB bionic (included with the ROM). I've done all the steps above until chroot, which gave me an error:
Code:
[email protected]:/ # busybox chroot $LINUXROOT /debootstrap/debootstrap --second-stage
[COLOR="red"]E: No pkgdetails available; either install perl, or build pkgdetails.c from source[/COLOR]
1|[email protected]:/ #
So what now? how do I install Perl for android? Do I have to install microperl from busybox's site?
Please help me, I'm trying to install Debian for 4 days.
Click to expand...
Click to collapse
I have that same problem. Any solution by now?
Thanks.
m
mickmattes said:
I have that same problem. Any solution by now?
Thanks.
m
Click to expand...
Click to collapse
I'll look into it, but it sounds like it has not bootstrapped the image correctly.
Pickout said:
Hi!
First, thanks for your guide, the only one I've seen for Android 4.2
So I have a nexus 4 on Android 4.3 with Paranoid Android custom ROM and rooted with busybox 1.21 JB bionic (included with the ROM). I've done all the steps above until chroot, which gave me an error:
Code:
[email protected]:/ # busybox chroot $LINUXROOT /debootstrap/debootstrap --second-stage
[COLOR="red"]E: No pkgdetails available; either install perl, or build pkgdetails.c from source[/COLOR]
1|[email protected]:/ #
So what now? how do I install Perl for android? Do I have to install microperl from busybox's site?
Please help me, I'm trying to install Debian for 4 days.
Click to expand...
Click to collapse
No you don't need to install Perl. Something as gone wrong with one of the steps. I'll see what I can figure out. Are you using the armhf arch? Cause I could send you a premade image to see if that has any success for you.
Thanks for your help, I've finally found what's the problem (two weeks ago, I've forgotten this thread), but thanks!
(The problem was that the environment variables were not set up properly)
Thanks to these links, I've managed to install Debian 7 on a rooted Android phone. All credit goes to them:
http://linux-expert.net/?Trucs_et_astuces___Android___Tutoriel_%3A_Chroot_Debian (in french)
http://forum.xda-developers.com/showthread.php?p=45457799
http://forum.xda-developers.com/showthread.php?t=2312013
http://forum.xda-developers.com/showthread.php?t=631389
http://forum.xda-developers.com/showthread.php?t=1418546
http://forum.xda-developers.com/showpost.php?p=5671794&postcount=124
VNC
________________
I. On the PC
So first, you have to create the .img file that will contain the OS.
In a GNU/Linux environment (PC) and with the root permissions, type these commands:
Code:
# mkdir debian
# dd if=/dev/zero of=wheezy-armhf.img bs=1M count=0 seek=2048
[COLOR="Red"](NOTE: "of=" will be the name of our .img file and "seek=" the size of the file (MB). Here, we create a file named "wheezy-armhf.img" of 2 GB)[/COLOR]
# mkfs.ext4 -F wheezy-armhf.img
# mount -o loop wheezy-armhf.img /debian
Then we have to fill up the filesystem.
Code:
# debootstrap --foreign --arch=armhf wheezy debian/
# umount debian
Finally, move it to your SD Card. In my case, I moved it on /data/local/
II. On the phone
On your phone, in a terminal emulator and with the root permissions, type the following commands:
Code:
# mount -o rw,remount rootfs /
# export LINUXROOT=/linux
(NOTE: here we'll install Debian on the root of the internal memory, in "/", but we can also install Debian on the SD Card or in /data/loca/linux by changing the path after "LINUXROOT=")
# mkdir $LINUXROOT
# busybox mknod /dev/block/loop100 b 7 100
# losetup /dev/block/loop100 /sdcard/wheezy-armhf.img
# mount -t ext4 /dev/block/loop100 $LINUXROOT
# chroot $LINUXROOT /bin/sh
# export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# /debootstrap/debootstrap --second-stage
The debootstrap's second part should start. Grab a cup of coffee while it's working!
When it's finish, leave the chroot by typing
Code:
# exit
# su
Let's mount the filesystem. We're close!
Code:
# mount -t proc none /proc
# mount -t sysfs none /sys
# mount -o bind /dev /dev
# mount -t devpts none /dev/pts
Now, we have to set the environment variable. Ensure that you have set the correct path of LINUXROOT in case you've chosen another path than /linux.
Code:
# export LINUXROOT=/linux
# export TMPDIR=/tmp
# export USER=root
# export HOME=/root
# export SHELL=/bin/bash
# export TERM=linux
# export LC_ALL=C
# export LANGUAGE=C
# export LANG=C
And finally, chroot.
Code:
# chroot $LINUXROOT /bin/bash
su
Welcome on Debian!
III. DNS and Mirrors
Set a DNS. We'll set the free Google DNS but you can set yours if you want.
Code:
echo -e "domain local\nsearch local\n" >> /etc/resolv.conf
echo -e "# DNS Google\nnameserver 8.8.8.8\nnameserver 8.8.4.4\n" >> /etc/resolv.conf
You can add mirrors to your sources.list if you want. For my case, I'm french so I added french mirrors:
Code:
# echo -e "## Debian Wheezy sources.list\n\n" > /etc/apt/sources.list
# echo -e "## Debian.org FR mirror\ndeb http://ftp.fr.debian.org/debian/ wheezy main contrib non-free\ndeb-src http://ftp.fr.debian.org/debian/ wheezy main contrib non-free\n\n" >> /etc/apt/sources.list
# echo -e "## Debian security updates\ndeb http://security.debian.org/ wheezy/updates main contrib non-free\ndeb-src http://security.debian.org/ wheezy/updates main contrib non-free\n >> /etc/apt/sources.list
IV. VNC
To access your Debian in a graphical environment from your PC or your phone, you have to set up a VNC Server and install a Desktop Environment. Let's install VNC and LXDE.
We'll follow the steps described on the LXDE wiki:
Code:
su
# apt-get update
# apt-get install lxde
# apt-get install tightvncserver
Set up the VNC server by typing the following command, which will ask you to set two passwords (let the second password if you want):
Code:
# vncserver
Kill the session:
Code:
# vncserver -kill :1
Go to /root/.vnc/ and edit the xstartup file: comment out #/etc/X11/xsession and add these two lines:
icewm
lxsession
Click to expand...
Click to collapse
To start a VNC session, type "vncserver -geometry <HEIGHT>x<WIDTH>". For the Nexus 4, we would type "vncserver -geometry 1184x768"
To access your Desktop Environment from your phone, download android-vnc-viewer and launch it.
In the password field, type your password. In the address field, type "127.0.0.1", in port type "5901" and select 24-bit color (4bpp).
V. Script
I've made three scripts to mount, launch and unmount Debian. Whenever you reboot your phone, you'll have to mount Debian, set the environment variables and chroot.
VI. Credit
All credit goes to them:
http://linux-expert.net/?Trucs_et_astuces___Android___Tutoriel_%3A_Chroot_Debian (in french)
http://forum.xda-developers.com/showthread.php?t=2312013
http://forum.xda-developers.com/showthread.php?t=631389
http://forum.xda-developers.com/showthread.php?t=1418546
http://forum.xda-developers.com/showpost.php?p=5671794&postcount=124
VNC
Sorry for my bad english
Thanks for your work and solution. However I did not try it yet, because I'm trying to do it with the following solution. Perhaps I'll do this one next weekend
http://whiteboard.ping.se/Android/Debian
I really like the idea of it.
Just have a look.
P.S: By the way, I'm running Pacman-Rom (4.3) and it seems to work, if you flash googy-Kernel or some other Kernel. CM-Kernel has
some kind of SElinux restriction, which prevents you from changing the debian root password.
Wow, it sounds amazing! I will sure give it a try next week too.
Thanks for the link!
Pickout said:
Wow, it sounds amazing! I will sure give it a try next week too.
Thanks for the link!
Click to expand...
Click to collapse
I got stuck in a bootloop after flashing. I'm quite sure, that I did everything correctly...
I think my Pacman-Rom (JB 4.3) is to blame.
Thanks for the guide, was looking for something like this. I tried it first on an SD card formatted to ext4 (wanted a larger than 4GB .img file) but it failed to work. Went back to fat32 and for now kept a 4GB .img and after following you guide, it worked perfectly.
Where can I find the img ?
Hello,
Thanks for this how too!!
But where can I find the img ? wheezy-armhf.img ?
Thanks for your help,
Cheers,
Mat
matthieuDroid said:
Hello,
Thanks for this how too!!
But where can I find the img ? wheezy-armhf.img ?
Thanks for your help,
Cheers,
Mat
Click to expand...
Click to collapse
you make it yourself: the dd-command in the beginning creates a file called wheezy-armhf.img and fills it with zeros.
need enlightenment
hello,
i'm follow the instruction but get stuck with
# chroot $LINUXROOT /bin/sh
chroot: can't execute 'bin/sh': No such file or directory
Click to expand...
Click to collapse
pls help
i'm using galaxy note 3 n900 with armv7

[GUIDE] How to build CWM-based Recovery from source in Ubuntu LTS with CM-11.0

I know there are so many guides about building recovery from source, but from my perspective they are incomplete or quite old. There are some parts missing like how to set up a device tree, and others.
I wanted to write this guide to help people to build by themself a Clockworkmod or other custom recovery.
I will not reproduce the good informations from other guides, instead I will post the links to them, and I will highlight those parts that I consider are missing. And extra, I provided specific informations for MTK phones; for easy separation the text for MTK is colored in DarkRed. If your phone is not MTK powered you can skip those parts.
One important note: my guide will cover only the building of recovery from source, not the full ROM, but it can be used as start, or base for further development.
For start you need a PC with ubuntu 12.04 or 14.04 x64 installed (or use a virtual machine) - this is the recommended distribution on Android official guide. You can follow that guide to setup the building environment. In the same time, I have few things to add up, so at every step in that guide take a look here too.
Other things you need:
- A good configuration for your computer (you can't do these things with a bad computer);
- Geany software or a good IDE;
- a stock boot.img for your phone;
- a stock recovery.img for your phone;
- unpack-repack CarlivImageKitchen;
Credits:
- Clockworkmod;
- Cyanogenmod;
- bgcngm for his mtk tools;
- chrmhoffmann for the custom boot image maker;
- Android-Dls;
IMPORTANT:
I used a real making example during the guide, recreating all steps for my phone, for images. So, when you follow my guide keep in mind that "carliv" is my username and you should use yours; "lenovo" is my phone brand/manufacturer and you should use yours; "P780" is my phone model and you should use yours.
So, where you see that in examples, codes or commands, don't copy from here and paste in your terminal. First copy them in a text editor, change these data with yours and after that copy and paste in terminal - if you don't want to type much.
First open a terminal window and type this:
Code:
sudo apt-get update
If you have installed the latest Ubuntu 12.04.5 x64 with latest HWE stack, instead of the resources listed on Android guide, use these:
Code:
sudo apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev libreadline6-dev libgl1-mesa-dri-lts-trusty:i386 libgl1-mesa-dev-lts-trusty g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 lzop ccache gnupg python gcc g++ cpp
and:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Then install this:
Code:
sudo apt-get install ia32-libs
If you have installed the latest Ubuntu 14.04.1 x64, instead of the resources listed on Android guide, use these:
Code:
sudo apt-get install bison g++-multilib git gperf libxml2-utils
then
Code:
sudo apt-get install gnupg ccache lzop flex 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 mingw32 tofrodos python-markdown xsltproc libreadline6-dev lib32readline-gplv2-dev libncurses5-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev squashfs-tools pngcrush pngquant schedtool dpkg-dev
and:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
For 51-android.rules:
For USB rules check here to see how they look for google devices and here to see a list with vendor Ids for different brands and here for a cyanogenmod template.
MTK
- if you use a MTK device add these lines to that file too:
Code:
#MTK
SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", MODE="0666", GROUP="plugdev", OWNER="your_username"
#MTK adb and mass storage
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", [COLOR="Red"]ATTR{idProduct}=="0c03"[/COLOR], MODE="0666", GROUP="plugdev", OWNER="your_username"
Why you need to add idProduct as well? Because idVendor "0bb4" is already used by HTC, and that will make the difference between the two.
Attached is my 51-android.rules file.
Next, download Android-sdk and unpack it in your home directory:
Code:
tar xzf $HOME/Downloads/android-sdk_[COLOR="Red"]rxx[/COLOR]-linux.tgz
where "rxx" is the release name (current is r24.0.2, but check the number when you download it, because it will be changed probably), and rename android-sdk-linux folder as android-sdk, or what name you want (keep in mind that this will be added in bashrc file in path), then in tools subfolder double click "android" script to start it (select run, not run in terminal) and install at least one android platform, to get sdk tools like adb, fastboot, etc.
For java I have my way. Because of the new instructions for openjdk in Android source, and because the new cyanogenmod 12 requires that too, I will present a new way of setting java.
Old way dual java:
MTK:
In official guide is recommended openjdk-7, but if you want to build for MTK phones and you have access to full building sources, you will notice that openjdk is not supported; in fact you will see exact this error message:
Code:
"openjdk is not supported" and "FAIL"
First uninstall in synaptic package manager the libreoffice completely, because if you don't you will not be able to uninstall openjdk (libreoffice requires java, and if you uninstall openjdk7 it will be a prompt to install openjdk6 and viceversa). This is a computer for building not office, but if you need an office solution try WPS Office for linux, or install abiword and gnumeric. After that remove completely openjdk and icedtea plugins:
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea-6-\* icedtea-7-\*
and check if there is any trace left:
Code:
sudo dpkg --list | grep -i jdk
Next go to this page and download jdk-7u67-linux-x64.tar.gz and jdk-6u45-linux-x64.bin.
Move both in your home folder (/home/username), or use
Code:
mv $HOME/Downloads/jdk-7u67-linux-x64.tar.gz $HOME && mv $HOME/Downloads/jdk-6u45-linux-x64.bin $HOME
After that use these commands to install java:
Code:
sudo mkdir -p /opt/java
Code:
sudo tar -zxf jdk-7u67-linux-x64.tar.gz -C /opt/java
Code:
chmod u+x jdk-6u45-linux-x64.bin
Code:
./jdk-6u45-linux-x64.bin
Code:
sudo mv jdk1.6.0_45 /opt/java
Code:
sudo rm jdk-6u45-linux-x64.bin jdk-7u67-linux-x64.tar.gz
At this point java is installed in /opt/java folder, but you need to setup java alternatives.
Type these one by one:
Code:
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.7.0_67/bin/java" 1
Code:
sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/java/jdk1.7.0_67/bin/javac" 1
Code:
sudo update-alternatives --install "/usr/bin/javadoc" "javadoc" "/opt/java/jdk1.7.0_67/bin/javadoc" 1
Code:
sudo update-alternatives --install "/usr/bin/javah" "javah" "/opt/java/jdk1.7.0_67/bin/javah" 1
Code:
sudo update-alternatives --install "/usr/bin/javap" "javap" "/opt/java/jdk1.7.0_67/bin/javap" 1
Code:
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/java/jdk1.7.0_67/bin/javaws" 1
That will setup jdk 1.7 as your main java alternative, but if you need to work with jdk 1.6, type these too:
Code:
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.6.0_45/bin/java" 2
Code:
sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/java/jdk1.6.0_45/bin/javac" 2
Code:
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/java/jdk1.6.0_45/bin/javaws" 2
For building with jdk 1.6, these three are all you need.
Check again the java alternatives:
Code:
ls -la /etc/alternatives/java*
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
If they are not all with jdk 1.7, which will be your main java jdk (required by kitkat, or latest apktool), use these to select jdk 1.7:
Code:
sudo update-alternatives --config java
Code:
sudo update-alternatives --config javac
Code:
sudo update-alternatives --config javaws
Other thing you can do is to install java plugin for your browsers (not building related, but useful):
Code:
sudo ln -s /opt/java/jdk1.7.0_67/jre/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins/libnpjp2.so
Code:
sudo ln -s /opt/java/jdk1.7.0_67/jre/lib/amd64/libnpjp2.so /usr/lib/chromium-browser/plugins/libnpjp2.so
Code:
sudo ln -s /opt/java/jdk1.7.0_67/jre/lib/amd64/libnpjp2.so /usr/lib/opera/plugins/libnpjp2.so
That depends on what browser you have installed.
So, if you have to build with jdk 1.6, update those three alternatives and also in bashrc file comment "export JAVA_HOME" for jdk 1.7, and uncomment for jdk 1.6:
Code:
export JAVA_HOME=/opt/java/jdk1.6.0_45
[COLOR="Red"]#[/COLOR] export JAVA_HOME=/opt/java/jdk1.7.0_67
Everything else remain the same. Then reboot and you will be using jdk 1.6 for building. Same to revert.
Ok, you have dual java on your computer.
Ah, if you see in terminal an error like this:
Code:
(gedit:7129): Gtk-CRITICAL **: gtk_tree_selection_get_selected: assertion `GTK_IS_TREE_SELECTION (selection)' failed
when you close the gedit with bashrc file, then open again gedit with this command in terminal:
Code:
sudo gedit
in Edit menu, open Preferences > Plugins and deselect File Browser Panel plugin. Next time you open gedit in terminal you won't see that error anymore.
For removing these manual java installations, type these commands one by one:
Code:
sudo rm -rf /opt/java/jdk1.6.0_45
sudo rm -rf /opt/java/jdk1.7.0_67
sudo update-alternatives --remove "java" "/usr/bin/java"
sudo update-alternatives --remove "javac" "/usr/bin/javac"
sudo update-alternatives --remove "javadoc" "/usr/bin/javadoc"
sudo update-alternatives --remove "javah" "/usr/bin/javah"
sudo update-alternatives --remove "javap" "/usr/bin/javap"
sudo update-alternatives --remove "javaws" "/usr/bin/javaws"
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javadoc
sudo update-alternatives --config javah
sudo update-alternatives --config javap
sudo update-alternatives --config javaws
sudo rm /usr/lib/mozilla/plugins/libnpjp2.so
sudo rm /usr/lib/chromium-browser/plugins/libnpjp2.so
sudo rm /usr/lib/opera/plugins/libnpjp2.so
and delete from bashrc file
Code:
#export JAVA_HOME=/opt/java/jdk1.6.0_45
export JAVA_HOME=/opt/java/jdk1.7.0_67
Then reinstall openjdk-7 and icedtea plugin:
Code:
sudo apt-get update
sudo apt-get install openjdk-7-jdk icedtea-netx
You can use OpenJDK 7 now, if you are not building for MTK phones.
For those of you that need to use either sun jdk 1.6 or 1.7, you have to install it manually as I show above. Then, after installation, you don't have to add it to java alternatives, since the MTK building source doesn't care about your path. Instead you have to edit "mbldenv.sh" file and to replace the java path with yours.
Although, if you want you can use jdk 1.7 or 1.6 in dual setup with openjdk-7. Just install these two alternatives:
Code:
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.7.0_67/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/java/jdk1.7.0_67/bin/javac" 1
or
Code:
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.6.0_45/bin/java" 2
sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/java/jdk1.6.0_45/bin/javac" 2
and ad it to bashrc file in path:
Code:
#export JAVA_HOME=/opt/java/jdk1.7.0_67
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
or
Code:
#export JAVA_HOME=/opt/java/jdk1.6.0_45
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
switching between the two with these:
Code:
sudo update-alternatives --config java
sudo update-alternatives --config javac
and editing the path in bashrc, then restart the computer. Same to revert.
Next you need to add java in your path. In Android guide for setup building environment you can see how to create the bin folder for repo file. Then how to add that folder in path. We will complete that now:
Code:
sudo gedit ~/.bashrc
And at the end add these:
Code:
export PATH=~/bin:$PATH
#export JAVA_HOME=/opt/java/jdk1.7.0_67
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export JRE_HOME=JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
export PATH=$HOME/bin:$HOME/android-sdk/platform-tools/:$HOME/android-sdk/tools:$PATH
export USE_CCACHE=1
To check if java is installed and is in path type these in terminal:
Code:
java -version
which java
echo $JAVA_HOME
You can see here also the android sdk path, which I named android-sdk/, usually is android-sdk-linux/. You need sdk for adb and fastboot to work. And, if you have only OpenJDK, remove the jdk 1.7 line.
This is a complete building environment set up.
Sync a building repo.
Since we are talking about compiling CWM based recovery, or official CWM, we will move to cyanogenmod guide.
So do what they say to sync the cm-11.0 repo. I usually do this in a folder named CM11-0, but you can use what name you want, or as they say "/android/system". Wait to finish the repo sync (depends on internet connection, computer performances, etc) - for me it takes about four hours.
A side note: most of the Custom Android ROMs have an instruction on manifest with default number of jobs for repo sync. Something like this:
Code:
<default revision="refs/heads/cm-11.0"
remote="github"
sync-c="true"
sync-j=[COLOR="Red"]"4"[/COLOR] />
But during sync process you will see sometimes "curl errors" about not permitting clone bundle. That's because google sources refuses jobs setted up to high. You have an option: after all sync process is done, run a repo sync again, but overwriting the number of jobs:
Code:
repo sync -j1
This is permitted by google git repositories and it will fix any missing sources in your cloned repo. Don't do it from start because it will take forever to download the sources. Do it like I said only after first repo sync is finished.
AMENDMENT:
OpenJDK 7 is now recommended inAndroid and mandatory in cyanogenmod 12, but will throw an error in cyanogenmod 11. A solution can be to edit /build/core/main.mk file in cyanogenmod 11 building tree, and to add new java check requirements. Instead of this:
Code:
# Check for the correct version of java
java_version := $(shell java -version 2>&1 | head -n 1 | grep '^java .*[ "]1\.[67][\. "$$]')
ifneq ($(shell java -version 2>&1 | grep -i openjdk),)
java_version :=
endif
ifeq ($(strip $(java_version)),)
$(info ************************************************************)
$(info You are attempting to build with an unsupported version)
$(info of java.)
$(info $(space))
$(info Your version is: $(shell java -version 2>&1 | head -n 1).)
$(info The correct version is: Java SE 1.6 or 1.7.)
$(info $(space))
$(info Please follow the machine setup instructions at)
$(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html)
$(info ************************************************************)
endif
# Check for the correct version of javac
javac_version := $(shell javac -version 2>&1 | head -n 1 | grep '[ "]1\.[67][\. "$$]')
ifeq ($(strip $(javac_version)),)
$(info ************************************************************)
$(info You are attempting to build with the incorrect version)
$(info of javac.)
$(info $(space))
$(info Your version is: $(shell javac -version 2>&1 | head -n 1).)
$(info The correct version is: 1.6 or 1.7.)
$(info $(space))
$(info Please follow the machine setup instructions at)
$(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html)
$(info ************************************************************)
$(error stop)
endif
to add this:
Code:
java_version_str := $(shell unset _JAVA_OPTIONS && java -version 2>&1)
javac_version_str := $(shell unset _JAVA_OPTIONS && javac -version 2>&1)
# Check for the correct version of java, should be 1.7 by
# default, and 1.6 if LEGACY_USE_JAVA6 is set.
ifeq ($(LEGACY_USE_JAVA6),)
required_version := "1.7.x"
required_javac_version := "1.7"
java_version := $(shell echo '$(java_version_str)' | grep '^java .*[ "]1\.7[\. "$$]')
javac_version := $(shell echo '$(javac_version_str)' | grep '[ "]1\.7[\. "$$]')
else # if LEGACY_USE_JAVA6
required_version := "1.6.x"
required_javac_version := "1.6"
java_version := $(shell echo '$(java_version_str)' | grep '^java .*[ "]1\.6[\. "$$]')
javac_version := $(shell echo '$(javac_version_str)' | grep '[ "]1\.6[\. "$$]')
endif # if LEGACY_USE_JAVA6
ifeq ($(strip $(java_version)),)
$(info ************************************************************)
$(info You are attempting to build with the incorrect version)
$(info of java.)
$(info $(space))
$(info Your version is: $(java_version_str).)
$(info The required version is: $(required_version))
$(info $(space))
$(info Please follow the machine setup instructions at)
$(info $(space)$(space)$(space)$(space)https://source.android.com/source/initializing.html)
$(info ************************************************************)
$(error stop)
endif
# Check for the current JDK.
#
# For Java 1.7, we require OpenJDK on linux and Oracle JDK on Mac OS.
# For Java 1.6, we require Oracle for all host OSes.
requires_openjdk := false
ifeq ($(LEGACY_USE_JAVA6),)
ifeq ($(HOST_OS), linux)
requires_openjdk := true
endif
endif
# Check for the current jdk
ifeq ($(requires_openjdk), true)
# The user asked for java7 openjdk, so check that the host
# java version is really openjdk
ifeq ($(shell echo '$(java_version_str)' | grep -i openjdk),)
$(info ************************************************************)
$(info You asked for an OpenJDK 7 build but your version is)
$(info $(java_version_str).)
$(info ************************************************************)
$(error stop)
endif # java version is not OpenJdk
else # if requires_openjdk
ifneq ($(shell echo '$(java_version_str)' | grep -i openjdk),)
$(info ************************************************************)
$(info You are attempting to build with an unsupported JDK.)
$(info $(space))
$(info You use OpenJDK but only Sun/Oracle JDK is supported.)
$(info Please follow the machine setup instructions at)
$(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html)
$(info ************************************************************)
$(error stop)
endif # java version is not Sun Oracle JDK
endif # if requires_openjdk
# Check for the correct version of javac
ifeq ($(strip $(javac_version)),)
$(info ************************************************************)
$(info You are attempting to build with the incorrect version)
$(info of javac.)
$(info $(space))
$(info Your version is: $(javac_version_str).)
$(info The required version is: $(required_javac_version))
$(info $(space))
$(info Please follow the machine setup instructions at)
$(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html)
$(info ************************************************************)
$(error stop)
endif
but I can't tell you it will work flawless, since I can't test the building of a full ROM (for recovery it works without problems).
Set up a device tree.
Of course if you don't have one, because nobody created it before.
Following the clockworkmod guide, you can see how to start this by using mkvendor.sh script.
So place the recovery.img from your stock ROM in that repo folder (CM11-0 for me), and let's take as example my phone Lenovo P780.
With any root explorer take a look at build.prop from "system" and notice these lines:
Code:
ro.product.manufacturer=[COLOR="Red"]LENOVO[/COLOR]
ro.product.device=[COLOR="Red"]P780[/COLOR]
I have lenovo (I will use lower-case) and P780.
And the command will be
Code:
./build/tools/device/mkvendor.sh lenovo P780 recovery.img
But, at this point I always get an error message:
Code:
"[COLOR="Red"]unpackbootimg[/COLOR] not found. Is your android build environment set up and have the host tools been built?"
In that guide they say to do
Code:
. build/envsetup.sh
make -j4 otatools
in cm11 folder, and the unpackbootimg will be compiled. What they don't say (or I never found it) is that even after otatools are created, that error still appear. And if we take a look in the script, we see it is searching for unpakbootimg executable:
Code:
UNPACKBOOTIMG=[COLOR="Red"]$(which unpackbootimg)[/COLOR]
The which command won't display anything if the module is not in path. So either you add "$HOME/CM11_folder/out/host/linux-x86/bin" in path, or run this in terminal after otatools make is finished:
Code:
cp $HOME/CM11_folder/out/host/linux-x86/bin/unpackbootimg $HOME/bin
where CM11_folder is the name of the folder with cm-11.0 building tree. After that the unpackbootimg will be in bin folder, which is in path, and everytime you need to run it, will be found. You can check that in terminal typing
Code:
which unpackbootimg
Now back to my example for device tree. Open a terminal window in CM11-0 folder, or open terminal and type
Code:
cd CM11-0
then type that command to create the device tree.
Code:
./build/tools/device/mkvendor.sh lenovo P780 recovery.img
After script is executed you will see the new device folder in device list, lenovo with subfolder P780.
For a regular phone that will be ok, and you can start working on that device tree,
but for a MTK phone that is not good.
Why? Because MTK use a header appended to kernel and ramdisk, and the script won't be able to properly unpack it.
It will be an error about ramdisk not being in gzip format for a MTK phone.
The result will be that instead of real recovery.fstab and some other data in device tree files, we will get generic default values. As an example, this is the recovery.fstab I've got for my phone after that command:
Code:
# mount point fstype device [device2]
/boot mtd boot
/cache yaffs2 cache
/data yaffs2 userdata
/misc mtd misc
/recovery mtd recovery
/sdcard vfat /dev/block/mmcblk0p1 /dev/block/mmcblk0
/system yaffs2 system
/sd-ext ext4 /dev/block/mmcblk0p2
That is not the real one (my device is emmc not mtd type) and so, for MTK phones, we need to do some extra things. First get my CarlivImageKitchen and unpack it somewhere in your home folder. The utility contains few unpack and repack scripts for boot/recovery images created using instructions from here.
Then copy the stock recovery image to those utilities folder and open a terminal window in it.
Type
Code:
./unpack_MTK_img recovery.img
What you have to do now is to repack the recovery using the regular script instead of MTK script (CarlivImageKitchen strips off the Mediatek header during unpack).
So, just type
Code:
./repack_img recovery
and choose the name recovery for the new image.
At the end take the recovery.img an move it to cm11-0 folder.
Back to cm11 folder, open a terminal window and type mkvendor command
Code:
./build/tools/device/mkvendor.sh lenovo P780 recovery.img
The result? Well take a look at this recovery.fstab:
Code:
boot /boot emmc defaults defaults
/dev/block/mmcblk0p2 /cache ext4 defaults defaults
/dev/block/mmcblk0p3 /data ext4 defaults defaults
misc /misc emmc defaults defaults
recovery /recovery emmc defaults defaults
/dev/block/mmcblk0p4 /sdcard vfat defaults defaults
/dev/block/mmcblk0p6 /system ext4 defaults defaults
This is the real one from stock recovery. It can't be used for CWM but it proves that the ramdisk was unpacked correct.
Anyway this is only the beginning, because we need to check every file from device tree and to add some files too.
This part is universal, not only for MTK phones.
At this point the device folder looks like this.
First we need to create a new file, vendorsetup.sh with this content:
Code:
add_lunch_combo cm_P780-eng
or copy one from an existent device tree, changing the device name with yours.
Actually entire file looks like this:
Code:
#
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This file is executed by build/envsetup.sh, and can use anything
# defined in envsetup.sh.
#
# In particular, you can add lunch options with the add_lunch_combo
# function: add_lunch_combo generic-eng
add_lunch_combo cm_P780-eng
This will add your device in lunch options, and will be initialized by build/envsetup.sh command. It should work even without it, but is better to create this script: the official clockworkmod guide says - " It is used to add non-standard lunch combos to the lunch menu.".
Next you have to change AndroidBoard.mk to Android.mk and instead of
Code:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
ALL_PREBUILT += $(INSTALLED_KERNEL_TARGET)
# include the non-open-source counterpart to this file
-include vendor/lenovo/P780/AndroidBoardVendor.mk
it should contain this
Code:
#
# Copyright (C) 2013 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# WARNING: Everything listed here will be built on ALL platforms,
# including x86, the emulator, and the SDK. Modules must be uniquely
# named (liblights.tuna), and must build everywhere, or limit themselves
# to only building on ARM if they include assembly. Individual makefiles
# are responsible for having their own logic, for fine-grained control.
LOCAL_PATH := $(call my-dir)
ifeq ($(TARGET_DEVICE),P780)
include $(call all-makefiles-under,$(LOCAL_PATH))
endif
AndroidProducts.mk file is ok as it is and we will let BoardConfig.mk for the end.
Let's create first a folder "prebuilt" and move the kernel in it. Then a new folder "recovery" and move recovery.fstab in it.
Then cm.mk file can remain as it is for building recovery, so let's open device_YOURPHONE.mk (in my case device_P780.mk) - all editing must be made with a good editor (IDE) - I'm using Geany. You can see the kernel is called from device folder, but you moved it in prebuilt folder so change this
Code:
LOCAL_PATH := device/lenovo/P780
to this
Code:
LOCAL_PATH := device/lenovo/P780/prebuilt
Also here you can add rules for files that have to be copied in built recovery ramdisk, or aditional lines to default prop file.
Like this:
Code:
ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=0 \
ro.allow.mock.location=1 \
persist.mtk.aee.aed=on \
ro.debuggable=1 \
persist.service.acm.enable=0 \
persist.sys.usb.config=mass_storage \
ro.bootloader.mode=download \
ro.mount.fs=EXT4 \
ro.persist.partition.support=no
or if you don't want those unuseful goldfish things in ramdisk, add this too:
Code:
PRODUCT_COPY_FILES_OVERRIDES += \
root/fstab.goldfish \
root/init.goldfish.rc \
recovery/root/fstab.goldfish
You have to know that in cm11 any file that starts with init will be deleted from root of ramdisk as we can see in /build/core/Makefile:
Code:
@echo -e ${CL_CYN}"Modifying ramdisk contents..."${CL_RST}
$(hide) [COLOR="Red"]rm -f $(TARGET_RECOVERY_ROOT_OUT)/init*.rc[/COLOR]
So if you want to add some init files in recovery ramdisk root (init.usb.rc or init.ssd.rc, etc.) there is another way. For cm11, you have to create a subfolder "recovery" in device tree - which you did already, and in that folder to create subfolders that match recovery ramdisk folders (ex. etc, res, sbin...), and for files that have to be in root create a root subfolder. The building process will take those, if they are in res or root subfolder and place them in corresponding folders in recovery ramdisk. for the other subfolders (etc, sbin) you have to create an Android.mk file in recovery folder defining every file as local module and to use device_xxxx.mk to add them as product packages. This method with locale module is also recommended for boot image ramdisk. For building recovery we don't need that, but I mention it for further developments.
Now it's time to add some files in recovery folder. A custom init.rc and fstab, named after your hardware: if it is qualcomm will be init.qualcomm.rc and fstab.qualcomm, if it is a MTK phone will be init.mt6589.rc and fstab.mt6589 or whatever is your MTK hardware, and so on. This fstab will be placed in /recovery/root folder and init file will remain in recovery folder. Another way is to name init.{hardware}.rc as init.recovery.{hardware}.rc and to place it in /recovery/root folder too, and to not use a custom init.rc for recovery, because that one will be called in default init.rc, but I prefer only one init.rc file in ramdisk.
For the fstab you have to unpack a stock boot.img for your phone. Using CarlivImageKitchen from before, copy your boot.img in that folder and type:
Code:
./unpack_img boot.img
or if your phone is a MTK powered one, type this
Code:
./unpack_MTK_img boot.img
Open the ramdisk folder and copy the fstab file to your device /recovery/root folder and then rename it as I said before - fstab.{hardware}. Then go to cm11 building tree folder, open /bootable/recovery/etc folder and copy init.rc file to your device /recovery folder, then change the name to init.{hardware}.rc.
Since the recovery in cm11 is using the fstab version 2, you can use same content for fstab.{hardware} and recovery.fstab, but this content is specific to your device. Try to find on github a device folder for a phone with same platform CPU and take a look, then compare with your stock fstab and try to find in your phone with a root explorer the correct paths for partitions. This one can't be standardized. As an example here is a fstab for a HTC M7:
Code:
# Copyright (C) 2014 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#<src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>
#/dev/block/platform/msm_sdcc.1/by-name/dsps /firmware_dsps vfat ro,shortname=lower wait
/dev/block/platform/msm_sdcc.1/by-name/radio /firmware_radio vfat ro,shortname=lower wait
/dev/block/platform/msm_sdcc.1/by-name/adsp /firmware_q6 vfat ro,shortname=lower wait
#/dev/block/platform/msm_sdcc.1/by-name/wcnss /firmware_wcnss vfat ro,shortname=lower wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/misc /misc emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/devlog /devlog ext4 noatime,nosuid,nodev,barrier=0 wait
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,noatime,barrier=0 wait
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=0 wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,noauto_da_alloc,barrier=0 wait,encryptable=/dev/block/platform/msm_sdcc.1/by-name/extra
# SD card
/devices/platform/msm_sdcc.1/mmc_host/mmc0 auto auto defaults voldmanaged=sdcard0:36,noemulatedsd
# USB storage
/devices/platform/msm_hsusb_host/usb auto auto defaults voldmanaged=usbdisk:auto
and this is the recovery.fstab for my MTK Lenovo P780
Code:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/[email protected] /system ext4 ro,noatime wait
/[email protected] /cache ext4 noatime,nosuid,nodev,noauto_da_alloc wait
/[email protected] /data ext4 noatime,nosuid,nodev,noauto_da_alloc wait,encryptable=footer
# vold-managed volumes
/devices/platform/mtk-msdc.0/mmc_host/mmc0 auto auto defaults voldmanaged=sdcard1:8,
/devices/platform/mtk-msdc.1/mmc_host/mmc1 auto auto defaults voldmanaged=sdcard0:auto
/dev/bootimg /boot emmc defaults defaults
/dev/nvram /nvram emmc defaults defaults
/dev/recovery /recovery emmc defaults defaults
/dev/uboot /uboot emmc defaults defaults
/dev/misc /misc emmc defaults defaults
in fstab.mt6589 It has two more partitions (security)
Code:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/[email protected] /system ext4 ro,noatime wait
/[email protected] /cache ext4 noatime,nosuid,nodev,noauto_da_alloc wait
/[email protected] /data ext4 noatime,nosuid,nodev,noauto_da_alloc wait,encryptable=footer
[COLOR="Red"]/[email protected]_f /protect_f ext4 noatime,nosuid,nodev,noauto_da_alloc wait,check
/[email protected]_s /protect_s ext4 noatime,nosuid,nodev,noauto_da_alloc wait,check[/COLOR]
# vold-managed volumes
/devices/platform/mtk-msdc.0/mmc_host/mmc0 auto auto defaults voldmanaged=sdcard0:8
/devices/platform/mtk-msdc.1/mmc_host/mmc1 auto auto defaults voldmanaged=sdcard1:auto
/devices/platform/mt_usb/sda/sda1 auto auto defaults voldmanaged=usbotg:auto
/dev/bootimg /boot emmc defaults defaults
/dev/nvram /nvram emmc defaults defaults
/dev/recovery /recovery emmc defaults defaults
/dev/uboot /uboot emmc defaults defaults
/dev/misc /misc emmc defaults defaults
but the rest is the same with recovery.fstab. So, this is something you have to figure out by yourself from your device. Here is another example for a MTK phone with Ubifs file system:
Code:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/[email protected] /system ubifs ro,noatime wait
/[email protected] /cache ubifs noatime,nosuid,nodev,noauto_da_alloc wait
/[email protected] /data ubifs noatime,nosuid,nodev,noauto_da_alloc wait,encryptable=footer
# vold-managed volumes
/devices/platform/mtk-msdc.0/mmc_host/mmc0 auto auto defaults voldmanaged=sdcard0:8,
/devices/platform/mtk-msdc.1/mmc_host/mmc1 auto auto defaults voldmanaged=sdcard1:auto
/dev/mtd/mtd6 /boot mtd defaults defaults
/dev/mtd/mtd2 /nvram mtd defaults defaults
/dev/mtd/mtd7 /recovery mtd defaults defaults
/dev/mtd/mtd5 /uboot mtd defaults defaults
/dev/mtd/mtd9 /misc mtd defaults defaults
To find more about partitions, mount points, paths related to your device, run this command in terminal:
Code:
adb shell ls /proc
and pay attention to the files names you see - ignore folders (numbers) at start. Then one by one run
Code:
adb shell cat /proc/[COLOR="Red"]the_name_you_see[/COLOR]
and choose the names that can give you partitions informations.
Here is my "proc list":
Code:
C:\Users\carliv>adb shell ls /proc
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[HIDE]1
........
98[/HIDE] [COLOR="Red"]<- ignored[/COLOR]
aed
asound
audio
batdrv_log
boot_mode
bootprof
buddyinfo
bus
cgroups
clkmgr
cmdline
consoles
cpu
cpu_ss
cpufreq
cpuinfo
crypto
[COLOR="Red"]devices[/COLOR]
diskstats
dma-mappings
driver
[COLOR="Red"]dumchar_info[/COLOR]
emifreq
[COLOR="Red"]emmc[/COLOR]
execdomains
fat
fb
fgadc_log
filesystems
fm
freqhopping
fs
golden_setting
gpt_stat
gpufreq
interrupts
iomem
ioports
irq
kallsyms
kmsg
kpagecount
kpageflags
last_kmsg
lk_env
loadavg
locks
log_ts
mcdi
meminfo
misc
modules
[COLOR="Red"]mounts[/COLOR]
msdc_FT
msdc_debug
msdc_help
msdc_tune
msdc_tune_flag
mt_hotplug_test
mtd
mtk_battery_cmd
mtk_mdm_txpwr
mtk_sched
mtkcooler
mtkfb_size
mtktsbattery
mtktscpu
mtktspa
mtktspmic
mtktz
mtprof
net
nt35590_hd720_dsi_vdo_truly
pagetypeinfo
[COLOR="Red"]partitions[/COLOR]
pm_init
ptp
pvr
rid
sched_debug
schedstat
scsi
sd_upgrade
self
softirqs
stat
swaps
sys
sysram
sysram_flag
timer_list
tty
uid_stat
uptime
version
vmallocinfo
vmstat
wdk
wmt_tm
xlog
yaffs
zoneinfo
C:\Users\carliv>
Next open the init.{hardware}.rc from recovery folder, and you have to make some changes to be able to use sdcards and USB mass storage. Typical it looks like this:
Code:
import /init.recovery.${ro.hardware}.rc
on early-init
# Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
write /sys/fs/selinux/checkreqprot 0
# Set the security context for the init process.
# This should occur before anything else (e.g. ueventd) is started.
setcon u:r:init:s0
start ueventd
start healthd
on init
export PATH /sbin:/system/bin
export ANDROID_ROOT /system
export ANDROID_DATA /data
export EXTERNAL_STORAGE /sdcard
symlink /system/etc /etc
mkdir /boot
mkdir /recovery
mkdir /sdcard
mkdir /internal_sd
mkdir /external_sd
mkdir /sd-ext
mkdir /datadata
mkdir /emmc
mkdir /system
mkdir /data
mkdir /cache
mount tmpfs tmpfs /tmp
chown root shell /tmp
chmod 0775 /tmp
mkdir /mnt 0775 root system
mkdir /storage 0050 root sdcard_r
mount tmpfs tmpfs /storage mode=0050,uid=0,gid=1028
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell 0700 shell shell
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
# Create private mountpoint so we can MS_MOVE from staging
mount tmpfs tmpfs /mnt/secure mode=0700,uid=0,gid=0
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
# Fuse public mount points.
mkdir /mnt/fuse 0700 root system
mount tmpfs tmpfs /mnt/fuse mode=0775,gid=1000
on fs
mkdir /dev/usb-ffs 0770 shell shell
mkdir /dev/usb-ffs/adb 0770 shell shell
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18D1
write /sys/class/android_usb/android0/idProduct D001
write /sys/class/android_usb/android0/f_ffs/aliases adb
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
on boot
ifup lo
hostname localhost
domainname localdomain
class_start default
on property:sys.powerctl=*
powerctl ${sys.powerctl}
service ueventd /sbin/ueventd
critical
seclabel u:r:ueventd:s0
service healthd /sbin/healthd -n
critical
seclabel u:r:healthd:s0
service recovery /sbin/recovery
seclabel u:r:recovery:s0
service setup_adbd /sbin/setup_adbd
oneshot
service adbd /sbin/adbd --root_seclabel=u:r:su:s0 --device_banner=recovery
disabled
socket adbd stream 660 system system
seclabel u:r:adbd:s0
service vold /sbin/minivold
socket vold stream 0660 root mount
ioprio be 2
seclabel u:r:recovery:s0
# setup_adbd will start adb once it has checked the keys
on property:service.adb.root=1
write /sys/class/android_usb/android0/enable 0
restart adbd
write /sys/class/android_usb/android0/enable 1
on property:sys.storage.ums_enabled=1
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idProduct D003
write /sys/class/android_usb/android0/functions mass_storage,adb
write /sys/class/android_usb/android0/enable 1
on property:sys.storage.ums_enabled=0
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idProduct D001
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/enable ${service.adb.root}
but it won't mount well both sdcards because it's missing some parts. You can add those either in this file or in a separate init.recovery.{hardware}.rc file placed in /recovery/root folder. For defining sdcards take a look here, but keep in mind that is for Android system fstab, and for recovery things will be slightly different.
Few examples:
1. noemulated:
Code:
on early-init
# Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
write /sys/fs/selinux/checkreqprot 0
# Set the security context for the init process.
# This should occur before anything else (e.g. ueventd) is started.
setcon u:r:init:s0
start ueventd
start healthd
on init
export PATH /sbin:/system/bin
export ANDROID_ROOT /system
export ANDROID_DATA /data
[COLOR="Red"]export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/sdcard1[/COLOR]
symlink /system/etc /etc
mkdir /boot
mkdir /recovery
mkdir /sdcard
mkdir /internal_sd
mkdir /external_sd
mkdir /sd-ext
mkdir /datadata
[COLOR="Red"]mkdir /sdcard2[/COLOR]
mkdir /system
mkdir /cache
mkdir /data
mount tmpfs tmpfs /tmp
chown root shell /tmp
chmod 0775 /tmp
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt 0775 root system
mkdir /storage 0050 root sdcard_r
mount tmpfs tmpfs /storage mode=0050,uid=0,gid=1028
[COLOR="Red"]mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
mkdir /storage/sdcard0 0700 root root
mkdir /storage/sdcard1 0700 root root
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
symlink /storage/sdcard1 /sdcard2
symlink /storage/sdcard1 /mnt/sdcard2[/COLOR]
mkdir /mnt/shell 0700 shell shell
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
# Create private mountpoint so we can MS_MOVE from staging
mount tmpfs tmpfs /mnt/secure mode=0700,uid=0,gid=0
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
# Fuse public mount points.
mkdir /mnt/fuse 0700 root system
mount tmpfs tmpfs /mnt/fuse mode=0775,gid=1000
on fs
mkdir /dev/usb-ffs 0770 shell shell
mkdir /dev/usb-ffs/adb 0770 shell shell
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18D1
write /sys/class/android_usb/android0/idProduct [COLOR="Red"]D003[/COLOR]
write /sys/class/android_usb/android0/f_ffs/aliases adb
[COLOR="Red"]write /sys/class/android_usb/android0/functions mass_storage,adb[/COLOR]
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
on boot
ifup lo
hostname localhost
domainname localdomain
class_start default
on property:sys.powerctl=*
powerctl ${sys.powerctl}
service ueventd /sbin/ueventd
critical
seclabel u:r:ueventd:s0
service healthd /sbin/healthd -n
critical
seclabel u:r:healthd:s0
service recovery /sbin/recovery
seclabel u:r:recovery:s0
service setup_adbd /sbin/setup_adbd
oneshot
service adbd /sbin/adbd --root_seclabel=u:r:su:s0 --device_banner=recovery
disabled
socket adbd stream 660 system system
seclabel u:r:adbd:s0
service vold /sbin/minivold
socket vold stream 0660 root mount
ioprio be 2
seclabel u:r:recovery:s0
[COLOR="Red"]# virtual sdcard daemon running as media_rw (1023)
service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard0 /storage/sdcard0
class late_start
disabled
# virtual sdcard daemon running as media_rw (1023)
service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
class late_start
disabled[/COLOR]
# setup_adbd will start adb once it has checked the keys
on property:service.adb.root=1
write /sys/class/android_usb/android0/enable 0
restart adbd
write /sys/class/android_usb/android0/enable 1
on property:sys.storage.ums_enabled=1
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idProduct D003
write /sys/class/android_usb/android0/functions mass_storage,adb
write /sys/class/android_usb/android0/enable 1
on property:sys.storage.ums_enabled=0
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idProduct D001
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/enable ${service.adb.root}
2. one emulated:
Code:
on early-init
# Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
write /sys/fs/selinux/checkreqprot 0
# Set the security context for the init process.
# This should occur before anything else (e.g. ueventd) is started.
setcon u:r:init:s0
start ueventd
start healthd
on init
export PATH /sbin:/system/bin
export ANDROID_ROOT /system
export ANDROID_DATA /data
[COLOR="Red"]export EXTERNAL_STORAGE /storage/sdcard0[/COLOR]
symlink /system/etc /etc
[COLOR="Red"]symlink /data/media/0 /storage/sdcard0[/COLOR]
mkdir /boot
mkdir /recovery
mkdir /sdcard
mkdir /internal_sd
mkdir /external_sd
mkdir /sd-ext
mkdir /datadata
mkdir /system
mkdir /emmc
mkdir /cache
mkdir /data
mount tmpfs tmpfs /tmp
chown root shell /tmp
chmod 0775 /tmp
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt 0775 root system
mkdir /storage 0050 root sdcard_r
mount tmpfs tmpfs /storage mode=0050,uid=0,gid=1028
mkdir /mnt/shell 0700 shell shell
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
# Create private mountpoint so we can MS_MOVE from staging
mount tmpfs tmpfs /mnt/secure mode=0700,uid=0,gid=0
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
# Fuse public mount points.
mkdir /mnt/fuse 0700 root system
mount tmpfs tmpfs /mnt/fuse mode=0775,gid=1000
on fs
mkdir /dev/usb-ffs 0770 shell shell
mkdir /dev/usb-ffs/adb 0770 shell shell
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
write /sys/class/android_usb/android0/enable 0
[COLOR="Red"]write /sys/class/android_usb/android0/idVendor 0BB4
write /sys/class/android_usb/android0/idProduct 0C03[/COLOR]
write /sys/class/android_usb/android0/f_ffs/aliases adb
[COLOR="Red"]write /sys/class/android_usb/android0/functions mass_storage,adb[/COLOR]
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
on boot
ifup lo
hostname localhost
domainname localdomain
class_start default
on property:sys.powerctl=*
powerctl ${sys.powerctl}
service ueventd /sbin/ueventd
critical
seclabel u:r:ueventd:s0
service healthd /sbin/healthd -n
critical
seclabel u:r:healthd:s0
service recovery /sbin/recovery
seclabel u:r:recovery:s0
service setup_adbd /sbin/setup_adbd
oneshot
service adbd /sbin/adbd --root_seclabel=u:r:su:s0 --device_banner=recovery
disabled
socket adbd stream 660 system system
seclabel u:r:adbd:s0
service vold /sbin/minivold
socket vold stream 0660 root mount
ioprio be 2
seclabel u:r:recovery:s0
# setup_adbd will start adb once it has checked the keys
on property:service.adb.root=1
write /sys/class/android_usb/android0/enable 0
restart adbd
write /sys/class/android_usb/android0/enable 1
on property:sys.storage.ums_enabled=1
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idProduct 0C03
write /sys/class/android_usb/android0/functions mass_storage,adb
write /sys/class/android_usb/android0/enable 1
on property:sys.storage.ums_enabled=0
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idProduct 0C01
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/enable ${service.adb.root}
3. one emulated and one noemulated:
Code:
on early-init
# Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
write /sys/fs/selinux/checkreqprot 0
# Set the security context for the init process.
# This should occur before anything else (e.g. ueventd) is started.
setcon u:r:init:s0
start ueventd
start healthd
on init
export PATH /sbin:/system/bin
export ANDROID_ROOT /system
export ANDROID_DATA /data
[COLOR="Red"]export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/sdcard1[/COLOR]
symlink /system/etc /etc
[COLOR="Red"]symlink /data/media/0 /storage/sdcard0[/COLOR]
mkdir /boot
mkdir /recovery
mkdir /sdcard
mkdir /internal_sd
mkdir /external_sd
mkdir /sd-ext
[COLOR="Red"]mkdir /sdcard2[/COLOR]
mkdir /datadata
mkdir /system
mkdir /emmc
mkdir /cache
mkdir /data
mount tmpfs tmpfs /tmp
chown root shell /tmp
chmod 0775 /tmp
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt 0775 root system
mkdir /storage 0050 root sdcard_r
mount tmpfs tmpfs /storage mode=0050,uid=0,gid=1028
[COLOR="Red"]mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
mkdir /mnt/shell 0700 shell shell
mkdir /storage/sdcard1 0700 root root
symlink /storage/sdcard1 /mnt/sdcard2[/COLOR]
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
# Create private mountpoint so we can MS_MOVE from staging
mount tmpfs tmpfs /mnt/secure mode=0700,uid=0,gid=0
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
# Fuse public mount points.
mkdir /mnt/fuse 0700 root system
mount tmpfs tmpfs /mnt/fuse mode=0775,gid=1000
on fs
mkdir /dev/usb-ffs 0770 shell shell
mkdir /dev/usb-ffs/adb 0770 shell shell
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
write /sys/class/android_usb/android0/enable 0
[COLOR="Red"]write /sys/class/android_usb/android0/idVendor 0BB4
write /sys/class/android_usb/android0/idProduct 0C03[/COLOR]
write /sys/class/android_usb/android0/f_ffs/aliases adb
[COLOR="Red"]write /sys/class/android_usb/android0/functions mass_storage,adb[/COLOR]
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
on boot
ifup lo
hostname localhost
domainname localdomain
class_start default
on property:sys.powerctl=*
powerctl ${sys.powerctl}
service ueventd /sbin/ueventd
critical
seclabel u:r:ueventd:s0
service healthd /sbin/healthd -n
critical
seclabel u:r:healthd:s0
service recovery /sbin/recovery
seclabel u:r:recovery:s0
service setup_adbd /sbin/setup_adbd
oneshot
service adbd /sbin/adbd --root_seclabel=u:r:su:s0 --device_banner=recovery
disabled
socket adbd stream 660 system system
seclabel u:r:adbd:s0
service vold /sbin/minivold
socket vold stream 0660 root mount
ioprio be 2
seclabel u:r:recovery:s0
[COLOR="Red"]
# virtual sdcard daemon running as media_rw (1023)
service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
class late_start
disabled[/COLOR]
# setup_adbd will start adb once it has checked the keys
on property:service.adb.root=1
write /sys/class/android_usb/android0/enable 0
restart adbd
write /sys/class/android_usb/android0/enable 1
on property:sys.storage.ums_enabled=1
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idProduct 0C03
write /sys/class/android_usb/android0/functions mass_storage,adb
write /sys/class/android_usb/android0/enable 1
on property:sys.storage.ums_enabled=0
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idProduct 0C01
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/enable ${service.adb.root}
As you can see, for external sdcard (/storage/sdcard1), when it exists, the read write permissions include also "other/world" (-w 1023), but for internal sdcard, either emulated or not, only user and group have permissions.
If you want to use a separate init.recovery.{hardware}.rc file, just copy the extra stuff from these init.{hardware}.rc examples compared with default init.rc and keep same triggers (on init, on fs, on boot, etc.). Example for both sdcards noemulated, the init.recovery.{hardware}.rc file could look like this:
Code:
on init
export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/sdcard1
mkdir /sdcard2
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
mkdir /storage/sdcard0 0700 root root
mkdir /storage/sdcard1 0700 root root
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
symlink /storage/sdcard1 /sdcard2
symlink /storage/sdcard1 /mnt/sdcard2
on fs
write /sys/class/android_usb/android0/functions mass_storage,adb
on boot
# virtual sdcard daemon running as media_rw (1023)
service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard0 /storage/sdcard0
class late_start
disabled
# virtual sdcard daemon running as media_rw (1023)
service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
class late_start
disabled
One other thing to check is your device "idVendor" and "idProduct":
Code:
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18D1
write /sys/class/android_usb/android0/idProduct [COLOR="Red"]D003[/COLOR]
write /sys/class/android_usb/android0/f_ffs/aliases adb
[COLOR="Red"]write /sys/class/android_usb/android0/functions mass_storage,adb[/COLOR]
Initial was:
Code:
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18D1
write /sys/class/android_usb/android0/idProduct D001
write /sys/class/android_usb/android0/f_ffs/aliases adb
write /sys/class/android_usb/android0/functions adb
but I changed that to activate mass storage function from start. That is up to you, but in any case you need to check those numbers. The "18D1" and "D001", "D003" are ok if you have google usb drivers installed, but also you can use specific vendor and product Ids. These can be found in boot unpacked ramdisk, in init.usb.rc file.
And for the next step, open BoardConfig.mk file. For now it looks like this:
Code:
USE_CAMERA_STUB := true
# inherit from the proprietary version
-include vendor/lenovo/P780/BoardConfigVendor.mk
TARGET_ARCH := arm
TARGET_NO_BOOTLOADER := true
TARGET_BOARD_PLATFORM := unknown
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_CPU_VARIANT := cortex-a7
TARGET_CPU_SMP := true
ARCH_ARM_HAVE_TLS_REGISTER := true
TARGET_BOOTLOADER_BOARD_NAME := P780
BOARD_KERNEL_CMDLINE :=
BOARD_KERNEL_BASE := 0x10000000
BOARD_KERNEL_PAGESIZE := 2048
# fix this up by examining /proc/mtd on a running device
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_FLASH_BLOCK_SIZE := 131072
TARGET_PREBUILT_KERNEL := device/lenovo/P780/kernel
BOARD_HAS_NO_SELECT_BUTTON := true
So, we have to make some changes. First, if the mkvendor script didn't get your platform
Code:
TARGET_BOARD_PLATFORM := unknown
add it as you have in fstab.{hardware} and init.{hardware}.rc.
If you don't know your hardware, get it with adb:
Code:
adb shell cat /proc/cpuinfo
and you will find the hardware.
For me it is:
Code:
Processor : ARMv7 Processor rev 2 (v7l)
processor : 0
BogoMIPS : 2439.94
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 2
[COLOR="Blue"]Hardware[/COLOR] : [COLOR="Red"]MT6589[/COLOR]
Revision : 0000
Serial : 0000000000000000
and I changed that line like this
Code:
TARGET_BOARD_PLATFORM := [COLOR="Red"]mt6589[/COLOR]
Next there are partitions size defines:
Code:
# fix this up by examining /proc/mtd on a running device
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_FLASH_BLOCK_SIZE := 131072
Do what they say, using "adb shell cat /proc/mtd" or "adb shell cat /proc/emmc" or "adb shell cat /proc/dumchar_info" for a MTK phone, and replace every partition size with the correct value. For me it is:
Code:
# Partition sizes
BOARD_BOOTIMAGE_PARTITION_SIZE := 6291456
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 6291456
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 939524096
BOARD_USERDATAIMAGE_PARTITION_SIZE := 1283457024
BOARD_FLASH_BLOCK_SIZE := 512
The board flash block size is specific to your platform. In MTK phones, that is usually 512, but it will work with default 131072 value too.
Also you can add here
Code:
TARGET_USERIMAGES_USE_EXT4 := true
if your phone uses ext4 file system (check in fstab or default.prop in boot.img ramdisk).
Next line that has to be corrected is
Code:
TARGET_PREBUILT_KERNEL := device/lenovo/P780/kernel
Remember you have the kernel now in prebuilt subfolder, so it should be:
Code:
TARGET_PREBUILT_KERNEL := device/lenovo/P780/prebuilt/kernel
In some cases you may need to use another flag:
Code:
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
if your phone has a custom PIXEL FORMAT. You need to find out that, or if the flag is not used you may see the recovery doesn't boot.
Now let's add the custom fstab and init.rc
Code:
TARGET_RECOVERY_INITRC := device/lenovo/P780/recovery/init.{hardware}.rc
TARGET_RECOVERY_FSTAB := device/lenovo/P780/recovery/recovery.fstab
for me it is
Code:
TARGET_RECOVERY_INITRC := device/lenovo/P780/recovery/init.mt6589.rc
TARGET_RECOVERY_FSTAB := device/lenovo/P780/recovery/recovery.fstab
If you want to use init.recovery.{hardware}.rc and you have that in /recovery/root folder, skip the first flag and use only
Code:
TARGET_RECOVERY_FSTAB := device/lenovo/P780/recovery/recovery.fstab
The path /device/lenovo/P780 is for my example; you should use your device path here.
And last, if you don't want to build regular CWM, you can use recovery variant flag. This way you can add a custom recovery folder in your bootable folder along with default "recovery" and "recovery-cm". You can use here what you want: recovery-twrp, recovery-philz or recovery-carliv. For every one you should check their threads and author's instructions for additional flags or modifications in BoardConfig or device tree.
Build a CWM-based Recovery
So if you want to build a stock Clockworkmod Recovery, you will use the default recovery from Cyanogenmod 11 building tree.
But if you want to build a CWM variant or custom you have to use a flag on BoardConfig, corresponding to that custom recovery folder: recovery-cm, recovery-twrp, recovery-philz, recovery-miui, etc. Place that flag on BoardConfig:
Code:
RECOVERY_VARIANT := twrp
or
Code:
RECOVERY_VARIANT := philz
and same goes for the other variants too.
If your phone is one with MTK platform,
you may need one more flag:
Code:
BOARD_CUSTOM_BOOTIMG_MK := device/lenovo/P780/mkmtkbootimg.mk
to append MTK header to compiled image. Remmember that the prebuilt kernel has MTK header stripped off and if you use the recovery image built without MTK header, it won't work. For correct this we will use a custom file developed by chrmhoffmann and inspired by bgcngm's mtk-tools scripts, which I named mkmtkbootimg.mk. There are some other custom boot makers for MTK phones (one is developed by Omnirom team for Oppo R819), but this one is the best for me. Copy it in your device folder if your phone is a MTK - or create a new mk file and paste the content in it, then add that BOARD_CUSTOM_BOOTIMG_MK flag. Even if you don't have a MTK phone you may need to use a custom boot maker script, as I saw in LG phones.
For MTK phones again, if you don't want to use a custom boot image maker, you can build normal, but after build is finished, take the recovery.img and using my CarlivImageKitchen, open a terminal in that folder and type:
Code:
./unpack_img recovery.img
and then
Code:
./repack_MTK_img recovery
to make it compatible with MTK phones (my utility will append the MTK header to kernel and ramdisk).
Anyway using a custom boot image maker file is a better solution.
Other thing you can add is this flag:
Code:
TARGET_RECOVERY_LCD_BACKLIGHT_PATH := \"/sys/devices/platform/leds-mt65xx/leds/lcd-backlight/brightness\"
Search in your phone with a root explorer the path for lcd-backlight (usually in /sys/devices/platform/leds something.... This is for recoveries that needs it (twrp, philz).
Also you can use a custom font for recovery. Take a look in /bootable/recovery or recovery-variant/minui folder and choose one. There are few fonts file with 00x00 in name: those are with and height for a character, so you know how to choose one for your screen resolution. As an example, for a screen res of 540x960 the best view is with "roboto_15x24.h" font.
Define it like this:
Code:
BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_15x24.h\"
Finally now my BoardConfig looks like this:
Code:
USE_CAMERA_STUB := true
# inherit from the proprietary version
-include vendor/lenovo/P780/BoardConfigVendor.mk
TARGET_ARCH := arm
TARGET_NO_BOOTLOADER := true
TARGET_BOARD_PLATFORM := mt6589
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_CPU_VARIANT := cortex-a7
TARGET_CPU_SMP := true
ARCH_ARM_HAVE_TLS_REGISTER := true
TARGET_BOOTLOADER_BOARD_NAME := P780
BOARD_KERNEL_CMDLINE :=
BOARD_KERNEL_BASE := 0x10000000
BOARD_KERNEL_PAGESIZE := 2048
# fix this up by examining /proc/mtd on a running device
BOARD_BOOTIMAGE_PARTITION_SIZE := 6291456
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 6291456
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 939524096
BOARD_USERDATAIMAGE_PARTITION_SIZE := 1283457024
BOARD_FLASH_BLOCK_SIZE := 512
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_PREBUILT_KERNEL := device/lenovo/P780/prebuilt/kernel
TARGET_RECOVERY_INITRC := device/lenovo/P780/recovery/init.mt6589.rc
TARGET_RECOVERY_FSTAB := device/lenovo/P780/recovery/recovery.fstab
BOARD_HAS_NO_SELECT_BUTTON := true
BOARD_CUSTOM_BOOTIMG_MK := device/lenovo/P780/mkmtkbootimg.mk
BOARD_USE_CUSTOM_RECOVERY_FONT := \"font_17x33.h\"
DEVICE_RESOLUTION := 720x1280
TARGET_RECOVERY_LCD_BACKLIGHT_PATH := \"/sys/devices/platform/leds-mt65xx/leds/lcd-backlight/brightness\"
This is it, the device tree is done, good to build a recovery now, and you can add on it what you need to make it build a full ROM. We made now only the base of the device tree.
It's time to start building.
Back to cm11 building tree folder, open a terminal in it and initialize the building environment:
Code:
. build/envsetup.sh
You can see that my device is included. Next lunch device configuration
Code:
lunch cm_P780-eng
and start making recovery
Code:
make -j4 recoveryimage
The j number here is how many jobs you want your processor to do at same time. This has to be equivalent or +1,+2 with your CPU cores (from computer not phone).
At the end if everything goes well you will see this
or this, if the phone is a MTK and you use a custom boot image maker
And the new recovery ramdisk will be like this:
Errors
During the build process you may encounter some errors or warnings.
*********************
Code:
cp: cannot stat `/home/carliv/CM11-0/out/target/product/P780/root/[COLOR="Red"]init.recovery.*.rc': No such file or directory[/COLOR]
make: [/home/carliv/CM11-0/out/target/product/P780/recovery/root.ts] Error 1 (ignored)
This will not stop the build, and it appears if you don't use a init.recovery.{hardware}.rc file. Can be ignored, as the build process does.
**********************
Code:
[COLOR="Red"]find: `bootable/recovery/res-720': No such file or directory
No private recovery resources for TARGET_DEVICE P780[/COLOR]
This appears because of the following part from /build/core/Makefile
Code:
ifeq ($(TARGET_RECOVERY_SCREEN_WIDTH),)
ifeq ($(TARGET_SCREEN_WIDTH),)
TARGET_RECOVERY_SCREEN_WIDTH := 720
else
TARGET_RECOVERY_SCREEN_WIDTH := $(TARGET_SCREEN_WIDTH)
endif
endif
.......
ifeq ($(recovery_resources_private),)
$(info No private recovery resources for TARGET_DEVICE $(TARGET_DEVICE))
endif
Also safe to ignore.
**********************
Code:
[COLOR="Red"]'cortex-a7' is not a recognized processor for this target (ignoring processor)[/COLOR]
If you're building for a MTK phone at the end you will see lots of these. The MTK platforms are not registered for cortex-7 arm processors, so that's the reason.
No problem, safe to ignore.
**********************
Code:
Checking build tools versions...
/home/carliv/CM11-0/out/target/product/P780/obj/APPS/SignatureTest_intermediates
"ebtables is disabled on this build"
[COLOR="Red"]find: `src': No such file or directory[/COLOR]
This one appears only in kitkat builds (all of them: AOSP, CM 11, Omnirom, CarbonRom, etc.) at start of building, and is generated by a missing src folder under /frameworks/base/tests/TileBenchmark. It was there until Android 4.3 (cm 10.2),
but is gone in any 4.4 building tree. I can't tell if this is an omission or that has to be, but if that is the way to be, then why the res folder is still there and in Android.mk file that src folder is called?
To solve this you have two solutions:
One is to edit the Android.mk file in TileBenchmark, and to change this
Code:
LOCAL_SRC_FILES := $(call all-java-files-under, src)
into this
Code:
LOCAL_SRC_FILES :=
or to copy that src folder from cm-10.2 TileBenchmark (it's not any difference between the two folders except the missing src in cm-11.0).
Well, you don't have to fix this error if you don't want to. It's safe to be ignored too, and won't stop the build.
**********************
Code:
[email protected]:~/CM11-0$ lunch cm_P780-eng
build/core/product_config.mk:239: *** _nic.PRODUCTS.[[device/Lenovo/P780/cm.mk]]: "device/lenovo/P780/device_P780.mk" does not exist. Stop.
Device P780 not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Repository for P780 not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
build/core/product_config.mk:239: *** _nic.PRODUCTS.[[device/Lenovo/P780/cm.mk]]: "device/lenovo/P780/device_P780.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_P780'
** Do you have the right repo manifest?
[email protected]:~/CM11-0$
This one is serious, and will stop anything, you can't use lunch command. The reason? Keep in mind that the process is case sensitive, and my "mistake" is that instead of manufacturer name "lenovo" I used "Lenovo". So if this appears and you know you did setup the device tree right, check folders names and also all paths in device tree files:
Code:
device/lenovo/P780/
Check to see if there are missing letters or are uppercase where it should be lowercase, and so on.
This one you can't ignore and you have to solve it.
Look after I "correct" the folder's name:
Code:
[email protected]:~/CM11-0$ lunch cm_P780-eng
Trying dependencies-only mode on a non-existing device tree?
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.4
CM_VERSION=
TARGET_PRODUCT=cm_P780
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.13.0-43-generic-x86_64-with-Ubuntu-12.04-precise
HOST_BUILD_TYPE=release
BUILD_ID=KTU84Q
OUT_DIR=/home/carliv/CM11-0/out
============================================
[email protected]:~/CM11-0$
The End! Happy building custom recoveries!
Enjoy!
I will surely try this when i hav tym .... Seriously ... Lot of work put in this.. Keep it up!!
Sent from my Micromax A88 using XDA Premium 4 mobile app
Thanks a lot for the detailed guide sir ^_^
1) can't we use parted cm-11 source instead of full cm-11 source? just like sir yuweng did in his philz recovery compilation guide? it will save us a lot of time & storage...
2) for mediatek devices, ro.serialno=null if we getprop it in recovery mode, so using this command in init.rc
write /sys/.../iSerial ${ro.serialno}
will set the wrong serial number for our device, i found the real path of mtk device serial number file
So i used this command in init.rc
cat /sys/sys_info/serial_number /sys/devices/virtual/android_usb/android0/iSerial
it didn't worked via init.rc, but if i execute the same command via terminal, it works... Why its not working via init.rc?
3)There is a strange issue with my mt6589 device (if i use stock kitkat kernel) these commands in init.rc have no effect
write /sys/class/android_usb/*
(e.g. write /sys/class/android_usb/android0/idProduct 0C03)
after a little bit of investigation i saw only symlinked paths are unaccessible by recovery, so i replaced those symlinked paths with real paths in init.rc
e.g. changed this
write /sys/class/android_usb/android0/idProduct 0C03
into this
write /sys/devices/virtual/android_usb/android0/idProduct 0C03
And it worked...
4) strangest issue, if [email protected] partition gets mounted within approximately 30 seconds after first bootup in recovery mode, it becomes busy even if we try to umount it, an error msg says unable to unmount /data partition, device or resource is busy... i cant unmount it even if i try to forcefully unmount it using "umount -f /data" in recovery terminal... The only command which works is, "umount -l /data"
What i want to know here is, how can i find what is keeping it busy? lsof, fuser are not workin too... is there any way i can mount and then unmount it on every bootup by adding some commands in init.rc? i cant even format data partition when it happens, same error message appears
i am using TWRP-2.8.2.0 (tried every version of TWRP 2.5.0 - 2.8.2.0)
EnerJon said:
Thanks a lot for the detailed guide sir ^_^
1) can't we use parted cm-11 source instead of full cm-11 source? just like sir yuweng did in his philz recovery compilation guide? it will save us a lot of time & storage...
2) for mediatek devices, ro.serialno=null if we getprop it in recovery mode, so using this command in init.rc
write /sys/.../iSerial ${ro.serialno}
will set the wrong serial number for our device, i found the real path of mtk device serial number file
So i used this command in init.rc
cat /sys/sys_info/serial_number /sys/devices/virtual/android_usb/android0/iSerial
it didn't worked via init.rc, but if i execute the same command via terminal, it works... Why its not working via init.rc?
3)There is a strange issue with my mt6589 device (if i use stock kitkat kernel) these commands in init.rc have no effect
write /sys/class/android_usb/*
(e.g. write /sys/class/android_usb/android0/idProduct 0C03)
after a little bit of investigation i saw only symlinked paths are unaccessible by recovery, so i replaced those symlinked paths with real paths in init.rc
e.g. changed this
write /sys/class/android_usb/android0/idProduct 0C03
into this
write /sys/devices/virtual/android_usb/android0/idProduct 0C03
And it worked...
4) strangest issue, if [email protected] partition gets mounted within approximately 30 seconds after first bootup in recovery mode, it becomes busy even if we try to umount it, an error msg says unable to unmount /data partition, device or resource is busy... i cant unmount it even if i try to forcefully unmount it using "umount -f /data" in recovery terminal... The only command which works is, "umount -l /data"
What i want to know here is, how can i find what is keeping it busy? lsof, fuser are not workin too... is there any way i can mount and then unmount it on every bootup by adding some commands in init.rc? i cant even format data partition when it happens, same error message appears
i am using TWRP-2.8.2.0 (tried every version of TWRP 2.5.0 - 2.8.2.0)
Click to expand...
Click to collapse
Sure, I think you can use the partial source, just like my friend yuweng wrote in his thread. I mention here a full repo sync because I'm thinking of this as a base for further development, not just building recovery. As you can see, I presented the official method with my additions and some updates.
About the other things, I can't say anything yet, I would like to see your kitkat stock boot and recovery image, and that twrp you've compiled. Can you post them here attached?
I will take a look and I will say my opinion after.
By the way, did you tried other recovery? Philz or CWM? What phone do you have?
Wow this is nice. Very nice write up
Bro please tell in 51.android rules for mtp devices we have to enter this following code :
But for qualcomm we have to enter the following command or not please give example for any htc qualcomm device
raveeshwadhawan said:
Bro please tell in 51.android rules for mtp devices we have to enter this following code :
But for qualcomm we have to enter the following command or not please give example for any htc qualcomm device
Click to expand...
Click to collapse
Check again that part and read the text under instruction for MTK in 51-android rules.
I got it now but stuck at jdk... For qualcomm after dual setup of jdk 7 and sun jdk 1.6 and after entering that update alternative we have to edit mbldenv.sh or not or have to setuo java alternatives??
U know repo sync require high speed internet and I have very slow internet connection is there any way to compress it I just want to compile recovery... Plz help me in making recovery

[DEV][ADDON]Lastest Busybox for android

Busybox 1.25.0 Stable for Android​
All right guys im just going to keep this real nice and simple. Purpose of thread:
I compiled this binary from source to get lastest busybox on my android phone (I like lastest everything :laugh. It's compiled using arm-linux-gnueabihf by Linaro ​
How To Use:
Download the binary and put it into /system/xbin ( you should mount your system part (r/w)).
know run from terminal
Code:
chmod 755 /system/xbin/busybox
busybox --install -s /system/xbin/
You Should Now Have Busybox
Download Link
Click The Text To Download
Binary
Flashable ZIP
Thanks For Reading :good:
P.S.#1 Busybox binary always be updated
P.S.#2 to mount system rw run from terminal
Code:
mount -o remount,rw /system
Config
old
Config that used for building
Code:
#
# Automatically generated make config: don't edit
# Busybox version: 1.23.1
# Sat Mar 7 13:31:17 2015
#
CONFIG_HAVE_DOT_CONFIG=y
#
# Busybox Settings
#
#
# General Configuration
#
CONFIG_DESKTOP=y
# CONFIG_EXTRA_COMPAT is not set
CONFIG_INCLUDE_SUSv2=y
# CONFIG_USE_PORTABLE_CODE is not set
CONFIG_PLATFORM_LINUX=y
CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
CONFIG_SHOW_USAGE=y
CONFIG_FEATURE_VERBOSE_USAGE=y
CONFIG_FEATURE_COMPRESS_USAGE=y
CONFIG_FEATURE_INSTALLER=y
CONFIG_INSTALL_NO_USR=y
# CONFIG_LOCALE_SUPPORT is not set
CONFIG_UNICODE_SUPPORT=y
# CONFIG_UNICODE_USING_LOCALE is not set
# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
CONFIG_SUBST_WCHAR=63
CONFIG_LAST_SUPPORTED_WCHAR=767
# CONFIG_UNICODE_COMBINING_WCHARS is not set
# CONFIG_UNICODE_WIDE_WCHARS is not set
# CONFIG_UNICODE_BIDI_SUPPORT is not set
# CONFIG_UNICODE_NEUTRAL_TABLE is not set
# CONFIG_UNICODE_PRESERVE_BROKEN is not set
# CONFIG_PAM is not set
CONFIG_FEATURE_USE_SENDFILE=y
CONFIG_LONG_OPTS=y
CONFIG_FEATURE_DEVPTS=y
# CONFIG_FEATURE_CLEAN_UP is not set
CONFIG_FEATURE_UTMP=y
CONFIG_FEATURE_WTMP=y
CONFIG_FEATURE_PIDFILE=y
CONFIG_PID_FILE_PATH="/var/run"
CONFIG_FEATURE_SUID=y
CONFIG_FEATURE_SUID_CONFIG=y
CONFIG_FEATURE_SUID_CONFIG_QUIET=y
# CONFIG_SELINUX is not set
# CONFIG_FEATURE_PREFER_APPLETS is not set
CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
CONFIG_FEATURE_SYSLOG=y
# CONFIG_FEATURE_HAVE_RPC is not set
#
# Build Options
#
CONFIG_STATIC=y
# CONFIG_PIE is not set
# CONFIG_NOMMU is not set
# CONFIG_BUILD_LIBBUSYBOX is not set
# CONFIG_FEATURE_INDIVIDUAL is not set
# CONFIG_FEATURE_SHARED_BUSYBOX is not set
CONFIG_LFS=y
CONFIG_CROSS_COMPILER_PREFIX=""
CONFIG_SYSROOT=""
CONFIG_EXTRA_CFLAGS=""
CONFIG_EXTRA_LDFLAGS=""
CONFIG_EXTRA_LDLIBS=""
#
# Debugging Options
#
# CONFIG_DEBUG is not set
# CONFIG_DEBUG_PESSIMIZE is not set
# CONFIG_UNIT_TEST is not set
# CONFIG_WERROR is not set
CONFIG_NO_DEBUG_LIB=y
# CONFIG_DMALLOC is not set
# CONFIG_EFENCE is not set
#
# Installation Options ("make install" behavior)
#
CONFIG_INSTALL_APPLET_SYMLINKS=y
# CONFIG_INSTALL_APPLET_HARDLINKS is not set
# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
# CONFIG_INSTALL_APPLET_DONT is not set
# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set
# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set
# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set
CONFIG_PREFIX="./_install"
#
# Busybox Library Tuning
#
CONFIG_FEATURE_SYSTEMD=y
CONFIG_FEATURE_RTMINMAX=y
CONFIG_PASSWORD_MINLEN=6
CONFIG_MD5_SMALL=1
CONFIG_SHA3_SMALL=1
CONFIG_FEATURE_FAST_TOP=y
# CONFIG_FEATURE_ETC_NETWORKS is not set
CONFIG_FEATURE_USE_TERMIOS=y
CONFIG_FEATURE_EDITING=y
CONFIG_FEATURE_EDITING_MAX_LEN=1024
# CONFIG_FEATURE_EDITING_VI is not set
CONFIG_FEATURE_EDITING_HISTORY=255
CONFIG_FEATURE_EDITING_SAVEHISTORY=y
# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set
CONFIG_FEATURE_REVERSE_SEARCH=y
CONFIG_FEATURE_TAB_COMPLETION=y
# CONFIG_FEATURE_USERNAME_COMPLETION is not set
CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
CONFIG_FEATURE_NON_POSIX_CP=y
# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
CONFIG_FEATURE_COPYBUF_KB=4
CONFIG_FEATURE_SKIP_ROOTFS=y
# CONFIG_MONOTONIC_SYSCALL is not set
CONFIG_IOCTL_HEX2STR_ERROR=y
CONFIG_FEATURE_HWIB=y
#
# Applets
#
#
# Archival Utilities
#
CONFIG_FEATURE_SEAMLESS_XZ=y
CONFIG_FEATURE_SEAMLESS_LZMA=y
CONFIG_FEATURE_SEAMLESS_BZ2=y
CONFIG_FEATURE_SEAMLESS_GZ=y
# CONFIG_FEATURE_SEAMLESS_Z is not set
# CONFIG_AR is not set
# CONFIG_FEATURE_AR_LONG_FILENAMES is not set
# CONFIG_FEATURE_AR_CREATE is not set
# CONFIG_UNCOMPRESS is not set
CONFIG_GUNZIP=y
CONFIG_BUNZIP2=y
CONFIG_UNLZMA=y
# CONFIG_FEATURE_LZMA_FAST is not set
CONFIG_LZMA=y
CONFIG_UNXZ=y
CONFIG_XZ=y
CONFIG_BZIP2=y
CONFIG_CPIO=y
CONFIG_FEATURE_CPIO_O=y
CONFIG_FEATURE_CPIO_P=y
# CONFIG_DPKG is not set
# CONFIG_DPKG_DEB is not set
# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
CONFIG_GZIP=y
CONFIG_FEATURE_GZIP_LONG_OPTIONS=y
CONFIG_GZIP_FAST=0
CONFIG_LZOP=y
# CONFIG_LZOP_COMPR_HIGH is not set
CONFIG_RPM2CPIO=y
CONFIG_RPM=y
CONFIG_TAR=y
CONFIG_FEATURE_TAR_CREATE=y
CONFIG_FEATURE_TAR_AUTODETECT=y
CONFIG_FEATURE_TAR_FROM=y
CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y
CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
CONFIG_FEATURE_TAR_LONG_OPTIONS=y
CONFIG_FEATURE_TAR_TO_COMMAND=y
CONFIG_FEATURE_TAR_UNAME_GNAME=y
CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
# CONFIG_FEATURE_TAR_SELINUX is not set
CONFIG_UNZIP=y
#
# Coreutils
#
CONFIG_BASENAME=y
CONFIG_CAT=y
CONFIG_DATE=y
CONFIG_FEATURE_DATE_ISOFMT=y
# CONFIG_FEATURE_DATE_NANO is not set
CONFIG_FEATURE_DATE_COMPAT=y
CONFIG_HOSTID=y
CONFIG_ID=y
CONFIG_GROUPS=y
CONFIG_SHUF=y
CONFIG_TEST=y
CONFIG_FEATURE_TEST_64=y
CONFIG_TOUCH=y
CONFIG_FEATURE_TOUCH_NODEREF=y
CONFIG_FEATURE_TOUCH_SUSV3=y
CONFIG_TR=y
CONFIG_FEATURE_TR_CLASSES=y
CONFIG_FEATURE_TR_EQUIV=y
CONFIG_UNLINK=y
CONFIG_BASE64=y
CONFIG_WHO=y
CONFIG_USERS=y
CONFIG_CAL=y
CONFIG_CATV=y
CONFIG_CHGRP=y
CONFIG_CHMOD=y
CONFIG_CHOWN=y
CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y
CONFIG_CHROOT=y
CONFIG_CKSUM=y
CONFIG_COMM=y
CONFIG_CP=y
CONFIG_FEATURE_CP_LONG_OPTIONS=y
CONFIG_CUT=y
CONFIG_DD=y
CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y
CONFIG_FEATURE_DD_IBS_OBS=y
CONFIG_DF=y
CONFIG_FEATURE_DF_FANCY=y
CONFIG_DIRNAME=y
CONFIG_DOS2UNIX=y
CONFIG_UNIX2DOS=y
CONFIG_DU=y
CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
CONFIG_ECHO=y
CONFIG_FEATURE_FANCY_ECHO=y
CONFIG_ENV=y
CONFIG_FEATURE_ENV_LONG_OPTIONS=y
CONFIG_EXPAND=y
CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y
CONFIG_EXPR=y
CONFIG_EXPR_MATH_SUPPORT_64=y
CONFIG_FALSE=y
CONFIG_FOLD=y
CONFIG_FSYNC=y
CONFIG_HEAD=y
CONFIG_FEATURE_FANCY_HEAD=y
CONFIG_INSTALL=y
CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y
CONFIG_LN=y
CONFIG_LOGNAME=y
CONFIG_LS=y
CONFIG_FEATURE_LS_FILETYPES=y
CONFIG_FEATURE_LS_FOLLOWLINKS=y
CONFIG_FEATURE_LS_RECURSIVE=y
CONFIG_FEATURE_LS_SORTFILES=y
CONFIG_FEATURE_LS_TIMESTAMPS=y
CONFIG_FEATURE_LS_USERNAME=y
CONFIG_FEATURE_LS_COLOR=y
CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
CONFIG_MD5SUM=y
CONFIG_MKDIR=y
CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
CONFIG_MKFIFO=y
CONFIG_MKNOD=y
CONFIG_MV=y
CONFIG_FEATURE_MV_LONG_OPTIONS=y
CONFIG_NICE=y
CONFIG_NOHUP=y
CONFIG_OD=y
CONFIG_PRINTENV=y
CONFIG_PRINTF=y
CONFIG_PWD=y
CONFIG_READLINK=y
CONFIG_FEATURE_READLINK_FOLLOW=y
CONFIG_REALPATH=y
CONFIG_RM=y
CONFIG_RMDIR=y
CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y
CONFIG_SEQ=y
CONFIG_SHA1SUM=y
CONFIG_SHA256SUM=y
CONFIG_SHA512SUM=y
CONFIG_SHA3SUM=y
CONFIG_SLEEP=y
CONFIG_FEATURE_FANCY_SLEEP=y
CONFIG_FEATURE_FLOAT_SLEEP=y
CONFIG_SORT=y
CONFIG_FEATURE_SORT_BIG=y
CONFIG_SPLIT=y
CONFIG_FEATURE_SPLIT_FANCY=y
CONFIG_STAT=y
CONFIG_FEATURE_STAT_FORMAT=y
CONFIG_STTY=y
CONFIG_SUM=y
CONFIG_SYNC=y
CONFIG_TAC=y
CONFIG_TAIL=y
CONFIG_FEATURE_FANCY_TAIL=y
CONFIG_TEE=y
CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
CONFIG_TRUE=y
CONFIG_TTY=y
CONFIG_UNAME=y
CONFIG_UNEXPAND=y
CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y
CONFIG_UNIQ=y
CONFIG_USLEEP=y
CONFIG_UUDECODE=y
CONFIG_UUENCODE=y
CONFIG_WC=y
CONFIG_FEATURE_WC_LARGE=y
CONFIG_WHOAMI=y
CONFIG_YES=y
#
# Common options
#
CONFIG_FEATURE_VERBOSE=y
#
# Common options for cp and mv
#
CONFIG_FEATURE_PRESERVE_HARDLINKS=y
#
# Common options for ls, more and telnet
#
CONFIG_FEATURE_AUTOWIDTH=y
#
# Common options for df, du, ls
#
CONFIG_FEATURE_HUMAN_READABLE=y
#
# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum
#
CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
#
# Console Utilities
#
CONFIG_CHVT=y
CONFIG_FGCONSOLE=y
CONFIG_CLEAR=y
CONFIG_DEALLOCVT=y
CONFIG_DUMPKMAP=y
CONFIG_KBD_MODE=y
CONFIG_LOADFONT=y
CONFIG_LOADKMAP=y
CONFIG_OPENVT=y
CONFIG_RESET=y
CONFIG_RESIZE=y
CONFIG_FEATURE_RESIZE_PRINT=y
CONFIG_SETCONSOLE=y
CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y
CONFIG_SETFONT=y
CONFIG_FEATURE_SETFONT_TEXTUAL_MAP=y
CONFIG_DEFAULT_SETFONT_DIR=""
CONFIG_SETKEYCODES=y
CONFIG_SETLOGCONS=y
CONFIG_SHOWKEY=y
#
# Common options for loadfont and setfont
#
CONFIG_FEATURE_LOADFONT_PSF2=y
CONFIG_FEATURE_LOADFONT_RAW=y
#
# Debian Utilities
#
CONFIG_MKTEMP=y
CONFIG_PIPE_PROGRESS=y
CONFIG_RUN_PARTS=y
CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
CONFIG_FEATURE_RUN_PARTS_FANCY=y
CONFIG_START_STOP_DAEMON=y
CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
CONFIG_WHICH=y
#
# Editors
#
CONFIG_AWK=y
CONFIG_FEATURE_AWK_LIBM=y
CONFIG_FEATURE_AWK_GNU_EXTENSIONS=y
CONFIG_CMP=y
CONFIG_DIFF=y
CONFIG_FEATURE_DIFF_LONG_OPTIONS=y
CONFIG_FEATURE_DIFF_DIR=y
CONFIG_ED=y
CONFIG_PATCH=y
CONFIG_SED=y
CONFIG_VI=y
CONFIG_FEATURE_VI_MAX_LEN=4096
# CONFIG_FEATURE_VI_8BIT is not set
CONFIG_FEATURE_VI_COLON=y
CONFIG_FEATURE_VI_YANKMARK=y
CONFIG_FEATURE_VI_SEARCH=y
# CONFIG_FEATURE_VI_REGEX_SEARCH is not set
CONFIG_FEATURE_VI_USE_SIGNALS=y
CONFIG_FEATURE_VI_DOT_CMD=y
CONFIG_FEATURE_VI_READONLY=y
CONFIG_FEATURE_VI_SETOPTS=y
CONFIG_FEATURE_VI_SET=y
CONFIG_FEATURE_VI_WIN_RESIZE=y
CONFIG_FEATURE_VI_ASK_TERMINAL=y
CONFIG_FEATURE_VI_UNDO=y
CONFIG_FEATURE_VI_UNDO_QUEUE=y
CONFIG_FEATURE_VI_UNDO_QUEUE_MAX=256
CONFIG_FEATURE_ALLOW_EXEC=y
#
# Finding Utilities
#
CONFIG_FIND=y
CONFIG_FEATURE_FIND_PRINT0=y
CONFIG_FEATURE_FIND_MTIME=y
CONFIG_FEATURE_FIND_MMIN=y
CONFIG_FEATURE_FIND_PERM=y
CONFIG_FEATURE_FIND_TYPE=y
CONFIG_FEATURE_FIND_XDEV=y
CONFIG_FEATURE_FIND_MAXDEPTH=y
CONFIG_FEATURE_FIND_NEWER=y
CONFIG_FEATURE_FIND_INUM=y
CONFIG_FEATURE_FIND_EXEC=y
CONFIG_FEATURE_FIND_EXEC_PLUS=y
CONFIG_FEATURE_FIND_USER=y
CONFIG_FEATURE_FIND_GROUP=y
CONFIG_FEATURE_FIND_NOT=y
CONFIG_FEATURE_FIND_DEPTH=y
CONFIG_FEATURE_FIND_PAREN=y
CONFIG_FEATURE_FIND_SIZE=y
CONFIG_FEATURE_FIND_PRUNE=y
CONFIG_FEATURE_FIND_DELETE=y
CONFIG_FEATURE_FIND_PATH=y
CONFIG_FEATURE_FIND_REGEX=y
# CONFIG_FEATURE_FIND_CONTEXT is not set
CONFIG_FEATURE_FIND_LINKS=y
CONFIG_GREP=y
CONFIG_FEATURE_GREP_EGREP_ALIAS=y
CONFIG_FEATURE_GREP_FGREP_ALIAS=y
CONFIG_FEATURE_GREP_CONTEXT=y
CONFIG_XARGS=y
CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y
#
# Init Utilities
#
CONFIG_BOOTCHARTD=y
CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER=y
CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE=y
CONFIG_HALT=y
# CONFIG_FEATURE_CALL_TELINIT is not set
CONFIG_TELINIT_PATH=""
CONFIG_INIT=y
CONFIG_FEATURE_USE_INITTAB=y
# CONFIG_FEATURE_KILL_REMOVED is not set
CONFIG_FEATURE_KILL_DELAY=0
CONFIG_FEATURE_INIT_SCTTY=y
CONFIG_FEATURE_INIT_SYSLOG=y
CONFIG_FEATURE_EXTRA_QUIET=y
CONFIG_FEATURE_INIT_COREDUMPS=y
CONFIG_FEATURE_INITRD=y
CONFIG_INIT_TERMINAL_TYPE="linux"
CONFIG_MESG=y
CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y
#
# Login/Password Management Utilities
#
CONFIG_ADD_SHELL=y
CONFIG_REMOVE_SHELL=y
CONFIG_FEATURE_SHADOWPASSWDS=y
CONFIG_USE_BB_PWD_GRP=y
CONFIG_USE_BB_SHADOW=y
CONFIG_USE_BB_CRYPT=y
CONFIG_USE_BB_CRYPT_SHA=y
CONFIG_ADDUSER=y
CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y
# CONFIG_FEATURE_CHECK_NAMES is not set
CONFIG_LAST_ID=60000
CONFIG_FIRST_SYSTEM_ID=100
CONFIG_LAST_SYSTEM_ID=999
CONFIG_ADDGROUP=y
CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS=y
CONFIG_FEATURE_ADDUSER_TO_GROUP=y
CONFIG_DELUSER=y
CONFIG_DELGROUP=y
CONFIG_FEATURE_DEL_USER_FROM_GROUP=y
CONFIG_GETTY=y
CONFIG_LOGIN=y
# CONFIG_LOGIN_SESSION_AS_CHILD is not set
CONFIG_LOGIN_SCRIPTS=y
CONFIG_FEATURE_NOLOGIN=y
CONFIG_FEATURE_SECURETTY=y
CONFIG_PASSWD=y
CONFIG_FEATURE_PASSWD_WEAK_CHECK=y
CONFIG_CRYPTPW=y
CONFIG_CHPASSWD=y
CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="des"
CONFIG_SU=y
CONFIG_FEATURE_SU_SYSLOG=y
CONFIG_FEATURE_SU_CHECKS_SHELLS=y
CONFIG_SULOGIN=y
CONFIG_VLOCK=y
#
# Linux Ext2 FS Progs
#
CONFIG_CHATTR=y
CONFIG_FSCK=y
CONFIG_LSATTR=y
# CONFIG_TUNE2FS is not set
#
# Linux Module Utilities
#
CONFIG_MODINFO=y
CONFIG_MODPROBE_SMALL=y
CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE=y
CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y
# CONFIG_INSMOD is not set
# CONFIG_RMMOD is not set
# CONFIG_LSMOD is not set
# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
# CONFIG_MODPROBE is not set
# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set
# CONFIG_DEPMOD is not set
#
# Options common to multiple modutils
#
# CONFIG_FEATURE_2_4_MODULES is not set
# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set
# CONFIG_FEATURE_MODUTILS_ALIAS is not set
# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set
CONFIG_DEFAULT_MODULES_DIR=""
CONFIG_DEFAULT_DEPMOD_FILE=""
#
# Linux System Utilities
#
CONFIG_BLOCKDEV=y
CONFIG_FATATTR=y
CONFIG_FSTRIM=y
CONFIG_MDEV=y
CONFIG_FEATURE_MDEV_CONF=y
CONFIG_FEATURE_MDEV_RENAME=y
CONFIG_FEATURE_MDEV_RENAME_REGEXP=y
CONFIG_FEATURE_MDEV_EXEC=y
CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
CONFIG_REV=y
CONFIG_ACPID=y
CONFIG_FEATURE_ACPID_COMPAT=y
CONFIG_BLKID=y
# CONFIG_FEATURE_BLKID_TYPE is not set
CONFIG_DMESG=y
CONFIG_FEATURE_DMESG_PRETTY=y
CONFIG_FBSET=y
CONFIG_FEATURE_FBSET_FANCY=y
CONFIG_FEATURE_FBSET_READMODE=y
CONFIG_FDFLUSH=y
CONFIG_FDFORMAT=y
CONFIG_FDISK=y
# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
CONFIG_FEATURE_FDISK_WRITABLE=y
# CONFIG_FEATURE_AIX_LABEL is not set
# CONFIG_FEATURE_SGI_LABEL is not set
# CONFIG_FEATURE_SUN_LABEL is not set
# CONFIG_FEATURE_OSF_LABEL is not set
# CONFIG_FEATURE_GPT_LABEL is not set
CONFIG_FEATURE_FDISK_ADVANCED=y
CONFIG_FINDFS=y
CONFIG_FLOCK=y
CONFIG_FREERAMDISK=y
CONFIG_FSCK_MINIX=y
CONFIG_MKFS_EXT2=y
CONFIG_MKFS_MINIX=y
CONFIG_FEATURE_MINIX2=y
# CONFIG_MKFS_REISER is not set
CONFIG_MKFS_VFAT=y
CONFIG_GETOPT=y
CONFIG_FEATURE_GETOPT_LONG=y
CONFIG_HEXDUMP=y
CONFIG_FEATURE_HEXDUMP_REVERSE=y
CONFIG_HD=y
CONFIG_HWCLOCK=y
CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
CONFIG_IPCRM=y
CONFIG_IPCS=y
CONFIG_LOSETUP=y
CONFIG_LSPCI=y
CONFIG_LSUSB=y
CONFIG_MKSWAP=y
CONFIG_FEATURE_MKSWAP_UUID=y
CONFIG_MORE=y
CONFIG_MOUNT=y
CONFIG_FEATURE_MOUNT_FAKE=y
CONFIG_FEATURE_MOUNT_VERBOSE=y
# CONFIG_FEATURE_MOUNT_HELPERS is not set
CONFIG_FEATURE_MOUNT_LABEL=y
# CONFIG_FEATURE_MOUNT_NFS is not set
CONFIG_FEATURE_MOUNT_CIFS=y
CONFIG_FEATURE_MOUNT_FLAGS=y
CONFIG_FEATURE_MOUNT_FSTAB=y
CONFIG_PIVOT_ROOT=y
CONFIG_RDATE=y
CONFIG_RDEV=y
CONFIG_READPROFILE=y
CONFIG_RTCWAKE=y
CONFIG_SCRIPT=y
CONFIG_SCRIPTREPLAY=y
CONFIG_SETARCH=y
CONFIG_SWAPONOFF=y
CONFIG_FEATURE_SWAPON_DISCARD=y
CONFIG_FEATURE_SWAPON_PRI=y
CONFIG_SWITCH_ROOT=y
CONFIG_UMOUNT=y
CONFIG_FEATURE_UMOUNT_ALL=y
#
# Common options for mount/umount
#
CONFIG_FEATURE_MOUNT_LOOP=y
CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
# CONFIG_FEATURE_MTAB_SUPPORT is not set
CONFIG_VOLUMEID=y
#
# Filesystem/Volume identification
#
CONFIG_FEATURE_VOLUMEID_BTRFS=y
CONFIG_FEATURE_VOLUMEID_CRAMFS=y
CONFIG_FEATURE_VOLUMEID_EXFAT=y
CONFIG_FEATURE_VOLUMEID_EXT=y
CONFIG_FEATURE_VOLUMEID_F2FS=y
CONFIG_FEATURE_VOLUMEID_FAT=y
CONFIG_FEATURE_VOLUMEID_HFS=y
CONFIG_FEATURE_VOLUMEID_ISO9660=y
CONFIG_FEATURE_VOLUMEID_JFS=y
CONFIG_FEATURE_VOLUMEID_LINUXRAID=y
CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y
CONFIG_FEATURE_VOLUMEID_LUKS=y
CONFIG_FEATURE_VOLUMEID_NILFS=y
CONFIG_FEATURE_VOLUMEID_NTFS=y
CONFIG_FEATURE_VOLUMEID_OCFS2=y
CONFIG_FEATURE_VOLUMEID_REISERFS=y
CONFIG_FEATURE_VOLUMEID_ROMFS=y
# CONFIG_FEATURE_VOLUMEID_SQUASHFS is not set
CONFIG_FEATURE_VOLUMEID_SYSV=y
CONFIG_FEATURE_VOLUMEID_UDF=y
CONFIG_FEATURE_VOLUMEID_XFS=y
#
# Miscellaneous Utilities
#
CONFIG_CONSPY=y
CONFIG_CROND=y
CONFIG_FEATURE_CROND_D=y
CONFIG_FEATURE_CROND_CALL_SENDMAIL=y
CONFIG_FEATURE_CROND_DIR="/var/spool/cron"
CONFIG_LESS=y
CONFIG_FEATURE_LESS_MAXLINES=9999999
CONFIG_FEATURE_LESS_BRACKETS=y
CONFIG_FEATURE_LESS_FLAGS=y
CONFIG_FEATURE_LESS_MARKS=y
CONFIG_FEATURE_LESS_REGEXP=y
CONFIG_FEATURE_LESS_WINCH=y
CONFIG_FEATURE_LESS_ASK_TERMINAL=y
CONFIG_FEATURE_LESS_DASHCMD=y
CONFIG_FEATURE_LESS_LINENUMS=y
CONFIG_NANDWRITE=y
CONFIG_NANDDUMP=y
# CONFIG_RFKILL is not set
CONFIG_SETSERIAL=y
# CONFIG_TASKSET is not set
# CONFIG_FEATURE_TASKSET_FANCY is not set
CONFIG_UBIATTACH=y
CONFIG_UBIDETACH=y
CONFIG_UBIMKVOL=y
CONFIG_UBIRMVOL=y
CONFIG_UBIRSVOL=y
CONFIG_UBIUPDATEVOL=y
CONFIG_WALL=y
CONFIG_ADJTIMEX=y
# CONFIG_BBCONFIG is not set
# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set
CONFIG_BEEP=y
CONFIG_FEATURE_BEEP_FREQ=4000
CONFIG_FEATURE_BEEP_LENGTH_MS=30
CONFIG_CHAT=y
CONFIG_FEATURE_CHAT_NOFAIL=y
# CONFIG_FEATURE_CHAT_TTY_HIFI is not set
CONFIG_FEATURE_CHAT_IMPLICIT_CR=y
CONFIG_FEATURE_CHAT_SWALLOW_OPTS=y
CONFIG_FEATURE_CHAT_SEND_ESCAPES=y
CONFIG_FEATURE_CHAT_VAR_ABORT_LEN=y
CONFIG_FEATURE_CHAT_CLR_ABORT=y
CONFIG_CHRT=y
CONFIG_CRONTAB=y
CONFIG_DC=y
CONFIG_FEATURE_DC_LIBM=y
# CONFIG_DEVFSD is not set
# CONFIG_DEVFSD_MODLOAD is not set
# CONFIG_DEVFSD_FG_NP is not set
# CONFIG_DEVFSD_VERBOSE is not set
# CONFIG_FEATURE_DEVFS is not set
CONFIG_DEVMEM=y
CONFIG_EJECT=y
CONFIG_FEATURE_EJECT_SCSI=y
CONFIG_FBSPLASH=y
# CONFIG_FLASHCP is not set
# CONFIG_FLASH_LOCK is not set
# CONFIG_FLASH_UNLOCK is not set
# CONFIG_FLASH_ERASEALL is not set
CONFIG_IONICE=y
# CONFIG_INOTIFYD is not set
CONFIG_LAST=y
# CONFIG_FEATURE_LAST_SMALL is not set
CONFIG_FEATURE_LAST_FANCY=y
CONFIG_HDPARM=y
CONFIG_FEATURE_HDPARM_GET_IDENTITY=y
CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y
CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y
CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y
CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y
CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y
CONFIG_MAKEDEVS=y
# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
CONFIG_FEATURE_MAKEDEVS_TABLE=y
CONFIG_MAN=y
CONFIG_MICROCOM=y
CONFIG_MOUNTPOINT=y
CONFIG_MT=y
CONFIG_RAIDAUTORUN=y
CONFIG_READAHEAD=y
CONFIG_RUNLEVEL=y
CONFIG_RX=y
CONFIG_SETSID=y
CONFIG_STRINGS=y
CONFIG_TIME=y
CONFIG_TIMEOUT=y
CONFIG_TTYSIZE=y
CONFIG_VOLNAME=y
CONFIG_WATCHDOG=y
#
# Networking Utilities
#
CONFIG_NAMEIF=y
CONFIG_FEATURE_NAMEIF_EXTENDED=y
CONFIG_NBDCLIENT=y
CONFIG_NC=y
CONFIG_NC_SERVER=y
CONFIG_NC_EXTRA=y
# CONFIG_NC_110_COMPAT is not set
CONFIG_PING=y
CONFIG_PING6=y
CONFIG_FEATURE_FANCY_PING=y
CONFIG_WHOIS=y
CONFIG_FEATURE_IPV6=y
# CONFIG_FEATURE_UNIX_LOCAL is not set
CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
CONFIG_ARP=y
CONFIG_ARPING=y
CONFIG_BRCTL=y
CONFIG_FEATURE_BRCTL_FANCY=y
CONFIG_FEATURE_BRCTL_SHOW=y
CONFIG_DNSD=y
CONFIG_ETHER_WAKE=y
CONFIG_FAKEIDENTD=y
CONFIG_FTPD=y
CONFIG_FEATURE_FTP_WRITE=y
CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y
CONFIG_FEATURE_FTP_AUTHENTICATION=y
CONFIG_FTPGET=y
CONFIG_FTPPUT=y
CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y
CONFIG_HOSTNAME=y
CONFIG_HTTPD=y
CONFIG_FEATURE_HTTPD_RANGES=y
CONFIG_FEATURE_HTTPD_SETUID=y
CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
CONFIG_FEATURE_HTTPD_AUTH_MD5=y
CONFIG_FEATURE_HTTPD_CGI=y
CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
CONFIG_FEATURE_HTTPD_PROXY=y
CONFIG_FEATURE_HTTPD_GZIP=y
CONFIG_IFCONFIG=y
CONFIG_FEATURE_IFCONFIG_STATUS=y
CONFIG_FEATURE_IFCONFIG_SLIP=y
CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y
CONFIG_FEATURE_IFCONFIG_HW=y
CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
CONFIG_IFENSLAVE=y
CONFIG_IFPLUGD=y
CONFIG_IFUPDOWN=y
CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
CONFIG_FEATURE_IFUPDOWN_IP=y
CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
CONFIG_FEATURE_IFUPDOWN_IPV4=y
CONFIG_FEATURE_IFUPDOWN_IPV6=y
CONFIG_FEATURE_IFUPDOWN_MAPPING=y
# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
CONFIG_INETD=y
CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
# CONFIG_FEATURE_INETD_RPC is not set
CONFIG_IP=y
CONFIG_FEATURE_IP_ADDRESS=y
CONFIG_FEATURE_IP_LINK=y
CONFIG_FEATURE_IP_ROUTE=y
CONFIG_FEATURE_IP_TUNNEL=y
CONFIG_FEATURE_IP_RULE=y
CONFIG_FEATURE_IP_SHORT_FORMS=y
# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
CONFIG_IPADDR=y
CONFIG_IPLINK=y
CONFIG_IPROUTE=y
CONFIG_IPTUNNEL=y
CONFIG_IPRULE=y
CONFIG_IPCALC=y
CONFIG_FEATURE_IPCALC_FANCY=y
CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y
CONFIG_NETSTAT=y
CONFIG_FEATURE_NETSTAT_WIDE=y
CONFIG_FEATURE_NETSTAT_PRG=y
CONFIG_NSLOOKUP=y
CONFIG_NTPD=y
CONFIG_FEATURE_NTPD_SERVER=y
CONFIG_FEATURE_NTPD_CONF=y
CONFIG_PSCAN=y
CONFIG_ROUTE=y
CONFIG_SLATTACH=y
CONFIG_TCPSVD=y
CONFIG_TELNET=y
CONFIG_FEATURE_TELNET_TTYPE=y
CONFIG_FEATURE_TELNET_AUTOLOGIN=y
CONFIG_TELNETD=y
CONFIG_FEATURE_TELNETD_STANDALONE=y
CONFIG_FEATURE_TELNETD_INETD_WAIT=y
CONFIG_TFTP=y
CONFIG_TFTPD=y
#
# Common options for tftp/tftpd
#
CONFIG_FEATURE_TFTP_GET=y
CONFIG_FEATURE_TFTP_PUT=y
CONFIG_FEATURE_TFTP_BLOCKSIZE=y
CONFIG_FEATURE_TFTP_PROGRESS_BAR=y
# CONFIG_TFTP_DEBUG is not set
CONFIG_TRACEROUTE=y
CONFIG_TRACEROUTE6=y
CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
CONFIG_TUNCTL=y
CONFIG_FEATURE_TUNCTL_UG=y
# CONFIG_UDHCPC6 is not set
CONFIG_UDHCPD=y
CONFIG_DHCPRELAY=y
CONFIG_DUMPLEASES=y
CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY=y
# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set
CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases"
CONFIG_UDHCPC=y
CONFIG_FEATURE_UDHCPC_ARPING=y
CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y
# CONFIG_FEATURE_UDHCP_PORT is not set
CONFIG_UDHCP_DEBUG=9
CONFIG_FEATURE_UDHCP_RFC3397=y
CONFIG_FEATURE_UDHCP_8021Q=y
CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
CONFIG_UDPSVD=y
CONFIG_VCONFIG=y
CONFIG_WGET=y
CONFIG_FEATURE_WGET_STATUSBAR=y
CONFIG_FEATURE_WGET_AUTHENTICATION=y
CONFIG_FEATURE_WGET_LONG_OPTIONS=y
CONFIG_FEATURE_WGET_TIMEOUT=y
CONFIG_ZCIP=y
#
# Print Utilities
#
CONFIG_LPD=y
CONFIG_LPR=y
CONFIG_LPQ=y
#
# Mail Utilities
#
CONFIG_MAKEMIME=y
CONFIG_FEATURE_MIME_CHARSET="us-ascii"
CONFIG_POPMAILDIR=y
CONFIG_FEATURE_POPMAILDIR_DELIVERY=y
CONFIG_REFORMIME=y
CONFIG_FEATURE_REFORMIME_COMPAT=y
CONFIG_SENDMAIL=y
#
# Process Utilities
#
CONFIG_IOSTAT=y
CONFIG_LSOF=y
CONFIG_MPSTAT=y
CONFIG_NMETER=y
CONFIG_PMAP=y
CONFIG_POWERTOP=y
CONFIG_PSTREE=y
CONFIG_PWDX=y
CONFIG_SMEMCAP=y
CONFIG_TOP=y
CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
CONFIG_FEATURE_TOP_SMP_CPU=y
CONFIG_FEATURE_TOP_DECIMALS=y
CONFIG_FEATURE_TOP_SMP_PROCESS=y
CONFIG_FEATURE_TOPMEM=y
CONFIG_UPTIME=y
CONFIG_FEATURE_UPTIME_UTMP_SUPPORT=y
CONFIG_FREE=y
CONFIG_FUSER=y
CONFIG_KILL=y
CONFIG_KILLALL=y
CONFIG_KILLALL5=y
CONFIG_PGREP=y
CONFIG_PIDOF=y
CONFIG_FEATURE_PIDOF_SINGLE=y
CONFIG_FEATURE_PIDOF_OMIT=y
CONFIG_PKILL=y
CONFIG_PS=y
# CONFIG_FEATURE_PS_WIDE is not set
# CONFIG_FEATURE_PS_LONG is not set
CONFIG_FEATURE_PS_TIME=y
CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y
# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
CONFIG_RENICE=y
CONFIG_BB_SYSCTL=y
CONFIG_FEATURE_SHOW_THREADS=y
CONFIG_WATCH=y
#
# Runit Utilities
#
CONFIG_RUNSV=y
CONFIG_RUNSVDIR=y
# CONFIG_FEATURE_RUNSVDIR_LOG is not set
CONFIG_SV=y
CONFIG_SV_DEFAULT_SERVICE_DIR="/var/service"
CONFIG_SVLOGD=y
CONFIG_CHPST=y
CONFIG_SETUIDGID=y
CONFIG_ENVUIDGID=y
CONFIG_ENVDIR=y
CONFIG_SOFTLIMIT=y
# CONFIG_CHCON is not set
# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
# CONFIG_GETENFORCE is not set
# CONFIG_GETSEBOOL is not set
# CONFIG_LOAD_POLICY is not set
# CONFIG_MATCHPATHCON is not set
# CONFIG_RESTORECON is not set
# CONFIG_RUNCON is not set
# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
# CONFIG_SELINUXENABLED is not set
# CONFIG_SETENFORCE is not set
# CONFIG_SETFILES is not set
# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
# CONFIG_SETSEBOOL is not set
# CONFIG_SESTATUS is not set
#
# Shells
#
CONFIG_ASH=y
CONFIG_ASH_BASH_COMPAT=y
# CONFIG_ASH_IDLE_TIMEOUT is not set
CONFIG_ASH_JOB_CONTROL=y
CONFIG_ASH_ALIAS=y
CONFIG_ASH_GETOPTS=y
CONFIG_ASH_BUILTIN_ECHO=y
CONFIG_ASH_BUILTIN_PRINTF=y
CONFIG_ASH_BUILTIN_TEST=y
CONFIG_ASH_HELP=y
CONFIG_ASH_CMDCMD=y
# CONFIG_ASH_MAIL is not set
CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
CONFIG_ASH_RANDOM_SUPPORT=y
CONFIG_ASH_EXPAND_PRMT=y
CONFIG_CTTYHACK=y
CONFIG_HUSH=y
CONFIG_HUSH_BASH_COMPAT=y
CONFIG_HUSH_BRACE_EXPANSION=y
CONFIG_HUSH_HELP=y
CONFIG_HUSH_INTERACTIVE=y
CONFIG_HUSH_SAVEHISTORY=y
CONFIG_HUSH_JOB=y
CONFIG_HUSH_TICK=y
CONFIG_HUSH_IF=y
CONFIG_HUSH_LOOPS=y
CONFIG_HUSH_CASE=y
CONFIG_HUSH_FUNCTIONS=y
CONFIG_HUSH_LOCAL=y
CONFIG_HUSH_RANDOM_SUPPORT=y
CONFIG_HUSH_EXPORT_N=y
CONFIG_HUSH_MODE_X=y
# CONFIG_MSH is not set
CONFIG_FEATURE_SH_IS_ASH=y
# CONFIG_FEATURE_SH_IS_HUSH is not set
# CONFIG_FEATURE_SH_IS_NONE is not set
# CONFIG_FEATURE_BASH_IS_ASH is not set
# CONFIG_FEATURE_BASH_IS_HUSH is not set
CONFIG_FEATURE_BASH_IS_NONE=y
CONFIG_SH_MATH_SUPPORT=y
CONFIG_SH_MATH_SUPPORT_64=y
CONFIG_FEATURE_SH_EXTRA_QUIET=y
# CONFIG_FEATURE_SH_STANDALONE is not set
# CONFIG_FEATURE_SH_NOFORK is not set
CONFIG_FEATURE_SH_HISTFILESIZE=y
#
# System Logging Utilities
#
CONFIG_SYSLOGD=y
CONFIG_FEATURE_ROTATE_LOGFILE=y
CONFIG_FEATURE_REMOTE_LOG=y
CONFIG_FEATURE_SYSLOGD_DUP=y
CONFIG_FEATURE_SYSLOGD_CFG=y
CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
CONFIG_FEATURE_IPC_SYSLOG=y
CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
CONFIG_LOGREAD=y
CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
CONFIG_FEATURE_KMSG_SYSLOG=y
CONFIG_KLOGD=y
#
# klogd should not be used together with syslog to kernel printk buffer
#
CONFIG_FEATURE_KLOGD_KLOGCTL=y
CONFIG_LOGGER=y
updated to 1.25.0 with lastest patches from busybox.net
Update 1.25.1 plzz

Create the script that modifies defconfig

Hi , I create the script that modifies defconfig and the modified defconfig copies to config directory
Please use at the root of kernel source. In may case, the root of kernel source is ~/ASOP12/kernel/samsung/hlte
then usage is
~/ASOP12/kernel/samsung/hlte$ ./make_defconfig_ver2.sh *****_defconfig
file name is make_defconfig_ver2.sh
Code:
#!/bin/bash
DEFCONFIG_FILE=$1
if [ -z "$DEFCONFIG_FILE" ]; then
echo "Need defconfig file(j1v-perf_defconfig)!"
exit -1
fi
if [ ! -e arch/arm/configs/$DEFCONFIG_FILE ]; then
echo "No such file : arch/arm/configs/$DEFCONFIG_FILE"
exit -1
fi
# make .config
env KCONFIG_NOTIMESTAMP=true \
make defconfig ARCH=arm VARIANT_DEFCONFIG=${DEFCONFIG_FILE}
# run xconfig
env KCONFIG_NOTIMESTAMP=true \
make xconfig VARIANT_DEFCONFIG=${DEFCONFIG_FILE}
#make savedefconfig ARCH=arm
# copy .config to defconfig
#mv defconfig arch/arm/configs/${DEFCONFIG_FILE}
cp .config arch/arm/configs/${DEFCONFIG_FILE}
# clean kernel object
#make mrproper
Please use. Enjoy:laugh:

Categories

Resources