31 December 2025

Hopes for AI in 2026

Andrew Ng's team recently asked what people's highest hopes for artificial intelligence is for 2026. Given that the year 2025 is widely considered the year that AI really started being adopted by the industry, and with even Sam Altman saying that he isn't sure what direction AI would take, the responses to the question asked by Andrew's team showcased a small snippet of what people expect to see. 

I was honored that one published response was mine.

My thoughts were composed of three major points:

1. Inspiring new directions of thought, to take technology beyond what the Transformer architecture is capable of. Although people are impressed with GPT, the fact remains that many people don't really understand how it works. It is necessary for students to build AI from scratch and build tools to observe how "intelligence" emerges as the AI is trained with more data. Even if working with a smaller amount of training data, such efforts (when built with proper experimental tools) could help people understand the basics of how the pseudo-intelligence manifests itself, and how to improve it. This is crucial not just for designing better architecture, but also for designing better primitives. VL JEPA is one thought process in the direction of change, similar to my thesis proposal of the universal event model. Chronos 2 is another technique, which is very similar to my thesis proposal of partial contexts.

2. Fundamental changes in academia: The way academia encourages research, needs to be modified to help scholars truly explore and innovate/invent new technology. This requires better decisions on stipends, a focus on quality over quantity (paper publishing), and access to good computing power. It is crucial to connect researchers from various fields so that they can brainstorm and ideate, based on the various innovations each of them created in their respective fields of hardware, biological research, and software. It would help to incentivize innovation in more directions. Not all of it may be fruitful, but the exploration of ideas is necessary.

3. Corporations and governments creating leisure: While competition is good, the way it is currently being done is ending up creating burnouts instead of fostering healthy work environments. The manner in which the economy is designed itself may need a fundamental change, to enable countries to cooperate and take civilization forward. 

Humans have achieved a civilizational leap in technology with the current advancement of AI. I hope the magnanimity of people among us would propel AI to a level that can help us create a heaven on Earth and beyond the solar system. To do that, we need to build a healthy foundation that is very different from the existing local optima that evolution is stuck at. Perhaps one way to progress would be to incorporate artificial intelligence and machines into the human body and create super-humans.

There were more opinions shared in part 2 of the hopes for AI.

For now, let us see what 2026 has to offer! 

03 December 2025

How to auto adjust the volume across audio of multiple media files while it is being played?

It's not called "normalization" or "equalization". It's actually called Dynamic Range Compression (DRC). This is the setting to choose in VLC, as I understood from the Geekality blog

DRC in VLC 

To enable it in VLC, go to Tools >  Effects and filters > Compressor. Click the "Enable" checkbox and adjust the values to the following: 

  • RMS/peak: 0
  • Attack: 50 ms
  • Release: 300 ms
  • Threshold: -20 dB
  • Ratio: 20:1
  • Knee radius: 1 dB    
  • Makeup gain: 12 dB 

These are the values from Geekality which worked well, but although a cursory explanation is provided on the blog, the explanation was not good enough to be able to understand the what and why to know how changing those values would affect the ability of VLC to adjust the volume. This is where I asked Grok and found out:

What the terms mean

  • RMS/Peak: Uses peak level (fastest reaction)
  • Attack: How fast it clamps loud spikes
  • Release: How fast it lets the volume back up
  • Threshold: Anything louder than –20 dB gets squashed
  • Ratio: Turns 20 dB over threshold into 1 dB 
  • Knee: Very sharp bend (hard knee)
  • Makeup gain: Boosts everything after squashing

So for the values given above, loud peaks are crushed instantly, quiet parts stay quiet, then the whole track is boosted 12 dB. This makes music/video feel flat and loud, but pumping (volume breathing) can be heard on songs with big dynamic swings.

  • Pumping / Breathing: Volume drops after loud parts, then slowly rises again.
  • Spikes slipping: Short loud bangs escape and surprise your ears. 
  • Transients: The sharp “crack” at the start of drums or claps. 
  • Dynamic swings: Natural loud-quiet changes in music or speech. 
  • Constancy: Everything stays at the same volume. 
  • Hard knee: Compression kicks in suddenly (sharp bend). 
  • Soft knee: Compression fades in gently (smooth curve). 
  • Peak: The single loudest instant. 
  • RMS: The average loudness over a moment.
  • Squashing: Forcing loud parts down to match quiet ones. 
  • Makeup gain: Boosting the whole sound after squashing it flat. 
  • Fast attack: catches transients (no spikes slip).
  • Slow release: avoids pumping.
  • High ratio + low threshold: maximum squashing = maximum constancy.
  • Soft knee + some RMS: sounds natural, less robotic.

How changing the values affects volume

  • Threshold ↑ (e.g. –12 dB) : Less of the track is compressed → dynamic swings remain → worse constancy. 
  • Threshold ↓ (e.g. –30 dB) : More of the track is compressed → everything flattened → better constancy (but can sound dead). 
  • Ratio ↑ (e.g. 30:1) : Stronger squash → better constancy, but risk of lifeless sound. 
  • Attack ↑ (slower, 200 ms) : Misses fast peaks → sudden loud spikes slip through → worse constancy. 
  • Attack ↓ (faster, 5 ms) : Catches every spike → better constancy, but can distort transients (drum hits). 
  • Release ↑ (slower, 800 ms) : Volume stays low for longer after a loud bit → quiet parts after loud parts sound muffled → worse. 
  • Release ↓ (faster, 100 ms) : Volume recovers quickly → can cause pumping (breathing) → worse if too fast. 
  • RMS/Peak → 1 (full RMS) : Ignores clicks/spikes, reacts to average → smoother, less pumping, slightly less perfect peak control.
  • Knee ↑ (softer, 6–10 dB) : Compression eases in → more natural, slightly less perfect constancy. 
  • Makeup gain ↑ : Whole track louder → helps quiet parts match, but can clip if too high. 

Recommended Presets 

Podcast / Speech: Maximum constancy, no pumping

  • RMS/Peak: 0.7 (mostly RMS, ignores clicks)
  • Attack: 15 ms
  • Release: 150 ms
  • Threshold: -24 dB
  • Ratio: 12:1
  • Knee: 6 dB
  • Makeup gain: 10 dB

Pop / YouTube Mix: Loud but still musical

  • RMS/Peak: 0.4
  • Attack: 25 ms
  • Release: 200 ms
  • Threshold: -18 dB
  • Ratio: 8:1
  • Knee: 4 dB
  • Makeup gain: 8 dB

Movies / Drama: Preserve dynamics, just tame peak

  • RMS/Peak: 0.2
  • Attack: 50 ms
  • Release: 400 ms
  • Threshold: -14 dB
  • Ratio: 4:1
  • Knee: 8 dB
  • Makeup gain: 6 dB

Classical / Jazz: Light touch, almost no squash

  • RMS/Peak: 0.1
  • Attack: 80 ms
  • Release: 600 ms
  • Threshold: -10 dB
  • Ratio: 3:1
  • Knee: 10 dB
  • Makeup gain: 4 dB

Bottom Line

  • Want radio-loud constancy? Lower threshold, high ratio, fast attack, medium release, add makeup.  
  • Want music to breathe? Raise threshold, lower ratio, slower attack/release, softer knee.  

Audio volume adjustments on other software

  • Audacity: It has a compressor and a limiter. 
  • EasyEffects: It appears to be able to adjust various input and output sources. 
  • Other options on Ubuntu: There's pacmd, swh-plugins and Dyson compressor. 

Disclaimer: A lot of the information about the meaning of the audio terms were generated by Grok, so do take it with a pinch of salt.

21 October 2025

Where to find an old version of Firefox for using on Android 7 and below

Firefox no longer supports Android 7, so Google Playstore no longer displays Firefox. No worries. It's possible to obtain an older APK of Firefox from the Firefox archives itself instead of downloading it from any other dubious source. 

I found version 143.0.4 here: https://archive.mozilla.org/pub/fenix/releases/143.0.4/android/

  • Version fenix-143.0.4-android-arm64-v8a: 112MB. This is for 64-bit ARM CPUs (ARMv8 architecture).
  • fenix-143.0.4-android-armeabi-v7a: 109MB. This is the application compiled for 32-bit ARM CPUs. This is the Android Application Binary Interface (ABI) that corresponds to the ARMv7 architecture.
  • fenix-143.0.4-android-x86: 121MB. This APK is for 32-bit x86 architecture, which is used by processors from companies like Intel and AMD. This is not compatible with an ARM processor.  
  • fenix-143.0.4-android-x86_64: 116MB. This is for 64-bit x86 processors. An ARM device cannot run this APK.     
  • fenix-143.0.4-android: 342MB. This directory likely contains a "universal" APK or an Android App Bundle (.aab) which contains all the APK files. If you were installing through the Google Play Store, it would deliver the correct file for your device, but for a manual installation, the specific armeabi-v7a file is the safest and most direct option.

Google's AI said that although there are technically no issues with using an old APK, there are some security considerations. It will be missing the most recent security patches and bug fixes. This can expose you to security vulnerabilities that have since been discovered and fixed in newer versions of Firefox.

It's sad that Android was built like this. There should have been an option available for upgrading to a newer version of Android even on older devices. I was hoping that Pine phone would come to the fore, but it looks unlikely. 

As per what I've heard recently, Android 10 onward supports the updation of core system components. Google is also possibly making it a reality to run the mainline Linux kernel which would make it easier to upgrade the kernel.


08 September 2025

Organic terrace gardening (OTG): Oota from your Thota (food from your garden)

The Times of India had an article about an Oota from your Thota (OFYT) meetup at St.Johns road on 7th September. I heard of such events happening in Electronic city in 2013, but since this was close enough I decided to attend. Oota is the Kannada word for food and Thota is the word for garden. What surprised me is that as per this article there were more than fifty thousand mini farms on people's terraces in Bangalore in 2020. An initiative that was begun by Dr. B. N. Vishwanath who created an NGO named Garden City Farmers way back in 1995. Unfortunately they seem to have stopped publishing on their website and switched over to Facebook, Whatsapp and Instagram, none of which I use. Particularly after reading this security warning. Anyway, OFYT organizes frequent meets where they even share seeds, so the seeds eventually become a Thota from somebody else's Oota :-) which then grows into an Oota from your Thota. Somebody even created a nice cheatsheet for home gardeners.

At the event what surprised me was the drive everyone had. They were very courteous, eager to help and made sure they proactively asked questions to figure out what problems people were facing with their terrace garden and readily offered suggestions and options on how to tackle the problems. There were various types of stalls put up around B.M. English school along the footpath. I heard there was even a workshop held inside the school regarding composting, but I missed it because one of the scouts told me there was no stall inside the school, and because there was no announcement about it other than a tiny sign that pointed to the school saying "workshop".



An encouraging glimpse into the world of various terrace farmers in Bengaluru.

 


These grow bags seemed quite sturdy. The small ones cost Rs.65.


Natural chemical free products from Little Silk (I believe this is different from another brand named The Little Silk)

 


Natural soaps. I felt they could have improved the appeal a bit more by using mounds with smoother edges and they could have also put up a poster explaining exactly how these natural soaps are better than the commercial soaps we use. Also about how the commercial soaps may be affecting health if it does. 

 


Natural lipsticks using beetroot, rose and perhaps natural oils.

 


Chocolate wax to remove tan, natural facials, etc.

 


Various food powders.

 


Organic honey, ghee, nuts, etc.

 


A green kitchen whose people are willing to teach you how to reuse or recycle things in such a way that you reduce waste significantly.


Ananth plate bank provides free steel plates, spoons, tumblers and bowls for any event you organize. You have to collect it from them, use it for your event, wash it and return it at your expense. There's also a security deposit. But otherwise it's free to use and return. Their objective is to reduce waste by allowing you to use the utensils for free.

A mixture of powdered pre-cooked organic millets etc which can be dissolved in water or milk and consumed

Various gardening tools

Decomposting agents 

Compost and manure

Rooting aid



A stall showcasing items which I understand was supported by the ministry of tribal affairs. 

These are lanterns made from actual vegetables. An electric bulb can be placed inside, creating beautiful light patterns. 


Sound tubes used by tribals to communicate during hunting. The bamboo tubes have zig zag channels inside and seeds flow down them when you turn the tubes upside down, creating a unique flowing noise.

 

The rhino on the right is said to be made from Assam tea plant wood




Bows used by fishermen in Andaman. The actual arrows used by fishermen would have metal heads. The arrows are shot through a hole in the middle of the bow so the arrows have no fletching. The arrows are said to be able to fly as far as 100m. The bow costs around Rs.450, and two arrows (with wooden arrow heads) are given with it.

 


Various homemade snacks made with organic oil and organic raw materials, prepared by a brand called "Tasty Crunchy Products" at Kammanahalli. They even make Kerala pappadam and appalam. 

Various organic pickles


Eco urban farms provide elevated garden growing containers on rent. They also help with growing the veggies by coming to your house and doing the work every month. Total cost of the rental and maintenance is Rs.5000 per month. Else, you can purchase these containers. The container slightly larger than what's in the picture cost Rs.6500. It's made of fiberglass (though it looks like aluminum) and they have other types of containers of other materials too. The weight matters, because a roof can only safely support around 200kg per square meter. Although this initially seemed ok to me, I later found large rectangular geo fabric grow bags which were far cheaper and seemed to offer more breathability (with the disadvantage that some of the bags didn't seem to be designed to hold their structure well).


Various saplings, grow bags and garden tools available for reasonably cheap prices. The saplings on the right were just at Rs.5 each.

 


Various kinds of rice and millets from JivaBhumi. There is actually something different about these food items. Although I was skeptical at first, I found it to be somewhat reliable (though I need to consume a bit more to confirm). There are specific instructions on how long to cook these rice varieties and how much extra water to use. Some can even be soaked for long to germinate them, which increases nutritional value. I had a conversation with the co-founder who seemed to be a genuine person.


Organic sugar, jaggery, dal, ancient variety of wheat.

Cold pressed oils

Various other snacks and pickles created from organic produce...


 

Products from Quantum Leap (they have a vertical named Quantum Leaf) for terrace gardening.




Various seeds available at reasonable rates. They'll send it to you via speedpost when you order.







Various products from Akshayakalpa. It's worth watching their Good Food Movement videos https://www.youtube.com/@goodfoodmovement

 

Products from Biological Research Innovation Centre and Solutions  (BRICS)

 

MycoDim is a broad spectrum, contact foliar fungicide that prevents a variety of diseases on ornamentals, trees, potted plants, fruits, vegetables and turfs. SasyaRakshak is a water-soluble plant protectant, carefully designed to contain all good constituents derived from select botanicals of known pesticidal properties. The combination of active ingredients from these plant sources provides excellent protection to the crop plants against sucking (Aphids, thrips, mites, mealybugs, hoppers, and bugs) as well as biting ( leafminers, caterpillars, beetles, weevils) insects.

 


Natural shampoos, hand wash and face wash

 

The stalls were put up on an actual footpath

Oota from my thota

In around 2014, I purchased a few grow bags and tried growing some veggies on my terrace. 


Tomato, curry leaf, coriander, pudina, mustard, green chillies and even an apple sapling grew.

The first tomato harvest had a worm/caterpillar enter one of the tomatoes. I soon found that a butterfly or moth was laying tiny yellow eggs on the leaf and those were becoming the caterpillars that ate the tomato. Removing the eggs early helped avoid that issue. I didn't purchase any seeds. I used the seeds from whatever veggies I purchased  from stores. I did face issues of the soil getting very soggy during rains, the water at the base of the grow bag accumulating at the bottom without draining off sufficiently from the drainage holes, earthworms slithering away during rains, fungus at the roots and those white flies infesting the green chilly plants. I was pleasantly surprised to see small honeybees visiting the plants, preying mantis, lady bugs and even dragonflies. There were also times I saw some plants squashed, which I assumed was because a feral cat either walked over it or used the place as a bed. I have some reason to believe it even used the soil as its private restroom. 

I mentioned some of these issues I faced, to the people at OFYT and they gave me some nice solutions like collecting the leachate using a container below the grow bag and reusing it for watering the plants after diluting it. 

There are things that can be improved with such initiatives in terms of being able to make people aware of what is available, visualizing where organic farms are nearby on a map, using tools like what3words or digipin, a trained LLM that can explain things for people instead of them having to connect with a person and worrying if one would be disturbing them, using a website or a dedicated organic farming app instead of third party tools like WhatsApp, Facebook and Instagram. Since organic food is expensive, there is much to be done to ensure that people have better access to organic food from reliable sources. 

How can we trust the organic produce? 

As for the organic produce, one of my main concerns has always been whether the farmers were honest. I was told that Aditi organic certification and India Organic certification ensures that farmers are compliant, but there is also the fact that those whose turnover does not exceed Rs.12 lakh do not have to go through the verification of compliance. Even for those who comply, there are residual limits of insecticides, other contaminants, heavy metals and toxins measured by the certification agency. This makes me worried about whether at least some farmers may use diluted insecticides etc thinking that nobody would find out. Whether the certification agencies are honest/thorough. Whether adulteration happens. Whether PFAS contamination from rain could be an issue even in remote areas. These contaminants can apparently cause kidney cancer, testicular cancer and thyroid issues and remain in the bloodstream for long. 

If you thought teflon coated pans are safe, the video below shows why it is not. If cooking with stainless steel makes food stick to the pan, the video also explains how to overcome the issue by proper pre-heating and using a drop of gliding water to check.

Then one wonders how many farmers in India know of the effects of the herbicides they use. Shockingly, even after a ban on glyphosate in 2022, there is a 2023 article that says farmers are allowed to use it, and is probably still being used in tea plantations (I wonder if that's what gave me immediate stomach discomfort on consuming green tea). Glyphosate is said to be one of the reasons for non hodgkins lymphoma as per the video below.


Then there's the issue of price. Most of the organic produce is priced at double the market rate or more. An organic farmer named Naveen in Mysore says that organic food could be priced 10% or 15% higher than other food. This seemed reasonable to me. However, I need to find out the realities of organic farming to understand the actual costs involved. Whether they get subsidies, what their actual costs are with respect to getting the soil ready for safe farming, what the FPO's (farmer producer organization) or investors take as their share, and any other realities.

Healthy food is not meant only for the rich. It's a basic necessity of life.  

I also noticed that there is a National Centre for Organic and Natural Farming (NCOF) and a Participatory Guarantee System for India (PGSI). It looks like the nudge for organic farming is slowly gaining pace. Long ago Mr. Lal Bahadur Shastri had created a slogan "Jai Jawan, Jai Kisaan" to boost the morale of soldiers and to motivate farmers to address the food shortage in the country. At least now that we aren't in such dire situations, I would like to say "Jai Kisaan" to those farmers who care about the health of the end consumer and also to the people in the supply chain who ensure that the food is not contaminated by the time it reaches the consumer. 

Technology needs to be utilized well to match demand and supply. One thing I liked about Farmizen is how for some products they show the time left for expiry of the product and also show how many units have been sold and how many remain (but I felt that like some other stores, the pricing was too high). There is much more that can be done to improve the analytics and predictability of consumption of organic food using algorithms.

When is anyone going to say "Jai Software Engineer"? :-) 

 

09 August 2025

A poem narrated by a poem: Poem Speak

In October 2006 during a boring train ride I realized it had been long since I wrote poetry (previously written for my school and college magazines and a few poems written during a poetry duel with my uncle). So I considered writing a poem, but it took a while to get that spark of inspiration.

Poem Speak 

I wandered alone, not knowing why.
Walking the thick jungle, looking out for the sky.
He knows I'm here, I assured my heart.
All he needs is a little head-start.
For months together have I been.
A thought, a wish, in this jungle unseen.
He set my heart beating. Now it shall not cease.
For my departure shall put this jungle at ease.
I ask him, I plead him, to set me free.
For I am a poem, yearning to be read by thee.

Written on: 27/10/2006 

 

What the poem means: 

The jungle is my mind, in which the thought of writing a poem has been going on for a long time. It remained a thought for a long time. Couldn't get started with it because I didn't find myself in a mood for writing poetry. Although once the poem found it's way out of my mind, onto paper, my mind is once again at ease and the poem is happy that I set it free. 

How it's relevant to poets

Poem Speak is essentially a poem writing itself. During the literature survey for my MTech in Artificial Intelligence, I came across the fact that neurons go through the jungle of the brain and are guided to other neurons via guidance proteins. Neurons even tend to seek out connections. Poem Speak poetically personifies (if I could use the term liberally) the thought process of every writer or poet who is stuck with writers block and eventually figures out what to write. The process of thinking of what to write perhaps being physically manifested by the neurons in their brain seeking out connections and building a pathway of prose which takes shape and finds its way to becoming alive in the minds of everyone who reads it.

I submitted the poem to a weekly magazine for speculative fiction. Although it wasn't accepted, the reviewer wrote back appreciating it, saying that since the poem had a fun twist at the end, it worked well and caused him to re-read the poem.

 

07 August 2025

How to use Github SSH when working with more than one Github account?

I had earlier written about how to use an SSH key to clone, push and pull from Github.When working with more than one Github account, Git automatically considers only the first key even if you add a second key file in the ~/.ssh folder. To make Git recognize the right file, you need to add a new config file in that folder.


First add a new ed25519 file (like how it's normally done) for the second account and give it a new name like id2_ed25519.
Then create a new file named config.

Now add this exact text into the config file:

# First GitHub account
Host github.com
    HostName
github.com
    User git
    IdentityFile ~/.ssh/
id_ed25519

# Second GitHub account
Host
github-second
    HostName github.com
    User git
    IdentityFile ~/.ssh/
id2_ed25519

If there are any errors related to file permissions, change the permission using chmod 600 ~/.ssh/id2_ed25519 but it's unlikely there would be such issues.

That's it. Now to clone from the first account you can use the equivalent of:

git clone git@github.com:username1/gitRepository1.git

To clone from the second account you can use the equivalent of:

git clone git@github-second:username2/gitRepository2.git


09 July 2025

Installing PyEnv on Raspberry Pi

Earlier I detailed the steps for installing PyEnv on Linux, but there are some small changes for doing the same on Raspberry Pi, so for my reference and the reference of anyone else, I thought I'd mention it the way Sam Westby did, but thought I'd automate the process by creating a script which even adds the necessary lines to bashrc.

#!/usr/bin/env bash

echo "Proceeding with installing PyEnv"

curl https://pyenv.run | bash

#Add environment variables to bashrc

echo "export PYENV_ROOT='$HOME/.pyenv'" >> ~/.bashrc

echo "[[ -d $PYENV_ROOT/bin ]] && export PATH='$PYENV_ROOT/bin:$PATH'" >> ~/.bashrc

echo "eval '$(pyenv init - bash)'" >> ~/.bashrc

#Restart the terminal to make bashrc changes effective

exec $SHELL

#Install other required packages

sudo apt-get install -y libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libgdbm-dev lzma lzma-dev tcl-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev wget curl make build-essential openssl

pyenv update

pyenv install --list

pyenv install 3.12.10

pyenv global 3.12.10



05 July 2025

Imager: Evolving image enhancement settings instead of manually tweaking them

This was an idea I got during the first year of my MTech in AI. There was an image with poor contrast which I wanted to enhance, but given the various ways of enhancing images and it being difficult to narrow down on the right settings, I created a Python program which used Differential Evolution to explore various values of various combinations of settings, and narrow down on the kind of image quality I wanted. My professor was happy to see the program working, but because the "fittest" individuals of the population had to be manually selected by the User (subjective technique), my professor suggested trying to find an objective technique of doing it. Since what a person is looking to enhance in an image would be subjective, perhaps one objective way of doing it would be to prompt an AI and the AI could come up with an objective score. Anyway, since my Python program was not very accessible, I decided to create the program in JavaScript and make it available on GitHub.io as Imager: https://nav9.github.io/Imager/image-filters.html.


All you have to do is upload an image, and Imager will use Particle Swarm Optimization to randomly apply a chain of image processing steps to copies of the image. You can click images you like, and the "swarm" of settings would slowly converge to variations that are closer to the kind of settings that give you the kind of enhanced image you want. If you don't like any image, simply avoid clicking any of them and continue clicking Evolve, which will generate more random settings and values.

Since Imager runs on the browser as a fully client-side app, it's advisable to not use very large images. If your objective is to apply selected settings to a large image, you can always use the "Manual" button which allows applying settings to more than one image you choose to upload. 

Imager is merely a demo app. It can be made far more powerful as a desktop app or with server-side functionality. Do have a look at the other image resizing and cropping options in the navigation bar of Imager. 

28 June 2025

Access internet on Raspberry Pi when connected to two network interfaces

I had a Raspberry Pi 3B connected via LAN cable to a Wifi router which wasn't connected to the internet. Through the router I could connect to the RPi via my desktop PC's Wifi. So VNC and SSH worked nicely in terms of being able to view the RPi desktop and being able to exchange files via scp. However, when I activated my phone's hotspot and the RPi's Wifi connected to the hotspot, I could not access internet.

I soon found out that this happened because the RPi gave a higher priority to the LAN connection than to the Wifi hotspot. So it was just a matter of changing the priority in a few simple steps.

Type `ip route show` to see the existing connections. You may see something like this:

default via 192.168.1.1 dev eth0 proto dhcp src 192.168.1.2 metric 100

default via 192.168.42.1 dev wlan0 proto dhcp src 192.168.42.125 metric 600

What this means is that the gateway for the LAN connection (eth0) is 192.168.1.1 and the IP is 192.168.1.2. The gateway for the wireless connection (wlan0) is 192.168.42.1 and the IP is 192.168.42.125. Since the LAN is listed first, it has the higher priority. So you simply need to add the route to the wireless IP address:

sudo ip route add default via 192.168.42.125 dev wlan0 

You can confirm it got added to the top of the list by typing `ip route show`.

Then simply restart the network service. If `sudo systemctl restart networking` or `service networking restart` gives this error: `Failed to restart networking.service: Unit networking.service not found`, then you can simply type (it didn't disrupt my VNC connection):

sudo ifconfig eth0 down && sudo ifconfig eth0 up &

This will restart eth0 and you'll be able to connect to the internet. You can check by typing:

ping 8.8.8.8 

04 June 2025

Accessing an Android phone via ADB using a Linux desktop PC

It turns out, one way to reduce the size of a Flutter app, is by splitting it into builds for each specific device architecture you want. So if you type:

flutter clean; flutter build apk --split-per-abi 

It'll give an output like:

✓ Built build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk (6.9MB)
✓ Built build/app/outputs/flutter-apk/app-arm64-v8a-release.apk (7.4MB)
✓ Built build/app/outputs/flutter-apk/app-x86_64-release.apk (7.6MB) 

Now I needed to know which one I could use on my phone, and realized that in all these years, I didn't bother finding out what architecture my phone was running. 

So I activated Developer Options and USB Debugging on my phone and did the following:

sudo apt update; sudo apt install adb

Now ADB (Android Debug Bridge) should be installed. To see which devices you can connect to via ADB, type:

adb devices

You'll be asked on your phone for permission to do USB debugging. Grant it.

Now either type: 

adb shell uname -m

Or, just:

adb shell

And then type:

uname -m

And now I know the phone is armv7l, which is an ARM 32 bit architecture.

So now I know I could have also tried:

flutter build apk --target-platform android-arm --analyze-size


There are many other ADB commands:

To copy files: 

adb pull /path/to/phone/file /path/to/desktop/folder

Mount the phone onto the Linux filesystem:

sudo apt install adbfs
mkdir ~/android
adbfs ~/android

Now you can access the files via your desktop computer at ~/android

To get elevated permissions with ADB:

adb kill-server
sudo adb start-server
adb devices

For more commands, simply type:

man adb