Wednesday, May 24, 2017

How to check the Android SIM count

getprop ro.multisim.simslotcount


SystemProperties.getInt("ro.multisim.simslotcount", 1) > 1

How to detect Dual SIM using Android shell ?

getprop returns "dsds" or "dsda"   on multi sim Samsung devices


    public static Boolean isDualSimModel() {
        return (Boolean.valueOf("dsds".equals(SystemProperties.get("")))                    Boolean.valueOf("dsda".equals(SystemProperties.get(""))));

Tuesday, January 24, 2017

How to install letsencrypt ssl certificate on nginx without Unable to locate package letsencrypt error

Today, I thought of moving some of the websites to ssl. so I looked up for a guide on Google and most of them says

sudo apt-get install letsencrypt

but it ends with

E: Unable to locate package letsencrypt

So, I had to go back to the original repo to fix this problem.

git clone
cd letsencrypt
./letsencrypt-auto --help

this will show the help. If you are trying to configure to run on nginx.

 sudo ./letsencrypt-auto --nginx

and then select the website number. Make sure you do not have anything running on port 443 now.