Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Thursday, 29 September 2016

Downloading Android Source Code on Windows Using Cygwin & Repo

I am working on some Android camera stuff for a new project.
I need access to the Android source code. (AOSP)
Thankfully it is open source and easily available.
However, to get the code it is not simply a case of doing git clone...

Because Google are massive and have a lot of source code, they have created their own tool to sit on top of git called 'Repo'.

The instructions for downloading the source using Repo are here

They are pretty good instructions but I had a few issues.
I am using Windows so I loaded up Cygwin.

My installation was fresh and so only had the default 'base' packages.
I discovered that I was missing dependencies required for Repo.


  • Git (under 'devel' category)
  • Python (under 'devel' category)
  • Curl (under 'net' category)

  • You have to run Cygwin setup again in order to add new packages (there is no apt-get).

    I am posting this purely because the errors I received were not helpful.
    I received this when running 'Repo sync' AFTER successfully installing Repo.

    error: command 'sync' requires repo to be installed first.
             Use "repo init" to install it here.
    WTF? First time using Repo it was a bit confusing.

    It was a bit of common sense that sorted this out in the end, but you know, sometimes that takes a while to turn up.








    Friday, 17 April 2015

    Basic But Effective Backup Software


    After a few years of using vice versa backup software, and attempting to use Acronis (urgh) I just discovered Windows Robocopy!

    Its been built into Windows for a while (doh!) and works really well (hooray!)

    I prefer to have two separate harddisks running on my home server. D for data and E for backup. Both are 2TB (they died) 4TB in size. I dont want mirroring because I dont want to automatically mirror any mistakes I might make. I don't like big bulky and bloated backup software. I don't mind one liner command prompts... I also like free stuff.

    This is how I did it:

    Put this in a batch file (on a single line):

    robocopy D:\ E:\ /MIR /XD "D:\$RECYCLE.BIN" "D:\System Volume Information" /R:10 /W:10 /LOG+:"D:\RoboCopyLog.txt"

    Where:

    D:\ = source
    E:\ = destination
    /MIR = mirror everything
    /XD = exclude directories
    /R = number of retries if failure
    /W = seconds to wait between retries
    /LOG+ = append to log file

    Run the batch file from windows task scheduler e.g. every night at 4am. It will need to be run under an administrator account.

    I have about 1.5TB of data to backup - it only takes approx 30 seconds to run if there were no changes. Sweet!

    Cheap and effective. Hope it can help you...