1. Download the #1 Android News App:   EarlyBird - News for Android
    Dismiss Notice

Flashing Rom, Trackball not working!

Last Updated:

  1. iheotp

    iheotp Well-Known Member

    I went to go update mine and my girl's ROMs yesterday. Did mine with Tazz's new 2.0, and I'm loving it. I went to do hers as well and when I get into the main menu the trackball doesn't scroll up or down. It works fine when the phone is in operating mode. She is running CELBfroyo. Any suggestions? I cannot scroll around to do a wipe and flash a new rom...

  2. Frisco

    Frisco =Luceat Lux Vestra= VIP Member

    That happened to me once when I was flashing my first 2.2 ROM, an early Cyanogen.

    All I did to remedy the situation was yank the battery out, replace it and start over.
  3. iheotp

    iheotp Well-Known Member

    i tried that twice and didn't work. I'll keep trying. I don't get it
  4. scary alien

    scary alien not really so scary Moderator


    Well, you are certainly not alone (reply I made two days ago to someone re. their trackball issues: http://androidforums.com/eris-all-t...pcs-no-scripts-needed-easy-2.html#post1474944).

    You could try cleaning the trackball with an alcohol wipe (that might work). Some also think that the trackball malfunctions due to its proximity to the USB connector at the bottom of the phone. Some users have tried to (very) gently get their trackball to move via the USB port/cable being plugged-in (although I would caution you against further damaging your USB port).

    Most users end-up returning their phone to VZW for a refurb, although in the case of the user in the above post, it appears that they gave that user refurb with a wonky trackball). There is also the option of trying the ClockworkMod custom recovery since it does not use the trackball to navigate. See the above post for my further suggestions regarding this.

    Good luck and bummer, dude!
    iheotp likes this.
  5. Frisco

    Frisco =Luceat Lux Vestra= VIP Member

    Were there any trackball issues prior to the attempt at rooting that device?
  6. scary alien

    scary alien not really so scary Moderator

  7. iheotp

    iheotp Well-Known Member

    Thanks guys, all great suggestions, just what I was looking for. She has the phone today so I will try when she gets home. The trackball works fine when using the phone and has worked fine before I rooted and since I rooted I have flashed maybe 3 Roms on her phone and it worked everytime. Just doesn't seem to wanna work when I go into Amon
  8. scary alien

    scary alien not really so scary Moderator


    The other day, I actually looked at Amon_RA's custom recovery source code (with the intention of possibly modifying it to use the volume up/down toggle instead).

    Anyway, the way the program handles / recognizes the trackball is by looking for position changes (delta) plus/minus some unit of 3 (apparently to its last relative position?). Its possible that Amon_RA's recovery is just not as sensitive as the regular Android trackball processing code and that you might have to move it more in the up/down direction to get it to recognize that a movement has occurred.

    This is just a theory, but you might want to try it out.

  9. ppbb

    ppbb Well-Known Member

    my trackball will do this too. it'll work fine when the phone is booted up/normal use. but when in recovery (amons ra) it'll be stuck in one position or be very very lazy. sometimes have to wait a few seconds, and then it kicks in. i say when in recovery wait 20-30 seconds, let the phone catch up and then the trackball usually starts to work.

    If the trackball was totally dead, it wouldn't work in normal phone use.
  10. scary alien

    scary alien not really so scary Moderator

    I don't have the code pulled-up here, but the section it was in made it seem like its not a binary operation...it has to "arrive" at a certain delta of movement to "see" the change. So, perhaps being a little patient and scrolling the trackball a little more than normal will allow those with trackball issues to actually use this in recovery...
  11. iheotp

    iheotp Well-Known Member

    I have tried cleaning the ball and no dice. It simply won't scroll in recovery mode. It works fine when the phone is on. And I can press it in to choose "reboot now" in recovery mode but it will not scroll, so frustrating. Is there a way for me to just re root the phone or something?
  12. erisuser1

    erisuser1 Well-Known Member


    You are not the first person to experience this - a trackball which will not work in Amon_RA (for up/down motion), but is otherwise fine in the regular OS.

    Apparently there is something about the kernel in the Amon_RA recovery which is different enough that it doesn't work on some trackballs. It doesn't happen very often - you are one of the unlucky ones.

    There is a way to force a ROM onto a phone like this - by using the adb command line from the PC with Amon_RA running.

    It's a little complicated, and requires that you get your PC drivers set up so that you can use ADB on the PC to communicate with the phone over USB.

    Charge the phone, connect USB cable to PC, boot to Amon_RA, and then start up an adb shell on the phone:

    C:\android-sdk\tools> adb shell
    Code (Text):
    2. nandroid-mobile.sh -b --norecovery --nocache --nomisc --nosplash1 --nosplash2 --defaultinput 1>&2
    3. [COLOR=orange][B]/sbin/recovery[/B][/COLOR] --wipe_data
    4. [COLOR=orange][B]/sbin/recovery[/B][/COLOR] --update_package=SDCARD:[B][COLOR=green]romname.zip[/COLOR][/B]
    Where "romname.zip" is the actual name of your ROM file in the top-level folder of the SD card (No spaces or weird characters in the name of the file, please).

    Note that that both /sbin/recovery commands will "hang" when they finish, rather than return to the command prompt. You can kill them safely by hitting Ctrl-C. Note that this will kick you out of your adb session, so you will need to start another adb session from the PC. (That is, "adb shell"). No need to repeat anything, just continue to the next command in the sequence.

    But there is a small problem here - how do you know when they are finished running so you can safely hit the Ctrl-C key combination?

    The easiest way to do this is to first wait until you see no further changes to the display on the Eris, then wait 2 minutes more, and then open up another command window on the PC, and run the command:

    Code (Text):
    2. adb shell tail /cache/recovery/log
    If (each instance of) the /sbin/recovery program has completed you will see that the last line in the log file (above) will say:

    I:Installation complete.

    That's one way. I'll admit that it probably very intimidating to someone that is new to this - but it is possible to use Amon_RA without a working trackball to:

    - Do a Nandroid backup
    - Wipe data/factory reset
    - Flash a ROM from a zip file on the SD card.
    iheotp, doogald and scary alien like this.
  13. erisuser1

    erisuser1 Well-Known Member


    Just saw this over at XDA. Seems kind of bizzare, but it is simple to try. If it doesn't work, no big deal.

    If it does, please report so.

  14. iheotp

    iheotp Well-Known Member

    thanks erisuser1. I tried the usb thing and it didn't work. I will try doing the adb shell process tonight. IT does seem a little intimidating. Although first rooting my phone was intimidating as well and it went smoothly. Thanks for all your help
  15. iheotp

    iheotp Well-Known Member

    Hey Erisuser1. I followed your instructions and I can get the phone wiped but it is not installing the ROM. On the command screen it says /#/ sbin/recovery--wipe_data. Then nothing happens. The phone says Formatting Data...
    Formatting CACHE...

    And that's it. I waited for something to happen but it doesn't get past this point
  16. andrizoid

    andrizoid Well-Known Member

    if you can get ahold of the system.img and the boot.img you can write them to the phone directly if your using the s=off bootloader.
  17. scary alien

    scary alien not really so scary Moderator


    It sounds like you are at the point that eu1 indicated you might have to hit control-C since he indicated that the /sbin/recovery commands will "hang" when they finish.

    Does this match what you are seeing? Carefully re-read his instructions...


    Note: I decided to try this stuff too :eek:...so I've done the Nandroid backup (first command he listed) and then the "--wipe_data" command...the command did/does hang...I waited about two minutes per eu1's instructions...and then hit control-C and did the "adb shell tail /cache/recovery/log", but I don't see "I:Installation complete." in the log. Instead, I see:

    Code (Text):
    1. d:\android-sdk-windows\tools>[B]adb shell tail /cache/recovery/log[/B]
    2. [COLOR=blue]ro.hardware=desirec[/COLOR]
    3. [COLOR=blue]ro.revision=2[/COLOR]
    4. [COLOR=blue]ro.cid=VZW__001[/COLOR]
    5. [COLOR=blue]init.svc.recovery=running[/COLOR]
    6. [COLOR=blue]init.svc.adbd=running[/COLOR]
    7. [COLOR=blue]adb.connected=1[/COLOR]
    8. [COLOR=blue]Formatting DATA:...[/COLOR]
    9. [COLOR=blue]Formatting CACHE:...[/COLOR]
    10. [COLOR=blue]Fixing execute permissions for /cache[/COLOR]
    11. d:\android-sdk-windows\tools>
    Anyway, re-read his instructions carefully (you are probably safe and ready to hit control-C and do your update command as eu1 indicated (you'll have to do another "adb shell", right?)).

    Also, feel free to wait until eu1 responds...(I probably would have :))

    This is pretty cool and is a nice option to have for those that can't use their trackball. Thanks again, eu1! :)
  18. iheotp

    iheotp Well-Known Member

    I only get the first /sbin/recovery to hang...so the second one which is what flashes the rom is not working. I am trying to flash Cyanogen Tazz-ou812.zip. I waited a good hour to see if it was loading and nothing. I did the adb shell tail /cache/recovery/log and this is what I get..
    mtd:not erasing bad block at 0x03ec0000
    mtd:not erasing bad block at 0x03fa0000
    mtd:not erasing bad block at 0x060e0000
    mtd:not erasing bad block at 0x06960000
    mtd:not erasing bad block at 0x06d20000
    Formatting CACHE....
    mtd:not erasing bad block at 0x02840000
    mtd:not erasing bad block at 0x02e40000
    mtd:not erasing bad block at 0x031a0000
    Fixing execute permissions for /cache
  19. scary alien

    scary alien not really so scary Moderator

    Yeah...let's wait on eu1...

    I only did the Nandroid backup and the wipe--didn't flash a ROM since I got the gist of what was going on...

    Not sure what those errors are all about (hopefully, not /sdcard issues)...tell you what...I'll try downloading and flashing Tazz (but I'm pretty sure we're supposed to wipe Dalvik-cache too for Froyo ROMs).

    I'll get back with you and let you know how it goes (and what I see too)...hopefully, eu1 will respond before then.

  20. iheotp

    iheotp Well-Known Member

    I was doing all 3 codes at once so i did it individually and it worked better but still no dice. But now when I go to flash the rom, on my phone it says Installation aborted. no such file or directory. So I must be doing something wrong with the file name or something
  21. scary alien

    scary alien not really so scary Moderator

    Yeah, you gotta do each command separately ;).

    Is your "Cyanogen_Tazz-_ou812.zip" file in the top-level directory of the /sdcard (i.e., its full file path should be "/sdcard/Cyanogen_Tazz-_ou812.zip")? Also, this is the filename that you will pass in the "upate_package" command, like this:

    Code (Text):
    1. [B][COLOR=#ffa500]/sbin/recovery[/COLOR][/B] --update_package=SDCARD:[COLOR=#0000ff]Cyanogen_Tazz-_ou812.zip[/COLOR]
    Assuming we both spelled the ROM filename right :p.

    Also, the wipe commands don't take too much time (but allow for the 2+2 minute interval like eu1 suggested). The update will certainly take longer than the wipes, but probably within the 4 minutes (but check the /cache/recovery/log just to be sure).

    Sounds like you are pretty close...also, I'm not 100% sure this is needed, but I'm going to also do a "/sbin/recovery --wipe_cache" to wipe my Dalvik-cache (my ROM is still downloading...so, I'm not quite there yet).

    Good luck!
  22. scary alien

    scary alien not really so scary Moderator

    Okay, so here's what I did:

    Code (Text):
    2. d:\android-sdk-windows\tools>
    3. d:\android-sdk-windows\tools>[B][COLOR=blue]adb shell[/COLOR][/B]
    4. / # [COLOR=blue][B]nandroid-mobile.sh -b --norecovery --nocache --nomisc --nosplash1 --nosplash2 --defaultinput 1>&2[/B][/COLOR]
    5. nandroid-mobile.sh -b --norecovery --nocache --nomisc --nosplash1 --nosplash
    6. 2 --defaultinput 1>&2
    7. nandroid-mobile v2.2.1
    8. Using G1 keyboard, enter a prefix substring and then <CR>
    9. or just <CR> to accept default: Accepting default.
    10. Using - prefix to create a backup folder
    11. mounting system and data read-only, sdcard read-write
    12. checking free space on sdcard
    13. Dumping boot to /sdcard/nandroid/XXXXXXXXXXXX/BDS-20100903-0113/boot.img...done
    14. Dump of the recovery partition suppressed.
    15. Dump of the misc partition suppressed.
    16. Dumping system to /sdcard/nandroid/XXXXXXXXXXXX/BDS-20100903-0113/system.img...done
    17. Dumping data to /sdcard/nandroid/XXXXXXXXXXXX/BDS-20100903-0113/data.img...done
    18. Dump of the cache partition suppressed.
    19. generating md5sum file...done
    20. unmounting system, data and sdcard
    21. Backup successful.
    22. / # [COLOR=blue][B]/sbin/recovery --wipe_data[/B][/COLOR]
    23. /sbin/recovery --wipe_data
    24. [COLOR=blue][B]^C[/B][/COLOR][COLOR=#800080]   <--that's me hitting control-C after about 4 minutes[/COLOR]
    25. d:\android-sdk-windows\tools>[COLOR=blue][B]adb shell tail /cache/recovery/log[/B][/COLOR]
    26. ro.hardware=desirec
    27. ro.revision=2
    28. ro.cid=VZW__001
    29. init.svc.recovery=running
    30. init.svc.adbd=running
    31. adb.connected=1
    32. Formatting DATA:...
    33. Formatting CACHE:...
    34. Fixing execute permissions for /cache
    35. d:\android-sdk-windows\tools>[COLOR=blue][B]adb shell[/B][/COLOR]
    36. / #[COLOR=blue][B] /sbin/recovery --wipe_cache[/B][/COLOR]
    37. /sbin/recovery --wipe_cache
    38. [COLOR=blue][B]^C[/B][/COLOR][COLOR=#800080]   <--that's me hitting control-C after about 4 minutes[/COLOR]
    39. d:\android-sdk-windows\tools>[COLOR=blue][B]adb shell tail /cache/recovery/log[/B][/COLOR]
    40. ro.bootloader=1.49.2000
    41. ro.hardware=desirec
    42. ro.revision=2
    43. ro.cid=VZW__001
    44. init.svc.recovery=running
    45. init.svc.adbd=running
    46. adb.connected=1
    47. Formatting CACHE:...
    48. Fixing execute permissions for /cache
    49. d:\android-sdk-windows\tools>[COLOR=blue][B]adb shell[/B][/COLOR]
    50. / # [COLOR=blue][B]/sbin/recovery --update_package=SDCARD:Cyanogen_Tazz-_ou812.zip[/B][/COLOR]
    51. /sbin/recovery --update_package=SDCARD:Cyanogen_Tazz-_ou812.zip
    52. [COLOR=blue][B]^C[/B][/COLOR][COLOR=purple]   <--that's me hitting control-C after about 4 minutes[/COLOR]
    53. d:\android-sdk-windows\tools>[COLOR=blue][B]adb shell tail -n 40 /cache/recovery/log[/B][/COLOR]
    54. calling command set_perm
    55. calling command symlink
    56. calling command set_perm
    57. calling command set_perm
    58. calling command set_perm
    59. calling command set_perm
    60. calling command set_perm
    61. calling command set_perm
    62. calling command set_perm
    63. calling command set_perm
    64. calling command set_perm
    65. calling command show_progress
    66. calling command delete
    67. Deleting files...
    68. calling command copy_dir
    69. Copying files...
    70. minzip: Extracted file "/data/app/Toggle2G.apk-signed.apk"
    71. minzip: Extracted file "/data/app/biggsmanno.cyanogen-1.apk"
    72. minzip: Extracted file "/data/app/com.android.gallery-2.1-update1.apk"
    73. minzip: Extracted file "/data/app/com.quoord.tapatalkxda.activity.apk"
    74. minzip: Extracted file "/data/app/com.stealthcopter.nexusrevamped-1.apk"
    75. minzip: Extracted file "/data/app/com.uklooney.flyingtoast-1.apk"
    76. minzip: Extracted file "/data/app/matrix.wallpaper.apk"
    77. minzip: Extracted file "/data/app/placeholder"
    78. minzip: Extracted file "/data/app/wallpaper.fireworks.apk"
    79. minzip: Extracted file "/data/app/wireless_tether_2_0_2.apk"
    80. minzip: Extracted file "/data/data/com.android.vending/shared_prefs/vending_preferences.xml"
    81. minzip: Extracted file "/data/eri.xml"
    82. calling command set_perm
    83. calling command show_progress
    84. calling command format
    85. Formatting BOOT:...
    86. calling command write_raw_image
    87. Writing BOOT:...
    88. calling command show_progress
    89. calling command format
    90. Formatting CACHE:...
    91. calling command show_progress
    92. [COLOR=darkgreen][B]I:Installation complete.[/B][/COLOR]
    93. Fixing execute permissions for /cache
    94. d:\android-sdk-windows\tools>
    From there, I simply rebooted and am now running Cyanogen Tazz ou812! :D

    Screenshots coming...give me a second...here you go (wipe_data, wipe_cache, update_package, Cyanogen Tazz main screen):

    manual-wipe.jpg manual-wipe-cache.jpg manual-flash.jpg cyanogen tazz.jpg
  23. erisuser1

    erisuser1 Well-Known Member

    Yes, it is a good idea to pay attention to the error messages - you can usually believe them. ;)

    The instructions that I provided can be cut-n-pasted, one line at a time, as is, with the exception of the text shown in green - the file name. Make sure you get it correct.

    If it helps, (many people don't know this) there is a "paste" function available with the Windows "Command Window" - after you have copied text in your browser, right-click on the top "bar" of the Command window and choose Edit -> Paste.

    It sounds like you are on the right track. I think if you re-read my original instructions very carefully, you will notice that I mentioned everything that you subsequently "discovered".

    Note that if you have subsequently rebooted your phone after your last attempt, you do need to re-perform the "/sbin/recovery --wipe_data" step immediately before doing the flashing step. (The Dalvik wipe step is superfluous because the /sbin/recovery --wipe_data" step wipes everything in /data - including the Dalvik cache).

    scary alien likes this.
  24. scary alien

    scary alien not really so scary Moderator


    This was pretty cool and fun! Thank you for sharing this method with everyone. I hope my "transcript" above helps.

  25. erisuser1

    erisuser1 Well-Known Member


    It's slightly off topic, but last night I unpacked Amon_RA's recovery, and fooled around to see if I could remap the key functions (using init.rc) to come up with a modded version of Amon_RA v1.6.2 that wouldn't need the trackball for scrolling.

    Long story** short, no joy. I think the "setprop" method of key mapping probably only applies to the way that Dalvik apps see the keyboard. It's a dead end to me unless Amon_RA publishes his code someplace. It might be online and I didn't look for it long enough. (Koush publishes his recovery online @ github iirc).


    ** it had a useful side effect though - somehow I managed to lose my copy of mkbootimg (Ubuntu) during my last machine transition, and I couldn't figure out where I previously had found it on XDA... so I was forced to set up an Ubuntu VM and build the entire Froyo tree to get the toolchain components.

Share This Page