• TF300T Easter brick resurrection

    TF300T Easter brick resurrection

    Since Asus stopped providing us with official updates for TF300T tablet from the old Android 4.2.1, I decided it was finally time to root it and put a brand new shiny Lollipop ROM onto it. I rooted all my previous phones and it all went well all the times so I figured it would go smooth this time as well. Except it didn’t. :D

    Somehow I managed to follow an outdated tutorial for unlocking and flashing the TF300T that recommended using the ClockWorkMod recovery. All went well up to that point, I unlocked the tablet and put the CWM without any trouble but when I tried to flash the CyanogenMod ROM, CWM complained about not being able to mount any partitions. That meant that I couldn’t select the ROM zip file from a internal location or sideload it with ADB. Funky.

    So I did a bit more research and it turned out that CM does not really support CWM for Lollipop (not sure if only for this device, or generally, but it doesn’t matter anyway). Solution – flash TWRP recovery instead. Ok, so I went back to fastboot and tried to flash TWRP over CWM but it failed every time. This is where it all started to go down..

    My first mistake was that I downloaded the *-JB version of TWRP instead of the *-4.2. I was quite lucky here as it was only later that I read that if you screwed that part – hardbricking was guaranteed. Instead of everything going to smoke already, flashing TWRP simply failed every time (RCK would stop blinking and rebooting using fastboot -i 0x0B05 reboot didn’t work) and each reboot into recovery would load CWM again and again. I could still boot into Android as well. I thought that was strange so I tried a couple of times but of course it didn’t help.

    My second (even bigger) mistake was – I selected the “wipe” option from the fastboot screen.. Fool of a Took. ‘#$&%*!… I thought this would somehow help but instead I got stuck inside an infinite CWM loop. I had ADB access, but rebooting to fastboot using adb reboot-bootloader simply didn’t work. After ~6 hours of trying, I almost gave up at this point but after a bit more research I found a slightly different version of the same command – adb reboot bootloader (without the dash) and BINGO! That was my way back. So happy! Now I could boot into fastboot again.

    Well now I only had to figure out how to get rid of the CWM.. This SE answer stated that I should restore the device to defaults by flashing Asus stock ROM (download firmware for your language, unzip it and flash the *.blob file). Running fastbot erase before flashing the Asus firmware looked reeeally scary, but it was the only option I had so I went for it.. It all went great and after that it was very easy to flash TWRP and then CM and Gapps from TWRP.

    Problem solved! After ~8 hours of not giving up, my tablet was resurrected and alive again! Easter day of 2015. True story.

    Well, lesson learned – do the research and RTFM in advance. And I hope the post helps some other impatient bricker! :)

    PS – the device works faster/smoother/better with Lollipop. *thumbsup* for the Android team.

    Cheers!

  • SaaS’s rottenpotatoes ruby-debug LoadError fix

    SaaS’s rottenpotatoes ruby-debug LoadError fix

    In two days Barkeley’s edx SaaS course is starting and I wanted to set up their rottenpotatoes RoR app on my machine without the VM they provided but I kept getting this error every time I tried to run “rails server” within the rottenpotatoes directory:

    “/usr/lib/ruby/gems/1.9.1/gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `require’: /usr/lib/ruby/gems/1.9.1/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so: undefined symbol: ruby_current_thread – /usr/lib/ruby/gems/1.9.1/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so (LoadError)”

    Knowing almost nothing about working with RoR it took me a while to figure out why exactly this wouldn’t work and how to fix it. I tried installing a few different versions of ruby-debug and whatnot but nothing helped. Finally, I found this answer on StackOverflow which let me to the right rail. :D Apparently, ruby-debug19 and ruby-debug-base19 gems haven’t been updated in some time (and won’t any time soon) which already caused headaches for many people around the world.

    To fix this simply install debugger (“Debugger is a fork of ruby-debug called ‘debugger’ and it incorporates many of the fixes people had been deploying on top of ruby-debug19.”) gem using:

    1
    gem install debugger

    after that edit the following line from “Gemfile” file from your rottenpotatoes directory:

    1
    gem 'ruby-debug19', :require => 'ruby-debug'

    to:

    1
    gem 'debugger', :require => 'ruby-debug'

    save the changes and run “rails server”. You should get this as the output:

    1
    2
    3
    4
    5
    6
    7
    => Booting WEBrick
    => Rails 3.1.0 application starting in development on http://0.0.0.0:3000
    => Call with -d to detach
    => Ctrl-C to shutdown server
    [2013-01-05 17:30:01] INFO WEBrick 1.3.1
    [2013-01-05 17:30:01] INFO ruby 1.9.3 (2012-12-25) [i686-linux]
    [2013-01-05 17:30:01] INFO WEBrick::HTTPServer#start: pid=3041 port=3000

    and now you will be able to acces the rottenpotatoes app on http://localhost:3000/movies

  • Pyramid installation – “UnicodeDecodeError: ‘ascii’ codec can’t decode byte” error fix

    Pyramid installation – “UnicodeDecodeError: ‘ascii’ codec can’t decode byte” error fix

    Following pyramid framework installation notes I kept getting ‘ascii’ codec can’t decode byte error message. The whole error output looked like this:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    $ bin/easy_install pyramid
    Searching for pyramid
    Reading http://pypi.python.org/simple/pyramid/
    Reading http://docs.pylonshq.com
    Reading http://pylonsproject.org
    Reading http://docs.pylonsproject.org
    Best match: pyramid 1.4a4
    Downloading http://pypi.python.org/packages/source/p/pyramid/pyramid-1.4a4.tar.gz#md5=0a5da1a25791764cdfefb15b2d55656a
    Processing pyramid-1.4a4.tar.gz
    Writing /tmp/easy_install-hrcuuc/pyramid-1.4a4/setup.cfg
    Running pyramid-1.4a4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-hrcuuc/pyramid-1.4a4/egg-dist-tmp-kbuxa9
    Traceback (most recent call last):
    File "bin/easy_install", line 9, in
    load_entry_point('distribute==0.6.28', 'console_scripts', 'easy_install')()
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/command/easy_install.py", line 1929, in main
    with_ei_usage(lambda:
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/command/easy_install.py", line 1910, in with_ei_usage
    return f()
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/command/easy_install.py", line 1933, in
    distclass=DistributionWithoutHelpCommands, **kw
    File "/usr/lib/python3.3/distutils/core.py", line 148, in setup
    dist.run_commands()
    File "/usr/lib/python3.3/distutils/dist.py", line 917, in run_commands
    self.run_command(cmd)
    File "/usr/lib/python3.3/distutils/dist.py", line 936, in run_command
    cmd_obj.run()
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/command/easy_install.py", line 358, in run
    self.easy_install(spec, not self.no_deps)
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/command/easy_install.py", line 598, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/command/easy_install.py", line 628, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/command/easy_install.py", line 823, in install_eggs
    return self.build_and_install(setup_script, setup_base)
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/command/easy_install.py", line 1103, in build_and_install
    self.run_setup(setup_script, setup_base, args)
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/command/easy_install.py", line 1089, in run_setup
    run_setup(setup_script, args)
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/sandbox.py", line 31, in run_setup
    lambda: exec(compile(open(
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/sandbox.py", line 79, in run
    return func()
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/sandbox.py", line 34, in
    {'__file__':setup_script, '__name__':'__main__'})
    File "setup.py", line 122, in
    File "/usr/lib/python3.3/distutils/core.py", line 148, in setup
    dist.run_commands()
    File "/usr/lib/python3.3/distutils/dist.py", line 917, in run_commands
    self.run_command(cmd)
    File "/usr/lib/python3.3/distutils/dist.py", line 936, in run_command
    cmd_obj.run()
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/command/bdist_egg.py", line 172, in run
    self.run_command("egg_info")
    File "/usr/lib/python3.3/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
    File "/usr/lib/python3.3/distutils/dist.py", line 936, in run_command
    cmd_obj.run()
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/command/egg_info.py", line 179, in run
    self.find_sources()
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/command/egg_info.py", line 254, in find_sources
    mm.run()
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/command/egg_info.py", line 308, in run
    self.add_defaults()
    File "/home/pootzko/env/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/setuptools/command/egg_info.py", line 339, in add_defaults
    self.read_manifest()
    File "/usr/lib/python3.3/distutils/command/sdist.py", line 377, in read_manifest
    for line in manifest:
    File "/home/pootzko/env/lib/python3.3/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 7896: ordinal not in range(128)

    …aaaaand it kept driving me nuts for a couple of hours until it finally came to me that the problem lied my locale setup and not in python setuptools. Simply typing:

    1
    export LANG='en_US.UTF-8'

    in terminal to change the encoding fixed the problem (keep in mind that this changed the locale temporarily only for the current session).

    Hope it saved you some time. Cheers!

  • Nook Simple Touch “Reading Now” button goes to the first page of the book fix

    Nook Simple Touch “Reading Now” button goes to the first page of the book fix

    This happened to me a few times now (each time after a new firmware update) and it’s actually quite an annoying bug. What happens is that if you go to home/library/settings/whatever screen and then want to go back to where you stopped reading a book by pressing “Reading Now” button in the upper left corner, it doesn’t take you to the right page but to the first page of that book and it also “ignores/forgets” your bookmarks (opening a book from the library screen goes to the right page and still remembers bookmarks correctly). In my case this happened with side-loaded books and stock firmware and here is what fixed it for me:

    1. Connect Nook to your PC with USB cable
    2. Delete everything from both the internal memory and the SD card
    3. Safely remove and disconnect the device
    4. Reboot your Nook
    5. Connect the device to your PC again
    6. Side-load your books again
    7. Safely remove and disconnect the device
    8. Everything should be working properly now
  • Github “Permission denied (publickey).” fix

    Github “Permission denied (publickey).” fix

    Over at github troubleshooting page, there is some info about this issue, but since I haven’t used this way of authentication (public key) previously it took me a while to figure out why exactly I kept getting this message and why I failed to establish a connection with github. The thing is, I generated an RSA key-pair with a name different from the default “id_rsa” and because of that the ssh-agent did not have the key in its cache (thus I could not authenticate).

    To fix this, you can either use the default “id_rsa” for your key name (in which case it will be in ssh-agent’s cache automatically) or use “ssh-add your_key” command to add it to the cache.

    If you did the same funky key-naming thing as I did, I hope this helps and takes away your headache! =D

  • Making sound files for REminiscence (Flashback) work

    As REminiscence README indicates (“To hear background music during polygonal cutscenes with the PC version, you’ll need to copy the .mod files of the Amiga version”), you will have to copy Flashback sound files into the DATA directory within your REminiscence directory. They can be obtained here. After you have downloaded and extracted the files, you will rename them as follows:

    ascenseur -----> mod.flashback-ascenseur
    ceinture ------> mod.flashback-ceinturea
    chute ---------> mod.flashback-chute
    debut ---------> mod.flashback-jungle
    desinteg ------> mod.flashback-desintegr
    donneobj ------> mod.flashback-donneobjt
    fin -----------> mod.flashback-fin
    game_over -----> mod.flashback-game_over
    holocube ------> mod.flashback-holocube
    intro ---------> mod.flashback-introb
    journal -------> mod.flashback-options1
    level4 --------> mod.flashback-teleporta
    logo ----------> mod.flashback-logo
    memoire -------> mod.flashback-memoire
    missions ------> mod.flashback-missionca
    missions2 -----> mod.flashback-fin2
    options -------> mod.flashback-options2
    planetexplo ---> mod.flashback-teleport2
    reunion -------> mod.flashback-reunion
    taxi ----------> mod.flashback-taxi
    voyage --------> mod.flashback-voyage

    If you did everything properly, you should hear this beautiful music after you launch REminiscence (and all the other music clips throughout the game of course).. Voila!

Back to top