yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] Know-Fear:
Thanks. I will give that a try. I didn't think the phone needed to be connected, but at the time I was trying to pull the extract-files.sh from CM7. It worked ok that one time, then afterwards, started crashing out again.

EDIT: I tried your script out, changing all of your information to match mine. It worked perfectly! Thanks a ton.
[Android Software/Hacking General [Developers Only]] nicandris:
@Know-Fear use

sudo adb devices
[Android Software/Hacking General [Developers Only]] Know-Fear:
It just does the same.

kenny@desktop:~$ sudo adb devices
List of devices attached
device

kenny@desktop:~$

Like I said, it still works, just a bit strange.
[Android Software/Hacking General [Developers Only]] crachel:
probably need to start the ADB server with sudo..

adb kill-server
sudo adb start-server

if the first command fails, try killing with sudo.

adb is probably added to your path but not root's, so you might have to do

sudo /path/to/adb start-server

after success of starting ADB server with sudo, no need for

sudo adb devices

adb devices

will work fine
[Android Software/Hacking General [Developers Only]] nicandris:
ok guys. here is an Alpha of v2. (posting now on first post) please test it, expect it to be full of bugs :P and report here!!
[Android Software/Hacking General [Developers Only]] Know-Fear:
Running it now. I just set up dual boot on my laptop again so I needed a build environment anyhow.
[Android Software/Hacking General [Developers Only]] Know-Fear:
Shortly after it asked about the android sdk/adb, it seems to have stalled. Been sitting this way for about 5 minutes.

android-sdk-linux_x86/tools/mksdcard
android-sdk-linux_x86/tools/traceview
mv: `android-sdk_r10-linux_x86.tgz' and `/home/kenny/android-sdk_r10-linux_x86.tgz' are the same file
nohup: ignoring input and appending output to `nohup.out'
[Android Software/Hacking General [Developers Only]] Amethystx:
Thank for this great tutorial
[Android Software/Hacking General [Developers Only]] nicandris:
It's not stalled. It's updating sdk and adb with nohup in the background. Maybe i should remove nohup or better add a msg that will tell u that this is gonna take some time
[Android Software/Hacking General [Developers Only]] fordthunder:
first off , thanks for making this script and making it so easy !

second , i have one small problem ..

all installed ok , but my adb is in a different location ( i had adb setup before this ) so how do i tell it where adb can be found ?
[Android Software/Hacking General [Developers Only]] nicandris:
which adb

try this one
[Android Software/Hacking General [Developers Only]] manup456:
Hmm I wonder if this can be done on mac I have source setup on my mac and I know the commands are close.

Does anyone know what would need to be done to get this done on mac?
[Android Software/Hacking General [Developers Only]] nicandris:
well the commands are here http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Passion_(Mac)

but sorry i haven't got experience with macs before
[Android Software/Hacking General [Developers Only]] mikedj84:
great work!
[Android Software/Hacking General [Developers Only]] brswattt:
question, after I connect my phone....it says it can't find extract-files.sh or /home/dylan/system/device/htc/liberty. Help?
[Android Software/Hacking General [Developers Only]] nicandris:
well the script is not in there. did you change anything? the script is in ~/

android

/system/device/htc/liberty
[Android Software/Hacking General [Developers Only]] Vandam500:
This looks awesome! Quick question though, I want to start making my own ROMs and definitely want to use CM7 as the base. Would I build from this and then modify/add stuff to it or would I have to modify/add then build?
[Android Software/Hacking General [Developers Only]] nicandris:
both ways work, depends on the hacks/kangs you want to perform. i aint an expert on that, probably you should ask a rom dev
[Android Software/Hacking General [Developers Only]] Vandam500:
Yeah thats what I was thinking! Thanks :D
[Android Software/Hacking General [Developers Only]] ephumuris:
Thanks for the script. Worked great for me. Once it's done how easy is it to just build a kernel for a certain device?
[Android Software/Hacking General [Developers Only]] diego.stamigni:
Hei man, please put this script on Github and improve it to choise also to compile a kernel :D
[Android Software/Hacking General [Developers Only]] nicandris:
will look into this as soon as i get some proper sleep. really tired this days and work is killing me
[Android Software/Hacking General [Developers Only]] nicandris:
Added the script in GitHub!! feel free to mess it up and upgrade it!

https://github.com/nicandris/CM-from-scratch
[Android Software/Hacking General [Developers Only]] chosen1920:
every time i try to run androidmakev2.sh it starts out ok and i get to the part where it asks for my information but the i get this: nohup: ignoring input and appending output to `nohup.out'

And it just freezes at that....Any ideas?
[Android Software/Hacking General [Developers Only]] nicandris:
as i said before. its not freezing. its updating in the background
[Android Software/Hacking General [Developers Only]] chosen1920:
How long should it take? I let it sit for a solid 25 mins and nothing happened...
[Android Software/Hacking General [Developers Only]] squeakz:
I believe at this step it is writting all output to the file "android/system/nohup.out"

If you want to follow what it is doing, you can open another terminal and run the command (without quotes) "tail -f android/system/nohup.out"

This will show you updates as it runs. When it finishes, you can just do a CTRL+C to exit the command.
[Android Software/Hacking General [Developers Only]] nicandris:
thanx for that ;)

i removed the nohup commands in github. i will reupload as soon as i get home
[Android Software/Hacking General [Developers Only]] fede DREAM ITA:
any ideas?
[Android Software/Hacking General [Developers Only]] ilos:
that come from the repo
[Android Software/Hacking General [Developers Only]] nicandris:
indeed that is a problem from the repo. probably you synced when a merge was happening. just sync again in a while and it will be fine
[Android Software/Hacking General [Developers Only]] TheKiD075:
Ok... I have followed the instructions posted on the Cyanogen site. I followed all the instructions here and I am still having trouble. The errors I get from this are as follows...

build/target/product/sdk.mk:181: external/svox/pico/lang/PicoLangDeDeInSystem.mk: No such file or directory
build/target/product/sdk.mk:182: external/svox/pico/lang/PicoLangEnGBInSystem.mk: No such file or directory
build/target/product/sdk.mk:183: external/svox/pico/lang/PicoLangEnUsInSystem.mk: No such file or directory
build/target/product/sdk.mk:184: external/svox/pico/lang/PicoLangEsEsInSystem.mk: No such file or directory
build/target/product/sdk.mk:185: external/svox/pico/lang/PicoLangFrFrInSystem.mk: No such file or directory
build/target/product/sdk.mk:186: external/svox/pico/lang/PicoLangItItInSystem.mk: No such file or directory
build/target/product/sdk.mk:181: external/svox/pico/lang/PicoLangDeDeInSystem.mk: No such file or directory
build/target/product/sdk.mk:182: external/svox/pico/lang/PicoLangEnGBInSystem.mk: No such file or directory
build/target/product/sdk.mk:183: external/svox/pico/lang/PicoLangEnUsInSystem.mk: No such file or directory
build/target/product/sdk.mk:184: external/svox/pico/lang/PicoLangEsEsInSystem.mk: No such file or directory
build/target/product/sdk.mk:185: external/svox/pico/lang/PicoLangFrFrInSystem.mk: No such file or directory
build/target/product/sdk.mk:186: external/svox/pico/lang/PicoLangItItInSystem.mk: No such file or directory
build/core/product_config.mk:203: *** No matches for product "cyanogen_inc". Stop.

** Don't have a product spec for: 'cyanogen_inc'
** Do you have the right repo manifest?

No such item in brunch menu. Try 'breakfast'
mkdir: cannot create directory `/home/jason/Desktop/Builds': File exists
cp: cannot stat `/home/jason/android/system/out/target/product/inc/update*.zip': No such file or directory
cp: cannot stat `/home/jason/android/system/out/target/product/inc/update*.md5sum': No such file or directory
./androidmakev2.sh: line 472: syntax error near unexpected token `fi'
./androidmakev2.sh: line 472: `fi'
jason@jason-laptop:~$

When I try to repo sync outside of using this script, I get several errors, and cannot seem to get find any solution via google. Now I get this when use this script.

Any help is greatly appreciated.
[Android Software/Hacking General [Developers Only]] nicandris:
well it seems that something is missing there. lets try it from the beginning. delete the ~/android folder and ~/bin and then try the script again. make sure when it asks for sudo pass that you give the proper pass
[Android Software/Hacking General [Developers Only]] crachel:
It looks to me like youre trying to build for the incredible, is this intentional?
[Android Software/Hacking General [Developers Only]] nicandris:
well even if its for the incredible it should be fine... all the script lines are there

can you try building it manually? http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Incredible

delete the folders there and start from Create the Directories
[Android Software/Hacking General [Developers Only]] TheKiD075:
And to answer your question, yes I want to build for the Incredible. I know this was originally for the N1 but the scripts are the same and it looks like it would work, except my repo sync isn't right, so the files aren't there....
[Android Software/Hacking General [Developers Only]] nicandris:
incredible builds fine. it seems that you cannot access github.com for some reason. are you behind a proxy?

fatal: Unable to look up github.com (port 9418) (Name or service not known)
[Android Software/Hacking General [Developers Only]] crachel:
Not sure, but I just tried 207.97.227.239 in my browser and it pointed to jobs.github.com

That seemed weird, so I whois'd Github.com and got the same IP.. even weirder, so I tried 207.97.227.239 in my browser again and this time got Github.com so unless youre firewalled/proxy its prob a problem with DNS on Github's end

I got it to resolve wrong again (see attachment)
[Android Software/Hacking General [Developers Only]] TheKiD075:
No, no proxy. just my routers and cable modem. So if its on their end theres nothing i can do??
[Android Software/Hacking General [Developers Only]] TheKiD075:
nicandris would there be a way to have the script stop or put up a message if the repo failed? I like the nohup, and I guess you could mirror with another terminal, but then at least you'd know if there were going to be errors before you attempt to build. And I have noticed that once you plug your phone in, and it is recognized and it successfully extracts the files. When you tell it that extraction worked, it extracts again.
[Android Software/Hacking General [Developers Only]] nicandris:
i already updated the script to 2.0.1 removed the nohups. will put pauses after repo sync problems later tonight
[Android Software/Hacking General [Developers Only]] TheKiD075:
Thanks. I appreciate all the help. If this is a DNS issue on their end am I basically out of luck? Is there any way to fix this?
[Android Software/Hacking General [Developers Only]] nicandris:
if its just a DNS issue then manually enter ur DNSs to 4.4.4.4 and 8.8.8.8 (that's google's)
[Android Software/Hacking General [Developers Only]] TheKiD075:
Unfortunately it wasn't a DNS issue on my end. I did as you said, and changed mine. However I still error out somewhere around 20% 47/232 and then it comes back at the end. Is there any easy way to fix this (ie reinstall a different version of Ubuntu or Linux). Is there a way to port forward with Linux and terminal? While I am syncing give my Linux box direct access to the web? Any ideas?
[Android Software/Hacking General [Developers Only]] TheKiD075:
Update: I made it through an entire build... I haven't flashed it yet... but it built. I have no idea what changed or allowed it to repo sync, but it did build. I am getting an error that I will post below. I think it comes when the built files are being moved into the Builds folder. Thank you so much for your time and help. And thank you so much for this script. It makes this so easy and fun. I am learning a lot and this has helped make it easy to focus on the finer points. THANK YOU!

mkdir: cannot create directory `/home/jason/Desktop/Builds': File exists
./androidmakev2.sh: line 472: syntax error near unexpected token `fi'
./androidmakev2.sh: line 472: `fi'
[Android Software/Hacking General [Developers Only]] nicandris:
that error is nothing. fixed in 2.0.1 actually
[Android Software/Hacking General [Developers Only]] fubaya:
This might help avoid having to update the script when the sdk version changes. It just dumps all the links on the download page and extracts the only "http*tgz" link. Of course, it only works now, they might change the page in the future and I have no idea if lynx is included in ubuntu.

lynx -dump -listonly http://developer.android.com/sdk/index.html | grep -o http.*tgz
[Android Software/Hacking General [Developers Only]] nicandris:
i think i used lynx before. i will search for an alternative method if possible (so it can be always used) or i will add this on the next release. thanx for the heads up
[Android Software/Hacking General [Developers Only]] fubaya:
Now that I think about it, wget might be better.

wget -q -O - "http://developer.android.com/sdk/index.html" | grep -o "http.*tgz" | sed 's/\".//g'
[Android Software/Hacking General [Developers Only]] ch33kybutt:
An additional step to optimize CM for N1 is to modify android/system/build/core/combo/TARGET_linux-arm.mk

from

TARGET_ARCH_VARIANT := armv5te

to

TARGET_ARCH_VARIANT := armv7-a-neon
[Android Software/Hacking General [Developers Only]] nicandris:
oh and guys once every while (or when an update is available for RomManager) use this command

~/android/system/vendor/cyanogen/get-rommanager
[Android Software/Hacking General [Developers Only]] nicandris:
Added HD2/Leo support
[Android Software/Hacking General [Developers Only]] Jonathon Grigg:
Works brilliantly for me on a VBox of Ubuntu 10.10, great time saver instead of manually installing everything too! Saved me a lot of time and effort there, looking forward to when my download of the source finishes :D
[Android Software/Hacking General [Developers Only]] sunngoc:
It's really easy,thanks!
[Android Software/Hacking General [Developers Only]] harmohn:
Just a quick question; how long on average would you say it takes to compile on something like an old pentium 4 512mb setup? Just curious.

Cheers :)
[Android Software/Hacking General [Developers Only]] nicandris:
A LOT! :P cant actually calculate that, but it may even stop the process for low memory
[Android Software/Hacking General [Developers Only]] harmohn:
Pmsl ;D ...that's what I thought hehe.

Thanks for the reply mate. I'll have to try your awesome script under VM on my i7 in that case ;)
[Android Software/Hacking General [Developers Only]] tonno16:
i've got a notebook, and i finished with 1 hours (but it doesn't work)

i've got an aer liquid metal with adreno 205 and snapdragon 800 mhz the same of g2.

can i use this script???? th script i read in italian forum is the union of this code:

I've got problem typing ./extract-files

terminal says that file is missinf directory is missing ...

i run the command also by admin typin sudo -s or sudo chmod..... but I 've got the same problem

in fact after 1 hours of 86 celsius of my computer , the process in terminal finished bad

sorry for my english
[Android Software/Hacking General [Developers Only]] nicandris:
@tonno16 well you shouldnt build there. All compiling processes take a lot recources to compile. Try it on a faster pc
[Android Software/Hacking General [Developers Only]] tonno16:
my problem isn't the cpu, i'm sorry but a quad core i 7 costs a lot of money.

my notebook is one of the bets, 2 ghz processor.

toaday at the second time i choose cyanogen_generic.mk

the compiling process take a lot of time about 1,5 hours but time time it measn finish well, in fact terminal say a list of output file

the only problem there is. THe compiling create the follow windows:

data

obj

root

symbols

system

utilities

ramdisk.img

system.img

boot.img is missing and also meta-inf

so i take a metalhouney rom (for acer liqud metal) and prelevated the file boot.img copied togheter with windows of list I wrote.

i flashed the file by recovery (zip) and it work, recovery don't say aborted.

but when i chose reboot system now, after android image, the phone return ath the recovery.
[Android Software/Hacking General [Developers Only]] nicandris:
oh sorry about that. i missed some parts of your question. so you mean in that italian forum they are making acer liquid roms with the nexusone repo? you have to have the proprietary files (./extract-files). flash a cm rom for liquid (is there any?) and try the extract files command again
[Android Software/Hacking General [Developers Only]] tonno16:
i follow a guide calles "compile the cm7 for your device"

for example if you have an htc you have to ude the word "passion", if you have the magic you have to use "dream_sapphire"

in my liquid metal is passion (reading build.prop)

SO? i already downloaded the source of android
[Android Software/Hacking General [Developers Only]] nicandris:
give me the link to the forum
[Android Software/Hacking General [Developers Only]] tonno16:
Hello thank you for help me. The link is that.

I send you a private message because i have no permission to post link in the forum
[Android Software/Hacking General [Developers Only]] sabag123:
thank.......
[Android Software/Hacking General [Developers Only]] o_0YaphetS:
Nice ;D rly nice
[Android Software/Hacking General [Developers Only]] srkmagnus:
I have a very stupid question that I want to ask. What would be the benefit of building from the Cyanogen Source versus downloading and flashing the ROM?

I ask this not to criticize, but for informational purposes to better understand the workings of Android Development. I've been wanting to learn more about Android Development and little by little have been reading up on the subject.
[Android Software/Hacking General [Developers Only]] crachel:
building from source gives you the ability to have a ROM anytime new code has been committed. its also easy to add stuff that hasn't been merged yet (or that isnt going to be merged at all). you could also load the code up in an IDE and fiddle around
[Android Software/Hacking General [Developers Only]] nicandris:
Glad to see the script helping. I need ideas or requests to add something new/necessary to this :)
[Android Software/Hacking General [Developers Only]] Jonathon Grigg:
Have an option to install only certain platforms when installing the sdk if possible? I used up more quota than I wanted to with that part :/ on the same token, maybe allow you to 'pause' the script after installing the required components before downloading the source? That would be helpful.

Nice script though, very helpful for complete new builds!

Sent from my Google Nexus S
[Android Software/Hacking General [Developers Only]] foreveralone:
Thanks for the great tutorial!
[Android Software/Hacking General [Developers Only]] spc_hicks09:
Anything out like this for Motorola Droids ?
[Android Software/Hacking General [Developers Only]] bustadroid:
Thanks for the thread, a lot of help!
[Android Software/Hacking General [Developers Only]] pantisflorin:
thanks for this, i will start goin' on with it ! thanks alot
[Android Software/Hacking General [Developers Only]] Syndacate:
Arg, strike that, my mistake :(
[Android Software/Hacking General [Developers Only]] CheesyNutz:
Sorry if this has been asked before but is there a way to have it ONLY compile for the EVO 4g ?
[Android Software/Hacking General [Developers Only]] TheKiD075:
Yes, just choose Evo 4g while you are going through the process and that is what builds. It doesn't build for anything but what you choose.
[Android Software/Hacking General [Developers Only]] ephumuris:
When the script does repo sync i see it pulling stuff for all devices...can i remove them so it only pulls stuff for the ZTE Blade?
[Android Software/Hacking General [Developers Only]] nicandris:
well i searched a bit abt that. dunno the answer :P if you find anything please share. even if you delete though other directories, when you repo sync everything will be downloaded again
[Android Software/Hacking General [Developers Only]] ch33kybutt:
You'll have to edit .repo/manifests/default.xml and remove the entries for devices you don't want. It may be necessary to repo init the entire repository again, but I'm not sure. Possible to probably just remove the unwanted devices, modify default.xml and repo sync, then see if folders get recreated. I haven't tried, so do try and let us know.
[Android Software/Hacking General [Developers Only]] ephumuris:
It looks like that has done the job. Much quicker now and i don't see any messages about it pulling in stuff for other devices. :)

EDIT:

Scratch that the devices folder still gets filled up!
[Android Software/Hacking General [Developers Only]] ch33kybutt:
You'll actually need to edit android/default.xml and copy your modified file to .repo/manifests/default.xml. Next repo sync, you should see less projects. Mine is now down to 198 from 234.

WARNING:

If CM team does make any changes to upstream manifest (add or remove new/obsolete projects), these changes will not be synced to your machine, since default.xml has been modified. To force re-sync with upstream manifest, you'll have to do this ...

$ cd android

$ git reset --hard

$ cd ..

$ cp android/default.xml .repo/manifests/default.xml

$ repo sync

In fact, to discard ALL changes you've made to ALL projects/repositories, do this ...

$ repo forall -c git reset --hard

$ repo sync
[Android Software/Hacking General [Developers Only]] punshkin:
has someone tried building and flashing it for the Dream/G1? I´d love to know if or how it worked.

btw does this run on a macbook?
[Android Software/Hacking General [Developers Only]] nicandris:
compiling now! is seems to be fine, i will upload the build later and you can test it. if it's fine on your phone, then it's working :P

someone with dream/magic can try this? http://dl.dropbox.com/u/6751304/androidmakev2.0.3-dream-magic-fix.zip
[Android Software/Hacking General [Developers Only]] punshkin:
thank you!

cant wait, even though i bet its gonna be slow as hell...

nevertheless: nandroid backing up right now :P
[Android Software/Hacking General [Developers Only]] nicandris:
emmmmm :P cannot build :P i forgot i need the proprietary files... someone with a Dream/Magic will have to step in here and help :P
[Android Software/Hacking General [Developers Only]] Treken:
Was the above extraction successfull (n/y)?

n

sudo: adb: command not found

sudo: adb: command not found

./androidmake.sh: line 456: cd: /home/treken/android/system/device/Commtiva/z71/: No such file or directory

./androidmake.sh: line 457: ./extract-files.sh: No such file or directory

ideas?