Normally, bad purpose and good purpose share same technology. It is up to your choice.
On Jun 22, 12:17 pm, Zsolt Vasvari <[email protected]> wrote: > What exactly would the use for this be, besides piracy? > > I suggest this post for deletion. > > On Jun 22, 11:09 am, Illyoung Choi <[email protected]> wrote: > > > > > Hi All. > > > Last day, I made a simple application for parsing an Android Resource > > File (*.arsc) and modifying resource strings. > > > I think this thing might be a help for someone, so I'll share the > > structure of *.arsc that I understood. > > > Since I could not spend many hours for this, my understanding is not > > perfect and might be slightly wrong. > > > I patched string resource from *.apk. > > Simply extracted *.apk with 7zip and got the resources.arsc file. > > > Below are the structure of *.arsc > > > struct ANDROID_RESOURCE_HEADER > > { > > int signature; // 0x000c0002, I assume this is a signature > > int nImageLength; // total ARSC file size (bytes) > > int nUnknown1[2]; // still unknown (not important for modifying > > strings) > > int nStringBlockLength; // total StringBlock(see below) size > > int nStringCount; // total number of String Resources > > int nUnknown2[4]; // still unknown (not important for modifying > > strings) > > > } > > > "struct ANDROID_RESOURCE_HEADER" is a header of ARSC file image. > > So simply you can read this header information from file. > > > After this header, you will meet the StringBlock > > > StringBlock has 2Sections > > { > > [String Offset] > > [String Data] > > > } > > > String Offset Section has Offset Values of Specific Strings from > > StringBlock Start Address. > > > String Data Section has 2 Part > > > String Data > > { > > [Length] > > [String] > > > } > > > Length part is 2byte. but, in AscII Mode, uses only 1byte. > > Before reading String, you must check whether it is "Unicode" or > > "AscII" format. > > > in Unicode format, Length part will be used with 2bytes. > > normally it is "0x??, 0x00" (only if it is not longer than 256 bytes) > > > in AscII format, Length part will be used with 1bytes. but, they also > > used second byte for mirroring. > > if string length has a value 7, you will meet "0x07, 0x07" > > > So, I checked whether both bytes have same value to check string > > format. > > > Lastly, actual string data will be after this length part with "Zero > > Terminal" > > in Unicode format, surely, Zero Terminal will be 2 byte of zero. > > > Whenever you change the string of this ARSC file, you should > > recalculate these. > > Length Part of String Data > > String Offset of StringBlock > > nImageLength of Header > > nStringBlockLength of Header > > > After doing these all. > > Simply, remove all JAR Signature (META-INF folder) from package. > > Re-Archive with Zip and rename with *.apk. > > Resign with your certificate by using "jarsigner" of JDK > > > Thanks.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

