Welcome Guest [Log In] [Register]
Welcome to Pwnie Express. We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Please note you need to use a valid email address to register for member access.

Get your questions answered by other members, share your ideas and feedback, get your problems solved, and give back by helping others! It only takes a minute to get started. Registration is simple, fast, and completely free!

Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Off-topic *Native* Kali for Nexus 7
Topic Started: Dec 19 2013, 07:16 PM (4,109 Views)
0ld3nglish800
Member Avatar

Hello, I have been doing some research of my own on how to get Kali to run natively on the Nexus 7. I went as far as installing Ubuntu natively on the Nexus 7 and adding the kali repos to the sources.list however, I came across road blocks - mainly packages that were not found and needed to be compiled manually.

I believe it should be able to be done, but I have never cross-compiled a kernel for another architecture.
If you review http://docs.kali.org/category/development you will see that Kali has been compiled for quite a few arm devices.
And Kali gives instructions for arm-cross compiling here: http://docs.kali.org/development/arm-cross-compilation-environment

Is there someone with more experience with this that could help push me in the right direction?

Offline Profile Quote Post Goto Top
 
Replies:
binkybear
Member Avatar

No worries 0ld. An alternative might be to play with something like this: http://ruedigergad.com/2012/12/21/plasma-active-for-nexus-7-running-the-touch-optimized-plasma-active-linux-distribution-on-nexus-7/

It actually might be easier to modify that then the Ubuntu image that I used.
Offline Profile Quote Post Goto Top
 
0ld3nglish800
Member Avatar

Thank you binky, I will try using MOSLO. Also I read in the comments section of the link you gave:

Quote:
 
The problem with “directly” flashing images generated with make_ext4fs via fastboot is that, afaik, you are limited to ~700MB in size. You can actually create bigger file systems by using sparse images but the “payload” contained in the image is limited in size. Another problem is that you cannot read from the userdata partition that way (e.g., to read a log when X did not start properly etc.).


Do you think that because rootfs is over 700mb, thats why fastboot isnt working for me?


update: so I downloaded MOSLO and used command:
Quote:
 
fastboot -c "ro console=tty1 rootwait rootfstype=ext4" flash:raw boot zImage-moslo initrd-moslo


MOSLO booted up and I mounted userdata as per plasmas instructions, however, instead of following the instructions for getting plasma onto the nexus 7

Quote:
 
mkfs.ext4 /dev/sdX
mount /dev/sdX /mnt/foo
cd /mnt/foo
tar xvf /plasma-active-nexus7-*.tar.bz2
sync
cd -
umount /mnt/foo


I did:
Quote:
 
mkfs.ext4 /dev/sdb
mount /dev/sdX /mnt
cd /mnt/
dd if=rootfs.img of=/dev/sdb


then i restarted nexus 7 into fastboot mode
fastboot erase boot
fastboot flash boot boot.img (your boot.img)
then I rebooted.

It did not boot, gave error:
NTFS signature missing
failed to mount /dev/mmcblk0p9 : invalid argument
the device /dev/mmcblk0p9 doesnt seem to have a valid NTFS
no init found
busybox bla bla....
(initramfs)

So, I think I am going to try other methods of getting your rootfs.img on to the nexus while using MOSLO.
Will keep you updated.

update: after running dd if=rootfs.img of=/dev/sdc - when i try to list file contents of sdc, there is nothing there. I looked at plasmas.tar.bz2 and it has a folder called "." and inside that folder is the rootfs. is there any chance you can just tar.bz2 your native kali rootfs or am I missing something?

I am going to try and re-download your rootfs incase it got corrupt while downloading.

btw - plasmaactive is really cool, too bad i couldnt get mouse support, its useless without touch screen.
Edited by 0ld3nglish800, Jan 8 2014, 04:31 PM.
Offline Profile Quote Post Goto Top
 
binkybear
Member Avatar

0ld - So here is the latest kali root.tar.gz taken straight off my device:

root.tar.gz 408.5 MB
https://mega.co.nz/#!WJBXUJoD!HBwChj0De7QNC77Ts1ed6mChnl5flRjPeYvsdL-VJjs
MD5 (root.tar.gz) = 2c6c50bbb9d099329907d69b44111536

I know networking isn't working which kinda kills everything. But you can always chroot into it on a desktop and play around with before sending to device. I don't know about keyboard/mouse either. It's probably going to be harder than I thought to get it to play nice with Nexus 7. Kernel will probably have to be rebuilt also.
Offline Profile Quote Post Goto Top
 
0ld3nglish800
Member Avatar

I got it to boot! used MOSLO and untar the .gz to the nexus7. MOSLO wouldn't boot it up, but after I flashed boot with your boot.img Kali booted to desktop. Didn't get any external kb/mouse but it seemed pretty responsive with the small area of the nexus7 that i was able to touch..



Thanks binky, yeah seems like a lot of work to get this running the right way. I thank you for your effort.
Edited by 0ld3nglish800, Jan 9 2014, 04:13 PM.
Offline Profile Quote Post Goto Top
 
0ld3nglish800
Member Avatar

This might be perfect timing, Kali team has released Kali 1.0.6 and has added scripts to build images.

Quote:
 
This new release brings with it the introduction of the Offensive Security Trusted ARM image scripts – a set of slowly growing scripts that are able to build Kali Linux images for various ARM devices. These scripts will replace the growing number of actual ARM image releases we have in order to reduce the exponentially growing amount of traffic we serve on each release. We will release a short blog post about how to use these scripts in the next few days.



Source: http://www.kali.org/news/kali-linux-106-released/

Build scripts: https://github.com/offensive-security/kali-arm-build-scripts

edit: I noticed that they only include the scripts for already released builds, there was no script for Nexus 7. I don't think any of the released arm builds are based on Tegra 3 chipset.
Edited by 0ld3nglish800, Jan 9 2014, 11:44 PM.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Pwn Pad Community Edition Support Forum · Next Topic »
Add Reply