Kali Nethunter - Samsung Galaxy S7 Questions and Answers

Hi all!
Does anyone have a guide on how to install kali nethunter on flat s7 exy?
I saw a guide somewhere but the download link was not good anymore.
I know I need to have already an android installed and with initial setup done then flash kali from twrp.
1.What version of android I need?
2.Where I can find the right kali nethunter image to flash?
3.Does anyone use kali nethunter on an s7 with an wifi external adapter?

Kali-Nethunter
vladvlad12 said:
Hi all!
Does anyone have a guide on how to install kali nethunter on flat s7 exy?
I saw a guide somewhere but the download link was not good anymore.
I know I need to have already an android installed and with initial setup done then flash kali from twrp.
1.What version of android I need?
2.Where I can find the right kali nethunter image to flash?
3.Does anyone use kali nethunter on an s7 with an wifi external adapter?
Click to expand...
Click to collapse
Hello,
I am new to Nethunter, with the help XDA I got it to work on my S7 Exynos with LightROM [Android 8 Oreo] (https://forum.xda-developers.com/galaxy-s7/development/teamexykings-lightrom-t3816609), and I figured out that kali-nethunter has their own kernel-building tutorials and scripts, so you can also build it (https://www.kali.org/docs/nethunter/building-nethunter/).
For LightROM Oreo the right NetHunter Kernel that worked for me was the WirusMOD (https://forum.xda-developers.com/galaxy-s7/development/kernel-wirusmod-t3943468), and it says it's also compatible with LineageOS 16 & 17, but that just doesn't work for me.
The Main page for Nethunter Kernel downloads is here: https://www.offensive-security.com/kali-linux-nethunter-download/
But there are also other older NetHunter Kernels here: https://build.nethunter.com/archive/2019.03-13-0514/
And I didn't try it with the wireless adapter...yet
Best of luck.

I flashed los 16 from zip, then magisk then I flashed nethunter.img but after boot there is no nethunter installed... Can you please let me know the steps u followed to make it work? Thanks!

Installed nethunter on los 16 but still can not make the wireless module to work

vladvlad12 said:
Installed nethunter on los 16 but still can not make the wireless module to work
Click to expand...
Click to collapse
I couldn't get some things to work correctly on Los16.0 nor on Los17.1 but on LightROM(8.0) the "lsmod" and the "insmod 88XXau.ko" commands work fine and it should work there on LightROM with WirusMOD, I'm still learning but that adapter is my next step
The problem I got to is that WirusMOD doesn't copy/flash some "binaries/files" for Los16/17 kernel for "lsmod" to work, perhaps because the system structure is different from android 8 and it's missing some files, I don't know, but for now I'm using LightROM with WirusMOD and it works just fine.

kenny.33 said:
I couldn't get some things to work correctly on Los16.0 nor on Los17.1 but on LightROM(8.0) the "lsmod" and the "insmod 88XXau.ko" commands work fine and it should work there on LightROM with WirusMOD, I'm still learning but that adapter is my next step
The problem I got to is that WirusMOD doesn't copy/flash some "binaries/files" for Los16/17 kernel for "lsmod" to work, perhaps because the system structure is different from android 8 and it's missing some files, I don't know, but for now I'm using LightROM with WirusMOD and it works just fine.
Click to expand...
Click to collapse
I will try to install LightROM to see if the kali nethunter works and then will check the wireless driver, I will be back with the conclusion.
Thanks!

Installed LightRom and Nethunter, cloned the 8188eu from git, used make command and when try to do make install I get that
[email protected]:~/rtl8188eu# make install
install -p -m 644 8188eu.ko /lib/modules/3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2/kernel/drivers/net/wireless
install: cannot create regular file '/lib/modules/3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2/kernel/drivers/net/wireless': No such file or directory
Nvm, created /kernel/drivers/net/wireless but now getting
[email protected]:/lib/modules/3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2# make install
install -p -m 644 8188eu.ko /lib/modules/3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2/kernel/drivers/net/wireless
cp rtl8188eufw.bin /lib/firmware/.
/sbin/depmod -a 3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2
depmod: WARNING: could not open modules.builtin at /lib/modules/3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2: No such file or directory
mkdir -p /lib/firmware/rtlwifi
cp rtl8188eufw.bin /lib/firmware/rtlwifi/.
After loot of work still get
install -p -m 644 8188eu.ko /lib/modules/3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2/kernel/drivers/net/wireless/
/sbin/depmod -a 3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2
depmod: WARNING: could not open modules.builtin at /lib/modules/3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2: No such file or directory

vladvlad12 said:
Installed LightRom and Nethunter, cloned the 8188eu from git, used make command and when try to do make install I get that
[email protected]:~/rtl8188eu# make install
install -p -m 644 8188eu.ko /lib/modules/3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2/kernel/drivers/net/wireless
install: cannot create regular file '/lib/modules/3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2/kernel/drivers/net/wireless': No such file or directory
Nvm, created /kernel/drivers/net/wireless but now getting
[email protected]:/lib/modules/3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2# make install
install -p -m 644 8188eu.ko /lib/modules/3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2/kernel/drivers/net/wireless
cp rtl8188eufw.bin /lib/firmware/.
/sbin/depmod -a 3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2
depmod: WARNING: could not open modules.builtin at /lib/modules/3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2: No such file or directory
mkdir -p /lib/firmware/rtlwifi
cp rtl8188eufw.bin /lib/firmware/rtlwifi/.
After loot of work still get
install -p -m 644 8188eu.ko /lib/modules/3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2/kernel/drivers/net/wireless/
/sbin/depmod -a 3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2
depmod: WARNING: could not open modules.builtin at /lib/modules/3.18.140.8-Nethunter_WirusMOD-twOreo-CTD2-v2.2: No such file or directory
Click to expand...
Click to collapse
Hmm if you Downloaded & Flashed the LightROM & WirusMOD, (& copied the nethunter_binaries*.zip content), then 'lsmod' should work, all you need is the 8188eu.ko file.
(Latest Link: https://androidfilehost.com/?fid=8889791610682940998 - make sure you're using the right driver for your kernel)
Download the Modules and extract the '8188eu.ko' file to /sdcard/. (/emulated/storage/0/.)
Start Kali-chroot and type in terminal:# insmod /sdcard/8188eu.ko
Then to view the loaded modules type:# lsmod
And after you're done and want to remove it type:# rmmod 8188eu
With the loaded module you can try with plugging in the wireless device and type:# ip link set [adapter] up && airmon-ng check kill && airmon-ng start [adapter]
Change the [adapter] with your adapter name, find it by typing:# ip a
I also tried with Android's Root, and it also works the same.
You can alternatively find an apk "Module Loader" and just extract into /sdcard/. and open the apk and load all modules in there.
Wish you good luck
~Kenny.

Related

[Q] OpenVPN on the Charge?

Dear All,
Does anyone have OpenVPN working on the Charge? I have PeanutButta Jelly Time which is suppose to have the tun.ko module in the kernel and lsmod gives me tun. however installing openvpn using the installer and settings does not work. I followed all the instruction including the push of openvpn2.1.1, sym linking of ifconfig and route, as well as various tun.ko files, but it fails to start. any thoughts?
Elviso
I am also interested in this
bump .. +1 .. anyone?
Please use the Q&A Forum for questions Thanks
Moving to Q&A
I finally got it working on mine. GummyCharged FE 2.0.
1) Install GummyCharge FE 2.0 ROM.
2) Install latest Imoseyon kernel. I don't think you need this since GC comes with the Imoseyon kernel #130 which should already have TUN support, but I upgraded mine anyway. After kernel upgrade mine was at #141. Link: http://rootzwiki.com/showthread.php...leanKernel-minimalistic-kernel-(v1.2.2-9-8-11)
3) Install Busybox.
4) Download bnred777's tun.ko from here: http://forum.xda-developers.com/showthread.php?t=1235410
5) Create a direcotyr called /system/lib/modules/ and /system/xbin/bb/
6) Copy tun.ko to /system/lib/modules/
7) Create a directory on your sdcard called /openvpn and copy all of your ovpn config and certificates there.
8) Install OpenVPN Installer from the market.
9) Run OpenVPN Installer and choose target directory of /system/xbin and /system/xbin/bb for ifconfig.
10) Create symlinks in the /system/xbin/bb/ directory:
ln -s /system/xbin/ifconfig /system/xbin/bb/ifconfig
ln -s /system/xbin/route /system/xbin/bb/route
11) Reboot your phone.
12) Run the following command from shell. You will have to run this every time you want to connect to your vpn. I would suggest making a shortcut shell script or there is probably a way to put it in start up.
insmod /system/lib/modules/tun.ko
13) Install OpenVPN Settings from the market. It should pick up your configuration settings from your sdcard/openvpn directory automatically.
14) Put in your password and you should be connected to your VPN.
The instructions are pretty much the same as other droid devices except for the Charge you need a Charge compiled tun.ko and getting the less finicky directories and symlinks took me a while to figure out. Here is a thread that helped me out with the directories and symlinks:
http://code.google.com/p/android-openvpn-installer/issues/detail?id=2

Working aircrack-ng with monitor mode and packet injection !

Hi,
so after few days of playing with drivers patches kernel sources i finally got aircrack-ng working on g1 ! ( If you dont know whats aircrack-ng http://www.aircrack-ng.org/) I tested airodump for 1h, had it dumping packets to the sdcard to a cap file with channel switching and aireplay with deauth attack. I monitored this from my laptop to see if the packets are being sent ok and the client was disconnected from the network as expected.
I used patches for the n900 form the "download here" link at the bottom of this page http://david.gnedt.eu/blog/wl1251/. I also followed this tutorial http://bobcopeland.com/android_wifi.html and used his excellent kernel patch to get the msm_wifi.ko module. I then used the kernel and the zip file herehttp://forum.xda-developers.com/showpost.php?p=14768272&postcount=2427
You will want to make a backup of your system before you do anything. With that kernel you won't be able to use wifi in the Android UI.
Requirements to use attached files:
2.2 Rom
Debian installed in chroot on g1 with aircrack-ng installed ( you can use this img http://www.mediafire.com/?0ab95ia8xbale0i , just extract in on /sdcard/ so debian.img path is /sdcard/debian/debian.img )
How to make it work ?
steps 1-5 are one time only
First boot your android ROM and type
adb shell
$ su
# mount -o remount,rw /
# cd /system/etc/firmware
# ln -s ../wifi/Fw1251r1c.bin wl1251-fw.bin
# cat /proc/calibration > wl1251-nvs.bin
# mount -o remount,ro /
Click to expand...
Click to collapse
Extract attached files ( g1_wl1251.zip ) to sdcard
Apply ez_1.5.1_wl1251.signed.zip from recovery ( it got 2708 and ebi0 kernel for now will add ebi1 later)
Boot the phone
adb shell
su
cd /sdcard/wl1251_modules
sh ../insmod.sh
Click to expand...
Click to collapse
Now chroot into you debian installation ( if you used mine debian.tar.bz2 there is script startdeb just write: sh /sdcard/debian/startdeb and you should be chrooted correctly )
screen ( dont know why airodump doesnt give any output without screen on adb shell ?! )
bash
airmon-ng start wlan0
airodump-ng -i mon0
and DONE
How com compile it
First you need to get sources:
kernel sources i used https://github.com/ezterry/kernel-biff-testing tag ezgb-2636-v1.5.1-20110820
prepatched compat-wireless-2010-12-22 ( attached in sources.zip. I did some small build fixes and applied every patch from wl1251-maemo/patches/wireless-testing/ EXCEPT 0003-wl1251-fix-scan-behaviour-while-not-associated.patch as i got build errors with it )
rest of the files in patches.zip
Kernel:
You can just apply all patches in the kernel dir
If you want to make your config by yourself you have to compile as module cfg80211 and mac80211, compile in CONFIG_RFKILL_PM, CONFIG_CRC7 and UNSET CONFIG_TIWLAN1251. Its important as there as some ifdefs for CONFIG_TIWLAN1251 in drivers/mmc/core/core.c which is compiled in and with CONFIG_TIWLAN1251 WL1251 drivers doesnt work !
Compat wireless:
there is make.sh script edit it and change the patchs for your crosscompile toolchain and kernel location
./make.sh
and copy all *.ko modules
I hope everything is clear and more ppl can use it in custom roms If something is unclear plz write about it
too bad i sold my g1!
Thank you for the great tutorial! I think many people are using Gingerbread right now with several different incompatible ROMs. I think it would be useful if you list your ROM version as well as SPL & Radio info. Also if you could PLEASE make an image of your G1 with the debian install, it would help a lot. If you don't want your personal data in the image then I can remove it for you and will host the image. At the very least people need to know how exactly you installed debian before attempting this.
Please PM me if you can supply the image, thanks again!
Debian location can by anywhere, nothing depends on it and i got it on sdcard so g1 dump wont do anything. But i can send u ready debian.img to mount it with wireless tools installed just want to add new kismet and as i cant find ready deb for debian i would need to compile it probably. As for the radio u can use that new 2708 radio and old one for kernel i provided. I used cm6 for it but i think you can use any 2.2 rom as its froyo kernel. I need to clean up everything and redo it to write good tutorial how to compile it for any kernel and how to patch drivers.
zewelor said:
Debian location can by anywhere, nothing depends on it and i got it on sdcard so g1 dump wont do anything. But i can send u ready debian.img to mount it with wireless tools installed just want to add new kismet and as i cant find ready deb for debian i would need to compile it probably. As for the radio u can use that new 2708 radio and old one for kernel i provided. I used cm6 for it but i think you can use any 2.2 rom as its froyo kernel. I need to clean up everything and redo it to write good tutorial how to compile it for any kernel and how to patch drivers.
Click to expand...
Click to collapse
Thanks for the response. I just upgraded my hboot to a version that CM6 doesn't support, but I can use a different Froyo ROM that is still working.
On Gingerbread I am having a very hard time getting ext2.ko loaded. I already have an EXT(4) partition mounted, but since I am not on Froyo none of the kernel modules can be loaded correctly. I also think that ext2 support is already there but I don't know how to make use of it. There are filesystem modules under /system/lib/modules/2.6.36.4-s3-cos/.
My goal is to create a clockwork image of a Froyo/Debian install (with working injection driver) and use it as needed while keeping a 2.3.4/2.3.5 Android image for testing newer Apps that don't work on 2.2.
For anyone that just needs the Debian image, you can download it from the original G1 Debian tut site here: http://www.saurik.com/id/10
Please PM me if you are willing to upload a copy of your .img container file & I will host it for everyone to use. Thanks!
If u want u can still flash cm6 and after flashing it, flash kernel.zip from attached zip in 1st post ( it got also kernel for newer radio, but i havent tested it as i got older radio). As i saw in ezterry's kernel config ext2 partitions are mounted using ext4 so u dont have to load ext2 ( it works at least in froyo version of ezterry's kernel ). I can send now debian.img without working kismet but i think its better to get also kismet running so ppl wont have to redownload it. My debian.img its normal debian only with aircrack-ng installed nothing special in it. Only magic is kernel config and modules with patches compiled for that kernel thats it nothing more.
zewelor said:
If u want u can still flash cm6 and after flashing it, flash kernel.zip from attached zip in 1st post ( it got also kernel for newer radio, but i havent tested it as i got older radio). As i saw in ezterry's kernel config ext2 partitions are mounted using ext4 so u dont have to load ext2 ( it works at least in froyo version of ezterry's kernel ). I can send now debian.img without working kismet but i think its better to get also kismet running so ppl wont have to redownload it. My debian.img its normal debian only with aircrack-ng installed nothing special in it. Only magic is kernel config and modules with patches compiled for that kernel thats it nothing more.
Click to expand...
Click to collapse
Yes, let's wait until Kismet is working and then you can upload the image. I will try your suggestion and use EXT4. If I still have trouble I will create a flashable ZIP that has Froyo optimized for Debian with your Kernel patch included and a startup app to launch Debian via UI. Thanks again for your great contribution!
But when you mount debian img just write mount -o loop -t ext2 not ext4 it should work
Updated first post with some instructions how to compile drivers and kernel
Constantly getting "mount: can't setup loop device: No such file or directory"
I tried "mknod /dev/loop0 b 7 0" but neither "mount -o loop,noatime /mnt/sdcard/debian.img /data/local/mnt" nor other variations using ext2 work. I did mount / as rw and created the /data/local/mnt directory. I also tried 2 versions of busybox and so far no luck; I guess you are using the version that comes with CM6? Thanks
Yes i used busybox from cyanogenmod
Copy debian.img to /sdcard/debian/debian.img ( or change location in startdeb script )
First do mkdir -p /data/local/debian/mnt
then sh /sdcard/debian/startdeb ( or where u got it )
startdeb script i used:
#!/system/bin/sh
if [ ! -e /dev/block/loop99 ]
then
mknod -m 660 /dev/block/loop99 b 7 99
fi
if [ ! -e /dev/loop1 ]
then
ln /dev/block/loop99 /dev/loop0
fi
mount -o loop -t ext2 /sdcard/debian/debian.img /data/local/debian/mnt
busybox mount -o bind /sdcard /data/local/debian/mnt/sdcard
export PATH=/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
export USER=root
busybox mount -t proc none /data/local/debian/mnt/proc
busybox mount -t sysfs sysfs /data/local/debian/mnt/sys
busybox mount -t devpts devpts /data/local/debian/mnt/dev/pts
busybox chroot /data/local/debian/mnt/ /bin/bash
Click to expand...
Click to collapse
can u do it for lg optimus black ?
That depends on wifi chipset there, if its wl1251 it should be doable.
nice work, a year ago I did the same work (I think I posted it in the modaco android forum), however there was no injection patch at that time, so only packet capturing worked. The HTC Hero has the same TI wifi chip (wl1251). By the way you don't need an entire linux environment it is sufficient to compile static binaries (aircrack, kismet..). If i remember correctly compiling aircrack was very straight forward, however for kismet I had to make a dirty hack because it complained for a missing environment variable, but int he end Kismet worked fine too, even the gps . Unfortunately I lost my dev environment due to a harddisk failure, otherwise I would share the patches and binaries.
[EDIT]
HA! I found the aircrack binaries on an old backup disc
If you want to copy the files on your sdcard remember to remount it with (mount -o,exec,remount /mnt/scard), because by default the noexec flat is set or you copy the files to internal memory.
Thx for that aircrack I have chosen debian to avoid recompiling everything i will like to use and to have normal command line enviroment. Except aircrack and kismet u can also like to have iw / wireless tools / ping / nmap /tcpdump etc so you will have to search for it or recompiling staticly everything. I just prefer to find .deb file and install it, as using apt-get on g1 takes forever Also htc magic got wl1251 as afaik its the same as g1 (?).
yeah thats true, I decided to compile everything statically because I had very poor performance using debian (apt-get, compiling stuff etc), another advantage is you can start the programs very easily from the homescreen using gscript, sl4a..., in the end its just a question of preference
Sorry for asking in wrong topic, but:
Is there any airdump app that works well on HD2 ? (Broadcom chip: bmc 4329).
Or maybe the right question is : If it is even possible to create such app for hd2/nexus ?
misieq666 said:
Sorry for asking in wrong topic, but:
Is there any airdump app that works well on HD2 ? (Broadcom chip: bmc 4329).
Or maybe the right question is : If it is even possible to create such app for hd2/nexus ?
Click to expand...
Click to collapse
The problem is not the app, the problem is having wireless driver that support packet injection/Promiscuous-mode for the specific wireless chip, which in this case are afaik not available.
And even not a driver but firmware for specific chipset that allow to do that. As i read the main problem in bmc4329 is the firmware as driver can only do what firmware will allow. Well u can rewrite driver to workaround some limitations in firmware etc. Anyway here is a page u can follow http://linuxwireless.org/en/users/Drivers/brcm80211 they even got monitor mode in todo so maybe it can be done
Hi guy, final step, I got this:
airmon-ng start wlan0
Interface Chipset Driver
wlan0 wl1251_sdio - [phy0]SIOCSIFFLAGS: No such file or directory
(monitor mode enabled on mon0)
Click to expand...
Click to collapse
and this:
airodump-ng mon0
ioctl(SIOCSIFFLAGS) failed: No such file or directory
Click to expand...
Click to collapse
how should i fix this? plz.
Thank you.

Jhinta Kernel for Lilstevie Ubuntu

Dont have this tap anymore so cant support it anymore !!!
I do things manual as i want to know what has be done !
So every thing below is hardcore installation. This will give you the why and know how of things !!!
About bootimg.cfg
This file is need for creating boot.img
You can find it by unpacking a boot.img,but one is provided already.
The important part of this file is the first and last option.
The first one will say how big the image wil be, and the last is kernel cmdline.
This is also wehre you say loop= for a loop file
Pack or unpack blob files
Code:
cd /tmp
git clone git://github.com/AndroidRoot/BlobTools.git
cd BlobTools
make -j2
sudo cp blobpack /usr/bin/
sudo cp blobunpack /usr/bin/
cd ~
Unpack a boot.img
We create a folder and place a boot.img in it.
Code:
mkdir ~/test
cd ~/test
abootimg -x boot.img
Unpacking a initrd image
Code:
cd ~/test
mkdir ramdisk
cd ramdisk
gzip -dc ../initrd.img | cpio -i
Now you will have a directory with the ramdisk source files in ~/test/ramdisk
to repack it, run
Code:
cd ~/test/ramdisk
find . | cpio -o -H newc | gzip > ../new-initrd.img
for gzip
Code:
find . | cpio -H newc -o | lzma -c > ../initram.lzm
for lzma
This will give you a new-initrd.img file in ~/test/ for you to use............versions<
Go to the folder and select ALL file or folder BUT source and build !!!!
And compres it file wel be made in home.
modules are install in ubuntu in /lib/modules/
About kernel and initrd and boot.img and blob
Kernel = basic hardware installations and setup
initrd = like a ramdisk
boot.img = kernel + initrd
blob = boot.img + TF special header
Blob file you find in cwm.zip like a kernel update for android
boot.img you will find when using nvflash
kernel gets compiled from a git or source
initrd you can make your own or reuse
i will create cwm.zip to do the flashing
To do this i do.
Code:
mkdir ~/test
cd ~/test
cp ~/TF101-GNU-kernel/arch/arm/boot/zImage ~/test/zImage
abootimg --create ./ubuntu.img -f ./bootimg.cfg -k ./zImage -r ./initrd.img
This will give me a ubuntu.img ready for nvflash but i want cwm.
so i do
Code:
./blobpack kernelblob LNX ubuntu.img
(LNX is boot partition dont change this unless you know what your doing)
Now i got a new file kernelblob that i can add to a cmw.zip file
To do this , open !!!! the cmw.zip below and remove and add the file kernelblob.
Thats it, and ready for flashing.
Rootfs
You sould be able to use any rootfs that is for arm.
you can also build a rootfs with rootstock
keep in mind a rootfs kan have diffrent types of names like ( rootfs.img.ext234 or ubuntu,dabian,linux.img.ext234 or evrey name you want it to be its just a name+ext)
If you want to relock it for oem-config ( nice first setup like name location keyboard setup) do
Code:
touch /var/lib/oem-config/run
Ubuntu
Kbuntu
XBMX
So how do we even flash ?
I use nvflash directly or cwm
The easy why is just using Olife.
Keep in mind that i will never use uboot , only original bootloader of android.
So dualboot is what you need.
if you have dualboot flashed, do this.
Replaced (backup!) initrd-2.6.38.img and 2638-zImage in the kernel folder with my files,
and in Olife update your chromium kernel.
For those that want to use a loop file
Just flash this zip file
And copy the rootfs to sdcard (nand) /sdcard/linux/ubuntu.img (more will come, thats why linux/ubuntu.img)
Wifi setup
Wifi simply needs 2 files and you can get them from android space -> then copy them to Ubuntu space to /lib/firmware/
/data/misc/wifi/nvram.txt -> /lib/firmware
/data/misc/wifi/wpa_supplicant.conf -> /etc/wpa_supplicant.conf #optional
just use a root exploror to copy them to sdcard or usb ( this can alo be done when your in Ubuntu space (/system = mmcblk0p1, /data = mmcblk0p7))
and put them on the right place for Ubuntu.
Bluetooth setup
There are 3 file needed from android space, to get this,
Enable bluetooth
Rename you bluetooth name to what ever you want ( once in Ubuntu you cant change this !!!! )
Leave it on !! and boot to Ubuntu
/data/misc/bluetooth/{bcm4329.hcd,mac.txt} -> /lib/firmware
brcm_patchram_plus (lives on the net) -> /usr/sbin/brcm_patchram_plus (already in)
As last edit /etc/init.d/bsp-tf101 and correct your mac adress --bd_addr ***** (replac *** with mac !!!, mac is located in mac.txt)
.
Code:
#! /bin/sh
do_stop(){
#look if Board Support Package is already running
PS=$(ps -A | grep " brcm_patchram_plus\>")
if [ -n "$PS" ]; then
echo "* Stoping Bluetooth Support Package..."
killall brcm_patchram_plus
fi
}
do_start(){
#if already started then stop first
do_stop
#now start all board support binaries
echo "* Starting Bluetooth Support Deamon..."
rfkill unblock 0
modprobe bcm4329
/usr/sbin/brcm_patchram_plus --enable_hci --baudrate 921600 --bd_addr ***** --patchram /lib/firmware/bcm4329.hcd /dev/ttyHS2&
# making sure the nvtegra dev nodes have the correct permissions
echo "* Setting correct permissions on nvtegra device nodes..."
chmod 0666 /dev/nv* /dev/tegra_*
}
case $1 in
start | restart)
do_start
;;
stop)
do_stop
;;
esac
and reboot and your done.
Installing Tegra HEADER files ( needed when building things like XBMC )
Copy as root all folder to /usr/include/
Installing Opengl-ES
Download the Tegra drivers from Nvidia
Once downloaded unpack it and open a cmdline and go to that direction Where those files are and type,
Code:
sudo ./app*.sh --help
-r = your root directeroy whey you want to install this
--abi = witch version of abi your running, to get you version run in ubuntu on TF
Code:
aptitude show xserver-xorg-core | grep abi
So when running this directy on the TF in Ubuntu you wil get this
Code:
sudo ./app*.sh --abi 10 -r /
Get audio working
Code:
sudo usermod -a -G audio
sudo chmod -R 777 /dev/snd/*
Then open alsamixer and enable
playback
Left And Right speaker mixer DACL/R
Set DC input to DMIC
And sound sould work right away.
Install zram
Code:
sudo wget -O /etc/init/zramswap.conf 'https://wiki.ubuntu.com/ARM/TEGRA/AC100?action=AttachFile&do=get&target=zramswap.conf'
Installing XBMC
sudo apt-get install (try installing all dependencies you can in the readme.ubuntu in xbmc folder , some will fail so just remove them) )
Code:
cd ~
git clone git clone git://github.com/xbmc/xbmc.git
cd xbmc
./bootstrap
./configure --enable-tegra --enable-gles --disable-openmax --disable-vdpau --disable-hal --disable-joystick --disable-debug --disable-dvdcss
make -j2
sudo make install
sudo apt-get install libgl1-mesa-swrast
Loop or native parition
in your config (dualboot.cfg)
You kernel cmdline would be
( if you have native root=/dev/mmblk0p8 rw.........)
( for loop support you add loop= ( location of file !!! + root= (the partition where the file is located !!)
root=/dev/mmcblk0p7 rw loop=/xxx/xxx
Default Kernel
files
Support
hdmi ( audio ? )
USB ( full working )
jack ( mic ? )
Opengl-ES
zram ( needs script also a most have beacuse of low ram space )
-more to come
Sources
kernel
Khronos header package
Tegra Opengl-ES drivers
Blobtools
THANKS TO:
Jhinta said:
Supports..
Code:
OpenGL-ES
zram
Wifi
Bluetooth
FB -> half working no txt output
HDMI fully supported
Kexec enabled , dont know if its even working
Not working !!!
Sound
Touchpad
If you want to use this make sure the 3D driver are installed ( no FB !!! ), so install them first !!!!
And add the modules to you rootfs.
And keep in mind unity does not have gles support yet ( kde sould but didnt tryed it yet )
Download
Kernel
Modules
Source
make sound hardware pupup , still no sound
sudo usermod -a -G audio <your username here>
sudo chmod -R 777 /dev/snd/*
Click to expand...
Click to collapse
I will give this a shot tonight and let you know how it goes.
I'm sorry if this is a stupid question but what is FB? I tried searching on the forum and online but the only reference I could find was facebook.
could you use git, or post a .patch for the framebuffer patch because there is no way I am going to spend ages downloading the kernel source from 2shared then having to try and find WTF you did
Ke1evraTi: It just means the framebuffer which is the base graphics support under linux. Basically since it does not work, you won't see much until the X11 drivers kicks in.
lilstevie: Pulling the original kernel from Asus was way slower than 2shared. Also creating the patch was quick. Only a few hundred lines to skim. I have attached it for you or anyone else who is interested. If my diff options do not suit your fancy, kindly suggest different ones and I will re-post.
lilstevie said:
could you use git, or post a .patch for the framebuffer patch because there is no way I am going to spend ages downloading the kernel source from 2shared then having to try and find WTF you did
Click to expand...
Click to collapse
Sorry m8 i didnt had any sleep last two day's i was broke when i uploaded it , was easy for me fast upload thats why. but looking add the path above that sould do it if not ill will send a patch.
? any one tested already?
download link
I coldn't use the download link, the host gives error like "Gateway Timeout". Can you check it please, is it me or the host?
dismis said:
I coldn't use the download link, the host gives error like "Gateway Timeout". Can you check it please, is it me or the host?
Click to expand...
Click to collapse
The server is currently down for maintenance and will be back up in the next few hours
All done now
lilstevie said:
The server is currently down for maintenance and will be back up in the next few hours
All done now
Click to expand...
Click to collapse
lil , look on nvidia git , tty fix maby? i'm add work cant do anything.
Ok. I am running ubuntu on a sbk2 tf101 using the method posted by jozka.1 how do i apply the new kernels like the on posted here to that install? i know that this is a total noob question but i want to try it on my unit. I know that it says that the video acceleration does not work on unity but should work on kde. will it work on gnome?
Sent from my Transformer TF101 using XDA Premium HD app
Sorry, kernel isn't working for me. I installed the latest linux4tegra driver package, added the modules folder posted to /lib/modules and flashed the kernel through CWM, but the GUI fails to load and running startx from the command line does nothing. I'm not sure if this was my mistake, but the modules posted were for the 2.6.39.4 kernel and Jhinta posted a 2.6.36.4 kernel. Where did I mess up?
MrMuffin24 said:
Sorry, kernel isn't working for me. I installed the latest linux4tegra driver package, added the modules folder posted to /lib/modules and flashed the kernel through CWM, but the GUI fails to load and running startx from the command line does nothing. I'm not sure if this was my mistake, but the modules posted were for the 2.6.39.4 kernel and Jhinta posted a 2.6.36.4 kernel. Where did I mess up?
Click to expand...
Click to collapse
ore you flashed the wrong zip file ore the flashes didnt install make sure after cwm you see the blue line going meening its flashing the blob
Yep definitely the right kernel and I did see the blue line afterwards. Just to make sure that I've done this right, so I:
-download linux4tegra package, run: sudo <path-to>/apply_binaries.sh --root /
-run: sudo cp -r <path-to>/2.6.39.4/ /lib/modules/
-reboot to CWM, flash Ubuntu-3D.zip
-reboot.
MrMuffin24 said:
Yep definitely the right kernel and I did see the blue line afterwards. Just to make sure that I've done this right, so I:
-download linux4tegra package, run: sudo <path-to>/apply_binaries.sh --root /
-run: sudo cp -r <path-to>/2.6.39.4/ /lib/modules/
-reboot to CWM, flash Ubuntu-3D.zip
-reboot.
Click to expand...
Click to collapse
thats it, maby i did send a wrong one , any way here it is
Jhinta said:
thats it, maby i did send a wrong one , any way here it is
Click to expand...
Click to collapse
the latest t4l drivers use the 3.1 kernel, so which version of l4t did you use?
Still no luck with the new kernel posted by Jhinta, with the r12beta drivers installed on a sbkv2 device.
Heres the screen I originally get when I boot:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Here's what I get when I run startx:
I'll try it again from scratch, just in case. Let me know if there are any logs or anything you want me to post.
Have you tried maybe sudo depmod -a ? Might fix those module loading issues which could be your problem.
Running lsmod after boot shows that all the modules have loaded. I still get these errors on fully working installs for some reason.
Code:
uname -a
will reveal to you that you are in fact running 2.6.36.4 and not 2.6.39.4 which is jhintas kernel
Proof that I did install Jhinta's kernel:
Results of uname -a:
Look closer
Proof that you did not install Jhinta's kernel:
lilstevie said:
uname -a will reveal to you that you are in fact running ----> 2.6.36.4 <---- and not 2.6.39.4 which is jhintas kernel
Click to expand...
Click to collapse
Results of uname -a:

[GUIDE] [BIN] Compile busybox on Linux

About Busybox: busybox.net/about.html
More on Busybox: busybox.net
This is just for anyone who wants to try, and especially those without access to a PC.
:
: --------------- BUILD STEPS --------------
:
Things we'll need besides your phone:
- "Android Terminal Emulator" app
- "Complete Linux Installer" app , I also recommend trying "linux deploy" for more advanced usage
- internet/wifi
- latest "busybox" source
1) We need to get Ubuntu or Debian booted for a sufficient build environment (kali linux works well too). I've used them all on Android but I like the better stocked terminal in the Ubuntu images. I used the app "Complete Linux Installer" which is free and works beautifully, very simple and easy. In the app you want to follow the short instructions to download an Ubuntu image, rename it to ubuntu.img, and place it in a folder named ubuntu in /sdcard. Then hit menu in the app and click the terminal screen icon that says "Launch". An Ubuntu terminal will now open in Android Terminal Emulator. Super quick and easy.
2) Let's download some crucial build environment tools.
Code:
apt-get install -y gcc build-essential libncurses5-dev libpam0g-dev libsepol1-dev libselinux1-dev
--EDIT-(30AUG2014)--
For Selinux compatibility and loginutils, we need to also download a few extra packages. Already included in the code above.
3) Now the cool thing about this chroot Ubuntu environment is that we still have access to the sdcard to transfer files between Android environment and the chroot jail. Extract your downloaded busybox source to your Ubuntu home with something like:
Code:
cd
tar -xf /sdcard/Download/busybox*bz2
cd busybox*
4) Now we can build busybox statically. The first thing we do is generate a Makefile by running "make" with a "defconfig" (default configuration file) Usually you will run "./configure" with other programs, but busybox compiles more like a kernel, so it uses a config which has a huge checklist of options.
(After successfully compiling busybox, we can go back and customize the .config; this entails that for each "CONFIG ..." line we see, we can uncomment it and mark it "y" or "n" to configure some option... This can be more easily done from a terminal busybox menu interface with "make menuconfig". You just need to crank font down to 7 or use telnet/ssh)
Skip "make defconfig" if you use a customized ".config" file such as one I've attached.
Code:
make defconfig
If all goes well, we now have a Makefile and are ready to compile:
Code:
make clean && make LDFLAGS=-static
Let "make" crank out the binary for a couple minutes. The extra variable we set after make is to compile statically. When compiling is complete we'll have a few different busybox binaries at the root of the source directory. We use the one named "busybox" since we're not debugging.
5) Now let's copy it to /system/usr/bin to install for test usage.
Code:
cp ./busybox /android/data/media/0
(Open a new terminal tab to get into Android Environment)
mount -o remount,rw /system
mkdir -p /system/usr/bin
cp -f /sdcard/busybox /system/usr/bin
chmod 0555 /system/usr/bin/busybox
/system/usr/bin/busybox --install -s /system/usr/bin
mount -o remount,ro /system
PATH+=:/system/usr/bin
.. and done. Run some scripts and enjoy your static busybox!
:
: Extra steps for SELinux-enabled busybox
:
Here are the extra steps you need to take to compile busybox with SELinux features. Sorry it took so long to get this added to this first post.
First we need to download the source for libselinux and libsepol and compile it. (This is for use with the standard glibc toolchain.)
Code:
cd
apt-get source libselinux libsepol
cd libselinux*
make
cd
cd libsepol*
make
Now that we have those libraries compiled, we can proceed to the busybox compilation.
Code:
cd
cd busybox*
make clean && make LDFLAGS='-static -L ../libselinux*/src -L ../libsepol*/src' CFLAGS='-Os -I ../libselinux*/include -I ../libsepol*/include'
That's pretty much it. It initially seems more complicated than it actually is, but all we're really doing is including the libraries for libselinux and libsepol into the busybox compilation.
edit:
**Commands to run if you have compile errors:
Code:
apt-get build-dep busybox
apt-get install -y build-essential
apt-get -f update
dpkg --configure -a
:
: --------------- DOWNLOADS --------------
:
***** Attached are flash installers for busybox (v1.23.1 stable, non-SELinux, 374 applets included!, ~1.1MB size) or busybox (v1.23.1 stable, SELinux, 386 applets included!, ~1.6MB size) *****
Since it's up-to-date it has some nice extras most people haven't seen like a "-I" option for xargs! Yes, that is correct, busybox xargs has its testicles back.
Code:
e.g.
$ echo Hello | xargs -I{} echo {} world!
> Hello world!
: ---------- UPDATES ----------
-------------------EDIT-2-(30AUG2014)----------------------
Got a Selinux-enabled busybox attached now. This means Selinux flags are integrated into applets like ls, id, ps, etc, and there are now 12 extra Selinux applets to give a total of 386 applets, ~1.6MB in size. The previous one is more portable, but this one can completely replace toolbox and gives you Selinux control for Android 4.4+. Plus it's pure maxed-out awesomeness.
***I've also attached the .config files for each busybox I've compiled, so anybody can remake them (from their phone!) as I've posted. You just need to download and extract the .config file to the root of your busybox source directory and type "make".***
-------------------EDIT-3----------------------
YashdSaraf has made some very useful flash zips to install either the non-selinux- or selinux-enabled busybox 1.23.1 via recovery. Installation replaces the stock busybox in /system/xbin. I've attached the zips he made to the end of this OP.
(**Note: Thought I'd mention that there will be a handful of applets that don't work in "Android" environment such as su(don't worry this isn't linked with the installer) Part of this is because of the way Android's default file structure is an amputated modified version of linux. With almost all of them, slight modifications to environment and file structure can be made to get them to work. This is just normal behaviour of busybox in android. The su and init applets shouldn't be used in Android though. I keep them compiled into the binary anyway for completeness of the build and because they work and are needed for a root.gz initrd or some chroot environments. It also doesn't hurt keeping them compiled in. You just have to remember not to link them when installing busybox.
-------------------EDIT-4-(06SEPT2014)----------------------
:
: How to compile against(using) uclibc for a smaller binary!!
:
Download the attached arm-linux-uclibcgnueabi toolchain package that I pre-compiled. Extract to /data/media:
Code:
cd /data/media
zip='/sdcard/Download/2014-09-06__arm-buildroot-linux-uclibcgnueabi.tar.lz.zip'
unzip -op "$zip" | lzip -d | tar -xf -
Then let's open up the "Complete Linux Installer" or "Linux Deploy" terminal.
To use the toolchain with a busybox build, we just need to specify the parameter CROSS_COMPILE which is a prefix to the compiler tools. So if you extracted the toolchain to /data/media, you will use:
Code:
make clean && make LDFLAGS=-static CROSS_COMPILE=/android/data/media/arm-buildroot-linux-uclibcgnueabi/bin/arm-buildroot-linux-uclibcgnueabi-
When you're done you should have a busybox binary with 374 functions with size around 1.1MB. That's a 20% decrease in size from using the standard glibc toolchain!
**IMPORTANT Notes
- The toolchain can't be used with lollipop since it's not compiled with -fPIC. I'll fix this later. Busybox is fine since it's static, it's just the toolchain I uploaded.
- Selinux-enabled busybox .config errors out when building using the uclibc toolchain; I think this is a lack of support issue. In the "Complete Linux Installer" app you'll need to add the mount "/data/media" in options. This gives you access to it as "/android/data/media", very very useful for extra space needs.
Difference between SELinux and non-SELinux busybox
The SELinux (NSA security enhanced Linux) binary comes with the following extra utilities: chcon, getenforce, getsebool, load_policy, matchpathcon, restorecon, runcon, selinuxenabled, setenforce, setfiles, setsebool, and sestatus. There are also some selinux flags enabled for applets such as "ps" and "ls", e.g. "ps -Z" and "ls -Z" to show the context for processes or files. If you are using Android 4.3 or newer, then you probably want to use the SELinux-enabled busybox since Android 4.3 is when SELinux was introduced to Android. Using the SELinux busybox on older version of Android without SELinux file structure should probably work besides the SELinux applets, but I haven't tested this. The non-SELinux binary can be used on any version of Android. When it comes down to it, the system actually uses "/system/bin/toolbox" SELinux applets for SELinux operations, so unless you specifically want to use busybox's SELinux tools for personal use, the safest option is to go with the non-SELinux busybox. I use Android 4.3.1 and 5.x, so I use busybox's better featured SELinux tools.
Latest updates see post 2
Busybox 1.23.1 (2015-02-06) below
Busybox compilation on Linux
reserved
Great Info here!
But I would be interested to know how well this method works on Samsung Stock devices running AOS 4.2 and above? Any experience?
Awesome info, this thread came up #1 while googling busybox 1.23
I made a flashable zip of the attached binary in the op to clean the old one(if any) and install the new busybox in xbin, just in case if anyone needs it. :good:
Is it work on xperia sp on 4.3 fw yes ?
YashdSaraf said:
Awesome info, this thread came up #1 while googling busybox 1.23
I made a flashable zip of the attached binary in the op to clean the old one(if any) and install the new busybox in xbin, just in case if anyone needs it. :good:
Click to expand...
Click to collapse
Thanx,worx fine with Carbon 4.4.4 on my LG.
GREETZ FROM TEAM-OPTIMA!!!
E:V:A said:
Great Info here!
But I would be interested to know how well this method works on Samsung Stock devices running AOS 4.2 and above? Any experience?
Click to expand...
Click to collapse
Thanks man. I've been compiling tons of stuff with Debian and Ubuntu chroot no problem on top of 4.3.1 Vanir and also 4.4.4 Carbon, both are my daily drivers. "Complete Linux Installer" is pretty fast compared to some other chroot apps like GNUroot (no offense to GNUroot, it works but is way too slow). It runs real-time compared to non-chroot. When compared to my dual-core 2007 Pentium M laptop, it's about 2-3 times as slow which isn't too bad for compiling something like mksh or even busybox which takes up to 5 mins I'd say.
In terms of binary size, compiling natively is better than cross-compiling it seems. I used gcc with no size optimizations here, so 1.37MB is pretty nice compared to some others around 2MB with full configs. With this method and klcc (gcc wrapper) I got mksh compiled to 192KB. I'm currently trying to build a uclibc toolchain on my laptop that will give me a mksh binary under 300KB..
YashdSaraf said:
Awesome info, this thread came up #1 while googling busybox 1.23
I made a flashable zip of the attached binary in the op to clean the old one(if any) and install the new busybox in xbin, just in case if anyone needs it. :good:
Click to expand...
Click to collapse
Cool thanks man! That is really useful, glad to hear from CALIBAN that it works. Could I add this to the OP with credit to you?
Hamidreza2010 said:
Is it work on xperia sp on 4.3 fw yes ?
Click to expand...
Click to collapse
Yes, xperia sp uses armv7 so you should be good to go.
7175 said:
Cool thanks man! That is really useful, glad to hear from CALIBAN that it works. Could I add this to the OP with credit to you?
Click to expand...
Click to collapse
Sure bro go ahead
Edit: Went ahead and made one for selinux enabled busybox :silly: , you can add this one in the op too.
Hey guys I was able to get an entire uClibc toolchain built the other day (using buildroot). I tested it and it makes some nice small binaries with about 20%+ smaller size than the standard glibc. Man that took hours to compile but was well worth it. It really put the stability of Android OS to the test as well. Kitkat absolutely couldn't finish compiling with multiple oom's and oops's, but Vanir 4.3.1 stuck it out real nice. Once I had the huge amount of required buildroot packages downloaded, I was able to compile in TWRP as well with good stability. (I have the "Complete Linux Installer" startup chroot script aliased in my mkshrc so I can pull up an ubuntu terminal without starting the app. )
So I got 3 new attachments to OP:
- arm-linux-uclibc toolchain for anyone who wants to compile stuff with it (host=arm AND target=arm)
- busybox (374 fcns, non-selinux) 1116KB
- lzip binary (in case you need it to unzip the toolchain, which is highly compressed from 64MB to 14MB with lzip's lzma)
**As I mentioned in the updated OP, I wasn't able to get selinux-enabled busybox compiled with uclibc. This may be something unsupported, or there may be a patch fix. I'll check it out. I'll try with musl libc and musl-gcc as well.
I have another approach, I try aboriginal cross compiler toolchain in archLinux it produced small binary, but I can't compile busybox for android. For Linux it work. Maybe need bionic lib?
ndrancs said:
I have another approach, I try aboriginal cross compiler toolchain in archLinux it produced small binary, but I can't compile busybox for android. For Linux it work. Maybe need bionic lib?
Click to expand...
Click to collapse
Sounds interesting. I honestly haven't given this a try yet, but I'm very interested in taking a look at it. At this point I'm pretty much addicted to making the smallest binaries I can and testing out different toolchains. I'll give it a good search on duckduckgo, and if you have any insightful links that would be great.
Edit: Alright cool I found the source for Aboriginal Linux at landley.net/aboriginal and am building on Android now. I'm also trying this on my x86_64 laptop so that I can compare the differences like I have with glibc, uclibc, musl, klibc binary builds in a native environment and a cross-compile environment.
I see from my laptop's build that a busybox was generated, but it was dynamic and has a libc.so.6 dependency. @ndrancs : this might be what you were talking about. Did you try compiling static? Also see if "make allnoconfig && make clean && make LDFLAGS=-static" works for compiling busybox with Aboriginal Linux.
7175 said:
Edit: Alright cool I found the source for Aboriginal Linux at landley.net/aboriginal and am building on Android now. I'm also trying this on my x86_64 laptop so that I can compare the differences like I have with glibc, uclibc, musl, klibc binary builds in a native environment and a cross-compile environment.
I see from my laptop's build that a busybox was generated, but it was dynamic and has a libc.so.6 dependency. @ndrancs : this might be what you were talking about. Did you try compiling static? Also see if "make allnoconfig && make clean && make LDFLAGS=-static" works for compiling busybox with Aboriginal Linux.
Click to expand...
Click to collapse
I preferred to use uclibc I think it easy to setup and produced small binary.. Aboriginal cross-compiler use uclibc as default. Btw I don't use cmd : LDFLAGS=-static instead I set it in .config.. Maybe I try this later..
ndrancs said:
I preferred to use uclibc mk it easy to setup and produced small binary.. Aboriginal cross-compiler use uclibc as default. Btw I don't use cmd : LDFLAGS=-static instead I set it in .config.. Maybe I try this later..
Click to expand...
Click to collapse
Ok yeah I like how aboriginal set up with uclibc, and it has scripts for each build stage, so you can stop at the toolchain. I'll be interested to see their future releases with the musl libc as well.
Also for anyone interested, I figured out how to run dynamic binaries in android:
- make the directories "/lib" and "/lib/arm-linux-gnueabihf"
Code:
mkdir -p /lib/arm-linux-gnueabihf
- copy the linker "ld-linux-armhf.so.3" to "/lib"
- find a specific binary's dependencies: e.g. for dynamic mksh do:
Code:
strings mksh | grep \\.so
- copy the listed libs to "/lib/arm-linux-gnueabihf": e.g. for mksh that would be libc.so.6. The libs/linker you copy over will come from the mounted ubuntu/debian/... image you have mounted like with "Complete Linux Installer".
- adjust your LD_LIBRARY_PATH:
Code:
LD_LIBRARY_PATH=/lib:/lib/arm-linux-gnueabihf:$LD_LIBRARY_PATH
Any plan to update the busybox to current version. Thanks.
@7175 can you update flashable zip to 1.23.0 stable ?
@ndrancs @exodius48 : Thanks for notifying me guys, I needed to get around to updating to 1.23.0 stable. I updated the original post with no-edify installers for busybox 1.23.0 stable. There's a non-SELinux uclibc compiled version and a full 386-applet SELinux glibc compiled version. They're included in this post too for ease.
7175 said:
@ndrancs @exodius48 : Thanks for notifying me guys, I needed to get around to updating to 1.23.0 stable. I updated the original post with no-edify installers for busybox 1.23.0 stable. There's a non-SELinux uclibc compiled version and a full 386-applet SELinux glibc compiled version. They're included in this post too for ease.
Click to expand...
Click to collapse
Great..been waiting for this release.. :good:
Btw, can i use busybox_full_selinux.zip on android 4.2.2 MIUI rom?
exodius48 said:
Great..been waiting for this release.. :good:
Btw, can i use busybox_full_selinux.zip on android 4.2.2 MIUI rom?
Click to expand...
Click to collapse
Yeah that should work just fine. I'm pretty sure any SELinux tools or applet flags should work since 4.2 introduced SELinux to its filesystem. Let me know if there are any issues.
7175 said:
Yeah that should work just fine. I'm pretty sure any SELinux tools or applet flags should work since 4.2 introduced SELinux to its filesystem. Let me know if there are any issues.
Click to expand...
Click to collapse
Great release..busybox_full_selinux.zip working fine so far on MIUI rom V5 android 4.2.2. :victory:
7175 said:
@ndrancs @exodius48 : Thanks for notifying me guys, I needed to get around to updating to 1.23.0 stable. I updated the original post with no-edify installers for busybox 1.23.0 stable. There's a non-SELinux uclibc compiled version and a full 386-applet SELinux glibc compiled version. They're included in this post too for ease.
Click to expand...
Click to collapse
Hey @7175
Great guide. I am able to compile just fine on my device using your guide. However, is there any way to compile the selinux applets support using a Linux PC (or NDK)? I am not able to find a selinux supported toolchain. May be you can help.

[testers needed]Help]dualboot lg aristo 2 and cv1 Native ubuntu on sdcard plus kali-linux kernel [Help[testers needed]

howdy folks im currently in development of bringing Ubuntu touch and Native Ubuntu to the lge cv1 devices including the Aristo 2, Aristo 2 plus and K8 plus.
Oreo roms only!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
i have had a really hard time trying to bring this too and to be honest most of the work ive done has been Kernel related as Ubuntu touch and Ubuntu need systemd/upstart kernels to boot into the rootfs and beyond.
oreo roms only !!!!!!!!!!!!!!!!!!!!!!
ive also added kali-linux-nethunter support to the kernels as well for all of you ethical hackers that want to use it for protecting yourself from the blackhat hackers out there or a lil bit of both. Duhjoker doesnt judge just compiles the kernels for you.
DUALBOOT
one added benifit is that one kernel dual boots to android and a native Ubuntu rootfs of your choice. both kernels will boot ubuntu touch or ubuntu natively but the second kernel has ubuntu security requirements like apparmor enabled that break android.
Ubuntu Touch
is still in development as im needing a solid system.img. Right now i have been working on an armhf GSI thats also non trebler. the GSI is complete and has vendor built into it but im having trouble getting the lxc container inside the rootfs to start android.
that means no GUI but it will boot into the ubuntu touch rootfs. it will also boot into any ubuntu armhf root file system from ubuntu 14 to 18.
this is where i need help. the system is quite capable of booting to the rootfs and beyond but i cant figure out how to go beyond on the non-UT rootfs.
im including some downloads
a boot.img that has commandline arguments built in to allow you to boot ubuntu from your external sdcard.
dualboota2p.zip that flashes the Kali_NeHunter dualbooting kernel to your boot image
fullubuntukernel.zip which flashes the full ubuntu non-dualboot kernel to the cli modified boot images described above
arm-ramdisk-installer zip that flashes a generic ubuntu ramdisk to your boot image.
a /lib/modules and /boot folder to add to your rootfs that has all the modules needed by the rootfs and boot folder requirements needed like a config and vmlinuz
you will need:::::
cv1 device = aristo 2, aristo 2 plus or k8 plus
32gb or higher (im using a 128gb) external sdcard split into two partition vfat for partition 1 and ext4 for partition 2
an armhf ubuntu root file system of your choice between 14 and 18 or choose a kali rootfs
basic knowledge of linux comnands and setting up a rootfs for ssh and internet
patience and know how
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I AM IN NO WAY RESPONSIBLE FOR ANY
DAMAGE CAUSED TO YOUR DEVICE BY ATTEMPTING THE PRICEDURES BELOW YOUR WARRANTY IS NOW VOID
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
now it seems like a lot of flashing but its to make it easier to get started with dual booting from your external sdcard. And i know some people like to make sure thier boot image matches thier device so the comnandline arguments are
root=/dev/mmcblk1p2 rootwait rw rootfstype=ext4
now to make it easier for you to chroot into the native ubuntu envirinment on your device so you do configuring offline and set things up you will need to add these lines to init.rc under mkdir /mnt/appfuse 0711 root root.
mkdir /linux 0755 root root
mount ext4 /dev/block/mmcblk1p2 /inux rw
that will automatically mount the second partition of your ext4 formatted external sdcard to a folder called /linux in the root of your device as well as make it rewritable.
note: after much experimentation i chose to use init.rc as on oreo any other place i put the commands had no effect.
if you want to try an initd command the kernel and rom support it just add an init.d folder to /system/etc from TWRP RECOVERY and place your script in init.
the following procedure is to build up rootfs
download and copy an ubuntu or kali armhf rootfs.tar.gz to the /linux folder
type these commands into your terminal on your cv1 device
su
cd /linux
tar xvzf your-rootfs.tar.gz
cd /
chroot /linux /bin/bash
export PATH="$PATH:/usr/sbin:/sbin:/bin"
apt-get update
apt-get install build-essential lightdm openssh-server
once thats done setup ssh for your device so when it boots into the rootfs you can use ssh to problem solve and get the GUI working
now you should reference this for how i got the idea and how i got this far.
https://www.reddit.com/r/lgv20/comments/bqp7f3
you will need to compile install and make a service for msm-framebuffer-refresher
add the /lib/modules and /boot zip to your rootfs and grab all your firmware from etc vendor and root and copy them to /lib/firmware of your rootfs
go ahead and grab that kali firmware from the magiskk repo too.
you should already be testing out the dualboot kernel i hope and now you that you have set up lets move to flashing
boot to twrp and flash the provided boot.img or your own modified boot.img then flash the full ubuntu kernel if you like or leave it on the dualboot kernel. now flash the ramdisk installer and reboot
it will go to first lge bootsplash then then bootloader unkock warning then boot to first android lge bootsplash.
you have now booted into the ubuntu rootfs.
But wait theres no GUI
i have mentioned that already.
heres where i need help and testing. i have not been able to go any further as my expertise is lacking. its all there and should work but im not knowledgable enough to solve the problems of getting it up and running.
for some the refresher might do the trick if you get it figured out. for others it might just need ssh into it to startx
im still working on getting the UT rom going and ill post what i have of that too for any of you that want to try and get it going
you can find me ubports porting and @duhjokersinhell on telegram if you need
here is the link to the ubuntu touch images i have compiled. they are a halium-9 ubuntu touch rootfs.img and a hal9 android-rootfs.img. to play around with them just go to twrp and format data making sure its formatted to ext4. then move the images from your external sdcard storage to data. then flash the full ubuntu kernel zip and the ramdisk installer
ssh [email protected]
password = phablet
try to get the lxc container loaded with
sudo mount -o remount,rw /
sudo lxc-start -n android
to get init logs
sudo lxc-start -n android -F -l DEBUG -- /init
ubuntu touch - Google Drive
drive.google.com
need to redo op but look i got it working

Categories

Resources