ASN

Notes by Akhil Saji

iPhone 6 battery replacement experience

Introduction

Recently, I have been following the apple battery throttling scandal that started with a Reddit post and subsequently a formal analysis by GeekBench author John Poole which led me to wonder if the poor performance I've experienced on my iPhone 6 since last year could be related to it. My iPhone 6 was purchased in December 2014 and has been my workhorse for over three years. I never felt the need to upgrade until recently due to it offering all the features I use on a daily basis including Apple Pay, a decent camera, and common tasks such as email and messages. Not much has changed regarding features that I desire; however, one critical thing that began to bother me and compel me to upgrade was the consistent lag on the device. Once seamless tasks such as opening Mail or responding to multiple message chains on Messages while browsing the web slowed to a crawl within the past six months.

Fast forward to the December 2017 revelation of what some on Twitter are calling #ThrottleGate which subsequently led to Apple issuing a formal response; I decided to take matters into my own hands. I had already replaced the screen on my device earlier in 2017 due to an accidental fall out of my pocket, and therefore, I wouldn't be eligible for the discounted $29 apple battery replacement. I went for the next best option. After some research on Reddit and various other internet sources, IFixIt.com seemed to have a reputation for offering close to OEM standard battery replacements for iPhones.

Pre-Replacement Capacity and Benchmark

The battery I ordered was delivered within seven days, and I began the process of preparing to replace it. My first step was to analyze data from the original Apple battery using a free tool called coconutBattery. The results (screenshot below) showed that my battery could only deliver roughly 85.3% of its original design capacity and has over 1100 charge cycles recorded. The second step I took was to run the iOS Geekbench CPU benchmark to confirm my suspicions on whether or not my device's CPU (Apple A8) was in-fact being throttled. The results (screenshot below) showed a single core score of 1315 and a multi-core score of 2235.

coconutbattery-preinstall geekbench-preinstall

Post-Replacement Capacity and Benchmark

Using the iFixIt guide I was able to replace the battery within roughly an hour. I found the most difficult part of the repair to be aligning the new battery connector likec the OEM battery. The replacement battery comes in an "unfolded" state and therefore, I would suggest prior to placing the battery onto the adhesive in the case, manipulating the battery cable into a folded state similar to the OEM battery- this will make your installation easier. After the phone booted up, I re-ran the Geekbench iOS benchmark and tested the battery using coconutBattery as I did prior. The geekbench results showed a single core score of 1498 (~13.9% improvement) and a multi-core score of 2606 (~16.5% improvement).

coconutbattery-postinstall geekbench-postinstall

Conclusion

After two days of continuous use of the iPhone 6 with the new battery, I am happy to report that my phone is back to the level of operating performance I experienced when I originally purchased the phone. I no longer experience stuttering or user interface latency when I am multitasking or even doing simple tasks such as responding to text messages. If you have an iPhone 6S or below and are considering purchasing a new phone due to lag, I would highly suggest investigating the state of your battery before doing so. It may save you a few dollars and allow you to hold out a bit longer before upgrading.


How to install OpenVPN Client on OMV (openmediavault)

OMV (openmediavault) is an open source NAS operating system based on Debian. If you're not familiar with it, head here and check it out.

This tutorial assumes basic knowledge of Linux and root access to your OMV server. Lets get started.

  1. Installing OpenVPN (as root)

    apt-get install openvpn

  2. After installing OpenVPN, you'll want to obtain the VPN certificate files. These should be provided to you by your VPN provider. My personal recommendation is PIA. If you choose to utilize PIA, you can download the necessary files here.

  3. At this point you'll want to transfer the certificate files over to your server either using SCP or some other mechanism. I personally recommend directly downloading it on the server with wget and then unzipping it with unzip.

  4. From your extracted files, move ca.crt, crl.pem, vpn.ovpn to /etc/openvpn/ (Note: vpn.ovpn refers to whatever VPN server you're looking to connect to)

  5. edit the vpn.ovpn file using whatever editor you prefer and replace the line

    auth-user-pass
    with
    auth-user-pass login.txt
    Save and close the file.

  6. Next, create login.txt in /etc/openvpn and place your username on the first line, and your password on the second line. These should be provided to you by your VPN provider.

    Username
    Password

  7. Now change the extension of vpn.ovpn file to vpn.conf

    mv vpn.ovpn vpn.conf

  8. To ensure that OpenVPN connects to this VPN on start, we must edit the openvpn configuration file. Open /etc/default/openvpn in your editor of choice and add the entry AUTOSTART=vpn where vpn refers to the vpn.conf file in /etc/openvpn/. Adding this entry will allow openvpn to search for this configuration file on start and run it.

  9. Lets test our handywork. Start and run openvpn

    openvpn /etc/openvpn/vpn.conf

  10. Now test the connection using

    curl -s http://ifconfig.me
    You should see a different WAN IP which represents your VPN IP.

  11. Now restart openvpn and be set

    /etc/init.d/openvpn restart


Installing and Running ESSNet on Mac OSX

ESSNet is a program that was developed by Dr. Lim et al. at the University of Singapore for studying relationships between entities in biological pathways.

  1. Install Homebrew if you don't have it installed already. The instructions on their website should suffice.

  2. The first package we will install is R. In order to gain access to the R installer under homebrew, you need to add the following repository.

    brew tap homebrew/science

  3. Once the repository is added run the following command. The prompts during the installation will guide you through the necessary steps.

    brew install r

  4. Once you have R installed, type r then enter to initiate the r shell. If the installation went successfully, you should be greeted by the r shell.

  5. Next we need to install the R dependencies that ESSNet relies on and are avaliable on the R distribution network. In the prompt, type the following commands.

    install.packages("rJava")
    install.packages("igraph")
    

    You may be prompted to selected a CRAN mirror. If so, select a mirror that is closest to your geographical location for the fastest download times.

  6. After the packages are installed, type q() to exit the r shell.

  7. Next, install Apache ant

    brew install ant

  8. Finally, make sure that you have JDK 7 installed.

  9. ESSNet relies on another package called PFSnet which we need to install before we install ESSnet. Change directory to a writeable folder such as ~/Downloads and run the following in terminal:

    curl -o pfsnet.tar.gz 'http://compbio.ddns.comp.nus.edu.sg/~intpath/ftp/Storage/pfsnet_1.0.tar.gz'
    tar xvzf pfsnet.tar.gz
    r CMD install pfsnet

    If successful, you will receive output similar to this:

    asaji@asaji:~/Downloads$ r CMD install pfsnet
    installing to library ‘/usr/local/Cellar/r/3.1.0/R.framework/Versions/3.1/Resources/library’
    installing source package ‘pfsnet’ ...
    libs
    ant clean
    Buildfile: /Users/asaji/Downloads/pfsnet/src/build.xml

    clean:

    BUILD SUCCESSFUL Total time: 0 seconds R inst preparing package for lazy loading help installing help indices building package indices testing if installed package can be loaded DONE (pfsnet)

  10. Now we can download and install ESSNet. Once again, make sure you are in a writeable directory and run the following commands in terminal:

    curl -o essnet.tar.gz 'http://compbio.ddns.comp.nus.edu.sg:8080/essnet/downloads/essnet_1.0.tar.gz'
    tar xvzf essnet.tar.gz
    r CMD install essnet

    If successful, you will receive output similar to this:

    asaji@asaji:~/Downloads$ r CMD install essnet
     installing to library ‘/usr/local/Cellar/r/3.1.0/R.framework/Versions/3.1/Resources/library’
     installing source package ‘essnet’ ...
    ** libs
    ant clean
    Buildfile: /Users/asaji/Downloads/essnet/src/build.xml

    clean:

    BUILD SUCCESSFUL Total time: 0 seconds R inst preparing package for lazy loading help Warning: /Users/asaji/Downloads/essnet/man/essnet-package.Rd:33: All text must be in a section Warning: /Users/asaji/Downloads/essnet/man/essnet-package.Rd:34: All text must be in a section installing help indices building package indices testing if installed package can be loaded DONE (essnet)

  11. You should now be able to successfully run ESSnet in R.