[SOLVED] Requesting help for build error - Huawei Honor 5x - Honor 5X Questions & Answers

First time building AOSPextended 8 rom.
I've run in to a few errors so far that I was able to resolve. However, I don't understand how to resolve this one.
Code:
device/huawei/kiwi/init/init_kiwi.cpp:205:9: error: use of undeclared identifier 'WARNING'
WARNING("Unknown variant: %s", model.c_str());
I have already added this to init_kiwi.cpp:
Code:
#include <android-base/logging.h>
But after that I'm still getting the error. Suggestions?

I think I figured it out. I took a look at logging.h and constructed this:
Code:
LOG(WARNING) << "Unknown variant: %s" << model.c_str();
to replace this:
Code:
WARNING("Unknown variant: %s", model.c_str());
I'm compiling it now. Will report back if it works.

Yep, that was it. No more build error.

Have you managed to build it successfully? Any other issues after that ??

I'm still working on it. I believe the error from this post was at a 4% build. I encountered many errors after that which I have resolved. It's mostly updating the code in the device tree to work with android 8. As of today, I'm at a 21% build and need to migrate more code. I'll post an update when I have a solid Alpha build.

It's great that more people are being involved in developing for this device ) I am still learning so one day i could help.. I am willing to test out builds if there is any need for that.

Related

[ISSUE SOLVED]CM9 compiling error

Hi guys I am kind of a noob when it comes to linux and compiling and have hit a brick wall. I posted this question here in Q&A and in Chef central so hopefully someone has an idea. I have been trying to compile CM9 for about three days now and no matter what I do I get this output. It is 95% of the time after the "install libwebcore.so" line.
Code:
install: out/target/product/maguro/system/lib/libwebcore.so
UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: GC overhead limit exceeded
at com.android.dx.util.IntList.(IntList.java:87)
at com.android.dx.rop.code.RopMethod.calcPredecessors(RopMethod.java:154)
at com.android.dx.rop.code.RopMethod.labelToPredecessors(RopMethod.java:95)
at com.android.dx.dex.code.RopTranslator.pickOrder(RopTranslator.java:352)
at com.android.dx.dex.code.RopTranslator.translateAndGetResult(RopTranslator.java:212)
at com.android.dx.dex.code.RopTranslator.translate(RopTranslator.java:106)
at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:293)
at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:134)
at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:87)
at com.android.dx.command.dexer.Main.processClass(Main.java:483)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:455)
at com.android.dx.command.dexer.Main.access$400(Main.java:67)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:394)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
at com.android.dx.command.dexer.Main.processOne(Main.java:418)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:329)
at com.android.dx.command.dexer.Main.run(Main.java:206)
at com.android.dx.command.dexer.Main.main(Main.java:174)
at com.android.dx.command.Main.main(Main.java:95)
make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/noproguard.classes-with-local.dex] Error 3
Before I tried to compile CM I did successfully compile AOSP for my Gnex. I have searched and tried everything I could find. I've tried these values in the common.py file and just about every combo I could think of per recommendations I found online.
Code:
check = (sys.maxsize > 2**32)
if check is True:
cmd = ["java", "Xmx2048m", "-jar",
os.path.join(OPTIONS.search_path, "framework", "signapk.jar")]
else:
cmd = ["java", "-Xmx1024m", "-jar",
os.path.join(OPTIONS.search_path, "framework", "signapk.jar")]
I have also checked my swap and as far as I can tell its there and working but it seams to never be used. I have tried all the commands I could find online to make sure it was enabled but Idk what else to try or check.
Also I am using a quad core AMD with 6GB of RAM if anyone is curious. Any and all advice/ideas would be very much appreciated at this point I am at a complete loss. Thanks for looking and helping guys.
EDIT:I just finished a successful build of AOSP for my galaxy nexus so I am really confused as to why I run out of memory for CM9.
Sky-
A fresh install of Ubuntu 12.04 on a freshly formatted partition seemed to fix my memory issue.

[Q] CM KitKat build problem - add prebuilt package?

Hi, I'm trying to build CM KitKat for the Optimus S/V (unsupported by CM). The build is crashing out trying to link libwebviewchromium.so.
It gives dozens and dozens of errors like this:
external/chromium_org/content/browser/android/browser_media_player_manager.cc:70: error: relocation overflow in R_ARM_THM_CALL
At the end it prints this:
collect2: error: ld returned 1 exit status
make: *** [/home/dbrown/cm11/out/target/product/thunderc/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so] Error 1
It may be a problem with insufficient memory on my build machine (Core 2 Duo laptop with 3 gb ram). For the time being, or in case that's not the problem I'm looking for a work-around. I looked in the Android.mk file for external/chromium_org and saw this:
# Don't include anything if the product is using a prebuilt webviewchromium.
ifneq ($(PRODUCT_PREBUILT_WEBVIEWCHROMIUM),yes)
Is it possible, and if so how can I add a prebuilt webview library so I can get past this error? I just want to get something built for now so I can test it. This would be the first successful build for this device. Thanks!
Open the "external/chromium_org/content/browser/android/browser_media_player_manager.cc"
And go to line Num. 70..
Youd better to see "https://bugs.launchpad.net/binutils-linaro/+bug/641126"
In that case, Loïc Minier was solve the add physical ram.
To try swap memory!
I know this is a bit necro but I thought I'd add.
I got the same error in libchromium. 16Gb ram. Went down to -j1 on make and it compiled. I have a 6-core chip :/
Similar query
For doing the android clean build faster I wanted to avoid building libwebviewchromium. Can someone provide the exact changes needed for this. Is libwebviewchromium.so enough ? or do we have to have related jars as well from first build.
@skinbark @winvinay add the following line to your devices BoardConfig.mk. (I.e. YOURSOURCEFOLDER/device/MANUFACTURER/DEVICE/BoardConfig.mk e.g. ~/AOSP/device/asus/grouper/BoardConfig.mk for me):
Code:
PRODUCT_PREBUILT_WEBVIEWCHROMIUM := yes
Just remember to add libwebviewchromiun.so from another ROM to /system/lib/ afterwards.

[WIP] Compiling TWRP for WI502Q Wren device

Background:
Can't locate a TWRP image for WI502Q device
@T10NAZ has been helping in his TWRP for WI501Q thread. It seems more polite to separate this discussion from his TWRP release thread.
Goal:
Build a booting TWRP image for WI502Q device
I'll be posting step-by-step directions as I make progress and I'll also be posting questions!
Steps
Repo
1) Install repo (sudo apt-get install repo)
1a) repo init -u git://github.com/joeykrim/platform_manifest_twrp_omni_wren.git -b twrp-6.0
1b) repo sync
2) Clone device configuration and kernel files
2a) mkdir -p device/asus/wren (Inside omni directory cloned in 1b)
2b) cd device/asus/ && git clone https://github.com/joeykrim/wren
3) Setup AOSP to compile and Compile
3a) . build/envsetup.sh
3b) lunch omni_wren-eng
3c) mka recoveryimage OR make clean && mka -j9 recoveryimage
Sources:
Referencing Dees_Troy's guide for compiling TWRP: http://forum.xda-developers.com/showthread.php?p=32965365#post32965365
Sparrow Omni ROM/Recovery compile files: https://github.com/asyan4ik/sparrow
Compiling kernel: http://forum.xda-developers.com/android/software/ultimate-guide-compile-android-kernel-t2871276 & https://source.android.com/source/building-kernels.html & @T10NAZ who compiled the kernel and provided the binary
Dependencies (Not complete list):
My GitHub forks include minor changes in order to compile without errors: https://github.com/joeykrim/platform_manifest_twrp_omni_wren & https://github.com/joeykrim/wren
OmniROM requires OpenJDK 7: sudo apt-get install openjdk-7-jdk (Reference for install, replace version 8 with 7)
Unresolved Issues:
1) Requires pre-compiled or compiling kernel
1a) Unable to pull from device: /dev/block/platform/msm_sdcc.1/by-name/boot: Permission denied and /dev/block/mmcblk0p11: Permission denied
1b) ASUS Kernel source: https://www.asus.com/au/support/Download/42/1/0/3/y5tW5D4k3zKBVKf4/32/
Latest version at this time: ASUS ZenWatch2 (WI502Q) Kernel source code V5.20.0.111 (MEC23G)
Requires a prebuilt toolchain - AOSP recommends: git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
export ARCH=arm
export CROSS_COMPILE=arm-eabi-
make wren_user_msm8226-perf_defconfig - results in many errors, as shown in the multiple posts below
@T10NAZ suggested using wren_defconfig instead of wren_user_msm8226-perf_defconfig, compiled a kernel and posted it: http://forum.xda-developers.com/showpost.php?p=65955638&postcount=13
2) Sparrow (BoardConfig.mk) calls for an older font file: font_7x16.h (bootable/recovery/minui.old/font_7x16.h). For now, disabled as compiling with it results in an error:
"In file included from bootable/recovery/minui/graphics.cpp:35:
bootable/recovery/minui/font_7x16.h:12:14: error: initialization of flexible array member is not allowed
.rundata = {
^"
u should post in the android dev or android orid dev section of the zenwatch 2 i think.
here in q&a it might get lost
just a friendly advice. i have a w501q. for mine there is T10NAZ's version which works perfectly if tethered (a flashable version would be nich to have )
4RK4N said:
u should post in the android dev or android orid dev section of the zenwatch 2 i think.
here in q&a it might get lost
just a friendly advice. i have a w501q. for mine there is T10NAZ's version which works perfectly if tethered (a flashable version would be nich to have )
Click to expand...
Click to collapse
im working on making it flashable
T10NAZ said:
I used this dev tree here so you can modify it to get twrp for the 502
or to practice by using the files available for the 501
all you need is the omni 6.0 source for twrp 3.0.0.0 and the latest kernel source and you are off to the races!
If you need help let me know
Click to expand...
Click to collapse
Summary
I have omni 6.0 source and using asyan4ik's device tree for sparrow, I have the sparrow TWRP recovery.img compiled in out/target/product/sparrow. The 501 device was a good starting point, thanks!
Now to 502, I'm unable to get a kernel binary to use in order to build TWRP. Any suggestions on how to either get the 502 kernel binary or get the 502 kernel source compiling?
Details:
1) I'm not able to get the kernel binary, which asyan4ik provided for the 501/sparrow device on the github repo. I tried but couldn't pull the kernel binary from the 502 device: /dev/block/platform/msm_sdcc.1/by-name/boot: Permission denied and /dev/block/mmcblk0p11: Permission denied
2) I do have the kernel source from ASUS's web site, but am seeing multiple errors when compiling with wren_user_msm8226-perf_defconfig or wren_userdebug_msm8226_defconfig.
Example of an error: "kernel/printk.c: In function ‘printk_buffer_rebase’:
kernel/printk.c:1022:38: error: ‘ASUS_SW_VER’ undeclared (first use in this function)
strncpy(asus_global.kernel_version, ASUS_SW_VER, sizeof(asus_global.kernel_version));
^
kernel/printk.c:1022:38: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:308: recipe for target 'kernel/printk.o' failed"
joeykrim said:
Summary
I have omni 6.0 source and using asyan4ik's device tree for sparrow, I have the sparrow TWRP recovery.img compiled in out/target/product/sparrow. The 501 device was a good starting point, thanks!
Now to 502, I'm unable to get a kernel binary to use in order to build TWRP. Any suggestions on how to either get the 502 kernel binary or get the 502 kernel source compiling?
Details:
1) I'm not able to get the kernel binary, which asyan4ik provided for the 501/sparrow device on the github repo. I tried but couldn't pull the kernel binary from the 502 device: /dev/block/platform/msm_sdcc.1/by-name/boot: Permission denied and /dev/block/mmcblk0p11: Permission denied
2) I do have the kernel source from ASUS's web site, but am seeing multiple errors when compiling with wren_user_msm8226-perf_defconfig or wren_userdebug_msm8226_defconfig.
Example of an error: "kernel/printk.c: In function ‘printk_buffer_rebase’:
kernel/printk.c:1022:38: error: ‘ASUS_SW_VER’ undeclared (first use in this function)
strncpy(asus_global.kernel_version, ASUS_SW_VER, sizeof(asus_global.kernel_version));
^
kernel/printk.c:1022:38: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:308: recipe for target 'kernel/printk.o' failed"
Click to expand...
Click to collapse
that error was the most annoying thing ever and i always had an issue with it.
download this Makefile and replace the one in the root of the kernel folder with that one, that will get rid of that error. You may run into more errors, and hopefully they are ones that i had problems with
T10NAZ said:
that error was the most annoying thing ever and i always had an issue with it.
download this Makefile and replace the one in the root of the kernel folder with that one, that will get rid of that error. You may run into more errors, and hopefully they are ones that i had problems with
Click to expand...
Click to collapse
Great, your Makefile cleared up the ASUS_SW_VER error!
Amazing they release kernel source that doesn't compile...
Next error...
1) TIF_MM_RELEASED undecleared
kernel/exit.c: In function ‘exit_mm’:
kernel/exit.c:510:28: error: ‘TIF_MM_RELEASED’ undeclared (first use in this function)
set_tsk_thread_flag(tsk, TIF_MM_RELEASED);
^
kernel/exit.c:510:28: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:308: recipe for target 'kernel/exit.o' failed
It does appear to be defined...
grep -irs TIF_MM_RELEASED *
arch/arm/include/asm/thread_info.h:#define TIF_MM_RELEASED 23 /* task MM has been released */
arch/arm64/include/asm/thread_info.h:#define TIF_MM_RELEASED 24
drivers/staging/android/lowmemorykiller.c: if (test_task_flag(tsk, TIF_MM_RELEASED))
kernel/exit.c: set_tsk_thread_flag(tsk, TIF_MM_RELEASED);
joeykrim said:
Great, your Makefile cleared up the ASUS_SW_VER error!
Amazing they release kernel source that doesn't compile...
Next error...
1) TIF_MM_RELEASED undecleared
kernel/exit.c: In function ‘exit_mm’:
kernel/exit.c:510:28: error: ‘TIF_MM_RELEASED’ undeclared (first use in this function)
set_tsk_thread_flag(tsk, TIF_MM_RELEASED);
Click to expand...
Click to collapse
Your grep maybe or maybe not shed light on the issue.
The first 2 are defined but not in the last 2, the last 2 are calling TIF_MM_RELEASED (at least that is my understanding) however it has a number after defining it
anyways travel to the folder kernel and open exit.c, and assuming you can see line numbers on your text editor, go to line 506, and that whole #ifndef config thing, maybe either do this:
Code:
#define TIF_MM_RELEASED 23
#ifndef CONFIG_UML
mm_released = mmput(mm);
if (mm_released)
set_tsk_thread_flag(tsk, TIF_MM_RELEASED);
#endif
or add the define TIF_MM under the config_UML.
Im almost thinking ASUS has some other things outside of the kernel source to allow it to build cleanly
T10NAZ said:
Your grep maybe or maybe not shed light on the issue.
The first 2 are defined but not in the last 2, the last 2 are calling TIF_MM_RELEASED (at least that is my understanding) however it has a number after defining it
anyways travel to the folder kernel and open exit.c, and assuming you can see line numbers on your text editor, go to line 506, and that whole #ifndef config thing, maybe either do this:
Code:
#define TIF_MM_RELEASED 23
#ifndef CONFIG_UML
mm_released = mmput(mm);
if (mm_released)
set_tsk_thread_flag(tsk, TIF_MM_RELEASED);
#endif
or add the define TIF_MM under the config_UML.
Im almost thinking ASUS has some other things outside of the kernel source to allow it to build cleanly
Click to expand...
Click to collapse
Defining it either before or inside of CONFIG_UML both worked to clear the error. Thanks!
Now two more errors:
kernel/asusdebug.c: In function 'proc_asusdebug_init':
kernel/asusdebug.c:1405:15: error: 'struct mutex' has no member named 'owner'
fake_mutex.owner = current;
^
kernel/asusdebug.c: At top level:
kernel/asusdebug.c:1418:15: error: expected declaration specifiers or '...' before string constant
EXPORT_COMPAT("qcom,asusdebug");
^
scripts/Makefile.build:308: recipe for target 'kernel/asusdebug.o' failed
joeykrim said:
Defining it either before or inside of CONFIG_UML both worked to clear the error. Thanks!
Now two more errors:
kernel/asusdebug.c: In function 'proc_asusdebug_init':
kernel/asusdebug.c:1405:15: error: 'struct mutex' has no member named 'owner'
fake_mutex.owner = current;
^
kernel/asusdebug.c: At top level:
kernel/asusdebug.c:1418:15: error: expected declaration specifiers or '...' before string constant
EXPORT_COMPAT("qcom,asusdebug");
^
scripts/Makefile.build:308: recipe for target 'kernel/asusdebug.o' failed
Click to expand...
Click to collapse
Whats weird is asusdebug.c is exactly the same on the 501 and 502,
this may be a dumb question but, are you make clean after every edit?
T10NAZ said:
Whats weird is asusdebug.c is exactly the same on the 501 and 502,
this may be a dumb question but, are you make clean after every edit?
Click to expand...
Click to collapse
Yes, I have been using make clean, but the system I'm using might be on newer versions that are causing issues (Ubuntu 16.04).
I'm assuming that since asusdebug.c is the same between devices, you didn't receive the same error?
I'm using the toolchain included with OmniROM: prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi- through export CROSS_COMPILE=/tmp/omni/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-
Downgraded gcc to 4.8 (/usr/bin/gcc -> /usr/bin/gcc-4.8)
Anything else I should check? Not sure if I should just grab Ubuntu 14.04, put it in a VM and start again from there...
joeykrim said:
Yes, I have been using make clean, but the system I'm using might be on newer versions that are causing issues (Ubuntu 16.04).
I'm assuming that since asusdebug.c is the same between devices, you didn't receive the same error?
I'm using the toolchain included with OmniROM: prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi- through export CROSS_COMPILE=/tmp/omni/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-
Downgraded gcc to 4.8 (/usr/bin/gcc -> /usr/bin/gcc-4.8)
Anything else I should check? Not sure if I should just grab Ubuntu 14.04, put it in a VM and start again from there...
Click to expand...
Click to collapse
only difference i have is i am running 15.10 with linaro 4.9.4 toolchain I wonder if itll get stuck on the same error if i take a crack at it
---------- Post added at 10:06 PM ---------- Previous post was at 09:41 PM ----------
So i tried it, I tar -xvf'd the source, added the path to the linaro chain, used my modified makefile for Sparrow, and typed make wren_defconfig (that might be highly unconventional) and make -j# ARCH=arm
I didnt hit the errors you had, but I ran into issues im more familiar with, starting with
Code:
In file included from drivers/devfreq/devfreq_trace.h:43:0,
from drivers/devfreq/devfreq_trace.c:20:
include/trace/define_trace.h:79:43: fatal error: ./devfreq_trace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
which you just copy devfreq_trace.h into include/trace
after that I got the next error I encountered for sparrow,
Code:
drivers/hwmon/qpnp-adc-common.c: In function ‘qpnp_adc_scale_batt_therm’:
drivers/hwmon/qpnp-adc-common.c:732:4: error: ‘adcmap_btm_threshold’ undeclared (first use in this function)
adcmap_btm_threshold,
^
drivers/hwmon/qpnp-adc-common.c:732:4: note: each undeclared identifier is reported only once for each function it appears in
In file included from include/linux/kref.h:18:0,
from include/linux/of.h:21,
from drivers/hwmon/qpnp-adc-common.c:16:
and that issue, it calls either Sparrow or Wren specific battery voltages in the qpnp-adc-common.c for whatever you are working on. But it doesnt do that!! All you do is find qpnp-adc-common-wren.h
and copy pasta this:
Code:
static const struct qpnp_vadc_map_pt adcmap_btm_threshold[] = {
{-300, 1538},
{-200, 1538},
{-100, 1384},
{-90, 1372},
{-80, 1360},
{-70, 1346},
{-60, 1335},
{-50, 1322},
{-40, 1308},
{-30, 1298},
{-20, 1282},
{-10, 1269},
{0, 1255},
{10, 1251},
{20, 1238},
{30, 1225},
{40, 1212},
{50, 1199},
{60, 1186},
{70, 1173},
{80, 1160},
{90, 1147},
{100, 1122},
{110, 1111},
{120, 1097},
{130, 1086},
{140, 1074},
{150, 1060},
{160, 1048},
{170, 1035},
{180, 1021},
{190, 1009},
{200, 998},
{210, 987},
{220, 977},
{230, 966},
{240, 952},
{250, 943},
{260, 932},
{270, 923},
{280, 911},
{290, 902},
{300, 891},
{310, 881},
{320, 871},
{330, 860},
{340, 849},
{350, 839},
{360, 832},
{370, 823},
{380, 813},
{390, 807},
{400, 801},
{410, 790},
{420, 779},
{430, 774},
{440, 769},
{450, 760},
{460, 750},
{470, 742},
{480, 738},
{490, 730},
{500, 721},
{510, 714},
{520, 713},
{530, 707},
{540, 701},
{550, 695},
{560, 689},
{570, 683},
{580, 677},
{590, 671},
{600, 665},
{610, 659},
{620, 653},
{630, 647},
{640, 641},
{650, 635},
{660, 629},
{670, 623},
{680, 617},
{690, 611},
{700, 496},
{710, 490},
{720, 484},
{730, 478},
{740, 472},
{750, 466},
{760, 460},
{770, 454},
{780, 448},
{790, 442}
};
right above static const struct qpnp_vadc_map_pt adcmap_qrd_btm_threshold[] = { at line 56
There are a few more errors that can be easily fixed after that, Im not sure if its your 16.04 or omni's toochain but so far im just running into fixable errors that got in the way on sparrow as well
*Update*
I ran into 3 more issues, they are just indicating exactly where files are by adding /home/user/kernel/etc/etc/etc to things that say they dont know where its at
and I got it to build
{
"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"
}
@joeykrim do you want the zimage that i created so you can mess with twrp for now? I will try and assist in any way i can to get you to build the kernel and twrp up for Wren users!
T10NAZ said:
only difference i have is i am running 15.10 with linaro 4.9.4 toolchain I wonder if itll get stuck on the same error if i take a crack at it
---------- Post added at 10:06 PM ---------- Previous post was at 09:41 PM ----------
So i tried it, I tar -xvf'd the source, added the path to the linaro chain, used my modified makefile for Sparrow, and typed make wren_defconfig (that might be highly unconventional) and make -j# ARCH=arm
I didnt hit the errors you had, but I ran into issues im more familiar with, starting with
Code:
In file included from drivers/devfreq/devfreq_trace.h:43:0,
from drivers/devfreq/devfreq_trace.c:20:
include/trace/define_trace.h:79:43: fatal error: ./devfreq_trace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
which you just copy devfreq_trace.h into include/trace
after that I got the next error I encountered for sparrow,
Code:
drivers/hwmon/qpnp-adc-common.c: In function ‘qpnp_adc_scale_batt_therm’:
drivers/hwmon/qpnp-adc-common.c:732:4: error: ‘adcmap_btm_threshold’ undeclared (first use in this function)
adcmap_btm_threshold,
^
drivers/hwmon/qpnp-adc-common.c:732:4: note: each undeclared identifier is reported only once for each function it appears in
In file included from include/linux/kref.h:18:0,
from include/linux/of.h:21,
from drivers/hwmon/qpnp-adc-common.c:16:
and that issue, it calls either Sparrow or Wren specific battery voltages in the qpnp-adc-common.c for whatever you are working on. But it doesnt do that!! All you do is find qpnp-adc-common-wren.h
and copy pasta this:
Code:
static const struct qpnp_vadc_map_pt adcmap_btm_threshold[] = {
{-300, 1538},
{-200, 1538},
{-100, 1384},
{-90, 1372},
{-80, 1360},
{-70, 1346},
{-60, 1335},
{-50, 1322},
{-40, 1308},
{-30, 1298},
{-20, 1282},
{-10, 1269},
{0, 1255},
{10, 1251},
{20, 1238},
{30, 1225},
{40, 1212},
{50, 1199},
{60, 1186},
{70, 1173},
{80, 1160},
{90, 1147},
{100, 1122},
{110, 1111},
{120, 1097},
{130, 1086},
{140, 1074},
{150, 1060},
{160, 1048},
{170, 1035},
{180, 1021},
{190, 1009},
{200, 998},
{210, 987},
{220, 977},
{230, 966},
{240, 952},
{250, 943},
{260, 932},
{270, 923},
{280, 911},
{290, 902},
{300, 891},
{310, 881},
{320, 871},
{330, 860},
{340, 849},
{350, 839},
{360, 832},
{370, 823},
{380, 813},
{390, 807},
{400, 801},
{410, 790},
{420, 779},
{430, 774},
{440, 769},
{450, 760},
{460, 750},
{470, 742},
{480, 738},
{490, 730},
{500, 721},
{510, 714},
{520, 713},
{530, 707},
{540, 701},
{550, 695},
{560, 689},
{570, 683},
{580, 677},
{590, 671},
{600, 665},
{610, 659},
{620, 653},
{630, 647},
{640, 641},
{650, 635},
{660, 629},
{670, 623},
{680, 617},
{690, 611},
{700, 496},
{710, 490},
{720, 484},
{730, 478},
{740, 472},
{750, 466},
{760, 460},
{770, 454},
{780, 448},
{790, 442}
};
right above static const struct qpnp_vadc_map_pt adcmap_qrd_btm_threshold[] = { at line 56
There are a few more errors that can be easily fixed after that, Im not sure if its your 16.04 or omni's toochain but so far im just running into fixable errors that got in the way on sparrow as well
*Update*
I ran into 3 more issues, they are just indicating exactly where files are by adding /home/user/kernel/etc/etc/etc to things that say they dont know where its at
Click to expand...
Click to collapse
Excellent! Yea, not sure whether it's the not-yet-final Ubuntu 16.04 release, OmniROM's toolchain, or some odd combination. If I try again, I'll do everything in a VM with a fresh and final Ubuntu image...
T10NAZ said:
and I got it to build
@joeykrim do you want the zimage that i created so you can mess with twrp for now?
Click to expand...
Click to collapse
Yes, please!
Once I have the kernel image, I can focus on tinkering with the sparrow build files to get wren compiling and working. Hopefully won't take too much effort and fastboot booting...
joeykrim said:
Excellent! Yea, not sure whether it's the not-yet-final Ubuntu 16.04 release, OmniROM's toolchain, or some odd combination. If I try again, I'll do everything in a VM with a fresh and final Ubuntu image...
Yes, please!
Once I have the kernel image, I can focus on tinkering with the sparrow build files to get wren compiling and working. Hopefully won't take too much effort and fastboot booting...
Click to expand...
Click to collapse
Alrighty, I added both zImage and zImage-dtb just in case, dtb is mainly what you will work with.
And for twrp 3.0.0.0, there are a bit of changes you need to do to Sparrows files. So we will both be helping each other out with getting it stable and working right for sparrow and wren .
https://drive.google.com/file/d/0B_Duyz8Shz-YbmZ2ZE82VUZSR2c/view?usp=sharing
T10NAZ said:
Alrighty, I added both zImage and zImage-dtb just in case, dtb is mainly what you will work with.
And for twrp 3.0.0.0, there are a bit of changes you need to do to Sparrows files. So we will both be helping each other out with getting it stable and working right for sparrow and wren .
https://drive.google.com/file/d/0B_Duyz8Shz-YbmZ2ZE82VUZSR2c/view?usp=sharing
Click to expand...
Click to collapse
Great! Using the kernel you supplied and the slightly modified Build files from: https://github.com/lj50036/platform_manifest_twrp_omni and I forked here: https://github.com/joeykrim/wren
I was able to get the recovery (TWRP-v3.0.0-0) to compile and boot. wren TWRP v3.0.0-0 recovery.img: https://joeykrim.com/android/devices/wren/twrp-v3.0.0-0.jk-v1.recovery.img
Updates now posted in the development thread: http://forum.xda-developers.com/zen...nt/recovery-twrp-3-0-0-0-wi502q-root-t3343366
Bugs (All Fixed):
1) Unable to backup recovery partition - isn't visible from backup menu
2) The screen resolution is small, but it works! Any suggestions on adjusting the screen resolution?
I'll probably start with BoardConfig.mk settings...
fb0 reports (possibly inaccurate):
vi.bits_per_pixel = 32
vi.red.offset = 0 .length = 8
vi.green.offset = 8 .length = 8
vi.blue.offset = 16 .length = 8
setting GGL_PIXEL_FORMAT_RGBA_8888
double buffered
framebuffer: 0 (280 x 280)
I:Checking resolution...
I:Scaling theme width 0.875000x and height 0.875000x, offsets x: 0 y: 0

Baseband not showing up in NRD90M builds

Not sure what I am doing wrong here. Even after I get it booted, with gapps. No baseband. I flashed the dev pre 5 baseband through recovery and it succeeds. When I try to use fastboot to send the same files, it says pre flash validation failed. I'm confused as I have a working build sans baseband, which is kinda important.
shamu_Baseband_D4.01-9625-05.34+FSG-9625-02.111
shamu_Bootloader_moto-apq8084-71.21
Not sure what more information you need about my environment, but I'm happy for any discussion to help me get this resolved so I can share my work.
(MODS: if this is the wrong place, please place it in the right section)
It appears I was missing libxml2
running a new build now. Will remove this post, if that fixes it.
added libxml2-dev and it still recompiled without a baseband. I am not sure what i am doing wrong here. :/
Stramondroid said:
added libxml2-dev and it still recompiled without a baseband. I am not sure what i am doing wrong here. :/
Click to expand...
Click to collapse
I've been trying to figure this out for a week still a no go.
Stramondroid said:
added libxml2-dev and it still recompiled without a baseband. I am not sure what i am doing wrong here. :/
Click to expand...
Click to collapse
The good news is you aren't doing anything wrong!
Wondered why there is no 7.0 OTA or Factory Images for the Nexus 6 yet? Baseband issues!
Unfortunately, this makes AOSP almost useless on the Nexus 6.
did you extract the binary blobs into the source?
https://developers.google.com/android/nexus/blobs-preview
Right now there are two N AOSP ROMS in the N6 forum, one in general and one in development.
I tried both, one has the issue you described with my N6, no signal and no asking for SIM-card PIN. The other had working baseband and it was also shown correctly in About Phone. I think the one not working was the one from the guy konrad, not sure though.
Have you tried both? Maybe get in touch with those guys and find out what they did differently in their builds.
Stramondroid said:
added libxml2-dev and it still recompiled without a baseband. I am not sure what i am doing wrong here. :/
Click to expand...
Click to collapse
was you able to figure this out yet ? Thanks
hedgehogmd said:
was you able to figure this out yet ? Thanks
Click to expand...
Click to collapse
I stopped trying, everyone I talked too said to attempt a compile of the M branch, which was successful, so I know my dev box is good. It has to do with the source. I have no clue.
A solution
I'm the author of the 7.0 ROM in General. On a closer look, it seems that my initial build is actually not a clean 7.0.0_r1 build. I checked out the master branch for a handful of repositories when playing around, and that mistake coincidentally made RIL work.
tl;dr The ICU library is the culprit. Do "cd external/icu && git fetch aosp master && git checkout aosp/master" and rebuild.
Full explanation:
I did a couple of proper builds first, since I got branches messed up in my build:
Proper 7.0.0_r1 build: No baseband
Proper AOSP master build: Working
That gave me a little hope Apparently 7.0.0_r1 has issues preventing RIL from working. Relevant logs:
Code:
01-02 04:51:11.207 D/RILD ( 319): **RIL Daemon Started**
01-02 04:51:11.207 D/RILD ( 319): **RILd param count=1**
01-02 04:51:11.352 E/RILD ( 319): dlopen failed: dlopen failed: cannot locate symbol "UCNV_FROM_U_CALLBACK_STOP_57" referenced by "/system/lib/libxml2.so"...
01-02 04:51:15.371 D/RILD ( 833): **RIL Daemon Started**
01-02 04:51:15.371 D/RILD ( 833): **RILd param count=1**
01-02 04:51:15.420 E/RILD ( 833): dlopen failed: dlopen failed: cannot locate symbol "UCNV_FROM_U_CALLBACK_STOP_57" referenced by "/system/lib/libxml2.so"...
(and so on)
At the first glance it may be related to libxml2, but UCNV_FROM_U_CALLBACK_STOP is actually related to Unicode conversion. It appears in platform/external/icu.
Building 7.0.0_r1 with external/icu at AOSP master solves the issue. Does that work for you? Hope it helps!
---------- Post added at 04:06 PM ---------- Previous post was at 04:05 PM ----------
Zhaofeng Li said:
I did a couple of proper builds first, since I got branches messed up in my build
Click to expand...
Click to collapse
... And yes, I'll update my ROM to a clean build.

Question Propietary blobs/files for Odin

Hey, does anyone know how to get the propietary blobs out of the device? I'm kinda done with MIUI and i wanna try to compile some custom rom and maybe a legit twrp.
SanHelios said:
Hey, does anyone know how to get the propietary blobs out of the device? I'm kinda done with MIUI and i wanna try to compile some custom rom and maybe a legit twrp.
Click to expand...
Click to collapse
lol i am looking for the same
check this out
vamsi209 said:
lol i am looking for the same
check this out
Click to expand...
Click to collapse
what shall i check out?
SanHelios said:
what shall i check out?
Click to expand...
Click to collapse
Extracting proprietary blobs from LineageOS zip files | LineageOS Wiki
wiki.lineageos.org
SanHelios said:
Hey, does anyone know how to get the propietary blobs out of the device? I'm kinda done with MIUI and i wanna try to compile some custom rom and maybe a legit twrp.
Click to expand...
Click to collapse
Trying to look for the Chinese tool to flash the unofficial TWRP, once I manage to do that will try help on grabbing those needed proprietary blobs. May need guide on how to pull the blobs, am still a noob
dan079 said:
Trying to look for the Chinese tool to flash the unofficial TWRP, once I manage to do that will try help on grabbing those needed proprietary blobs. May need guide on how to pull the blobs, am still a noob
Click to expand...
Click to collapse
Me too... TWRP is tricky, since it can only be done by this OneInject-function of TWRP, but it's possible. I tried the 'current' unofficial release of TWRP for this, but all i got was a reboot to BL.
vamsi209 said:
Extracting proprietary blobs from LineageOS zip files | LineageOS Wiki
wiki.lineageos.org
Click to expand...
Click to collapse
yshalsager, who created the Firmware-script, told me the same.. here is his answer.
"
Hi,
Thanks for your words, glad to hear my work helps.
You can use LineageOS extract files script that will generate vendor tree for you. It is available in any device tree but you should use one of your device so it reads from its proprietary-files.txt or something.
"
Maybe LOS is closer than we think.
SanHelios said:
yshalsager, who created the Firmware-script, told me the same.. here is his answer.
"
Hi,
Thanks for your words, glad to hear my work helps.
You can use LineageOS extract files script that will generate vendor tree for you. It is available in any device tree but you should use one of your device so it reads from its proprietary-files.txt or something.
"
Maybe LOS is closer than we think.
Click to expand...
Click to collapse
niceee, so for mix 4, i extracted the twrp trees using this,
[SCRIPT] TWRP device tree generator
Create a TWRP-compatible device tree only from an Android recovery image (or a boot image if the device uses non-dynamic partitions A/B) of your device's stock ROM. It has been confirmed that this script supports images built starting from...
forum.xda-developers.com
setup the local repo for building twrp trees, using these
1. Installing the tools
A Python library/script to automatically generate TWRP-compatible device tree from a boot/recovery image - twrpdtgen/twrpdtgen
github-wiki-see.page
tried building but the device doesn't lunch after following the steps shown above,
Code:
http://www.hastebin.com/jonexiyowu.md
and one of the dev https://github.com/imjyotiraditya , helped me build an aospa rom for g8x,
now he is on to building twrp for our device odin.
if anyone has twrp trees, we can try geting aospa build ready for our device
vamsi209 said:
niceee, so for mix 4, i extracted the twrp trees using this,
[SCRIPT] TWRP device tree generator
Create a TWRP-compatible device tree only from an Android recovery image (or a boot image if the device uses non-dynamic partitions A/B) of your device's stock ROM. It has been confirmed that this script supports images built starting from...
forum.xda-developers.com
setup the local repo for building twrp trees, using these
1. Installing the tools
A Python library/script to automatically generate TWRP-compatible device tree from a boot/recovery image - twrpdtgen/twrpdtgen
github-wiki-see.page
tried building but the device doesn't lunch after following the steps shown above,
Code:
http://www.hastebin.com/jonexiyowu.md
and one of the dev https://github.com/imjyotiraditya , helped me build an aospa rom for g8x,
now he is on to building twrp for our device odin.
if anyone has twrp trees, we can try geting aospa build ready for our device
Click to expand...
Click to collapse
hey, i'm trying it right now... was able to manage a device tree from the latest weekly of the EU-rom. Repo is syncing right now for the aosp-twrp-11 repository.
U used the same script for the recovery trees?
vamsi209 said:
U used the same script for the recovery trees?
Click to expand...
Click to collapse
yes, i extracted it from the boot.img.
Update... build/envsetup.sh error, anyone any suggestions?
Update managed to get envsetup.sh to work, got following error messages
source build/envsetup.sh
including device/xiaomi/odin/vendorsetup.sh
COMMON_LUNCH_CHOICES: Befehl nicht gefunden.
COMMON_LUNCH_CHOICES: Befehl nicht gefunden.
lunch twrp_odin-eng
In file included from build/make/core/config.mk:291:
In file included from build/make/core/envsetup.mk:266:
build/make/core/product_config.mk:155: error: Can not locate config makefile for product "twrp_odin".
23:22:04 dumpvars failed with: exit status 1
WARNING: Trying to fetch a device that's already there
Traceback (most recent call last):
File "/home/dave/AOSP-Recovery/vendor/twrp/build/tools/roomservice.py", line 431, in <module>
fetch_device(device)
File "/home/dave/AOSP-Recovery/vendor/twrp/build/tools/roomservice.py", line 399, in fetch_device
git_data = search_gerrit_for_device(device)
File "/home/dave/AOSP-Recovery/vendor/twrp/build/tools/roomservice.py", line 86, in search_gerrit_for_device
device_data = check_repo_exists(git_data, device)
File "/home/dave/AOSP-Recovery/vendor/twrp/build/tools/roomservice.py", line 62, in check_repo_exists
raise Exception("{device} not found,"
Exception: odin not found,exiting roomservice
In file included from build/make/core/config.mk:291:
In file included from build/make/core/envsetup.mk:266:
build/make/core/product_config.mk:155: error: Can not locate config makefile for product "twrp_odin".
23:22:05 dumpvars failed with: exit status 1
** Don't have a product spec for: 'twrp_odin'
** Do you have the right repo manifest?
Anyone a good guess?
Did you had any luck, or any chance I can help?
Puksom said:
Did you had any luck, or any chance I can help?
Click to expand...
Click to collapse
well, i made some progress, but i failed again. I posted a thread in the official twrp forum. Maybe you might want to take a look at it.. thx.
Post in thread '[DEV]How to compile TWRP touch recovery' https://forum.xda-developers.com/t/dev-how-to-compile-twrp-touch-recovery.1943625/post-85686505
Puksom said:
Did you had any luck, or any chance I can help?
Click to expand...
Click to collapse
I'm a total beginner, so i might be wrong. But as far as i can tell, the makefiles of the extracted device tree need to be update or even completely rebuild.
Hi, it seems like I was able to execute the script successfully.
It didn't work on Windows because it got stuck on the execution of unpackimg.bat.
I ran it on Linux and it worked (after chmod 777 of boot.img). This is the command I ran:
python3 -m twrpdtgen -o ./odin ./boot.img
output:
Code:
TWRP device tree generator
Version 1.3.0
[INFO] Cloning AIK...
Done! You can find the device tree in odin/xiaomi/odin
I took boot.img from the latest MIUI 12.5.7.0 China Stable
Now I have what it seems to be the device tree (odin.zip) but I don't know what to do it it or what it is.
radoinc said:
Hi, it seems like I was able to execute the script successfully.
It didn't work on Windows because it got stuck on the execution of unpackimg.bat.
I ran it on Linux and it worked (after chmod 777 of boot.img). This is the command I ran:
python3 -m twrpdtgen -o ./odin ./boot.img
output:
Code:
TWRP device tree generator
Version 1.3.0
[INFO] Cloning AIK...
Done! You can find the device tree in odin/xiaomi/odin
I took boot.img from the latest MIUI 12.5.7.0 China Stable
Now I have what it seems to be the device tree (odin.zip) but I don't know what to do it it or what it is.
Click to expand...
Click to collapse
This is great, so we know this script works and does what it is supposed to do...
I checked the makefiles to see if there are any differences, but there are none. So it suggests that it doesn't matter, from which version you get the files from. I love, that the users of the Mi Mix 4 are more open so compiling than the community of the MI 11 Ultra is..
SanHelios said:
This is great, so we know this script works and does what it is supposed to do...
I checked the makefiles to see if there are any differences, but there are none. So it suggests that it doesn't matter, from which version you get the files from. I love, that the users of the Mi Mix 4 are more open so compiling than the community of the MI 11 Ultra is..
Click to expand...
Click to collapse
I'm trying to replicate your steps but I get the same "Can not locate config makefile for product "twrp_odin"." as you did above. In the other topic I see you managed to get past that step.
I see you get some output after executing envsetup.sh and it seems like this is related to the device tree.
Can you please share what you did with the device tree before attempting to compile twrp? I'd like to try myself but I can't find clear instructions.
radoinc said:
I'm trying to replicate your steps but I get the same "Can not locate config makefile for product "twrp_odin"." as you did above. In the other topic I see you managed to get past that step.
I see you get some output after executing envsetup.sh and it seems like this is related to the device tree.
Can you please share what you did with the device tree before attempting to compile twrp? I'd like to try myself but I can't find clear instructions.
Click to expand...
Click to collapse
Acutally i left it completely unchanged, the only thing i did was to change the repository. I deleted the aosp-repository and took the omni-twrp-repository
(https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni)
mkdir twrp
cd twrp
repo init -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-10.0
repo sync
after syncing was complete, i followed these instructions
4. Build TWRP from source
A Python library/script to automatically generate TWRP-compatible device tree from a boot/recovery image - twrpdtgen/twrpdtgen
github-wiki-see.page
SanHelios said:
Acutally i left it completely unchanged, the only thing i did was to change the repository. I deleted the aosp-repository and took the omni-twrp-repository
(https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni)
mkdir twrp
cd twrp
repo init -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-10.0
repo sync
after syncing was complete, i followed these instructions
4. Build TWRP from source
A Python library/script to automatically generate TWRP-compatible device tree from a boot/recovery image - twrpdtgen/twrpdtgen
github-wiki-see.page
Click to expand...
Click to collapse
Thanks! Now I managed to get the same result as you. The error seems to be raised by mkbootimg.py:
Python:
def write_header(args):
BOOT_IMAGE_HEADER_V1_SIZE = 1648
BOOT_IMAGE_HEADER_V2_SIZE = 1660
BOOT_MAGIC = 'ANDROID!'.encode()
if (args.header_version > 2):
raise ValueError('Boot header version %d not supported' % args.header_version)
To me it seems like this Omni repo includes old version of mkbootimg.py, because in the google repos I can see that the current version of this function looks like this:
Python:
def write_header(args):
if args.header_version > 4:
raise ValueError(
f'Boot header version {args.header_version} not supported')
if args.header_version in {3, 4}:
return write_header_v3_and_above(args)
It seems like Boot header version 3 was introduced with Android 11: https://source.android.com/devices/bootloader/boot-image-header
I think we can't do much with the Omnia repos until they get updated with current mkbootimg.
radoinc said:
Thanks! Now I managed to get the same result as you. The error seems to be raised by mkbootimg.py:
Python:
def write_header(args):
BOOT_IMAGE_HEADER_V1_SIZE = 1648
BOOT_IMAGE_HEADER_V2_SIZE = 1660
BOOT_MAGIC = 'ANDROID!'.encode()
if (args.header_version > 2):
raise ValueError('Boot header version %d not supported' % args.header_version)
To me it seems like this Omni repo includes old version of mkbootimg.py, because in the google repos I can see that the current version of this function looks like this:
Python:
def write_header(args):
if args.header_version > 4:
raise ValueError(
f'Boot header version {args.header_version} not supported')
if args.header_version in {3, 4}:
return write_header_v3_and_above(args)
It seems like Boot header version 3 was introduced with Android 11: https://source.android.com/devices/bootloader/boot-image-header
I think we can't do much with the Omnia repos until they get updated with current mkbootimg.
Click to expand...
Click to collapse
My question is, do the makefiles from the devicetree need to be adjusted or completely rebuild to android 11 parameters? I.e. rhe command "add_lunch_combo" is obsolete and "COMMAND_LUNCH_CHOICES" took its place..
Sorry in advance for this nooby questions...

Categories

Resources