[Q] building from source questions - Nexus 5 Q&A, Help & Troubleshooting

I just built android AOSP from source from googles repo. I didn't use the OTA pakage command because it kept telling me that it wasn't installed or whatever. So I built it and now I have the .IMG files in my out folder. My question is, is there any way that I can turn those .IMG files into a zip? And if I were to start cherry picking from git or gerrit, will it have to rebuild the entire ROM or will it just recreate the parts of the ROM that I cherry picked?

What command did you use? I haven't built AOSP for ages.
"Make installclean" is a good command to use before you build but after you cherry pick. It will clean what is needed to be cleaned. If you're using CCache you could have a build pretty quickly
Sent from my Nexus 5 using Tapatalk

skeliton lord said:
... And if I were to start cherry picking from git or gerrit, will it have to rebuild the entire ROM or will it just recreate the parts of the ROM that I cherry picked?
Click to expand...
Click to collapse
unless you do a clean/clobber, it should usually only rebuild the changes/dependant parts.

f14w3d said:
unless you do a clean/clobber, it should usually only rebuild the changes/dependant parts.
Click to expand...
Click to collapse
rootSU said:
What command did you use? I haven't built AOSP for ages.
"Make installclean" is a good command to use before you build but after you cherry pick. It will clean what is needed to be cleaned. If you're using CCache you could have a build pretty quickly
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
So i have to use the make installclean command and it won't rebuild the entire ROM?
And do you happen to know a way to merge .IMG files into a flashable zip?

Related

[Q] CM11 LG P700 to cr3pt

Hi,
New to building Android and want to build the code by cr3pt for the p700.
I have check out the base CM 11 code but I am guessing there is additional code by cr3pt to build the LG 7 p700 parts. Are these available to download and if so where?
I am assuming, and I could be wrong, that either the additional code is independant of the base code or the two can be merged. I have never used GIT so it is all a bit new but I am sure it will be no harder than svn (probably easier).
Any howtos gratefully received.
Thanks,
bibble_235 said:
Hi,
New to building Android and want to build the code by cr3pt for the p700.
I have check out the base CM 11 code but I am guessing there is additional code by cr3pt to build the LG 7 p700 parts. Are these available to download and if so where?
I am assuming, and I could be wrong, that either the additional code is independant of the base code or the two can be merged. I have never used GIT so it is all a bit new but I am sure it will be no harder than svn (probably easier).
Any howtos gratefully received.
Thanks,
Click to expand...
Click to collapse
You can check out xda university.
But the basics are a kernel that works, correct libs for accessing your devices hardware, and using logcat/dmesg/strace to debug everything else.
I have never used git either, but kgit is a nice kde gui for git.
You should look around for tutorial's on git. (There has got to be one.)
Lgrootnoob said:
You can check out xda university.
But the basics are a kernel that works, correct libs for accessing your devices hardware, and using logcat/dmesg/strace to debug everything else.
I have never used git either, but kgit is a nice kde gui for git.
You should look around for tutorial's on git. (There has got to be one.)
Click to expand...
Click to collapse
Thanks this is a fine place to start.
Good place to start indeed. Sound like all I need to do is change
lunch cm_i9100-userdebug
to
lunch cm_p700-userdebug
I wouldn't know. Im not a rom dev. But I do know that for testing builds, the userdebug will have adb and everything ready.
So you got that right.
Anyways, you can use the tool in my signature to help debug your rom.
It has strace, auto logcat capture, and is about to add auto dmesg but you can do that by typing.
Code:
adb shell dmesg | more
or for output to notepad
Code:
(adb shell dmesg > dmesgout.txt)&(notepad dmesgout.txt)
Just not in linux though.
If you plan on becoming a rom dev full on, then you can link to my post and have your windows users collect logcats with my tool (For eaasy debugging) and upload the txt file output.
Code:
lgctnp
Well lunch did not work. Guessing the p700 code is not on the cm11 branch
Sent from my GT-N8013 using Tapatalk
bibble_235 said:
Well lunch did not work. Guessing the p700 code is not on the cm11 branch
Sent from my GT-N8013 using Tapatalk
Click to expand...
Click to collapse
This is what I want I think, I case others find my thread.
http://forum.xda-developers.com/showthread.php?t=2329641

Compiling source with .mk files help

I have compiled java based source code into APKs. Either with gradlew or ant. I cannot however figure out how to compile aosp based source. Like their keyboard has no manifest. Just a dot mk file. I have little experience with cross compilation. I CCd one c program I wrote with the NDK and cmake. Is there a special procedure or do I compile with the ndk? Ive seen lunch thrown around in forums. Can someone help me out please?
What are you trying to compile? AOSP source to build a ROM? Individual AOSP app?
Elluel said:
What are you trying to compile? AOSP source to build a ROM? Individual AOSP app?
Click to expand...
Click to collapse
Individual AOSP app. The keyboard.
codecaine21 said:
Individual AOSP app. The keyboard.
Click to expand...
Click to collapse
http://xda-university.com/as-a-developer/downloadcompile-specific-rom-parts
Elluel said:
http://xda-university.com/as-a-developer/downloadcompile-specific-rom-parts
Click to expand...
Click to collapse
Thank you

Device tree, vendor files.

Hi, I'm currently trying to build AOSP for our device from source however I cannot figure out how to add device support, I've followed so many guides on editing the local_manifests.XML but I can't seem to get it to work.
Can any of our devs explain to me how to build AOSP with the addition of our device support? I'm not entirely worried about kernel ATM as our source was released so I will build that.
I just can't for the life of me add device support properly.. Could anyone link me to a guide or some other stuff to read? Google is very unhelpful when googling Linux related issues.
Edit - to clear up any confusion bottom line as of right now I basically need to know how to implement the device tree we already do have (several github links, mainly cm based) into my AOSP source.
Would I just technically copy the files into Google's already created device/vendor/ folders?
https://source.android.com/source/add-device.html using this link as reference. May be very bland.
christopherrrg said:
Hi, I'm currently trying to build AOSP for our device from source however I cannot figure out how to add device support, I've followed so many guides on editing the local_manifests.XML but I can't seem to get it to work.
Can any of our devs explain to me how to build AOSP with the addition of our device support? I'm not entirely worried about kernel ATM as our source was released so I will build that.
I just can't for the life of me add device support properly.. Could anyone link me to a guide or some other stuff to read? Google is very unhelpful when googling Linux related issues.
Edit - to clear up any confusion bottom line as of right now I basically need to know how to implement the device tree we already do have (several github links, mainly cm based) into my AOSP source.
Would I just technically copy the files into Google's already created device/vendor/ folders?
https://source.android.com/source/add-device.html using this link as reference. May be very bland.
Click to expand...
Click to collapse
Try building CyanogenMod instead. They have device specific instructions!
Sent from my MotoG3 using Tapatalk
am2012 said:
Try building CyanogenMod instead. They have device specific instructions!
Sent from my MotoG3 using Tapatalk
Click to expand...
Click to collapse
Ya you can dl the source for both the device and vendor ........copy them over to the source and you shouldn't have a problem
am2012 said:
Try building CyanogenMod instead. They have device specific instructions!
Sent from my MotoG3 using Tapatalk
Click to expand...
Click to collapse
he's trying to build aosp.. why would he build cyanogenmod?
HelpMeruth said:
he's trying to build aosp.. why would he build cyanogenmod?
Click to expand...
Click to collapse
Fair enough. I imagine as he posted this 6 months ago, he has been successful in his attempts!

[rom][d2303] pac-rom

PAC ROM for D2303
https://onedrive.live.com/redir?res...19&authkey=!AIAixlfmiDf-uR8&ithint=folder,zip
(unfortunately, I have no idea what happened with my Ubuntu, the build process doesn't create a .zip file, you'll have to flash it with fastboot boot/userdata/system)
of all the main things: wifi, mobile data, gps, voice calls working...camera not
installed on d2303 things that do not work.
Camera
proximity sensor
.During the call screen does Not turn off
handsfree speaker
* The data connection works 3G and 4G
themes CM WORKING FINE
everything else PERFECT
great job
Try putting this and the other roms in the right xda section shouldn't they be in the original Android development forum with cm+omni ect just a thought like few screenshots wouldn't go amiss either
D2303 5.1 deodexed z2 port+z5+X apps+themes, be,xr,sv,ad,XZRt2urecovery,xposed,z5 cam2.0,xLOUD,S-Force,viperaudio+more
[email protected] said:
Try putting this and the other roms in the right xda section shouldn't they be in the original Android development forum with cm+omni ect just a thought like few screenshots wouldn't go amiss either
D2303 5.1 deodexed z2 port+z5+X apps+themes, be,xr,sv,ad,XZRt2urecovery,xposed,z5 cam2.0,xLOUD,S-Force,viperaudio+more
Click to expand...
Click to collapse
well, yeah, i honestly didnt know where to put them, because i didnt actually 'develop' them...the build process has errors that need to be fixed but i didnt think it is 'development' so i post them here
quake73 said:
well, yeah, i honestly didnt know where to put them, because i didnt actually 'develop' them...the build process has errors that need to be fixed but i didnt think it is 'development' so i post them here
Click to expand...
Click to collapse
So many roms..i bet your workspace is a mess right now
Local manifest you used for that rom? And can you post the errors? (use the "code" tag or paste them in pastebin and put link here)
Konstantinosj77 said:
So many roms..i bet your workspace is a mess right now
Local manifest you used for that rom? And can you post the errors? (use the "code" tag or paste them in pastebin and put link here)
Click to expand...
Click to collapse
xexe
about the errors that I had, I am more than glad to share them (I have a simple text file and write reminders there, to remember them and not "reinvent the wheel" every time)
For this one, PACROM, I think the only error was 'unsupported relloc 43', the cure is:
cp /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin/ld
(for a long time, i thought the cure was WITHOUT_HOST_CLANG=true)
the manifest is a mess but here it is...i also have created a file in vendor/pac/products and added cm.mk in device/sony/eagle...built it with "build-pac.sh eagle"
quake73 said:
xexe
about the errors that I had, I am more than glad to share them (I have a simple text file and write reminders there, to remember them and not "reinvent the wheel" every time)
For this one, PACROM, I think the only error was 'unsupported relloc 43', the cure is:
cp /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin/ld
(for a long time, i thought the cure was WITHOUT_HOST_CLANG=true)
the manifest is a mess but here it is...i also have created a file in vendor/pac/products and added cm.mk in device/sony/eagle...built it with "build-pac.sh eagle"
Click to expand...
Click to collapse
oh good old "unsupported relloc" i use arch linux and got it in every build.
It's fixed on AOSP master branch https://android-review.googlesource.com/#/c/223100/
CM13 uses this patch too
Konstantinosj77 said:
oh good old "unsupported relloc" i use arch linux and got it in every build.
It's fixed on AOSP master branch https://android-review.googlesource.com/#/c/223100/
CM13 uses this patch too
Click to expand...
Click to collapse
(mine is virtual Ubuntu 16)
i must admit, the 6.0 roms are building 'more flawlessly' than the 5.1 variants....and it seems that 5.1s are not getting any more fixes.
i dont know if you are trying to build any but...i tried building cm12.1 for 2 weeks, with every possible combination of device tree and vendor (SonyAOSP/SonyCM/xperiadev/CM, sony vendor files/Benevolent) and there is no mobile data connection, any ideas?
quake73 said:
(mine is virtual Ubuntu 16)
i must admit, the 6.0 roms are building 'more flawlessly' than the 5.1 variants....and it seems that 5.1s are not getting any more fixes.
i dont know if you are trying to build any but...i tried building cm12.1 for 2 weeks, with every possible combination of device tree and vendor (SonyAOSP/SonyCM/xperiadev/CM, sony vendor files/Benevolent) and there is no mobile data connection, any ideas?
Click to expand...
Click to collapse
Not a single idea...did you checked logcat or something?
Konstantinosj77 said:
Not a single idea...did you checked logcat or something?
Click to expand...
Click to collapse
nope but while building roms, I slowly dig deeper and deeper into the source code files, checking logs is what i fear will be next .
I already got too much addicted to this, my pc is building roms almost 24/7
quake73 said:
nope but while building roms, I slowly dig deeper and deeper into the source code files, checking logs is what i fear will be next .
I already got too much addicted to this, my pc is building roms almost 24/7
Click to expand...
Click to collapse
haha i suggest you to install ubuntu natively using dualboot
It's a lot faster
Konstantinosj77 said:
haha i suggest you to install ubuntu natively using dualboot
It's a lot faster
Click to expand...
Click to collapse
hehe, i had that crazy idea, too but....i'm a windows guy, the current setup is quite good...16gb ram (8 for ubuntu),
4 HDs, home/cache/out/swap distributed on different HDs, what more can I ask? It's an old pc, AMD x64 x4, 7-8 years but it serves me well...My heart doesnt let me replace it
What is jumpin in rom
quake73 said:
nope but while building roms, I slowly dig deeper and deeper into the source code files, checking logs is what i fear will be next .
I already got too much addicted to this, my pc is building roms almost 24/7
Click to expand...
Click to collapse
Quake that is not taking in Rom?
i think the thing make this rom has no camera working is boot.img 3.10.x because every rom using this kernel has no camera working and please show me how to make 3.4.x kernel is working inside this rom
vinz156 said:
i think the thing make this rom has no camera working is boot.img 3.10.x because every rom using this kernel has no camera working and please show me how to make 3.4.x kernel is working inside this rom
Click to expand...
Click to collapse
thats a good idea. I'll try to build again with one of the older kernels from sonyxperiadev.
quake73 said:
thats a good idea. I'll try to build again with one of the older kernels from sonyxperiadev.
Click to expand...
Click to collapse
It's not gonna work...
Only stock kernel and stock camera blobs can make camera work....
Konstantinosj77 said:
It's not gonna work...
Only stock kernel and stock camera blobs can make camera work....
Click to expand...
Click to collapse
How about cm12.1 what's make camera inside that rom is fully working
Sent from my Xperia M2 (AOSP) using XDA-Developers mobile app
vinz156 said:
How about cm12.1 what's make camera inside that rom is fully working
Sent from my Xperia M2 (AOSP) using XDA-Developers mobile app
Click to expand...
Click to collapse
Stock kernel and stock modules....
These are used for omni 5.1.1 with working camera
Code:
https://github.com/erikcas/android_kernel_sony_msm/tree/5.1-3.4
https://github.com/erikcas/vendor-sony/tree/r13-cam
https://github.com/erikcas/vendor-qcom/tree/r13-cam
Sometimes you have to make changes to the framework files of the ROM and to the device tree

[LineageOS port] libqdutils_intermediates/export_includes needed but can't make

As the title suggests, I am porting lineageOS and keep getting this error
/home/zane/Lineage/out/target/product/suzuran/obj/SHARED_LIBRARIES/libqdutils_intermediates/export_includes', needed by '/home/zane/Lineage/out/target/product/suzuran/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates/import_includes', missing and no known rule to make it
here is the full log https://paste.myself5.de/JfHg5EA2Je.sql
I have tried re syncing the repo and re downloading the source trees. nothing seems to be fixing this.. :/
Is this problem solved?
How did u solved this issue? @nzzane
Appears I didn't have the right proprietary blobs - and had SonyLOS repo running alongside, the two seemed to clash
So if you are getting this error make sure you have the right vendor files and not two different repos trying to do the same thing
nzzane said:
Appears I didn't have the right proprietary blobs - and had SonyLOS repo running alongside, the two seemed to clash
So if you are getting this error make sure you have the right vendor files and not two different repos trying to do the same thing
Click to expand...
Click to collapse
Sry i didnt get u. What do u mean two different repos?
Sent from my AO5510 using Tapatalk
Raja_12 said:
What do u mean two different repos?
Click to expand...
Click to collapse
If there is a repo named abc at github that supports i.e. FMRadio and another named xyz, that also supports FMRadio, it is neccessary that depending files are coming from the same repo. Actually the repo from LineageOS clashes with the one from SonyLOS and vice versa.
That's, what nzzane wanted to say IMHO...
Yea - so had two different repos conflicting
Lineage repo was trying to build from stock blobs, and SonyLOS repo was trying to build from just device sources (which my device tree wasn't set-up for)
nzzane said:
Yea - so had two different repos conflicting
Lineage repo was trying to build from stock blobs, and SonyLOS repo was trying to build from just device sources (which my device tree wasn't set-up for)
Click to expand...
Click to collapse
I get it. so how to overcome it. Do i have to remove one repo directory. currently im having 3 repos.
Raja_12 said:
I get it. so how to overcome it. Do i have to remove one repo directory. currently im having 3 repos.
Click to expand...
Click to collapse
It depends what each repo does, and how you want to build it (stock blobs or all device tree)
nzzane said:
It depends what each repo does, and how you want to build it (stock blobs or all device tree)
Click to expand...
Click to collapse
all device tree
Raja_12 said:
all device tree
Click to expand...
Click to collapse
Then one of the repos must be conflicting somewhere :S
nzzane said:
Then one of the repos must be conflicting somewhere :S
Click to expand...
Click to collapse
Yea sometimes I can't make clean or clobber. With one repo it works with other it didn't. So I have to maintain only one repo at a time.
I ran into another issue. Can u help
target arm C: audio.primary.msm8916_32 <= hardware/qcom/audio/hal/voice.c
In file included from hardware/qcom/audio/hal/voice.c:32:
hardware/qcom/audio/hal/voice_extn/voice_extn.h:194:71: error: unused parameter 'adev' [-Werror,-Wunused-parameter]
static int voice_extn_compress_voip_set_mic_mute(struct audio_device *adev, bool state __unused)
Sent from my AO5510 using Tapatalk

Categories

Resources