The problem
In the time of writing a lot of the HOW-TOs available online, including Offensive Security's own guide, simply do not work. This post aims to guide anyone trying to install Kali Linux on his android smartphone.The Requirements
- A ROOTED android smartphone (Tested on Android 4.4.4, MTK6752)
- A 16 GB class 10 SD card (It should work with internal storage somehow but haven't tested)
- Linux Deploy
- BusyBox
- Link2SD
- (Optional) An ssh app (I used ConnectBot)
- (Optional) A VNC viewer app (I used VNC Viewer)
Preparation
- Partition the SD and format each partition (THIS WILL DELETE YOUR DATA). You'll need:
- 1st Partition 512 MB formatted in FAT32
- 2nd Partition the rest of the SD formatted in EXT2
- Install the APPs listed above
- Open Link2SD
- You should be greeted by this screen
- Select ext4 and press ok
- When prompted reboot your device
- Open BusyBox
- Press INSALL
Installation
Update 2/2/17
'sana' suit has now been removed from Kali's repositories and kali-rolling is installing correctly.- Open Linux Deploy (From here on ensure constant Wifi connection and power)
- Press your phone's menu buton
- Press status
- Under Available mount point there should be something like /data/sdext2, make note of that.
- Press the button on the right (looks like a download icon)
- In Distribution select Kali Linux
- In Distribution Suite select kali-rolling
- In Architecture select armhf
- In Installation type select Directory
- In Installation Path type in the path you took note of before
- (Optional) Change Username & Password
- Set DNS server to 8.8.8.8 (Google's Public DNS server) since the default tends to fail
- Finally, set Localization to en_US.UTF-8
- Make sure in Select Components that Kali Components IS NOT SELECTED
- Press Install
- This might take a while ...
- When you see "<<<install" on Linux Deploy's logs the installation has finished
- (If there was no error your system is now ready to boot).
- Press Start
- Press Ok
- You should see something like this
- If you see a lot of skips then something went wrong during the installation
- Now from ConnectBot (or a machine in your local network) ssh to yourusername@theipontopofLinuxDeploy (in this case xxxx@192.168.1.2)
sudo dpkg-reconfigure locales
sudo locale-gen
sudo nano /etc/apt/sources.list
- Delete all its contents and replace them with the following
- deb http://http.kali.org/kali/ kali-rolling main contrib non-free
deb-src http://http.kali.org/kali/ kali-rolling main contrib non-free
deb http://security.kali.org/kali-security kali-current/updates main contrib non-free
deb-src http://security.kali.org/kali-security kali-current/updates main contrib non-free - Send Ctrl+O (to save the file)
- Send Ctrl+X (to exit nano)
sudo apt-get update
sudo apt-get dist-upgrade
- (if prompted)
sudo apt-get autoremove
sudo apt-get install kali-linux-full
- PATIENCE, since this will download around 4GB of data
- If everything went right you should now have a working setup of Kali Linux on your Android phone
Clarification: There is a reason behind selecting sana suite (initially) and then changing the deb sources to kali-rolling (and kali-current for security). When selecting Kali-Rolling as a suite the installation (step 15) was observed to repeatedly fail. On the other hand, sana suit being discontinued is lacking a few dependence (or has wrong versions) and will fail during upgrade sending you on a long trip of compiling dependencies from source and iterating.
No comments:
Post a Comment