Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: HOWTO: Install Debian onto your Nexus One using Ubuntu

  1. #1
    Join Date
    Mar 2009
    Location
    Australia
    Beans
    156

    HOWTO: Install Debian onto your Nexus One using Ubuntu

    1) Introduction

    Here's a longish guide to unlock, root and run Debian on your Nexus One.

    It's based on various guides and forum posts around (see embedded links), but with more details, with some missing pieces and corrected mistakes, all compiled into a (hopefully) newb-friendly step by step guide.

    Note THIS WILL WIPE THE SETTINGS AND APPS FROM YOUR PHONE, so backup first (I suggest Astro for your apps).
    This will not affect Android at all; it will be as it was the first time you turned the phone on.

    You will need between 1.5 and 2 GB of free space on your SD card.

    I did this after I had applied the first Android patch (Feb 2010), and the patch seemed unaffected (ie. I still had multitouch afterwards)


    2) Connect the phone to computer

    - Install the Android SDK on your computer.

    $ sudo gedit /etc/udev/rules.d/51-android.rules

    - Save these two lines into the file:
    Code:
    SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
    SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
    $ sudo chmod a+rx /etc/udev/rules.d/51-android.rules

    $ sudo service udev restart

    Now, for example, if you plug in the phone and run
    $ sh android-sdk-linux_86/tools/ddms
    you will see the phone listed. (Note: this is not a step in the howto)


    3) Unlock the bootloader

    - Turn the phone off.

    - Hold the trackball down, and turn it back on. The phone will boot into the white bootloader screen with Androids on skateboards.

    - Plug the phone into the computer

    - The title of the menu on the phone will be FASTBOOT USB.

    - Download fastboot.zip from the link in the OP here and open a terminal window wherever you extract it's contents to

    $ sh ./fastboot-linux oem unlock

    - If you see "< Waiting for device >" you may need to use the power button to select BOOTLOADER and FASTBOOT to switch back and forth between the two menus a couple of times, until the phone connects to the computer.

    - The phone will now ask if you want to unlock the bootloader, select yes.

    The bootloader is now unlocked, the bootloader screen will have a pink UNLOCKED at the top, and an open lock is displayed in the phone startup graphics.


    4) Root the phone

    - Check Build Number in Settings > About Phone. Mine was ERE27

    - Go here to get the appropriate Superboot image. I used the himem version of ERE27, to make full use of my RAM.

    - Turn the phone off, and back on with the trackball held down to get into the bootloader screen

    - Plug the phone into the computer

    - Unzip the Superboot archive file, and open a terminal window there

    $ sh ./install-superboot-linux.sh

    - Go to Settings > Applications > Development > allow USB debugging on the phone.

    Now if you enter "su" into a terminal app on the phone such as Android Terminal Emulator (don't use Terminal Emulator - no virtual keybd) you will be root. You also have the Superuser Permission icon available in the phone applications


    4) Install Busybox

    - Get busybox from their website (build from the src if you like, but I just downloaded the 1.16.0 binary for ARMv6l)

    - Plug in phone (turned on and running, not in fastboot)

    - Rename the busybox-armv6l file to "busybox" and put it in android-sdk-linux_86/tools. Open a terminal window there

    $ sh ./adb shell

    # su

    # mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system

    # exit (repeat if necessary, until out of adb shell)

    $ sh ./adb push busybox /data/local

    $ sh ./adb shell

    # su

    # chmod 755 /data/local/busybox

    # /data/local/busybox mkdir /system/xbin

    # cd /data/local

    # ./busybox cp /data/local/busybox /system/xbin

    # cd /system/xbin

    # chmod 755 busybox

    # ./busybox --install -s /system/xbin

    # rm /data/local/busybox

    # reboot

    The phone will reboot, busybox is installed.


    5) Install Debian
    (Based on this guide, and using the image from it.)


    - Download the Debian installer files
    (Should download fine, but if not then check this thread for links: http://forum.xda-developers.com/showthread.php?t=529233)

    - Extract all the files

    - Copy bootdeb, debian.img, debian.sh, mountonly, fsrw, uninonfs to /sdcard/debian/ on the phone (make the directory if needed)

    - Copy vnc.apk and swapper.apk to android-sdk-linux_86/tools/

    - Plug the phone in

    - Open a terminal window in android-sdk-linux_86/tools/

    $ adb remount

    $ adb install vnc.apk

    $ adb install swapper.apk

    $ adb shell

    # cd /sdcard/debian

    # su

    # sh ./debian.sh

    # exit (repeat until out of adb)

    - Fix a line in bootdeb. Replace this line:
    Code:
    mount -o loop,noatime $kit/debian.img $mnt
    with this:
    Code:
    mount -o loop,noatime -t ext2 $kit/debian.img $mnt
    - On the phone Run swapper. Set swap to 96 MB. Set swappiness to 60. Press "Swap ON"

    - Install "Android Terminal Emulator" (not "Terminal Emulator") on the phone through the market

    - Open terminal emulator on the phone

    # su

    # sh /sdcard/debian/bootdeb

    - Press the home button

    - open androidVNC
    Nickname = anything
    Password = android
    Address = LocalHost
    Port = 5901
    Colors = up to you


    - Press connect

    That's it, you now have Debian running on your N1.
    To exit cleanly press and hold the home button, go to the terminal, enter "exit".
    Every time you want to start Debian, do swapper, terminal, androidVNC, as above.
    AndroidVNC isn't necessary if you don't want a GUI.


    4) Conclusion

    If you discover any ways, or any packages to install, that make Debian easier or better to use on the N1, please put them in this thread.

    Note Debian here is just an image chrooted in Android. It is not running directly on the hardware, but this is possible. However, switching between Android and Debian then becomes painful, and requires a reboot, so I prefer this way.
    Last edited by hobo14; March 8th, 2010 at 03:38 AM.
    .
    .

    AUSTRALIANS, be counted against planned censorship of our internet here!!
    #nocleanfeed #openinternet

  2. #2
    Join Date
    Dec 2005
    Location
    Trondheim, Norw
    Beans
    94

    Re: HOWTO: Install Debian onto your Nexus One using Ubuntu

    Great howto!

    The fastboot.zip link is down.

    What part of this procedure is it that wipes the settings/apps?

  3. #3
    Join Date
    Mar 2009
    Location
    Australia
    Beans
    156

    Re: HOWTO: Install Debian onto your Nexus One using Ubuntu

    Thanks, fixed that link.

    Unlocking the bootloader wipes the phone.
    .
    .

    AUSTRALIANS, be counted against planned censorship of our internet here!!
    #nocleanfeed #openinternet

  4. #4
    Join Date
    May 2006
    Beans
    180
    Distro
    Xubuntu 8.04 Hardy Heron

    Re: HOWTO: Install Debian onto your Nexus One using Ubuntu

    is this what you're looking for ?
    http://www.romraid.com/paul/fastboot.zip

    Btw I will insert the procedure to backup the flash using nandroid ...
    # http://rzr.online.fr/q/apt # test my deb's please
    # http://rzr.online.fr/q/ubuntu # contribs docs etc
    # http://rzr.online.fr/q/unicorn # works for me
    # http://go.cur.lv/files# files to be shared or email me

  5. #5
    Join Date
    Mar 2009
    Location
    Australia
    Beans
    156

    Re: HOWTO: Install Debian onto your Nexus One using Ubuntu

    Quote Originally Posted by www.rzr.online.fr View Post
    is this what you're looking for ?
    http://www.romraid.com/paul/fastboot.zip

    Btw I will insert the procedure to backup the flash using nandroid ...
    Rzr that is the link I originally posted. It doesn't work (test it).
    I have already fixed the link in the OP.
    .
    .

    AUSTRALIANS, be counted against planned censorship of our internet here!!
    #nocleanfeed #openinternet

  6. #6
    Join Date
    May 2006
    Beans
    180
    Distro
    Xubuntu 8.04 Hardy Heron

    Re: HOWTO: Install Debian onto your Nexus One using Ubuntu

    that link used to work when i tested .. weird

    that one has the same checksum :
    http://www.bernie.net.my/files/fastboot.zip

    btw for the backup i wonder if it requieres to be rooted 1st

    that page said not :
    http://www.ehow.com/how_5853749_teth...irelessly.html

    but how to on n1 ?
    http://forum.xda-developers.com/show...46#post5799946

    regards
    # http://rzr.online.fr/q/apt # test my deb's please
    # http://rzr.online.fr/q/ubuntu # contribs docs etc
    # http://rzr.online.fr/q/unicorn # works for me
    # http://go.cur.lv/files# files to be shared or email me

  7. #7
    Join Date
    Mar 2010
    Beans
    1

    Re: HOWTO: Install Debian onto your Nexus One using Ubuntu

    Please give credit where it is due, thanks

  8. #8
    Join Date
    Feb 2008
    Beans
    41

    Re: HOWTO: Install Debian onto your Nexus One using Ubuntu

    Quote Originally Posted by www.rzr.online.fr View Post
    btw for the backup i wonder if it requieres to be rooted 1st

    that page said not :
    http://www.ehow.com/how_5853749_teth...irelessly.html
    Ehow's howto is definitely wrong.
    Nandroid is only provided with custom recoverys.
    And custom recovery is only installable if you are root.

  9. #9
    Join Date
    Mar 2009
    Location
    Australia
    Beans
    156

    Re: HOWTO: Install Debian onto your Nexus One using Ubuntu

    Quote Originally Posted by charansingh View Post
    Please give credit where it is due, thanks
    I did write that this howto is based on guides by others, and I do already provide a link directly to your guide Charansingh, but I will edit the post to be more explicit.
    .
    .

    AUSTRALIANS, be counted against planned censorship of our internet here!!
    #nocleanfeed #openinternet

  10. #10
    Join Date
    Dec 2009
    Location
    Bangalore, India
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: HOWTO: Install Debian onto your Nexus One using Ubuntu

    Hi, im a complete noob so please help me out.

    I am getting the following error in terminal when i want to install the amon_ra recovery image

    user@user-desktop:~/Desktop/android-sdk-linux_86/tools$ fastboot flash recovery recovery-RA-nexus-v1.7.0-cyan.img
    fastboot: command not found

    My computer no longer recognizes fastboot as a command. It says fastboot: not found. What now? I'm trying to flash Amon_RA's recovery image.

    My computer only recognizes the N1 as a device if it's fully booted up and the sd card is mounted. Otherwise, my computer doesn't see it.

    What can i do?

    OS: Ubuntu 9.10
    Last edited by cyberjar09; March 24th, 2010 at 10:42 AM.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •