yashsingh1/xdaforums huggingface dataset:
[Android] android1111:
I managed to compile an AOSP rom using a prebuilt kernel though the boot.img doesn't seem to be bootable... (flashing the boot.img with "fastboot erase boot; fastboot flash boot boot.img" results in fastboot outputting "Error: failed to load kernel!")

I tried to binwalk both linage os's boot.img (working) and the compiled boot.img (broken) but they appear almost the same

$ binwalk aosp8.0_boot.img
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
0 0x0 Android bootimg, kernel size: 6296242 bytes, kernel addr: 0x80008000, ramdisk size: 1822491 bytes, ramdisk addr: 0x81000000, product name: ""
274 0x112 Unix path: /dev/block/bootdevice/by-name/utags utags.backup=/dev/block/bootdevice/by-name/utagsBackup movablecore=160M buildvariant=eng
20340 0x4F74 xz compressed data
6101540 0x5D1A24 Unix path: /dev/block/bootdevice/by-name/utags
6101696 0x5D1AC0 Unix path: /dev/block/bootdevice/by-name/hw
6277685 0x5FCA35 Unix path: /dev/block/bootdevice/by-name/utags
6277841 0x5FCAD1 Unix path: /dev/block/bootdevice/by-name/hw
6299648 0x602000 gzip compressed data, from Unix, NULL date (1970-01-01 00:00:00)
$ binwalk lineage14.1_boot.img
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
0 0x0 Android bootimg, kernel size: 5353496 bytes, kernel addr: 0x80008000, ramdisk size: 1448287 bytes, ramdisk addr: 0x81000000, product name: ""
243 0xF3 Unix path: /dev/block/bootdevice/by-name/utags utags.backup=/dev/block/bootdevice/by-name/utagsBackup movablecore=160M buildvariant=userdeb
18480 0x4830 xz compressed data
5357568 0x51C000 gzip compressed data, from Unix, NULL date (1970-01-01 00:00:00)
6964880 0x6A4690 Unix path: /dev/block/bootdevice/by-name/utags
6965036 0x6A472C Unix path: /dev/block/bootdevice/by-name/hw
7140992 0x6CF680 Unix path: /dev/block/bootdevice/by-name/utags
7141148 0x6CF71C Unix path: /dev/block/bootdevice/by-name/hw

The ramdisk has some differences but I guess that's just because of the different version

Please help...

(The device is Moto G 2015)
[Android] DJKristy:
How to do that?
[Android] DenZxd:
This is sample how to do it:

https://github.com/DenZxd/android_device_sd_common/tree/cm-12.1/sepolicy

and how include it in compilation in BoardConfig.mk (in my case BoardConfigCommon.mk):

https://github.com/DenZxd/android_device_sd_common/blob/cm-12.1/BoardConfigCommon.mk

It seemed to me that the addresses have a different offset and boot.img assembly goes in a different scenario. Theoretically, both of the boot.img's should be different only in the ramdisk and you can use one prebuilt kernel. I would try through the kitchen to disassemble both boot.img's and reassembled through the kitchen and compare again.
[Android] qiurigao:
including ./frameworks/native-caf/services/powermanager/Android.mk ...

including ./frameworks/native-caf/services/sensorservice/Android.mk ...

including ./frameworks/native-caf/services/surfaceflinger/Android.mk ...

including ./frameworks/native/Android.mk ...

build/core/base_rules.mk:157: *** frameworks/native/cmds/dumpstate: MODULE.TARGET.STATIC_LIBRARIES.libdumpstate.default already defined by frameworks/native-caf/cmds/dumpstate. Stop.

#### make failed to build some targets (12 seconds) ####

root@vultr:~/twrp#
[Android] nehalchoy:
Someone please tell me why did this error occur ? and what should I do to fix it ?. I am trying to build Atomic OS for my device.
[Android] Louis1977:
helppp ...

https://pastebin.com/zXSM0p4a
[Android] qiurigao:
help me

Install: /root/twrp/out/target/product/karate/root/sbin/adbdmake: *** No rule to make target '/root/twrp/out/target/product/karate/obj/STATIC_LIBRARIES/libbatteryservice_intermediates/export_includes', needed by '/root/twrp/out/target/product/karate/obj/EXECUTABLES/healthd_intermediates/import_includes'. Stop.

#### make failed to build some targets (03:25 (mm:ss)) ####
[Android] DJKristy:
Do I have to do make clean or make clobber before starting build after correcting the errors I got.
[Android] nehalchoy:
Can anyone help me rectify this error and also tell why does this happen
[Android] nehalchoy:
Can anyone please tell me why this error occurs and how do I fix this ?
[Android] SRIHARI_GUY:
I am facing this error when building AOSP for Moto G 2014

A help would be appreciated :)
[Android] Albe96:
Delete "android_device_motorolla_titan" folder if exist!

---------- Post added at 03:11 PM ---------- Previous post was at 03:10 PM ----------

This is not the exact error I guess! Give full log.
[Android] nehalchoy:
mv: cannot stat '/home/hw.official6/aos/out/target/product/Z010D/clean_steps.mk.tmp': No such file or directory

Disabling ART_BUILD_TARGET_DEBUG

Disabling ART_BUILD_HOST_DEBUG

build/core/binary.mk:1267: external/deqp/Android.mk: libdeqp: Unused source files: \

build/core/binary.mk:1267: external/deqp/Android.mk: libdeqp: Unused source files: \

build/core/binary.mk:1267: external/pdfium/third_party/pdfiumbigint.mk: libpdfiumbigint: Unused source files: bigint/BigInteger.cc bigint/BigIntegerUtils.cc bigint/BigUnsigned.cc bigint/BigUnsignedInABase.cc

build/core/binary.mk:1267: external/pdfium/third_party/pdfiumbigint.mk: libpdfiumbigint: Unused source files: bigint/BigInteger.cc bigint/BigIntegerUtils.cc bigint/BigUnsigned.cc bigint/BigUnsignedInABase.cc

./external/speex/Android.mk:56: TODOArm64: enable neon in libspeex

frameworks/av/camera/cameraserver/Android.mk:18: Target has integrated cameraserver into mediaserver. This is weakening security measures introduced in 7.0

build/core/package_internal.mk:143: Empty argument supplied to find-subdir-assets

find: ‘/home/hw.official6/aos/out/target/common/obj/SHARED_LIBRARIES/libwifi-hal-mock_intermediates’: No such file or directory

build/core/package_internal.mk:143: Empty argument supplied to find-subdir-assets

PRODUCT_COPY_FILES device/asus/Z010D/audio/mixer_paths_mtp.xml:system/etc/mixer_paths_mtp.xml ignored.

PRODUCT_COPY_FILES frameworks/av/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf ignored.

build/core/Makefile:46: warning: overriding commands for target `/home/hw.official6/aos/out/target/product/Z010D/system/lib/libmm-omxcore.so'

build/core/base_rules.mk:319: warning: ignoring old commands for target `/home/hw.official6/aos/out/target/product/Z010D/system/lib/libmm-omxcore.so'

build/core/Makefile:46: warning: overriding commands for target `/home/hw.official6/aos/out/target/product/Z010D/system/vendor/lib/libmm-abl.so'build/core/base_rules.mk:319: warning: ignoring old commands for target `/home/hw.official6/aos/out/target/product/Z010D/system/vendor/lib/libmm-abl.so'

build/core/Makefile:46: warning: overriding commands for target `/home/hw.official6/aos/out/target/product/Z010D/system/vendor/lib64/libmm-abl.so'

build/core/base_rules.mk:319: warning: ignoring old commands for target `/home/hw.official6/aos/out/target/product/Z010D/system/vendor/lib64/libmm-abl.so'

build/core/Makefile:46: warning: overriding commands for target `/home/hw.official6/aos/out/target/product/Z010D/system/lib64/libjni_latinime.so'

build/core/base_rules.mk:319: warning: ignoring old commands for target `/home/hw.official6/aos/out/target/product/Z010D/system/lib64/libjni_latinime.so'

Starting build with ninja

ninja: Entering directory `.'

ninja: error: '/home/hw.official6/aos/out/target/product/Z010D/obj/STATIC_LIBRARIES/librecovery_updater_asus_intermediates/export_includes', needed by '/home/hw.official6/aos/out/target/product/Z010D/obj/EXECUTABLES/updater_intermediates/import_includes', missing and no known rule to make it

build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed

make: *** [ninja_wrapper] Error 1

Here you go
[Android] Swapnil Soni:
ninja: error: '/home/swapnil_soni12345/du/out/target/product/mido/obj_arm/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/export_includes', needed by '/home/swapnil_soni12345/du/out/target/product/mido/obj_arm/SHARED_LIBRARIES/libaudiopolicyservice_intermediates/import_includes', missing and no known rule to make it
build/core/ninja.mk:166: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

how to get rid of this thing ;_;
[Android] NVDX11:
Search libaudiopolicyservice on lineage github and clone it in appropriate dir.
[Android] Swapnil Soni:
fixed got this new stuff now :'(

ninja: Entering directory `.'
ninja: error: '/home/swapnil_soni12345/du/out/target/product/mido/obj_arm/SHARED_LIBRARIES/libqdMetaData_intermediates/export_includes', needed by '/home/swapnil_soni12345/du/out/target/product/mido/obj_arm/SHARED_LIBRARIES/camera.msm8953_intermediates/import_includes', missing and no known rule to make it
build/core/ninja.mk:166: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
[Android] DJKristy:
After each error do I have to run make clean or make clobber before building again.

Also will the build start from where I left of when error came or start from the beginning.
[Android] YedanyXD:
The file where the error come is deleted by default, so it will start again in the error.
[Android] Qiangong2:
I'm trying to build flymeOS 6 for jfltetmo and I get this error on flyme fullota:

https://hastebin.com/tajipuduya.js

Patching works fine with no errors. What does this mean?
[Android] neonkat:
make sure you got the caf hals (hardware_qcom_*) from los or citrus.
[Android] aoleary:
Pushing changes to github

Hi all.

I am trying to push my changes to my repos on github, and the logic seems pretty easy enough, but I just dont get it :(

I am using the guide:

https://help.github.com/articles/pushing-to-a-remote/

This is my remote repo, with the branch du, as I am trying to do this for Dirty Unicorns:

https://github.com/aoleary/android_device_lge_d855/tree/du

antoin@OL:~/DU/device/lge/d855$ git remote add du https://github.com/aoleary/android_device_lge_d855.git
antoin@OL:~/DU/device/lge/d855$ git remote -v
du	https://github.com/aoleary/android_device_lge_d855.git (fetch)
du	https://github.com/aoleary/android_device_lge_d855.git (push)
github	https://github.com/LineageOS/android_device_lge_d855 (fetch)
github	https://github.com/LineageOS/android_device_lge_d855 (push)
origin	https://github.com/aoleary/android_device_lge_d855.git (fetch)
origin	https://github.com/aoleary/android_device_lge_d855.git (push)

I don't get

[B]git push <REMOTENAME> <BRANCHNAME> [/B]

<BRANCHNAME> = du

<REMOTENAME> = ????

I know its simple, but I just cant figure it out :(
[Android] DenZxd:
You can try to use Smart git tool from:

http://www.syntevo.com/smartgit/download

I use it myself. And use simply and conveniently. This is a wrapper over git.
[Android] NVDX11:
You have to type this command :

git push -u du HEAD:du

-------------------------------------------

Where du after -u is <remote>

HEAD: is used to specify the specific branch you are pushing ur changes,du after HEAD: is your <branch>
[Android] aoleary:
Cool. Thanks for the explanation also :)

And a bonus question. How do I remove the origin remote that I created by mistake ???
[Android] NVDX11:
Simple:

git remote rm origin

--------------------------------

rm=remove

and tip of advice : "origin" is a convention not part of the command. "origin" is the local name of the remote repository.

Example:

You can also add other remotes like this

git remote add a https://etc...

Then push:

git push -u a HEAD:<branch>

git remote add b https://etc

Then push:

git push -u b HEAD:<branch>
[Android] Swapnil Soni:
Okie thanks :3
[Android] dev.kasibhatla:
Made a fresh device tree and compiled a rom. But it doesn't boot. It loops and goes to recovery. From recovery i tried to check all folders using adb shell. The /system folder was empty and data folder had some 4 files or so. What must be wrong? What information should i provide more to solve this issue? Thanks
[Android] YedanyXD:
Do you have the patchrom guide?
[Android] Qiangong2:
It's just the official one on the github manifest page
[Android] DiamondJohn:
Did you mount the system partition in TWRP before you checked ? The flashing should of failed if it was empty. Did you get any errors during the flash?

Directly after you try to boot the ROM and it goes to TWRP, open a terminal window and get the last_kmsg log

cat /proc/last_kmsg > /sdcard/last_kmsg.log;

Read that log it may give you a reason it failed. If not, put the log on hastebin or such and post a link here. Someone more experienced than me may be able to help.
[Android] dev.kasibhatla:
I did that before checking the system folder. It had like 4 lines and all irrelevant.

---------- Post added at 04:25 AM ---------- Previous post was at 04:24 AM ----------

Yes i did mount the system partition.
[Android] mukesh22584:
Hi everyone, I'm just trying to learn for building rom and Need help Please..

I've compiled RR with Ubuntu 16.4 LTS in My windows 10 64 bit PC, I've installed Ubuntu separately as dual boot in 240 GB SSD, I've done everything correctly before brunch command, But after brunch cheese burger this message appears..

Looking for dependencies in device/oneplus/cheeseburger

Looking for dependencies in device/oppo/common

Looking for dependencies in device/qcom/common

Dependencies file not found, bailing out.

And build goes succesful but when I've flashed that build I'm unable to access my Storage, I've got message "No SD card present,

Someone please help me ....

Self compiled RR [emoji1128]

Just use this command in terminal.

export USE_NINJA=false

Self compiled RR [emoji1128]
[Android] jordandroid64:
Hey, I was syncing sources of los14.1 when this happened, now I've this since more than 12hours, someone could explain me what that mean ?
[Android] DiamondJohn:
mount it in TWRP and then use the file manager built into TWRP itself. Do not cross over between adb and TWRP, do not pass go and do not collect $200...

The install ZIP has a specific step that will error out if the flashed image does not have all the files and with the expected size. So it does not make sense that you have no files in system with no errors during the flash. Unless the zip is total rubbish.
[Android] somadsul:
Image Looks like Xray film

Always use hastbin or good quality image
[Android] dev.kasibhatla:
Okay it installs without errors means must have all the files. Moreover it's 450mb. I ll flash again and check.

Thanks
[Android] jordandroid64:
Click on the image and you will see, it's a 1080p pic.
[Android] xenreon:
Just paste over the log, that image isn't helping at all
[Android] jordandroid64:
Now, I've closed the the terminal, my folder size is about 20GB, do you think the best should be to delete all the files and try again ? with which command exactly ? (repo sync -j2, repo sync, etc.)
[Android] DiamondJohn:
I personally go with a variety combinations of the following, and rinse and repeat if necessary

# 1st check you have no git lock files in any of your git folders
repo forall -c git clean -fdx;
repo forall -c git reset --hard;
repo forall -c git checkout -f;
repo sync
repo sync --force-sync
repo sync -fc --force-sync --force-broken --no-clone-bundle --no-tags

# this last one gives a log on failures
repo --trace sync -l -fc --force-sync --force-broken --no-clone-bundle --no-tags

and then check with:

repo status;
repo diff;
[Android] Ripudamankaushik:
Hello friends ....as I posted earlier I get a successful build of my rom(PA) using AOSP Sources but when i flash it I get redirected to BOOTLOADER LOGS screen saying Error:Failed to load kernel.........Can somebody give me pointers to make the phone recognize and flash the built kernel....... Thanks in advance.

P.S.-I have a Moto G4 Plus and I already tried taking kernel log through twrp but it doesnt work
[Android] YedanyXD:
I builded PA too and didn't boot
[Android] desalesouche:
to enable logcat and dmesg find similar files in vendors and do change.
[Android] DiamondJohn:
Are either of you building an official device for PA? if not, what device tree's are you using? LOS?

I also tried building AOSPA (which from memory is PA) for an unofficial device based on a modified LOS device & vendor tree, and it did not boot, but didnt spend any time on it and moved onto other ROM's.

I recently tried building DU (another AOSP based ROM) for my unofficial device, and that bootloops with

[ 12.147321,0] init: /system/etc/init/surfaceflinger.rc: 6: invalid keyword 'rlimit'
...
[ 14.508591,0] init: Starting service 'surfaceflinger'...
...
[ 21.581413,0] init: Service 'surfaceflinger' (pid 746) killed by signal 6
[ 21.581504,0] init: Service 'surfaceflinger' (pid 746) killing any children in process group
[ 21.581626,0] init: Service 'zygote' is being killed...
[ 21.626888,0] init: Service 'zygote' (pid 730) killed by signal 9
[ 21.627010,0] init: Service 'zygote' (pid 730) killing any children in process group
...
and loop...

Full last_kmsg at https://pastebin.com/qcPTXRpa NB: I am not looking for a soln I am currently trying to build RR and crDroid (LOS based, and at least they boot), however, if I can get a working AOSP device tree, I think the ROM options would really open up; if you look down this list of ROM sources, more are AOSP based than LOS based https://sourceforge.net/projects/skadoosh/files/ (selected compressed sources)

NB I also have a Nexus 5, which is an official device for DU, crDroid and RR and they all build and boot fine.
[Android] Hlcpereira:
Does anyone know why is this occuring?

frameworks/opt/telephony/src/java/com/android/internal/telephony/GsmCdmaConnection.java:782: error: cannot find symbol
Settings.Global.CONNECTED_LINE_IDENTIFICATION + phone.getSubId(), 1) != 0;
^
symbol: variable CONNECTED_LINE_IDENTIFICATION
location: class Global
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
[Android] YedanyXD:
I did the same with PA xd

And i ported DU to my device and booted fine, few issues with the mic and camera but works
[Android] desalesouche:
blisspop v2.1

[MENTION=5216756]jackeagle[/MENTION]

is there possibility to fix libwebchromium build in blisspop...

toolchains and optimization are always changing. when will you be ready with something stable?

it seems that device control in v2.1 is fcing which was not the case with v 1.9 and v2.0

here is pastebin of error: http://pastebin.com/LtTqteDK
[Android] saintxseiya:
Ok,

next question. I suceeded in building my first roms and Cherrypicking :D

So next would be to integrate a different kernel into the choosen rom :)

I added a repo for the kernel to my local manifest and compiled the rom, but it gives me this error text.

ERROR: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
make[3]: *** [vmlinux.o] Error 1
make[2]: *** [vmlinux.o] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/root/tema/kernel/samsung/klte'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....

What am i doing wrong?

Cheers and Thanks for helping in advance! :)
[Android] mohit310:
Your default config file is either incorrect or your Build File has incorrect CFLAGS.

Usually if you call your make with correct defaultconfig file then it should work.

If building as part of ROM search for this flag TARGET_KERNEL_CONFIG and it should use a default config for your kernel in question.

# Kernel

TARGET_KERNEL_CONFIG := cyanogenmod_bacon_defconfig
[Android] saintxseiya:
Hi,

thanks for the help, i tried to add the flag to the kernel defconfig, but i am still stuck :(
[Android] rahul8040:
Need to ADD APP in build!

Hey can anyone please help me i need to add a custom launcher into my build [MENTION=4479868]desalesouche[/MENTION] can you please help me?! as you have solved most of the errors of everyone! i have gone to the point where i add my app to pakages>apps its all decompiled! and now what to do i am so confused as i dont know where exactly to mention the app in device.mk

BTW i am following this guide!

THIS GUIDE!​
[Android] desalesouche:
is it prebuilt apk?
[Android] rahul8040:
yes! sir its a launcher named S launcher! and downloaded the .APK of it and then decompiled it! and moved it to packages>apps and i myself made its Android.MK ofcourse my taking refrence of other launcher .MK! now i am confused what to do after this as when i add the it to device.mk it gives me an error!
[Android] DSA:
You added a decompiled (into smali) apk into a build?
[Android] NK World:
Great Work!!!!

This is the GREAT GUIDE for newbie for ANDROID ROM DEVELOPMENT LIKE ME!
[Android] desalesouche:
you might try to do something similar :

it is prebuilt apk...

https://github.com/TeamBliss-LP/android_packages_apps_OpenCamera

https://github.com/TeamBliss-LP/android_vendor_bliss/blob/lp5.0/config/common.mk#L185
[Android] rahul8040:
yes! i decompiled everything and inserted it in packages>apps

did i do something wrong?

---------- Post added at 09:39 PM ---------- Previous post was at 09:34 PM ----------

so what are you telling me? like i should place the it in packages>apps (decomplied) right? with .apk itself and after that in device.mk i should make the changes as shown in above link?
[Android] desalesouche:
yes,i am telling you that you could add apk in packages/apps (already compiled) and so it will be pushed to zip during build process like for OpenCamera in Blisspop, so you will have your apk in your zip.
[Android] DSA:
yes, you added a decompiled apk into your build

follow the commits provided
[Android] anonim14:
Xiaomi Mi 2S (aries)

I want to build cm12 for my phone. I downloaded the source for cyano and the device tree from one of the developer for my phone and i get this error.

https://drive.google.com/file/d/0BwKZFGbpYUnGXzNGZGo2ZDdOU28/view?usp=sharing
[Android] desalesouche:
not sure but i think you're using cm11 sources of device tree?you need cm12 one?
[Android] Epirex:
Update sources to Github

Hi all, I have this problem updating my kernel source to github

epirex@MaxiCM-Team:~/cm11/kernel/samsung/u8500$ git push -u origin master
Username for 'https://github.com': Epirex
Password for 'https://Epirex@github.com':
To https://github.com/Epirex/Samsung_STE_Kernel.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/Epirex/Samsung_STE_Kernel.git'
consejo: Updates were rejected because the remote contains work that you do
consejo: not have locally. This is usually caused by another repository pushing
consejo: to the same ref. You may want to first integrate the remote changes
consejo: (e.g., 'git pull ...') before pushing again.
consejo: See the 'Note about fast-forwards' in 'git push --help' for details.
epirex@MaxiCM-Team:~/cm11/kernel/samsung/u8500$

I git pull does not work, any solution?
[Android] anonim14:
No, i'm using cm12 device tree source.
[Android] Hashbang173:
What happens when you try git pull?
[Android] rahul8040:
"follow the commits provided"

what does that means? and ok i removed everything so can you tell me now how to add an app?
[Android] NepoRood:
Lineage is always breaking Telephony, it seems. You can either wait for them to fix it, or maybe revert this for now...
[Android] Ripudamankaushik:
Well I am building for an unofficial device but I just cant bring myself to give it up...its different from all those CM based roms..........and I have tried using both LOS and AOSP sources
[Android] nithin chandra:
compiling dragon caf & stucked at this error

https://hastebin.com/butajecogu.coffeescript
[Android] DiamondJohn:
Have you tried building another AOSP ROM using your AOSP device tree?

Did you get the AOSP device tree from an Official Build for your device, of the AOSP ROM? If so, can you successfully build your official. device AOSP ROM?