Add Git Repository to Synology Server

To create a Git repository:

  1. SSH into your server as root or admin.
    $ ssh admin@diskstation
  2. Change to the directory you have for your Git Repositories.
    admin@diskstation: cd /volume1/git/repo
  3. Create the folder to contain the repository.
    admin@diskstation: mkdir project
  4. Create a bare git repository. It will be bare since there will be no project files checked out here.
    cd project
    git --bare init

Once the repository is created, a Git client user can then use the repository with the address: ssh://username@diskstation/volume1/git/repo/project.


Extract Android APK with ADB

You can easily extract an Android APK file from a device using the Android Debug Bridge (ADB). This is a command line utility provided with the Android SDK that allows you to run commands on a remote device as well as transfer files to and from the device.

1. Connect your device

First connect you Android device to your computer and ensure that that USB debugging is enabled on the phone.

2. Verify the Devices

Check that the device is connected and adb can see the device with the command:

$ adb devices
List of devices attached
06157df64b014d28 device

This will display a list of the devices that are currently attached to the computer.  If there are multiple devices you the argument “-s <serial number>” in the remaining adb commands.

3.  Determine the full package name

Next you will need to determine the full package name.  This is in the URL of the application in the GooglePlay store, or you can search the list of packages to find the one that you want.

$ adb shell pm list packages | grep mobilemusings

4. Determine the path for the package

Then you need to get the path on the device.

$ adb shell pm path org.mobilemusings.app1

5. Download the APK file

You can now download the file to your computer with the adb pull command.

$ adb pull /data/app/org.mobilemusings.app1-2/base.apk <target-dir>
/data/app/org.mobilemusings.app1-2/base.apk: 1 file pulled. 24.1 MB/s (36446563 bytes in 1.442s)