Hi all!
I am building cm12 from 100% working sources but my build freezes when building libwebviewchromium.so.
My log is just like this
Code:
Install: /out/target/u8860/system/app/Email/Email.apk
{new line}
If I press ctrl+c I am getting
Code:
Install: /out/target/u8860/system/app/Email/Email.apk
make: Stopping building /out/target/u8860/blablbabla/libwebviewchromium.so
If I start building again, it freezes again. But if I pull this file from the simillar phone, the build is OK.
What is wrong?
for me compiling libwebviewchromium.so takes the longest compiling time. around 20-30minutes just to compile this
Sent from my LG-D410 using XDA Premium 4 mobile app
hadidjapri said:
for me compiling libwebviewchromium.so takes the longest compiling time. around 20-30minutes just to compile this
Sent from my LG-D410 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Sure, maybe I just need to wait more... But my CPU dont think so
UPD: Waited ~2hours and got absolutely freezed system.
After hard reboot I found 1.4gb libwebviewchromium.so file.
Hey mates :crying:
I have exactly same issue. I waited >20 mins but still at
Code:
target SharedLib: libwebviewchromium (/home/henry/cm11/out/target/product/aries/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so)
I recorded the size of the libwebviewchromium.so at one time, it is 1.4GB (1,405,675,432 bytes)
After several minutes, the size (after refresh) is still (1,405,675,432 bytes) !!! But the 'modified time' changes to the current time. But it doesn't freeze.
What should I do? Continue waiting?
Btw, I have already 4GB SWAP:
Code:
$ sudo swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 1998844 1994956 -1
/swapfile file 4194300 353196 -2
Help me!!! I am frustrated!!:crying:
henry0504 said:
Hey mates :crying:
I have exactly same issue. I waited >20 mins but still at
Code:
target SharedLib: libwebviewchromium (/home/henry/cm11/out/target/product/aries/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so)
I recorded the size of the libwebviewchromium.so at one time, it is 1.4GB (1,405,675,432 bytes)
After several minutes, the size (after refresh) is still (1,405,675,432 bytes) !!! But the 'modified time' changes to the current time. But it doesn't freeze.
What should I do? Continue waiting?
Btw, I have already 4GB SWAP:
Code:
$ sudo swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 1998844 1994956 -1
/swapfile file 4194300 353196 -2
Help me!!! I am frustrated!!:crying:
Click to expand...
Click to collapse
One solution I've found is placing another libwebviewchromium.so into the directory out/target/product/aries/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/
I tried one from official sources, everything is ok but it is not usable on phone --> a lot of crashes
Try waiting as much as you can
I was building CM12 from source (in a VM) and when this part came, it took approx. 2 hrs 45 mins.
So try waiting. It will finish (possibly)
Cheers!
-Technohacker
up to 10 post hix,up for everyone
Guys, libwebchromium is a massive library, depending on your CPU it can take 1hr-3hrs.
So eat some crackers and drink some tea. You're in for a long ride
Cheers.
Oh and BTW, if you're building cyanogenmod in a VM like me and can't allocate more RAM, try partitioning your virtual hard disk to make a large swap partition. It can help
Sent from my GT-I9003 using XDA Free mobile app
My build gets successfully compiled but when I boot up the ROM,I get SystemUI FC.Does adding Chromium support will help it out?
PS - I was compiling Candy5 5.1.1 for my msm8226 device.
In AOSP 6.0 sources, libwebviewchromium build is replaced with a prebuilt version supplied by the chromium project. Really is a boon
Cheers!
Technohacker
well u can use Prebuilt Webviewchromiuim to speed up build
Here You Go
Add this flag to Boardconfig.mk
PRODUCT_PREBUILT_WEBVIEWCHROMIUM=yes
You say to wait, however I've been waiting for ages, and the tune on my virtual machine is about an hour behind, bit the time goes up in jumps
Related
Hi guys I am kind of a noob when it comes to linux and compiling and have hit a brick wall. I posted this question here in Q&A and in Chef central so hopefully someone has an idea. I have been trying to compile CM9 for about three days now and no matter what I do I get this output. It is 95% of the time after the "install libwebcore.so" line.
Code:
install: out/target/product/maguro/system/lib/libwebcore.so
UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: GC overhead limit exceeded
at com.android.dx.util.IntList.(IntList.java:87)
at com.android.dx.rop.code.RopMethod.calcPredecessors(RopMethod.java:154)
at com.android.dx.rop.code.RopMethod.labelToPredecessors(RopMethod.java:95)
at com.android.dx.dex.code.RopTranslator.pickOrder(RopTranslator.java:352)
at com.android.dx.dex.code.RopTranslator.translateAndGetResult(RopTranslator.java:212)
at com.android.dx.dex.code.RopTranslator.translate(RopTranslator.java:106)
at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:293)
at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:134)
at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:87)
at com.android.dx.command.dexer.Main.processClass(Main.java:483)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:455)
at com.android.dx.command.dexer.Main.access$400(Main.java:67)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:394)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
at com.android.dx.command.dexer.Main.processOne(Main.java:418)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:329)
at com.android.dx.command.dexer.Main.run(Main.java:206)
at com.android.dx.command.dexer.Main.main(Main.java:174)
at com.android.dx.command.Main.main(Main.java:95)
make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/noproguard.classes-with-local.dex] Error 3
Before I tried to compile CM I did successfully compile AOSP for my Gnex. I have searched and tried everything I could find. I've tried these values in the common.py file and just about every combo I could think of per recommendations I found online.
Code:
check = (sys.maxsize > 2**32)
if check is True:
cmd = ["java", "Xmx2048m", "-jar",
os.path.join(OPTIONS.search_path, "framework", "signapk.jar")]
else:
cmd = ["java", "-Xmx1024m", "-jar",
os.path.join(OPTIONS.search_path, "framework", "signapk.jar")]
I have also checked my swap and as far as I can tell its there and working but it seams to never be used. I have tried all the commands I could find online to make sure it was enabled but Idk what else to try or check.
Also I am using a quad core AMD with 6GB of RAM if anyone is curious. Any and all advice/ideas would be very much appreciated at this point I am at a complete loss. Thanks for looking and helping guys.
EDIT:I just finished a successful build of AOSP for my galaxy nexus so I am really confused as to why I run out of memory for CM9.
Sky-
A fresh install of Ubuntu 12.04 on a freshly formatted partition seemed to fix my memory issue.
Build Environment
This is explained in detail on the Android website. I won't repeat it here.
http://source.android.com/source/initializing.html
Setup CyanogenMod Source
Code:
mkdir -p ~/android/cyanogenmod && cd ~/android/cyanogenmod
repo init -u git://github.com/CyanogenMod/android.git -b ics
wget -o .repo/local_manifest.xml http://playground.zaplabs.com/sandbox/android/device/sgh-i717/CyanogenMod/local_manifest.xml
repo sync -j4
Initialize Proprietary Files
Connect your I717 to the USB port. Required for pulling proprietary (closed source) binaries and firmware from your device. You should be running the latest ICS available. Usually a build from one of the ICS ROMS on the dev forum work too.
Code:
pushd device/samsung/quincyatt
sed -i -r -e 's/^(TARGET_OTA_ASSERT_DEVICE) := (.*)/\1 := \2,i717/'
./extract-files.sh
popd
vendor/cm/get-prebuilts
Build CM9
Code:
export USE_CCACHE=1
. build/envsetup.sh
prebuilt/linux-x86/ccache/ccache -M 10G
brunch quincyatt
If all went well you should have a zip file in out/target/product/quincyatt called cm-9-20120617-UNOFFICIAL-quincyatt.zip (or similar). Copy file to your device and flash.
Useful resources
CyanogenMod Gerrit Code Review
CyanogenMod How To Gerrit
CyanogenMod Github
Android Gerrit Code Review
MSM/QSD Android Enablement Project
I did not write this for beginners. It is intended to give experienced developers who are new to android development a jump start.
Mr. H0tw1r3,
I am currently using the hotwire CM9, did you build this? I was curious if it will progress further.
My Evo 4G was on CM7 or something until December when I went with a factory unlock iPhone 4s 64GB (now I hate apple even more) and switched to the Note recently. My expectations were very very high because CM on the Evo was extremely detailed and had literally hundreds of settings that stock OS doesnt have.
Another question... If one made a microSD plug, meaning it is not memory but simply a plug or dongle with a wire coming out of its butt. The wire would connect to a more sizable memory module, maybe SSD size, 256GB. Could it be done? Could this not fit inside the back of an extended battery pack with a regular battery, or for that matter, custom ram module to fill the space left where some of the 5000mah battery covers leave at the top and bottom of their double thick batteries?
Maybe the Note is just 1 fish in the sea, it'd be difficult to get it to a production phase, but not impossible. What do you think? Galaxy Note Super Pack: 256GB memory, 5000mah and do it better than the other battery guys so the thickness isn't as much with so much wasted space, e.g. the battery only grows outwards, not seeping sideways towards the top and bottoms too.
As I slowly put 16GB of music and some music videos (keepvid.com + top 40s and youtube keeps me happy) in a painfully slow process, I recall 1 of the few and not too important reasons I tried the iphone. Music Capacity....
btw, nice OS mod.
Thanks for the info. I'll try running a build tonight and see how it goes. As for the SD card, just wait until 64/128/256GB microSD's are out, they will work with the Note.
CalcProgrammer1 said:
Thanks for the info. I'll try running a build tonight and see how it goes. As for the SD card, just wait until 64/128/256GB microSD's are out, they will work with the Note.
Click to expand...
Click to collapse
64 is already out and it works
49.99 for a class 6 and 99.00 for a class 10
you know in a couple decades they'll be laughing at carbon nanotube electronics while they use molecular structure or something to accomplish 100TB on a microSD size module.
the only reason it is the size it is: because human fingers are too blunt to handle anything smaller. same with phones really, with current "advanced technology", e.g. the crap that humanity is allowed to know.
when it comes down to it, with current "tech", a fully functional telephone can be much much smaller than the size of a hearing aid and last 24 hours with 5 hours talk time. obviously rural areas would require more transmitter power and thus would have dropped calls.
I wont get started about "the space program"...
My build completed and I got a zip file "cm-9-20120618-UNOFFICIAL-quincyatt.zip" which I copied to my phone and am trying to install from ClockworkMod. I selected the zip and am getting the following error:
Code:
-- Installing: /emmc/cm-9-20120618-UNOFFICIAL-quincyatt.zip
Finding update package...
Opening update package...
Installing update...
assert failed: getprop("ro.product.device") == "SGH-I717" || getprop("ro.build.product") == "SGH-I717" || getprop("ro.product.device") == "quincyatt" || getprop("ro.build.product") == "quincyatt"
E:Error in /emmc/cm-9-20120618-UNOFFICIAL-quincyatt.zip
(Status 7)
Installation aborted.
EDIT:
Looked at hotwire's zip and it has a custom updater-script that gets rid of the assert line. I checked the build.prop and everything looks good, so I don't think getting rid of this line will hurt anything. I'm going to flash now and see what happens!
EDIT AGAIN:
Flashed! Booting it up now, it has the new Cyanogenmod boot animation with the new Cid logo (no more skateboarding Android) and is now on the "Android is upgrading..." thing. Seems to be working!
neko_tensai said:
you know in a couple decades they'll be laughing at carbon nanotube electronics while they use molecular structure or something to accomplish 100TB on a microSD size module.
the only reason it is the size it is: because human fingers are too blunt to handle anything smaller. same with phones really, with current "advanced technology", e.g. the crap that humanity is allowed to know.
when it comes down to it, with current "tech", a fully functional telephone can be much much smaller than the size of a hearing aid and last 24 hours with 5 hours talk time. obviously rural areas would require more transmitter power and thus would have dropped calls.
I wont get started about "the space program"...
Click to expand...
Click to collapse
Quite true, and very off-topic lol.
Sent from my SAMSUNG-SGH-I717 using Tapatalk 2
neko_tensai said:
you know in a couple decades they'll be laughing at carbon nanotube electronics while they use molecular structure or something to accomplish 100TB on a microSD size module.
the only reason it is the size it is: because human fingers are too blunt to handle anything smaller. same with phones really, with current "advanced technology", e.g. the crap that humanity is allowed to know.
when it comes down to it, with current "tech", a fully functional telephone can be much much smaller than the size of a hearing aid and last 24 hours with 5 hours talk time. obviously rural areas would require more transmitter power and thus would have dropped calls.
I wont get started about "the space program"...
Click to expand...
Click to collapse
You and me need to stay away from each other lmao! I can tell what page your on, and we are way out from "humanity is allowed to know ;-)
Kernel Build Instructions?
Thanks so much! Any chance you can give us a hint as to how to build the kernel? the latest prebuilt kernel is from May 17 (according to my build anyway).
Again thanks so much!
Phazor said:
Thanks so much! Any chance you can give us a hint as to how to build the kernel? the latest prebuilt kernel is from May 17 (according to my build anyway).
Again thanks so much!
Click to expand...
Click to collapse
No sources released (but I'm working on it).
Sent from my SAMSUNG-SGH-I717 using XDA
Thanks a lot h0tw1r3 for the thread, this is very useful, I was just building a linux vm environment, however I noticed on the link you had posted, that it asks for at least a 16gb Ram/swap, -
Note: It is also possible to build Android in a virtual machine. If you are running Linux in a virtual machine, you will need at least 16GB of RAM/swap and 30GB or more of disk space in order to build the Android tree.
Click to expand...
Click to collapse
I hope this doesn't mean having at least 16gb system ram, my desktop has this, but I was hoping I can run a vm on my laptop with 6gb ram, sharing 3gb for linux?
Thanks!
i_max2k2 said:
Thanks a lot h0tw1r3 for the thread, this is very useful, I was just building a linux vm environment, however I noticed on the link you had posted, that it asks for at least a 16gb Ram/swap, -
I hope this doesn't mean having at least 16gb system ram, my desktop has this, but I was hoping I can run a vm on my laptop with 6gb ram, sharing 3gb for linux?
Thanks!
Click to expand...
Click to collapse
I compile on a machine with 8gb ram. Works just fine. Was originally compiling on a VM with 5gb, slow but works.
I've tried following your guide here but I get errors using your local_manifest.xml. However, if I skip the wget of your local_manifest file it goes with no trouble. Would it hurt to skip that step?
Code:
[email protected]:~/android/cyanogenmod$ repo sync -j4
Traceback (most recent call last):
File "/home/william/android/cyanogenmod/.repo/repo/main.py", line 385, in <module>
_Main(sys.argv[1:])
File "/home/william/android/cyanogenmod/.repo/repo/main.py", line 365, in _Main
result = repo._Run(argv) or 0
File "/home/william/android/cyanogenmod/.repo/repo/main.py", line 121, in _Run
copts, cargs = cmd.OptionParser.parse_args(argv)
File "/home/william/android/cyanogenmod/.repo/repo/command.py", line 45, in OptionParser
self._Options(self._optparse)
File "/home/william/android/cyanogenmod/.repo/repo/subcmds/sync.py", line 126, in _Options
self.jobs = self.manifest.default.sync_j
File "/home/william/android/cyanogenmod/.repo/repo/manifest_xml.py", line 245, in default
self._Load()
File "/home/william/android/cyanogenmod/.repo/repo/manifest_xml.py", line 291, in _Load
nodes.append(self._ParseManifestXml(local, self.repodir))
File "/home/william/android/cyanogenmod/.repo/repo/manifest_xml.py", line 302, in _ParseManifestXml
root = xml.dom.minidom.parse(path)
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1920, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
result = builder.parseFile(fp)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: syntax error: line 1, column 0
I'm building on an Ubuntu 12.04 VM on my Win7-64 Core i7 [email protected] just fine. I think the VM has 4-6GB RAM (12GB in system) and it builds quickly without problems.
CalcProgrammer1 said:
I'm building on an Ubuntu 12.04 VM on my Win7-64 Core i7 [email protected] just fine. I think the VM has 4-6GB RAM (12GB in system) and it builds quickly without problems.
Click to expand...
Click to collapse
Thanks for the confirmation, I'm using my laptop right now, but if it takes too long to build, I'd move the vm to the desktop, which is plenty powerful (2600k @ 5ghz )
Similar Error
BlkSquad said:
I've tried following your guide here but I get errors using your local_manifest.xml. However, if I skip the wget of your local_manifest file it goes with no trouble. Would it hurt to skip that step?
Click to expand...
Click to collapse
I don't know if it would hurt but I had a simliar issue (I just set up my linux environment today). I would run the wget command and it seemed to work fine, but when I ran the sync command I would get the same error you did.
I ended up going directly to the .xml page the it's pointing to and copied the xml code on that page and replaced the text in the .repo/local_manifest.xml file with the copied .xml code.
I'm running the sync now and it appears to be progressing without any trouble.
Hi, I'm trying to build CM KitKat for the Optimus S/V (unsupported by CM). The build is crashing out trying to link libwebviewchromium.so.
It gives dozens and dozens of errors like this:
external/chromium_org/content/browser/android/browser_media_player_manager.cc:70: error: relocation overflow in R_ARM_THM_CALL
At the end it prints this:
collect2: error: ld returned 1 exit status
make: *** [/home/dbrown/cm11/out/target/product/thunderc/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so] Error 1
It may be a problem with insufficient memory on my build machine (Core 2 Duo laptop with 3 gb ram). For the time being, or in case that's not the problem I'm looking for a work-around. I looked in the Android.mk file for external/chromium_org and saw this:
# Don't include anything if the product is using a prebuilt webviewchromium.
ifneq ($(PRODUCT_PREBUILT_WEBVIEWCHROMIUM),yes)
Is it possible, and if so how can I add a prebuilt webview library so I can get past this error? I just want to get something built for now so I can test it. This would be the first successful build for this device. Thanks!
Open the "external/chromium_org/content/browser/android/browser_media_player_manager.cc"
And go to line Num. 70..
Youd better to see "https://bugs.launchpad.net/binutils-linaro/+bug/641126"
In that case, Loïc Minier was solve the add physical ram.
To try swap memory!
I know this is a bit necro but I thought I'd add.
I got the same error in libchromium. 16Gb ram. Went down to -j1 on make and it compiled. I have a 6-core chip :/
Similar query
For doing the android clean build faster I wanted to avoid building libwebviewchromium. Can someone provide the exact changes needed for this. Is libwebviewchromium.so enough ? or do we have to have related jars as well from first build.
@skinbark @winvinay add the following line to your devices BoardConfig.mk. (I.e. YOURSOURCEFOLDER/device/MANUFACTURER/DEVICE/BoardConfig.mk e.g. ~/AOSP/device/asus/grouper/BoardConfig.mk for me):
Code:
PRODUCT_PREBUILT_WEBVIEWCHROMIUM := yes
Just remember to add libwebviewchromiun.so from another ROM to /system/lib/ afterwards.
Currently im trying to compile omnirom on virtualbox...
my harddisk is having constant 100% activity
but the cpu process utilization is only 5% average
stuck at this stage for almost 2hour
Code:
----- Made recovery image: /android/omni/out/target/product/meliusltexx/recovery.img --------
Construct recovery from boot
mkdir -p /android/omni/out/target/product/meliusltexx/obj/PACKAGING/recovery_patch_intermediates/
PATH=/android/omni/out/host/linux-x86/bin:$PATH /android/omni/out/host/linux-x86/bin/imgdiff /android/omni/out/target/product/meliusltexx/boot.img /android/omni/out/target/product/meliusltexx/recovery.img /android/omni/out/target/product/meliusltexx/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p
chunk 0: type 0 start 0 len 4460554
chunk 1: type 2 start 4460554 len 1010944
chunk 2: type 0 start 4977152 len 1536
Construct patches for 3 chunks...
patch 0 is 201 bytes (of 4460554)
patch 1 is 2193329 bytes (of 516598)
patch 2 is 155 bytes (of 1536)
chunk 0: normal ( 0, 4460554) 201
chunk 1: deflate ( 4460554, 2990776) 2193329 (null)
chunk 2: normal ( 7451330, 1342) 155
this is normal?
dynomist said:
Currently im trying to compile omnirom on virtualbox...
my harddisk is having constant 100% activity
but the cpu process utilization is only 5% average
stuck at this stage for almost 2hour
Code:
----- Made recovery image: /android/omni/out/target/product/meliusltexx/recovery.img --------
Construct recovery from boot
mkdir -p /android/omni/out/target/product/meliusltexx/obj/PACKAGING/recovery_patch_intermediates/
PATH=/android/omni/out/host/linux-x86/bin:$PATH /android/omni/out/host/linux-x86/bin/imgdiff /android/omni/out/target/product/meliusltexx/boot.img /android/omni/out/target/product/meliusltexx/recovery.img /android/omni/out/target/product/meliusltexx/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p
chunk 0: type 0 start 0 len 4460554
chunk 1: type 2 start 4460554 len 1010944
chunk 2: type 0 start 4977152 len 1536
Construct patches for 3 chunks...
patch 0 is 201 bytes (of 4460554)
patch 1 is 2193329 bytes (of 516598)
patch 2 is 155 bytes (of 1536)
chunk 0: normal ( 0, 4460554) 201
chunk 1: deflate ( 4460554, 2990776) 2193329 (null)
chunk 2: normal ( 7451330, 1342) 155
this is normal?
Click to expand...
Click to collapse
Your virtual disk might have run out of space. What's its size?
I hv 2 virtual disks. 50GB and 100GB setup as LVM and extend it.
Initially I hv no idea omnirom required 25G as cache, that y I add another 100GB to the disk.
The single process took too long time, currently I hv save the state of the virtual machine. Hopefully I able to id the problem before I restart the machine.
Sent from my GT-I9205 using Tapatalk
dynomist said:
I hv 2 virtual disks. 50GB and 100GB setup as LVM and extend it.
Initially I hv no idea omnirom required 25G as cache, that y I add another 100GB to the disk.
The single process took too long time, currently I hv save the state of the virtual machine. Hopefully I able to id the problem before I restart the machine.
Sent from my GT-I9205 using Tapatalk
Click to expand...
Click to collapse
ccache is required only to make subsequent build faster. I have no experience of compiling omni, but CM/AOKP/PA take around 35 GB disk space for a single build.
Do u hv any idea what is the chunk and patch r trying todo?
I thought to build the recovery.img itself is just a small file/task.
Yet it cause my hdd activity 100% all the time.
Sent from my GT-I9205 using Tapatalk
[Solved]
solved the problem,
it seem the lvm think i hv 2 physical hdd disk... and increase the i/o operation
i remove the secondary virtual disk and extend the first one
now my virtualbox is fast~ hehe
i should do this on day one
Thank you for the tips on the virtual disk. :highfive:
ps: i hv successfully compile omnirom :victory: tomorrow going to flash it.
hopefully it will boot~
dynomist said:
solved the problem,
it seem the lvm think i hv 2 physical hdd disk... and increase the i/o operation
i remove the secondary virtual disk and extend the first one
now my virtualbox is fast~ hehe
i should do this on day one
Thank you for the tips on the virtual disk. :highfive:
ps: i hv successfully compile omnirom :victory: tomorrow going to flash it.
hopefully it will boot~
Click to expand...
Click to collapse
Share it with the community if it boots.
Silesh.Nair said:
Share it with the community if it boots.
Click to expand...
Click to collapse
Alright :good:
now im trying to hit 10posts b4 they allow me to post anything in developer thread
my configuration for this build is
OmniRom 4.4.2 + Linaro 4.8 for kernel + SaberMod 4.9 for android + -O3 optimization
but i have to remove
display-caf, audio-caf, media-caf, audiot-bt
do u have the same problem?
We need the caf repos, else you might have issues.
Sent from my GT-I9205 using Tapatalk
The repo i use for the caf is from omni and cm...
yet both produce the same problem
what is the caf really doing here? safe to remove?
btw what i m really concern is the audio-bt...
qcom devices use CodeAuroraForum ( CAF ) repos.
Ok this is the first time I heard Code Aurora Forum.
Keke let me do some reading...
Sent from Windows 98
Im on ubuntu 12.04 lts i have set up built env. Now download the source.... cm11.0 how download your source..
If u planned to compile cm11, look at Silesh sign
Sent from Windows 98
I look at it how to download it...
Sent from my GT-I9205 using xda app-developers app
Hints: Google how to use cm repo and create ur own localmanifest...
Sent from Windows 98
I try it but i give me error... can you send me the file
Sent from my GT-I9205 using xda app-developers app
ZZZzzzzz....
u r suppose to use repo/git to pull from server!!!
download failed? no prob it can resume! :angel:
learn from here >> Build_for_serranoltexx
jus rename serrano to melius... the melius link u can get from silesh sig
So, I have been an Android developer since 2009 (HTC dream), and have been actively "consuming" XDA, custom ROMs and other tweaks. Surprisingly, never tried to build my own ROM from scratch.
Recently, something made me want to build the ROM, so that I can make some changes to the way SystemUI behaves (specifically putting some app shortcuts to my Pixel phone(s), like camera etc. which are now removed in Android 10). So, after a week's struggle I got to where I wanted to reach. (90% time spent in getting the first successful flash. 1% feature development. 9% feature polishing).
Here is my guide to all beginners. (It is pretty simple, if you know the steps).
System setup
I have always been a Windows user (and I love my Surface(s)), but you cannot build Android on Windows machines (as clearly called out in source.android.com). I still tried to install Ubuntu shell from Microsoft store, and build (Spoiler alert: Does not work).
Next is Mac. Android can be built in Mac, I got it build in Mac. But, it is not easy. Especially with setting up the environment, having the right version of MacOS (doesn't work on Catalina yet). And also, challenges with filesystem format (Android building only works on case sensitive file system, so you have to create such a partition). Android building needs at least 160GB of disk space (so unless you are super rich and have 512GB+ Macbook with top specs, it is going to be hard).
My choice machine hence became, my two desktops (i7 4 core, 16GB, 1TB SSD, Ubuntu 18.04 and Xeon 12 core, 32GB, 512GB disk, with Ubuntu 18.04).
There is a reason why I specifically talk about these two machines. To build Android fast (cold clean build in less than 4 hours), you need
Fast processors, and more cores
Lots of RAM
A SSD disk (with 200GB space)
If you are missing any of the above 3, you will build times will go up. I have found for hot build, both machines did a decent job (2-3 mins if you are working on single module), but SSD was more important than cores, and RAM.
Setting up your Ubuntu machine. {ETA 30 mins}
Android has official (and clearly laid out) steps here.
But for Ubuntu these are pretty much the steps.
Code:
$sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip
And the guide doesn't mention this, but you need Python2.7, so get this.
Code:
# refreshing the repositories
sudo apt update
# its wise to keep the system up to date!
# you can skip the following line if you not
# want to update all your software
sudo apt upgrade
# installing python 2.7 and pip for it
sudo apt install python2.7 python-pip
# installing python-pip for 3.6
sudo apt install python3-pip
Also install adb.
Code:
sudo apt install android-tools-adb android-tools-fastboot
If you have come till here, you're ready to build for different devices.
Getting the code ready to build {ETA 5 hours - 1 day}
Most of this is also mentioned in the AOSP official website, but some stuff are tricky, I will try to highlight those steps here.
We are going to build the ROM for Pixel 3 (Android 10 - QP1A.191105.003 )
Download and explode the code {ETA 2-3 hours, depending on internet speed}
Here we are talking about downloading at least 20GB of code (text heavy content) over the internet. Going to be excruciatingly slow.
Also, we will be downloading code for specific device model, so if you want to do it for a newer model, you will have to go through the grind again.
Although, technically it might be possible to have the same folder contain code for multiple devices, it is too risky IMO, something goes wrong, you lose everything.
Recommended folder structure would be
aosp --> device 1
aosp --> device 2
......
aosp --> device n
Click to expand...
Click to collapse
With each folder containing over 150GB of contents (after downloading, building etc), so in practical sense, n could be only 3-4 at max.
Setting up repo.
Repo is a tool that Google uses to checkout and manage the AOSP code in your local machine. Once you download the codebase, you can use the command to resync, update, code base.
Code:
mkdir ~/bin
PATH=~/bin:$PATH
You should persist this folder in your PATH variable all the times.
Code:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
This sets up repo in your machine.
One final step before you actually start the long download, setup your git details.
Code:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Now download the code. Like I previously suggested I would do this.
Code:
mkdir ~/aosp
cd ~/aosp
mkdir pixel3
cd pixel3
Now, let's start getting the code home.
Code:
repo init -u https://android.googlesource.com/platform/manifest -b android-10.0.0_r10 --depth=1
Here we have done a bunch of things.
We have chosen a particular Android build tag to download (branch). You can follow the link to choose which branch you want to checkout, based on your test phone and Android version you want to build.
We have asked to only download the latest version of the branch and not all of the branch (--depth), this considerably reduces our download time.
Now that we have decided what to download, let's download the code with this command.
Code:
repo sync -qc -j4
This command is going to take a while to download over 20GB of code. In the meanwhile, let's see what we did here.
-q Asks the download to be silent (which means it will show just overall progress)
-c Makes sure we are only downloading current branch
-j[x] This the tricky one. Let's talk about this.
With -j we are asking repo to spawn multiple downloads (parallelly), to speed up the process. We will see this flag going forward in other places also. We should keep the value of x to number of cores we have in our machine. To find how many cores you have run
Code:
nproc --all
. Note that I have had situations where I put a very high value for n (higher than my cores as well), and eventually ran my JVM out of RAM to run the command (in parallel). So, the trade off here is to restrict it to the core number.
***Key step: Download radio drivers.***
Most tutorials miss this or mention it very subtly. But, without this step the ROM you flash won't boot to the home screen (you will be in the boot loop).
Go to the driver binaries page, and download the right zip files for the Android build version (android-10.0.0_r10) and device (Pixel 3) you chose earlier in the repo command.
You will be downloading two zip files (one vendor image zip and one radio drivers zip), both zips will have on shell script file each (.sh), just put those two files in your repo folder (~aosp/pixel3) and run the scripts. It will download the required proprietary files (after asking you to accept the terms). Do not miss this step.. I lost 3 days trying to find the reason for my ROM not booting up, this was it.
Let's build our code
Now things are more definitive.
Code:
source build/envsetup.sh
This command basically sets up your environment, adding necessary commands to path etc.
Code:
lunch aosp_blueline-userdebug
You can read more about this command here.
Basically this sets up the right parameters to build for your specific model. The param can derived based on aosp_[device code]-[userdebug | eng | user].
Once you have run the above two commands, you can *finally* build your codebase.
Code:
m droid -j4
m basically makes and builds the whole codebase.
Code:
droid
refers to the defaults target configuration (optional). -jN is to specify parallelism (equal to number of cores you have).
This command could take anywhere between 4-12 hours for the first run. But, if you followed all steps above, you should have a green message in the end saying this
Code:
[COLOR="SeaGreen"]#### build completed successfully (2:03:04 (hh:mm:ss)) ####[/COLOR]
Flashing your phone
Now, you're 50% safe when your build has finished successfully. Now, next 50% depends if you're able to flash it and get the phone booting.
This part most of you should know, so I am keeping it brief.
Enter fastboot
Code:
adb reboot bootloader
Unlock your bootloader
Code:
fastboot flashing unlock
Flash your Build
From the root folder of your repository (~/aosp/pixel3)
Code:
fastboot flashall -w
In a few minutes your device should be booting to the freshing baked ROM that you made.
What next?
You can just repeat
Code:
m droid -j4
to repeat builds
You can also go to a specific module folder and execute
Code:
mm
to only build that module
You can use adb sync to update specific modules without flashing again (this never worked for me, always bricked my device)
Use *fastboot flashall* without [-w] flag to flash over existing ROM without losing user data.
You can clean up the whole builds and rebuild everything from scratch. Run
Code:
make clobber
to clean your build, and use
Code:
m
to build again
You could face adb issues (device not detected) in Ubuntu. I am not going into details of how to fix that
This has been pretty much my journey so far with AOSP. I am comfortable making changes to modules and building them again.
Aw man, thanks for posting this. Never thought building rom itself would take this much effort & resources. Rom devs are serioulsy awesome ppl. :good:
Thx a lot ,I just want to learn it,it is vevy clear and help me a lot
Thanks very much for creating this. I didn't try flashing the result yet, but the build finished without any problems.
thank you very much for your post, I also want to modify little bit in code aosp and test this changes. Could you plaese provide advice about how I can open code (Android studio?), do some changes and test it by emulator?
thanks for the great guide
but following it gapps will not be included in the build, correct?
do you guys know how to include open gapps?
tia!
hi everything worked in this guide in terms of the build. While flashing the device all steps succeed but during boot the pixel is stuck at the google loading screen. Any suggestions. I have been stuck on the screen for > 30 minutes.
rorlig said:
hi everything worked in this guide in terms of the build. While flashing the device all steps succeed but during boot the pixel is stuck at the google loading screen. Any suggestions. I have been stuck on the screen for > 30 minutes.
Click to expand...
Click to collapse
Maybe you did not download appropriate .sh scripts for your device or didn't run them successfully before building the code. These scripts additionally download files and without them you could have these problems which you mentioned.
I built and loaded AOSP Andorid 9 for PIxel 2 using the eng build vs the userdebug and its works however, when I start installing and granting Google services and such it works but i get a lot of crashes. do you have Google working and not crashing all the time?
```
$ adb root
$ adb remount
$ adb shell
$ cd /system/priv-app
$ mkdir GoogleServicesFramework
$ mkdir Phonesky
$ mkdir PrebuiltGmsCorePi
$ cp /sdcard/GoogleServicesFramework.apk GoogleServicesFramework/GoogleServicesFramework.apk
$ cp /sdcard/Phonesky.apk Phonesky/Phonesky.apk
$ cp /sdcard/PrebuiltGmsCorePi.apk PrebuiltGmsCorePi/PrebuiltGmsCorePi.apk
$ chmod 755 GoogleServicesFramework
$ chmod 755 Phonesky
$ chmod 755 PrebuiltGmsCorePi
$ chmod 644 GoogleServicesFramework/GoogleServicesFramework.apk
$ chmod 644 Phonesky/Phonesky.apk
$ chmod 644 PrebuiltGmsCorePi/PrebuiltGmsCorePi.apk
:: Need to add permissions for the three apps above
::If a device fails to boot, you need to logcat and grep for " - not in privapp-permissions whitelist" and add any missing items in the xml
$ adb push C:\Users\username\Desktop\PIxel2_9.0.0_eng_build\privapp-permissions-platform.xml /etc/permissions/privapp-permissions-platform.xml
```
Hello, I'm interested on the Mac os part. I've been building pixel experience on Ubuntu form am external HDD but because it's a 2011 iMac I have USB 2.0 and r/w speeds are really low slowering the whole process. On the internal drive I have a 500gb SSD that I'd like to use for compiling but partitioning is not an option, could you help me setting up enviroment?
PD: I tried setting it up with brew but I am missing dependencies I can't (don't know how) install them with brew, all guides are for Ubuntu or for Mac is but old.
Thank you in advance!
This guide inspired me to setup a Dockerized build and flash environment for the Pixel 5.
Leaving it here as Pixel 3 owners might find it useful: https://github.com/nvllsvm/pixel5-aosp-builder
Draje0 said:
This guide inspired me to setup a Dockerized build and flash environment for the Pixel 5.
Leaving it here as Pixel 3 owners might find it useful: https://github.com/nvllsvm/pixel5-aosp-builder
Click to expand...
Click to collapse
Thanks, this is very helpful! Have you tested the built image on a pixel 5?
ammarr said:
Thanks, this is very helpful! Have you tested the built image on a pixel 5?
Click to expand...
Click to collapse
Yup - it boots and seems to work except for phone call audio (T-Mobile US).
I am having issue, I did this and got:
#### build completed successfully (17:26:44 (hh:mm:ss)) ####
Click to expand...
Click to collapse
flashing claims to have succeeded but when the phone reboots it just goes back to fastboot mode and says "no valid slot too boot to"
The last few lines of output when doing "fastboot flashall -w" are:
Erase successful, but not automatically formatting.
File system type raw not supported.
Erasing 'metadata' OKAY [ 0.007s]
Erase successful, but not automatically formatting.
File system type raw not supported.
Rebooting OKAY [ 0.000s]
Finished. Total time: 82.933s
Click to expand...
Click to collapse
Is the filesystem raw not supported normal? Other than that I am really not sure why this isn't working.
very very handy post, appreciate it, even though i would probably be not building on my own. 20GB smh.. phew!
Anyone know or figure out how to get gapps on this once built (or built-in) without having to have TWRP?
Great guide. I am working on creating a custom rom myself. I've been wondering if it's possible to prevent system apps from being included in the build. There are a few apps that I use f-droid apps in their place (example K9 mail for stock email app) and don't want to see them re-appear when the ROM is updated. If this is not possible, can they be removed from the build before flashing?
Edit ..
Figured it out.
Hi.. I'm Building AOSP 10 for POCO F1(beryllium). i dont know which command should i choose in lunch cause my device isnt listed.. They have only for Pixel Devices.. Pls guide through it
***Key step: Download radio drivers.***
Most tutorials miss this or mention it very subtly. But, without this step the ROM you flash won't boot to the home screen (you will be in the boot loop).
Go to the driver binaries page, and download the right zip files for the Android build version (android-10.0.0_r10) and device (Pixel 3) you chose earlier in the repo command.
You will be downloading two zip files (one vendor image zip and one radio drivers zip), both zips will have on shell script file each (.sh), just put those two files in your repo folder (~aosp/pixel3) and run the scripts. It will download the required proprietary files (after asking you to accept the terms). Do not miss this step.. I lost 3 days trying to find the reason for my ROM not booting up, this was it.***
How can I get this 2 zip files for my Samsung device (SM-A715F). Thank you