yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] DROCSID:
Other question; looked a bit on google but couldn't find very useful information.

My primary laptop at home is Linux Mint. Now my work/school laptop has Windows 8.

In Windows 8 there is an option to use Hyper-V. What is the best option to mount my

USB device (I9000)?

Tried on VMWare Workstation 8 but it's difficult to get the USB working (now getting

version 9). And Virtual box is full of **** imho. Tried several times but I cannot do a

dualboot, just need a virtual Linux distro to build on.

Can Hyper-V work? Did someone try this?

Now I have to wait until I get home, and nowadays it's almost NEVER, so I have

no time to spend the proper time of trying :victory:.
[Galaxy S I9000 Android Development] stbenz:
I'm not really sure about what you want to accomplish. Do you want to have a Linux VM inside your Windows 8 in which you can access your phone through USB?

I just tried to connect my phone to my work pc (Windows 7 with Ubuntu VM in VMware Player) and I was able to acces my phone from the Ubuntu VM. So if this doesn't work for you, either your VM isn't properly configured or it is a problem between Windows 8 and VMware Workstation 8.

I never used Hyper-V, but it seems to me, its made primarily for Server-Virtualization. The Wikipedia page for Hyper-V (http://en.wikipedia.org/wiki/Hyper-V) also indicates, that USB passthrough is only possible with workarounds.
[Galaxy S I9000 Android Development] DROCSID:
Yes, just want to mount my USB inside my Linux distro.

I know that it works with Windows 7, but on Windows 7 I had an old version

of VMWare workstation which doesn't work now, so I tried version 8. Installed

a new one AND had an old .vhd.

As for Hyper-V; one of the best advantages of Windows 8 is the possibility to

use Hyper-V, just as a administrative tool. Just enabled it, but can't try because

I'm now busy on trying it with VMWare 9. You can only install 1 component, so

not VMWare and Hyper-V. So I'll try version 9 and if not I'll give Hyper-V a try.

:good:
[Galaxy S I9000 Android Development] Nick0703:
Hey are you guys getting problems with Superuser? Like on mine, Superuser is not remembering the option and it keeps on FCs. I tried to compile another nightly yesterday and it seems that the FCs bug is gone but it's still not remembering the option that I selected (Deny, Allow).
[Galaxy S I9000 Android Development] kasper_h:
Known issue, I reverted the change and now use the prebuilt SuperUser.apk again.
[Galaxy S I9000 Android Development] fishears:
Thanks kasper - that su thing has been driving me mad. I thought it was something I'd done :eek:
[Galaxy S I9000 Android Development] Nick0703:
Yeah for now I'm using SuperSu. I'll go back to Superuser when the problem is fix.
[Galaxy S I9000 Android Development] fishears:
I just built and its fixed. They were looking into it last night and I guess they sorted it in the Superuser repo.
[Galaxy S I9000 Android Development] kasper_h:
Great, already read some things on gerrit about su solutions...
[Galaxy S I9000 Android Development] rubervalrfl:
OUT

Guys, need to change the OUT because the system drive filled, I'll switch to another HD I have in my machine, but am not finding how and where to set the OUT, ​​someone has an idea how to do?

export OUT_DIR = /media/DADOS/cm10

but it did not work.
[Galaxy S I9000 Android Development] fishears:
Its declared in /build/core/envsetup.mk, from line 157

You could hard-code it in there...
[Galaxy S I9000 Android Development] rubervalrfl:
Thanks I'll try.

---------- Post added at 10:28 AM ---------- Previous post was at 10:18 AM ----------

Did, but follows:

I edited the. bashrc and put the following: export OUT_DIR = / media/DADOS/out_cm10

Thank you all.
[Galaxy S I9000 Android Development] Nick0703:
I've saw that CyanogenMod is bringing back the /datadata partition. Can someone confirm this?

http://review.cyanogenmod.com/#/c/23778/
[Galaxy S I9000 Android Development] pmos69:
It's under review.

Pawitp put out a test build and asked everybody to install it and report back the results.
[Galaxy S I9000 Android Development] giantroxx:
Great Guide, i successfully compiled cm10 :)

Thank you!
[Galaxy S I9000 Android Development] kasper_h:
Anyone already tried moving /system to emmc? I saw pawitp mentioning it in the nightly topic and I would like to start experimenting with it...
[Galaxy S I9000 Android Development] pmos69:
Not yet.

Might as well for the lvm commit...
[Galaxy S I9000 Android Development] kasper_h:
I would for sure do it on top of the lvm approach...

First need to get a faster external sd card :)

Verstuurd van mijn GT-I9000
[Galaxy S I9000 Android Development] fishears:
Guys. Can I move system dalvik on to my data partition (with the right perms/ownership of course)? Can data dalvik and system dalvik occupy the same space? I want to make my /system bigger but if I squeeze my cache it won't hold system dalvik....

I'm talking OLD partitions here - /system & /cache on OneNand, /data on iNand etc
[Galaxy S I9000 Android Development] pmos69:
Probably.

I mean, on the cm10 lvm layout under testing, the /cache has been shrunk to 18MB and is basicaly unused (I think it's used only in recovery)
[Galaxy S I9000 Android Development] fishears:
Thanks for that. Very clear diagram. I think system dalvik will be mounted on /system though...
[Galaxy S I9000 Android Development] pmos69:
This might also interest you:

http://review.cyanogenmod.com/#/c/23957/
[Galaxy S I9000 Android Development] lenbok:
Thanks guys, I was able to use the instructions in the OP to create my own build of CM10 from scratch! This thread really helps reduce the barrier to entry for getting people into CM development.

One question though - I flashed the zip (cm-10-20120928-UNOFFICIAL-galaxysmtd.zip) to my phone (running cm-10-20120926-NIGHTLY-galaxysmtd.zip, so same partition layout etc) and although it installed and booted fine, it seems to have done a wipe - apps etc are gone. I would have expected it to behave like flashing a normal nightly and not have wiped. Is that expected?
[Galaxy S I9000 Android Development] pmos69:
No, it's not.

Shouldn't wipe anything if it already has the same partitioning.
[Galaxy S I9000 Android Development] samoled:
WooHoo!!! Look what I found!!! :)

Ok, so inbetween working, getting the girls to dance class, getting the girls to softball, remodeling the bathroom from top to bottom, and working some more, I've been trying to work out how to pull files from an extracted nightly. Everyone here seems to make it sound easy, but I haven't been able to make it work. I've tried putting the extracted nightly everywhere under the sun, and trying to make sure my source listed in the extract-files shell script is correct, but i'm missing something. I've been trying to research this as much as possible, and I found this on github today- I'm SUPER EXCITED!!! I just need to know how to set up my source correctly, and to make sure i'm putting the extracted nightly in the right directory. Anyway, check this out, I found it at the following link:

https://github.com/Senseg/android_device_nvidia_betelgeuse/blob/master/copy-files.sh

#!/bin/bash

# This script is designed to dynamically read from the extract-files.sh
# script and pull needed proprietary blobs from an extracted device
# system location instead of the device itself.
# The Source location passed should contain the /system/ folder
# for the specific device

if [ $# -lt 1 ]
then
echo "Usage:" $0 "<Source>"
exit
fi

SOURCE=${1//'/'/'\/'}

echo "Creating copy script from extract-files.sh..."
sed s/"adb pull "/"cp -a $SOURCE"/g <extract-files.sh >copy-files_TEMP.sh

echo "Making script executable..."
chmod 755 copy-files_TEMP.sh

echo "Executing script..."
./copy-files_TEMP.sh

echo "Removing script..."
rm -f copy-files_TEMP.sh

echo "Done."
echo ""

Now I just need to figure out where to put the extracted nightly and how to make sure it's referenced properly in the shell script...
[Galaxy S I9000 Android Development] fishears:
Isn't this because the build is UNOFFICIAL and the existing is NIGHTLY?
[Galaxy S I9000 Android Development] driodmaster92:
I am trying to download some packages via terminal but the download speed is very low almost 50 times less of the actual.

Running a Ubuntu 12.04 on VMware with 3gb RAM and 3 cores.

My question is that the low speed is normal /depends on the packages or because of me using a virtual machine?
[Galaxy S I9000 Android Development] pmos69:
I'd say it depends mostly on server load at the time.

Sometimes it's quite low, yes.

I guess some more donations to the CM project would help...
[Galaxy S I9000 Android Development] driodmaster92:
Thanks for the reply ,one more thing ,can i pause and later resume the repo sync?
[Galaxy S I9000 Android Development] pmos69:
Yes.

Just kill it. It will resume when you run it again.
[Galaxy S I9000 Android Development] driodmaster92:
Problem in step 3.7 cant find the command android
[Galaxy S I9000 Android Development] kasper_h:
Did you download & unpack the android SDK tools?

Verstuurd van mijn GT-I9000
[Galaxy S I9000 Android Development] driodmaster92:
Yeah I did that
[Galaxy S I9000 Android Development] fishears:
Sounds like your SDK is not in your PATH. Check from step 3.3 and make sure the path you add to PATH in .bashrc is the same as the one where you actually extracted your SDK...

The command "android" should be in the tools subdirectory of the SDK so in particular check this entry in .bashrc -> "export PATH=$PATH:~/android/sdk/tools" to make sure that is where "android" is on your filesystem.
[Galaxy S I9000 Android Development] ygorigor:
When I try to build I get this

make: *** No rule to make target `bacon'. Stop.

I don't know what to do

Please help
[Galaxy S I9000 Android Development] kasper_h:
Can you copy the output of the terminal window? Including the commands you typed.

Verstuurd van mijn GT-I9000
[Galaxy S I9000 Android Development] kasper_h:
That is an odd one..did repo sync finish successfully at least once?
[Galaxy S I9000 Android Development] Nick0703:
Can someone help me? It seems that I'm getting problems compiling a new nightly. I pasted the codes on pastebin. http://pastebin.com/pVF8AbbL
[Galaxy S I9000 Android Development] fishears:
I had the same thing yesterday. I did a "make clean" then compiled again & no problems.
[Galaxy S I9000 Android Development] Nick0703:
Thanks! I'll try that tomorrow, because now it's kinda late and I already turned off my PC. :p

EDIT: Yep! Doing the "make clean" worked! Thanks!!
[Galaxy S I9000 Android Development] kasper_h:
Let's get some life back into this topic :)

I am still building CM10 on my old laptop. It works, but now that I am building for four targets and sometimes do a fully clean building, the 2.5 hour/device building time is getting frustrating (and I already had a emergency shutdown due to cpu-temperature). So I am looking into upgrading my PC to make into my main building machine.

But I was wondering if anyone here knows the main limiting factor in building time, is it CPU, RAM or HD-speed. So, if I need to choose between a faster CPU or an SSD HD, what would be the better investment :)
[Galaxy S I9000 Android Development] fishears:
Have you tried getting access to the goo.im build server?

I haven't but I know they run one & would probably grant it if you asked. They're good guys.

From what I gather about building, ram is very important, then cpu - with more ram you can create a big ram disk to compile in. I assume you already use ccache?
[Galaxy S I9000 Android Development] DROCSID:
Requirements AFAIK:

- Building with large memory area

- SSD for the out directory

- ccache (also on the SSD)

It's a pure win!

Saw you building a lot for the CM10, might be useful to build your own

mini-server with good RAM, SSD etc. Not that hard and better building

than on a laptop. I'm having an AMD so the heating was always a prob

until I bought a primary SSD and more RAM (= less CPU load).

Dunno what version you're using for Ubuntu but when you'd intend to

start building on an own server / desktop which will be online the whole

day keep looking a the memory because the leaking can be problem and

can affect the building process in certain versions.

I don't have a SGS bytheway anymore, so since a few weeks no building

on the SGSI. Bought a SGSIII and now doing a little bit of building on the

SGSIII. Going to buy a HP Proliant Microserver next month, with extra RAM

(8 GB) and a SSD.

Proliants like: http://gathering.tweakers.net/forum/list_messages/1489221

Maybe a nice thing for you too?
[Galaxy S I9000 Android Development] kasper_h:
I made a decision to keep my laptop for my usual light-weight activities and make a separate ubuntu 64bit server for building purposes, thanks RATBORG :)
[Galaxy S I9000 Android Development] fishears:
Good luck with that :D Did you win the lottery? ;)
[Galaxy S I9000 Android Development] DROCSID:
No, I've always insured my SGS (just-in-case) so I got almost the

whole amount of paid money (I never buy phones with a contract)

so only had to pay a little to get a SGSIII ;).

As for that server; it aint that expensive (about 400/500 euro max)

Good luck Kasper! :victory:
[Galaxy S I9000 Android Development] kasper_h:
Good luck to you too!

I just found out that the PC I bought 5 years ago (and that is currently not in use) can be upgraded significantly (4x faster CPU, 16x more RAM than the PC currently has & 1.5x faster CPU, 5x more RAM than my building laptop). So instead of buying a new PC, I'll upgrade the old one (spare parts are cheap).

Verstuurd van mijn GT-I9000
[Galaxy S I9000 Android Development] g4rb4g3:
Thanks for the great guide, it contains everything in one post. Well done :)
[Galaxy S I9000 Android Development] kasper_h:
I just upgraded the CPU & RAM in my PC: 3x faster CPU (based on PassMark rating) and 3x more RAM. Other hardware the same. Building is now 3 times faster :)

I don't think HDD is the limiting factor in building times (as long as it is a reasonably fast HDD). My HDD does not seems to be pushed to the limit during building (slowly blinking HDD light, and not constantly burning) :)
[Galaxy S I9000 Android Development] elitevet:
If you use CCACHE the HDD type does matter. Access times, you know... I use a partition on a RAID0 disk built from two mechanical SATAII disks, but SSD(s) would be even better.

Sent from a CM10 powered SGS
[Galaxy S I9000 Android Development] kasper_h:
Makes sense. I do use ccache. I did notice ccache is used in specific phases of the build process where hd activity is also high. There are quite some differences between different phases of building in hardware use: sometimes RAM is fully used, sometimes CPU. I also installed a better CPU cooler (larger sink with large silent fan). This lowered CPU temperature quite a bit.
[Galaxy S I9000 Android Development] Eddicts:
This..this is all i want,but too bad my my network are giving me a limitation for now,Soon i'll try this!
[Galaxy S I9000 Android Development] aways:
i have one build from this thread and i can say its great.
[Galaxy S I9000 Android Development] wogfella:
ADB Freakout

Great guide - thanks so much. While it's probably not the greatest idea to jump directly into building Android as an "introduction" I've got some experience with Linux and just picked up a new phone (so it's okay it the SGS explodes or causes a second global financial crisis or something :laugh:)

This guide is pretty much fool-proof. I say pretty much because it's gotten this fool to not understand what he's doing!

I've sycned all the repos and performed all the actions up to 4.6.

The problem is connecting my phone (with Debugging set on the device ) to the 12.04 Ubuntu I have running in VirtualBox through Win7 64bit.

Windows can detect my phone, the VirtualBox installation allows me to choose it as a USB device from the selections, and when I type "adb root" into Terminal it connects....for about 4 seconds. Any command after that tells me "device not found", until I unplug and replug the phone back in on USB. On the phone itself I see Cid popup in the statusbar to tell me Debugging is enabled, but he disappears.

My questions are:

1. Is this a problem for anyone else?

2. Is it the VirtualBox setup? and if so...

3. How the hell do I fix it? (Dr Google is no help to me ATM)

I know one other user has had the issue and kasper_h mentioned having a script to pull the required files directly from a CM download rather than the phone, but I can't locate it - kasper_h if you're still around can you point me in the right direction please?

I've also tried the trick of disconnecting and reconnecting in the VB environment (swap the host/guest settings around) but no bingo there either.

In actual fact all I'm trying to do is reconfigure/build the email.apk to remove the Exchange Permissions from it - my work requires device encryption "if available" which makes it painful to install nightlies!!! kasper_h (helpful fellow!) also mentioned using mmm but I must be too dumb to find the thread for it - is it an XDA thread or is it on the CM forums?

I've read (most of) the other forum links provided. Mostly the whooshing sound is a lot of it going over my head - perhaps too advanced for me just now :)

Guys - I know the XDA rules are "if you didn't make it, don't post it in DEV" but I'm pretty sure the Q&A section isn't the right place for these questions and....well, you all seem so helpful!!!

Can anyone help a n00b please?
[Galaxy S I9000 Android Development] kasper_h:
You can forget having a well-behaving adb in VirtualBox (in my experience), VMWare virtual player can do it, albeit with issues.

The easiest thing is to just forget about the adb. Then there are two options:

-pull the files from my repo :)

Add the following to /.repo/local_manifest.xml

<remote fetch="git://github.com/kasperhettinga/" name="mackay" />
<project name="android_vendor_samsung_aries-common" path="vendor/samsung/aries-common" remote="mackay" revision="master" />
<project name="android_vendor_samsung_galaxysmtd" path="vendor/samsung/galaxysmtd" remote="mackay" revision="master" />

Then repo sync, and the files will be pulled into the correct folders.

-pull the files from a local extract cm10.zip

You have to go to the extract-files.sh and open it. I renamed it previously to extract-files-hd.sh to keep the original present. In this files, you have to change:

"adb pull /system"

to

"cp /cm10/system"

Then you need to extract a full cm10 ROM you downloaded from get.cm. Then you rename the folder name from cm10-nightly-xxx to simply cm10. You then copy this cm10 folder to /android/system/device/samsung/galaxysmtd. Then run " ./extract-files-hd.sh"

If you want to build a single package you should do:

. build/envsetup.sh

breakfast galaxysmtd

mmm Exchange

Or in one line

. build/envsetup.sh && breakfast galaxysmtd && mmm Exchange

(when building Exchange, you should also build Email I guess, and I even doubt it will work - or that it requires some framework-stuff as well)
[Galaxy S I9000 Android Development] wogfella:
Legend - thanks for that. Found it very frustrating searching XDA and Google for an answer and it turns out that VirtualBox doesn't like adb :) :)

Going by what other threads have mentioned I'll have to modify both Email and Exchange but from what I can see so far it's only a few lines from each that I need to fix - specifically the ones that enforce the encryption. From there if all goes well I can build my own nightlies from source and keep that pesky email admin out of my phone!!!

I'll have a look tomorrow - right now too many beers and too late at night in Australia to try and do this without making my PC explode !

I'll post my results (when sober)
[Galaxy S I9000 Android Development] wogfella:
Screw it - had another beer and thought "what the heck".

It's building now...I think.

Simple build first - then I'll look at screwing with Exchange etc.
[Galaxy S I9000 Android Development] fishears:
I like your style! Beer has led to many scientific breakthroughs.
[Galaxy S I9000 Android Development] wogfella:
I thought that was radioactivity ?

Hungover like a madman, checked my PC and the sweetest words I could see appear:

Package Complete.

Cheers for the help guys.

FYI kasper_h - I had to pull from your repo as no matter what actions I performed to the extract-files.sh I kept getting a bunch of "device not found" and "could not sart /cm10/such and such file" messages.

Looking at extract-files.sh there are references to run the extract-files.sh under aries-common, and then when that is executed for the galaxysmtd extract-files.sh to "adb pull /radio/modem.bin"

I amended the location to be cp /cm10/modem.bin" and also checked over the other extract-file.sh and amended that.

(before anyone screams in disbelief - 1. Was drunk and thought it was a good idea and 2. must not have been THAT drunk because everything has backups of original files)

All I ended up with were more "could not sart /cm10" messages (had to double check in my drunkedness to ensure it said "sart" and not "start") but no more "device not found".

Once I lost my cool and kicked the neighbours dog I had another beer and came back to the PC I amended local_manifest.xml (hint for the noobs or the people drinking lots of beer as per OP - don't use file explorer to find it, navigate to it in terminal but remember to put "/.repo" :) :) )

the repo sync took about 2 minutes and then was able to build.

Thanks again for all the help - off to work now but will flash tonight (once I work out how to get it onto my phone seeins as VirtualBox won't connect!)
[Galaxy S I9000 Android Development] kasper_h:
I'm having so much fun reading your posts. Have fun in the android world :thumbup::beer:

Verstuurd van mijn GT-I9000
[Galaxy S I9000 Android Development] wogfella:
Potentially stupid question guys.

I know that CM is forbidden to supply their Roms to the general public with the Gapps packages due to a legal thing that happened with Google.

However I'm not CM and I'm not looking to supply this Rom to others - just build it all myself.

My issue is every new flash messes up the Gallery/Picasa Photos sync, and I have to reflash Gapps to get it.

So is there any way I can include (some or all of) the Gapps packages into my own builds?

PS kasper_h, can't build just mmm Email or mmm Exchange as apparently there is no Android.mk for those files (??)

So I've amended the SecurityPolicy.java file within the package/apps/Email folder to get rid of the RequireEncryption requirement, and rebuilt the whole rom from scratch!
[Galaxy S I9000 Android Development] kasper_h:
I have a lot of scripts to automate stuff. For examply, I automatically build a ROM, add gapps, resign and copy to a directory for upload:

https://github.com/kasperhettinga/scripts

I am not surprised building of Email/Exchange is not possible using mmm....
[Galaxy S I9000 Android Development] wogfella:
Good god damn man, you are a sexy sexy geek.

I'll have a look and steal some from you.

Thanks!
[Galaxy S I9000 Android Development] kasper_h:
First time in my life someone calls me a sexy geek :confused::laugh:
[Galaxy S I9000 Android Development] DROCSID:
Hahaha, wtf, sexy geek? What's that? :silly:
[Galaxy S I9000 Android Development] wogfella:
It's an oxymoron as well all know, but well... his quick response of a technological nature made my heart beat faster and my blood moved into different locations.....

take the compliment kasper_h !!

Back on topic:

When I've tried building the last few times I've come across random errors in the build.

We're talking anything from "cannot find src" to "cannot locate [INSERT BIG STRING OF RANDOM CRAP HERE THAT BASICALLY MEANS CAN'T FIND SOME PACKAGE THAT I KNOW IS IN THE SOURCE FOLDERS]"

The make installclean command (and related stuff) seem to do their stuff while running but every build freaks out.

The only thing that works is a full make clean command - but then the builds take aages to run.

No, I don't have logs, and no, I can't be more specific due to the "random" errors.

It's happened daily for the last 3-4 days.

a) has anyone else had this/seen this

b) is it only lately

c) is it due to any of the 4.2 merges (i doubt it but gotta ask?)

d) am I just too n00b to do Linux?