ipShield

Context-aware sensor privacy for Android

Build from source (Lollipop)

  1. Initialize your Android build environment
  2. Install the repo tool and set up a working directory
  3. Download the manifest and other information corresponding to the corresponding branch. You will now have a .repo/ directory. Run the following:
    $ repo init -u https://android.googlesource.com/platform/manifest \
                  -b android-5.0.0_r1
    
  4. In the .repo/ directory do the following:
    1. Create a directory named local_manifests/
    2. Place the file local_manifest.xml in the local_manifests/ directory.

      In order to let the repo fetch the ipShiled changes from NESL github, you should edit local_manifest.xml to contain the following:

      <manifest>
          <remote name="github" fetch="https://github.com" />
          <remove-project name="platform/frameworks/native" />
          <project path="frameworks/native" remote="github"
              name="malzantot/lollipop-ips-sensorservice"
              revision="lollipop-ipshield" />
          <remove-project name="platform/frameworks/base" />
          <project path="frameworks/base" remote="github"
              name="malzantot/lollipop-ips-frameworks_base"
              revision="lollipop-ipshield" />
          <remove-project name="platform/external/sepolicy" />
          <project path="external/sepolicy" remote="github"
              name="malzantot/lollipop-ips-sepolicy"
              revision="lollipop-ipshield" />
          <remove-project name="platform/system/core" />
          <project path="system/core" remote="github"
              name="malzantot/lollipop-ips-libutils"
              revision="lollipop-ipshield" />
      </manifest>
  5. Do a repo sync to download the source. You should now have all the changes for ipShield along with the code for android-5.0.0_r1.
  6. $ repo sync -f
  7. Now you have all the source code in place, but you still need to get the non open-source part of AOSP i.e. some 3rd party drivers. Please go to this page to download the patch for your device and apply them to the source folder.

    Please make sure you apply the binary driver patches before starting the build!

  8. To perform a complete build, from the root of the installed directory, run the following:
    $ source build/envsetup.sh
    $ lunch 20
    $ make update-api
    $ make -j8

    Note that you should adjust your -j8 parameter according to the number of cores in your processor.

Build from source (Jellybean)

  1. Initialize your Android build environment
  2. Install the repo tool and set up a working directory
  3. Download the manifest and other information corresponding to the corresponding branch. You will now have a .repo/ directory. Run the following:
    $ repo init -u https://android.googlesource.com/platform/manifest \
        -b android-4.2.2_r1
  4. In the .repo/ directory do the following:
    1. Create a directory named local_manifests/
    2. Place the file local_manifest.xml in the local_manifests/ directory.

      In order to let the repo fetch the ipShiled changes from NESL github, you should edit local_manifest.xml to contain the following:

      <manifest>
          <remote name="github" fetch="https://github.com" />
          <remove-project name="platform/frameworks/native" />
          <project path="frameworks/native" remote="github"
              name="nesl/platform_frameworks_native"
              revision="refs/tags/android-4.2.2_r1" />
          <remove-project name="platform/frameworks/base" />
          <project path="frameworks/base" remote="github"
              name="nesl/platform_frameworks_base"
              revision="refs/tags/android-4.2.2_r1" />
      </manifest>
  5. Do a repo sync to download the source. You should now have all the changes for ipShield along with the code for 4.2.2_r1.
  6. Pull the ipShield source code changes from NESL github.
    $ cd frameworks/base
    $ git checkout -b jb-privacy remotes/github/jb-privacy
    $ cd ../native
    $ git checkout -b jb-privacy remotes/github/jb-privacy
    $ cd ../..
  7. Now you have all the source code in place, but you still need to get the non open-source part of AOSP i.e. some 3rd party drivers. Please go to this page to download the patch for your device and apply them to the source folder.

    Please make sure you apply the binary driver patches before starting the build!

  8. To perform a complete build, from the root of the installed directory, run the following:
    $ source build/envsetup.sh
    $ lunch 11
    $ make -j8

    Note that you should adjust your -j8 parameter according to the number of cores in your processor.

Flash the ipShield image

To flash the ipShield image, you should first unlock the bootloader of your phone, if you have not done so before:


          $ adb reboot bootloader
          $ fastboot devices
          $ fastboot oem unlock
        

Then use the following commands to flash the image (Please understand the risk of flashing your phone, and make sure to do back-up of important data):


          $ cd out/target/product/mako
          $ export ANDROID_OUT_PATH=$PWD
          $ adb reboot bootloader
          $ fastboot -w flashall
        

Then enjoy the ipShield features by installing the FirewallManager front-end app here.

Install Google apps

Please refer to this page for instructions about how to install Google apps (including the Play Store) on a phone with fresh AOSP.