{
"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"
}
Paranoid Android is a custom rom focused on open devices.
We aim to not simply add to Android but extend it, utilizing the same design philosophies Google uses with AOSP (Android Open Source Project).
AOSPA General Changelog
Quote:
Code:
#include
/*
* Your warranty is now not void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
Installation Instruction
New Install
Be on a KitKat ROM before flashing
You must have a custom recovery installed that allows SELinux.
Download the Xiaomi Mi3 build .
Download the gapps
Disable True Dual Boot
Fully wipe is highly recommended.
Install AOSPA on System 1
Wipe Dalvik and Cache
Reboot
Updating
Download rom and install
Reboot
AOSPA Cancro Download Link
Useful Link
AOSPA Official Page
AOSPA Legacy Google+ Community
MIUI Forum Community
Credits
varun.chitre15, qiwu, linuxxxx, Shahan_mik3,MI3 Cancro Devs, AOSPA Devs, Cyanogenmod Devs, Omni Dev, Community
Bugs :
What generally cm/aospa have
Random reboot (deep sleep & in call)..workaround for now
HDR not working
USB otg not working
Will be added in the journey..still fresh.
How To Build From Source
CAUTION : My work is a mess cause I'm not that good at dev. Sometime build may will break or device won't boot.
Mi3 cancro device tree
Mi3 cancro vendor tree
AOSPA Legacy Source : repo init -u git://github.com/AOSPA-legacy/manifest.git -b kitkat
Local Manifest
Build script
#!/bin/bash
# Version 2.0.4, Adapted for AOSPA.
export USE_CCACHE=1
export CCACHE_DIR=/media/audahadi/b6234e42-ff56-4372-956d-184e596b9e3e/audahadi/.ccache
# We don't allow scrollback buffer
echo -e '\0033\0143'
clear
# Get current path
DIR="$(cd `dirname $0`; pwd)"
OUT="$(readlink $DIR/out)"
[ -z "${OUT}" ] && OUT="${DIR}/out"
# Prepare output customization commands
red=$(tput setaf 1) # red
grn=$(tput setaf 2) # green
blu=$(tput setaf 4) # blue
cya=$(tput setaf 6) # cyan
txtbld=$(tput bold) # Bold
bldred=${txtbld}$(tput setaf 1) # red
bldgrn=${txtbld}$(tput setaf 2) # green
bldblu=${txtbld}$(tput setaf 4) # blue
bldcya=${txtbld}$(tput setaf 6) # cyan
txtrst=$(tput sgr0) # Reset
# Local defaults, can be overriden by environment
: ${PREFS_FROM_SOURCE:="false"}
: ${THREADS:="$(cat /proc/cpuinfo | grep "^processor" | wc -l)"}
# If there is more than one jdk installed, use latest 6.x
if [ "`update-alternatives --list javac | wc -l`" -gt 1 ]; then
JDK6=$(dirname `update-alternatives --list javac | grep "\-6\-"` | tail -n1)
JRE6=$(dirname ${JDK6}/../jre/bin/java)
export PATH=${JDK6}:${JRE6}:$PATH
fi
JVER=$(javac -version 2>&1 | head -n1 | cut -f2 -d' ')
# Import command line parameters
DEVICE="$1"
EXTRAS="$2"
# Get build version
MAJOR=$(cat /media/audahadi/b6234e42-ff56-4372-956d-184e596b9e3e/audahadi/AOSPAL/vendor/pa/vendor.mk | grep 'ROM_VERSION_MAJOR := *' | sed 's/ROM_VERSION_MAJOR := //g')
MINOR=$(cat /media/audahadi/b6234e42-ff56-4372-956d-184e596b9e3e/audahadi/AOSPAL/vendor/pa/vendor.mk | grep 'ROM_VERSION_MINOR := *' | sed 's/ROM_VERSION_MINOR := //g')
MAINTENANCE=$(cat /media/audahadi/b6234e42-ff56-4372-956d-184e596b9e3e/audahadi/AOSPAL/vendor/pa/vendor.mk | grep 'ROM_VERSION_MAINTENANCE := *' | sed 's/ROM_VERSION_MAINTENANCE := //g')
TAG=$(cat /media/audahadi/b6234e42-ff56-4372-956d-184e596b9e3e/audahadi/AOSPAL/vendor/pa/vendor.mk | grep 'ROM_VERSION_TAG := *' | sed 's/ROM_VERSION_TAG := //g')
if [ -n "$TAG" ]; then
VERSION=$MAJOR.$MINOR$MAINTENANCE-$TAG
else
VERSION=$MAJOR.$MINOR$MAINTENANCE
fi
# If there is no extra parameter, reduce parameters index by 1
if [ "$EXTRAS" == "true" ] || [ "$EXTRAS" == "false" ]; then
SYNC="$2"
UPLOAD="$3"
else
SYNC="$3"
UPLOAD="$4"
fi
# Get start time
res1=$(date +%s.%N)
echo -e "${cya}Building ${bldcya}AOSPA $VERSION for $DEVICE ${txtrst}";
echo -e "${bldgrn}Start time: $(date) ${txtrst}"
# Decide what command to execute
case "$EXTRAS" in
threads)
echo -e "${bldblu}Please enter desired building/syncing threads number followed by [ENTER]${txtrst}"
read threads
THREADS=$threads
;;
clean|cclean)
echo -e "${bldblu}Cleaning intermediates and output files${txtrst}"
export CLEAN_BUILD="true"
[ -d "${DIR}/out" ] && rm -Rf ${DIR}/out/*
;;
esac
echo -e ""
export DEVICE=cancro
# Fetch latest sources
if [ "$SYNC" == "true" ]; then
echo -e ""
echo -e "${bldblu}Fetching latest sources${txtrst}"
repo sync -j"$THREADS"
echo -e ""
fi
if [ ! -r "${DIR}/out/versions_checked.mk" ] && [ -n "$(java -version 2>&1 | grep -i openjdk)" ]; then
echo -e "${bldcya}Your java version still not checked and is candidate to fail, masquerading.${txtrst}"
JAVA_VERSION="java_version=${JVER}"
fi
if [ -n "${INTERACTIVE}" ]; then
echo -e "${bldblu}Dropping to interactive shell${txtrst}"
echo -en "${bldblu}Remeber to lunch you device:"
if [ "${VENDOR}" == "pa" ]; then
echo -e "[${bldgrn}lunch pa_$DEVICE-userdebug${bldblu}]${txtrst}"
else
echo -e "[${bldgrn}lunch full_$DEVICE-userdebug${bldblu}]${txtrst}"
fi
bash --init-file build/envsetup.sh -i
else
# Setup environment
echo -e ""
echo -e "${bldblu}Setting up environment${txtrst}"
. build/envsetup.sh
echo -e ""
# lunch/brunch device
echo -e "${bldblu}Lunching device [$DEVICE] ${cya}(Includes dependencies sync)${txtrst}"
export PREFS_FROM_SOURCE
lunch "pa_$DEVICE-userdebug";
echo -e "${bldblu}Starting compilation${txtrst}"
mka bacon
fi
echo -e ""
# Get elapsed time
res2=$(date +%s.%N)
echo -e "${bldgrn}Total time elapsed: ${txtrst}${grn}$(echo "($res2 - $res1) / 60"|bc ) minutes ($(echo "$res2 - $res1"|bc ) seconds)${txtrst}"
Note 2 : Change this path "/media/audahadi/b6234e42-ff56-4372-956d-184e596b9e3e/audahadi" to your working directory
Note 3 : Add this to vendor/pa
Path : vendor/pa/vendorsetup.sh
add_lunch_combo pa_cancro-userdebug
Path : vendor/pa/products/AndroidProducts.mk
ifeq (pa_cancro,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_cancro.mk
endif
Path : vendor/pa/products/pa_cancro.mk
# Copyright (C) 2014 ParanoidAndroid 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.
# Check for target product
ifeq (pa_cancro,$(TARGET_PRODUCT))
# OVERLAY_TARGET adds overlay asset source
OVERLAY_TARGET := pa_xxhdpi
# Build paprefs from sources
PREFS_FROM_SOURCE ?= false
# Inherit telephony common stuff
$(call inherit-product, vendor/pa/configs/telephony.mk)
# Include AOSPA common configuration
include vendor/pa/main.mk
# Inherit device configuration
$(call inherit-product, device/xiaomi/cancro/full_cancro.mk)
# Override AOSP build properties
PRODUCT_DEVICE := cancro
PRODUCT_NAME := pa_cancro
PRODUCT_BRAND := xiaomi
PRODUCT_MODEL := MI 3W
PRODUCT_MANUFACTURER := Xiaomi
# Set build fingerprint / ID / Product Name ect.
PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=cancro TARGET_DEVICE=cancro
endif
Nice one..
Sent from my MI 3W
Waiting for it. Finally!! Thanks man.
Any problem with installing rom? Got pm someone mention it.
Sent from my Mi3 using Tapatalk
audahadi said:
Any problem with installing rom? Got pm someone mention it.
Sent from my Mi3 using Tapatalk
Click to expand...
Click to collapse
Chkout the miui thread for ur rom
http://en.miui.com/thread-42417-1-1.html
Shahan_mik3 said:
Chkout the miui thread for ur rom
http://en.miui.com/thread-42417-1-1.html
Click to expand...
Click to collapse
Not my rom..AOSPA..[emoji13]..Just mirror download link if you want too... Just for reminder..mostly I'm on xda..so won't check issue there much.
Sent from my Mi3 using Tapatalk
audahadi said:
Not my rom..AOSPA..[emoji13]..Just mirror download link if you want too... Just for reminder..mostly I'm on xda..so won't check issue there much.
Sent from my Mi3 using Tapatalk
Click to expand...
Click to collapse
Yes the thread is yet to be modified did it in a hurry.. Will give credits after u updated the thread.
Also I will remove the download link as more ppl will visit the thread to download ur ROM
We will do our best to resolve it or they will be redirected here
can't install
audahadi said:
Any problem with installing rom? Got pm someone mention it.
Sent from my Mi3 using Tapatalk
Click to expand...
Click to collapse
hey OP,
thanks for the efforts for getting PA to our Mi3
Unfortunately, when i download the zip file and move it to my phone, i'm getting an error "This device has either stopped responding or has been disconnected"
It happens only on your zip, when transferring to the sd card. Any other file can be transferred without issues.
I also noticed that in the file's properties, it is set to block (as it apparently came from another source), and there's an unblock button available for you to click on.
Did that and the same thing happened.
However, changing the file ext from zip to .txt allows me to transfer the file easily to my phone. I changed it back to .zip, rebooted to recovery and flashed the rom but failed - I didn't get the error but it somehow refers to the file as corrupted or non-supported.
Any help will be greatly appreciated! We're talking about PA here - AOSPA so I'm very excited about it!
Sorry for corrupt zip. This is new build.
https://docs.google.com/file/d/0B3JXRJM_jo8LQ1BzLXdCb3JBM1k/edit?usp=docslist_api
*fix auto brightness
*add notification led
Sent from my MI 3W using Tapatalk
audahadi said:
Sorry for corrupt zip. This is new build.
https://docs.google.com/file/d/0B3JXRJM_jo8LQ1BzLXdCb3JBM1k/edit?usp=docslist_api
*fix auto brightness
*add notification led
Sent from my MI 3W using Tapatalk
Click to expand...
Click to collapse
Also your ROM is in wrong section
It should be in android development but is in general.
Shahan_mik3 said:
Also your ROM is in wrong section
It should be in android development but is in general.
Click to expand...
Click to collapse
Mod edit until I revamp my OP (this weekend-busy days). Will do proper with all guide and credits.
Sent from my MI 3W using Tapatalk
audahadi said:
Mod edit until I revamp my OP (this weekend-busy days). Will do proper with all guide and credits.
Sent from my MI 3W using Tapatalk
Click to expand...
Click to collapse
You can just copy paste from miui thread and edit credit part.
For now then properly edit it later
audahadi said:
Sorry for corrupt zip. This is new build.
https://docs.google.com/file/d/0B3JXRJM_jo8LQ1BzLXdCb3JBM1k/edit?usp=docslist_api
*fix auto brightness
*add notification led
Sent from my MI 3W using Tapatalk
Click to expand...
Click to collapse
thanks for this, i had problems too with previous zip. will try asap.
what do you mean with auto brightness fixed? i mean, it doesn't even work in cm...?!
thanks!!
audahadi said:
Sorry for corrupt zip. This is new build.
https://docs.google.com/file/d/0B3JXRJM_jo8LQ1BzLXdCb3JBM1k/edit?usp=docslist_api
*fix auto brightness
*add notification led
Sent from my MI 3W using Tapatalk
Click to expand...
Click to collapse
Also Dynamic statusbar is not available. can you please confirm if its available in the build???
moly82 said:
thanks for this, i had problems too with previous zip. will try asap.
what do you mean with auto brightness fixed? i mean, it doesn't even work in cm...?!
thanks!!
Click to expand...
Click to collapse
Don't try cm yet...but my previous build can't enable auto brightness..
Missing config.
Shahan_mik3 said:
Also Dynamic statusbar is not available. can you please confirm if its available in the build???
Click to expand...
Click to collapse
Dynamic status bar and new recent not available in unofficial build. Need to wait for PA release source and got merge in aospa-legacy source.
Sent from my MI 3W using Tapatalk
audahadi said:
Don't try cm yet...but my previous build can't enable auto brightness..
Missing config.
Dynamic status bar and new recent not available in unofficial build. Need to wait for PA release source and got merge in aospa-legacy source.
Sent from my MI 3W using Tapatalk
Click to expand...
Click to collapse
It is available for legacy devices dude....I tried it on my galaxy s2 2/9 build
Shahan_mik3 said:
It is available for legacy devices dude....I tried it on my galaxy s2 2/9 build
Click to expand...
Click to collapse
yup it is work with legacy device, but mi3 is not yet a PA legacy device....
i04055 said:
yup it is work with legacy device, but mi3 is not yet a PA legacy device....
Click to expand...
Click to collapse
I know...he told the sources are not merged for legacy device that's why I told.
Shahan_mik3 said:
I know...he told the sources are not merged for legacy device that's why I told.
Click to expand...
Click to collapse
Unofficial mean device that not officially supported by PA members. PA build internally for rom released. Not directly from their source. When features is stable, they will release source.
Sent from my MI 3W using Tapatalk
Related
hello folks!
i have been working on kernels for various xperia devices since the Xperia X10... i will update this thread with information on how to build kernels for various xperia devices...
Sony (Ericsson) started off helping the developer community with information on how to build kernels:
http://developer.sonymobile.com/2011/05/06/how-to-build-a-linux-kernel/
do read the above post, though its slightly old (2011), its really good! Since then Sony has released various devices which use a variety of chipsets and each chipset has different ways to build bootable kernel...
the objective of this thread is to provide brief instructions for some of these chipsets across the various device generations to build bootable kernels...
this will not cover how to build working ramdisks... you can always use the stock ramdisks from kernel.sin... here is how to get stock ramdisk out from kernel.sin...
Toolchains:
I have tested various toolchains for building kernels and very few work correctly on the kernel sources to get bootable kernel.
The toolchains which worked for me are:
arm-eabi-4.4.3 - GCC 4.4.3 toolchain from CyanogenMod repo
arm-eabi-linaro-4.6.2 - GCC Linaro 4.6.2 (2011.10) toolchain
arm-linux-androideabi-4.7 - GCC 4.7 from Google repo
all of these are posted on my git repo:
https://github.com/DooMLoRD/android_prebuilt_toolchains
sometimes the kernel sources need to be modified slightly to support compiling using these toolchains. I have mentioned the necessary patches where-ever applicable.
Instructions for various generation of devices:
Xperia 2014 (H1) - msm8974ab - Xperia Z2
Xperia 2013 (H2) - msm8974 - Xperia Z1, Z Ultra, Z Ultra GPe, Z1 Compact
Xperia 2013 (H1) - apq8064 - Xperia Z, ZL, ZR, Tablet Z
Xperia 2013 (H1) - msm8960t - Xperia SP
Xperia 2012 (H2) - msm8960 - Xperia T, TX, V
Xperia 2012 (H1) - msm8660 - Xperia S, SL, Ion, Acro S
Xperia 2011 - msm8x55/msm7x30 - Xperia Arc, Play, Neo, Ray, etc
reserved for later
Instructions for MSM8x55/MSM7x30
Latest sources available at:
http://developer.sonymobile.com/dow...ves/open-source-archive-for-build-4-1-b-1-13/
Recommended toolchain:
GCC 4.6 Linaro
Fix Makefile for 4.6 Toolchain:
Code:
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Werror \
to:
Code:
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Wno-unused-but-set-variable -Wno-uninitialized \
Supported boards on this platform:
zeus - Xperia Play, Xperia L
mogami - Xperia Arc, Arc S, Ray, Neo, etc
Building kernel (zImage):
for Xperia Arc (anzu):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make semc_anzu_defconfig
for Xperia Play (zeus):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make semc_zeus_defconfig
build zImage
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make -j8
Instructions for building boot.img
first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...
i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/tree/master/msm7x30_mogami_zeus
Sony used the standard boot.img format for this chipset devices
building boot.img
use the following command:
Code:
./mkbootimg --base 0x00200000 --kernel zImage --ramdisk ramdisk.cpio.gz -o boot.img
Special notes
Sometimes the compiled kernel will just not boot, will show blank screen. Workaround is, ramdisks needs to be filled with filler so that total size is bigger.
boot.img can be hotbooted (fastboot boot boot.img)
regards,
DooMLoRD
Novathor?
Instructions for MSM8260/MSM8660
Latest sources available at:
Since I actively develop for a device of this platform (Xperia S) latest sources can found at my git repo:
https://github.com/DooMLoRD/android_kernel_sony_msm8660/tree/sony_sources
Recommended toolchain:
GCC 4.7
Fixes for 4.7 Toolchain:
Makefile fix
defconfig fix
Supported boards on this platform:
fuji- Xperia S, SL, Ion, Acro S
Building kernel (zImage):
for Xperia S (nozomi):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make fuji_nozomi_defconfig
build zImage
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make -j8
Instructions for building kernel.elf
first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...
i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/tree/master/msm8660_fuji
Sony shifted to ELF format for this chipset...
They had posted instructions on there website:
http://developer.sonymobile.com/201...-archive-released-with-building-instructions/
(avoid using those files as they are for GingerBread)
building kernel.elf
use the following command (for JB):
Code:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm
the additional files required are posted at my build tools repo
Special notes
RPM is different for each device and also differs for OS release, so the same RPM wont work on Xperia S or Xperia Ion and GB/ICS/JB each have different RPMs
kernel.elf CANNOT be hotbooted (fastboot boot kernel.elf)
regards,
DooMLoRD
Instructions for MSM8960
Latest sources available at:
Since I actively develop for a device of this platform (Xperia T) latest sources can found at my git repo:
https://github.com/DooMLoRD/android_kernel_sony_msm8960/tree/sony_sources
Recommended toolchain:
GCC 4.6 Linaro
Supported boards on this platform:
blue- Xperia T, TX, V
Building kernel (zImage):
for Xperia T (mint):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make blue_mint_defconfig
build zImage
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make -j8
Instructions for building kernel.elf
first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...
i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/tree/master/msm8960_blue
Sony uses ELF format for this chipset...
building kernel.elf
use the following command (for JB):
Code:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm [email protected],cmdline
the additional files required are posted at my build tools repo
Special notes
RPM is different for each device and also differs for OS release, so the same RPM wont work on Xperia T or Xperia V as each have different RPMs
kernel.elf CANNOT be hotbooted (fastboot boot kernel.elf)
regards,
DooMLoRD
Instructions for MSM8960T
Latest sources available at:
Since I actively develop for a device of this platform (Xperia SP) latest sources can found at my git repo:
https://github.com/DooMLoRD/android_kernel_sony_msm8960t/tree/sony_sources
Recommended toolchain:
GCC 4.7
Fixes for 4.7 Toolchain:
Makefile fix
Supported boards on this platform:
viskan- Xperia SP
Building kernel (zImage):
for Xperia SP (huashan):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make viskan_huashan_defconfig
build zImage
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make -j8
incase u get errors like:
Code:
error : /scripts/gcc-wrapper.py
just correct the permissions of that file
Code:
chmod 755 ./scripts/gcc-wrapper.py
Instructions for building kernel.elf
first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...
i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/tree/master/msm8960t_viskan
Sony uses ELF format for this chipset...
building kernel.elf
use the following command:
Code:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm [email protected],cmdline
the additional files required are posted at my build tools repo
Special notes
kernel.elf CANNOT be hotbooted (fastboot boot kernel.elf)
regards,
DooMLoRD
Instructions for APQ8064
Latest sources available at:
Since I actively develop for a device of this platform (Xperia Z) latest sources can found at my git repo:
https://github.com/DooMLoRD/android_kernel_sony_apq8064/tree/sony_sources
Recommended toolchain:
GCC 4.7
Fixes for 4.7 Toolchain:
Makefile fix
prima fix
Supported boards on this platform:
fusion3- Xperia Z, ZL, Tablet Z, ZR
Building kernel (zImage):
for Xperia Z (yuga):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make fusion3_yuga_defconfig
build zImage
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make -j8
Instructions for building boot.img
first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...
i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/blob/master/apq8064_fusion3
Sony uses slightly different boot.img format for this chipset...
building boot.img
use the following command:
Code:
./mkbootimg --base 0x80200000 --kernel zImage --ramdisk_offset 0x02000000 --cmdline "androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 vmalloc=400M androidboot.emmc=true" --ramdisk ramdisk.cpio.gz -o boot.img
corrected build tools are posted at my build tools repo
Special notes
boot.img CANNOT be hotbooted (fastboot boot boot.img)
regards,
DooMLoRD
Instructions for MSM8974
Latest sources available at:
I will soon be getting the Xperia Z1 and actively develop for it... i will keep the latest sources at my git repo:
https://github.com/DooMLoRD/android_kernel_sony_msm8974/commits/sony_sources
Recommended toolchain:
GCC 4.6
Fixes for 4.6 Toolchain:
Makefile fix 1
Makefile fix 2
Supported boards on this platform:
rhine- Xperia Z1, Z Ultra
Building kernel (zImage):
for Xperia Z1 (honami):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make rhine_honami_defconfig
build zImage
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make -j8
Instructions for building boot.img
first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...
i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/blob/master/msm8974_rhine
Sony uses slightly different boot.img format for this chipset...
building boot.img
krabappel2548 said:
MSM8974 needs something new to build a kernel, this is called a dt.img. This basically is an img file which holds information about the board pagesize, kernel version and some other kernel related things. You can only use a specific dt.img with a kernel, this file needs to be generated by a binary called dtbTool. This binary can be found in the Cyanogen repo's or you can download a prebuild one in this thread.
Click to expand...
Click to collapse
to get the dt.img:
Code:
# path to kernel sources
KERNEL_SRC_PATH=~/android_kernel_sony_msm8974/
echo "generating device tree..."
./dtbTool -o dt.img -s 2048 -p {KERNEL_SRC_PATH}/scripts/dtc/ {KERNEL_SRC_PATH}/arch/arm/boot/
once u have the dt.img along with the zImage and ramdisk.cpio.gz use the following command:
Code:
./mkbootimg --base 0x00000000 --kernel zImage --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --pagesize 2048 --cmdline "androidboot.hardware=qcom user_debug=31 maxcpus=2 msm_rtb.filter=0x3F ehci-hcd.park=3 msm_rtb.enable=0 lpj=192598 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" --ramdisk ramdisk.cpio.gz --dt dt.img -o boot.img
corrected build tools are posted at my build tools repo
Special notes
boot.img CAN be hotbooted (fastboot boot boot.img)
regards,
DooMLoRD
XperianPro said:
Novathor?
Click to expand...
Click to collapse
Later I will add info for them too....
Hello doom,I want to ask you something.I manage to port your doomkernel v22 GB for Arc/Arc S to Neo/Neo V and I want permissions from you to share it in Neo forum.Sorry for asking here, but you don't answer me on the PM that I send you.
Sorry for my English.
Sent from my Xperia Neo V using xda app-developers app
it is possible port the kernel of 'xperia sp on xiaomi mi2a?
the two terminals have the same hardware
updated instructions for MSM8974 kernels
DooMLoRD said:
updated instructions for MSM8974 kernels
Click to expand...
Click to collapse
Please take a look at novathor devices if you have time
Hi sir can you recommend a toolchain for msm7627a (Xperia J) the ones on your github won't work.
Diego910 said:
Please take a look at novathor devices if you have time
Click to expand...
Click to collapse
You need to patch Makefile somethings to disable some flags for these toolchains
Sent from my C6902 using xda app-developers app
@OP
How can I attach my compiled zImage to CM10 build from source? I have already compiled kernel from source and now I want to use it in my CM10 build
Great TUT
Sent from my E15i using xda premium
Great tutorial! But I came across a problem:when compiling a CM kernel for Xperia TX,I need to change the command from
Code:
python mkelf.py -o kernel.elf [email protected] [email protected][COLOR="red"]4[/COLOR]00000,ramdisk [email protected],rpm [email protected],cmdline
to
Code:
python mkelf.py -o kernel.elf [email protected] [email protected][COLOR="red"]7[/COLOR]00000,ramdisk [email protected],rpm [email protected],cmdline
Otherwise the phone won't boot.Only black screen with backlight on and then reboot after pressing the power button,even no Sony/CM logo.
(Another strange case:when I use sksplit to split the official kernel,the ramdisk does lay in 0x81400000.But if I import the hayabusa_defconfig,compile the kernel from Sony source without any change and mkelf with official [email protected],the phone still refuses to boot.I have to change the 4 to 7 to make this kernel boot.Why?)
{MIRO/TIPO/J/E} Addresses
zImage --0x00208000
ramdisk --0x01400000
bootcmd --cmdline
i.e.
python mkelf.py -o boot.img [email protected] [email protected],ramdisk [email protected]
Du you guys have the sgs3 on mind for the omni rom and if is posible when can we spect the first version of this rom that sounds like is going to be an awesom custom rom for all devices.
Jairsantana said:
Du you guys have the sgs3 on mind for the omni rom and if is posible when can we spect the first version of this rom that sounds like is going to be an awesom custom rom for all devices.
Click to expand...
Click to collapse
Device requests are best asked to your device maintainers
However with it being the sgs3, it will probably come out fairly quickly
Sent from my Nexus 7 using Tapatalk now Free
Jairsantana said:
Du you guys have the sgs3 on mind for the omni rom and if is posible when can we spect the first version of this rom that sounds like is going to be an awesom custom rom for all devices.
Click to expand...
Click to collapse
Yes, it's been run on the SGS3, I believe.
pulser_g2 said:
Yes, it's been run on the SGS3, I believe.
Click to expand...
Click to collapse
so we migth get it for note 2(gt-n7100) too?
PS. if u get it builded im happy to try it out even with risk of brick.(got screen cracked so its going to insurance anyways, so i dont care if it bricks)
Jairsantana said:
Du you guys have the sgs3 on mind for the omni rom and if is posible when can we spect the first version of this rom that sounds like is going to be an awesom custom rom for all devices.
Click to expand...
Click to collapse
I9300 or a USA version? Rebellos has been working on I9300. For US variants - while technically they are easier to support due to being Qcom-based, no current Omni members have a Qcom-based S3. We'll see what the next few days/weeks bring in terms of maintainer support.
I'm doing a build for d2spr tomorrow and seeing how it goes. I might pick up the other d2xxx too.
Just because one is anonymous doesn't mean that one has privacy.
jamcar said:
I'm doing a build for d2spr tomorrow and seeing how it goes. I might pick up the other d2xxx too.
Just because one is anonymous doesn't mean that one has privacy.
Click to expand...
Click to collapse
Can barely wait... Would love this on d2spr...
How about the evil twin of the i9300? The i9305?
ezeuba said:
Can barely wait... Would love this on d2spr...
Click to expand...
Click to collapse
Downloading the source code now, there should be an alpha build later tonight.
Just because one is anonymous doesn't mean that one has privacy.
jamcar said:
I'm doing a build for d2spr tomorrow and seeing how it goes. I might pick up the other d2xxx too.
Just because one is anonymous doesn't mean that one has privacy.
Click to expand...
Click to collapse
Are you gonna share in the SprintGS3 Section?
------------------------
Sprint Galaxy S3
Stock - Whiplashh Rom - MIUI - Wicked Sensations
Hit that "Thanks" Button if I helped you!
jamcar said:
I'm doing a build for d2spr tomorrow and seeing how it goes. I might pick up the other d2xxx too.
Just because one is anonymous doesn't mean that one has privacy.
Click to expand...
Click to collapse
d2att. good community! i would like to try this rom along w. d2att community.
Sent from my SAMSUNG-SGH-I747 using Tapatalk now Free
Whiplashh said:
Are you gonna share in the SprintGS3 Section?
------------------------
Sprint Galaxy S3
Stock - Whiplashh Rom - MIUI - Wicked Sensations
Hit that "Thanks" Button if I helped you!
Click to expand...
Click to collapse
I'm going to try, I been having issues compiling. I've done AOSP before and can't seem to fix this one.
jamcar said:
I'm going to try, I been having issues compiling. I've done AOSP before and can't seem to fix this one.
Click to expand...
Click to collapse
whatcha hit? i have d2mtr compiling fine now. just waiting on a tester to find out if it works well or not
@shabbypenguin if you build for d2spr I'll gladly test it out right now lol.
Sent from my SPH-L710 using Tapatalk now Free
//Edited - for the builds go there - http://forum.xda-developers.com/showthread.php?t=2487507
iamikon said:
@shabbypenguin if you build for d2spr I'll gladly test it out right now lol.
Sent from my SPH-L710 using Tapatalk now Free
Click to expand...
Click to collapse
it didnt boot so im gunna hold off until things settle down a bit more.
Would be glad to test for d2spr. Can and will flash if there is a link. Also I have a laptop running Ubuntu 12.04 x64 with a 10MB/S internet connection in the office just lying idle. If I can get directions on compiling I can try as well.
Rebellos said:
Well. Since there are builds all around.
http://goo.im/devs/Rebellos/custom-4.3.0-20131014-custom_i9300-HOMEMADE.zip
GPS, BT and FM won't work.
List of cherrypicks:
Click to expand...
Click to collapse
Thank you very much for letting us try initial build. I see 9300 in build name. But just confirming again. This build is for Galaxy S3 i9300 international version right? I am really excited to see this and I am Ok with nonworking bluetooth and GPS.
Can you start a thread in i9300 forum. Or do you think it's premature?
Can someone help me? I synced all of the files (d2spr device tree, d2 common, android_kernel_samsung_d2, and all of the qualcomm things needed) and am still getting this error. Everything really does look right, I'm stumped
I run "make d2spr -j16" then get:
Code:
============================================
build/core/tasks/kernel.mk:86: **********************************************************
build/core/tasks/kernel.mk:87: * Kernel source found, but no configuration was defined *
build/core/tasks/kernel.mk:88: * Please add the TARGET_KERNEL_CONFIG variable to your *
build/core/tasks/kernel.mk:89: * BoardConfig.mk file *
build/core/tasks/kernel.mk:90: **********************************************************
My d2spr BoardConfig.mk file is:
Code:
# Copyright (C) 2009 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.
#
# This file sets variables that control the way modules are built
# thorughout the system. It should not be used to conditionally
# disable makefiles (the proper mechanism to control what gets
# included in a build is to use PRODUCT_PACKAGES in a product
# definition file).
#
# inherit from common D2
-include device/samsung/d2-common/BoardConfigCommon.mk
# inherit from the proprietary version
-include vendor/samsung/d2spr/BoardConfigVendor.mk
# Assert
TARGET_OTA_ASSERT_DEVICE := d2spr,d2spi
# Kernel
TARGET_KERNEL_SOURCE := kernel/samsung/d2
TARGET_KERNEL_CONFIG := cyanogen_d2spr_defconfig
TARGET_BOARD_INFO_FILE ?= device/samsung/d2spr/board-info.txt
and my d2 common BoardConfigCommon.mk is:
Code:
# Copyright (C) 2009 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.
#
# This file sets variables that control the way modules are built
# thorughout the system. It should not be used to conditionally
# disable makefiles (the proper mechanism to control what gets
# included in a build is to use PRODUCT_PACKAGES in a product
# definition file).
#
# inherit from common msm8960
-include device/samsung/msm8960-common/BoardConfigCommon.mk
TARGET_SPECIFIC_HEADER_PATH := device/samsung/d2-common/include
# Kernel
TARGET_KERNEL_SOURCE := kernel/samsung/d2
BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom user_debug=31 zcache
BOARD_KERNEL_BASE := 0x80200000
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x01300000
BOARD_KERNEL_PAGESIZE := 2048
TARGET_KERNEL_VARIANT_CONFIG := cyanogen_d2_defconfig
TARGET_KERNEL_SELINUX_CONFIG := m2selinux_defconfig
TARGET_BOOTLOADER_BOARD_NAME := MSM8960
# Recovery
BOARD_CUSTOM_RECOVERY_KEYMAPPING := ../../device/samsung/d2-common/recovery/recovery_keys.c
BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_15x24.h\"
BOARD_USES_MMCUTILS := true
BOARD_HAS_LARGE_FILESYSTEM := true
BOARD_HAS_NO_MISC_PARTITION := true
BOARD_HAS_NO_SELECT_BUTTON := true
TARGET_RECOVERY_FSTAB := device/samsung/d2-common/rootdir/etc/fstab.qcom
TARGET_USERIMAGES_USE_EXT4 := true
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x00A00000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00A00000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1572864000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 28651290624
BOARD_FLASH_BLOCK_SIZE := 131072
# bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/samsung/d2-common/bluetooth
BOARD_BLUEDROID_VENDOR_CONF := device/samsung/d2-common/bluetooth/vnd_d2.txt
# Disable initlogo, Samsungs framebuffer is weird
TARGET_NO_INITLOGO := true
# Use Audience A2220 chip
BOARD_HAVE_AUDIENCE_A2220 := true
# Use USB Dock Audio
BOARD_HAVE_DOCK_USBAUDIO := true
#camera abi compatiblily
TARGET_DISPLAY_INSECURE_MM_HEAP := true
COMMON_GLOBAL_CFLAGS += -DQCOM_BSP_CAMERA_ABI_HACK
# Separate audio devices for VOIP
BOARD_USES_SEPERATED_VOIP := true
# SELinux
BOARD_SEPOLICY_DIRS += \
device/samsung/d2-common/sepolicy
BOARD_SEPOLICY_UNION += \
file_contexts \
property_contexts \
te_macros \
bridge.te \
camera.te \
conn_init.te \
device.te \
dhcp.te \
domain.te \
drmserver.te \
file.te \
kickstart.te \
init.te \
mediaserver.te \
mpdecision.te \
netmgrd.te \
property.te \
qmux.te \
rild.te \
rmt.te \
sensors.te \
surfaceflinger.te \
system.te \
tee.te \
thermald.te \
ueventd.te \
wpa_supplicant.te
Also, the android_kernel_samsung_d2 is located (and shows up) in kernel/samsung/d2 like I said, everything looks right, but something isn't.
sasikumardr said:
Thank you very much for letting us try initial build. I see 9300 in build name. But just confirming again. This build is for Galaxy S3 i9300 international version right? I am really excited to see this and I am Ok with nonworking bluetooth and GPS.
Can you start a thread in i9300 forum. Or do you think it's premature?
Click to expand...
Click to collapse
Nonworking BT/GPS says to me - "premature".
SO AS OF NOW WE HAVE GUIDES ABOUT HOW TO MAKE A KERNEL , ROM FROM SOURCE CODES..THIS GUIDE WILL TALK ABOUT PUSHING THE DEVICE TREE OR KERNEL TREE TO YOUR GITHUB ACCOUNT ...THIS IS A BEGINNER'S GUIDE IN THIS GUIDE I WILL ASSUME THAT UR BUILDING CM 11
STEP1:- CREATE A GITHUB ACCOUNT
STEP 2 :- CREATE A REPOSITORY BY CLICKING THE "+" beside ur user name and name it "android_device_samsung_i9082"
STEP 3 :- in the terminal navigate to the device folder
Code:
cd cm11/device/samsung/i9082
STEP 4 : WE ADD THE REPOSITORY TO WHICH WE HAVE TO PUSH THE FILES TO
Code:
git remote add cm https://github.com/username/android_device_samsung_i9082.git
STEP 5: we create a branch
Code:
git branch cm-11.0
Code:
git checkout cm-11.0
STEP6: WE PUSH THE THE TREE
Code:
git push -u cm cm-11.0
THIS GUIDE IS A WIP ... I WILL UPDATE IT SOON WITH PICTURES ..TO MAKE UL UNDERSTAND BETTER
CREDITS
1) @k2wl
2) help.github.com
3) @jackeagle
reserved
It would be pretty nice if you can add in on how to cherry-pick and git log --graph.Anyways,this guide is very detailed and useful overall and have an awesome say ahead [emoji1][emoji1][emoji106]
Sent from Planet Phaser
The-Grape said:
It would be pretty nice if you can add in on how to cherry-pick and git log --graph.Anyways,this guide is very detailed and useful overall and have an awesome say ahead [emoji1][emoji1][emoji106]
Sent from Planet Phaser
Click to expand...
Click to collapse
Yea sure ... As u saw .. This guide is a wip .. I will add pictures and more .. Fr users to get a better idea of how its done
rutvikrvr said:
Yea sure ... As u saw .. This guide is a wip .. I will add pictures and more .. Fr users to get a better idea of how its done
Click to expand...
Click to collapse
Thanks a lot
[GUIDE]Git Advanced Methods
Sometimes,you might be wondering how can i update the device tree without deleting my current device tree but through applying the latest changes
Well today i will teach you a new function call cherry-picking.This function is one of the most known features of git as it provides simple and easy copy-pasting job for you
First of all,add the remote first.Note:The hello is the main remote for this link
Code:
git remote add name url
eg: git remote add hello https://github.com/AOGP/android_packages_apps_Lightbulb.git
Second,fetch the remote
Code:
git fetch name
eg: git fetch hello
Thirdly,once finish fetching.Copy the commit id from github
Code:
git cherry-pick SHA-1/Commit ID
eg: git cherry-pick a7d0c5fc6df49a07855ccb36fb22fdaf321e20ba
If you faced any errors,solve them by typing and then see the red color files name in the terminal and fix them by comparing between <<<<<<<HEAD
Code:
git status
Once done solving all the errors,push the commit to github to keep the authorship of the commit as it is rude to just use their work and put yourself as author
Code:
git push [name of the remote] [your repository branch]
eg: git push origin master
guide updated in compliance with authorship of commits
I tried to compile a AOSP based rom, but after
source build/envsetup.sh
like I do with Cm based roms
brunch is not available.
is brunch CM specific and if so what other command do I need with aosp sources?
DavidXanatos said:
I tried to compile a AOSP based rom, but after
source build/envsetup.sh
like I do with Cm based roms
brunch is not available.
is brunch CM specific and if so what other command do I need with aosp sources?
Click to expand...
Click to collapse
What is the AOSP-based ROM that you're trying to build?
Sent from my GT-S7580 using Tapatalk
it was this rom: http://forum.xda-developers.com/optimus-4x-hd/orig-development/dev-aosp-lollipop-5-0-2-t2995695
and thats the set of cammands with which it builds under bbq linux
Code:
repo init -u https://android.googlesource.com/platform/manifest -b android-5.1.1_r29
#add local manifest
repo sync
# apply cm 12.1 fixes ld 43 and timeconst
cd /devices/lge/p880/patches
bash ./install.sh
cd ../../../..
source build/envsetup.sh
lunch
#selech p880
# to prevent api error:
make update-api
make -j8
make -j8 otapackage
DavidXanatos said:
it was this rom: http://forum.xda-developers.com/optimus-4x-hd/orig-development/dev-aosp-lollipop-5-0-2-t2995695
and thats the set of cammands with which it builds under bbq linux
Code:
repo init -u https://android.googlesource.com/platform/manifest -b android-5.1.1_r29
#add local manifest
repo sync
# apply cm 12.1 fixes ld 43 and timeconst
cd /devices/lge/p880/patches
bash ./install.sh
cd ../../../..
source build/envsetup.sh
lunch
#selech p880
# to prevent api error:
make update-api
make -j8
make -j8 otapackage
Click to expand...
Click to collapse
Then use
Code:
lunch p880
make -j$(cat /proc/cpuinfo | grep "^processor" | wc -l) otapackage
instead of
Code:
brunch p880
Sent from my GT-S7580 using Tapatalk
Requirements
- Linux Mint 18 XFCE
- 20GB SWAP
- 130 GB HDD space
Configuring the OS
When the OS is installed, open terminal and issue:
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && mkdir ~/bin && PATH=~/bin:~/sdk/tools:~/sdk/platform-tools:~/sdk/build-tools:$PATH && sudo apt-get install curl bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop maven openjdk-7-jdk pngcrush repo schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline6-dev lib32z1-dev && curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Download the Android SDK tools: https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
Extract them to your home folder and rename the folder containing them to 'sdk', so it matches the path that was set.
After issue the following in terminal:
Code:
android
Update it and get all of the required things for the version of Android you're building.
Downloading the source
We'll use my own personal choice... Issue the following in terminal:
Code:
PATH=~/bin:~/sdk/tools:~/sdk/platform-tools:~/sdk/build-tools:$PATH && repo init -u git://github.com/SlimRoms/platform_manifest.git -b mm6.0
It will ask you to configure your git Username and PW, you can either do it or ignore it; it's your prerogative.
After issue into terminal:
Code:
repo sync
Prepare to wait for quite a few hours.
Understanding the Layout
The layout of AOSP or any android firmware looks like this:
{
"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"
}
The important folders for basic building are the following:
- Device
The configurations for your device files should follow this layout.
Device/OEMname/Devicename
In the case of Z2 Pro it is 'Device/Zuk/Z2pro'
- Kernel
Kernel/OEMname/kernelname
The name of the kernel is specified in the main makefile of the Device configurations.
The kernel can be called anything in reality...
Vendor is where the files we cannot generate from source go; they are proprietary files that have already been created and must be pulled from an already working ROM that shares the same HW as the phone you are developing for.
Device Makefile operations explained
In my SlimROM Z2 configurations, the main makefile of relevance here is slim.mk
Code:
# Props
PRODUCT_PACKAGES += \
libloc_api_v02 \
libthermalclient \
datastatusnotification \
QtiTelephonyService \
shutdownlistener \
TimeService \
CNEService \
com.qualcomm.location \
dpmserviceapp \
qcrilmsgtunnel \
QtiTetherService \
colorservice \
ims \
imssettings \
qcnvitems \
libtime_genoff \
libbtnv \
qcrilhook
Normally VENDOR files are defined in the vendor folder; but I have defined them here instead which is fine.
Code:
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
$(call inherit-product, vendor/zuk/z2pro/z2pro-vendor.mk)
The inherit-product command adds an outside makefile to the main makefile.
By noticing 'inherit vendor z2pro-vendor.mk' we are observe that SlimROM will use the makefiles in Vendor that has been specified.
Code:
$(call inherit-product, vendor/slim/config/common_full_phone.mk)
As we can see, this 'Common_full_phone' config is generic, it should be used for every model.
Certain models will inherit certain makefiles; as this is a x64 phone we are using:
Code:
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
This should be used on any x64 phone; things are quite generic across makefiles very few things are device-specific in reality.
Inside the device folder there is a .dependencies file; for example the contents of one file are as follows:
Code:
[
{
"repository": "android_device_qcom_common",
"target_path": "device/qcom/common"
},
{
"repository": "android_vendor_nxp-nfc_opensource_frameworks",
"target_path": "vendor/nxp-nfc/opensource/frameworks"
},
{
"repository": "android_vendor_nxp-nfc_opensource_libnfc-nci",
"target_path": "vendor/nxp-nfc/opensource/libnfc-nci"
},
{
"repository": "android_vendor_nxp-nfc_opensource_Nfc",
"target_path": "vendor/nxp-nfc/opensource/Nfc"
}
]
"target_path" will show you additional folders you may need from Github that are required for the device to function properly.
If you do not have your device dependencies it will not build, they must also be obtained.
Kernel explanation
Some kernels are useful across multiple devices; but how are they defined for an individual device?
They are defined with a file called 'defconfig', it is located here:
On a x86 device, we would use the ARM folder and not ARM64 but I digress.
In the 'Device' folder, there is a file called 'Boardconfig.mk', this is relevant to building the kernel.
Code:
TARGET_KERNEL_SOURCE := kernel/zuk/msm8996
TARGET_KERNEL_CONFIG := z2p_defconfig
TARGET_SOURCE = The kernel folder
TARGET_CONFIG = The defconfig for your device.
When trying to build with another kernel; the kernel author may be calling the defconfig something else so this field will need to be changed; or the name of the defconfig file will need to be changed.
I will not explain much about the 'Vendor' folder in this time, it requires higher-end methodology to determine what proprietary files a phone does and does not need.
Anyway, for the Z2 I have already made vendor configs so people here do not need to worry much about it although they are a little incomplete...
Understanding Github
Github is fantastic, rather than to mess around with terminal for pulling things from it I'd rather demystify it and for this reason am encouraging people to DL, unzip and stage things manually rather than to depend on .xmls
Notice "android_device_xiaomi_libra"
This is to say the contents of this git should end up in device/xiaomi/libra; you will need to create these folders and place the contents inside of them manually.
It is the same with kernel, and vendor files.
Building the OS
Now that device, kernel and vendor configurations are in place it's time to attempt a build, eh?
issue the following into terminal:
Code:
PATH=~/bin:~/sdk/tools:~/sdk/platform-tools:~/sdk/build-tools:$PATH && . build/envsetup.sh
The build engine will now start.
Issue the following:
Code:
breakfast z2
The breakfast command will prepare all the ingredients; if no error is thrown here next issue:
Code:
brunch z2
This will begin the building process for the Zuk Z2.
This will take a really long time to complete.
InterfaceNode said:
As the title says.
Click to expand...
Click to collapse
Slim would be nice.
Do you own device? Wouldn't it be hard to build a rom without having hardware to test/debug?
CM build for Z2 Pro has number of bugs and is not maintained.
Thanks.
crubbish said:
Slim would be nice.
Do you own device? Wouldn't it be hard to build a rom without having hardware to test/debug?
CM build for Z2 Pro has number of bugs and is not maintained.
Thanks.
Click to expand...
Click to collapse
I'll build an initial test of something closer to AOSP like Slim, or Omni.
I'll then ask for ADB logcat from users to determine which HW is not good.
The HW that is not good, it may be the result of vendor files being used; I will then look at a phone that uses identical HW and use their vendor files in applicable places to update it if required.
It's really easy to build for this device if CM will build for it; that's a great starting place and a lot of the heavy lifting has already been done by others to bring it up
InterfaceNode said:
I'll build an initial test of something closer to AOSP like Slim, or Omni.
Click to expand...
Click to collapse
Thanks for quick response. I'm prepared to be a tester when you have something ready. Good luck!
crubbish said:
Thanks for quick response. I'm prepared to be a tester when you have something ready. Good luck!
Click to expand...
Click to collapse
I'll have a build for you to test in maybe an hour or so..
Since we're all scratching each-others back; does anyone have a pull of the 6.0 Z2 stock ROM?
crubbish said:
Thanks for quick response. I'm prepared to be a tester when you have something ready. Good luck!
Click to expand...
Click to collapse
Good god I really hope so, I always want immediate feedback
If you're interested in testing for me on a more daily basis; I'll bring amazing firmware to this device that people have never heard of..
Edit: Maybe it will take a little under 2 hours? this device does not really seem to have configurations for an AOSP ROM.
I'm very sure that my configurations will be good; but I'm not going to lie I did use some prebuilt things so I may run into conflicts if the device configurations want something that doesn't exist in AOSP.
At some point I'll write about this, source-building for a device is not a mystical process that requires a person to own the device; the only benefit to owning the device would be to extract ADB after building has finished.
Owning a device will not assist you in the build process unless it is to pull proprietary files from the stock ROM, users generally post Stock ROMs anyway so really.
I see people getting ready to collect donations and building this up like it's some kind of epic challenge or whatever.
This device is already being staged for Mokee, it's not going to be hard to build for it since someone else has already done all of the hard stuff.
Making this thread is more or less like seeing people on the sidewalk; I'm driving by and it's raining so I want to go through the puddle on the side of the street where they are walking.
Naturally I'll also accept donations, either PayPal or BTC is fine for me!!!!!!!!!!!
But I'm going to begin working irrespective of that because fundamentally It's not about the money for me
The funny thing is on a morality level it feels almost spiritually wrong to even accept donations since another person brought up all of the core configurations every other person; including people in the Nameless ROM thread will use in the future lol
You are doing this for Z2 or Z2 Pro?
shaunydub said:
You are doing this for Z2 or Z2 Pro?
Click to expand...
Click to collapse
Fk it, I'll do both right?
The Z2 is building presently but I guess I could also do the Z2 pro
But I guess it would take another hour or so, if I also add the Z2 pro to my s-tuff2do list
InterfaceNode said:
Fk it, I'll do both right?
The Z2 is building presently but I guess I could also do the Z2 pro
Click to expand...
Click to collapse
I'm excited for that to happen. Since mokee rom has a few minor bugs which didn't get fixed by now, I would be surprised if someone walks by and build like that. Nevertheless, time will tell and it would be nice if you could build dirty unicorns ????
MacLaughlin said:
I'm excited for that to happen. Since mokee rom has a few minor bugs which didn't get fixed by now, I would be surprised if someone walks by and build like that. Nevertheless, time will tell and it would be nice if you could build dirty unicorns ????
Click to expand...
Click to collapse
I would hope interested folks can give me the name of their device and the ADB.
Z2 is confirmed by me (looking at it) as stable enough to begin bringup of the following ROMs:
http://www.vibeui.com/
Zuk OS 6.0
I would like to begin collecting feedback on builds of these two ROMs at the same time as feedback on all AOSP builds.
To build DU is easy, I will write about how to do it for end-users and post configs to be used with it; but for now I want to first push stable AOSP and then consider what firmware to bring that is actually interesting.
Who cares in reality about DU or whatever, it all is essentially AOSP anyway compared to vendor ROMs
hardware/qcom/media-caf/msm8996/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp: In function 'void* async_message_thread(void*)':
hardware/qcom/media-caf/msm8996/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp:259:29: error: 'V4L2_EVENT_BITDEPTH_FLAG' was not declared in this scope
if(ptr[2] & V4L2_EVENT_BITDEPTH_FLAG) {
^
hardware/qcom/media-caf/msm8996/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp:263:29: error: 'V4L2_EVENT_PICSTRUCT_FLAG' was not declared in this scope
if(ptr[2] & V4L2_EVENT_PICSTRUCT_FLAG) {
^
target thumb C++: libOmxVenc_32 <= hardware/qcom/media-caf/msm8996/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
hardware/qcom/media-caf/msm8996/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp: In member function 'virtual OMX_ERRORTYPE omx_vdec::component_init(OMX_STRING)':
hardware/qcom/media-caf/msm8996/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp:2343:25: error: 'MSM_VIDC_PIC_STRUCT_PROGRESSIVE' was not declared in this scope
m_progressive = MSM_VIDC_PIC_STRUCT_PROGRESSIVE;
Click to expand...
Click to collapse
Build for Z2 errored with that code.
To resolve it the important thing to note is: V4L2_EVENT_BITDEPTH_FLAG
Doing a search of it in Git brings me to:
https://github.com/MoKee/android_ke...mmit/b9534998dcc1c20afd01ed95bb4ef5b3a34fbdbd
Although this device is not Nubia, Nubia is very close and can clearly be used as a guide-line to determine the commits this kernel needs.
The red HW errors during building indicate the kernel does not align with the source; to resolve this I would need to either remove the functions relating to this from the source-code of AOSP or I would need to add it to the kernel.
In the spirit of not being regressive, I decided to add it to the kernel and am building again.
I guess I'll write about how I resolved certain things here as I go along
Mokee kernel for this ROM is broken somehow, I speculate this is intentional so other people cannot build it but who knows right.
Meanwhile I've begun bringup on the kernel found here: https://github.com/RoyMcBaster/kernel_zuk_8996
No idea who this guy is, but his kernel doesn't seem to be sabotaged just incomplete so I'll use it as a base
Edit: Under my hardware, a build with no pre-built binaries takes around 40 minutes.
Each time I need to resolve the kernel in this way, I must rebuild entirely from the ground up; I am unsure of how many other alignment errors exist in this kernel but I imagine a few.
In a perfect world none but probably thats not happening, but it is ok I enjoy being challenged
Gonna follow this thread with much interest. You might want to have a look at this thread: http://zukfans.eu/community/threads/development-of-cyanogenmod-need-help.395/
Perhaps it helps you, at least for the ZUK Z2 Pro.
Here is one more kernel: http://zukfans.eu/community/threads/kernel-port-cm13-m-kernel-v1-1-port-22-09-2016.478/
Also you may take smth from existing CM builds: http://bbs.zuk.cn/z2/t135170/ (download link)
.: SID :. said:
Here is one more kernel: http://zukfans.eu/community/threads/kernel-port-cm13-m-kernel-v1-1-port-22-09-2016.478/
Also you may take smth from existing CM builds: http://bbs.zuk.cn/z2/t135170/ (download link)
Click to expand...
Click to collapse
Thank you, I've resolved the kernel for Z2 plus and will begin pushing builds of it as part of open-alpha.
Once I can determine both are stable we'll begin engaging in satanism; I'll try to do something interesting like TouchWiz or Sense.
I'm going to buy this device, but true to style I want to forward the development of it, bring some incredible OS to it.
Once both of my builds are stable I'll add more to this thread because I will be able to post my configs and explain how2use; things will move quickly here I hope
InterfaceNode said:
Thank you, I've resolved the kernel for Z2 plus and will begin pushing builds of it as part of open-alpha.
Once I can determine both are stable we'll begin engaging in satanism; I'll try to do something interesting like TouchWiz or Sense.
I'm going to buy this device, but true to style I want to forward the development of it, bring some incredible OS to it.
Once both of my builds are stable I'll add more to this thread because I will be able to post my configs and explain how2use; things will move quickly here I hope
Click to expand...
Click to collapse
That's great!
Please stay with AOSP and don't get to TouchWiz, Sense or whatever OEM framework!
vittogn said:
That's great!
Please stay with AOSP and don't get to TouchWiz, Sense or whatever OEM framework!
Click to expand...
Click to collapse
Well I always feel why be limiting, right?
Additionally I noticed the CM configs I was basing off of from Z2 has intentionally broken code-lines.
There's nothing worse than an overprotective developer
InterfaceNode said:
Well I always feel why be limiting, right?
Additionally I noticed the CM configs I was basing off of from Z2 has intentionally broken code-lines.
There's nothing worse than an overprotective developer
Click to expand...
Click to collapse
Thanks
InterfaceNode said:
Well I always feel why be limiting, right?
Additionally I noticed the CM configs I was basing off of from Z2 has intentionally broken code-lines.
There's nothing worse than an overprotective developer
Click to expand...
Click to collapse
I see your point?
What do you mean with intentionally broken code-lines?
Are you developing also a CM?
Thanks again.
Look forward to buy a Z2 when your rom will be ready!
Flyme would be nice to Even on a few of my Meizu's it's not stable XD