Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Linux images for android tv boxes (currently avalaible: archlinux, kali linux)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Linux images for android tv boxes (currently avalaible: archlinux, kali linux)

    This topic if for people who want to run linux on thier android tv boxes (by linux i mean kali linux and arch linux)

    kali linux and arch linux images can be found here: https://disk.yandex.com/d/q3R5VgmiDDLq6w

    Steps to run linux.

    1. Flash the image you downloaded from the link above to an sdcard or pendrive via balena etcher. (you dont need to uncompress the image etcher will do it for you)

    2. configure your sdcard boot partiton by selecting the correct dtb file in the extlinux.conf (the images are preconfigured for amlogic s905w devices so if you have one of those you dont neeed to do this step)

    4. insert the sdcard or pendrive in your android tv box hold the reset button on the back of your android tv box, while holding the reset button plug in the power cord and keep holding the reset button for about 5 seconds, and BOOM! your box should now be booting to the linux distro you flashed on the sdcard or pendrive.


    Archlinux username and passwords.

    User:default Password:default
    User:root Password:root



    kali linux username and password

    User:kali Password:kali
    User:root Password:root

    For any help about linux on android tv boxes please join this discord server https://discord.gg/QDExCzvtDy (My username on discord is Sameer9793#3808)


    This section is for people who dont trust me and think there is malacious software in my images.(YOU SHOUDLENT TRUST ANYONE EASILY.)


    Steps i followed to run archlinux


    1. download the archlinuxarm old russian version .img.xz file http://mirror.yandex.ru/puppyrus/2a-aarch64/img/ and flash it to an sdcard with balenaetcher or rufus

    2. replace the archlinuxarm russian version boot directory with the one from manjaro https://drive.google.com/drive/folde...jy?usp=sharing (thank me later lol)
    and configure to acording to your box. after configuring it, edit the extlinux.conf file in the [boot pariton/boot/extlinux/extlinux.comf] in the last line of the extlinux.conf file there should be a thing like this "root=PARTUUID=fd07d63e-02" remove that bit and replace it with "root=LABEL=ROOTFS" and your now done with the boot pariton for now.

    3. remeber the password for the live and root user is "woofwoof" (without the tags)

    4. run the command "sudo pacman -Syy" to refresh the mirrorlist and then run the "sudo pacman -S archlinuxarm-keyring" too and then run the command "sudo pacman-key --init" and also run the command "sudo pacman-key --populate archlinxuarm" to initialize the pacman keyring.

    5. run the command "sudo pacman -Syu --force" to forcefully update the system because its too old. and then reboot (say Y to any promts), and then run the command sudo pacman -S linux-aarch64-rc to install the rc kernel.

    6. use another computer with linux and copy the “iniramfs-linux.img” from the [archlinuxarmROOTParition/boot/iniramfs-linux.img] and paste it in the [archlinuxarmBOOTParition] (remove the old initramfs-linux.img from the archlinuxarmBOOTPartition), after that copy the “Image" from the [archlinuxarmROOTParition/boot/Image] and paste it in the [archlinuxarmBOOTParition] (remove the old "Image" from the archlinuxarmBOOTPartition),

    7. reboot the system into archlinux and welcome to archlinuxarm running on your tiny android tv box.

    8. after fullying installtalling archlinux. if u try to download something from pacman for exmaple nano with the command "sudo pacman -S nano" it might give an error saying that file exists in fileystem, to fix that u simply have to type this command instead "sudo pacman -S nano --overwrite '*' " that should get rid of the error.

    P.S if you want to change the system lanuage from russian to english follow these steps
    1. edit the file in /etc/locale.gen and uncomment the first locale and save and exit and then edit the file in /etc/locale.conf and replace the russian locale to the one you uncommented in the /etc/locale.gen file and run the command "locale-gen" in the terminal and reboot and your done


    Steps i followed to run kali linux.


    FIRST OF ALL SWITCH USER TO ROOT


    1.Download the kali linux official odroid c2 image from here https://kali.download/arm-images/kal...2-arm64.img.xz

    2. flash the image to an sdcard via balenaEtcher after flashing is done hop onto your linux machine and plug in the sdcard we need to run some commands.

    3. go to the "/mnt" directory on you pc and type "mkdir boot root" to create two directories named boot and root. after that mount the sdcard first partiton in the root folder with the command "mount /dev/sdX1 /mnt/root" (replace the X in the /dev/sdX1 with the name of your drive), After that is done check in the root folder there should be the rootfs files of kali linux we need to copy those to our local machine with this command "cp -ax /mnt/root/* /path/to/any/emty/folder" just copy those rootfs to any empty folder and remeber the path we will need it later.

    4. open gparted, select your sdcard from the top right hand corner. Delete all the partiton in the sdcard by right clicking on the partiton and click delete. after that create a new partition with fat32 FS by right clicking in the unallocated space and click new and in the new size type "512" and in the filesystem select fat32 and click create after that right click on the unallocated space again and dont touch anything just click create, after that we should have two partitons one is a fat32 512MB partiton and another is a EXT4 partiton with all the space.

    5.now make the fat32 partiton bootable with the command, "fdisk /dev/sdX" again replace the X with the letter of your sdcard, type a and type 1 and press enter and type w and press enter, now the fat322 partiton is bootable!

    5.now mount the Fat32 and EXT4 partition in the "/mnt" with the command "mount /dev/sdX1 /mnt/boot" and "mount /dev/sdX2 /mnt/root" now both boot and root should be mounted under the /mnt folder. Now we just want to move the ROOTFS we copied eariler from the kali linux partiton remeber?? step 3??? type in the command "mv /path/to/kali/rootfs /mnt/root" replace the /path/to/kali/rootfs to the path where you copied the rootfs earlier, this should take sometime.after that is done download the boot directory from here https://drive.google.com/drive/folde...jy?usp=sharing and copy and paste the stuff from the boot directory to /mnt/boot, after that remove the "Image"and "initramfs-linux.img"
    from the /mnt/boot/Image and /mnt/boot/initramfs-linux.img after that copy "Image" and "initramfs-linux.img" files from the kali rootfs and paste it in the boot partition with this command "cp /mnt/root/boot/Image /mnt/boot/" and "cp /mnt/root/boot/initramfs-linux.img /mnt/boot/", after that just select the correct dtb file in the extlinux.conf file and we are basically done now.

    6.remove all the line from the /mnt/root/etc/fstab file with your favorite text editor, and edit the /mnt/root/etc/network/interfaces fle and remove the first line.

    7.now plug in the sdcard into your android tv box and hold the reset button while holding the reset button plug in the power cord and keep holding the reset button for around 5 seconds, BOOM! your box should now be booting into kali linux
    Last edited by Sameer9793; 09-24-2021, 18:47.

    #2
    Hi, i'm new to the process of setting up media for ARM devices so please bare with me

    What am I supposed to do when configuring the archlinuxarm installation for my specific tv box(mine has an RK3188 chip), i'm not sure what to do

    please help?

    Comment


      #3
      Originally posted by notthatpro View Post
      Hi, i'm new to the process of setting up media for ARM devices so please bare with me

      What am I supposed to do when configuring the archlinuxarm installation for my specific tv box(mine has an RK3188 chip), i'm not sure what to do

      please help?
      This is for Amlogic Based /CPU boxes
      Not Rockchip

      Happy Testing

      Comment

      Working...
      X