http://source.android.com/source/downloading.html
Section: Initializing a Repo client.
It reads:
A successful initialization will end with a message stating that Repo is initialized in your working directory.
Instead every time it finishes it says it has initialized in my home directory. I have cded and executed repo from the WORKING_DIRECTORY. This means repo tries to download into my home folder which is unacceptable. Thus, I cannot continue. I have had this working before to at least download into the bin folder, but I cannot remember how to do that now.
Thanks for the help.
edit:
I fixed the problem by renaming .repo in the home folder to .repo.old. Now repo downloads into the folder that I choose. No doubt I am still going to have problems with this build somewhere along the way.
Related
OK, let me first preface by saying that I have like zero development experience but I'm pretty smart and I'm trying to learn. You have to start somewhere, right?
So I decided to take a crack at it when I came across this thread:
http://forum.xda-developers.com/showthread.php?p=24278953
It's a Linux tutorial but having only a Mac, I decided to see if I could make it work. It didn't but the point is that, in the process, I learned a LOT.
So following a suggestion, I scrapped the whole Mac idea and started all over on an Ubuntu 11.4 VM. Which works great but it's a little less forgiving than the Mac.
Anyway, I have my build environment completely set up with all the necessary packages installed...no problem. I have the device specific proprietary files in place and pre-builts installed as well.
Now its time to build. I do so using this command:
Code:
source build/envsetup.sh
brunch otter -j$(gprep -c processor /proc/cpuinfo)
...runs for a couple minutes before stopping at this error:
Code:
In file included from frameworks/base/media/libmedia/IMediaPlayerService. cpp:25: frameworks/base/include/media/IOMX.h:29:17: error: jni.h: No such file or directory make: *** [out/target/product/otter/obj/SHARED_LIBRARIES/libmedia_ intermediates/IMediaPlayerService.o] Error 1
So basically, the file "IOMX.h" makes a declaration to include "jni.h" which isn't anywhere in my /android tree.
Upon further research I learn that "jni.h" has something to do with Java. I have the required java-sun-jdk 6.1.x installed so I figured it must be a problem with my $PATH. I found the "jni.h" in question in the Java folder and did an export $PATH to that folder. Then I entered echo $PATH to make sure:
Code:
echo $PATH /home/linux/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-6-sun-1.6.0.26
Sure enough, the folder where "jni.h" is located is included in my path, but I'm still getting the same errors.
What am I doing wrong?
Sent from my Kindle Fire using xda premium
Ok, first question is...how long does it generally take to sync the repo for the very first time.
I ran the command to sync with android-4.1.1_r1. Its literally been syncing for hours and still not done. I'm currently on /platform/pdk.
As for Ubuntu, I've never used it before but I'm running the guide posted on XDA for building with Ubuntu and I've done everything to the point of syncing...which I'm waiting to advance after this is done.
When you have to pull the proprietary files it says to use the device name. In my case it would be Samsung_d2tmo (for T-Mobile sgs3) correct?
For reference, I'm using this as a guide:
forum.xda-developers.com/showthread.php?t=1762641
Sent from my SGH-T999 using xda premium
It depends on your internet speed. If it's fast, it could be done in some hours. If it's not, you could be waiting for days. Yes, you are correct with the device name.
Theonew said:
It depends on your internet speed. If it's fast, it could be done in some hours. If it's not, you could be waiting for days. Yes, you are correct with the device name.
Click to expand...
Click to collapse
Thank you.
I was on "sync working tree", 52%, and my pc froze. Does it have to download everything again?
Android_Source (folder I was working in) is there with all the files but it won't let me cd to the directory (says it doesn't exist). I ran the command to sync repo again to the same directory thinking it would detect the files already there but it appears its downloading everything again but I can't really tell...
Sent from my SGH-T999 using xda premium
uoY_redruM said:
Thank you.
I was on "sync working tree", 52%, and my pc froze. Does it have to download everything again?
Android_Source (folder I was working in) is there with all the files but it won't let me cd to the directory (says it doesn't exist). I ran the command to sync repo again to the same directory thinking it would detect the files already there but it appears its downloading everything again but I can't really tell...
Sent from my SGH-T999 using xda premium
Click to expand...
Click to collapse
If you run repo sync, it starts off from where you left off/froze. Well that's what meant to happen.
Theonew said:
It depends on your internet speed. If it's fast, it could be done in some hours. If it's not, you could be waiting for days. Yes, you are correct with the device name.
Click to expand...
Click to collapse
Kill the terminal and reopen it resume repo sync it will show fetching projects see the projects remaining you will know how much more time it may take... Im syncing cm7 repo its around 20gb, dunno about jb repo
ajay8055 said:
Kill the terminal and reopen it resume repo sync it will show fetching projects see the projects remaining you will know how much more time it may take... Im syncing cm7 repo its around 20gb, dunno about jb repo
Click to expand...
Click to collapse
Do I have to cd back to the working directory or just issue command 'repo sync' from sudo -i (root)?
When my PC locked up last night, I rebooted and it wouldn't let me cd to my directory (said it didn't exist) even though the directory was clearly there and still had all the files. I issued the mkdct command again and assigned the same name as before and issued 'repo sync' again and it ran all night and still isn't finished. I never saw it say "resuming project".
Sent from my Amazon Kindle Fire using xda app-developers app
Ok so I hit a snag...
Is there a way to allot more disk space to Ubuntu after setup? When I installed it along side Windows, one of the setup dropdown boxes was "space" I believe. I set it to 30GB.
During the very end of my repo sync, I got this error:
Code:
[email protected]:~/Android_Source$ repo sync
Fetching projects: 100% (294/294), done.
fatal: cannot create directory at 'config/en.us/wave/dallas/0303': No space left on device
Traceback (most recent call last):
File "/home/jamie/Android_Source/.repo/repo/main.py", line 385, in
_Main(sys.argv[1:])
File "/home/jamie/Android_Source/.repo/repo/main.py", line 365, in _Main
result = repo._Run(argv) or 0
File "/home/jamie/Android_Source/.repo/repo/main.py", line 137, in _Run
result = cmd.Execute(copts, cargs)
File "/home/jamie/Android_Source/.repo/repo/subcmds/sync.py", line 467, in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/jamie/Android_Source/.repo/repo/project.py", line 1026, in Sync_LocalHalf
self._InitWorkTree()
File "/home/jamie/Android_Source/.repo/repo/project.py", line 1840, in _InitWorkTree
raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree
So now, I can't finish the repo sync and I'm stuck....
Sent from my SGH-T999 using xda premium
You could resize the partition using gparted. See here: askubuntu.com/questions/51272/resize-partition-with-gparted.
Hello XDA, I am currently working on a new project, porting Boot 2 Gecko (Firefox OS) to the droid razr. I have no experience in porting, only the determination to be the first person (or team of people) to accomplish this for our device.
A little about myself:
I build CM10, CNA, AOKP and AOSP from source for the droid razr so I have a little experience with such.
I use STS Dev team's android local manifest.
What I have done so far, would like advice if possible:
Read a crap ton about the Firefox OS, I believe that the only requirement it truly has is you need to at least have android 4.0 (ICS) Right now we have jellybean roms functioning on the droid razr, this isn't a problem. The only major issue I can see in this project is that the droid razr has a locked bootloader. I am hoping that SafeStrap that hashcode has developed will overcome this obstacle, but this is only possible if I have a zip to flash, I am pretty sure there isn't a way to flash a boot.img because of our bootloader being locked.
First I cloned the source B2G from mozilla's github.
Then I just took a copy of my system folder from one of my recent ics roms. Figured this was the same as just pulling it directly from the phone.Named this directory 'spyderb2g.'
I then edited the config.sh file within, (this file contains all of the repo sync commands, for each specific device. The porting guide on mozilla asks you to add in your device to this file.) I copied the pandaboard entry and renamed the title to spyder. Pandaboard seemed to be the device that was most closely related to the razr being an omap4 device. This is a possible mistake. Also, while I was in here I edited the repo sync command to have -f for force and -j2 to set the job level.
I have downloaded the pandaboard.xml from mozilla's github and added in some lines from sts's stock cm ics android_local.xml. This part I am little unsure of, I figured since the pandaboard is an omap4 device, it MIGHT get me some where. its a big 'might.' I copied over all the device specifics (local device and local vendor) Renamed the final file to default.xml.
For the device tree, I downloaded this straight from sts's github, since they have an android_device_motorola_spyder repository handy. extracted the contents of this to the same spyderb2g directory, so now this directory contains system (extracted) and the device tree all mixed together. The porting guide was not too specific on where to put this stuff.
Finally, I run this command to see if it will sync and get all the required files.
ANDROIDFS_DIR=spyderb2g ./config.sh spyder default.xml
Here's my output:
Code:
Get tmp_manifest_repo
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From tmp_manifest_repo
* [new branch] master -> origin/master
error: Cannot fetch STS-Dev-Team/android_device_motorola_edison
warn: --force-broken, continuing to sync
Fetching projects: 2% (2/95) fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
A little bit of google says that I need to add my SSH public key to github, but I have never had to do this for a build operation. Perhaps I could fork the required repos and then authenticate myself that way..but I feel there is a little more to it than that.
Any advice would be appreciated. Thanks for your time.
Since I have not built this rom yet, I am curious if other developers that have built the rom for other ported devices could inform me if the build.sh outputs a .zip file as well as an .img file.
I can help telling you that it was better to put this in dev section
good luck with your project!
I have been having issues with the Paranoid Networking feature added to the Linux Kernel preventing some of my programs from creating sockets.
Appearently the process must be of a certain group id, either one of the AID_INET or AID_BT groups in the 3000's range I believe. I was cgreping through the source code and it seems a few calls to "in_egroup_p(gid_t)" are made to test if the process's group is 'correct' when ANDROID_PARANOID_NETWORKING is defined. If I understood the "in_egroup_p()" function, it should return 1 (retval) if there is a match. so what I did was this in the c file for inet in the kernel. I hope the kernel gets compiled, I just did a "make clean" and "brunch d2spr" it is cm-10.1
Code:
#ifdef ANDROID_PARANOID_NETWORKING // this was there
if ( in_egroup_p(0) == 1) {
return 1;
} // I added this
return in_egroup_p(AID_INET) || capable(I_FORGOT_HERE); //this was there
And I am hoping that when I execute the program as root, it will have permission to create a socket. Also note, that the programs I am having problems for are glibc based that I copied and mounted from a .img file. Programs such as postresql, gdm3, and others. It is a debian distro that I mount with an init service when a property is set to 1.
If this does not work, I will need to run without the Paranoid Networking patch to the kernel. What config file do I need to edit so that ANDROID_PARANOID_NETWORKING does not get defined or built into the kernel?
edit: I feel like this, " IM ROOT B****, STAY OUTTA MY WAY! " And then that scene from Jurrasic Park comes to mind
http://www.youtube.com/watch?v=RfiQYRn7fBg
Still no go
Code:
[email protected]:/etc/init.d# ./postgresql start
[....] Starting PostgreSQL 9.1 database server: main[....] The PostgreSQL server failed to start. Please check the log output: 2014-01-06 16:48:59 UTC LOG: could not create IPv6 socket: Permission denied 2014-01-06 16:48:59 UTC LOG: could not create IPv4 socket: Permission denied 2014-01-06 16:48:59[FAILWARNING: could not create listen socket for "localhost" 2014-01-06 16:48:59 UTC FATAL: could not create any TCP/IP sockets ... failed!
failed!
*BEEP* *BEEP* *BEEEEEEEEEEP*
Hmmm... Maybe the kernel didn't compile? I dunno . ...
Where is the config file for the kernel that comes with CM-10.1 so I can turn off this paranoid networking?
My philosophy is that they shouldn't be there to start a socket in the first place, but if I want to, I should be able to. This is where I need something akin to sudo, but as root this is pissing me off, let me create a socket por favor!
I tried a lot of things but this just isn't working right. Some one please, help.
I've about had it up to my neck with Android. ****ing bull ****, I didn't know I was buying a bad ass phone with Chains and Iron Bars for an OS. FREEEEEEEDOOOOOOMMMMMNNNNNNNNN
After breaking my build, I deleted my kernel directory tree and re-sync'ed. I then did "source build/envsetup.sh" and "breakfast d2spr" and then I when to "kernel/samsung/d2/" and did "make menuconfig" then I unselected in networking options "Only specific groups can create sockets" or some such option. and then "brunch d2spr". We shall see if that works.
Update:
Did not work. Said unfinished jobs yada yada
So what I am trying now.
I cleaned everything, bummer!
I copied my kernel dir to another location
I pulled my kernel config with adb
I used that with 'make menuconfig' and edited out the 'only allow certain groups' bit
I saved that
copied it to my source in kernel/samsung/d2/
I edited AndroidKernel.mk to use that config file instead ( the assignment occurs at the top of the file)
croot
brunch d2spr
waiting till tomorrow more than likely....
Update: ( 3 hours later )
Its taking long enough
seems to be working
maybe I can make a config in my source tree and then make mroper and clean, aswell as in the KERNEL_OBJ dir in out/*, then brunch. to avoid needing two kernel source trees and some confusion in case I modify any of the source and not just the config.
AndroidKernel.mk specifies which config file to use instead of the other pre-configured files, just start by pulling a config off your phone with the same rom and device your building for.
Code:
adb pull /proc/config.gz
That will pull the conpressed file off your phone to the current working directory, then gunzip it. Then launch
Code:
make menuconfig
from your kernels root dir, for me that is "/home/$USER/android/system/kernel/samsung/d2/"
And then once the menu is up, use the arrows to scroll down to the bottom and use enter or return to select the option to use a different configuration file, it should change menus to one with ".config" erase that and change it to point to your config file, I just copied mine to the same directory mentioned above with the name "config" the same without the "." (dot/period) in front.
After that, from the same dir ( as well as in the KERNEL_OBJ/ dir somewhere within the out/ dir)
Code:
make mrproper && make clean
to clean the previous kernel make.
After all of that, you can 'croot' and 'brunch $YOUR_MODEL', but not before making sure you change which config file to use in your kernel's root dir in it's AndroidKernel.mk file. Its at the top, I used an absolute path for my installation, just in case.
I am trying to sync the following repo
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
and then
repo sync
my problem is that repo sync stuck at fetching projects 99 percent. After a lot of searching, I found It want to download prebuilt package(~1.3G); however my internet connection interrupt repeatedly.
Bad news is that download resume for this package is not supported. Good news is that I found git save all temporary file in a Packfile internally. In addition, temporary files save in projects/prebuilt.git/objects/pack/ .
is there anybody to know how I can recover incomplete download?
a "repo" consists of 176 "projects", some of them are very large (>100k of objects)
you can only resume sync if some projects are fully downloaded, but others are not.
but you cannot resume an interrupted sync of one big project. here's, a Git manual quote:
"When cloning a large repository (such as KDE, Open Office, Linux kernel) there is currently no way to restart
an interrupted clone. It may take considerable time for a user on the end of a small pipe to download the data, and if the clone is interrupted in the middle the user currently needs to start over from the beginning and try again. For some users this may make it impossible to clone a large repository."
So, if you really want to transfer these files to your machine - you'd better get access to some shell out of your network, transfer files there, and then sync your local PC and that remote shell with some restartable method, such as RSync.
Or even remotely compress all that things in one big archive, and download it to your machine with your favourite download manager.