[A] Jump-Start How-To build CM9 for i717 - AT&T Samsung Galaxy Note I717

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.

Related

How to compile native android code

Hi everyone,
There has been a few questions on how to compile native android code (for exploits and such). Easy enough.
Go to http://source.android.com/download. You will need to be running Linux. Ubuntu is easiest. Follow the directions to get the source code for android downloaded and compiled.
Run this command
export PATH=/path/to/android/source/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin
Run arm-aebi-gcc or arm-aebi-g++ (depending on the language, c or c++) followed by
-o (OUTPUT) (INPUT)
So, for example, test.c would be:
arm-aebi-gcc -o test test.c
And test.cpp would be
arm-aebi-g++ -o test test.cpp
Just a note, this will make STATICALLY linked files. Meaning any headers will be included INSIDE the executable. Simply put, this means the files will be HUGE for large projects. There is a program, named agcc, which fixes this and can be found here:
http://plausible.org/andy/agcc
Put it in /bin by:
Code:
cd /bin
sudo wget http://plausible.org/andy/agcc
chmod 755 agcc
chmod +x agcc
Run agcc -o (OUTFILE) (INPUT) to compile. Be warned though, if a header is in the file that isn't in bionic (android's smaller libc) it won't compile.
Hope this helps!
+1
Awesome
............(stuipid mistake >>was<< here)..............
Thanks man...
now i can break out my bootable 50 meg linux disc and play around.
love that thing used to use it to crack windows passwords
should see the guys face when you crack his 20 char password in 5 mins without ever needing to use it.
well not really cracking but changing it. used to work at the pentagon. this one guys who used to be support for one dept. thought it would be funny to change all the admin passwords in his office. so when one of the pc's was beyond his repair. i showed up and he was like give me 10 min and i'll log you in. well 5 mins later i was fixing the machine while he was screwing off. boy was he pissed.
how big's gcc? cause i'll need to compile it for my linux.
rigamrts said:
how big's gcc? cause i'll need to compile it for my linux.
Click to expand...
Click to collapse
Massive. You're definitely better off using the prebuilt toolchain found in the Android (N|S)DK.
I would like to add something to this.
libc is essentially derived from the kernel. So, if you take agcc, and make changes to use the libc directory (I don't remember it atm) and NOT bionic, the app won't compile. Simple enough, libc is based of the kernel, so bionic is based of the android kernel. Things missing in bionic that are in libc WON"T work simply because certain kernel calls in glibc DON'T exist on the Android platform.
My exploit relied on the fact that I would be able to compile exploits using glibc, instead of using bionic. So it failed. Thats what I've figured out so far anyways.
zifnab06 said:
My exploit relied on the fact that I would be able to compile exploits using glibc, instead of using bionic. So it failed. Thats what I've figured out so far anyways.
Click to expand...
Click to collapse
Would you be willing to share the code for that exploit, even if it doesn't work? (sorry if you already have, I didn't see it anywhere)
I may be able to help.
Look up anything in our old thread, especially when we were talking about "sys/personality.h". The one I was working with exploited a hole that was patched (min_map_addr).
This blog post
honeypod.blogspot.com/2007/12/dynamically-linked-hello-world-for.html
(Sorry, my account isn't allowed to post links yet.)
gives a minimalist approach to using dynamically linked executables. (In particular, see steps #2 and #3 for the sources for hello.c and start.c) I gave it a try, and it seemed to work without agcc, e.g. with a makefile like the following (and with the arm-eabi- executables in the PATH of the user invoking the make) :
Code:
AR = arm-eabi-ar
AS = arm-eabi-as
CC = arm-eabi-gcc
CXX = arm-eabi-c++
LD = arm-eabi-ld
NDK_KIT = /opt/android/android-ndk-1.5_r1
PLATF_KIT = build/platforms/android-1.5
ARM_INC = $(NDK_KIT)/$(PLATF_KIT)/arch-arm/usr/include
ARM_LIB = $(NDK_KIT)/$(PLATF_KIT)/arch-arm/usr/lib
PLATF_INC = $(NDK_KIT)/$(PLATF_KIT)/common/include
OBJS = hello.o start.o
EXES = hello
hello: hello.o start.o
$(LD) \
--entry=_start \
--dynamic-linker /system/bin/linker -nostdlib \
-rpath /system/lib -rpath $(ARM_LIB) \
-L $(ARM_LIB) -lc -o hello hello.o start.o
hello.o: hello.c
$(CC) -I $(ARM_INC) -I $(PLATF_INC) -c hello.c
start.o: start.c
$(CC) -I $(ARM_INC) -I $(PLATF_INC) -c start.c
clean:
rm -f $(OBJS) $(EXES)
HTH
bftb0
Just curious, but I'm trying to get some native code that I've compiled to run on the Incredible. I've followed the instructions to download the the arm gcc, compiled my C code, and adb push'ed the executable over to /sdcard but I get a "permission denied" error when I try running it from my phone and adb shell. Does the phone have to be rooted in order to run native C compiled executables?
Thanks!
zebdor44 said:
Just curious, but I'm trying to get some native code that I've compiled to run on the Incredible. I've followed the instructions to download the the arm gcc, compiled my C code, and adb push'ed the executable over to /sdcard but I get a "permission denied" error when I try running it from my phone and adb shell. Does the phone have to be rooted in order to run native C compiled executables?
Thanks!
Click to expand...
Click to collapse
On an unrooted phone, push your code to /system/local or another place that you can write to and chmod it to be executable. By default the sdcard is mounted no execute. You will either need to add the directory you put it in to the path or execute it implicitly by specifying it is in the local directory.
for example ./myprogram
I hope that helps. I re-read it and it doesn't make much sense unless you have a firm grasp of the things that happen between the lines.
best of luck.
Thanks. Good stuff.
rigamrts said:
now i can break out my bootable 50 meg linux disc and play around.
love that thing used to use it to crack windows passwords
should see the guys face when you crack his 20 char password in 5 mins without ever needing to use it.
well not really cracking but changing it. used to work at the pentagon. this one guys who used to be support for one dept. thought it would be funny to change all the admin passwords in his office. so when one of the pc's was beyond his repair. i showed up and he was like give me 10 min and i'll log you in. well 5 mins later i was fixing the machine while he was screwing off. boy was he pissed.
how big's gcc? cause i'll need to compile it for my linux.
Click to expand...
Click to collapse
This is one of the most unbelievable stories ive read in a while. The fact that the pentagon had an administration department without policies or security in place to prevent such a widely known method, is comical.
btw, such a linux cd is no secret. Its called pnordahl.
Useful information
I'm surprised to see that many of you don't use the Forum's search function and simply start new topics over and over again. What funny is that the info you put here is old and useless.
I've posted an article on how to compile native C code for Android months ago, with several examples and tools:
http://forum.xda-developers.com/showthread.php?t=514803
or direct link herE:
http://www.pocketmagic.net/?p=682
However this technique is now too old.
The best approach is to simply use the NDK and build a custom Makefile for Cygwin's make under windows or easier under linux, see:
http://betelco.blogspot.com/2010/01/buildingdebugging-android-native-c.html
radhoo said:
I'm surprised to see that many of you don't use the Forum's search function and simply start new topics over and over again. What funny is that the info you put here is old and useless.
I've posted an article on how to compile native C code for Android months ago, with several examples and tools:
http://forum.xda-developers.com/showthread.php?t=514803
or direct link herE:
http://www.pocketmagic.net/?p=682
However this technique is now too old.
The best approach is to simply use the NDK and build a custom Makefile for Cygwin's make under windows or easier under linux, see:
http://betelco.blogspot.com/2010/01/buildingdebugging-android-native-c.html
Click to expand...
Click to collapse
Thank you for your very informative links. I'll take a look tonight, since I find this very interesting and would love to compile a few things for Android.
"What funny is that the info you put here is old and useless." - This was posted almost 10 months ago. That's a long time in smart phone years. By the same token, if it were January 2010 and I was looking for this info, I would assume that a post from May 2009 would be dated too.
"I'm surprised to see that many of you don't use the Forum's search function and simply start new topics over and over again." - Maybe zifnab did search and find your post and deemed your technique too old for Jan. 2010, so he created a new post with newer information. Or maybe he wanted to show a different way to do the same thing. Or maybe he figured that many users only have/take the time to look in their phone-specific forum. No one knows other than zifnab.
Personally, I welcome multiple posts by different people on the same topic. Everyone is different and often have different takes on the same thing. I find it easier to understand many techniques/topics if I get multiple perspectives.
Again, thank you for your contribution.
I need to compile the library with some modifications. how to do it as simple as possible? what will it take?
vlad072 said:
I need to compile the <library> with some modifications. how to do it as simple as possible? what will it take?
Click to expand...
Click to collapse
Did you get any thing in this regard ? Even i want to compile a part for library for the Android 5.1.1 device but not able to find any resource. Help will be appreciated.

Create your Linux environment to build YOUR Android

Hello all,
if you are like me, you love to do things by yourself and see how it works. In this thread I'll show you how to create your Linux environment in order to create and compile your own roms - any version (1.5, 2.3, etc etc). I had soooooo many problems to make it work, so here is THE thread
BE CAREFUL : this thread is ONLY to set up the OS. The Android you will compile will not be compatible with your x10 as it needs to be "edited" for our phones. It basically shows you how to get ready
Note : parts 1 and 2 explain how to set up Ubuntu into a virtual machine in Virtualbox. If you don't virtualize Linux, if your Ubuntu is already installed, etc etc you can directly go to 3. It's just here to explain how to install Ubuntu.
This tutorial works of course for any "hard installation" of Ubuntu (I mean not in a Virtual machine) and in any virtualizing software (Virtualbox, VMWare, etc etc). I've dropped the Virtualbox tutorial because the software is free
1. Requirements
2. Set up Ubuntu 64 bit (Virtualbox)
3. Set up Android Source dependencies
4. Set up Android Source
5. Regular use
1. Requirements
A working computer, capable of virtualization (if you don't want to wipe your Windows or your MacOS X !) and with Internet connection
Few Gb on your hard drive (10Gb minimum ! Recomended : 15-30Gb)
As much RAM as possible (Minimum 1024Mb), and as powerful CPU as possible (Core2Solo, Core2Duo, ...)
A bit a time
2. Set up Ubuntu 64 bit
Download and install the latest Oracle VM Virtualbox for Windows
Download latest 64-bit Ubuntu Linux (as .iso package) - you can store the file wherever you want.
(Optional) Download the VirtualBox v4 extension, this will allow you to support improvements like USB2.0... Install : once VirtualBox will be installed, File>Preferences>Extensions>Add... If you get an error (Error 1), try to put the file in a "very simple" location (like C:\) and reinstall.
Once you've set up Virtualbox, run it. Click on "New", then follow the wizard.
Make sure you set the following :
Operating System : Linux
Version : Ubuntu (64 bit)
RAM : 512Mb (you can adjust more, but avoid use lower than 512Mb - I use 2Gb)
Create a new hard drive : set it variable size or fixed sized, but you'll need at last 15Gb to get all the files. To feel confortable, I use 30Gb (variable)
The computer is created, now run it. It will say there's no OS. Click on Devices > CD/DVD > More CD/DVD... Here is you virtual player. Click on Add, and select the Ubuntu .ISO file you downloaded. Then, choose it in the list, and click Choose. Now, you can restart the virtual machine by clicking Machine > Restart.
The computer should restart from the virtual CD, so install it to your virtual hard drive - regular install, same as if you were installing it on a physical HDD.
Once it's installed, do not forget to kick the .iso file from the virtual player for you not to start always on the CD
3. Set up Android Source dependencies
In Ubuntu, do right-click on the upper bar (where are Applications, Shortcuts...), and click Edit Menus. Then, go to System > Administration and tick Software Sources. We need to do this because Sun is highly restrictive on access to Java setup files...
Close that, then click on System > Administration > Software Sources.
Enable all sources, then on the second tab, tick the two Canonical sources (the most important ones, as these sources allow to install Java !)
Close the window and allow to refresh the sources (if you don't, next steps won't work).
Go and read the official Android Source page. That's what we're going to do.
Run a terminal, and copy/paste this : (this is a corrected setup, it should work like a charm -- please tell if it's not)
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl sun-java6-jdk zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
After setup complete, make sure Java works, by typing
Code:
java
and
Code:
javac
This should return help on both commands. If one of these doesn't work (ie. "command not found"), your environment is not configured properly.
4. Set up Android Source
Create a dir called "bin" in your user dir.
Code:
cd ~
mkdir bin
echo $PATH
Then, type this :
Code:
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
Next step is to create a folder where we'll store Android sources we work on. You can place it and name it as you wish, let's call it "android" and place it on the user folder.
Code:
mkdir android
cd android
Then, run this command :
Code:
repo init -u git://android.git.kernel.org/platform/manifest.git
If it returns "command not found", restart Ubuntu !
Enter username and email, although I'm not sure it's useful for our use -custom roms-.
Now, let's get the files ! Type
Code:
repo sync
and wait... Wait... Wait... Lots of commands, of "Resolving deltas", "Receiving", etc etc. It can be very long (depends of your Internet speed), just wait...
Finally, let's register the public key and finalize setup process. Type
Code:
gpg --import
And the cursor will down a line and nothing will appear. Stuck ? Broken ? Woooops ? Not at all ! Program is waiting for you to type the key, which is sooooooo big. So, copy and paste all this :
Code:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD
u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z
wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq
/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5
jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4
MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9
b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGhlIEFuZHJv
aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cmlidXRpb25AYW5k
cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX
gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tgCdFfQYiHpYngkI
2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl
QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up
hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk
C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX
LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71MnrF6fj+Udtb5+
OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s
KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA
vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo
G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----
Once pasted, hit CTRL+D, this will make the program to register the key, and will display the key has processed.
Everything is now done, you have all the sources and you are ready to create your own roms. You can edit files simply by double-click, or use any software you want.
If you want to compile, simply run a terminal, go to your folder (remember it is cd android (MS-DOS-like command), where android is the folder you defined above) then type
Code:
make
. After a long time (depends on how much RAM you assigned to the machine, 512Mbits is slow), you will generate IMG files.
5. Regular use
If you want to get the latest source files (ie you have 2.1 files and want 2.2.1 files), simply run a terminal, go to your working folder and type
Code:
repo sync
. This should do the trick (correct me if I'm wrong)
Compiling sources takes hours to process, and you may want to kill the compile or pause it. You can then abuse of these keyboard shortcuts (common to Ubuntu OS) :
Code:
CTRL+C
will kill the process. Use it carefully, as it instantly kills it with no prompt.
Code:
RIGHT CTRL+P
is a Virtualbox command. Il will pause the whole Ubuntu (and also your process), and makes the screen ugly/gray (it just stuck the screen on Virtualbox v4.x). This is helpful when you run a Virtual machine, as you can pause the OS and make your computer to sleep/hibernate (or save an image - do NOT turn off your computer, as it will turn off the Virtual machine also !). Out of sleep, you can type again RIGHT CTRL+P to make the process to continue.
** Please note it might be risky to flash your phone with the stock rom you compiled (I mean with no modification), as this is not intended to work on X10
** Please note this install is for AOSP and NOT for Android SDK (you can install it with ease).
What's the difference ?
Android Open Source Project (AOSP) allows you to get the source code of the Android Operating System, in order to improve/change it, and create your personalized Android operating system
Android SDK allow you only to create and edit apps for Android Operating System.
Please note that compiling takes hours to process ! (3 hours or more)
** For any question, deeper info : please FIRST read official documentation. Easy to use, you'll get all info ! **​
man...did you ever stop?!
THANKS FOR INFO. If you can explain how to make system images for our X10 then we can use the dual boot option to make gingerbread or froyo roms for dual boot using Zhidu chargemon file.
I am not clear on making and android system image for the x10. can we extract a system image from a running rom? that way I could make a system image of black freedom and we can all dualboot it instead of installing it.
rendeiro2005 said:
man...did you ever stop?!
Click to expand...
Click to collapse
Lol I can't stop
@SuperUserMovado : I'd love to know, unfortunately I am like you - I don't know how to do this. I'm gonna get several info there and there and try to do some stuff
Regarding Zd's Dual, please note it is not compatible with his xRecovery, which makes things a bit boring when you want to easily install a custom rom AND benefit of Dual Boot.
Dual boot by the way is an excellent idea, but it has limitations (of course), like no SD card mount and few other things because it run from SD card and not from NAND.
EDIT : here is a good start : http://source.android.com/porting/index.html
I have just started playing with this and have compiled one aosp rom from source. I think it can be extracted from a running rom but I'm not sure how yet. On the other hand it looks like the source is available on the se dev website. I'm having trouble downloading it... not sure yet if its on my end or theirs.
Here's the error if someone could help me out: (Ubuntu 64bit)
Archive: /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip
[/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
zipinfo: cannot find zipfile directory in one of /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip or
/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.zip, and cannot find /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.ZIP, period.
Check this site out as well. The whole site is really helpful. I'm in the process of compiling a captivate rom with some slight changes and i hope it works.
Edit: Btw if you get the error repo not found, type this into the command line
code:
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
then close the terminal, reopen another one and it should work
@superusermovado
I'm pretty sure you use unyaffs for the system.img and split_bootimg.ph for the boot.img.
That's how to decompile an update.zip.
From there you recompile as usual. I'm not going to post the instructions because they are all over the net.
Hint: Andy rubins tweet lol
gavriel18 said:
I have just started playing with this and have compiled one aosp rom from source. I think it can be extracted from a running rom but I'm not sure how yet. On the other hand it looks like the source is available on the se dev website. I'm having trouble downloading it... not sure yet if its on my end or theirs.
Here's the error if someone could help me out: (Ubuntu 64bit)
Archive: /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip
[/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
zipinfo: cannot find zipfile directory in one of /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip or
/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.zip, and cannot find /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.ZIP, period.
Check this site out as well. The whole site is really helpful. I'm in the process of compiling a captivate rom with some slight changes and i hope it works.
Edit: Btw if you get the error repo not found, type this into the command line
code:
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
then close the terminal, reopen another one and it should work
Click to expand...
Click to collapse
Thanks for info
About this package, what's the content ?? The easiest way is to download from XDA the generic global rom, it's the same -- with no bug
Perceval from Hyrule said:
Thanks for info
About this package, what's the content ?? The easiest way is to download from XDA the generic global rom, it's the same -- with no bug
Click to expand...
Click to collapse
Huh? The generic ROM is compiled. The one we are talking about here is source-code. I thought you should know since you started this topic on how to setup a build environment. Im not intirely sure what the download from from SE is but it looks like the source-code from all the changes and additions SE made to the bare system. So there's the kernel source and some other stuff that I don't know the purpose of.
Sent from my SNES using Mario Paint
LouNGeRR said:
Huh? The generic ROM is compiled. The one we are talking about here is source-code. I thought you should know since you started this topic on how to setup a build environment. Im not intirely sure what the download from from SE is but it looks like the source-code from all the changes and additions SE made to the bare system. So there's the kernel source and some other stuff that I don't know the purpose of.
Sent from my SNES using Mario Paint
Click to expand...
Click to collapse
A compiled rom is not a problem
I was asking what was the content within the rom, and as you said - i supposed too - it is the original + all SE garbage.
Very interesting to get some apps back on AOSP (some like the *Scape, i do like predictive input from SE, gains a lot of time)
To answer then, the SE kit should contain everything of what SE adds : RachaelUI, all their apps (the *Scape), modules (keyboard, apis...), etc etc and all files to link these components to the kernel. And make our phones as fast as a monster truck. Not as fast as AOSP (Formula 1 !!!!!)
Don't forget the most important part, the package contains the SE kernel.
Sent from my SNES using Mario Paint
After using, struggling more like with Ubuntu and VMware, the main issue being I couldn't figure out getting VMware tools running so copy and pasting was hit and miss, I tried the Cygwin method instead which works much better for me on Windows 7 Ultimate x64.
XperiaX10iUser said:
After using, struggling more like with Ubuntu and VMware, the main issue being I couldn't figure out getting VMware tools running so copy and pasting was hit and miss, I tried the Cygwin method instead which works much better for me on Windows 7 Ultimate x64.
Click to expand...
Click to collapse
VMWare is much more difficult to run than VirtualBox. But course you can try and compile Android from Windows
But I definitely can't tell you if the kitchen method will work for XPERIA.
Perceval from Hyrule said:
VMWare is much more difficult to run than VirtualBox. But course you can try and compile Android from Windows
Click to expand...
Click to collapse
I've put VB on too, but thought I'd try the Cygwin method, which as I've said works for me, and is better imo, at least for what I need.
Perceval from Hyrule said:
But I definitely can't tell you if the kitchen method will work for XPERIA.
Click to expand...
Click to collapse
I can, and it does.
XperiaX10iUser said:
I've put VB on too, but thought I'd try the Cygwin method, which as I've said works for me, and is better imo, at least for what I need.
I can, and it does.
Click to expand...
Click to collapse
Thanks for info then
Hey guys, did someone do the same install as me ? (Windows 7 x64 host // Ubuntu 10.10 x64 guest).
I've never been able to make USB to work, kinda weird... Because when you compile Android, you'd like to send it to your phone *warning !*
Perceval from Hyrule said:
Hey guys, did someone do the same install as me ? (Windows 7 x64 host // Ubuntu 10.10 x64 guest).
I've never been able to make USB to work, kinda weird... Because when you compile Android, you'd like to send it to your phone *warning !*
Click to expand...
Click to collapse
That's why I went the Cygwin route, much less hassle imo.
XperiaX10iUser said:
That's why I went the Cygwin route, much less hassle imo.
Click to expand...
Click to collapse
I would say it depends. Linux environment is much cooler to work with source files (no boring "NOOO Windows can't find how to open this weird non-Windows file. What to do ? 1.Delete 2.Crash Windows 3.Phone Ballmer to make a tender offer)
Is compiling long with Cyg ? From AOSP, it takes me up to 3 hours with my (well RAM-ed, well CPU-ed) Virtual Machine.

[ISSUE SOLVED]CM9 compiling error

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.

[Q] CM KitKat build problem - add prebuilt package?

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.

Build freezes at building libwebviewchromium.so

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

Categories

Resources