yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Android Development] #define:
Re: [HOWTO] Build CM10.1 for Nexus 7

Fortunately, there is a way.. Gzip can help u... The size wont decrease, but you can move it around..

In terminal, go to the folder, in which source is kept... For eg, if source is in ~/android/cm10.1, go to ~/android..

There, run :

gzip --force --recursive --preserve=all --verbose 'cm10.1'

This will compress all the files in the cm10.1 folder.. But the structure will remain the same.. For eg, device/asus/grouper/BoardConfig.mk will become device/asus/grouper/BoardConfig.mk.gz in the same place..

So you can now copy the cm10.1 folder wherever u want...

To decompress, run:

gzip --force --decompress --recursive --verbose 'path/to/cm10.1'

And there you have it..

Sent from my Nexus 7
[Nexus 7 Android Development] TheDarkDefender:
Re: [HOWTO] Build CM10.1 for Nexus 7

Copying and restoring the folders does help you. I've done that.

Sent from my Nexus 7
[Nexus 7 Android Development] vasumit:
Well in my case after copying back, when i tried repo sync, it generated lots of errors & I tried that atleast three times and even re-initializing the git but still errors. Would be glad if you could tell me step by step as I might be doing it wrong. I still have the copied .repo folder with me on the external had disk ntfs partition.

Regards, Sumit

---------- Post added at 04:18 PM ---------- Previous post was at 04:16 PM ----------

Will give it a shot next time I want to take backup as I had deleted the original folder. Looks like have to repo sync again and then try these steps. Thanks mate for replying.
[Nexus 7 Android Development] TheDarkDefender:
Re: [HOWTO] Build CM10.1 for Nexus 7

No, I meant the source folder. '/Android/system'

Sent from my Nexus 7
[Nexus 7 Android Development] underwaterjr:
Re: [HOWTO] Build CM10.1 for Nexus 7

I was trying to build for toro also, with the instructions from the wiki. There is not an extract files script setup for that in the device folder to get the proprietary blobs. Is that something that cm will do when that phone finally gets the ota? Or do I have to do it manually? Sorry I know this is a grouper build thread, but you guys have been do helpful in the past.
[Nexus 7 Android Development] yogi2010:
edit: i see what you mean now, i don't see extract-files.sh either. i checked the wiki here: http://wiki.cyanogenmod.org/w/Build_for_toro but didn't find anything. perhaps you could go into the IRC listed at the bottom of the wiki and ask?
[Nexus 7 Android Development] underwaterjr:
That will be my next step, I saw the cm9 branch has the extract-files.sh script, as an experiment i cut and pasted into the current folder in my source...no dice though oh well.
[Nexus 7 Android Development] yogi2010:
ok cool. it seems strange, since they have official 10.1 nightlies for toro. my only other thought was maybe the blobs are built-in already, but i really don't know myself. keep us posted
[Nexus 7 Android Development] underwaterjr:
I don't think they are built in. I compiled a version and it completed and flashed without errors but I couldn't see anything lol, something wasn't right.
[Nexus 7 Android Development] yogi2010:
Re: [HOWTO] Build CM10.1 for Nexus 7

OK, that's good you tested it tho, lol.

I was looking at proprietary_files.txt(something like that), wondering if that tells you what files it is expecting to pull?
[Nexus 7 Android Development] sporkette:
Re: [HOWTO] Build CM10.1 for Nexus 7

I get my proprietary blobs from https://github.com/TheMuppets. You need to edit your .repo/local_manifest.xml file to reflect the correct directories to pull files from the muppets. If you all like I can post my file. You can do this for anything that they have blobs for. I build ROMs for my toro, grouper, and fascinatemtd all this way. Nice thing is that it updates on a repo sync so you never have to mess with it again once the directories are there, and once inserted you can build for whatever from the same tree. All depends on your brunch command. You can use this same method to build on other trees besides cm. I've built aosp the same way. If you want to build for something new you just need to know what internal hardware you have and point at the directory for that particular hardware if they have it.
[Nexus 7 Android Development] underwaterjr:
Re: [HOWTO] Build CM10.1 for Nexus 7

If you could post your file to show me how to edit it, that would be great. I haven't tried to change my local manifest yet.
[Nexus 7 Android Development] jacobmacek:
./get-prebuilts wont run, I get this did I miss a step?

This is the error I get bash: ./get-prebuilts: No such file or directory
[Nexus 7 Android Development] TheDarkDefender:
Re: [HOWTO] Build CM10.1 for Nexus 7

Please check the syntax of the command again( better copy paste it to be sure) , and run it from the appropriate directory .
[Nexus 7 Android Development] #define:
Re: [HOWTO] Build CM10.1 for Nexus 7

You're supposed to run it from inside the vendor/cm directory...

Sent from my Nexus 7
[Nexus 7 Android Development] sporkette:
Here's what I use. This will build both toro and grouper.

<?xml version="1.0" encoding="UTF-8"?>

<manifest>

<remote fetch="https://github.com/TheMuppets/" name="TheMuppets" revision="cm-10.1" />

<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-10.1" />

<project name="TheMuppets/proprietary_vendor_imgtec" path="vendor/imgtec" remote="github" revision="cm-10.1" />

<project name="TheMuppets/proprietary_vendor_broadcom" path="vendor/broadcom" remote="github" revision="cm-10.1" />

<project name="TheMuppets/proprietary_vendor_invensense" path="vendor/invensense" remote="github" revision="cm-10.1" />

<project name="TheMuppets/proprietary_vendor_asus" path="vendor/asus" remote="github" revision="cm-10.1" />

<project name="TheMuppets/proprietary_vendor_nvidia" path="vendor/nvidia" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_device_asus_grouper" path="device/asus/grouper" remote="github" />

<project name="CyanogenMod/android_kernel_asus_grouper" path="kernel/asus/grouper" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_device_samsung_toro" path="device/samsung/toro" remote="github" />

<project name="CyanogenMod/android_kernel_samsung_tuna" path="kernel/samsung/tuna" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_device_samsung_tuna" path="device/samsung/tuna" remote="github" revision="cm-10.1" />

</manifest>

Hope it works for you.
[Nexus 7 Android Development] underwaterjr:
Re: [HOWTO] Build CM10.1 for Nexus 7

I will give it a shot tonight. Thank you very much.
[Nexus 7 Android Development] jacobmacek:
jacobmacek@ubuntu:~/android/system/vendor/cm$ ./get-prebuilts

bash: ./get-prebuilts: No such file or directory

jacobmacek@ubuntu:~/android/system/vendor/cm$

I did exactly as you both said, I understand what the error means, I just dont understand why I am getting it
[Nexus 7 Android Development] #define:
Re: [HOWTO] Build CM10.1 for Nexus 7

Hmmm...

Change its permissions to executable, and run it manually...

Sent from my Nexus 7
[Nexus 7 Android Development] jacobmacek:
How so? The folder is empty...
[Nexus 7 Android Development] #define:
Re: [HOWTO] Build CM10.1 for Nexus 7

vendor/cm is empty??

That's not how its supposed to be..

There's supposed to be some stuff in there..

Sent from my Nexus 7
[Nexus 7 Android Development] jacobmacek:
Which is why I asked if i skipped a step/command?
[Nexus 7 Android Development] #define:
Re: [HOWTO] Build CM10.1 for Nexus 7

Download the vendor/cm folder from github and put the contents in place...

Sent from my Nexus 7
[Nexus 7 Android Development] jacobmacek:
Could I do a git clone

EDIT:Ran a git clone, worked, Thanks!
[Nexus 7 Android Development] underwaterjr:
That totally worked thank you so much.
[Nexus 7 Android Development] sporkette:
Re: [HOWTO] Build CM10.1 for Nexus 7

You're very welcome. Hmmm, think that put me in a mood to build a ROM. :)
[Nexus 7 Android Development] disconnecktie:
Re: [HOWTO] Build CM10.1 for Nexus 7

I had the same problem before and it can be the result of a bad repo sync. I had to delete all the files and folders and start over completely but since then every subsequent build is flawless and without errors.
[Nexus 7 Android Development] jonah1234:
Re: [HOWTO] Build CM10.1 for Nexus 7

I think you just change directory to /android/system and then do ./get-prebuilts

Sent from my HTC Droid DNA
[Nexus 7 Android Development] disconnecktie:
Re: [HOWTO] Build CM10.1 for Nexus 7

No that has to be done in the /cm/vendor
[Nexus 7 Android Development] jonah1234:
Re: [HOWTO] Build CM10.1 for Nexus 7

Yeah I was thinking of envsetup.sh

Sent from my HTC Droid DNA
[Nexus 7 Android Development] yogi2010:
i flashed my own build 2-3 days ago, and i just went to do another one, but adb is showing my N7 as 'offline'. i already accepted the adb popup prompt on my device a long time ago, and told it to remember the choice, and now i am getting 'offline' and can't get the prompt back. i haven't wiped data at all when flashing new builds.

anyone else experience this, or know what might have caused it/how to fix it? thanks!

edit: my other Android device is working fine with adb.
[Nexus 7 Android Development] underwaterjr:
Re: [HOWTO] Build CM10.1 for Nexus 7

Have you updated your SDK since going to 4.2.2?
[Nexus 7 Android Development] TheDarkDefender:
Re: [HOWTO] Build CM10.1 for Nexus 7

Hey all. Has anyone here got ubuntu to install alongside Windows 8? I'm finding it very difficult as ubuntu doesn't detect win8. Please Let me know. Thanks.
[Nexus 7 Android Development] dakpluto:
Can somebody help me out, I keep running into this:

make: *** No rule to make target `vendor/cm/proprietary/RomManager.apk', needed by `out/target/product/grouper/system/app/RomManager.apk'. Stop.
make: *** Waiting for unfinished jobs....
Notice file: system/su/NOTICE -- out/target/product/grouper/obj/NOTICE_FILES/src//system/xbin/su.txt
[Nexus 7 Android Development] mempf:
You are missing the RomManager APK file which is needed to build CM10.

You can run the get-prebuilts script located in the vendor/cm/ folder.

From the root source directory:

./vendor/cm/get-prebuilts
[Nexus 7 Android Development] dakpluto:
that's what I thought....I've run it, still getting the error :S
[Nexus 7 Android Development] h00py:
EDIT: Never mind, someone else beat me to it :P
[Nexus 7 Android Development] mempf:
What is the output of running the get-prebuilts script?

Also what are the contents of the vendor/cm/proprietary folder?
[Nexus 7 Android Development] dakpluto:
dakpluto@dakpluto-mint ~/android/system/vendor/cm $ ./get-prebuilts
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2548k 100 2548k 0 0 867k 0 0:00:02 0:00:02 --:--:-- 989k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 142 100 142 0 0 374 0 --:--:-- --:--:-- --:--:-- 572
100 286k 100 286k 0 0 327k 0 --:--:-- --:--:-- --:--:-- 1483k
Archive: ./proprietary/Term.apk
inflating: ./proprietary/lib/armeabi/libjackpal-androidterm4.so

dakpluto@dakpluto-mint ~/android/system/vendor/cm/proprietary $ ls
lib RomManager.apk Term.apk

Welcome to my confusion, lol
[Nexus 7 Android Development] buickgnx:
Anyone else getting

Unknown id: ./extract-files_new-1533261f40e9c6ace9158dcacc3538200134c74f.sh

Trying to get it to atleast get the property files from my N7, but everytime i run it i either get Premission denied or if i run it as sudo, i get ^. Also it fails when i try to run Croot with the packages installed. any help?

On Ubuntu 12.04 x64
[Nexus 7 Android Development] fattire:
I have no clue what that gigantic _new-bignumber.sh file is... can you show a little more of what's happening-- what you type, and what you see error-wise?

croot has a lower-case "c" and will only work after you've run ". build/envsetup.sh" That's a period followed by a space followed by build/envsetup.sh
[Nexus 7 Android Development] buickgnx:
Didnt know to run the . build/envsetup.sh which looks like it was the main reason it didnt build. the .sh file was what i thought i had to dl from github. Thanks for the help, reinstalling the whole setup to try again with clean files
[Nexus 7 Android Development] Jazz Like That:
Someone help me with this error. Am unable to get anything regarding this in google.

Thank you in advance.
[Nexus 7 Android Development] remydlc:
That looks like a script error. Try redownloading (remove first) the repo related software/scripts. That's what i can quickly think of. I Can remember the name, but just reference the doc.
[Nexus 7 Android Development] fattire:
We're in business...

Okay, the extract-files.sh script has been +2d and is now in the repository.

So everyone can

1. If you've built previously, delete your .repo/local_manifest.xml file and brunch grouper should create the needed directories in the right place. If it gets confused because device/bn/grouper is already there, just delete the folder and it should be re-created when you lunch/repo sync.

2. as a result of the extract-files script being in place, two giant steps (creating the local_manifest.xml and then later doing the manual commit from gerrit) in the build are no longer necessary. So the build just got simpler.

If someone could run through the compressed instructions and let me know if you find any issues, i'd appreciate it.
[Nexus 7 Android Development] ekanix20:
Just to be sure before I start, I can build this from ubuntu, right?

Sent from my Nexus 7
[Nexus 7 Android Development] the.emilio:
Last I checked Ubuntu was still Linux so thats a big 10-4.
[Nexus 7 Android Development] ekanix20:
"Ubuntu is a computer operating system based on the Debian Linux distribution"

Found this on wikipedia so I should be good to go. Just wanted to be sure though.

Sent from my Nexus 7
[Nexus 7 Android Development] the.emilio:
Lol yeah I was just bored. You can run Ubuntu or any other really. I personally use Linux Mint. Same base but I feel its more fluid. Try em both out to see which you like.
[Nexus 7 Android Development] ekanix20:
Yeah I'll see, but I think I'll use ubuntu because I have experience from that, plus its easy too dual boot with windows:)

Sent from my Nexus 7
[Nexus 7 Android Development] z1gackly:
I tried this procedure but as much as I searched on google I could not find Nexus 7 drivers for Ubuntu so adb on my Virtualbox virtual machine never could see the tablet. Bit of a disappointment after waiting so long for the repo sync!
[Nexus 7 Android Development] myepicyear:
Hey Fattire. Thanks for the guide. I used to build CM and AOSP ICS for all my Nexus devices, and things were always smooth as can be..or so I thought...(eerie music plays here)

But when I tried building JB (AOSP) for Grouper, and kept recieving a permissions error when trying to flash the output in CWM (symlinking and system/xbin/su related errors), which then led to CWM asking me if I wanted to fix system/xbin/su, which I said yes to, and it did boot. I was/have been quite discouraged about it--mostly due to the fact, that a Google search of this doesn't bring anything very relevant..at all.

I had spent weeks searching Google about this error. I reworded my search hundreds of times, and each time, the results were the same.

I came across this handy guide a few days ago, and I started to feel encouraged. First, because you mentioned permission errors and CWM, so I'm hoping you have more insight into it. Second, because you seem to be pretty knowledgeable about errors in general.

Right now, I'm setting up a new build environment from scratch. I'm gonna go back to 12.04 again from 10.04. I used 12.04 for CM9 and things worked well--I guess I'm still skeptical about open-jdk6. Not really sure why...It worked for me in the past.

I'm curious why I had this permissions error with plain-AOSP, since the problem you mentioned has to do with cwm. For aosp, I had always deleted the recovery folder(which was never an issue)and inserted the su/SuperSU binary and apk in the package.

Basically, does my problem fit what you were describing with permission errors? Also, is the practice of removing the recovery folder from a completed build not able to be used anymore?

I am really doubting myself here, for the first time in a while. :confused:

---------- Post added at 12:38 PM ---------- Previous post was at 12:24 PM ----------

I believe everything needed, as far as drivers and stuff, are included in the sdk.

Are you sure you linked the sdk properly?

Also, when you plug anything USB into your computer with a Virtualbox machine running, the host OS will naturally pick up the connection first. You need to manually start a usb device on the guest OS. This done by clicking on VirtualBox's "Devices" menu, then selct "USB Devices" from the dropdown menu. The usb device will have a strange name probably, so if you can't identify it, unplug all other usb devices, and it should be the only one on the list left to click.

After clicking the right USB device, if any remaining drivers are needed by VB, it will probably auto-install them at that time.
[Nexus 7 Android Development] mstrk242:
It'll update the local_manifest by itself now, and add the proper line for kernel and device. (After brunch it'll grab them from the cm repo's.) I've done a bunch of n7 builds, and I've never had to create the local manifest manually like I do when I build for some other devices.
[Nexus 7 Android Development] yogi2010:
Re: [HOWTO] Build CM10.1 for Nexus 7

For adb and fastboot, I've just been using the android-tools package in Fedora. It was working fine on 4.2.2 a few days ago, i could adb sideload and everything, so i thought i had up-to-date versions. Perhaps i could try downloading the SDK tho... thanks, i'll let you know if it works.

---------- Post added at 09:06 AM ---------- Previous post was at 09:00 AM ----------

Are you using the Linux Remix version of Ununtu? It SHOULD be able to detect UEFI. Where is the problem, is the live cd not seeing Windows when you are setting up the install, or after you install Ubuntu?
[Nexus 7 Android Development] yogi2010:
i fixed my problem, i should have thought of this before, but i installed an android utility program, and apparently it put an older version of adb in my path, so that's why it wasn't working. i temporarily ccommented the utility out of my .bashrc and voila, it works again, thanks for the idea!
[Nexus 7 Android Development] slebit:
Re: [HOWTO] Build CM10.1 for Nexus 7

Really nice guide! Just builded one from sources.
[Nexus 7 Android Development] yogi2010:
i recently set up Linux Mint 14, built cm7 for the G2 with success, but when building 10.1 for N7 Tilapia, i keep getting stuck here:

make: *** No rule to make target `vendor/asus/tilapia/proprietary/tf_daemon', needed by `/home/yrrch/cm10.1/out/target/product/tilapia/obj/EXECUTABLES/tf_daemon_intermediates/tf_daemon'. Stop.

make: *** Waiting for unfinished jobs....

looks like a problem with a proprietary file, tf_daemon? anyone else experiencing this or know the problem? thanks!
[Nexus 7 Android Development] disconnecktie:
Did you pull the proprietary blobs from your n7 prior to building?
[Nexus 7 Android Development] yogi2010:
yep i did, flashed the latest official nightly and gapps-20130301, and extracted files. i've built plenty of times before, and so far i can't figure out anything i'm doing differently now..

the only thing i can think of is updating to gapps-20130301 from 20121212..
[Nexus 7 Android Development] disconnecktie:
I couldn't build cm using mint at all on my pc. I switched to ubuntu 12.1 and it works perfectly everytime. I tried with mint 12,13,and 14.
[Nexus 7 Android Development] yogi2010:
damn ok, that's interesting. which cm versions did you try in Mint, and were you getiing a similar error? like i said, cm7 worked perfectly for me, once i got Java 1.6 installed.
[Nexus 7 Android Development] disconnecktie:
It seemed like it was only cm10 and cm10.1. I also found some kernel tools didn't want to work properly. Almost like I was missing some libs.

---------- Post added at 06:28 PM ---------- Previous post was at 06:27 PM ----------

I really like mint but ubuntu 12.1 with cinnamon installed works basically exactly like mint.
[Nexus 7 Android Development] #define:
You must've tried this, but just to get it out the way..

How bout manually pasting the tf_daemon file in ../../../tf_daemon_intermediates/???

Happens to me when building cm10 for my device...

But when i put the files manually in the out folder, building continues...

Sent from my Full Android on Grouper
[Nexus 7 Android Development] yogi2010:
Yeah, I have settled on Mint lately, and I may keep it since I can at least build for my g2, which hasn't gotten it's scheduled nightly-monthly, whereas the n7 has pretty reliable releases. Not that they're adding a ton to cm7 anymore, but still.

But yeah, having ubuntu's relliability without Unity is kind of appealing to me lol.

---------- Post added at 08:11 PM ---------- Previous post was at 08:08 PM ----------

I hadn't actuallly tried that, thanks for the idea, I'll try it next time.
[Nexus 7 Android Development] #define:
I use bbq...

Very light...

And fast...

Sent from my Full Android on Grouper
[Nexus 7 Android Development] yogi2010:
Nice, that's something i hadn't heard of yet. I found the site i think, and will read up on it tomorrow.
[Nexus 7 Android Development] yogi2010:
here is something kind of strange: when i extract files, it is looking for tf_daemon in /system/bin, but tf_daemon doesn't exist in my CM10.1 ROM when i look in /system/bin.

and alas, here is one line from the output of ./extract-files.sh:

Pulling /system/bin/tf_daemon to ../../../vendor/asus/tilapia/proprietary

remote object '/system/bin/tf_daemon' does not exist

what's up with that? lol

edit: i went to look at proprietary-blobs.txt at CM github for android_device_asus_tilapia, and /system/bin/tf_daemon is one of the files it is looking for. but after flashing the official tilapia nightly from 20130404, there is no such file.

also, not sure if this is related, but my device is not remembering my adb permission... every time i use it i have to re-allow adb permission, even tho i tell it to remember the choice. sometimes i even have to toggle usb debugging to get the popup to come back on so i can allow it again..
[Nexus 7 Android Development] #define:
I have that tf_daemon binary in my vendor/asus/grouper folder..

If u want to try, i cn give it to u..

U cn put it in the required places.. See if it builds..

(Mine is grouper)

came outta my weird fish™
[Nexus 7 Android Development] yogi2010:
yeah ok, thanks, i appreciate that, how ever you wanna go about it.

i wonder why it isn't present in my tilapia nightly tho?
[Nexus 7 Android Development] #define:
https://github.com/AOKP/vendor_asus_grouper/tree/jb/proprietary/bin

See here mate...

You'll find what you're looking for.. :good:
[Nexus 7 Android Development] yogi2010:
thank you sir, i placed the file in the proprietary folder, and it's building. i think that got me past that hump, i'll update with final results.
[Nexus 7 Android Development] #define:
Sir?? Lol..

U just made me feel 50 yrs old..

M 19.. :p

came outta my weird fish™
[Nexus 7 Android Development] yogi2010:
LOL sorry bout that, just a friendly expression :)

well, the build went for quite a while past that first issue, but now it just stopped here:

/bin/bash: xmllint: command not found

make: *** [/home/yrrch/cm10.1/out/target/product/tilapia/system/etc/permissions/android.software.sip.voip.xml] Error 127

make: *** Waiting for unfinished jobs....

update: looks like i just needed to install libxml2-utils to Linux Mint to fix this.

final update: build finished, flashed and running fine. so it looks like Linux Mint 14 can build CM10.1 just fine... for some reason i guess it doesn't come with libxml2-utils, so that package needs to be installed. i also installed ia32-libs to get adb working, not sure if that was necessary for the actual building or not. thanks to everyone who helped!