yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] benbailey84:
ok, here is some basic information before i start,

i am running x64 (i believe that is the correct way to say it)

here is the direct output from terminal

Inspiron-1545 ~ $ lsb_release -a

No LSB modules are available.

Distributor ID:	LinuxMint

Description:	Linux Mint 10 Julia

Release:	10

Codename:	julia

I deleted the whole ~/android folder, re-downloaded and extracted	androidmake_2.5.4.zip to my /home/ben folder, since i deleted the whole ~/android folder, opened the new extracted folder and clicked on douchebuild.sh and ran in terminal.

got to this point

repo initialized in /home/ben

Repo initialized! (Please note that this is gonna take emmmm... SOOOOOOOOME time to complete.

Fetching projects: 6% (19/312) fatal: Not a git repository: '/home/ben/.repo/projects/device/htc/glacier.git'

gave me that error but kept syncing, which is fine because I don't need that one I don't think.

then it got to this and wouldnt sync anymore

remote: Total 911 (delta 316), reused 837 (delta 242)

Receiving objects: 100% (911/911), 122.62 MiB | 40 KiB/s, done.

Resolving deltas: 100% (316/316), done.

From git://github.com/CyanogenMod/android_device_zte_v9

* [new branch] gingerbread -> github/gingerbread

* [new branch] gingerbread-release -> github/gingerbread-release

* [new tag] cm-7.1.0 -> cm-7.1.0

error: Exited sync due to fetch errors

Did the repo synchronization completed successfully? (y/n)

Doublechecking...

Fetching projects: 8% (25/312) fatal: Not a git repository: '/home/ben/.repo/projects/device/htc/glacier.git'

i guess i need to remove that particular repository link? but how?
[Android Software/Hacking General [Developers Only]] wowsher:
It sounds like you are running the script where you extracted it.. I put douchescript.sh in my home so /home/ben/douchescript.sh... dunno maybe that is messing with the path...

the way I read the script it really should not affect it. I would put douchescript.sh in gedit and then open a terminal and step through each step manually and see what the results are. It is fairly clear to see the command lines being run. I think Mint is derived from Ubuntu so I would think they would be very similar... Sorry I have no other ideas at the moment.

nicandris -- I had to add this to the douchebuild.sh and build.sh otherwise the repo sync would not work from the menu script.

sh -c "echo 'export PATH=$PATH:$HOME/bin' >> ~/Desktop/build.sh"

wowsher
[Android Software/Hacking General [Developers Only]] benbailey84:
does it matter where i put it?
[Android Software/Hacking General [Developers Only]] wowsher:
This is from the douchebuild.sh script and should help for location of the change.

wowsher

##Create the build.sh script

rm -f ~/Desktop/build.sh

if [ "$_incompatible" == "0" ]; then {

sh -c "echo 'clear' >> ~/Desktop/build.sh"

sh -c "echo 'echo' >> ~/Desktop/build.sh"

sh -c "echo 'echo' >> ~/Desktop/build.sh"

sh -c "echo 'export PATH=$PATH:$HOME/bin' >> ~/Desktop/build.sh"
[Android Software/Hacking General [Developers Only]] benbailey84:
yeah i just tried that and it didn't work. so I did this

cd into the htc dir...

ben-Inspiron-1545 htc # ls

7x30-recovery.git desirec.git legend.git saga.git

ace.git dream_sapphire.git leo.git speedy.git

bravoc.git espresso.git liberty.git supersonic.git

bravo.git glacier.git mecha.git vision.git

buzz.git heroc.git msm7x30-common.git vivo.git

click.git hero.git passion-common.git vivow.git

common.git inc.git passion.git

ben-Inspiron-1545 htc # rm glacier.git

rm: cannot remove `glacier.git': Is a directory

ben-Inspiron-1545 htc # rm -r glacier.git

ben-Inspiron-1545 htc # ls

7x30-recovery.git desirec.git leo.git speedy.git

ace.git dream_sapphire.git liberty.git supersonic.git

bravoc.git espresso.git mecha.git vision.git

bravo.git heroc.git msm7x30-common.git vivo.git

buzz.git hero.git passion-common.git vivow.git

click.git inc.git passion.git

common.git legend.git saga.git

I am running that right now to see what I get. *crosses fingers*

*edit* seemed to run fine after i did the above...
[Android Software/Hacking General [Developers Only]] mhwarfield:
Fedora / RHEL / CentOS rpm based distros...

Ok, this script is sweeeeet!

I'm not on Ubuntu but prefer Fedora with either RHEL or CentOS for long term support servers. Got this working on a Fedora 15 workstation! I commented out all the apt-get commands in the script and just manually made sure of the various dependencies that it was installing. Only ran into one minor gotcha - I had to "sudo yum install /usr/include/gnu/stubs-32.h" which installed the glibc-devel-2.14-5.i686 rpm on my x86_64 system. Not bad. All the other dependencies were caught just using yum with the dependency lists from the script.

I saw one message about trying to do something with upstart and involving an ubuntu path I have not been able to track down but that seems to have been cosmetic because it did eventually build me a nice sweet Kang! Yeah!

I'll try and work the yum commands and a switch into the scripts and feed you a patch to include support for the rpm based distros!
[Android Software/Hacking General [Developers Only]] johnnyfg:
The script "douce..." assumes that there is a ~/Directory ... I have Desktop-directory in Ubuntu, but it is in local language. "~/Skrivbord" ... One have to make an symbolic link.

ln -s Desktop Skrivbord, or something similar, before running the script.
[Android Software/Hacking General [Developers Only]] p2pjack:
I hope some can help i have run the script douchebuild.sh a few times now and it stops and hangs at this point

Fetching projects: 99% (309/312)

Is this normal ? should i just wait or keep running over and over until it completes ?

I'm using ubuntu 11.10 64 bit
[Android Software/Hacking General [Developers Only]] mhwarfield:
Doesn't seem normal to me. Sounds like git is hanging replicating the repo. I haven't run into it. I would give it some time and try again. It looks like you got quite a ways into it. Most of the things I know of that would have caused it to hang would have caught it much earlier in the process. Does it always hang at the same spot? If no, I would suspect network problems. How is your disk space?
[Android Software/Hacking General [Developers Only]] p2pjack:
Got it work was a repo problem just ran the script a few more times and it worked next Was getting adb to Work (google is my friend) after hours searching found the how to get to work. Now is getting it make a kangs has it stops and quits out of the terminal when making the build do you know if it makes logs and where to find them? Not been using linux for long any help would be good :)
[Android Software/Hacking General [Developers Only]] mhwarfield:
I saw something like that initially when I was first getting this to work on Fedora 15. I had to scroll up several screens in the terminal and determine where the fatal errors were to correct them (some missing 32 bit headers and libraries). I'm not aware of any logs (doesn't mean they're not there) but I was eventually able to get a clean build after installing some missing packages.

I'm currently in the process of rebuilding my environment now. I realized I had made a serious mistake of running this script when my phone was running Deck's ICS ROM instead of a CM7 or Supersonic ROM. Consequently, the build wasn't able to pull certain critical proprietary driver binaries from the phone, like WiMAX. So my initial kangs couldn't fire up WiMAX because they didn't have that radio driver. Taken the better part of a day to rebuild from scratch making sure I had a fully functional phone attached to the computer before doing so. :-P
[Android Software/Hacking General [Developers Only]] krzych:
This would be beautiful since I'm rpm based guy too ;). Debian did scared me to death about ten years ago with its crappy installer and I have trauma until today, heheh ;)
[Android Software/Hacking General [Developers Only]] mhwarfield:
Ok. So be it.

Caveats. This is a quick once-off diff that makes it work on my x86_64 Fedora 15 development engine. Which PROBABLY means I already had certain dependencies installed on that system which are needed and are not in the default development system build. I can't tell without building up a pristine system from scratch and testing. That being said, if you find anything missing that you need to add, let me know. I'd like to know.

/STD Warrenty. Works for me. Your mileage will probably vary. :-)

This is in standard "universal" diff format.

Unpack the original package from the OP and change into that directory. Apply the patch with "patch -p1 < {path to patch file}".

The original poster is free to incorporate my suggested changes as he wishes.

Patch is attached. Have fun.
[Android Software/Hacking General [Developers Only]] nicandris:
If you make the patch universal (nicandris-CM-from-scratch-9cac093 --> nicandris-CM-from-scratch-*) i can upload it to github (or you can!!) and i will post it in op
[Android Software/Hacking General [Developers Only]] mhwarfield:
I'm happy to report that my rebuilt environment does now build kangs with a working WiMAX. The fault was mine of NOT having the phone running a ROM containing a working WiMAX driver at the time I ran the script.
[Android Software/Hacking General [Developers Only]] mhwarfield:
Ok... I think what you are asking me for is a git-diff. This I can do. I'm really kinda old school and usually generate patches using "diff -urN" but I do generate git-diffs, which are very VERY similar.

I cloned the git repo and put my changes in there and generated a git-diff from it. That's attached. The forum attachments don't like .git extensions so I stuffed it in a .zip. I've also attached my cloned repo in entirity if that helps.

I didn't make any changes to the README file or to any prompts but I might suggest you add a comment in there around where you have the phone connected and remark to make sure the phone is running a current ROM with up-to-date radios (I had to rebuild because my first attempt the ROM that was running on the phone was Decks ICS Android 4 so I lost my WiMAX when I built my first kang).
[Android Software/Hacking General [Developers Only]] nicandris:
ok i will upload this to the repo. i got some backups if anyth is wrong. we need someone to test it on a clean installation!
[Android Software/Hacking General [Developers Only]] nicandris:
v2.7.1

Added RPM compatibility (thanx to Michael H. Warfield - mhwarfield)

small bugfix
[Android Software/Hacking General [Developers Only]] mhwarfield:
And of course, as soon as I try it on another (Fedora 16) system, I find a mistake I made. I overspecified one of the dependencies so it works (currently) on Fedora 15 but probably not on other distros and maybe not on Fedora 15 if they update this library.

Fix on line 157:

Change "glibc-devel-2.14.1-5.i686" to just "glibc-devel.i686"

Sigh... Still retesting. Haven't tested it on an i686 system yet.
[Android Software/Hacking General [Developers Only]] mhwarfield:
Ok... One last time. I finished testing on a fairly pristine Fedora 16 x86_64 development workstation install and found about a half a dozen more missing dependencies between the 64 bit stuff and the 32 bit libs. Sooo... Like before, here's the zip of the git diff against the current git repo and a zip of the git repo patched for the changes. That will be it for me unless someone else spots something.
[Android Software/Hacking General [Developers Only]] p2pjack:
problem with build.sh

When i use the build.sh and choose a option i get the following

/home/****/Desktop/build.sh: 167: [[: not found

/home/****/Desktop/build.sh: 167: 6: not found

it's like some of the script is missing

have attached the build.sh changed to .txt so i could upload it. If someone could take a look a tell me what i need to add please

i'm using ubuntu 11.10 64 bit

if i do cd ~/android/system/

repo snyc

. build/envsetup.sh && brunch ace

builds the kang with no problems
[Android Software/Hacking General [Developers Only]] mhwarfield:
WHAT?

What shell are you running (echo $SHELL) and what platform are you on?!?! "[[" is a bash (the standard Linux sh shell) builtin for non-expansive tests and comparisons. I can not imagine any circumstances under which bash would ever give you THAT error!

*** edit ***

Duh. I see the platform you're running - Ubuntu 11.10. Should have worked although I've totally given up on Ubuntu thanks to Unity - it broke support for FreeNX... Also means the shell SHOULD have been bash. WTH has Ubuntu done this time?

*** /edit ***

Line 167 is also the last line of the script where it recursively calls "options_menu". That just doesn't make sense.

To be real... Nicandris didn't put "#!/bin/sh -" at the top of that script like he should have. I just noticed that and that's a bug. That indicates it can run under any old lame shell and somebody could run it under the "C-Shell" (old Unix hackers like me will know this) or ksh or ash (busybox) whatever your default shell is. That's bad and that needs to be fixed. Try this:

1) Insert this at the top of the script and retry:

#!/bin/sh -

2) If that doesn't work, try it with this:

#!/bin/bash -

Very important notes:

1) The above has to be the very first line of the script.

2) Make sure there's a space before the dash (-)! It can be hard to read from the forum.
[Android Software/Hacking General [Developers Only]] p2pjack:
Will reboot in ubuntu and try it and let you know

edit With #!/bin/bash - looking good no line 167 just went on to repo sync thanks for your help
[Android Software/Hacking General [Developers Only]] MA700C:
I'm trying this build script for the first time and basically have started from the beginning running "douchebuild.sh". Everything seems to be working find and after a long time pulling things down and then building, process ends with some messages and nothing gets put into the "Builds" directory on the Desktop. Here are the last lines:

Since the last set of lines reference a couple of the directories in "out/target/common/obj/JAVA_LIBRARIES", here are the contents of these directories:

I'm building this on an Ubuntu 10.04 32bit VM image and I have a Motorola Droid plugged in and accessible via adb. The Droid currently has CM 2.3.7 on it.

Can anyone see what I am doing wrong?

Thanks in advance for any assistance.
[Android Software/Hacking General [Developers Only]] mhwarfield:
Nothing is apparent to me from what you've posted but I suspect there may be an error further up in your listing. In tracking down dependencies working on the RPM adaptation of the script, I sometimes had to page up a couple of times to get to the core errors. But, I'm also not running Ubuntu, so it's hard for me to say.
[Android Software/Hacking General [Developers Only]] mhwarfield:
This isn't your problem and doesn't impact Ubuntu 10.04 like you're running but I just stumbled across a warning in another forum for a similar package warning about library changes in Ubuntu 11.04 and 11.10 and higher...

Those show up in this package as well.
[Android Software/Hacking General [Developers Only]] p2pjack:
I get the same error on Ubuntu 12.04 32bit I did read somewhere that you need min of 2gb of ram to compile cm I only have 1gb at the mo have ordered some more ram could this be the same for you?

Edit I use Ubuntu 11.10 on my notebook with 2gb of ram and it builds a kang with no problems the only difference between the two is the ram I hope this helps
[Android Software/Hacking General [Developers Only]] mhwarfield:
Note my previous post on libraries. On Ubuntu 12.04 I would expect you to have other problems.
[Android Software/Hacking General [Developers Only]] p2pjack:
when i installed ubuntu 11.10 64bit on the same machine i had the same problem so then i put 12.04 from fresh 32bit so adb would work from the off but still had the same problem a bit of searching later i found these two links that make me think that problem is not enough ram

http://e2e.ti.com/support/embedded/android/f/509/t/133370.aspx

http://taiwan-ian.blogspot.com/2010/02/build-android-platform-with.html

I hope you see what i mean you have been a great help to me getting this script to run on my notebook and i respect your insight the ram is the only thing i could see that is different between my notebook and the desktop
[Android Software/Hacking General [Developers Only]] mhwarfield:
Hmmm... 'Nuther problem. If you're like me and always tinkering you can set it up to break just but running a manual build. Then you've got multiple .zip and .md5sum files in the target directory and the copies hurl chunks trying to copy them over to the Desktop/Builds directory. That needs a significant cleanup to those two copy commands in build.sh (in addition to fixing the lack of "/bin/bash -" on the first line). That's being caused by the wildcard copies on lines 75 and 76 of that script.

I also noticed that the build resulting from the douchbuild.sh script has a slighly different naming convention than the build.sh script. :-P
[Android Software/Hacking General [Developers Only]] mhwarfield:
The builds are very memory intensive. No arguement what so ever. You may be entirely correct. But I am running builds on a 1G RAM Dell Optiplex GX620 running Fedora 16 in once case. They do seem a little slower than my F15 box on a similar GX620 that's sport 4G. What can I say. Do you have any swap configured (I have an additional 2G of swap on the F16 box).
[Android Software/Hacking General [Developers Only]] p2pjack:
I set up a swap file of 1gb and it builds the kang with no problems . It is slower then my notebook but that would due to the swap on the same harddrive has ubuntu should get the extra memory tomorrow and take the swap off and give my notebook a rest :)
[Android Software/Hacking General [Developers Only]] MA700C:
That was it. I'm building inside of a Ubuntu VM image running on a Win7 64bit host. I had only allotted 1GB of RAM for this VM. I went back and moved it up to 2.5 GB and now it built to completion. Thanks for the pointer.

My freshly built ROM crashes and burns when I try to load it on a Nexus S, but that's a different issue.

Thanks again for the pointer.
[Android Software/Hacking General [Developers Only]] TheKiD075:
PM sent...yes please.

Have the udev for GT-P7510 Wifi model
[Android Software/Hacking General [Developers Only]] churd83:
I know this sounds noobish but how do i accept the java license agreement within terminal?

Win7 64 running Ubuntu 11.10 32 in VMware

*Solved*
[Android Software/Hacking General [Developers Only]] shion00:
is there any windows version of this yet
[Android Software/Hacking General [Developers Only]] nicandris:
nop... and i don't think that's possible to be made. install a virtualbox/vmware ubuntu system
[Android Software/Hacking General [Developers Only]] mygame:
oh,nice work

thanks
[Android Software/Hacking General [Developers Only]] fatduke720:
I have an issue that I hope someone can help me with. The first time I run this I get a perfect rom. Every subsequant time it completes fine. But the when I boot the ROM it is twitchy and I get no service. Basically it is broken. The only way I have found to get it to work is reinstall Ubuntu and this script and than I get a fresh new rom that works. Is anyone else having this issue? Can anyone help me?
[Android Software/Hacking General [Developers Only]] mcturk:
Wow new rom, good job man
[Android Software/Hacking General [Developers Only]] Reptilez_DK:
Look back a couple of pages. You need to add a line at the top of the "build-script" (#!bash-something-I-don't-remember) I'm still pretty new to linux. :)

These typos was sent from my Nexus S [i9023]using xda premium

Edit: I just re-read your question, and I may have misunderstood it. :)
[Android Software/Hacking General [Developers Only]] Stranyer:
This is awesome! I'll definitely look into it :D
[Android Software/Hacking General [Developers Only]] cgollner:
Thank you for making this! It is really useful! :D

Keep up the good job!
[Android Software/Hacking General [Developers Only]] come at me bro:
can i try to use this with the htc vivid/hoilday??
[Android Software/Hacking General [Developers Only]] DarthJonathan:
Help guys!!!! Im getting this errorr pleasee help!!!

"error: RPC failed; result=18, HTTP code = 200| 17 KiB/s

fatal: The remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

warning: http unexpectedly said: '0000'"

Please Help Thx In advance
[Android Software/Hacking General [Developers Only]] hiqasim:
awesome step by step guide. thanks for sharing
[Android Software/Hacking General [Developers Only]] Ron G:
can i use this on lg optimus one or me and gt540?
[Android Software/Hacking General [Developers Only]] ORiZorrie:
I have adapted the script for ICS (-b ics), but I'm stuck when the device needs to be selected.

I'm trying to make a CM9 rom for Samsung Galaxy Tab 10.1v, but obviously my device is not listed. I there's a 'device/samsung/p4-common' in CM9, but that's prolly not the correct one is it?

Could anyone provide me a pointer on where to go from here?
[Android Software/Hacking General [Developers Only]] nicandris:
well i have to add the device to the devices list, but i am not sure if they support the Galaxy Tab 10.1

will check it for you later tonight
[Android Software/Hacking General [Developers Only]] ORiZorrie:
Thanks a lot mate. That would be awesome.

Well, there is an ICS ROM for the Samsung Galaxy Tab 10.1v here: http://xdaforums.com/showthread.php?t=1465689

So it's definitely possible, but how I get there is still a mystery. I have tried several times already to build a ROM, but this time I'd like to push through.
[Android Software/Hacking General [Developers Only]] TheKiD075:
The CM9 device name for the Galaxy Tab 10.1 Wifi Only is p4wifi. It is listed on their got hub page, and it does build, as I am using a version that I cooked up.
[Android Software/Hacking General [Developers Only]] ORiZorrie:
Hmm, I think I should take a better look here instead: https://github.com/AOKP/device_samsung_p4
[Android Software/Hacking General [Developers Only]] nicandris:
well @ORiZorrie asked for the Galaxy Tab 10.1v

p4wifi translates to P7510 which is not the "v" model

digging through the p4common repo to see if i can find smthing abt v

i'm afraid not... i dunno though if its compatible with other builds. someone from teamdouche or a rom dev should answer this
[Android Software/Hacking General [Developers Only]] Ron G:
@op plz add low end lg device like optimus one or optimus me or optimus gt540.
[Android Software/Hacking General [Developers Only]] w4kk0-pro:
Is there anyway to get this to work with FreeXperia?
[Android Software/Hacking General [Developers Only]] fromnowon:
I just have a look.In fact it is too hard for me.Debug is always annoying......:D
[Android Software/Hacking General [Developers Only]] Reptilez_DK:
This is only for officially supported devices. At least as far as I know. :)

These typos was sent from my Nexus S [i9023] using xda premium
[Android Software/Hacking General [Developers Only]] Ron G:
but lg optimus have official support from cm7 so OP CAN ADD LG OPTIMUS ONE
[Android Software/Hacking General [Developers Only]] Reptilez_DK:
Don't get me wrong. :)

I would LOVE if the gt540 (aka optimus swift) was supported, but I think this project is at a stand-still, because of CM9. ;)

Anyways - You could also check out dsixda 's kitchen. ;) Depending on your skills and willingness to learn. ;)

Best of luck. :D
[Android Software/Hacking General [Developers Only]] exiquio:
1000+ line shell script? Wow!

Thanks for writing this. While I am not on a supported platform (using Arch Linux) I am glad for this code as it can teach me how to properly build from source.

Thanks again.
[Android Software/Hacking General [Developers Only]] Ron G:
dsixda 's kitchen it's kids play for me i already created roms from kitchen. but now i stoped themed roms and ported roms now i'm working on compiled from source rom. i'm working on omgb rom and oxygen rom for lg optimus me. :)
[Android Software/Hacking General [Developers Only]] Reptilez_DK:
Hell yeah !!! :p

These typos was sent from my Nexus S [i9023] using xda premium
[Android Software/Hacking General [Developers Only]] cowsquad:
:eek: