Changes between Version 40 and Version 41 of DreamInstall


Ignore:
Timestamp:
Mar 21, 2011, 10:52:12 AM (9 years ago)
Author:
pespin
Comment:

moved to Devices/HTCDream/InstallGuide

Legend:

Unmodified
Added
Removed
Modified
  • DreamInstall

    v40 v41  
    1 == Introduction ==
    2 This guide applies to the HTC Dream/T-Mobile G1/ADP1 (Android Developer Phone 1)
    3 
    4 Recently some official HTC Dream images were built, meaning that you can now install SHR! However, because these images are recent,
    5 only shr-unstable is available. This can be tried (boot kernel from fastboot) or installed (kernel in flash).
    6 
    7 For reference, and so you know what to expect here's a [http://www.htc-linux.org/wiki/index.php?title=Dream#Core_Status detailed status] of the hardware support.
    8 
    9 == Installation ==
    10 
    11 === You will need ===
    12 
    13  * [http://android-dls.com/wiki/index.php?title=Fastboot Fastboot] (Free and Open Source version available. SHR can build one, and you can too.)
    14  * For now, a Linux installation on your PC.eg., Ubuntu.
    15  * Images from [http://build.shr-project.org/shr-unstable/images/htcdream/]
    16    * A fastboot kernel (ends in .fastboot)
    17    * A root filesystem archive (full-htcdream.tar.gz)
    18  * A blank MicroSD card (You will '''lose any data''' on your MicroSD card)
    19    * Do '''not''' have apps or data on this SD card, you will lose them.
    20  * A MicroSD card reader (Formatting in the phone does ''not'' work.)
    21  * A compatible phone.
    22    * HTC Dream (rooted)
    23    * T-Mobile G1 (rooted)
    24    * ADP1 (Android Developer Phone version 1)
    25 
    26 === Formatting your MicroSD card ===
    27 
    28 Put your SD card into your reader, and attach your reader to your PC.
    29 
    30 '''Note: You cannot format your MicroSD card in the phone. Ensure you use a reader.'''
    31 
    32 Basically you will format the card to a single ext2 or ext3 partition.It's easier (less risk of failure) to make only one partition. The kernel image expects the root filesystem to be on the first partition of the SD card which should be ext2 or ext3.
    33 
    34 '''''BEWARE: Be very careful to select the SD card as all data on the disk will be lost.'''''
    35 
    36 You can use gparted for this or do it from the command line, using fdisk and mkfs.ext3. You should replace SDCARDDEVICE with your
    37 actual device, being careful not to choose your hard disk.
    38 
    39 {{{
    40     $ sudo fdisk /dev/SDCARDDEVICE
    41 }}}
    42 
    43 Now, you should see a {{{Command (m for help):}}} prompt. Type 'p<enter>' to show the current partition layout. You should see something
    44 similar to this
    45 
    46 {{{
    47 Disk /dev/SDCARDDEVICE: 1977 MB, 1977614336 bytes
    48 1 heads, 62 sectors/track, 62298 cylinders
    49 Units = cylinders of 62 * 512 = 31744 bytes
    50 Sector size (logical/physical): 512 bytes / 512 bytes
    51 I/O size (minimum/optimal): 512 bytes / 512 bytes
    52 Disk identifier: 0x00000000
    53 
    54    Device Boot      Start         End      Blocks   Id  System
    55 /dev/SDCARDDEVICE1      2       62298     1931207    c  W95 FAT32 (LBA)
    56 }}}
    57 
    58 First, check that this looks right. Here, the device is 1977MB which corresponds to a 2GB MicroSD card.
    59 
    60 Now, change the type of the partition to Linux (Id 83). At the command prompt, type 't<enter>' to set the partition type. You should then see
    61 
    62 {{{
    63 Selected partition 1
    64 Hex code (type L to list codes):
    65 }}}
    66 
    67 Type '83<enter>'. You should be back at the {{{Command (m for help):}}} prompt. Type 'w<enter>' to write your changes to disk. You
    68 should see:
    69 
    70 {{{
    71 The partition table has been altered!
    72 
    73 Calling ioctl() to re-read partition table.
    74 Syncing disks.
    75 }}}
    76 
    77 Now, being careful to select the SD card (and to include the 1), format your partition with:
    78 
    79 {{{
    80 sudo mkfs.ext3 /dev/SDCARDDEVICE1
    81 }}}
    82 
    83 === Extracting SHR image into root filesystem ===
    84 
    85 Now the MicroSD card is formatted, simply extract the tarball to it as root (very important) For instance,if the SD Card is mounted to /media/sdcard and that the shr-image was downloaded in /home/user/Downloads/full-htcdream.tar.gz do:
    86 
    87 {{{
    88  cd /media/sdcard
    89  sudo tar xvzpf home/user/Downloads/full-htcdream.tar.gz
    90  cd
    91 }}}
    92 
    93 Then unmount the SD card. Ensure that you wait for the SD card to be unmounted before removing it or the reader. Then put the SD card into your phone.
    94 
    95 === Booting the phone from fastboot ===
    96 
    97 Firstly, if you don't have fastboot installed do:
    98 {{{
    99 git clone http://git.freesmartphone.org/?p=utilities.git;a=summary
    100 cd utilities/android/image-utils
    101 sh autogen.sh
    102 make
    103 cd fastboot
    104 ./fastboot
    105 }}}
    106 
    107 Now ensure that your phone is in ''fastboot USB'' mode: Turn off your phone, plug it into USB on your computer, and whilst holding down the back button, press the power button. It should now show a screen with some text, including  the words 'FASTBOOT USB'.
    108 
    109 Assuming the kernel image was downloaded in /home/user/Downloads/zImage-2.6.32+r22+gitr013075354e0b533991650ec756605ad4731e6a0c-r22-htcdream.fastboot, you can now boot SHR with:
    110 
    111 {{{
    112 sudo ./fastboot boot /home/user/Downloads/zImage-2.6.32+r22+gitr013075354e0b533991650ec756605ad4731e6a0c-r22-htcdream.fastboot
    113 }}}
    114 Replace the zimage version by the one you downloaded. Note that the image should be a .fastboot image
    115 
    116 Now, wait a ''very long'' time for SHR post-install configuration screen to come up.
    117 
    118 === Optional: Installing SHR to flash ===
    119 
    120 If you plan to install shr permanantly,simply flash the kernel image on the boot partition.
    121 
    122 There are 3 ways to do it:
    123  * from an android recovery image like cm-recovery-1.4
    124  * from shr itself(for instance boot with fastboot)
    125  * with fastboot itself (require an unlocked bootloader)
    126 
    127 You can do this instead of booting from fastboot.
    128 
    129 == Troubleshooting ==
    130 
    131 === My phone is endlessly rebooting (or just reboots itself) ===
    132 
    133 The usual reason is that the kernel couldn't find the root filesystem on the MicroSD card. A common reason
    134 for this is formatting the SD card in the phone and not a dedicated reader.
    135 
    136 == Initial configuration ==
    137 
    138 Right after booting the HTC Dream (so at the first boot), you will have to wait a long time:
    139 
    140  * Before X starts (Most of this will be at the SHR boot logo).
    141  * At the lock screen, before it loads the initial configuration application (an application that let you configure the phone).
    142 
    143 '''Note that if you don't set a password during the configuration, everyone can ssh into your phone (from wifi, 3G, USB...)'''
    144 
    145 == Post-install configuration ==
    146 
    147 === GPS ===
    148  * GPS should work out of the box.
    149  * Don't run the "gps" command line program manually(it could make your phone reboot).
    150 
    151 === Wifi ===
    152 First note that the htcdream's wifi driver shipped with the kernel we ship doesn't support PSM,that means that you can expect a very short battery life when using wifi,but in another hand it will be very fast and responsive.
    153 In order to make wifi work,you need the firmware and the calibration files, [http://bobcopeland.com/android_wifi.html#_getting_firmware_files the howto is here]
    154 
    155 In order to load wifi do:
    156 {{{
    157 modprobe wl1251_sdio
    158 modprobe msm_wifi
    159 sleep 4
    160 cd /sys/class/rfkill
    161 cd $(ls |grep -v rfkill0)
    162 echo 1 > state
    163 ifconfig wlan0 up
    164 }}}
    165 === GUI tweaks ===
    166  * in /usr/share/applications/vala-terminal.desktop change:
    167 {{{
    168 Exec=vala-terminal
    169 }}}
    170 into:
    171 {{{
    172 Exec=vala-terminal -fs 10
    173 }}}
    174 
    175 === xorg tweaks ===
    176  * to rotate the screen you need to:
    177   * comment the lines containing
    178 {{{
    179 #comment for disabling rotation
    180 }}}
    181   * restart xorg
    182 
    183 === midori(has been replaced by eve in the images) tweaks ===
    184 In order to have kinetic scrolling in midori(thanks to always innovating for the trick):
    185  * add the following line to /usr/share/themes/shr-theme-gtk-e17lookalike/gtk-2.0/gtkrc
    186 {{{
    187 gtk-touchscreen-mode = 1
    188 }}}
    189 
    190  * add the following file:
    191 {{{
    192 // ==UserScript==
    193 // @name Gregoire
    194 // @description Description
    195 // @include *
    196 // ==/UserScript==
    197 
    198 function mousedown_hook(e) {
    199 if ( (e.target.nodeName != "INPUT") && (e.target.nodeName != "TEXTAREA") )
    200  e.preventDefault();
    201 }
    202 
    203 window.addEventListener("mousedown", mousedown_hook, true);
    204 }}}
    205 to that location:
    206 {{{
    207 /home/root/.local/share/midori/scripts/no-selection.js
    208 }}}