[SOLVED] Building CM10.1 from source d2usc - no radio - Android Q&A, Help & Troubleshooting

First off, I have been running Ubuntu 12.04 x64 (OpenJDK) for a while now, and build regularly for Grouper and d2usc (US Cellular SGS3 variant). Grouper builds fine, flashes fine, runs great. The d2usc also builds fine, flashes fine, but I get zero radio; no bars of any color, Settings - Status reports Unknown Baseband version, same with IMEI and MEID, not even showing grey roaming bars.
This has been going on for about 1-2 weeks now. Zero build errors, the "brunch d2usc" command works great, creates a flashable zip, and the zip flashes. I have to then wipe everything in TWRP, and restore a backup (I do NOT have to do adb nv restore or anything, radio works just fine when restoring backup for Black Bean 7).
Here's what I've tried:
1. Delete entire repo, create new folder and resync. After resync, build. Flash build (again, zero errors), same result.
2. Delete entire repo again, create new folder and resync. After resync, run ./get-prebuilts AND ./extract-files.sh while running official d2usc CM10.1 nightly. Rebuild (zero errors), same result.
At this point I'm at a loss, Grouper (N7) flashes and works great (obviously wifi only version). The d2usc version works great minus the fact that I get no radio, not even roaming. I've tried the CDMA subscription thing, rebooting, and no dice still.
I need some expert advise. Anyone that could provide some clues, suggestions, insight, would be greatly appreciated. It is much easier for me (saves time, etc) to do my personal theming THEN building, so I'm not doing things twice (using apktool to decompile/compile).
Thank you for your time!
-Ryan
-Sent from my US Cellular SGS3

I think I may have gotten to the bottom of this with invisiblek/termleech's help: Building from CM10.1's repo if you don't have the d2usc stuff, it'll sync what it needs straight from CM. That was fine and all. After talking with those two guys, there's another repo called TheMuppets where all the device vendor blobs are kept (which I had totally forgotten about). I had to add this to my Local_Manifest.xml to pull down those updated blobs from this repo.
I am sync'd up, and kicked off my build. That's gotta be it. I'll know in about 45 min to 1 hour.

RMarkwald said:
I think I may have gotten to the bottom of this with invisiblek/termleech's help: Building from CM10.1's repo if you don't have the d2usc stuff, it'll sync what it needs straight from CM. That was fine and all. After talking with those two guys, there's another repo called TheMuppets where all the device vendor blobs are kept (which I had totally forgotten about). I had to add this to my Local_Manifest.xml to pull down those updated blobs from this repo.
I am sync'd up, and kicked off my build. That's gotta be it. I'll know in about 45 min to 1 hour.
Click to expand...
Click to collapse
so how did that go?? i am curious as i am sync'd up but am lost due too my lack of ubuntu experience, also i jumped into learning this with no linux experience. i have the d2usc. i dont follow how github and my sync works together to build . but i hope yours works out

Related

[Q] Where to start?

Hello,
I want to compile Android from source. I want to just build a fully default Gingerbread that would run nice on my phone. I got the Android source, kernel source (kernel-2.6.32-U8800-Froyo) and now I don't know what to do next. I compiled the generic one already (lunch full-eng) and it ran fine on the emulator.
My most important question is, if I make it otapackage and flash it, would it start? If it doesn't, can I recover? What folders/files are essential if I make my own device for example in "device/huawei/u8800"
Also, where can I find a GOOD porting guide? I have found some that are old and not used anymore.
Some links
Start by going through source.android.com for the general basics if you havent already.
Also, even though Google removed the PDK (Platform Developer's Kit) from the site, it has been mirrored on kandroid here: http://www.kandroid.org/online-pdk/guide/index.html
The stuff in the the PDK, although inadequate, is still very important and explains how to create the necessary makefiles to add to the build, configuring for a new market, etc. etc.
Also,
watch these two videos over here. These were very helpful in my ROM development:
http://www.youtube.com/watch?v=1_H4AlQaNa0
http://www.youtube.com/watch?v=rFqELLB1Kk8
Learn to use github. It is helpful for you to keep track of your changes as well as incorporate others works into your own.
http://help.github.com/
Finally, Cyanogenmod repos are your BEST friend. Almost all major AOSP ROM devs owe some sort of thanks to those guys who have done so much. If you want to check out some of the code changes and patches that you want to incorporate look here on their gerrit:
review.cyanogenmod.com
If you want to look at the other changes that are actually in the cyanogenmod builds, best to look at their git repos here:
https://github.com/CyanogenMod
I am still learning right now while I create my ROM but your welcome to PM me if you have any questions
Glad someone helped. Now that ICS is available, I will build that instead. Now, I will follow the kandroid tutorial and add hardware_msm7x30 from cyanogenmod's repos. Then I'll make my own makefiles in the huawei/u8800 and I'll see if that works.
Also, some things I am not still clear. If I am not adding any recovery files, it shouldn't replace it, right? I want to make sure I can recover. However, my phone has a bootloader mode, which should still work, even if other's messed up. And the kernel, if I already have a compiled kernel for android 2.2, should it work for newer versions?
Thanks
Well AOSP as far as I know adds the stock recovery into the build so if you have a stock ROM, then you will lose your recovery (unless you change the source to skip the adding of recovery to otapackage).
Your bootloader should be fine. so you will theoretically be able to re-flash a custom recovery with fastboot as long as your bootloader is unlocked (assuming your phone is already rooted and has a custom rom, then it should be unlocked)
If you are using CM7 as base, then you dont have to worry about it as it is configured to NOT replace the recovery during the building and creating the otapackage.
The kernel should not be compatible as there were significant changes from Froyo and you should not use it. By the way, for now, work on the ROM first. Creating a custom kernel from scratch is hard work and should be left as the last task to do (assuming you know linux kernel development). Just use the stock pre-built kernel that comes with the source.
Also, according to Google:
Starting with IceCreamSandwich, the Android Open-Source Project can't be used from pure source code only, and requires additional hardware-related proprietary libraries to run, specifically for hardware graphics acceleration.
Click to expand...
Click to collapse
This means you need to find the correct hardware drivers first. Where to find that is beyond me. Check CM repos. It would be easy if everyone had a Nexus S/ Galaxy Nexus as the drivers are immediately available on source.android.com. Ah...well....
Personally, I am going to wait a few weeks before dabbling into ICS ROMs. Wait till CM7 comes out with a nightly for my nexus one and then rip the drivers from their ROM and use it for mine
I got ICS source and made the necessary Android.mk, AndroidProducts.mk, BoardConfig.mk and u8800(my device).mk, also vendorsetup.sh . Now, when I am trying to build it doesn't give me an error, more of a suggestion. It says to include "LOCAL_MODULE_TAGS := optional" in the hardware/msm7k/liblights/Android.mk. I added that, and tried again. Got that message again, but with other type /libril/Android.mk
About fastboot, I am not sure if my device has that. It can be turned on with volume up and down + power, but it boots to so called "pink screen". When I mount phone using usb to my pc, I can browse the recovery.img and other related stuff. If I have the otapackage, can I just take the recovery out from there or what should I modify in source? Add something to the makefiles?
Yeah I am pretty sure you should add the LOCAL_MODULE_TAGS to all of the relevant pre-built files. maybe they made the compiler less harsh in ICS when compared to the one for gingerbread. In gingerbread, it outright crashed the compile and asked you to add the tags.
According to Google engineers, here is the reason why they use these tags:
Short answer: lack of time.
The urgent concern was to prevent new modules from using a user tag
(implicitly or explicitly), and we took care of that. We haven't had
time to deal with the existing modules, there are over 1000 of those.
JBQ
Click to expand...
Click to collapse
By the way, I hope you have git setup and the changes you have made are being staged and commited to your repo in github. If you ever make a mistake that hardcore crashes your compile and you dont know what you did, git will be there for you to rollback the changes as well as keep track of everything you have done from commit to commit
As far as I know, CM repos dont have everything complete for a full build of ICS but I could be wrong.
So you are working with AOSP correct?
As for the fastboot every android phone should have a fastboot by default but I believe each phone has a slightly different version. I will post how my fastboot looks like in a bit.
As for the removal of recovery, there should be somewhere in either source, makefiles or argument for the otapackage command that should leave out the recovery when making update.zip. You could just remove the recovery from the update.zip, change the updater-script and repackage it but its not a clean solution and those changes should be done in a uniform manner so you dont repeat this step every time you do a new build.
Where exactly is it, I have yet to know. Still learning much of this myself.
I now completely understand what modes of turning on my phone has... First one is normal, second is recovery, third is update-bootloader(I can access all files with it too) and four being the fastboot. The custom recovery I have on has an issue that it wants to boot to charging mode when I type "adb reboot bootloader". I can get to fastboot with the custom ROM I have on right now though. I think I am safe if I have issues.
I edited msm7k Android.mk to remove libaudio and libgralloc (errors with those), and it compiles to the step where it says it has no rule to make kernel requied by boot.img. I have put into BoardConfig.mk the line TARGET_PREBUILT_KERNEL with my kernel. I don't understand, what's wrong now...
My goal is to simply get it booting up. I'll look into libraries and other later.
-e-
Got the kernel thing sorted out. Copied device.mk from tuna device and edited to fit my device. Also modified full_u8800.mk and made the call to inherit from device.mk. Compiling now and I think I got past that.
-e2-
Got it built successfully. Fastboot won't let it install, because it has no mount points. Added mount points and let's see...
Nice to see you are making progress.
Got it built, but the fastboot is kinda buggy in my device, maybe custom rom issue. I can't make otapackage, it says "no rule to make target otapackage". I have a possible fix, trying that later.
Otherwise, I read its possible to flash system.img from recovery via advanced restore, update.zip package or advanced flash_image, but I don't know. Will post results.
Sent from my u8800
-e-
Tried make otapackage again. It still says "make: *** No rule to make target `otapackage'. Stop.". Maybe some things are still missing, I don't know. adb flash_image command will always post -1 to me, update.zip didn't work, advanced restore is not for this. I have a compiled image and I can't wait to test it, but I can't flash it...
If nothing works I'll revert to stock ROM and try again.
Blefish said:
Got it built, but the fastboot is kinda buggy in my device, maybe custom rom issue. I can't make otapackage, it says "no rule to make target otapackage". I have a possible fix, trying that later.
Otherwise, I read its possible to flash system.img from recovery via advanced restore, update.zip package or advanced flash_image, but I don't know. Will post results.
Sent from my u8800
-e-
Tried make otapackage again. It still says "make: *** No rule to make target `otapackage'. Stop.". Maybe some things are still missing, I don't know. adb flash_image command will always post -1 to me, update.zip didn't work, advanced restore is not for this. I have a compiled image and I can't wait to test it, but I can't flash it...
If nothing works I'll revert to stock ROM and try again.
Click to expand...
Click to collapse
If you successfully compiled, take the boot.img and system.img and package them into a zip and use dsixda's kitchen to make it flashable
Blefish, is it possible for you to share your device/vendor structures somewhere? I just finished setting up a build machine for ICS (using Cyanogenmod's repos in my case), and made a working full-eng image that seems to boot just fine in the emulator, so I'm seemingly all ready to hack around our device's specifics. But I would rather not do duplicate work, so I decided to ask
I'm also grabbing Huawei's new 2.6.35-based package to get the new kernel config, can't wait for them to release the actual sources for the update.
I'll share them on GitHib once I get a working build. I haven't got much time, and I changed to CM9 alpha now (repo branch ics). Since we got a 2.3 update, my first task is to port the latest clockworkmod recovery and then the ICS.
Compiling Android is long task and I'll do it in weekends, but the recovery should be available sometime, it shouldn't be hard to port that.
Oh yeah, look up stockwell's, dzo's and genokolar's github, they have done the device configuration. You can get much help from there. This weekend I'll propably test the build, I got otapackage command working now (it needed some things I can't write on mobile).
Sent from my U8800 using Tapatalk

[DEV][CM9][HOWTO] Build CM9 From Scratch!

It's time. As offered previously for the Nook Color and HP Touchpad...
A Build CM9-for-NookTablet Walkthrough
What is this?
This document provides instructions for developers to build a complete Cyanogenmod 9 update.zip for the Nook Tablet aka "acclaim" (and more theoretically the newer 512MB model, aka "elation") from source code. The instructions require a Linux computer and appropriate tools (discussed below).
It is important to emphasize that CM9 is a work in progress and if you try it you will be building/using something in mid-development. Things may break and/or not work at any time. Read below, the build instructions, and the relevant licenses for additional info and disclaimers.
Hopefully, for those developers who are interested and willing to take the risks, this can be a fun and educational experiment. And hopefully more developers will help chrmhoffman, kuzma30, mik_os, and others improve CM and the 3.0 kernel.
So does this build use the new, experimental 3.0 kernel then?
Update: At first, I mentioned that 2.6.35 was also supported, but apparently this will require additional files that aren't currently installed. So for now, yes, it uses the 3.0 kernel, which may not be compatible with the newer 512MB NTs. Although it is not confirmed one way or the other, as it has not been tested on these devices.
The configuration uses the experimental 3.0 kernel, which is built on-the-fly from the latest source code.
Unless you really want to take some risks, if you have a newer-model 8GB/512MB Nook Tablet (aka "elation"), the 3.0 kernel build is not for you...yet! It may boot, it may not. It has not been tested by any of the developers with that device, and as of this writing there are known kernel issues with the 512MB. (So actually, this is a good opportunity for developers to try it and contribute.) The 3.0 kernel development thread has more on this.
Any further discussion below assumes the 3.0 configuration, as the 2.6.35 branch isn't as up-to-date and isn't really being maintained. 3.0 is the future!
These instructions are for Linux. How do I build on Windows/Mac/etc?
If you have Mac or Windows or something else, you may consider installing a virtual machine such VirtualBox (which is free). Then run Linux, say a Ubuntu distribution, as a guest from your host computer. This allows you to "sandbox" your development environment, and gives an opportunity to learn about Linux with actual hands-on experience, all without reformatting your computer...
CM9 can also be built on Mac natively, either in Snow Leopard or Lion. Instructions for building (CM7) on a Mac can be found on the CyanogenMod wiki.
A few modifications need to be made to those instructions for CM9 & Lion, but such instructions aren't hard to find.
Will my build actually be usable?
CM9 (and the acclaim port) is in active development, and when you do a build from the latest source, you are using a bleeding-edge build of whatever happens to be in the repositories at the time. There is no guarantee it will work in any capacity. It may actually cause terrible damage. So only try at your own risk, and assume responsibility for your actions. If you find a bug, help fix it.
It is critical that you understand the risks before trying this and fully back up your system before trying any build. It is equally important to have a bootable SD standing by so that you can restore your device to a known good version if something goes terribly wrong, which may actually happen. Hopelessly staring at a non-booting device is never fun. There are other threads about recovering hosed acclaim systems, so I will leave you to finding and understanding them and preparing yourself for solving such problems. You should always assume the worst will happen, so be prepared.
Speaking personally, I don't have either model of NT and have never run CM9 on one, so can not attest to its usability per se. You should consider this a work in progress full-of-bugs until told otherwise.
Which bootloader is this using?
Cyanoboot, based on u-boot. The full github repo w/history (rather than raw files) is now available as well. Special credit to bauwks for fixing the locked bootloader design flaw.
Will this build result in a working update.zip suitable for use with ClockWorkMod recovery?
The build process has been modified to generate a fully flashable update.zip, but, as, with everything else, nothing is guaranteed.
Does this create a build for SD Card or for EMMC (internal storage)?
EMMC.
I'm stuck! I've been at it for hours. Something isn't working. Where can I get help?
If you have never built an operating system before-- this may be a good way to learn, provided you accept the risks and consequences of trying. This and other forum threads may be a good place to look for help. Also try IRC.
You are also able to leave comments in the walkthrough document itself. If you have a tip that might help others, post it there. If I get a chance, I'll take the best of them and incorporate it into the doc.
Does this build ClockworkMod recovery too?
It should. Check the $OUT directory for two files-- recovery.img and recovery.img.sdcard. The recovery.img file is (hopefully) flashable via fastboot:
fastboot flash recovery recovery.img
The recovery.img.sdcard can be renamed to recovery.img and put on your sdcard.
Can I build twrp2 instead of ClockWorkMod?
TWRP2, in case you're not familiar with it, is an alternative recovery image created by Team Win, particularly user dees_troy. It can be used for flashing update.zip files and making/restoring backups, among other things.st
The 3.0 build configuration currently contains the needed settings for a twrp build. You will just need to replace the ~/android/system/bootable/recovery repo with twrp's source code. You can do this by adding the following lines to your local_manifest.xml file:
<remove-project name="CyanogenMod/android_bootable_recovery"/>
<project name="TeamWin/Team-Win-Recovery-Project" path="bootable/recovery" remote="gh" revision="master" />
You can then repo sync (per the instructions) and then do this command to rebuild the recovery using twrp2.
mka recoveryimage
The recovery.img and recovery.img.sdcard files in $OUT should now contain the latest twrp2. (If it doesn't, try clearing out the recovery-related files in $OUT, including $OUT/obj/RECOVERY_EXECUTABLES)
Please direct twrp2-related questions and solutions to the twrp2 thread, not here.
Who do I thank?
Thanks to chrmhoffmann, mik_os, kuzma30, cyanogen, arcee, nemith, Texas Instruments, Barnes & Noble, and all the other devs, testers, and contributors, of which there are many. And special thank to bauwks, who made this all possible.
For this walkthrough in particular, big thanks to chrmhoffmann as well as eyeballer for testing. Everyone-- go find a thread by these people and thank them.
Who do I blame?
Yourself. Only yourself.
To whom do I donate?
Not to me. You can donate to any of the above if you feel like it. I do suggest considering a donation to the Electronic Frontier Foundation, who among other noble activities are fighting to keep "jailbreaking" and its Android phone and tablet equivalents legal. Your Android devices are full-fledged computers. Don't let corporate or government special interests take away the right to mess with your own possessions as you wish.
Finally, good luck. We're all counting on you. If and when you have problems, post them, and hopefully others will help find a solution.
Developers are needed. Enquire within.
-ft
(twitter)
-----
How To Build CM9 for Nook Tablet From Source
(Google Doc... or is it Google Drive now?)
And one more thing...
If I think of something to add, I'll put it here.
Good stuffs. I'll give it a try later in the week. I have everything set up. Going to be fun testing.
Im planning on doing this too. Thanks for making a guide, although I'll probably be in the IRC within 5 minutes of starting with questions
Sent from my Team A CM9 Alpha 0.03 Nook Tablet
Thank you very much for putting this together!
I am testing on an 8GB nook.
I can verify that the cwm and twrp2 recovery images boot with the 3.0 kernel, however CM9 fails to boot, it hangs on a blank screen with the backlight on and eventually just reboots. I am not able to get it to connect via usb to print logcat so I don't think it is getting very far.
Do you happen to have any instructions for tapping into the serial on these devices to see what is going on?
Also, with the new cwm it will not mount the sdcard through the menu. If I open a shell within cwm recovery I can mount it fine, except it is read-only.
In case it is useful, here is a dmesg from cwm:
http://pastebin.com/0fkyuSwe
arcon2600 said:
Also, with the new cwm it will not mount the sdcard through the menu. If I open a shell within cwm recovery I can mount it fine, except it is read-only.
In case it is useful, here is a dmesg from cwm:
http://pastebin.com/0fkyuSwe
Click to expand...
Click to collapse
Ah, this is very interesting! It's similar behavior to twrp.. a mounting issue with sdcard... wonder if this means the kernel is somehow not letting it mount, or if the problem is with recovery.fstab...
New patch, there shouldn't be a gpio_wp pin assigned to begin with...
Also, this is tested on my 8GB, I don't have a 16GB to test with.
diff --git a/arch/arm/mach-omap2/board-nooktablet.c b/arch/arm/mach-omap2/board-nooktablet.c
index de38b5c..a10dd93 100644
--- a/arch/arm/mach-omap2/board-nooktablet.c
+++ b/arch/arm/mach-omap2/board-nooktablet.c
@@ -684,7 +684,7 @@ static struct omap2_hsmmc_info mmc[] = {
.mmc = 1,
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | MMC_CAP_1_8V_DDR,
// .gpio_cd = -EINVAL,
- .gpio_wp = 4,
+ .gpio_wp = -EINVAL,
.nonremovable = false,
// .no_off_init = true,
#ifdef CONFIG_PM_RUNTIME
Build environment ready but cannot use repo command
HI! i would love to build a zip with the new kernel but i cannot use the repo command in the terminal in Linux Mint latest build. I have downloaded Android SDK and all the required build libraries and set up all the directories. i have the NTsparkkernel folder in the android directory. Could anyone offer some advice on how to apt-get (the REPO module) so I can build the zip. Thank you for your time. Bruce
about repo
C64assembly said:
HI! i would love to build a zip with the new kernel but i cannot use the repo command in the terminal in Linux Mint latest build. I have downloaded Android SDK and all the required build libraries and set up all the directories. i have the NTsparkkernel folder in the android directory. Could anyone offer some advice on how to apt-get (the REPO module) so I can build the zip. Thank you for your time. Bruce
Click to expand...
Click to collapse
The repo command is actually something you get from Google. It's not in the apt-get repositories.
To install the repo script:
mkdir -p ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
The repo binary will be in ~/bin and you can add this to your path if you like.
Confirmed by chrmhoffmann and committed. Thank you!
Thank you for this guide. I've compiled stuff before, but built my first Android from source last night. Although the build from that time has random reboots (the nature of the beast).
I'll be building quite a bit I think
Damn see I'm just porting right now I wanna build from source but my PC isn't Linux friendly yet I'm waiting on a tb internal so I can set up and learn this but it just looks so complicated and idk why. I feel once I learn it probably be easy as hell. Thanks Fattire
__________________________________________________
Sent from my SPH-L700-GNEX-using Tapatalk 2
Danrarbc said:
Thank you for this guide. I've compiled stuff before, but built my first Android from source last night. Although the build from that time has random reboots (the nature of the beast).
I'll be building quite a bit I think
Click to expand...
Click to collapse
Hey congrats and welcome to the club!
Cannot Make the bacon...
Hey Fattire! Thank you for your guide. I was able to finally download the source for cm9 and add the 3.0 kernel repository. I have everything in one folder. I am new to Linux and had to add a Path command to get Repo Sync to work correctly. Once I got the Repos I ran into another problem trying to issue command cd ~/android/system/vendor/cm , then enter “./get-prebuilts”. The Make Bacon and or Croot <enter> brunch acclaim does nothing either. It seems I am missing somthing here. Maybe a different distro of Linux besides Mint would work better for me... getting close to building (i hope). Thanks!
I have to issue PATH=~/bin:$PATH every time I repo sync.
C64assembly said:
Hey Fattire! Thank you for your guide. I was able to finally download the source for cm9 and add the 3.0 kernel repository. I have everything in one folder. I am new to Linux and had to add a Path command to get Repo Sync to work correctly. Once I got the Repos I ran into another problem trying to issue command cd ~/android/system/vendor/cm , then enter “./get-prebuilts”. The Make Bacon and or Croot <enter> brunch acclaim does nothing either. It seems I am missing somthing here. Maybe a different distro of Linux besides Mint would work better for me... getting close to building (i hope). Thanks!
Click to expand...
Click to collapse
I use Ubuntu here I started with 10.04 LTS since it was the the build used and supported by Googles build instructions. Yous should still be able to do it though.
Did you initialize the build environment using ". build/envsetup.sh" at android/system (it looks like is the base of your source from your post)
Yes. Thank you for your advice KeithN. I am going to start from scratch. I might just put Ubuntu 10.04 on my comp tonight if I cannot get it to build properly.
I'm going for Ubuntu 12.04 command-line. If that doesn't go well, I'll go for 10.04 as well.
I built mine on 12.04 (Xubuntu, but that doesn't matter so much).
I added a debian sqeeze apt repository to get sun-java6-jdk, then used -f install when it complained because one of it's dependencies exists in Ubuntu but not that same version #. Commented out the repository after it installed so I don't get more debian packages on accident. For everything else I think it was just following the guide as-is.
C64assembly said:
I am new to Linux and had to add a Path command to get Repo Sync to work correctly.
Click to expand...
Click to collapse
Yes, I had recommended doing that. The PATH=$PATH:~/bin command will ensure that no matter what directory you type "repo", it'll know where to find the file.
C64assembly said:
Once I got the Repos I ran into another problem trying to issue command cd ~/android/system/vendor/cm , then enter “./get-prebuilts”. The Make Bacon and or Croot <enter> brunch acclaim does nothing either. It seems I am missing somthing here. Maybe a different distro of Linux besides Mint would work better for me... getting close to building (i hope). Thanks!
I have to issue PATH=~/bin:$PATH every time I repo sync.
Click to expand...
Click to collapse
Instead of entering it every time, you can add that PATH statement so that it's automatically invoked when you open a new Terminal window.
Just add the line to an "invisible" file (it's invisible because it starts with a period (.) and won't show up in a normal listing) called .bashrc in ~/.bashrc (the ~ is a shortcut for your home directory, or /home/youraccountname/). The hidden .bashrc file will probably exist already. Just add the statement to the end.
Keithn said:
Did you initialize the build environment using ". build/envsetup.sh" at android/system (it looks like is the base of your source from your post)
Click to expand...
Click to collapse
This is right. Try this:
$ cd ~/android/system
$ . build/envsetup.sh
(the $ represents the prompt and should not be typed. For the second command, it's literally a period followed by a space followed by build/envsetup.sh)
I am using the latest 12.04 ubuntu, fwiw.
I know this is for CM9, but any help would be appreciated (trying aokp). I had issues with the packaging of the .zip it looks like. I was able to build for my fascinate so I know the source will build. Any suggestions?
Output

Building CM10.1 w/o kernel manifest/kernel source?

Hey XDA, no time no speak,
After writing a story about it, I went and purchased the HiSense Sero 7 Pro (I recommend you go buy one), and I decided to do a source build of CM10.1 on it. There is a problem though, the manufacturer is not responding to my request of releasing the kernel source (even though I know that GPL requires it), so an issue there obviously.
Moving on though, I decided to go ahead and sync the repo. The only problem is, I am at the part where I need to make the local_manifest.xml (which I have), but because I don't have kernel source, my directories on github (located here) are empty.
I think it's worth noting that I am on an OS X system (only got 500GB, gave 75 of it to a windows partition and its already slow, couldn't imagine fighting with a Ubuntu partition), and I read the CM wiki top to bottom, spent hours upon hours googling, and no luck. Another issue I have is that when running this command:
$ ./build/tools/device/mkvendor.sh samsung i9300 ~/Desktop/i9300boot.img
I get errors with it questioning whether or not my environment is correctly set up. I also try saw that it said "Create extract-files.sh and setup-makefiles.sh scripts" but I cant run the scripts because they arent available for mac! Sooo im in a rock and a hard place man, any assistance??
Im very much welcome to giving any additional information that you may need Thanks in advance for help

[Q] Building aospa errors on d802

*update* Building successful. Help no longer needed,
Hello there
I'm currently attempting to built aospa and it keeps failing while loading settings for my phone d802 (lg g2) it claims the repo doesn't have information for this phone or manifests etc., I decided to look this up on the repo and discovered it only has d801 and d803, I figured not a problem so i set out to searching forms upon forums and google searches that just angered me more and more because either I was doing it wrong or it was just loading the wrong information,
I Finally gave in and decided to load the Proprietary_vendor_lge from muppets repo which includes d802, had to alter some file names with the pa_prefix and finally it starts the build process but then stops shortly after with cannot find config errors. I also tried this using my cm repo's lge device settings and this causes more errors than is good.
I decided to now start a fresh, new build environment with a fresh aospa 3+ repo sync for 4.4 android. and would like help on where to go from here, even if just suggestions on where I can look myself, what terms to use to do my own research or if you feel like giving the answer's please feel free.
In the past I've not had such issues but that results I guess from usually owning a nexus. (off topic)or the dreaded i9500 ubuntu errors that caused my system to overheat and die on compile(off topic)
I have setup a build environment in linux (ubuntu for ease of use) i decided this time to go with a pre-built one mentioned from the news page (in case of my own setup errors)
I have repo synced with aospa-legacy
I am awaiting further direction.
--------------------------------------------------------------------
* Update*
Fixed the problems,
In case interested, also please tell me if there was an easier way....
I repo sync'd with aospa-legacy,
I then oulled the d802 files from cm11 repo and copied into the device and vendor locations (as needed)
Then pulled the kernel for my device from cm11 repo and copied to the root under kernel
repo synced again and it filled in the gaps (not sure if this was needed)
got device proprietary files by linking phone and using ./extract-files from the d802 folder
then built the rom.
New error
no rule to make target vendor/lge/d802/proprietary/lib/libacdbloader.so
* Update * fixed libacdbloader.so by getting file from "TheMuppets/proprietary_vendor_lge/d802/"
-----------------------------------------------------------
thanks
Thank you
Also please if in wrong section i tired to locate correct place
Added my spelling is flame worthy as is my grammar, please be lenient with this.
accidental "double post so to speak"

Question Instructions for compiling android 10 based twrp 3.5.2. Want to collaborate?

Hi everyone
I've been working on getting twrp to boot on our borneo device for a week or so, borrowed I the device tree made by mistersmee for the g9 power since the two devices are almost completely the same
https://github.com/TeamWin/android_device_motorola_cebu
heres where I'm at:
https://github.com/touchpro/twrp_device_motorola_borneo
The only thing I cant seem to get working is the touchscreen. I realize others have tried before me already and had the same non working touchscreen, I believe the majority of us have an Ilitek touchscreen while others have focaltech or nova. I got the driver framework up and recognizing it exists from dmesg output but cant seem to get any actual touch input to register. You can look at my changes to android 11 twrp in the github above by selecting branch twrp-android-11 and using a diff program. I use meld in ubuntu.
if you want to build for yourself and help out: (i'd use ubuntu 20.04, i tried 20.10 first but one of the packages is too new and doesnt like the toolchain)
follow the instructions here to set up your build environment
mkdir twrp (you can name this whatever you want)
cd twrp
repo init --depth=1 -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-10.0
repo sync
add the device tree above to twrp/device/motorola/borneo
also add this to device in twrp/device/qcom/twrp-common
make your changes inside device/motorola/borneo then
. build/envsetup.sh
export LC_ALL=C
lunch omni_borneo-eng
mka -jx clobber && mka -jx recoveryimage (-jx is number of cores you have, i have quad core i7 with hyperthreading so i use -j8. personal preference really)
your completed build will be in twrp/out/target/product/borneo as recovery.img
reboot to fastboot (adb reboot bootloader) and type
fastboot boot recovery.img
see if your changes worked! look forward to seeing what you guys can do
mine for later
Have not had the time to toss together a build environment for this, since I'd have set up the entire OS and beyond for that task, since my only Linux is Garuda in a much too small VM that is nowhere near right for that., been only hacking my way through it with Android Image Kitchen in Windows and some other utilities to get touch support in my 3.5.2.10-0 cebu source image.
It works perfectly if booted into TWRP just takes about 30-seconds before touch enables itself fully, but not when flashed (fastboot or applied internally via DD, or using a modified TWRP zip via Magisk that has had my ramdisk swapped into it).
When flashed, touch simply will not function, so something is obviously not being carried over properly so when being loaded from the recovery partition it seems, despite it being the exact same ramdisk (I extracted the recovery img, pulled out my ramdisk, popped it back into a whole new image, booted it and it had touch, so I know it's supposed to have the data there but likely needs a full from the ground up build of TWRP to behave on flashed installs.
@whoshotjr2006, had any more luck with your building of it? I can test or anything you may need in your own efforts, but just have no time for the actual building of it to tinker.
Oh, and thought you should know this works if you were wanting to go RW for System, but you'll have to use Linux due to falling prey to Error 73 https://forum.xda-developers.com/t/script-android-10-universal-mount-system-r-w-read-write.4247311/. I put mine back because it didn't seem to behave quite right there, but could be useful in your own tinkering.
OK, got it where it is fully flashable and bootable with touch for mine. Used Android Image Kitchen, unpacked TWRP image that boots with touch working, copied out the kernel and ramdisk from split_img folder, extracted stock recovery, replaced those 2 items with properly renamed versions and then repacked it with --original argument, and then it boots and flashes properly. Just a quick hack on it, but functional for those that need it.
This should be easy to combine in your /vendor/lib/modules from your own, as well as /vendor/firmware as long as you're rooted to pull it, into your TWRP ramdisk before putting it into the stock recovery this way. So you can get fully functioning touch for any display type in use.
whoshotjr2006 said:
Hi everyone
I've been working on getting twrp to boot on our borneo device for a week or so, borrowed I the device tree made by mistersmee for the g9 power since the two devices are almost completely the same
https://github.com/TeamWin/android_device_motorola_cebu
heres where I'm at:
https://github.com/touchpro/twrp_device_motorola_borneo
The only thing I cant seem to get working is the touchscreen. I realize others have tried before me already and had the same non working touchscreen, I believe the majority of us have an Ilitek touchscreen while others have focaltech or nova. I got the driver framework up and recognizing it exists from dmesg output but cant seem to get any actual touch input to register. You can look at my changes to android 11 twrp in the github above by selecting branch twrp-android-11 and using a diff program. I use meld in ubuntu.
if you want to build for yourself and help out: (i'd use ubuntu 20.04, i tried 20.10 first but one of the packages is too new and doesnt like the toolchain)
follow the instructions here to set up your build environment
mkdir twrp (you can name this whatever you want)
cd twrp
repo init --depth=1 -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-10.0
repo sync
add the device tree above to twrp/device/motorola/borneo
also add this to device in twrp/device/qcom/twrp-common
make your changes inside device/motorola/borneo then
. build/envsetup.sh
export LC_ALL=C
lunch omni_borneo-eng
mka -jx clobber && mka -jx recoveryimage (-jx is number of cores you have, i have quad core i7 with hyperthreading so i use -j8. personal preference really)
your completed build will be in twrp/out/target/product/borneo as recovery.img
reboot to fastboot (adb reboot bootloader) and type
fastboot boot recovery.img
see if your changes worked! look forward to seeing what you guys can do
Click to expand...
Click to collapse
finally having time to try to build an environment. Making a generic VM and will post it when done and easy to use, but running into some issues in my getting it to a point to test its success even. The steps you provided, missed a needed command "sudo ln -s /usr/bin/python3 /usr/bin/python" if using the 20.04 Ubuntu. But then how do you "add the device tree" as you put it? I'm normally a repacker to get things working, versus building things. I'm sure downloading the zip of the code and loading it into those folders is bound to break something as it always does when it comes to using links and ramdisks.
Perhaps you can provide more clear instructions of what you mean by that and I could finally gladly be able to contribute to this as more than a hackish throw-together process, since the description you provided "add the device tree" yields no meaningful results for any process for that to be pieced together from other builders.
git clone -b main https://github.com/touchpro/twrp_device_motorola_borneo.git
or you can just download the zip from my github, the only time it breaks symlinks so far that i know of is when you download a kernel in a zip file instead of git cloning it
take the twrp_device_motorola_borneo files and put them in /device/motorola/borneo and you should be good to go
whoshotjr2006 said:
repo init --depth=1 -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-10.0
Click to expand...
Click to collapse
That won't work, as it doesn't seem to have a twrp-10.0 as it looks to be depreciated, https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni/tree/twrp-10.0-deprecated. How'd you get yours, or did you mean 9.0?
repo init --depth=1 -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-10.0-deprecated
Twrp has always been built in an omnirom build environment but with a11 they switched to being built in an aosp environment. Twrp-10.0-deprecated they recently renamed to add the deprecated tag on but thats the one for android 10 that I initially used
Got my build environment set up and can upload the image in a bit if anyone wants it. @whoshotjr2006
using your steps it builds, but even having modified the firmware and modules to include the changes I put into mine to have it have touch support, it still will not. But the hacked android image kitchen one works just fine, which makes absolutely no sense when there are no errors, only warnings reported, but even those all look to be minor type casting of variables that I've noticed.
remind me again where you found that twrp that youve used android image kitchen on? was it from moto g9 power or another device? if you can let me know ill look through device trees and see what they have that we dont
seems like maybe its not insmod'ing the .ko file for your touchscreen, or it is and your touchscreen needs a firmware check/update at load. you'll have to remind me again which touchscreen you have (sorry its been a minute i've been busy) and we can look through other's device trees at the firmware loading portion
whoshotjr2006 said:
remind me again where you found that twrp that youve used android image kitchen on? was it from moto g9 power or another device? if you can let me know ill look through device trees and see what they have that we dont
seems like maybe its not insmod'ing the .ko file for your touchscreen, or it is and your touchscreen needs a firmware check/update at load. you'll have to remind me again which touchscreen you have (sorry its been a minute i've been busy) and we can look through other's device trees at the firmware loading portion
Click to expand...
Click to collapse
Source I used in AIK was cebu's 3.5.2.10-0 from https://twrp.me/motorola/motorolamotog9power.html. used AIK to unpack it.
To get touch using my quick hack, I just dropped in my matching .bin's from /vendor/firmware plus my ilitek_fw.bin to go with their novatech*.bin's and NT36xxx_MP_Setting_Criteria_601E.csv in place of their NT36xxx_MP_Setting_Criteria_6026.csv (deleted theirs).
Then also popped in my /vendor/lib/modules (minus audio ones).
At that point in tinkering it boots with touch. But fails to keep touch on booting into recovery.
Then I stumbled upon some obscure guidance about something in the kernel in recovery not initializing the touch on some devices and potentially being able to hex edit it after manually extracting the kernel using a hex editor. And then unpacked my booting version again, saw the kernel already separated out and pulled that and my ramdisk from split_image folder. cleaned up. unpacked the stock recovery. replaced with appropriately named kernel and ramdisk files and used the repack --original. Flashed it and it booted with perfect touch, just takes about 30-seconds on start before it's responsive. I have mine encrypted still so must input a passcode and just tap on the log button a few times till I know it's working then input my code and off it goes working normally.
Should not have anything too crazy different. I think the only thing I did was delete the etc file from the cebu, replacing it with an etc folder with a recovery.fstab and twrp.fstab I had scavenged from @svoc 's 3.4.0.0 (https://forum.xda-developers.com/t/working-twrp-but-very-unofficial-but-very-useful.4313665/ of which touch did not work for me, but it booted perfectly enough to extract my firmware and lib modules initially to put into my 3.5.2.10-0). Since every time I'd use Android Image kitchen to extract the cebu image it complained about things in /etc, and that was the only difference I could find between 3.5.2.10-0 and the 3.4.0.0. That is the only potential thing I did that could be of unknown consequence.
whoshotjr2006 said:
(sorry its been a minute i've been busy)
Click to expand...
Click to collapse
And never be sorry, you're helping out here, we understand, just like if you're waiting on a response back, that you're as understanding too
Compiled, touch working when booting it. Only change I made was to add my files as I outlined before, but into the firmware and lib folders respectively, but also edited the load_ts_firmware.sh to ensure nova and chiptone are no longer commented out. Flashed and has touch fully working as well. So it should be an easy build if I can get it working.
Edit: And touch does not take 30+ seconds per the 3.4.0.0 @svoc version I believe because it's not re-flashing the display code. So that could be why some perm lose touch, and I just got VERY lucky with mine to not.
Yes you are right all I did was put the touch screen driver in the twrp and send it to you that is why it takes less then 30 secs to do no need to recomile it each time just add your files in it and rezip it

Categories

Resources