yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] Wifflepig:
OK, so I VBox'd a fresh 11.04 Ubuntu install, ran douchebuild.sh, and it spent just shy of forever getting the repo.

Once that all completed - I get to the screen where I am asked to make a vendor selection. There's obviously an error in the script (as reported in the screen), but when I try and make a selection over 7, it also won't let me. So even though 10 items/vendors are listed, only the first 7 are selectable.

Now - how can I remedy this without having to rerun the whole fartin' thing all over again? Not terribly interested in letting it chug for another few hours.

My linux skills are the suck, by the way. I know enough to screw things up royally.

BN.Nook Color is the one I'm trying to build up.
[Android Software/Hacking General [Developers Only]] Wifflepig:
I was able to edit the document just fine to get it to skip past the rebuild work, and just prompt me with the options. Unfortunately, I'm having zero luck getting VBox to recognize the Nook Color. I am seeing it show up in Windows 7 fine, but when I tell VB to capture it, "adb devices" doesn't show up anything. Not quite sure why. I guess I can take a peek at the UDEV business and see if maybe something is not right there.

EDIT: *ALMOST THERE*

I did this line:

mkdir -p ~/.android && echo 0x2080 > ~/.android/adb_usb.ini

(which was listed in the "getting usb / adb working") on nook devs.

Which now makes the nook color show up in the list of devices, but with a serialno of ???????????????? and a "no permissions" in the device column.
[Android Software/Hacking General [Developers Only]] nicandris:
hi guys, i'm back from vacation :)

i guess sed for MAC has different options than sed on Ubuntu? don't have a mac to test it. anw that line is used to change the name of the rom in the pro file. if you still get the error just remove that line from the script

i don't quite understand the question
[Android Software/Hacking General [Developers Only]] nicandris:
try this page. it seems it has a lot of documentation and instructions on your issue. http://nookdevs.com/NookColor_USB_ADB

ps. if you have a hard time with "vi" try gedit instead
[Android Software/Hacking General [Developers Only]] Wifflepig:
Outside of having to edit the logic so it'd accept choosing > 7 on the device selection (and the typo in B&N entry), and tweaking the values for your UDEV rules -- it worked like a complete charm.

Only, I should've given myself > 20GB virtual drive in VBox - since I ran out of disk space. SOOO not looking forward to rebuilding Ubuntu and DLing all this stuff again on a bigger virtual drive. :P

But regardless of that - mad props on your script. It made things crazy easy for me. My only hiccups were the script logic fix, and the tweak to make it see the nook over USB. Here's the values I ended up using in the rules file for UDEV (in case you want to include them in a future build):

SUBSYSTEMS=="usb", ATTRS{idVendor}=="2080", ATTRS{idProduct}=="0ff9", MODE="0660", OWNER="ME" #Normal encore
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2080", ATTRS{idProduct}=="0fff", MODE="0660", OWNER="ME" #Fastboot encore
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2080", ATTRS{idProduct}=="skip", MODE="0660", OWNER="ME" #Debug & Recovery encore

That, along with the

mkdir -p ~/.android && echo 0x2080 > ~/.android/adb_usb.ini

was necessary to get the USB and android working right.
[Android Software/Hacking General [Developers Only]] Wifflepig:
Here's the changes I made to get it working for BN Nook Color:

Vendor Menu (the & in B & N was causing a script error)

vendor_menu() {
echo "VENDORS:"
echo 1.	Commitiva
echo 2.	Geeksphone
echo 3.	HTC
echo 4.	Motorola
echo 5.	Samsung
echo 6.	Viewsonic
echo 7.	ZTE
echo 8.	LG
echo 9. BarnesNoble
echo 10. Emulator
}

Vendor area (increased selection to 10 in while):

##Show all vendors to select one
vendor_menu
echo
echo -n "Select Vendor(1-10): "
read vendor
while [[ $vendor -lt 1 || $vendor -gt 10 ]]; do
echo "Selection ERROR.."
echo -n "Select Vendor(1-10): "
read vendor
done
echo

In the BN logic (set udev_v to 2080 - which was from that URL)

9) echo "Vendor=Barnes & Noble, Device=Nook Color"
_vendor="bn"
_device="encore"
_udev_v="2080"
;;

Finally, to make sure I had the right ADB/USB business going, I put this in the BN logic also.

#making sure I have the android adb_usb setting
sudo mkdir -p ~/.android
sudo sh -c "echo '0x2080' >> ~/.android/adb_usb.ini"

The last two bits are from that nookdevs URL you sent me - which was what it took to make it work through VBOX for me. I also changed the mode to 0660 (from 0666), since that's what the URL said, and it worked for me. Example:

sudo sh -c "echo 'SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"$_udev_v\", ATTRS{idProduct}==\"0ff9\", MODE=\"0660\", OWNER=\"$user\" #Normal $_device' >> /etc/udev/rules.d/51-android.rules"

Finally *THANK YOU* for a bang-up kick-butt script that took all the hassle away from me and I only had to choose options as it went. I know enough linux to just really screw things up and this made days of wading through that wiki into a few hours spent. Huge props to you.
[Android Software/Hacking General [Developers Only]] nicandris:
i fixed some of the issues last night in github, will add the udev today! many thanx btw!

glad that i was able to help :) (oh and btw, i still like it to say Barnes & Nobles, so some "" should do the trick ;) will reupload later and you guys can test it!)
[Android Software/Hacking General [Developers Only]] Wifflepig:
Does a future build take nearly as long as the initial build? It took *forever* (well, like watching a pot of water boil...)
[Android Software/Hacking General [Developers Only]] Wifflepig:
I'm getting this when I launch the build.sh from the desktop:

Select Option(1-13): 6
build.sh: 165: [[: not found
build.sh: 165: 6: not found

Building Rom...
Fetching projects: 100% (264/264), done.

build/envsetup.sh: 1: Syntax error: "(" unexpected

any ideas?

I ran the buildcreator.sh found a few posts down from the top. FYI - had to modify that, too (it's only letting the first 7 vendors for input in the while) - but it still throws those errors above.
[Android Software/Hacking General [Developers Only]] nicandris:
:) it should be a lot faster

not sure why you get this, but copy the build.sh to ~/android/system and run it from there (should work)

i will do a bugfix version in a couple of days
[Android Software/Hacking General [Developers Only]] Zer0C0oL:
I agree, great work.
[Android Software/Hacking General [Developers Only]] Wifflepig:
The same thing happened -- it's still giving up the errors, and dunno why. It's saying that they're at weird places, as if strings aren't closed right or something. I've tried scouring the file and can't see anything whacky (like the & in B&N was before).

I'll fart around with it more today.
[Android Software/Hacking General [Developers Only]] egodemis:
niceee :D:DD:
[Android Software/Hacking General [Developers Only]] Darksage07:
I've tested that and works great on commitiva Z71 thanks for the great work ;) .With this i have saved lots of time when i try compile roms to my commitiva.
[Android Software/Hacking General [Developers Only]] nepovem:
thanks. testing....
[Android Software/Hacking General [Developers Only]] jewisharific:
Same exact error here. I had one failed build before I started getting this error though. I ran out of disk space ;) . I didn't modify anything. This was on a 64-bit Natty VM.

EDIT: It looks like I was just using the wrong interpreter. I added a hashbang line to the top of the script and it's working now:

#!/bin/bash

EDIT 2: My builds are failing though. I'll post some terminal output when my current build attempt fails.

EDIT 3: Unity sucks. I'm taking a guess that my problems stemmed from launching the build.sh script with sh (or whatever interpreter my system was using) instead of bash. SO I'm starting over with Lubuntu. I'll let you know how it goes.
[Android Software/Hacking General [Developers Only]] bancad:
work on samsung galaxy S5670 or no ???
[Android Software/Hacking General [Developers Only]] jrob09BHS:
thanks a ton man
[Android Software/Hacking General [Developers Only]] nicandris:
it works for all devices that CyanogenMod supports OFFICIALLY

Samsung

Captivate

Galaxy S

Vibrant

As soon as other devices are incorporated in CM source i will add them to the script also

glad that i helped ;)
[Android Software/Hacking General [Developers Only]] hoangthuy2611:
thank you very much
[Android Software/Hacking General [Developers Only]] Programmmer:
Huawei C8600

Good afternoon.

It turned out to compile custom firmware (CM7) for my Huawei C8600 from the repository(on this instruction github.com/yuri-wei-cn/android_device_huawei_c8600)

but after installing the phone revealed a few unpleasant moments:

1. orientation of the screen is always in the position of Landscape and does not change.

2. there is no keypad PIN-code and a set of numbers (perhaps because of the screen orientation)

July 5, 2011 firmware is compiled normally, only in the assembly was of one language: Chinese.

July 10, 2011 resync repository, added the necessary language in config files, set the phone firmware and revealed the trouble described above.

can someone know where in the source you can make corrections and make the correct direction of the screen
[Android Software/Hacking General [Developers Only]] fedevd:
Where can i find Cyano source code?
[Android Software/Hacking General [Developers Only]] nicandris:
well you are asking on the wrong thread. check in your phone's forums the answer should be around there.

i found this in github, https://github.com/search?langOverride=&q=proprietary_vendor_&repo=&start_value=1&type=Repositories

and this https://github.com/yuri-wei-cn/android_device_huawei_c8600

check in there if the drivers for your phone exist

https://github.com/CyanogenMod
[Android Software/Hacking General [Developers Only]] gnufabio:
Thanks, that's too usefull :)
[Android Software/Hacking General [Developers Only]] Kalwar:
I downloaded it but how to use it ?
[Android Software/Hacking General [Developers Only]] nicandris:
Did you downloaded it in an Ubuntu/Linux system?

If yes, extract the file, open a terminal, cd to the place where you extracted it, and type:

sudo chmod 775 douchebuild.sh

./douchebuild.sh
[Android Software/Hacking General [Developers Only]] warhell200:
Using this shell script to build for crespo4g

i dont know how to add the repo to do all that and add it to device list, nexus s 4g is tight and i want to build my own build for rc 7.1.0 rc 1 i did it for my htc evo 4g thanks for that hehe.
[Android Software/Hacking General [Developers Only]] Nexx:
Handy, thanks! Will be using this when CM has official support for the Desire S =)
[Android Software/Hacking General [Developers Only]] nicandris:
let me know when they will be releasing official support for new phones so i can add them in the script. been a bit busy lately and i dont have much time on reading news
[Android Software/Hacking General [Developers Only]] TheKiD075:
Incredible 2 is now officially supported. I have been working on adding the code, although I keep ending up with syntax errors. I have the USB id's if you need them... thanks for the great work, this is really an amazing script.

Sent from my Cyanmodded Incredible 2!
[Android Software/Hacking General [Developers Only]] nicandris:
very nice! send me the udev codes and i wilol be adding it asap
[Android Software/Hacking General [Developers Only]] TheKiD075:
Not sure if you got my pm... so here is the code to add the udev codes for the Inc 2 to the script... and it works from what I can tell, I've only been able to get that far, because I just found out Im not on a 64 bit system... that said here is the code...

18) echo "Vendor=HTC, Device=Incredible2"
_vendor="htc"
_device="vivow"
_udev_v="skip"
sudo sh -c "echo 'SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"0bb4\", ATTRS{idProduct}==\"0cad\", MODE=\"0666\", Owner=\"$user\" #Normal Inc2' >> /etc/udev/rules.d/51-android.rules"
sudo sh -c "echo 'SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0bb4\", ATTRS{idProduct}==\"0c94\", MODE=\"0666\", OWNER=\"$user\" #Bootloader Inc2' >> /etc/udev/rules.d/51-android.rules"
sudo sh -c "echo 'SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"0bb4\", ATTRS{idProduct}==\"0ff0\", MODE=\"0666\", OWNER=\"$user\" Fastboot Inc2' >> /etc/udev/rules.d/51-android.rules"

Hopefully this helps... Thanks for everything you have done, this script is amazing!
[Android Software/Hacking General [Developers Only]] nicandris:
got it no worries ;) will add your script and some fixes asap
[Android Software/Hacking General [Developers Only]] Joshuax:
Cool share, thanks
[Android Software/Hacking General [Developers Only]] yozpalang:
it wont let me select vendor I need to select LG which is 8 :confused::confused:

VENDORS:

1. Commitiva

2. Geeksphone

3. HTC

4. Motorola

5. Samsung

6. Viewsonic

7. ZTE

8. LG

9. Barnes

./douchebuild.sh: line 197: Noble: command not found

10. Emulator

Select Vendor(1-7):
[Android Software/Hacking General [Developers Only]] aitorTheRed:
Have you try to select number 8? even if it ask you only from 1 to 7, it can be just a typo.

What error did you get if you select number 8?
[Android Software/Hacking General [Developers Only]] nicandris:
nono it's my mistake. i will fix it now and reupload
[Android Software/Hacking General [Developers Only]] nicandris:
Ok guys. finally i got some time to fix this!

v2.3.2 Uploaded

Fixed selection bug and added Incredible 2 Support (thanx to TheKiD075)
[Android Software/Hacking General [Developers Only]] yozpalang:
I edited the values in the douchebuild.sh it works now yay :D
[Android Software/Hacking General [Developers Only]] nicandris:
i uploaded a fixed version some minutes ago :P
[Android Software/Hacking General [Developers Only]] yozpalang:
Thank you, this is my first time doing this how long does it takes?
[Android Software/Hacking General [Developers Only]] nicandris:
a lot!! :P

found this though, test it

http://wiki.cyanogenmod.com/wiki/Howto:_Speed_up_building
[Android Software/Hacking General [Developers Only]] yozpalang:
trying to do a new build I ran the build.sh from desktop after I choose the option 6.build it starts the fetching project and when that is done it closes the terminal I tried the buildshcreator.sh it says command not found what am I doing wrong ?:confused:
[Android Software/Hacking General [Developers Only]] nicandris:
Chmod 775 buildshcreator.sh
[Android Software/Hacking General [Developers Only]] yozpalang:
VENDORS:

1. Commitiva

2. Geeksphone

3. HTC

4. Motorola

5. Samsung

6. Viewsonic

7. ZTE

8. LG

./buildshcreator.sh: line 29: Noble: command not found

10. Emulator

Select Vendor(1-10): 9. Barnes

8

LG DEVICES:

1. G2x

2. Optimus 2X

Select Device(1-2): 1

Vendor=LG, Device=G2x

Time to check your build in your Builds folder on your Desktop.
[Android Software/Hacking General [Developers Only]] nicandris:
Download latest version 2.3.2
[Android Software/Hacking General [Developers Only]] yozpalang:
MENU:

1.Clean installation (make clean)

2.Remove out directory (make clobber)

3.Clean/Clobber

4.Clean/Clobber/Build

5.Check for Rom Manager Updates

6.Build

7.Add custom Mod Version Name

8.Repo Sync

9.Push Latest Build to Phone

10.Update SDK/ADB

11.Make emulator image

12.Remove builds from out dir

-

13.EXIT

If you wish to change device, please run the buildshcreator.sh script again

Select Option(1-13): 6

/home/ashkan/Desktop/build.sh: 165: [[: not found

/home/ashkan/Desktop/build.sh: 165: 6: not found

Building Rom...
[Android Software/Hacking General [Developers Only]] 1337GamingNinja:
Does this only support official CM builds? i.e. not the Thunderbolt?
[Android Software/Hacking General [Developers Only]] nicandris:
it only supports devices already incorporated in the CM7 repo

you can find the devices here:

http://wiki.cyanogenmod.com/wiki/Building_from_source

if your device is listed in here (or you know that teamdouche is already supporting it unofficially) msg me so i can add it
[Android Software/Hacking General [Developers Only]] jazzcore:
Thats nice, will try it out, thanks
[Android Software/Hacking General [Developers Only]] nicandris:
its smth wrong with your command shell. here is working fine. try running build.sh from a terminal
[Android Software/Hacking General [Developers Only]] xumathena:
Thank you!

This thing is so wonderful. I have successfully compiled the first ROM for my G2x. So excited.

I have two questions:

1.Does this script always get the latest code from cm if the repo sync line is executed? I poked around the cm's github branches, it seems to me that the gingerbread branch is the most up-to-date branch, and this script uses that branch. I just want to confirm that. I want to build my own "nightly". :)

2. I realize that extract-files.sh is one of the key script that gets important platform-specific binaries from the phone. If, say, I have a new cellphone that I want to port cm7 to, is there a general guideline for me to know what are the important binaries? or is it just black magic that requires a lot of experiences and intuition to master?

Thanks for this wonderful script!
[Android Software/Hacking General [Developers Only]] nicandris:
1. Yes and yes and yes :P

2. extract-files.sh gets the "drivers" or proprietary files from your device. if you need to port to cm7 you have to find those files, either from your pc or from the internet. if you check some pages back in this thread, someone posted about koush's repo in github that contains the files
[Android Software/Hacking General [Developers Only]] hanybanoub:
Hi there,

Can I use this to 'make' a ROM for my HUAWEI U8350/Boulder and then load it onto the phone?

Or will I brick it?

Thank you :)
[Android Software/Hacking General [Developers Only]] xumathena:
Wow, thanks for the prompt answer!

I guess it is my nature curiosity to want to know what are the important binary files for new devices. I always admire people with this kind of skill that can see the connecting between software and hardware.

I am planning to get a Tegra2 Android tablet from China (admit it, it's cheap) and port CM7 to it. Since the tablet I am going to get is mainly available in China, there won't be any possibility for the CM7 team to support it officially. :( Thus, I want to know if I have some idea about the hardware, for instance, of the CPU, the video chip etc., can I make some educated guess and come up with a "extract_files.sh" for that particular device and pull these files out?

Of course I have to assume that the extract_files is the only device-specific script that is used in building cm. I took a close look at the douchebuild.sh and indeed only found this being the only file that is related to device selection. Of course cm7's building system may hide additional levels of complexity that I don't know.

I would like to build my own cm7 for the tablet as a small project to learn kernel building for devices. I had some experiences with building linux kernels and ROMs, but never went deep enough to port a rom to a device independently. The tablet I am going to get is already loaded with Gingerbread, so I suppose it is possible to port CM7 to, at least theoretically.

Thank you for pointing out that koush's github has tons of device-specific binaries for downloading. I assume he is a quite high-skilled hacker and knows what he is doing. I probably am not that skilled, but I do have the curiosity to see if I can port CM -- hopefully it is not a super-challenging project. :D
[Android Software/Hacking General [Developers Only]] nicandris:
you wont brick it cause it wont flash :P your device is not officially supported from teamdouche. try searching the forums for an appropriate rom for your device

open extract_files in a text editor. i think it pulls from certain folders, so it should be easy to gather the drivers from your tab. i hope all goes well ;)
[Android Software/Hacking General [Developers Only]] Jamin13:
Will there ever be support for the Echo? Looooong shot but I might as well ask.
[Android Software/Hacking General [Developers Only]] nicandris:
when it will be added here, msg me so i can add it in the app also :P

http://wiki.cyanogenmod.com/index.php?title=Building_from_source
[Android Software/Hacking General [Developers Only]] Jamin13:
Haha, fantastic. That'll happen after a recovery gets built.

Ironically, I have an image but can't find anyone to help me figure out the problem. I've been told it's the framebuffer but I have yet to find out how to change it.
[Android Software/Hacking General [Developers Only]] nicandris:
Hi guys... finally i am up to date with the cm wiki!

v2.4.1

Added Samsung Galaxy S II and Fascinate support

Added Motorola Droid X support

udevs fixed
[Android Software/Hacking General [Developers Only]] rsdunn:
updated CM

You have reference to mka bacon in a couple areas of the script throwing errors starting @ line 601 otherwise the builds are working...
[Android Software/Hacking General [Developers Only]] jvsykes:
just great! Thanks for sharing :)
[Android Software/Hacking General [Developers Only]] nicandris:
hmmm i though i removed them in github... let me check

oh that was experimental to use cache. i shouldnt enter the mka at the end, my mistake

fixed. reuploading
[Android Software/Hacking General [Developers Only]] rsdunn:
mka still showing on github lines 611, 867, 898 ... RAW mode...
[Android Software/Hacking General [Developers Only]] nicandris:
that's just for HTC Dream. it has an if statement at the begining. ignore it. you get errors about it?
[Android Software/Hacking General [Developers Only]] rsdunn:
No errors just info you ya..
[Android Software/Hacking General [Developers Only]] rsdunn:
Builds OK getting boot loops... any ideas, factory wiped etc.
[Android Software/Hacking General [Developers Only]] nicandris:
need more info :P what device? had you flashed any cm nighlty before?

i suggest flashing a nightly, start the build.sh, make clobber and make clean, then run

cd ~/android/system/device/$_vendor/$_device/
./extract-files.sh

and build again
[Android Software/Hacking General [Developers Only]] zico_newbie:
hi all.. sorry if OOT, can i use this to another phone?
[Android Software/Hacking General [Developers Only]] rsdunn:
Samsung Vibrantmtd been using CM since Nexus came out... Using a CM derivative from Birgertime since he had the best working GPS at the time. Will try your process and let you know.
[Android Software/Hacking General [Developers Only]] rsdunn:
Bingo:: builds good. No loops phones working... thx
[Android Software/Hacking General [Developers Only]] nicandris:
glad i helped ;)
[Android Software/Hacking General [Developers Only]] ahmadqaed:
Woooooow. Thanks
[Android Software/Hacking General [Developers Only]] DannyBiker:
Hello,

I would like to learn to build ROMS for my HD2. I see this thread will surely help me out but can someone point me to a full tutorial or walkthrough ?

Not only something that tells you what to do but WHY you are doing it. I just want to learn.

It could be anything : a blog, a xda thread, etc.

I found bits and pieces but never a full guide.

Thanks in advance ! ;)
[Android Software/Hacking General [Developers Only]] taranfx:
holy cow, I love CM
[Android Software/Hacking General [Developers Only]] nicandris:
I got some spare time! Anyone wants something else added in the script? :D

I tried merging the proprietary files from koush's repo, but it messes with the repo, gonna try it again (if anyone has a clue msg me)
[Android Software/Hacking General [Developers Only]] ruibullseye:
good initiative

i think this will help alot of people +1 =D
[Android Software/Hacking General [Developers Only]] inktri:
Thanks for the great tutorial. Foudn itv ery helpful
[Android Software/Hacking General [Developers Only]] esver:
Hi, i've found a bug in the script : line 621

I replace "mkdir ~/Desktop/Builds" with "mkdir -p ~/Desktop/Builds" cause on my french ubuntu Desktop is named Bureau.

I don't have a Desktop directory so it's impossible to create the /Desktop/Build directory without the "-p" argument.