[Soot-list] Repackaging and signing apk

Jin Li lijin1988 at gmail.com
Sat Jun 14 21:50:41 EDT 2014


Sorry Modhi,
I thought you have got the .apk file.
>From my knowledge, you don't have to manually change the jimple files.  You
can obtain the unsigned apk file from the original apk file directly.
Just as Steven said, you should first check the Soot options you set.
 And then add a new phase to the jimple-transformation pack "jtp" which
place your instrumentation code directy after the Jimple bodies are
produced.


Best regards
Jin


2014-06-15 2:24 GMT+08:00 Modhi Alsobiehy <m99m20 at hotmail.com>:

> Sorry Jin, i did not get your answer!!
>
> Please bear with me!
> I got the jimple file from the apk source, wrote the changes manually in
> the jimple files, and then used proper soot options on the jimple source to
> get the dex file- i got classes.dex in the soot output folder not a .apk
> file
>
> How to get the apk?
>
> -Best,
> Modhi
>
> On Jun 14, 2014, at 5:46 AM, "Jin Li" <lijin1988 at gmail.com> wrote:
>
> Hi Modhi,
> If you set the option as
>   Options.v().set_output_format(Options.output_format_dex);
> you will get an unsigned apk file. You don't need to unpack it with 7z-.
> What you have to do is to sign the output apk file.
> There are several way to make it signed. I use those tools which I
> mentioned in the last email. You can google how to sign a apk file for
> details.
>
>
> 2014-06-14 0:13 GMT+08:00 Modhi Alsobiehy <m99m20 at hotmail.com>:
>
>>  Thanks Steven!
>>
>> I did not get how that would work!! the apk is already jimplified and
>> modified!
>> I followed instrumenting Android  tutorial in which:
>> I used soot options to get the jimple files from apk source;
>> modified the jimple files;
>> used soot options to get dex file from jimple source;
>>
>> now I have the modified classes.dex - found in sootoutput folder - and
>> other “original” files /folders form the unpacked  apk - unpacked with 7z-.
>> in the tutorial, it is indicated that I should reassemble the apk, does
>> that mean exchange the old classes.dex with the new dex file in the old apk
>> and repack?? if so, how I should sign it?
>> if not, then what are the right steps to get the instrumented apk ready
>> for installation?
>>
>> Thank you!
>> -Modhi
>>
>> Sent from Windows Mail
>>
>> *From:* Steven Arzt <steven.arzt at cased.de>
>> *Sent:* ‎Thursday‎, ‎June‎ ‎12‎, ‎2014 ‎7‎:‎42‎ ‎AM
>> *To:* soot-list at CS.McGill.CA <soot-list at cs.mcgill.ca>
>>
>> Hi,
>>
>> You should not need to manually repackage the APK file by hand at all.
>> Make sure the following Soot options are set:
>>
>> -src-prec apk
>> -output-format dex
>> -process-dir <path-to-your-apk>
>> -android-jars <path-to-your-sdk-platforms-dir>
>>
>> Afterwards, you need to manually sign the resulting file using
>> jarsigner. Please then try to install your signed APK using adb install
>> and send us the exact error message in case it fails.
>>
>> Best regards,
>>    Steven
>>
>> Am 11.06.2014 16:19, schrieb Modhi Alsobiehy:
>> > Hi all,
>> >
>> > my question is regarding repackaging and signing apks
>> > I followed the tutorial of android instrumentation
>> >
>> > since it was not mention specifically how to reassemble the package
>> > after “dexifying” the jimple files, I just unpacked the original
>> > apk and exchanged the old classes.dex file with the new modified one!
>> > I tried to install the new apk and it gave me “ installation
>> > failed!”
>> > did I repack it properly!!
>> > the added lines in the original apk are Log lines after other Log
>> > lines hence the class is already imported!
>> > Thanx in advance!
>> >
>> > Sent from Windows Mail
>> >
>> >
>> > _______________________________________________
>> > Soot-list mailing list
>> > Soot-list at CS.McGill.CA
>> > https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>>
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at CS.McGill.CA
>> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140615/4fb13e89/attachment.html 


More information about the Soot-list mailing list