Setup old android tablet for development
Getting Started
Before Starting, it’s a good idea to install a Custom ROM for your old device just to get the best out of it. Head to XDA and search for your device. But why you might ask ?
- The installed custom ROM would bring you newer Android version + new kernel version. (not always)
- Root access (more control in general).
In my case, I am using SM-T585 which came with Android 8.1
and later on I upgraded to 9
.
Requirements
Make sure you have at least 4gb(more than enough) of free space to install all the required apps :
Note : AnLinux is just an option for those who don’t want to navigate the github repo (easy mode).
Choosing a distro
Open AnLinux
and choose your favourite distro, I recommend using fedora
since it has the most up-to-date packages.
Copy the install command and open termux
and paste.
When the installation is done you can start fedora by ./start-fedora.sh
Setup The Environment
If you reached this point, you know what to do next :D, but I am going to continue as a reference for future me.
- Update the system :
dnf upgrade
. - Install essential packages :
dnf install wget git unzip gcc g++ python3 pip net-tools openssh psmisc rsync fuse-sshfs
- Install Workspace packages :
dnf install nvim tmux zsh
- Change the default shell to zsh.
- Add aliases.
- Have fun hacking :D
Extras
Termux Customizations
- Download this addon
- Change the theme and font by hold pressing ->
style
->choose color/ choose font
For me, I am using Source Code Pro
font with Wild Cherry
color.
System Hack
Since I use vim
, I always swap ESC
with CAPS_LOCK
, but on Android I couldn’t swap the physical keyboard button so I changed the CAPS_LOCK
to act like ESC
lol.
Here is how I did it:
- Open the normal termux session.
- Install
vim
or any text editor. - Mount the system to Write :
mount -o remount,rw /system
- Edit
/system/usr/keylayout/Generic.kl
and search forCAPS_LOCK
and change it toESCAPE
- Mount the system to Read only :
mount -o remount,ro /system
Some useful aliases
I have some aliases for easier navigation and nice overall experience.
alias v="nvim"
alias install="dnf install"
alias neo="neofetch"
alias mkd="mkdir -p"
alias vc="nvim ~/.config/nvim/init.lua"
alias python="python3"
Connect to the network using SSH
I am using SSH to connect to my main machine on the network : ssh none@192.168.1.6
, and scp
to upload/download content.
# note the IP might change
# Downloads from the server
down () {
scp -r none@192.168.1.6:$1 $2
}
# Uploads to the server
up () {
scp -r $1 none@192.168.1.6:$2
}
Say Hello :D
Sponsor