Problem while compiling recovery - General Questions and Answers

So I just started developing a recovery for a phone that has no support from any other developers, and basically I need to do all the stuff from 0. I follow some guides, I read some forums on the internet and hope I can make it (it's my first time developing something for Android). But for now I have this problem and I can't find it anywhere along with the proper solution (maybe I haven't searched enough). Every time I type make recoveryimage in the terminal, it is working for like 30 seconds, and then a error like this appears:
Code:
target SharedLib: libc (/home/cosinus/Workspace/X3_Soul-CM12.1/out/target/product/X3_Soul/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so)
[COLOR="Red"]/home/cosinus/Workspace/X3_Soul-CM12.1/out/target/product/X3_Soul/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a([COLOR="DarkRed"][B]gethnamaddr.o[/B][/COLOR]): error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
make: *** [/home/cosinus/Workspace/X3_Soul-CM12.1/out/target/product/X3_Soul/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so] Error 1
#### make failed to build some targets (01:02 (mm:ss)) ####[/COLOR]
(In my noobness) I tried to delete all the files that generates the error, in this case, gethnamaddr.o, but there are too much files, and I don't even know why I need to delete every single file that ends with *.o extension and if it's a good solution. I saw that everytime I delete a file that returns an error, the file is generated again, but after it's generated, it won't return any error. So I tought that maybe the *.o files are corrupt, and "make" generates them correctly.
Now that I told you the story, I'm asking:
Is it normal that I have so many errors because of *.o files?
How can I solve it?
The phone: Allview X3 Soul (I heard it's a clone of Gionee S6)
Chipset: MT6753
Android version: 5.1

Related

Android code compilation

I'm trying to get some custom code compiled for android, but when I try to make the file, it requires a function called errx in libc -> err.h.
When I use the one I have on my system and try to recompile libc.so, I get the following compilation error:
Code:
In file included from bionic/libc/unistd/getopt_long.c:59:
bionic/libc/include/err.h:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'extern'
In file included from bionic/libc/unistd/getopt_long.c:60:
bionic/libc/include/errno.h:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'extern'
If I try to delete the contents or err.h, I get no errors.
Note that I'm not modifying errno.h in any way.
Is there a workaround for this?
I'd really like a workaround to this.

[Q] Cant get AOSP to compile ever !

Hi guys
I am working on mac with OS 10.7.5
i have xcode 4.6
I downloaded 4.2 version for Android
Following is the error , i would really appreciate it if somebody could just throw some light on what is actually hapenning
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/cwchar:61: error: expected constructor, destructor, or type conversion before ‘extern’
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/new:45,
from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/bits/stl_construct.h:65,
from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/memory:55,
from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/string:48,
from build/libs/host/include/host/pseudolocalize.h:4,
from build/libs/host/pseudolocalize.cpp:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/exception:40: error: expected declaration before end of line
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o] Error 1

Resurrection Remix nougat sync error

I'm trying to download Resurrection Remix repo files. Already downloaded 32GB but then at a point it showed me this error and the sync exited :
Fetching projects : 100% (586/586)
error: Exited sync due to fetch errors
I even tried with repo sync -f but it didn't work. Same error at that particular point. Please somebody tell me what to do. I dont want this 32GB to be a waste.
You need to scroll up and see which repo is failing to sync. Then you can try to figure it what the problem with that one is.
jisoo said:
You need to scroll up and see which repo is failing to sync. Then you can try to figure it what the problem with that one is.
Click to expand...
Click to collapse
Oh I see, acrually there are many files which are showing error while fetching ( "error: cannot fetch platform/prebuilts/go/darwin-x86" and many more). But the thing is how do I fix this ? I have a stable network connection but how can i download those particular files which are not being fetched ?
Suvam Mondal said:
Oh I see, acrually there are many files which are showing error while fetching ( "error: cannot fetch platform/prebuilts/go/darwin-x86" and many more). But the thing is how do I fix this ? I have a stable network connection but how can i download those particular files which are not being fetched ?
Click to expand...
Click to collapse
The repository is either not there anymore, or the branch which repo is looking for doesn't exist.
You can have a look at the manifest in .repo/manifest.xml to see in more detail which URL and branch this is.
How did you get this manifest file (i.e. how did you init your repo) which has such non-existing repos?
jisoo said:
The repository is either not there anymore, or the branch which repo is looking for doesn't exist.
You can have a look at the manifest in .repo/manifest.xml to see in more detail which URL and branch this is.
How did you get this manifest file (i.e. how did you init your repo) which has such non-existing repos?
Click to expand...
Click to collapse
Dont know, just followed the instructions in the Resurrection Remix github page.
However, restarted my pc and that error seemed to be fixed, but got this error at the last step of the process(i.e, during uncompression of files)
I have attached the log file. Please have a look and tell me what to do.
Suvam Mondal said:
Dont know, just followed the instructions in the Resurrection Remix github page.
However, restarted my pc and that error seemed to be fixed, but got this error at the last step of the process(i.e, during uncompression of files)
I have attached the log file. Please have a look and tell me what to do.
Click to expand...
Click to collapse
It looks like there was some errors downloading some of the hardware/qcom repositories, and some of the files are corrupt. That really should not happen by itself, and you may have other bigger issues happening with your VM.
Anyway, you have the option of deleting everything and starting from scratch. If you don't want to do that, you can try deleting the ".repo/project-objects/LineageOS/hardware_qcom_media.git/" and possibly the other hardware_qcom folders. This may remove all the corrupted files as well, and let you re-download only those repositories by doing "repo sync" later.
If repo is able to finish successfully, you should at least have non-corrupted files for the build, though as I said you may have some deeper filesystem corruption issues going on as well.
jisoo said:
It looks like there was some errors downloading some of the hardware/qcom repositories, and some of the files are corrupt. That really should not happen by itself, and you may have other bigger issues happening with your VM.
Anyway, you have the option of deleting everything and starting from scratch. If you don't want to do that, you can try deleting the ".repo/project-objects/LineageOS/hardware_qcom_media.git/" and possibly the other hardware_qcom folders. This may remove all the corrupted files as well, and let you re-download only those repositories by doing "repo sync" later.
If repo is able to finish successfully, you should at least have non-corrupted files for the build, though as I said you may have some deeper filesystem corruption issues going on as well.
Click to expand...
Click to collapse
Thank you very much, it worked. Successfully downloaded the repo files :
But now I'm stuck at the breakfast codename step
My device(Meizu m2 note) has no codename, you know any alternate way for this step ?
Suvam Mondal said:
Thank you very much, it worked. Successfully downloaded the repo files :
But now I'm stuck at the breakfast codename step
My device(Meizu m2 note) has no codename, you know any alternate way for this step ?
Click to expand...
Click to collapse
That would be because RR doesn't officially support this device, and therefore the device and kernel trees are not in the repo probably.
You'll need to port the device yourself, which may be difficult or easy (depending on your experience and how well supported the device generally is).
I had a quick look, and it's probably best if you use source trees from the dev who builds for LineageOS: https://github.com/Moyster?tab=repositories
You'll want to be familiar with the basics of git and github for this, I think.
Best way to figure out what is needed to port a device to another ROM is to compare the device trees of an identical device on the 2 different ROMs. So for instance, because I have a Nexus 5X (bullhead), I would compare the device_lge_bullhead repos in both Resurrection Remix and LineageOS, in order to figure out what I need to add to port a LineageOS device tree to Resurrection Remix.
Anyway, that's pretty much all I can suggest. If you have any specific question, feel free to post here or send me a PM.
Good luck!
jisoo said:
That would be because RR doesn't officially support this device, and therefore the device and kernel trees are not in the repo probably.
You'll need to port the device yourself, which may be difficult or easy (depending on your experience and how well supported the device generally is).
I had a quick look, and it's probably best if you use source trees from the dev who builds for LineageOS: https://github.com/Moyster?tab=repositories
You'll want to be familiar with the basics of git and github for this, I think.
Best way to figure out what is needed to port a device to another ROM is to compare the device trees of an identical device on the 2 different ROMs. So for instance, because I have a Nexus 5X (bullhead), I would compare the device_lge_bullhead repos in both Resurrection Remix and LineageOS, in order to figure out what I need to add to port a LineageOS device tree to Resurrection Remix.
Anyway, that's pretty much all I can suggest. If you have any specific question, feel free to post here or send me a PM.
Good luck!
Click to expand...
Click to collapse
Yes, almost there. This is the first time I am building a ROM, very excited
But i got this error while building the ROM. First i tried with USE_NINJA which gave some error build-lineage_m2note.ninja failed to make. Then I tried with USE_NINJA=false which gave me this error(log file).
I have attached the log file. Please tell me what to do. I followed every step still I got this error, that also in the final step . :crying:
Suvam Mondal said:
Yes, almost there. This is the first time I am building a ROM, very excited
But i got this error while building the ROM. First i tried with USE_NINJA which gave some error build-lineage_m2note.ninja failed to make. Then I tried with USE_NINJA=false which gave me this error(log file).
I have attached the log file. Please tell me what to do. I followed every step still I got this error, that also in the final step . :crying:
Click to expand...
Click to collapse
I would stick with not adding any specific definition for the build, and just using the standard variables (so not adding USE_NINJA true or false), and then having a look at the error messages there.
At least, I won't be able to help much otherwise, as I always just use the default settings for the build.
In the log you attached, there's a bunch of "Cannot allocate memory" errors. I would have a look at the kernel logs as well (you can get these with the "dmesg" command, or using "cat /var/log/kern.log"). You will probably see what is causing the error from here, as it seems to be related to the OS itself.
You may have out of memory (OOM) issues, which is common with nougat builds. To fix that, you can follow the instructions here: http://stackoverflow.com/questions/...ror-try-increasing-heap-size-with-java-option
jisoo said:
I would stick with not adding any specific definition for the build, and just using the standard variables (so not adding USE_NINJA true or false), and then having a look at the error messages there.
At least, I won't be able to help much otherwise, as I always just use the default settings for the build.
In the log you attached, there's a bunch of "Cannot allocate memory" errors. I would have a look at the kernel logs as well (you can get these with the "dmesg" command, or using "cat /var/log/kern.log"). You will probably see what is causing the error from here, as it seems to be related to the OS itself.
You may have out of memory (OOM) issues, which is common with nougat builds. To fix that, you can follow the instructions here: http://stackoverflow.com/questions/...ror-try-increasing-heap-size-with-java-option
Click to expand...
Click to collapse
Did that. But now I am facing this nina_wrapper error 1 at 99% of compilation
Code:
[ 99% 3295/3298] Docs droiddoc: /home/...t/target/common/docs/doc-comment-check
FAILED: /bin/bash /home/suvam/rr/out/target/common/docs/doc-comment-check-timestamp.rsp
frameworks/base/core/java/android/provider/Settings.java:3657: error 101: Unresolved link/see tag "android.provider.Settings.Global#KEY_SMS_BREATH" in android.provider.Settings.System
frameworks/base/core/java/android/widget/SeekBar.java:41: error 101: Unresolved link/see tag "ProgressBar#setMax(int)" in android.preference.CustomSeekBarPreference
DroidDoc took 345 sec. to write docs to /home/suvam/rr/out/target/common/docs/doc-comment-check
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
Suvam Mondal said:
Did that. But now I am facing this nina_wrapper error 1 at 99% of compilation
Code:
[ 99% 3295/3298] Docs droiddoc: /home/...t/target/common/docs/doc-comment-check
FAILED: /bin/bash /home/suvam/rr/out/target/common/docs/doc-comment-check-timestamp.rsp
frameworks/base/core/java/android/provider/Settings.java:3657: error 101: Unresolved link/see tag "android.provider.Settings.Global#KEY_SMS_BREATH" in android.provider.Settings.System
frameworks/base/core/java/android/widget/SeekBar.java:41: error 101: Unresolved link/see tag "ProgressBar#setMax(int)" in android.preference.CustomSeekBarPreference
DroidDoc took 345 sec. to write docs to /home/suvam/rr/out/target/common/docs/doc-comment-check
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
Click to expand...
Click to collapse
As per this page (http://stackoverflow.com/questions/36733124/failed-to-make-the-source-of-android-6-0), you should check which JDK version you are building with. I've never seen this type of error, so you may just want to google it a bit further, if the JDK version doesn't help. Looks like you are making a lot of progress though!
jisoo said:
As per this page (http://stackoverflow.com/questions/36733124/failed-to-make-the-source-of-android-6-0), you should check which JDK version you are building with. I've never seen this type of error, so you may just want to google it a bit further, if the JDK version doesn't help. Looks like you are making a lot of progress though!
Click to expand...
Click to collapse
Checked. My jdk version is 1.8 as required for android 7
Resynced and used brunch DeviceCodeName and got this error
Code:
Building Kernel Config
make CFLAGS_MODULE="-fno-pic" -C kernel/meizu/m2note O=/home/suvam/rr/out/target/product/m2note/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE="/home/suvam/rr/prebuilts/misc/linux-x86/ccache/ccache aarch64-linux-androidkernel-" VARIANT_DEFCONFIG= SELINUX_DEFCONFIG= los14_m2note_defconfig
make[1]: Entering directory '/home/suvam/rr/kernel/meizu/m2note'
HOSTCC scripts/basic/fixdep
/bin/sh: 1: ccache: not found
scripts/Makefile.host:118: recipe for target 'scripts/basic/fixdep' failed
make[3]: *** [scripts/basic/fixdep] Error 127
/home/suvam/rr/kernel/meizu/m2note/Makefile:424: recipe for target 'scripts_basic' failed
make[2]: *** [scripts_basic] Error 2
Makefile:130: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/suvam/rr/kernel/meizu/m2note'
vendor/cm/build/tasks/kernel.mk:283: recipe for target '/home/suvam/rr/out/target/product/m2note/obj/KERNEL_OBJ/.config' failed
make: *** [/home/suvam/rr/out/target/product/m2note/obj/KERNEL_OBJ/.config] Error 2
make: *** Waiting for unfinished jobs....
It took approx 4 hours and then the compilation terminated.
Really hopeless now
*UPDATED*
resynced the repo and the device kernel and used brunch devicecode command and got this out of memory error and asked me to increase my heap size. How much should I set the heap size to ? I am having 6gb ram and current heap size is 3gb (by using java -Xmx 3072m)
I have attached the log file
Sync app email
Hi, i have installed on my Samsung s3 i9300 a resurrection remix but my app "aquamail" don't synchronizes in background.
When i update manually, it works regularly.
Please, can you help me?. :crying:
Thank's
mariorolex said:
Hi, i have installed on my Samsung s3 i9300 a resurrection remix but my app "aquamail" don't synchronizes in background.
When i update manually, it works regularly.
Please, can you help me?. :crying:
Thank's
Click to expand...
Click to collapse
Can someone help me?
mariorolex said:
Can someone help me?
Click to expand...
Click to collapse
Does anyone else have my own problem?. :crying::crying::crying:
Suvam Mondal said:
*UPDATED*
resynced the repo and the device kernel and used brunch devicecode command and got this out of memory error and asked me to increase my heap size. How much should I set the heap size to ? I am having 6gb ram and current heap size is 3gb (by using java -Xmx 3072m)
I have attached the log file
Click to expand...
Click to collapse
Reduce jack threads if you don't have at least 8GB free ram.
How do you solve Unresolved link/see tag error?

[HELP] LineageOS 14.1 Development

Hi. I am building LineageOS 14.1 for Huawei P8 Lite and used this tutorial: https://github.com/masterdoctor/Lin...i/LineageOS-|-Build-Tutorial-|-Huawei-P8-Lite
Done everything in the tutorial, everything looked fine until the build step. From that moment, I was like in "hell".
"croot" and "mka" commands didn't work, if I would've type them and enter it would say "unknown command" and recommended me a list of apps with a "similar" command.
Make worked, but after 3 minutes something about Ninja wrapper or builder error 1. I got a way to skip that, putting something in .bashrc to disable Ninja Wrapper.
Again tried, still no sign of "mka" or "croot" that they work, still stucked just with make.
Finnaly, I really got a hope, the process was longer than 3 minutes, I waited 20-30 minutes but stuck again with an error : :crying:
make: *** No rule to make target '/.txt', needed by '/root/android/system/out/target/common/obj/PACKAGING/checkpublicapi-cm-last-timestamp'. Stop.
[email protected]:~/android/system#
That is all what I got. Searched again on google now for this error and found a "fix" and ran this command to build : "make update-api && make -j4".
After again somewhere between 20-30 minutes got even more errors:
make: *** No rule to make target '/.txt', needed by '/root/android/system/out/target/common/obj/PACKAGING/checkpublicapi-cm-last-timestamp'. Stop.
make: *** Waiting for unfinished jobs....
Checking API: checktestapi-current
[email protected]:~/android/system#
I want to mention that I am using Ubuntu 16.04 64 Bit and that I did not used ccache, beacuse I didn't had too much space left.
May I done something wrong? I didn't install something? I missed something? Is there a fix for this?
I will be very thankful is someone helps me:good:
Thanks in advance!
Hi, I'm very sorry but the guide was incorrect.
Please do not use that guide.

Issues Building LineageOS 14.1 Fron Source

I've been following the guide at the lineage website for building for the herolte
Unfortunately when I get to the part about proprietary blobs I run into a little bit of an issue
Inside of the device/samsung folder their are two folders
One is hero-common and the other herolte
It says go into the herolte folder to run the extract-files.sh stript to pull the blobs from my device.
The problem I'm running into is that their is no such script but only in the hero-common folder.
When I run that it grabs 99% of the files it looks like but still not able to grab them all.
My question is how on earth does all of this work and is their anyone that would spend some time helping a curious guy out?
I come from a solid background in Java programming and know my way around a linux box enough to say so.
Here's my error:
Starting build with ninja
ninja: Entering directory `.'
ninja: error: 'vendor/samsung/hero-common/proprietary/sbin/cbd', needed by '/home/cody/android/lineage/out/target/product/herolte/root/sbin/cbd', missing and no known rule to make it
make: *** [build/core/ninja.mk:152: ninja_wrapper] Error 1
make: Leaving directory '/home/cody/android/lineage'
#### make failed to build some targets (01:16 (mm:ss)) ####
Edit. Fixed!

Categories

Resources