Android Repo init failed

24,151

Check your repo file.

Sometimes the server would return a "server loading too high" page instead of giving you the repo script. In this case, you have to download your repo file again.

Alternativly, you can get the source of repo from git:

git clone https://android.googlesource.com/tools/repo
Share:
24,151
minhaz
Author by

minhaz

Anything that can go wrong, will go wrong. "Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth." Arthur Conan Doyle. Hooked with Android since its release and working with it ever since.

Updated on July 11, 2022

Comments

  • minhaz
    minhaz almost 2 years

    I think i follow instruction from this site very carefully

    http://source.android.com/source/downloading.html

    but when i try this

    repo init -u https://android.googlesource.com/platform/manifest
    

    i got the following error.

     repo init -u https://android.googlesource.com/platform/manifest -b froyo 
    /root/bin/repo: line 1: syntax error near unexpected token `newline' 
    /root/bin/repo: line 1: `<?xml version="1.0" encoding="utf-8"?>'enter code here`
    

    I tried several times but no luck from the very begining. What happened?

    • olefevre
      olefevre over 12 years
      The grandstanding of the people who took the liberty to close this question is just incredible and unfortunately all too common on SO. It is perfectly clear what is being asked: me and another commenter had no problem understanding the question.
    • Heath Hunnicutt
      Heath Hunnicutt over 12 years
      voted to reopen: this question and answer are useful.
    • Vincent Vettukal
      Vincent Vettukal almost 12 years
      This question should be opened. The question is clear and precise. Answer is also clear.
    • Sentient
      Sentient over 11 years
      I had the same problem. The instruction curl dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo , might fail. In that case the repo command might be an html page with 'resource not found'. Just see what is in the repo file (it sould be a python script, not an HTML page vi \~bin\repo ). If this is not the python script see if you can resolve the curl download request first.
  • olefevre
    olefevre over 12 years
    Yes, do check your repo file. It is a python script, not an HTML or XML file, so if you are getting an error message that quotes bits of HTML or XML when trying to use repo, odds are when you tried to fetch the repo script in the first place the server responded with a 301 or 404 error message, hence the XML/HTML. The instructions on source.android.com should have the correct location (it changes often; Google is unfortunately not a class act but a bit messy).