Android – Deep Focus https://fazals.ddns.net/ Embrace it! Mon, 17 Aug 2020 10:02:09 +0000 en-US hourly 1 https://wordpress.org/?v=5.6.1 https://fazals.ddns.net/wp-content/uploads/2020/08/react-native-300-150x150.png Android – Deep Focus https://fazals.ddns.net/ 32 32 173186184 How do I log every domain/links my device is connecting to? Especially Android and iOS https://fazals.ddns.net/how-do-i-log-every-domain-links-my-device-is-connecting-to-especially-android-and-ios/ https://fazals.ddns.net/how-do-i-log-every-domain-links-my-device-is-connecting-to-especially-android-and-ios/#respond Mon, 17 Aug 2020 10:02:07 +0000 https://fazals.ddns.net/?p=2673 How do I log every domain/links my device is connecting to? Especially Android and iOS Read More »

]]>
First of all, monitoring and logging the http/https request response cycle from your android / iOS is a pretty difficult task. I wonder if Android and iOS even allows it. So, as far as I know, there are no such applications that track all the request-response cycles on your device.

But remember there is always a walk around for everything.

Introducing GlassWire

GlassWire is an application that allows you to see your current and past network activity. It is available for Android and Windows. Download links below.

Play Store
Download for Windows

It can you the the exact information about all the requests-responses made from and to your computer. Unfortunately, this feature is only available to the Windows application and not on android.

The windows application how ever records and stores all the information about how much data has been consumed in any given time. It also shows the live data usage in beautiful animations, it also gives details on how much data is used for a particular protocol and particular host. This serves our purpose.

Connect your Android or iOS device to a personal hotspot of your Windows PC, and voila, you have it.

Glass Wire UI
Source: My Quora Post

You might also like: Create a Website for free without coding.

Read Mohamed Farhan Fazal's answer to How do I log every domain/links my mobile is exchanging data? on Quora

Additional features of GlassWire

Other features of GlassWire include Network Monitoring, it gives you the details of other devices connected to your network. It also includes a built in firewall that allows you to break an app’s connection to the internet. And also shows which app is or has connected to what IP address and their country of origin.

Source: GlassWire’s official website
Source: GlassWire’s official website

Well, there’s always a catch. You have buy a premium version of GlassWire to have all these and much more features available to use.

Take a moment to share this article and help us grow.😀

GlassWire

GlassWire is an application developed for android and windows for network monitoring and firewall.

Operating System: Android, Windows

Application Category: Network Utility,

]]>
https://fazals.ddns.net/how-do-i-log-every-domain-links-my-device-is-connecting-to-especially-android-and-ios/feed/ 0 2673
How to turn your Raspberry Pi as a downloading client [Both Torrent and regular downloads] and NAS https://fazals.ddns.net/how-to-turn-your-raspberry-pi-as-a-downloading-client-both-torrent-and-regular-downloads-and-nas/ Mon, 27 Jul 2020 13:26:23 +0000 https://fazals.ddns.net/?p=2508

It’s always ideal to use your Raspberry Pi as a dedicated downloads server and as a NAS or “Network Attached Storage”.

Leaving your desktop or Laptop turned on for a prolonged period of time, not only is energy intensive, but also waste of resources. An average Desktop PC in a typical home or small office is likely to cost you a bill of around 15,000 Indian Rupees. (Roughly 200$).

The Raspberry Pi comes to the rescue. The new Raspberry Pi 4 costs only 35$, which is way cheaper than any laptop or a desktop and is not likely to add 0’s at the end of your electricity bills. A typical Raspberry Pi is likely to consume energy that costs less than 250 Indian Rupees yearly. Adding an external Hard Drive is pretty much not going to increase that.

Additionally, you can run the Raspberry Pi headlessly, without a monitor & without even Keyboard and Mouse. All you need is a WiFi/Ethernet connection and a USB power supply.

Sounds Good? So lets start converting your Raspberry Pi to a headless downloading machine that can download anything from the web.

Lets gather the stuff we need

1. The Raspberry Pi

We will assume that you have a Raspberry Pi (the version doesn’t really matter, but i recommend the Raspberry Pi 4B as it has a Gigabit Ethernet) running the latest version of Raspbian. (Now renamed to Raspberry OS)

2. An External USB Drive

It’s not necessary to have an external drive, but I do recommend you to use one which is USB 3, as it has better speed and doesn’t bottle neck the transfers.

Remember that if you are running the Raspberry Pi headlessly, you need to configure SSH to access it remotely. Setting up VNC is also a good choice. If you need any information on setting up Raspberry Pi headlessly, I strongly suggest you the follow the following guides.

  1. Everything you need to know to setup SSH, VNC on a Raspberry Pi and run it headlessly.
  2. How to set up Raspberry Pi as a Network Attached Storage.

Let’s get started

Assuming that you have the Raspberry Pi up and running with an internet connection, either from the Ethernet or the WiFI, we will get started with building our Raspberry Pi downloading client and NAS.

Step 1: Update & Upgrade

Before we start with the actual setup, take a moment to update and upgrade your Raspberry Pi to the latest version available. Open a terminal window and run the commands one after the other.

sudo apt update
sudo apt upgrade -y

Step 2: The prerequisites

Once that is done, its time to begin the installing the required software components for this project.

  1. We will be using Transmission as our torrent downloading client. And Aria2 as our non-torrent downloading client.
    But the directory in which the downloads are saved, can be the same for both or different based on your preference.
  2. For the NAS part, i recommend SAMBA. It is a free implementation of the SMB networking – the one used on windows. SFTP is also a very good choice, but SAMBA is windows ready.

Run the command below one by one in a terminal window to install all the required components.

sudo apt install samba samba-common-bin transmission-daemon aria2

We will also need the Apache http server installed on the Raspberry Pi for the Aria2 web interface. Run the following command to install Apache2 with php support.

sudo apt install apache2 php

Step 3: Create the download directories

We need some place where all of our downloads will be stored. And the same will be later accessed remotely from the NAS over the network. We will create the download directories in the home directory of the default user pi.

Run the following commands one by one in the terminal to create download directories, change ownership and to grant proper read-write permissions.

cd
mkdir Downloads
sudo chown -R pi: Downloads
sudo chmod -R 775 Downloads

The Download directory is now configured so that everyone can read and the root and logged in users can read and write.

Step 4: Edit the configuration files

Now that we are done with installing all the prerequisites, and creating the shared directories, we need to edit the configuration files for Transmission and SAMBA. But, any configuration file that we edit will be over written by the application while they are running in the background.

Run the following commands to terminate the downloading client’s and the SAMBA server’s background processes.

sudo service transmission-daemon stop
sudo service smbd stop

Firstly, we will edit the settings.json file.It is Transmission, our torrent downloading client’s configuration file. The file is located in the /etc/transmission-daemon directory.

sudo nano sudo nano /etc/transmission-daemon/settings.json

Within this file, we will modify the following configuration options.

"download-dir": "/home/pi/Downloads",

Change Your_Password with the one you will be using to login to the client

"rpc-password": "Your_Password",

Next, we change the username we want to use to connect to Transmission. The default will be “transmission”

"rpc-username": "Your_Username",

Whitelisting your local IPs should do that job if you are planning to use the downloading client from your local network, which in most cases starts from 192.168… Change the IP accordingly. *.*.*.* allows all IP addresses to access the client which is not recommended unless you know what you are doing.

"rpc-whitelist": "192.168.*.*",

Next we need to edit the SAMBA configuration file – smb.cong, located at /etc/samba/. I suggest you to go through the configuration file once as we will be creating a new configuration file and the default one will no longer be needed.

You can rename or delete the existing the configuration file. I prefer renaming as you have the original file to restore, in case something goes wrong. Run the following commands to rename the existing file and to create a new one using nano.

sudo mv smb.conf smb.conf.old
sudo nano smb.conf

Now copy the following lines of code to the new file.

[homes]
   comment = Downloads Shared Folder
   browseable = yes
   path = /home/pi/Downloads
   read only = no
   create mask = 0775
   directory mask = 0775
   public = yes

Save the modified file using Ctrl+X , y then Enter.
And that should complete the configuration.

Step 5: Start transmission and SAMBA & Aria2.

Now that we have completed editing the configuration files. We can safely start Transmission Daemon and SAMBA server.

Run the following commands to start transmission and SAMBA. And also run Aria2 – our non-torrent downloading client in background.

sudo service smbd start
sudo service transmission-daemon start
sudo nohup aria2c --enable-rpc --rpc-listen-all &

Step 6: Setting up Aria2 Web UI

Next we need to navigate to the http server’s root directory and download the files from GitHub for Aria2.
Run the following commands in a terminal window.

cd /var/www/html
git clone https://github.com/ziahamza/webui-aria2.git
sudo mv webui-aria2/docs/* .

And that’s all you have to do.

Accessing the Interfaces

The Transmission’s Web UI can be accessed on the port 9091 on the IP address of your Raspberry Pi. Where as the Aria2 Web UI can be accessed on post 80, the default http port.
Open your web browser connected to your local network and enter the ip address of your Raspberry Pi. For example: 192.168.x.x. This should open the Aria2 WebUI exactly like the picture below.

Aria2 Web Interface

You can add downloads from the add button, you can also pause and resume most of the downloads. You can also add torrents in the Aria2 download client. Yes you can download torrents in Aria2, but transmission is a better torrent client, Why? Check out the FAQ Section.

Now to access the Transmission WebUI you need to enter the ip address of the Raspberry Pi followed by a semicolon and the transmission RPC port which defaults to 9091. eg: 192.168.x.x:9091.

You should be getting a login prompt asking your Transmission User ID and password. Enter the user id and password you entered in the Transmission configuration file.

Now that you have your downloading clients ready, just go on and download something into the shared folder. And then access them on the SAMBA share. You can readily access them on your Windows PC (of course you have to have network discovery and file sharing turned on), and linux. For accessing it on android, you can use some file manager application which supports SMB. Like the ES File Explorer.

Accessing the SAMBA share

1. Accessing the SAMBA Share on Windows and Linux

Accessing the SAMBA share on windows is fairly simple. Open run and type \\ipAddressOfRaspberryPi, just like in the image shows below.

On Linux, Open your File Explorer and you should have it in the network section.

2. Accessing the SAMBA Share on Android

Download the ES File Explorer and install the application. Then go on to the LAN section in the Menu, your Raspberry Pi should show up in the application. If not you can always manually add it, all you need to know is the Raspberry Pi’s IP address.

3. Accessing the SAMBA Share on iOS

You need to install an application called as Document from the App Store and add the SMB Share in it.

Conclusion

There are other Torrent clients that you might want to investigate installing if you decide you do not like Transmission. The range is pretty limited for the Raspberry Pi but be sure to check them out.

At this point you should now have successfully setup the Transmission torrent client, Aria2 download client, and setup SAMBA on the Raspberry Pi. If you run into any issues, feel free to drop a comment below.😀

1. Why Transmission and not just Aria2?

Well, the answer is simple. Transmission also has a supported mobile app. You can use the app to directly push downloads to Transmission client and I find it more intriguing than the Web UI. You can download the Transmission Remote app to enhance your downloading experience.
]]>
2508
Android screen mirroring to Windows/Linux/Mac in just 2 mins using scrcpy https://fazals.ddns.net/scrcpy-android-screen-mirroring/ Tue, 28 Apr 2020 17:06:10 +0000 https://fazals.ddns.net/?p=816 Android screen mirroring to Windows/Linux/Mac in just 2 mins using scrcpy Read More »

]]>
Android screen mirroring is not as popular as other android customization like rooting. It’s namely because many people are just unaware of it, or it’s just they don’t want to face the hassel in doing so. Windows 10’s new android screen mirroring only works with a few phones. But there are other better alternatives to do this. If you ever wanted to control android phone from pc via wifi ? Read till the end and learn how to install and use scrcpy.

The best working choices you have.

  1. Scrcpy
  2. Vysor

Firstly, Vysor is an amazing app to mirror android screens to PC’s but most of the features are restricted to the paid version of the app. It costs $2.50 per month, $10 an year, or $40 for lifetime.

however, on the other hand, the best way to do it, is by using Scrcpy.
Scrcpy’s latest version is loaded with mesmerizing features and is the most simplest to use. It is an application that provides solution to display, as well as control your Android devices connected over USB ot TCP/IP. In short, wirelessly. It works just prefectly with Linux, Windows and macOS. And most importantly, it’s free and Open-Source.

The project scrcpy focuses on the following

  • lightness
  • Performance (30~60 fps on both USB and over TCP/IP)
  • Quality (1080p and even 4K)
  • Very low latency (35~70ms)

Features of scrcpy

  • Mirror and Control Android
  • High Quality
  • Full Screen
  • Wireless
  • Drag and drop file transfer
  • Customizable frame rate, resolution and bitrate.

Install scrcpy for screen mirroring

Firstly, you need to enable Developer Options on your phone.

Time Required: 5 minutes

  • Navigate to Settings > About Phone

  • Tap on the Build number until you get “No need, you are already a developer”.

  • Go back to Settings and navigate to System.

  • Click on Advanced and then on Developer Options.

  • Scroll down and enable USB debugging.

Connect your phone to your PC. And that’s all you have to do on your phone.

Get the app

Linux

On Debian and Ubuntu 20.04

sudo apt install scrcpy

A snap package is also available (For Ubuntu version < 20.04)

sudo snap install scrcpy

Windows

Download the zip archive with all the dependencies.
scrcpy-win64-v1.12.1.zip

macOS

The application for macOS is available in Homebrew. Just run to install it.

brew install scrcpy

Time to Run

Plug in your Android device in one of the USB ports and execute in terminal / CMD.

scrcpy

And thats it. You should see your Android’s screen on your PC. For further documentation, visit the github page.

FAQs

What does scrcpy stand for ?

Scrcpy can split into 2 parts. The first one as scr which means screen and cpy stands for copy.

Can scrcpy be used wirelessly ?

In simple terms, the answer is yes. Connect your android to the same network as your laptop/PC and then connect it wirelessly using the command adb connect ip_address:port command. And then run scrcpy

No audio when using scrcpy ?

Unfortunately, scrcpy doesn’t support audio transmission natively, but is possible in linux using an alternate method. Visit the official documentation for more information on audio transmission.

How do you set the resolution in scrcpy ?

The answer to that is very simple. Just append the parameter -m followed by the resolution, for example scrcpy -m720, it will automatically adjust the maximum resolution of the longer side to 720p.

Can scrcpy be used to capture Netflix ?

Yes, scrcpy can be used to capture netflix, but you need to record the audio separately as it is not natively supported by scrcpy

Feature Usage Shortcuts

ActionShortcut
Switch fullscreen modeCtrl/Cmd+f
Click on HOMECtrl/Cmd+h | Middle-click
Click on BACKCtrl/Cmd+b | Right-click
Click on APP_SWITCHCtrl/Cmd+s
Click on MENUCtrl/Cmd+m
Click on VOLUME_UPCtrl/Cmd+↑ (up)
Click on VOLUME_DOWNCtrl/Cmd+↓ (down)
Click on POWERCtrl/Cmd+p
Power onRight-click
Turn device screen off (keep mirroring)Ctrl/Cmd+o
Rotate device screenCtrl/Cmd+r
Expand notification panelCtrl/Cmd+n
Collapse notification panelCtrl/Cmd+Shift+n
Copy device clipboard to computerCtrl/Cmd+c
Paste computer clipboard to deviceCtrl/Cmd+v
Copy computer clipboard to deviceCtrl/Cmd+Shift+v
Enable/disable FPS counter (on stdout)Ctrl/Cmd+i

Intrested in reading about Google Cloud and Services it offers ?

Learn how to setup a custom blynk server and start your IOT projects.

]]>
816