[Q] Building AOSP - Branch 5.0.2_r1 - Boot-loader loop? - Nexus 7 (2013) Q&A

Hey XDA!
I've been trying to learn to compile AOSP so I can customize ROM's from scratch instead of having to steal someone else's compile and make modifications from there. I definitely don't want to take the work of others and back track to make changes.
I've got a Nexus 7 2013 LTE and I've setup a Linux build environment. I've installed the correct packages, followed all the instructions on the AOSP site, and downloaded the proprietary binaries (both the current 4.4.4 and preview binaries) to try and create a AOSP Lollipop 5.0.2_r1 build. I know there are ones out there that are working almost flawlessly, but I can't seem to get it to boot. My file sizes for system.img and all other packages are the same after compiling, I "make clobber" once executing the shell scripts to create the vendor folder in my source root, and I see the vendor files being processed during the build, but once the package (both ota and manually built attepts) are fastboot loaded, I get a boot loop, and I'm not sure why, it instantly hangs and reboots as soon as the "ANDROID" screen appears.
If anyone can give me any guidance, I want to start building ROMs for the community, but I just can't seem to get a bootable build to compile.
I may have missed some details, so if anyone can help me with figuring this one out, feel free to PM me, or leave a note on this topic.
Thanks!

Related

[How To] [GSM] Getting started with porting

Ok, so after having a million questions I thought I'd write up a quick little 'how to' with regards to porting.
And now the warning
Read and learn first, doing this could cause serious issues with your tab or even brick it. The tab is really tough, and hard to brick if you do everthing right but it could still happen. I'm not responsible if it does.
Where to start
Get good at reading, google searching and searching XDA. Lots of porting discussion regarding other phones can apply to the tab.
Learn to use Heimdell
Have a linux distro available, either by virtual box, or natively.
Technomancer where it all began
I've said it before and I'll say it again, without techs work miui wouldn't have been possible.
Reference technomancers thread here: http://forum.xda-developers.com/showthread.php?t=931857 on how to download the cm7 + sgt source, you're also going to want to follow the kernel making part, cause most likely you'll need to make adjustments to the init.rc which is inside the initramfs and requires building the kernel again.
porting x build
Get X build onto your computer and extract the update.zip for it.
Copy the boot.img into your linux environment and extract it using splitbootimg.pl script (note: Google it, plus this doesn't work with samsung builds). Compare the init.rc to your init.rc (from the sgt cm7 kernel source root folder). Specifically the most important part here is the PATH, LD_LIBRARY_PATH statement and BOOTCLASSPATH lines.
Build your kernel with the updated init.rc and flash with heimdell, it should still boot your cm7/miui build (if you were running it before) albeit with errors.
The system
Now following the awesome list of proprietary files (either from your source folder or technomancers github link) check the galaxytab-common-vendor-blobs.mk for the GT-P1000. It lists every file you need that's propreitary to the tab and where to put it.
Also you'll probably need the debuggerd from /system/bin on the cm7 build.
Compare the /system/build.prop of the cm7 build to your port, make sure the ril info is the same as well as the ro; model, brand, device, board, and platform lines.
Create an update.zip (or whatever you want to call it.zip) and try it.
It's not booting
Logcat is great, but I really suggest using the ddms from the android sdk tools. It's color coded, and gives a much nicer view of what's happening.
Using winmerge in windows or a linux file compare program start checking what other bin files may be missing that you require. Special notice to the xbin folder.
It works! I want to post it!
Ok, first up, make sure you have permission if this is someone elses custom build you've ported. Most people/groups are really good about it assuming you ask first and give them credit in your post.
Also credit everyone who helped, answered a question or sent you in the right direction. (it's just polite)
Second your going to want to make sure your update.zip flashes the kernel, read the update_script from the cm7 build to understand how it works.
So that's it for a start. roll up your sleves, gather your courage and get to it!
Please if you have other tips, add them to the thread, what's better 1 or 2 'developers/porters' or 100?
Thanks. This is very useful for me.
Thanks,
Following this method, with slight alterations to adjust, I was able to port an i9000 phone build to the tab in about 10 minutes, it's really not terribly that difficult once you have the right steps.
The first couple times are usually frustrating but after that you get the hang of it
Hi mssmison Thank you for your guide,it will be very useful in the future! I have only one request,how can I contact you? I have a proposal for you about a dev team (regarding an old think tank)
Thanks for the guide...
Is there any ROM left to port by the way?
Sent from my GT-P1000 using XDA Premium App

[KERNEL][SOURCE][android_kernel_lge_msm7x27-3.0.x (3.0.8)]

I waited to post this over here until it was debugged and all the hardware works.
Even though this forum's been kinda dead quiet for a while, xda gets searched and I want this source code out there.
Derived from androidarmv6 project and tweaked over to thunderc from the p500 developers' awesome work getting it running on the Optimus One.
source:
https://github.com/bigsupersquid/and...7x27-3.0.x.git
(branch squid, for lack of imagination.)
make thunderc-test_defconfig
you'll want to change or remove the toolchain path in the config. it is highly unlikely that your cross toolchain is in the same path as mine.
I set it in the config to avoid having to add "CROSS_COMPILE=/blah/blah/etc" to the make command every time I rebuild the kernel.
it is for jellybean and kitkat roms.
use on older android versions messes up various things. Especially USB.
it conflicts with /sbin/chargerlogo or /sbin/charger for offline charging and bootloops unless that file is removed.
Use the attached removecharger.zip in recovery with signature verification off for that if you don't want to edit the ramdisk yourself.
md5sum b1a9f21285e09e06dc94422a8578dc98
enjoy
@bigsupersquid Know if anyone's willing to have a stab at building Firefox OS, now with the 3.x kernel?
EDIT: Well apparently there's no full ArmV6 support in it so, I guess not...

[Q] Building CM10.2.0 For S4 Mini LTE

Hello All,
This may be in the wrong place so if it is, I am sorry, anyway to my question I'm trying to build CM for my S4 Mini LTE Serranoltexx everything was going fine until I got this message after running extract-files.sh
Code:
Extracting /system/lib/egl/libGLESv2S3D_adreno200.so ...
remote object '/system/lib/egl/libGLESv2S3D_adreno200.so' does not exist
Now after adding "libGLESv2S3D_adreno200.so" (if you search Google for it it's the top github link) I managed to get it to build the actual .zip and it does flash properly but it doesn't seem to have the correct graphics drivers (I thought this process wouldn't work and I was right), the guide on the how to build it doesn't help with this problem either so any help would be extremely appreciated
I've attached the logcat for reference (if it's needed) as a .docx file as the .txt file was 1.1mb and because I don't have a pro account on pastebin.
The problem with newer Android versions is that if often require new libraries which are not available in stock rom, so the extract method is actually not very useful unless we have a stock rom of the same version we are building for. To bypass this issue we use libraries from other phones that have the matching Android version. I suggest using the blobs that's on TheMuppets github, as those are up to date.
https://github.com/TheMuppets/proprietary_vendor_samsung

Build Issues with aosp source

So I have been trying to get a functional build of this devices kernel for a while now and I have to say it sucks.
My first problem was finding the actual kernel source which isn't on the aosp site but rather in the chromium source. When I finally found the kernel source for it, I was greeted with an absurd amount of branches. I mean aosp has like 6 branches for a device after 4 or so years and this device has countless branches referencing its multitude of names (pixel c, ryu, smaug, and dragon). Anyways I decided to pick the chromeos-3.18 branch (https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.18) not sure if this is right. Then I spent forever looking for a fitting defconfig which there was none, only to find you have to run a script with the right flavor and device to create the defconfig. I finally got that done and got a dragon_defconfig that let me build a kernel binary.
Here is where I am stuck. So before I went to substitute this binary in the boot image I just wanted to try making a boot image with the stock provided kernel.
I was able to build using "make bootimage" and got a boot image that sent me into a bootloop. And this is with the 6.0.1r16 branch with no modifications. I looked into the dragon-kernel and noticed the provided kernel file is a file called Image.fit which is the first time seeing such a file format. The kernel binary I created was just an "Image" and a compressed version "Image.gz" but neither is anything like the Image.fit file that is provided.
Either way I am really stuck and the lack of documentation pertaining to the pixel kernel source is frustrating. Can anyone help me out?

Unofficial build help?

I'm trying to build for a device that has no known Android 10 device trees that I can find. I think I fleshed out the trees pretty well by following some sister/cousin devices and extracting a lot of stuff from the rooted phone itself, but my build fails at 2% due to a missing output file. The missing libdss.so file should be built as part of the kernel (whose source I have), but the build clearly isn't happening (or isn't happening in time to be recognized by the build system.)
I tried to build the kernel as a standalone module to see what might be wrong, and in trying to do that I can't seem to resolve all the issues with dependencies for cross-compilation to arm64. I've built for devices with existing trees by cherry-picking what I needed, but I've never built for something from the ground-up like this. I don't want to make the ROM with a pre-built kernel as the end-goal would be to become official. The attached image is the exact error I'm receiving, and the following links are to all of my source repositories that I'm using in addition to the Lineage17.1 base. Any help would be appreciated. I work as a full-time dev by day, I don't mind slogging around in some code if that's what I takes, I've just reached the end of my troubleshooting knowledge here and am not sure what the next step might be.
https://github.com/polaarbear/android_device_motorola_troika_sprout
https://github.com/polaarbear/android_device_motorola_universal9610-common
https://github.com/polaarbear/android_vendor_motorola_universal9610-common
https://github.com/polaarbear/android_kernel_motorola_universal9610

Categories

Resources