yashsingh1/xdaforums huggingface dataset:
[LG G2 Mini] :
Guys,

do you have your build environments set up ?

i'm running into a snag, give me a sec to switch over...

okay so my build hangs here,

target thumb C++: libsurfaceflinger <= frameworks/native/services/surfaceflinger/Layer.cpp
frameworks/native/services/surfaceflinger/Layer.cpp: In member function 'virtual bool android::Layer::isIntOnly() const':
frameworks/native/services/surfaceflinger/Layer.cpp:1359:20: error: 'GRALLOC_USAGE_PRIVATE_INTERNAL_ONLY' was not declared in this scope
frameworks/native/services/surfaceflinger/Layer.cpp: In member function 'virtual bool android::Layer::isSecureDisplay() const':
frameworks/native/services/surfaceflinger/Layer.cpp:1370:20: error: 'GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY' was not declared in this scope
make: *** [/home/cm11/out/target/product/d620/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates/Layer.o] Error 1
make: *** Waiting for unfinished jobs....

i am searching but, the more help to fix it the closer we get to a rom test.

My device tree is located in my devhost archive in directory d620.

it is as self contained as i could make it . it is based on my device tree for the

samsung galaxy tab 3 10.1 santos10wif. it will be posted on github when i succed in a full

build through. additional i will do my best to gather all patches i make during the build

process to make life for everyone easier. all are welcome to use.

m
[LG G2 Mini] invaderjohn:
[MENTION=4623180]Zaaap72[/MENTION]

i tried to flash my boot.img but it didnt work and now im stuck in fastboot.

it says

[540]fastboot_init()

[640] USB init ept @ oxffe000

[660] udc_start()

[8920] -- reset --

[8920] -- portchange] --

[9030] -- reset --

[9040] -- portchange --

[9170] fastboot; processing commands

how do i get past this? can i push the original boot.img som how?
[LG G2 Mini] :
http://xdaforums.com/showthread.php?t=1752270

Quote:

4.Step

copy the boot.img you want to flash into the folder*C:\android\platform-tools\*& then execute the command*

Code:

fastboot flash boot boot.img

(if your boot.img is named differently then adjust the last part of the command)

wait for it to succeed.

if it says okay two times & the prompt reappears everything should be fine

Quote:

5.Step

reboot your device with

Code:

fastboot reboot
[LG G2 Mini] Zaaap72:
This is typical for not having the correct dt.img in you boot.img

This is what i told you about your last zip.

You can try to use AIK to unpack the original boot.img. Exchange the zImage with your new one. Put the modules folder in the corresponding folder of the unpacked ramdisk. Then repack the boot.img and test it.

This is what i planned to do with your zImage, but my job got me travel till the weekend.
[LG G2 Mini] invaderjohn:
i use linux. and i get <waiting for device > trying to flash :/

seems like fastboot doesnt want to work. get som erros on the phone then when i try fastboot flash and dir to my boot.img i just get <waiting for device>

ive added my new boot.img it got compiled right and ive added 2 custom governors.
[LG G2 Mini] :
IJ,

check the link for the full article, try fastboot reboot-recovery.

read, learn, grow, contribute. :good:

m
[LG G2 Mini] partyzant_x:
Temporarily can not help because my laptop broke down and I had to send it in for repair.
[LG G2 Mini] invaderjohn:
Got my GF laptop with Windows and hade to flash a new kdz but got it worked out :)

UPDATE*

ive added boot.img and the modules i got when i build the kernel. i did the build with linaro 4.8 toolchain and i dont seem to have got any errors
[LG G2 Mini] :
dt.img seems to be missing

IJ,

hi, will try linaro toolchain, post link to for reference please ?

dt.img - boot.img-dtb seems to be missing.

root@kali:/AIK-Linux/split_img# ls
boot.img-base boot.img-cmdline boot.img-pagesize boot.img-ramdisk.cpio.gz boot.img-tagsoff
boot.img-board boot.img-kerneloff boot.img-ramdiskcomp boot.img-ramdiskoff boot.img-zImage
root@kali:/AIK-Linux/split_img#

are you running linux ? if so get your cm11 stuff set up if it isn't already and build kernel through that. modify appropriate make file in kernel source to point to linaro.

m
[LG G2 Mini] invaderjohn:
found something here about creating dt.img

https://github.com/xiaolu/mkbootimg_tools

dont have time to try it out myself. late night, eraly morning. chef life (Y)

anyways. if u want to try it out you could
[LG G2 Mini] :
when you use AIK to split the stock boot.img which Zaaap has posted https://www.mediafire.com/folder/a6n0yhxm26fjh/Documents

look in the split-image directory and you should find boot.img dtb. i am still unclear on how exactly to pack a newly compiled

image correctly, but i have determined to leave the kernel/boot.img work to you guys and i'll work for my part on building the rom.

back in page 5 maybe 6 is where to start reading. :good:

also search XDA for AIK by [MENTION=4544860]osm0sis[/MENTION]. Excellent tool.

m
[LG G2 Mini] invaderjohn:
im gonna try the AIK :)

wouldnt it be possible to port the L90 cm11 kernel from quarx?

they have a working cm11 and built kernel.. the gm2_global_com_defconfig is in the folder github from quarx they used to build a kernel to l90 wich is almost identical to our phone.
[LG G2 Mini] :
I'm thinking maybe leaning towards no.

for the l90 i went along whith using qcom display-caf-new and media-caf-new like in Q's manifest and am running into nothing but

problems, similar doesn't always mean compatible but to try a messy quick experiment, download the rom, drop in your device's boot.img,

replace the vendor directory and the proprietary stuff in /system/bin and /system/lib and maybe some stuff in /system/etc, check the updater

script for correct partition setup and jump in. make a backup first and don't expect too much. learning to interpret logcat,dmesg,last_kmsg

and adjust accordingly if possible and you might get somewhere.

m
[LG G2 Mini] Zaaap72:
The problem with dt.img is solved in my source tree.

You have to use a custom mkbootimage.mk and reference to it in boardconfig.mk.

See: https://github.com/Zaaap/android_device_lge_d620/blob/master/mkbootimg.mk
[LG G2 Mini] partyzant_x:
[MENTION=4623180]Zaaap72[/MENTION] allowed myself to do local_manifest your repo. I hope you are not angry.
[LG G2 Mini] :
Guys, i don't require permission for anything. if it's mine and i put it up then everyone is welcome to use -MOD EDIT(no need of sarcasm)-

i don't dig on the selfish oppressive dominionist thing. enjoy.

that was not sarcasm - user edit- garcia98 you are welcome to use.

m
[LG G2 Mini] invaderjohn:
so youre close getting a custom kernel working aswell?
[LG G2 Mini] partyzant_x:
Small OT

Even if someone manages to build CM for our phones. I'll wait until we do it ourselves. And I believe it will work :)

Question:

When I give "lunch" and select d620 then simply "make"?
[LG G2 Mini] Zaaap72:
Thank you very much.

Should i put it to github, too?

An when, then were?
[LG G2 Mini] :
Guys,

okay, i'm a liitle confused, the only thing currently on my github repo is my device tree for santos10wifi.

if you mean the stuff in my devhost archive, the device tree still needs work and when that's done/fixed

then i will put it up on github so if anything goes screwy , i get the blame, which is proper. you are free to use it though.

as for the manifest, it's just a manifest, there's nothing special about, if it works for you then sure. you may need to

adjust your paths to fit your system.

m
[LG G2 Mini] Zaaap72:
It already works in the custom recovery. As the recovery image contains its own kernel.

At the moment i have to put the touch firmware atmel/S0A47P1_2_07.fw manualy in the ramdisk/system/?lib?/firmware. (have to look for it again)

But yes, than i can use the kernel with twrp or PhilZ touch and everything works.

I did not manage too boot my normal system with my kernel at the moment.

Didn't have time to investigate further.

Maybe i'll have some time this weekend.
[LG G2 Mini] :
on control with lunch and using make

after lunch you have alot of options. you can test your build system for errors and necessary patching

by building individual aspects of the whole. meaning

make help - shows a somewhat limited but still fairly useful help document

mmm /path/to/module - some aspects of the build can be made this way , libc , busybox, etc.

to get a full list of the individual modules in your setup use

make module, help tells you the exact command. my point is run that and when it's done, copy

the entire output to text and keep for quick reference.

my routine is as follows , i run these till they are sorted then move on to the next. you can use && to link commands

after - cd /home/cm11 && . build/envsetup.sh && lunch 11 <-----where the project is in my lunch menu.

i run - mka recoveryimage && mka bootimage

when thats building proper i move on to

mka libandroid_runtime

mka services

mka framework

and when all that build right/through i move to

mka systemimage

when good and from then on i run

mka otapackage

m
[LG G2 Mini] partyzant_x:
After lunch > 11

Which would you like? [aosp_arm-eng] 11

Trying dependencies-only mode on a non-existing device tree?

What this mean?
[LG G2 Mini] :
P,

i get that message all the time and was never able to find an answer. it doesn't affect anything though.

you did choose the the wrong lunch menu selection though , i only meant to show an example

type make clobber and start over. when you bring your lunch menu up

meaning instead of copyin the example all the way through , type

lunch

press enter. from the menu that comes up look for cm_d620_user

that's the one you want. :good:

m
[LG G2 Mini] Zaaap72:
mka systemimage - error

mka systemimage

hardware/qcom/display-caf-new/libhwcomposer/hwc_utils.cpp: In function 'int qhwc::hwc_sync(hwc_context_t*, hwc_display_contents_1_t*, int, int)':

hardware/qcom/display-caf-new/libhwcomposer/hwc_utils.cpp:1285:10: error: 'struct mdp_buf_sync' has no member named 'retire_fen_fd'

hardware/qcom/display-caf-new/libhwcomposer/hwc_utils.cpp:1286:18: error: 'MDP_BUF_SYNC_FLAG_RETIRE_FENCE' was not declared in this scope

make: *** [/home/alex/android/out/target/product/d620/obj/SHARED_LIBRARIES/hwcomposer.msm8226_intermediates/hwc_utils.o] Fehler 1

Any idea what goes wrong here?
[LG G2 Mini] :
[MENTION=4623180]Zaaap72[/MENTION]

Z,

that's where i'm hanging too. i'v been looking for patch info but there doesn't seems to be anything yet. i've tried display-caf , display,

tonight when i get a build going again i'm going to try swapping for omnirom's display-caf-bafm or [bamf] i get some things inverted :p

an alternate was to remove hwcomposer from included packages in device.mk and include it in vendor blobs text. as for bypassing it you will

next like hit a problem with libstagefright . a developer [MENTION=4479363]Hazou[/MENTION] advised me that we build with prebuilts where we can first and then walk the build

backwards to proper open source. if i find a fix i will post.

m

from boardconfig.mk

# Graphics
BOARD_EGL_CFG := device/lge/d620/lib/egl/egl.cfg
TARGET_DISPLAY_USE_RETIRE_FENCE := true <-------------comment beginning of this line with # , that is equal to false, try false too
TARGET_QCOM_DISPLAY_VARIANT := caf-new <-----try switch from caf-new to caf
USE_OPENGL_RENDERER := true
TARGET_USES_C2D_COMPOSITION := true
TARGET_USES_ION := true
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
OVERRIDE_RS_DRIVER := libRSDriver_adreno.so

concerning MDP_BUF_SYNC_FLAG_RETIRE_FENCE - see above TARGET_DISPLAY_USE_RETIRE_FENCE := true

from what i've been able to understand i believe the declaration needs to be made in one of the headers

called by the #include funtion in hwc_utils.cpp

from hwc_utils.cpp

#define ATRACE_TAG (ATRACE_TAG_GRAPHICS | ATRACE_TAG_HAL)
#define HWC_UTILS_DEBUG 0
#include <math.h>
#include <sys/ioctl.h>
#include <linux/fb.h>
#include <binder/IServiceManager.h>
#include <EGL/egl.h>
#include <cutils/properties.h>
#include <utils/Trace.h>
#include <gralloc_priv.h>
#include <overlay.h>
#include <overlayRotator.h>
#include <overlayWriteback.h>
#include "hwc_utils.h"
#include "hwc_mdpcomp.h"
#include "hwc_fbupdate.h"
#include "hwc_ad.h"
#include "mdp_version.h"
#include "hwc_copybit.h"
#include "hwc_dump_layers.h"
#include "external.h"
#include "virtual.h"
#include "hwc_qclient.h"
#include "QService.h"
#include "comptype.h"
#include "hwc_virtual.h"
#include "qd_utils.h"

notice the top , maybe the define needs to be there ?
[LG G2 Mini] :
okay so, this is what i can figure

TARGET_DISPLAY_USE_RETIRE_FENCE := true <-------------this you need as is

TARGET_QCOM_DISPLAY_VARIANT := caf-new <-----i switched from this

to

TARGET_QCOM_DISPLAY_VARIANT := caf-stable

android_hardware_qcom_display-caf

https://github.com/CyanogenMod/android_hardware_qcom_display-caf/tree/stable/cm-11.0

placing as /hardware/qcom/display-caf-stable/

I have packed the stock boot.img you provided for recovery flashable now that i have an ota.zip template t work with

devhost link http://d-h.st/Oy4 -the name of the file is LG-d620-stock-kernel.zip . i made no changes , just packed it.

the package itself can be reused for new kernel builds.,in the script i did strike the assert.

Sorry about the dead link, late night. will be running new build

m

marked failed - missing files in /system/bin -rebuild
[LG G2 Mini] invaderjohn:
I'll download it tomorrow and see what I can do! Great progress! Can't wait till we get a fully working build :) to bad I don't have that much time working on the kernel!
[LG G2 Mini] :
test2 devhost archive

m
[LG G2 Mini] partyzant_x:
New test build "Security Error".
[LG G2 Mini] :
okay , do a test for me ?

flash or restore stock kernel over the build

then reboot.

and if you could describe clearly what is displaying security error. ?

m
[LG G2 Mini] partyzant_x:
Ok. Gry with restore boot. Security error appeare when phone start there is LG logo and security error message then phone shut down
[LG G2 Mini] :
P,

okay do you mean you will try or you did try?

Please be clear and complete, remember i'm flying blind. :(

m
[LG G2 Mini] partyzant_x:
Sorry I mean will try. And just trying. Flash Your build and then restore boot give me security error again.
[LG G2 Mini] :
okay, restore stock rom, but keep a hold of the test build,

i have a suspicion about the scripts embedded in the boot.img which are straight from stock.

i also have a suspicion that the widevine symlinks in vendor need to be included as symlinking function in

updater script. thanks for your help. i say hold on to the test build because i will first attempt to make a workaround/patch

package, but, it may take me a day to go through all the rc files and scripts and modify the updater script.

m :good:
[LG G2 Mini] HoaPham98:
No dtbtoolCM

In ~/cm11_kk/out/host/linux-x86/bin doesnt have dtbtoolCM so i stuck. Anyone help me?

make: *** No rule to make target '/ home/tornado76/PAC/out/host/linux-x86/bin/dtbToolCM' necessary '/ home/hoa/cm11_kk/out/target/product /d618/dt.img '
[LG G2 Mini] :
https://github.com/CyanogenMod/android_device_qcom_common/tree/cm-11.0/dtbtool
[LG G2 Mini] HoaPham98:
Can you show me how?
[LG G2 Mini] :
look to the right for the download zip button

download the extract to the appropriate folder

the path to- is in the archive's name.

you'll figure it out ;)

m
[LG G2 Mini] HoaPham98:
But I don't have qcom folder in /device folder
[LG G2 Mini] partyzant_x:
Create needed directory /device/qcom/common and paste files from the zip.
[LG G2 Mini] Zaaap72:
Same for me on test2 or first test with zImage injected in original boot.img.

Not sure what you mean with that.

The .rc's from your test 1 and put them in test2 ?
[LG G2 Mini] partyzant_x:
mka bootimage Quarx kernel source, moonbutt74 dev tree:

mka bootimage Quarx kernel source, Zaaap dev tree:

When clean up my source directory and repo sync again.

mka bootimage Quarx kernel source, Zaaap dev tree give me:
[LG G2 Mini] Zaaap72:
I use the original LG kernel source.
[LG G2 Mini] partyzant_x:
@ Zaaap72

I know. I just wanted to try with different kernel sources

This is what i found in our fscheck.sh from boot.img:

For me something is wrong.

Ok. When change this line with fstab_f2fs.g2m and fstab.g2m that it's include in boot.img get stuck at bootlogo with fastboot error.
[LG G2 Mini] :
zaaap,

the rc files in the boot.img need to be adjusted . init.rc should be mostly good but look at it in text editor

see what it imports by way of additional .rc files, what shell scripts get executed .sh, search each .rc file with terms

bin/

.sh

insmod

services.

so according to your testing my kernel build and modules are good but, my ramdisk is bad. i'll focus on getting that sorted as well

test2 stays at a maybe till the boot.img get's set right.

m

---------- Post added at 12:13 PM ---------- Previous post was at 12:09 PM ----------

P,

if you mean this line - /sbin/bbx rm /fstab_f2fs.w7ds

_-----------------------------------------------rm means remove

your change is now removing your fstab
[LG G2 Mini] partyzant_x:
Pk i know what rm do. The point is that there are many files with w7 instead of g2m in Zaaap dev tree. For example, the folder /init, /rootdir/fscheck.sh. Looking further, there need to be corrected.
[LG G2 Mini] invaderjohn:
Hey guys, did someone had an working kernel? Or do we still a need for a working one? Cuz I don't feel I can contribute much at this point. But I really want to help out more. But it seems that [MENTION=4623180]Zaaap72[/MENTION] got most of it and [MENTION=5864662]moonbutt74[/MENTION] doing some great progress, so as of now I don't know what else I can do here?
[LG G2 Mini] :
P,

Ahh okay, sorry my misunderstanding, this is my working ramdisk.

m

and i see a change to make in default.prop

ro.secure=1 <----change to 0
ro.allow.mock.location=0
ro.debuggable=0<----change to 1
persist.sys.usb.config=boot
persist.sys.strict_op_enable=false
ro.adb.secure=1<----change to 0
[LG G2 Mini] partyzant_x:
Do everything. Compile. We need a kernel that will run when booting the system. Kernel Zaaap works in recovery but does not start the system. So as a joke we need the kernel, which will give us a bootloop and not stuck on bootlogo :)

[MENTION=5864662]moonbutt74[/MENTION]

Stuck at bootlogo with fastboot error.
[LG G2 Mini] :
include the error message please.

working through zaaap 's logs . i noticed alot of permissions are absent in /system/etc/permissions

also checking through scripts in ramdisk to identify what functions are preventing boot [manufacturer stuff to prevent modifications/customization , etc]

constructing patch.zip will post for test when done.

m
[LG G2 Mini] partyzant_x:
Error is the same that I send You via PM earlier.
[LG G2 Mini] :
log/info request

[MENTION=4623180]Zaaap72[/MENTION]

can you redo the kernel test you performed to get me the logs?

this time i need you to run

lsmod <-------looking for all modules live

and

busybox rfkill list all <----list all comm devices , wifi bluetooth and i believe radio

or

rfkill list all

do this on stock rom with cm11 boot img, doesn't matter who's it is as long as it's the cm11 boot.img

[MENTION=2943012]partyzant_x[/MENTION] , okay thanks i think i know where to look, will have patch/test up soon

[MENTION=1828795]invaderjohn[/MENTION] - get a copy of test 2 and keep hold of it for now, thanks
[LG G2 Mini] invaderjohn:
Where can i find the test2? The link you sent me contained no files.

Il have to try it tomorrow night! Have a looong day at work tomorrow.

As of now I'm still trying 2 get a working boot.img , thought that if I can get a working build from system.img with my own boot.IMG through android kitchen, would that help at all? Trying to do some config files. Also need a dtbs file for our phone to compile the kernel and I always get firmware/melfas warnings. I got a build fully compiled with no errors last night and without thinking a did a make clean :(
[LG G2 Mini] :
IJ,

no harm in that , repetition can be helpful for learning/developement.

the devhost link is in my signature, goto d620/test2

m

okay so test2 patch is up. flash test2 then flash patch.

what was done: first i edited updater script as follows to flash boot.img and hopefully

added a slew of what i think are mising permissions to system/etc/permissions

hit or miss adding of lg drm related stuff to lib app and framework

create the missing symlinks from vendor/firmware

assert(getprop("ro.product.device") == "d620" || getprop("ro.build.product") == "d620" || abort("This package is for \"d620\" devices; this is a \"" + getprop("ro.product.device") + "\"."););
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
package_extract_dir("system", "/system");
[COLOR="Red"]symlink("/persist-lg/firmware/widevine.b00", "/system/vendor/firmware/widevine.b00");
symlink("/persist-lg/firmware/widevine.b01", "/system/vendor/firmware/widevine.b01");
symlink("/persist-lg/firmware/widevine.b02", "/system/vendor/firmware/widevine.b02");
symlink("/persist-lg/firmware/widevine.b03", "/system/vendor/firmware/widevine.b03");
symlink("/persist-lg/firmware/widevine.mdt", "/system/vendor/firmware/widevine.mdt");[/COLOR]
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
unmount("/system");

in boot image i attempted to inactivate anything that seemed liked manufacturer interference,

in build.prop

ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
persist.sys.usb.config=mtp,adb
persist.sys.strict_op_enable=false
ro.adb.secure=0

i was looking at mount flags and options and put a link to a pretty good readme on the subject in my sig.
[LG G2 Mini] partyzant_x:
logcat

Logcat from test2 patch1. Stuck at bootlogo then restart and over again but adb works:)
[LG G2 Mini] :
Sweet !!

okay just for verification rom = test + patch

and

logcat pulled in regular mode and NOT from recovery ?

okay, P nice job! these are our identifiable problems to fix first

E/HAL ( 950): dlopen failed: could not load library "libmemalloc.so" needed by "gralloc.msm8226.so"; caused by library "libmemalloc.so" not found

pull libmemalloc.so from stock and adb push to it's proper location in cm11 OR drop that file into the right place in rom or patch zip and reflash

same with

E/HAL ( 950): dlopen failed: could not load library "liboverlay.so" needed by "hwcomposer.msm8226.so"; caused by library "liboverlay.so" not found

saame with

E/msm8974_platform( 952): [AUDIO_SBP] ucm open from system : /system/etc/mixer_paths.xml - maybe

same with

E/QSEECOMAPI: ( 995): Error::Cannot open the file /system/etc/firmware/keymaster.mdt edit this is a symlink - added to updater-script

logcat shortcut - to pull a specific aspect of info from logcat run

logcat -d | grep [term] for example to cut through the cat straight to the error i open the log in terminal this

cat logcat.log | grep E/

same with logcat - logcat -d | grep E/ to output in terminal - logcat -d | grep E/ > /sdcard/logcat.txt to dump to file

will post patch two in a few hours as my eyes are hurting. :eek:

but in the in-between do the above the cat again and see what you find :good:

m

okay patch 2 http://d-h.st/7Sj - added to patch one more symlinking and missing libs

the name of the file is cm_d620-ota-16efe31073-PATCH-2.zip
[LG G2 Mini] partyzant_x:
[MENTION=5864662]moonbutt74[/MENTION]

Yes test+patch and logcat its from normal boot not from recovery.

I need some coffee and begin to do what you described.

Ok when I add this files from lib then in boot are new errors with new files from lib. I will be added them one by one. Will inform You how progress go.

There is some files that I couldn't find. Attach logcat and libs.

Patch2 with changes.

Added or changed files:

/system/lib: libexternal.so, libmemalloc.so, livoverlay.so, libvirtual.so

/system/etc: mixer_paths.xml

/system/etc/wifi:WCNSS_qcom_cfg.ini > fixed error with this on logcat. Added file it's from moonbuut test2 not from stock, Stock file caused error:

link: