Raspberry Pi, WIFI, SSH, DDNS (No-IP), Ad Blocker + Internet Tracker / Filter + DNS (Pi-hole), Secure Virtual Private Network / Tunnel (PiVPN OpenVPN / WireGuard), Port Forwarding, Reverse Proxy / Tunnel (Ngrok, RemoteIT).

Disclaimer: this gained knowledge, application and post was made possible by COVID-19 lock down, there is something positive in everything.

Things covered are as below, you may head to below items specific to your needs if required:

  1. Raspberry PI Headless, WIFI and SSH enabled (We want the PI to use only the resources required and also be in position to handle a load of multiple services running on same PI)
  2. DDNS such as No-IP (Use this if you can Port Forward on LAN, as it will update your current IP to a dynamic domain name, this may not be secure as port forward and dynamic domain is fixed and connected directly to your home / personal network but its faster*)
  3. Ad Blocker, Internet Tracker / Filter and DNS using Pi-Hole (This will save up data as your network will block ads and also save you on ad disruptions on your devices and give you more control on blocking / allowing sites)
  4. VPN using WireGuard UDP only, else OpenVPN if you might need TCP (As most most Proxy Server might not support UDP)
  5. Port Forward (not secure but faster*)
  6. Reverse Tunnel (If you do not want / can not / using mobile data / port forward is not possible / or simply make your pi portable / accessible regardless on which network you are on)

* means it will be elaborated later on, the steps will be bundled up based on the required steps / stages in setup / heading herein, I will divide the steps based on port forwarding or not in the stage in setup / heading such as:

  1. If you will be port forwarding then setup DDNS such as No-IP and Forward the Port from Router to Raspberry Pi
  2. If you will not be port forwarding skip the above option and just setup Reverse Proxy such as RemoteIT with the rest of the setup

So being on the move I tend to use the internet a lot, understanding and knowing the ins and outs of free WIFI I tend to use my Mobile network instead, which means more data bills, and having a free VPN are mostly running on quota or the hassle of not being able to access anything from home while on the go limit on device, 2 problems to be solved:

  • Use of Free WIFI Securely without VPN Payment or limited quota / device connected
  • Access home network / devices / files securely on the go

The first time I heard of “raspberry pi / raspberry pie” I thought it was something I could eat Smile, apparently it is the number π is a mathematical constant and there is a “PI Day” that is annually celebrated and observed on March 14 (3/14 in the month / day format).

So after one week of research and review, I was going for Pi Zero but on the second week knowing how I would probably get excited, I went with the highest specs available for any over kill I had in mind, as the post title suggests that’s a mouth full already and while the initial intention was VPN only and just to solve two things, I ended up with more due to the benefits and restrictions faced during setup (Blocked by ISP).

For this setup you will need a casing for protection, heat sinks and fan/s to keep cool the raspberry pi.

Word of advice always go to the source for anything, unless not available then only look somewhere else, as most of them are outdated, I have personally researched and compared from different sources including YouTube video tutorials, below I will lay down the process and procedure, including links within from OEM providers to the Software providers, first thing first.

1. Raspberry Pi Installation / Setup

Most tutorials talks about downloading the OS Image and then write it to the SD Card, this is fine if you want to do it multiple times or have limited data, the best and recommended way is to use Raspberry Pi Imager as it will allow you to choose one of the multiple supported OS, set proper file format i.e fat32 and write it directly into your selected SD straight away.

I chose headless setup for this instance meaning I will not be using a monitor and hence there is no need to install the desktop software. I used “Raspbian Lite” on 8GB SD Card for my setup. I also did install “Raspbian Full” on 16GB SD Card separately when I need to have extra desktop I just swap the SD cards and plugin HDMI, Keyboard and Mouse, bear in mind SD Cards larger than 32GB have a further read on sdxc formatting.

Also do take note, pi-hole will have its own database meaning there will also be a lot of write to SD Card, so ensure the card can handle it such as class 10 and above, not only the SD Card Size matters but also it’s Read/Write Speed.

alkathirikhalid

Go to “Raspbian (Other)” to get option for “Raspbian Lite”.

alkathirikhalid

2. Enable SSH and WIFI Connection

We will need to create 2 files named exactly as specified:

  • wpa_supplicant.conf (Specify 3 things country code, network name and password)
  • ssh (Empty)

Example: Malaysia = MY

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=MY network={ ssid="MyWifiName" psk="MyWifiPassword" }

Now we have those 2 files saved in the SD Card, remove the SD Card from you desktop and insert it into the raspberry pi, switch on the power and you should see 2 led light up, red for power, yellow blinking for reading data (the blink will end once reading / boot complete), you could give it 10 seconds but less  than 5 being headless its already up and running.

3. Connecting to your Raspberry PI

You could open up your router to see new local IP address connected, as most tutorial specify SSH using local IP address or Putty for windows for SSH, you do not need that.

You will need specific IP address if you have multiple PI on Network and for Windows 10 you do not need Putty, for my case having SSH already on my Windows 10 as I am using AWS and Git, I just open up CMD as below:

>ssh raspberrypi.local -l pi

The command allows us to “-l” login user named “pi” directly after this we just enter the default password “raspberry”.

alkathirikhalid

4. Change Pi Password and Update packages

After connecting to your PI it is best to change password as I intend the device to be wireless, headless and portable, meaning I could run it in another network, hence password change is a must, run below and press enter, follow the on screen prompt for current and new password.

>passwd

Update your raspberry pi, most tutorials will simply use apt-get to update and upgrade but the Debian base Linux commands have been simplified so simply trigger below and enter.

>sudo apt update
>sudo apt full-upgrade

“full-upgrade” is used in preference to “upgrade”, as it will also include any dependencies that may have been made changed / updated for a specific package.

Make it a habit to reboot so some of the update that require reboot to take effect, on every step / after update / installation, so do trigger reboot then SSH back.

>sudo reboot

Also make it a habit of shutting down your raspberry pi properly rather than following the online tutorials which suggest switching off the main plug or removing the plug, this will lead to corrupt data and even ruin your SD Card as it could be in write mode when power is lost.

This will shut it down within 60 seconds:

>sudo shutdown

To halt and shutdown immediately use:

>sudo shutdown -h now

5. DDNS No-IP (Only setup if you intend to port forward)

How to know if you can port forward if you want to?

  1. Data / Internet Provider gives you a static IP address / it is a land line / not SIM, mobile operators control NAT, users might be on a shared public IPs. You wont be able to forward it as you do not control the gateway / server. (Such as my case on Celcom)
  2. You Own and have access to the router, if you are in the first router you will need to port forward once else based on the network topology you will need to forward up to your PI

Here are the steps directly from the source:

Remember port forwarding opens up port into your network, which means your network might be susceptible to attacks, and on top of that DDNS it will have a fixed domain name to your network, meaning you just need to know it once for yourself and the attacker, and won’t be portable in the event you take it somewhere you will need to port forward from the new router.

This set up will be faster in a sense you will be connected directly to your network without using reverse proxy and you have more control of your own data and network settings as a whole.

6. Ad Blocker, Internet Tracker / Filter and DNS using Pi-Hole

It is best to have a combo of both PiVPN and Pi-hole running in the network but the setup issues is that most of the tutorials installs PiVPN (OpenVPN / WireGuard) first followed by Pi-hole which leads to re-setting / re-configure of DNS.

If you intend to install both then its best to install Pi-Hole first as when it comes to installing PiVPN, existing Pi-Hole will be detected and the installation script will ask if you want to use it as the DNS for the VPN, follow below:

>curl -sSL https://install.pi-hole.net | bash

Follow on Screen steps, basically you will need to have:

  • Static IP (Manually set on the device) / DHCP Static Binding (Set on Router which most modern routers already have it)
  • Enable ip4 and ip6 (Already default selected)

Everything else can be left as default including installing the pi-hole web and server, unless you have specific needs, at the end of the script you will be presented with a login password for Pi-Hole on Screen (you may simply screen shot) and also on terminal (you may simply copy).

alkathirikhalid

At this point you may set up your router to point to Pi as your DNS server as in my case this is not possible else specific devices, you might also notice ip6 “not configured” even though you selected it, you might login as admin and fix it.

7. Virtual Private Network using PiVPN (OpenVPN / WireGuard)

This Pi VPN setup also uses a script with option run below and follow the prompt:

>curl -L https://install.pivpn.io | bash

I am doing Port Forwarding:

  • Select DDNS instead of Static IP Address and input your domain / provided sub-domain
  • Select either OpenVPN / Wire Guard but UDP

I am not doing Port Forwarding:

  • Select Static IP Address (DHCP Reserve or Static IP)
  • Select OpenVPN TCP (Default will be 443) setup to port 1194 (Some proxy servers have scripts for specific usage or ports for setup hence default will work best / Known protocal)

Everything else should be default unless you want to have random ports for security or changing other settings you may see fit, after installation you will need to add users, add users based on how many will access the VPN, it is best to add users based on the number of devices that will need to connect, as there can not be simultaneous connection of an account / user.

With user password

>pivpn add

Without user password

>pivpn add nopass

8. Port Forwarding

This option is for those who fall under “I am port forwarding”, simply forward the PiVPN port you selected during setup if it is OpenVPN  or WireGuard both will be UDP, depending on specific router, you may find instructions of your router.

There is no need to forward multiple ports i.e port 80 for pi-hole web, 22 for SSH, just forward “One port to rule them all” and that is your VPN port as it will create a tunnel into you network and you will virtually be in the same topology / network and you can access them securely as being in a LAN over WAN.

9. Reverse Proxy / Tunnel using Ngrok / RemoteIT

This option is for those who fall under “I am not port forwarding”, to access your raspberry pi in your network or any other network or if your ISP blocks ports, you will need to set up VPS or in our case a proxy to be specific “Reverse proxy” where communication will take place there.

This is rather secure manner of communication and given some providers randomly generate end points and port mapping to your original values for each connection, it becomes hard to be attacked as those values become useless after disconnection and also options of only allowing one active connection per service which ensure its only you active accessing your resources at that point and time.

You may proceed to setup a VPS as a Reverse Proxy Server or use existing one, there are many more, its up to you to compare and choose, example such as:

Ngrok

RemoteIT

  • >sudo apt update && sudo apt install -y connectd && sudo connectd_installer

Follow the on Screen Prompt, select option 1 for an application running on Pi

alkathirikhalid

Then select option 9 you for OpenVPN you may leave the port as default as specified in this guide else specify the port you provided.

alkathirikhalid

Validate registered device

alkathirikhalid

Some routers may have inbound and outbound rules, in my case the inbound rules can not be changed but the outbound rules are available, which allow application such as online games, video conferencing, or IP phone over the LAN to take place, these can be found in router setting > security outbound rule / > special applications

To escape this set up you could easily attach the port to a known service that either major OS or the router it self uses, these are open most of the time so as to not restrict services either 22 (SSH) or 443 (HTTPS) as explained on Hide OpenVPN Traffic.

alkathirikhalid

10. Connection

Now remember that pivpn command you used to add user / device? We may extract that from Pi, we could simply use SFTP, my favorite right out of notepad++ just add a plugin, right click the created file and select “Download File”.

alkathirikhalid

Now time to connect from remote, you will need to generate the proxy values:

  • Proxy End Point / URL
  • Proxy Port

You can do this from the web portal of your reverse proxy provider / server, grab those two values and swap them from the .ovpn file and connect, lets test by leaving my network and connect to another network.

alkathirikhalid

Now that I am connected to another network lets start OpenVPN.

alkathirikhalid

Success you can see data transfer started and I am able to access everything in my home network through the VPN as if I was in LAN.

alkathirikhalid

Things setup / Achieved

  1. Headless Raspberry Pi with SSH and WIFI
  2. Ad Blocker + Traffic Tracker / Filter + DNS using Pi-hole
  3. VPN using PiVPN
  4. Reverse Proxy using RemoteIT
  • No unnecessary DDNS Service
  • No Opening Ports / Port Forward in my network
  • Truly portable box, I just connect to new WIFI

With the above setup I just need the power cable to enjoy all the services, it also means I could carry it around remember portability and use Pi-hole on the go without VPN or leave it in another network and access it remotely using RemoteIT, surely “petite and portable” Winking smile.

Conclusion

Due to DIY nature of Raspberry PI, I think it would be great to have:

  • Power on / off toggle switch, so it would gracefully shutdown by halting all services prior killing the power
  • Temperature triggered fan rather than having it on with power on

These can be achieved by python scripts using the GPIO pins, then it would be with a breeze without SSH into it to trigger shutdown and power efficient with a temperature triggered fan.

Posted in Uncategorized | Leave a comment

Observer and Observable

alkathirikhalid

Using JAVA Implementation

Message Board (Observable)

package com.alkathirikhalid.demo;

import java.util.Observable;

/**
  * <p>
  * Message Board as Observable.</p>
  * <p>
  * It can be observed for new message changes, it can also have one or more
  * observers, when an observable object is newly created, its set of observers
  * is always empty at first.</p>
  *
  * @author alkathirikhalid
  */
public class MessageBoard extends Observable {

    /**
      * The message on the Message Board
      */
     private String message;

    /**
      * Getter
      *
      * @return message Board
      */
     public String getMessage() {
         return message;
     }

    /**
      * Setter
      *
      * @param message Board
      */
     public void setMessage(String message) {
         this.message = message;
         // Marks this Observable object as having been changed
         setChanged();
         // notify all of Message Board observers
         notifyObservers();
     }
}

User (Observer)

package com.alkathirikhalid.demo;

import java.util.Observable;
import java.util.Observer;

/**
  * <p>
  * User as Observer.</p>
  * <p>
  * Gets updated messages based on changes in observable Message Board.</p>
  *
  * @author alkathirikhalid
  */
public class User implements Observer {

    /**
      * Observable Message Board
      */
     private final MessageBoard messageBoard;
     /**
      * User In box message
      */
     private String inbox;

    /**
      * Constructor
      *
      * @param messageBoard the user is Observing
      */
     public User(MessageBoard messageBoard) {
         this.messageBoard = messageBoard;
     }

    /**
      * Getter
      *
      * @return in box message
      */
     public String getInbox() {
         return inbox;
     }

    /**
      * Setter
      *
      * @param inbox message
      */
     public void setInbox(String inbox) {
         this.inbox = inbox;
     }

    @Override
     public void update(Observable o, Object arg) {
         // Confirms the Observable is a Message Board Object
         if (o == messageBoard) {
             // Sets the user in box message as the incoming new message board
             setInbox(messageBoard.getMessage());
             // Prints to screen
             System.out.println(getInbox());
         }
     }
}

Test Application

package com.alkathirikhalid.demo;

/**
  *
  * @author alkathirikhalid
  */
public class TestApp {

    /**
      * @param args the command line arguments
      */
     public static void main(String[] args) {
         // New Message Board Instance
         MessageBoard messageBoard = new MessageBoard();
         // New User Instance Observing Message Board
         User user = new User(messageBoard);
         // Add User as an Observer of Message Board
         messageBoard.addObserver(user);
         // Update the Message Board with new Message
         messageBoard.setMessage(“New Message!”);
     }

}

Writing Your Own Implementation

Message Board Listener Interface

package com.alkathirikhalid.demo;

/**
  *
  * @author alkathirikhalid
  */
public interface MessageBoardListener {

    void update(String message);
}

Message Board Class

package com.alkathirikhalid.demo;

public class MessageBoard {

    private MessageBoardListener messageBoardListener;
     /**
      * The message on the Message Board
      */
     private String message;

    public void setMessageBoardListener(MessageBoardListener messageBoardListener) {
         this.messageBoardListener = messageBoardListener;
     }

    /**
      * Getter
      *
      * @return message Board
      */
     public String getMessage() {
         return message;
     }

    /**
      * Setter
      *
      * @param message Board
      */
     public void setMessage(String message) {
         this.message = message;
         // notify all of Message Board listeners
         messageBoardListener.update(message);
     }
}

User

package com.alkathirikhalid.demo;

public class User implements MessageBoardListener {

    private String inbox;

    public String getInbox() {
         return inbox;
     }

    public void setInbox(String inbox) {
         this.inbox = inbox;
     }

    @Override
     public void update(String message) {
         setInbox(message);
         // Prints to screen
         System.out.println(getInbox());
     }
}

Test Application

package com.alkathirikhalid.demo;

/**
  *
  * @author alkathirikhalid
  */
public class TestApp {

    /**
      * @param args the command line arguments
      */
     public static void main(String[] args) {
         // New Message Board Instance
         MessageBoard messageBoard = new MessageBoard();
         // New User Instance
         User user = new User();
         // Add User as a Listening to the Message Board
         messageBoard.setMessageBoardListener(user);
         // Update the Message Board with new Message
         messageBoard.setMessage(“New Message!”);
     }

}

Result

The same for both implementations

New Message!
Posted in Programming, Web Application, Web Developement | Leave a comment

DZ09 Smart Watch

So I was searching for an affordable smart watch with the below criteria’s:

  • China Made
  • Affordable
  • Programmable
  • Experimental

After like 2 weeks of research and going through reviews I was left with 2 choices:

  • DZ09
  • DM98

DZ09

DZ09

  • Affordable
  • Running on Nucleus RTOS
  • Runs .vxp apps
  • Able to run custom firmware supported by the device MTK Chip (There are different variation will elaborate later on)

DM98

DM98

  • Not so Affordable (At the moment give it some time)
  • Running Android 4.4
  • Runs .apk apps
  • Able to run custom ROM

Upon purchase, to my surprise all is well it was delivered in a nice package, everything is intact and functioning as expected, I tested:

  • Memory card Support
  • Sim Car Support
  • Bluetooth connectivity
  • Bluetooth communication
  • Making call and receiving calls
  • Taking pictures
  • Playing audio
  • Recording audio

Required App to Sync with Android Phone:

I have to admit it was my first actual online purchase and shipping experience, reason is because I would always prefer to buy what am seeing or holding, I guess this doesn’t get old.

Hacking TIME

After a week or so of getting bored of it I wanted more out of it like installing Apps and custom ROMS:

  • How about installing apps? I downloaded .vxp apps and try clicking to install… nothing happened!
  • Ok so how about making a back up? I downloaded FlashTool v5.1516.00 and tried to make a read back file… no that didn’t work!

Ok something isn’t right?! So I went out and do some research on XDA was it helpful?! no no no well maybe just a bit, points out that there are multiple DZ09 this was expected, ok so lets get to the bottom line, what hardware is my DZ09 packing?!

Hardware Validation

I needed to know the chip in the DZ09 as all the forums was talking plus the seller was advertising MT6260.

mauimeta

Well that’s not right mine is MT6261, ok maybe it isn’t so bad after all.

Hey hey how about Memory how much do we have of that? all the forums was talking plus the seller oh the good old seller was advertising 64MB.

norflash

Well that’s not right mine is 4MB, ok maybe it is that bad after all. With that much memory you can’t do anything literally the device is at its max! and all the ROMS out there are not for 4MB!!!

It turns out there are actual clones/fake of clones! and not actual DZ09!

clones

Everything looks good all in all but they are actually using old, outdated and unwanted chips from U8 (right device) smartwatches into DZ09 (left devices) smartwatches you get the look and feel but not the performance and specified specs, But hey you get what you pay for! 37RM including Shipping!

Making The Best Of What I Have

Now that I know what I am dealing with, lets get back to making a back up! do not follow the online tutorial if you are dealing with a piece of hardware like mine, set the read back file to 4MB:

  • 0x00400000

Yes Successfully extracted the ROM (4,096KB) and successfully extracted the read back file and generated:

  • config_mtk.cfg (3KB)
  • EXT_BOOTLOADER (31KB)
  • INT_BOOTLOADER (7KB)
  • FILE_01_mtk (1,060KB)
  • FILE_02_mtk (2,666KB)

Available Download:

With the backup at hand I was bold enough and I definitely bricked the device by using the wrong custom firmware which lead me to have a purple ugly screen that the icons seem out of place and of course I restored it back to life! Didn’t I just mention “With that much memory you can’t do anything literally the device is at its max! and all the ROMS out there are not for 4MB!!!”

Well I love the cheap phone watch I currently exclusively use it for:

  • Telling time, who am I kidding of course its a watch!
  • My third Alarm clock
  • External Drive for files (32GB), I paired it with PC via Bluetooth Intend for End of day short notes as its much faster to transfer big files via cable than Bluetooth
  • The battery can last me 2-3ish days as its minimum use to tell time only on lowest screen brightness and reduce screen time out

I will find other use for it soon…

Posted in Mobile Developement | Tagged , | 10 Comments

C.V.S.S

Certificate verification System Service, a web app for managing certificate issuing institutions.

Introduction

Institutions, Organizations, Employers and even Individuals, can now verify a certificate authenticity coming from the intended institution to the intended candidate, hence preventing forgery, duplication and even outdated certificates.

If you provide certification to any courses or training provided by your company or institution then you are at the right place to preventing forgery, duplication and even outdated certificates in circulation.

The system can also be used to simply offer e-certificates and save on paper.

Aims

CVSS bridge the gap between employee and employer who needs to verify a certificate by allowing institutions to provide minimum information (Candidate First.Last name, certificate id, description and date issued) of a certificate.

Traditionally Employer might call an institute directly but there are barriers such as :

  • Weekends

  • Public holidays

  • Different language

  • Time zone

  • E.t.c.

CVSS is here to serve all who:

  • Have no website

  • Rarely update their web sites

  • Have no IT background / person

  • Provide e-certificates

  • Save cost on printing ink and paper

  • C.V.S.S. is environmentally friendly

Verification Procedure

Verifying institutes and certificates provider by means such as:

  • Registered institution

  • Domain name @institute.edu / @institute.org / @institute.com / @institute.*

  • Gazette history

  • Reputation,

  • Address / location

  • Call

  • Walk in

  • e.t.c.

Admin Flow

Member

Allows admins to signup or sign in to CVSS

2.JPG

Fig 1: Member Section

Signup

Allows admins to provide their username, company email and password for account login, a confirmation code will be send to the email provided for verification.

3.JPG

Fig 2: Sign up

Account Activation

Upon signup admin will receive a confirmation code to activate the account. Copy and Paste the code or click the code link to activate your account from the email you received.

4.JPG

Fig 3: Account Activation

Sign In

Admin provide their username and password to access C.V.S.S.

5.JPG

Fig 4: Sign in

Dashboard

Provides admin with information such as last login and last logout time stamps.

6.JPG

Fig 5: Manager Section: Dashboard

Account

Provides admin with information such as account type, dated joined, status e.t.c.

Institution

Provides admin with first time option to set up their institution name and location this information is fixed and can not be changed by Admin.

Certificate

Provides admin with the ability to add the certificates into their institute with the option of either Attended / Complete / Pass remarks on the certificate.

8.JPG

Fig 6: Manager Section: Certificate

All Certificates

Provides admin with a list of all available certificates in their account with the ability to directly edit on any of the certificate ID, Name, Description and Date and also ability to delete a certificate.

9.JPG

Fig 7: Manager Section: All Certificates

Upgrade

Provides admin with the ability to add more certificate volume into their account, the basic free tire is 100 certificates per account per institution.

1.JPG

Fig 8: Manager Section: Upgrade

  1. Free Account Max 100 Certificates | 0$ Monthly Subscription
  2. Copper Account Max 200 Certificates | 2$ Monthly Subscription
  3. Bronze Account Max 300 Certificates | 3$ Monthly Subscription
  4. Silver Account Max 400 Certificates | 4$ Monthly Subscription
  5. Gold Account Max 500 Certificates | 5$ Monthly Subscription

Need more? contact us: cs@cvss.online

Current subscription price is at reduce price specifically for beta users .

User Flow

Home

The welcoming page allows a visitor to select the Institution they want to assert the certificate is from.

1.JPG

Fig 1: Selecting an Institute

Search

The second screen allows the visitor to input the certificate ID to search for instance 1000101.

2.JPG

Fig 2: Searching for a Certificate

Result

The visitor is present with the certificate information as per the certificate ID

1.JPG

Fig 3: Certificate Confirmation

API Access

The e-certificates can be distributed directly to candidates or added to websites. We will demonstrate base on the test link below:

Get method

Using calling method to the web container to get access of information

  • search?certificateid={certificateid}&institution={institution}

  • search?institution={institution}&certificateid={certificateid}

Links

Using links to be added to web sites or sent via emails

Badge

Using clickable badges / images to be added to web sites or sent via email

View Certificatecertificate.jpg

Contact Us

We are looking for institutions to offer the free tire and free consultations, no charges at all, drop us an email at cs@cvss.online

Let us know how we might help you.

Cheers!

Posted in Web Application, Web Developement | Leave a comment

Enhanced your Desktop, make it Organized and with functionality built in

So I decided to improve and manage better my desktop as I was getting tired of folders, files and short cuts just lying on the desktop, which was turning out to be unorganized and annoying to my eyes.

alkathirikhalid

Fig 1: Cluttered Desktop with Folders, Files and Shortcuts

Since am into knowing the bandwidth usage for my uploads and downloads the solutions was rainmeter provides “customizable skins, like memory and battery power, RSS feeds and weather forecasts, right on your desktop. Many skins are even functional: they can record your notes and to-do lists, launch your favorite applications, and control your media player – all in a clean, unobtrusive interface that you can rearrange and customize to your liking.”

The initial rainmeter skin is simple and aims at minimalistic features of raimeter, rainmeter itself is free and open source allowing individuals to be creative and create more variation of rainmeter and share with everyone else.

alkathirikhalid

Fig 2: Avengers S.H.I.E.L.D OS Options

My favorite after trying so many is Avengers S.H.I.E.L.D OS which has options allowing you to customize the UI without coding. And the end result for my Desktop is as seen below.

alkathirikhalid

Fig 3: Enhanced Desktop, Organized layout with functionality built in

I can access my applications right on the desktop including launching favorite website by just a click, I can see the ram and CPU usage, and not to mention I can control music right on the desktop as rainmeter integrates with winamp player.

www.alkathirikhalid.com

Thank You.

Posted in Desktop Developement | Leave a comment

A Voice In My Hand

This is a speech disorder assistive technology that allows individuals with speech impairment to communicate with their Android Phone. Users with special needs can now communicate comfortably in public areas, make a verbal order, request or introducing themselves has been made easy.

It can be used as a communication aid, a learning tool to pronounce words or simply for entertainment purposes hence much more suitable for users with speech impairment, I have improved its code to handle some aspects such as:-

  • Made simple for individuals with low cognitive
  • Speech synthesizers voice data detection
  • Wider cleaner Screen View
  • Tactile feedback
  • User Settings

Any further customization can be made possible upon requests, I have also decided to pimp it with a website so it can drive traffic to my app, this is an experimental marketing tactic, all Google analytics are fully functional for the site and app to allow me to deduce my return on investments (ROI), feel free to visit and download the App at www.avoiceinmyhand.com

alkathirikhalid Fig 1: Main Screenalkathirikhalid

Fig 2: Settings ScreenalkathirikhalidFig 3: Main Screen Landscape Mode

It’s been a month now since I built and launched both “A Voice In My Hand” Site and an Android App, it’s time to analyze the collective one month data from both the site and the android mobile app, for best practice it is wise to provide a Privacy Policy for your users both when visiting the site or downloading the App, mine can be found at http://avoiceinmyhand.com/privacypolicy/

Another pointer to add is that some companies or organization will have Privacy Policy for each App or Site or in short multiple Privacy Policy that address multiple applications which in turn leads to 20 plus Pages of Privacy Policy and in turn appears longer, confusing and a lot of users would not bother reading or for some paranoid user would not bother with your product especially if your company is not a Big time company.

The latest approach is to write a general Privacy Policy but it would not hurt to consult a lawyer, the one Privacy Policy is to address all the products and services in general within your company in one Privacy Policy document with precision and direct intent of your company intentions to acquire any data from users through any of it’s products or service. Making it simple would allow more legitimate users to scan or even read through and gain more trust in your company’s products and services.

alkathirikhalid 

Fig 4: Privacy Policy Page

Now I can deduce the data collected from both the site and the android app, some of the data from the screen will be blanked out for security reasons. Analytics allows an Account holder to have multiple Accounts and within each Account a User can have multiple Properties such as web sites and mobile applications, as seen below I have named my properties in a manner that is easy to distinguish between them by adding “Site” and “App” at the end of each property name, this is my naming convention for each project.

alkathirikhalid

Fig 5: Mobile Analytics

Launched Site date 25th September 2013 to supplement traffic to my app, as seen below the App has had a shoot in the number of downloads all thanks to the creation of the site which directs users to my app, as seen in the image below. This proves to an extend it is crucial to have a site to direct traffic to your app or vice verses.

alkathirikhalid

Fig 6: A rise in the number of downloads

The number of visits to the site is 126 with in the month as seen below coming form a number of sources such as direct, word press, Google search, face book and Google+. This does not necessary reflect the number of downloads of your app as user can also access your app through other means such as with in Google Play, other third party sites that offer reviews and links to Google Play itself. Just remember the site just directs but the actual download takes play at Google Play.

alkathirikhalid

Fig 7: Site visits and sources

These same information can be accessed via mobile device, which provide the same data but in a compact and presentable means not to mention convenient right from your pocket, as seen below:-

alkathirikhalid

Fig 8: Total Site Visits and Location

alkathirikhalid

Fig 9: Total Site visits and sources

alkathirikhalid

Fig 10: Page views and average engagement/visit duration

alkathirikhalid

Fig 11: Traffic sources based on Country

alkathirikhalid

Fig 12: Network Provider

alkathirikhalid  Fig 13: Number of pages and visits per page at the site

alkathirikhalid

Fig 14: Social traffic Acquisition

alkathirikhalidFig 15: Much more data

Lets deduce the App Data collected within the one month durations since both the Site and App has analytics, it allows us to be in the position to separate the two for more precise data, as seen the number of visitors was 126 but only 94 installations are recorded this could be due to that fact that some users phone might not be running Android or the Android Version is not supported, as the App “A Voice In My Hand” only support Android 4.0 and above:-

alkathirikhalidFig 16: Number of Active Users

The engagement information is quite useful since it allows us some insight as to when exactly are our users using our apps, this insight might allow us to determine the purpose in my case the App is used for entertainment especially during holidays such as weekends (Sundays) this points to social gathering or relaxing event, there is a portion slot on Monday but this is false Positive as Sunday still continues on other Countries and hence shown as Monday due to the time variation, there is a section on Thursday this could be due to the fact some Muslim Countries holidays or weekends are set as Thursday and Friday, this data will allow me to know when to launch for maximum engagement.

alkathirikhalidFig 17: Screen Views and Engagement/behavior pattern

Location data is also useful as it would determine whether or not to support other languages and set localization for your app as the statistics point Spanish language would be a great start for maximum audience.

alkathirikhalidFig 18: Audience Location and Sessions

Device type also is useful to determine the test environments for your app or anything else you could think of that Device information can be useful, the 4th last device “Sony Ericsson E10i Xperia X10 Mini” if you notice any device which for instance in this the mini X10 which only can run up to Android 2.1 but our App is Android 4.0, this is a rooted device running on a custom rom, hence if in future as a developer you notice some crushes you can opt to not support such a device as the out come is hardly predictable.

alkathirikhalidFig 19: Mobile Device used

Engagement per screen, this data is very useful as in the case some apps have critical data or settings that rarely any user access it the developer might change the layout to make the data more easily navigable, if you compare “Settings” data it is quite low as opposed to the number of views in the “MainActivity” main app, this is because settings are usually set just once and there is actually no need for the user to go to settings every time they open the application.

alkathirikhalidFig 20: Number of Screens and Views of the App per Screen  

The Developer console provides more useful information to developers such as whether there were any crashes encountered, as seen below no crash encountered with my app with any device.

alkathirikhalid

Fig 21: Developer Console, No Crashes

Further more recommendation are provided by the Developer Console in my case to design the app for tablets and offer translation to other languages such as German, Spanish and Russian.

alkathirikhalid    Fig 22: Developer Console providing Tips

I have had a total of 1,870 downloads to date, once you attain a download of above 1000, you as a developer will be receiving a lot of emails invitations from other sites such as

For those who are interested in publishing apps with Opera you can go through the link and also check out the User Agreement

Not to mention you will also be receiving a lot of spam if you provided your email address, spam such as someone trying to sell you a service or product in the name of improving your app or simply boast or claim they have helped a lot of people and they would like to help you blah blah. If only they understood the power of precise and brief information wins the day.

Due to providing a Site for my App I have accumulated not only more downloads and directed traffic but also raised my credibility as a Software Engineer, due to the fact that my email and name is available for individuals not only on my Personal site but also on “A Voice In My Hand” site and due to this I personally get contacted for freelance job which ranges from:- Ecommerce Systems, Web Sites, Search Engine Optimization, Android App development, Consultation and Training.

www.alkathirikhalid.com

Thank You.

Posted in Mobile Developement | Leave a comment

Root, Unlock Boot loader, Flash Custom ROM Jelly Bean 4.1.2 and Over Clock a Sony Ericsson xperia X10 mini Éclair 2.1

This is to demonstrate on how to get more from your old Sony Ericsson Xperia X10 mini, I was somewhat locked down on the amount of things I can do with my old phone since it was running on Android Éclair 2.1 given that it only has a Qualcomm MSM7227, Single Core 0.6 GHz processor, it always seem the right time to root and hack a phone once it’s warranty or usefulness has expired and that is exactly what I did with mine which I bought on mid year 2011 for the sol purpose of Android Apps Development. Note before taking this approach you might brick your phone and also ensure your antivirus and or windows defender is disabled.alkathirikhalidRooting a phone is easy these days with a lot of tutorials on how to root a specific Phone, first of all you need to enable debugging in your phone so as you will be in the position to send data and applications to your phone all credits go to http://forum.xda-developers.com/showthread.php?t=1254225 once your phone is rooted you should see super user app in your phone.

Ensure you have Sony PC Companion installed http://www.sonymobile.com/gb/tools/pc-companion/ this will allow you phone to be detectable when Unlocking your boot loader and you should get something like my image below, this will ensure your boot loader is unlocked.

alkathirikhalid

Fig 1: Verifying Boot loader has been unlocked

Once all that is done now you need to flash your custom ROM into your phone I used E10i_JBMP-Release4 since all the hardware has been tested and works smoothly http://forum.xda-developers.com/showthread.php?t=1779745, its fast and smooth until I ended up opening a lot of windows my phone slowed down and hanged, when it happened I was away from my computer and had to wait till the phone battery died since Sony Ericsson Xperia X10 mini has an internal battery, charged it and restarted it again this time changing its settings and over clocking it.

First thing I did was to give super user permission (Root access: Apps and ADB) to Android Debug Bridge so I can send more shell commands directly from my PC to my phone as in the case above When my phone hanged I had to wait till the battery died, with adb command I can easily send a reboot command (adb reboot) to my phone faster than using the phone itself, I can also send Linux core shell commands to my phone over the command prompt such as list (ls).

alkathirikhalid

Fig 2: Giving Root access to Apps and ADB

alkathirikhalid

Fig 3: Testing device shell access over cmd

It’s time to improve performance on the Xperia X10 mini, and here are the following.

  1. enable auto install directly into the SD card
  2. enable swap files (virtual memory)
  3. increase the processor clock speed
  4. memory management

But before all that I somewhat dislike cables laying around everywhere so I decided to connect to my phone via Wi-Fi and these are the steps you need to take, having a rooted device comes with it’s advantages, if you are working on big sized applications a cable would be your best choice for speed and data integrity over networks might lead to lost packets. Now you need to understand how adb works such as:

  • Emulator 1, will have a console: 5554 and adb: 5555
  • Emulator 2,  will have a console: 5556 and, adb: 5557
  • And So on

First we need to get super user permission for our terminal (su) then we set the adb service port to as above 5555/5557/5559 “adb port+2” take a pick (setprop service.adb.tcp.port 5555), after we pass this code we need to restart the adb to take effect of our new settings (stop adb) and (start adb), once all that is done we can verify that our settings are working to check just type (getprop service.adb.tcp.port) and it should return the port you set in my case 5555.

alkathirikhalid

Fig 4: Setting device adb service port

You need to know your phone local IP address for your network, you can either get it from the terminal or head to Advance WIFI Settings and grab it from there, in my case it’s 192.168.0.115

alkathirikhalid

Fig 5: Viewing device IP address

Now we need to make our adb server to switch from listening from USB to over WIFI network, I first start the adb server (adb start-server) then check for the number of devices connected (adb devices) which returns an empty list, now we need to connect our adb to our phone (adb connect 192.168.0.115:5555) I didn’t put the port number as by default the port number assigned to the first device is 5555 as I described above, command prompt return connected to 192.168.0.115:5555 and we are good to go. Remember for security reasons if another developer or hacker is within the same network they can connect to your device by just knowing your device IP address.

alkathirikhalid

Fig 6: Connect adb server to phone

If these see settings do not fancy you, you can always revert back on your devices by restarting it or passing:

  • su
  • setprop service.adb.tcp.port –1
  • stop adbd
  • start adbd

and from your command prompt

  • adb usb

To enable auto install directly into your SD card (adb shell pm set-install-location <LOCATION>) 0: Auto—Let system decide the best location. 1: Internal—install on internal device storage. 2: External—install on external media. and then check (adb shell pm get-install-location) you can access your device shell directly from your command prompt since we have super user (Root access: apps and adb) and are connected and the result is 2 which means external, bare in mind not all apps should be moved to the SD card as it might not be available when mounted/connected to the PC apps that need to run all the time should be left in your internal storage.

alkathirikhalid

Fig 7: Getting device install location

Now lets enable swap file (virtual memory) to allow our phone to use part of the External storage as RAM, head to JBMini Settings and select Swap Settings, enable it and select your desired swap size in my case 128MB will do just fine.

alkathirikhalid

Fig 8: Setting Virtual memory

Now let’s over clock our Qualcomm MSM7227, Single Core 0.6 GHz processor you need to head to Settings > Performance > Processor, I first set my Maximum CPU frequency at 0.806 GHz and things started going south and by my bad luck I checked the Set on Boot Option which means the system just keeps going back to the same problem, the phone froze restarts the battery indication is red even though its full charge in short the phone was not functional (word of caution ensure set on boot is disabled/unchecked before making any first attempt changes) I had to flash the custom ROM again. This time I set the Maximum CPU frequency at 0.710 GHz and the CPU governor ONDEMAND and Under volt the CPU to improve battery performance.

alkathirikhalid

Fig 9: Over clocking CPU speed

Now for memory management I set zRam to compress memory for increase virtual capacity by 18% which is the default value, too much will stress the system on compressing and decompressing memory, allow purging of assets and kernel same page merging.

alkathirikhalid

Fig 10: Memory Management and Compression

You may also desire to change the Background process limit to At most 3 from  Standard limit, within your Developer Options, this is not necessary it all depends on what applications you are going to develop.

alkathirikhalid

Fig 11: Limiting background process to at most 3 processes

and wow an increased of speed and usefulness on a tiny device with restricting hardware has been achieved!

www.alkathirikhalid.com

Thank you.

Posted in Mobile Developement | 2 Comments