There Goes JManga

Last year, someone mentioned JManga to me, as they were going to be releasing the full School Rumble translated into English (whereas the official paperback release only reaches volume 16).

I don’t like the idea of “can only read online”. I decided to try sampling the service, though, as if I could find a way to view offline, it could be worth it. I believe there was a minimum of $20 purchase price, but that would be fine if I’d be getting some School Rumble later.

Well, it looks like JManga is closing down and after the end of the month any paid-for manga will no longer be usable. This is the second reason why I don’t like “view online only”. “I can’t access it during my two one-hour work commutes each day where I have no Internet connection available to me” would be the first reason.

Lucky for me I found a (slightly tedious) way to download the pages, and it was super trivial to decrypt the images so I can drop them all onto my tablet and read them there sometime. Although now I have the first four volumes to a seven volume series (Fairy Navigator Runa) with no hope of seeing the last three. (And this was after Runa saw two paperback releases then was dropped.) It’s like School Rumble all over again…

It almost makes me want to look for fan scan translations for these series as they surely provide a better service than the official routes!

As for JManga, thankfully they’re doing the right thing and issuing Amazon gift cards for any unspent points.

Update: It was asked in the comments how to decrypt these images. Because JManga is closing down, and because some people may have found a way to download the images for the manga they paid for (and hopefully someone found a more graceful method than I did), here’s how to go about decrypting them.

First, a bit of background on how to find out how they are different from regular JPGs. This should be consistent for all files from JManga, but in case it isn’t, here is how to see how they are encrypted. It’s very simple.

If you open a few normal JPGs in a hex editor, and a few JManga images in a hex editor, you’ll notice the following pattern:

Normal JPGs begin with FF D8 FF E0 00 10 4A 46.

JManga’s JPGs begin with BD 9A BD A2 42 52 08 04.

The key ones to look at are the FF becoming BD and the 00 becoming 42. Convert those to binary and check out how they are different:

FF = 1111 1111
BD = 1011 1101

00 = 0000 0000
42 = 0100 0010

Notice how bytes 1 and 6 are inverted. If you can write a script to swap these bits, you can decrypt the images.

Here’s a script I threw together in Ruby. I’m sure it’s very poorly written, as I was using Google to get me to finding how to do in Ruby what I needed to do.

def convert_file(file)
    output = ""
    contents = open(file, "rb") { |io|
        io.each_char do |char|
        unpacked = char.unpack('b*')
        if unpacked[0][1] == "0"
            unpacked[0][1] = "1"
        else
            unpacked[0][1] = "0"
        end
        if unpacked[0][6] == "0"
            unpacked[0][6] = "1"
        else
            unpacked[0][6] = "0"
        end
        output << unpacked.pack("b*")
        end
    }
    File.open(file + ".out.jpg", 'wb') { |file| file.write(output) }
end

Dir.glob('*.jpg') do |file|
    puts file
    convert_file(file)
end

puts "Done"

Just put this into the same folder as all the files from JManga, ensure the files have ".jpg" at the end of the file name (or adjust the script as necessary), then run the script through the Ruby code interpreter (which I believe is available for all major operating systems). It'll iterate over each image, and byte by byte invert bits 1 and 6.

One Response to “There Goes JManga”

  1. anon Says:

    So how did you decrypt the images? I managed to get the files too, but now I don’t know what to do with them.