Elvas Tower: APK file format question - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

APK file format question Questions for a TSUNPACK replacement utility Rate Topic: -----

#1 User is offline   hytek1999 

  • Apprentice
  • Group: Status: Switchman
  • Posts: 19
  • Joined: 16-October 12
  • Gender:Male
  • Simulator:MSTS; ORTS
  • Country:

Posted 24 October 2013 - 06:27 PM

Ok. This might not be directly related to Open Rails, but I know that some of the devs hang around here. I'm writing a replacement utility for TSUNPACK. I'm really starting to love mini-routes especially with the support that OR is giving them. But I really hate that I have to change my registry key every time I want to unpackage a new activity.

Anyway, I've got to the point where I can extract the files and even convert the APK to a ZIP file. But my question is this, all of the files have an extra 2 bytes (unicode) character at the end of them. I think this might be some sort of checksum, but I can't really tell for sure. Has any hacked the APK file and figured out what those are? I just think it might be nice for my utility to be able to package APK files as well as unpackage them and I'm pretty sure TSUNPACK will throw a fit if I don't get this right.

Thanks.

#2 User is offline   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 1,781
  • Joined: 26-February 08
  • Gender:Male
  • Location:Eltham, Victoria, Australia
  • Simulator:ORNYMG
  • Country:

Posted 24 October 2013 - 08:29 PM

>I'm writing a replacement utility for TSUNPACK

Why not have a pop up screen so you can point to your mini route?

cheers

#3 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,491
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 25 October 2013 - 12:54 AM

View Posthytek1999, on 24 October 2013 - 06:27 PM, said:

But my question is this, all of the files have an extra 2 bytes (unicode) character at the end of them. I think this might be some sort of checksum, but I can't really tell for sure. Has any hacked the APK file and figured out what those are? I just think it might be nice for my utility to be able to package APK files as well as unpackage them and I'm pretty sure TSUNPACK will throw a fit if I don't get this right.


I've not looked at one of these files in detail, but if it is a 2-byte checksum I'd say the most likely is the common CRC-16 (called "CRC-16-IBM" on http://en.wikipedia....edundancy_check).

As someone who's spent lots and lots of time breaking apart and reassembling file formats, I'd suggest you actually try leaving those two bytes as 0 and see what TSUNPACK does. It might crash or error out, in which case you know it needs something, but it might also completely ignore them. ;)

#4 User is offline   conductorchris 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,345
  • Joined: 24-March 10
  • Gender:Male
  • Simulator:Open Rails - MSTS
  • Country:

Posted 25 October 2013 - 06:27 AM

Boy, what a service you are doing. TSUnpack seems to be an endless source of problems and just plain doesn't work a good portion of the time (in Windows 7 even after changing the registry key).
thanks
Christopher

#5 User is offline   hytek1999 

  • Apprentice
  • Group: Status: Switchman
  • Posts: 19
  • Joined: 16-October 12
  • Gender:Male
  • Simulator:MSTS; ORTS
  • Country:

Posted 26 October 2013 - 08:34 PM

Good. I'm glad to hear there is an interest in it. I'm probably going to revisit the repackaging feature later. For now it is probably just better to keep it simple. If any one wants to check it out, I've got it hosted up on Google Code: https://code.google....-apk-extractor/

The code needs a few more comments and I'm sure there are issues that I haven't accounted for, but it works pretty well. I've put up a quick and dirty wiki entry to explains the basic usage of the utility. Hopefully it will be a help to some people.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users