[Linux] [DEV] [WIP]Backtrack 5 on the gtablet HYBRID. 7/18/11 1.2 BL kernel

Search This thread

slm4996

Senior Member
Dec 5, 2007
295
10
homecncfun.com
I am currently working on a CWM recovery for the gtablet that supports both sdcards and will try to include kernel image flashing into the gui. This will eliminate the CLI portion of these type of installs along with improving the recovery experience for all users in general.
 

slimm609

Senior Member
Jul 10, 2010
125
41
Hi, how can I forward my usb devices to chrooted linux? If I plug in an external usb device I can see it via lsusb in adb shell / terminal emulator. I tried using mount -bind /my_device_directory /chroot/path/my_device_directory, however when I run lsusb in chroot nothing is returned.

Thanks

are you also mounting proc?


mount -o bind /dev /mnt/chroot/dev
mount -o bind /proc /mnt/chroot/proc

this *should* take care of that issue.
 

slimm609

Senior Member
Jul 10, 2010
125
41
slimm609 the new extsd kernel works just fine. How do you have the wireless setup? Bringing the wlan0 interface up and do a scan returns no networks, do you have the required modules pre-inserted or do we need to insert them after boot?

Keep up the great work, I will contribute when I can.

the tools are not installed for network manager or wicd. you can configure /etc/wpa_supplicant.conf and run wpa_supplicant as a daemon then run dhclient to pick up an address. I know wicd is in the repo list but not sure about network manager
 

slimm609

Senior Member
Jul 10, 2010
125
41
Also you can "Dual boot" in a fashion by using flash_image and just swapping kernels.

A couple of limitations apply, you have to setup the sdcards correctly, if you have backtrack on internal then your android rom must use the external sdcard on /sdcard.

The command to flash the kernel is:

From android:
Code:
flash_image boot linux_kernel.img

From backtrack (you must copy the flash_image binary from android or recovery):
Code:
flash_image boot your-android-kernel-image.img

Also you do not need to nvflash at all using this method as long as you are already on a 1.1 based bootlader.

In theory it would be possible to create a recovery installable .zip that would handle every part of the install of backtrack.

This is a interesting idea. I need to look at how the boot loader works a little more and we may be able to do a custom recovery with support or even *maybe* look at loading the 2 kernels into nand partition 10. The kernel is only 5 mb but the partition is 16mb so we could fit both on there and maybe just have a toggle or fastboot option for it. I think it can be done, just need to look at the bootloader a little more
 

slimm609

Senior Member
Jul 10, 2010
125
41
changing focus a little but i think its for the better of BT5 and android. read update 2 in post 1
 

newtype06

Senior Member
Oct 8, 2010
58
2
Ohio
Bluetooth is a must for this, would make this a decent "netbook" with the folding cases with the included bluetooth keyboards, also what is the status of OpenGL and/or hardware acceleration.
 
Last edited:

slimm609

Senior Member
Jul 10, 2010
125
41
Bluetooth is a must for this, would make this a decent "netbook" with the folding cases with the included bluetooth keyboards, also what is the status of OpenGL and/or hardware acceleration.

have not had a chance to even look at either GL/or HA. looked at Bluetooth for a bit but not working yet.

getting a new SDcard tomorrow for the tablet to try and get some stuff sorted out to make it much easier to work on and make it more attractive for more people to run. Once that is done (hopefully this weekend) then I am going to continue looking at the other issues.
 
Last edited:

newtype06

Senior Member
Oct 8, 2010
58
2
Ohio
Awesome work so far though, once bluetooth and HA are in, this tablet will get ALOT more use. I'm gonna hold off for now, but I'm a long time debian/ubuntu user, love seeing where this is going. Can't wait to try out wine at some point, play some windows games hah!
 

slimm609

Senior Member
Jul 10, 2010
125
41

hoping to have something soon. Have to compile some new things to be used in recovery (will include in zip file). busy weekend but am still working it. Was hoping for something tonight but just didn't happen.

I am _trying_ to make it as painless as possible for everyone, also had to get a new 8 gb micro sd so i had to reinstall everything and format internal sd (so it could be used for android)
 
  • Like
Reactions: newtype06

dgulim1986

Member
Jan 3, 2011
12
0
WiFI

Help please! I can not configure Wi-Fi.
The description says that Wi-Fi works, but I is not working, maybe you need to install the file config? How to do it?
Or did I something wrong? Help I can not understand.
Who knows help!
 

slimm609

Senior Member
Jul 10, 2010
125
41
Help please! I can not configure Wi-Fi.
The description says that Wi-Fi works, but I is not working, maybe you need to install the file config? How to do it?
Or did I something wrong? Help I can not understand.
Who knows help!

edit wpa_supplicant.conf in /etc/

run
"wpa_supplicant -BDwext -iwlan0 -c/etc/wpa_supplicant.conf &"
"dhclient"

that will get it working then you can install wicd from the repos. (not sure if you need network manager also??)
 

anantshri

Senior Member
Feb 22, 2011
687
320
Bangalore
anantshri.info
hey one tip regarding wifi packet injection.

before trying compiling any software try following


# ifconfig wlan0 down
# iwconfig wlan0 mode monitor

if this works then only there will be any use of having wifi sniffing tools...
 

slimm609

Senior Member
Jul 10, 2010
125
41
hey one tip regarding wifi packet injection.

before trying compiling any software try following


# ifconfig wlan0 down
# iwconfig wlan0 mode monitor

if this works then only there will be any use of having wifi sniffing tools...

i have already tried it on my native build. The bcm4329 driver does not support it. Nvidia provides a bin file that must be used so im not sure about getting monitor mode support because i dont think we have the full driver source for the wireless card currently.
 

slimm609

Senior Member
Jul 10, 2010
125
41
got everything working fine, power management support is needed, but its very pleasing to have a somewhat useable backtrack install on my otherwise defunct gtablet. Boot time isn't bad, so powering down is still a viable option. What are you working on for the next update if I might ask?

Working on moving the install to the external sdcard and having android on the nand and internal sdcard. And having 2 kernels that you just flash the zip in cwm to boot whichever one you want. The tricky part is getting it to work so you can still change kernels and Roms without causing anything to break. So i have been working on a flashable zip that creates a flashable zip of your android kernel. This would allow you to update your Roms kernel whenever and still be able to boot back and forth easily.

sent from umm.... something
 

slimm609

Senior Member
Jul 10, 2010
125
41

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    6/13/12 update
    updated links and some instructions.
    I currently do not have time to do any work on this currently as i have been working 18+ hours a day. Hopefully if i ever get some time again I will continue it.


    Jaybob413 built the kernel for 1.2 Bootloader. Link is posted below
    Thanks jaybob413

    *PLEASE READ AND UNDERSTAND EVERYTHING HERE BEFORE ATTEMPTING THIS*


    BACKTRACK 5 IS running on the GTABLET in Hybrid mode!

    http://www.youtube.com/watch?v=kJb3mwBhMik video up now =)
    http://www.youtube.com/watch?v=be-9F_VzbHY Dual boot video

    working
    boots natively into backtrack
    X11 desktop works
    wifi
    TOUCHSCREEN!!!!!
    4 buttons. Search opens firefox, home opens users home dir, settings toggles the Onscreen keyboard, and back switches through virtual desktops.

    Not Working
    sound
    bluetooth
    battery stats

    ------------------------------------------------
    I currently have this set up for windows. It can be done from linux but will link everything for windows in this post.

    you must have ADB installed on windows working with the gtablet. see http://xdaforums.com/showthread.php?t=902860

    required files:
    bt5.tar.xz http://d-h.st/YZ4
    restore_droid-kern.zip http://dev-host.org/qsbz1s7xbebt/restore_droid-kern.zip
    droid-kern_backup.zip http://dev-host.org/evmqb1yrd0tn/droid-kern_backup.zip

    1.1 bootloader:
    bt5kern-01-20110525.zip http://dev-host.org/s4d4pp1wvxx4/bt5kern-01-20110525.zip

    1.2 bootloader: thanks jaybob413 for the 1.2 kernel.
    http://xdaforums.com/showpost.php?p=15703493&postcount=137


    optional files:
    nvidia_windows.zip http://dl.dropbox.com/u/4917587/nvflash_windows.zip
    kernel config file http://dl.dropbox.com/u/4917587/config this file is only for reference. you do not have to download it or install it


    the root password is "toor"


    THIS MAY ERASE EVERYTHING ON YOUR TABLET!!!!

    Do this at your own risk!! I take no responsibility for anything that happens to your tablet.

    Start by installing your favorite ROM and kernel.

    Make sure you have adb working and CWM installed


    turn off the device then boot into recovery. (vol+ and power).

    once in recovery you must format the EXTERNAL sdcard into ext3.

    Code:
    adb shell
    
    parted /dev/block/mmcblk2
     
    
    mkfs 1 ext2 
    
    confirm 
    exit
    
    tune2fs -j /dev/block/mmcblk2p1 to format the external SDcard to ext3
    
    mkdir /tmp/ext-sd
    
    mount /dev/block/mmcblk2p1 /tmp/ext-sd/

    exit adb and run

    * this will take a long time *
    Code:
    on a linux box unxz bt5.tar.xz
    
    adb push c:\path\to\bt5.tar /tmp/ext-sd/bt5.tar
    
    adb shell 
    # cd /tmp/ext-sd/
    tar xvf bt5.tar
    
    rm bt5.tar
    cd /
    umount /tmp/ext-sd/

    reboot the device into android and connect the INTERNAL sdcard to the computer to place files on to the sdcard.

    make a directory called kernels on the sdcard and put the 3 zips from above in that folder.
    bt5kern-01-20110525.zip
    droid-kern_backup.zip
    restore_droid-kern.zip

    reboot into recovery and flash the
    droid-kern_backup.zip this will create a backup of the android kernel. This will ONLY need to be done any time that you UPGRADE or CHANGE your android kernel.

    once this is done you switch back and forth between android and backtrack with:

    bt5kern-{date}.zip to boot into backtrack
    restore_droid-kern.zip to boot into android
    ******* You do NOT have to wipe cache or anything when switching back and forth. Just flash whichever you want to boot into and you are done************


    http://xdaforums.com/showpost.php?p=16223052&postcount=139 WICD fix
    5
    Linux touchscreen drivers and settings
    xf86-input-multitouch https://launchpad.net/debian/+archi...ut-multitouch_1.0~rc2+git20110312.orig.tar.gz
    libmtdev1 http://ftp.de.debian.org/debian/pool/main/m/mtdev/mtdev_1.1.0.orig.tar.gz


    ************OLD WAY******************
    How to install backtrack 5 to run on the gtablet with out gtab filesystem modification.

    You must recreate the img file to be less then 4Gb. The img file is currently 4.6Gb. The new image created will be 2.9Gb. this is a vfat limitation

    this has been tested on vegan 5.1 with the gtab/zpad 1.4 OC kernel. Its still a little buggy with random reboots depending on what your are doing but it is a WIP

    The kernel must have loop devices support. Also looks like the kernel needs swap functionality to be enabled.



    I could release the img file that has already been created but backtrack would prefer that people not release other images so this will allow you to create your own after downloading it from them so it remains trusted.


    you either need:
    linux with ADB working on the gtab
    OR
    windows with ADB and access to a linux box with about 10gb of free space.


    Backup your sdcard because it needs to be repartitioned with CWM.

    In CWM under advanced > Partition SD Card > 2048 > 128


    download the arm version of backtrack from www.backtrack-linux.org/downloads/
    and extract the files. you need to copy the bt5.img.gz to the linux box and do all the following steps.

    make a working directory for all the files, copy and gunzip the img file

    Code:
    mkdir bt5
    cp /root/bt5.img.gz bt5
    cd bt5
    gunzip bt5.img.gz

    rename the old bt5.img to something else and create a new image that fits onto the gtabs vfat filesystem.
    then create 2 directory to mount each image and copy the files over to the new img file.
    Code:
    mv bt5.img bt5.old.img
    
    dd if=/dev/zero of=bt5.img bs=4k count=900000
    mke2fs -F -i 8192 bt5.img
    
    mkdir bt5old bt5new
    mount -o loop bt5.old.img bt5old
    mount -o loop bt5.img bt5new
    cd bt5old
    cp -rp * ../bt5new

    *****************************************
    since the system does not go through the full startup scripts once you run "sh bootbt" you must run /etc/rc.local from the chroot to start the vnc server if you add these lines otherwise you must type them each time.

    Code:
    cd ../bt5new/
    vi etc/rc.local and add the following 2 lines before the exit 0 line
    
    export USER=root
    /usr/bin/startvnc

    save the file and then continue on.

    also you can edit /usr/bin/startvnc and modify the screensize to fit the tablet
    the gtablet is 1024x600
    Code:
    vncserver -geometry 1024x600

    *****************************************

    after all files have been copied over you just unmount the 2 directories and gzip the new image.

    Code:
    cd ..  
    (you should now be in the directory with the 2 img files and 2 directories)
    umount bt5old
    umount bt5new
    gzip bt5.img

    edit the bootbt file and change the line

    Code:
    mount -o remount,rw /dev/block/mmcblk0p5 /system
    with
    Code:
    mount -o remount,rw /dev/block/mtdblock3 /system
    *** this needs to be changed to whatever your /system is on your tablet or phone if it is something other then the gtablet.



    now copy this new bt5.img.gz file over to the directory where you got the original image from and then follow the instructions that are included with the download in the README file.



    a good VNC viewer is located
    http://code.google.com/p/android-vnc-viewer/downloads/list

    and also install a terminal emulator so you can start Backtrack 5 from the device.


    ---BUGS---

    running from a terminal emulator everything runs fine but running VNC gnome takes up way to much RAM currently. Looking at fluxbox and/or swap as a fix. causes the tablet to lock up and must be powered off by holding the power button.



    ---Thanks---
    The Backtrack Team -- for coming up with an amazing security distro
    The G-TabDevs Team -- for the vegan 5.1 Rom
    Pershoot -- for maintaining the 1.4 kernel for the gtab and hopefully adding support for needed features =)

    Sorry for the flash in the pictures

    attachment.php

    attachment.php
    3
    BL1.2 test

    Ive got it fixed... I think . Hoping to try and pick back up on it soon. Gonna move to the 1.2 bl and get it working
    Hopefully in the next few weeks... Been really swamped but should be able to get back onto it soon.

    Sent from my PG86100 using XDA App

    I was too impatient to wait any longer for a BL1.2 version, so I rebuilt the kernel with CONFIG_NEWBL=y and updated the posted kernel zip with the new version (bt5kern-bl2.zip). Also attached are the updated LKM files (dhd.ko and scsi_wait_scan.ko) in a separate file (bt5-bl2-lkm.zip). These files will go into the rootfs on your sdcard in /lib/modules/2.6.32.42-slimm/kernel/drivers/... as described in the README included in the zip.

    As always, be safe. All risk is assumed by the user.
    2
    Help please! I can not configure Wi-Fi.
    The description says that Wi-Fi works, but I is not working, maybe you need to install the file config? How to do it?
    Or did I something wrong? Help I can not understand.
    Who knows help!

    edit wpa_supplicant.conf in /etc/

    run
    "wpa_supplicant -BDwext -iwlan0 -c/etc/wpa_supplicant.conf &"
    "dhclient"

    that will get it working then you can install wicd from the repos. (not sure if you need network manager also??)
    2
    wifi is working now. tested with wpa-psk

    New files coming tomorrow with wifi included.
    the touchscreen is seen by the system and xorg just need to find the right configuration for it to work

    now trying to compile as a single touch device because Xorg does not support multi-touch displays