[Soot-list] Converting .jimple files back into a .dex file and reassembling the apk!

Modhi Alsobiehy m99m20 at hotmail.com
Tue Aug 26 00:52:21 EDT 2014


Hi all,


To solve this problem, I tried to delete the “META-INF” folder since the jarsigner adds a new one.. And it works!


Regards..

Modhi,,






Sent from Windows Mail





From: Modhi Alsobeihy
Sent: ‎Monday‎, ‎August‎ ‎25‎, ‎2014 ‎11‎:‎30‎ ‎PM
To: Steven Arzt, soot-list at CS.McGill.CA, soot-list at sable.mcgill.ca





Hi Steven,




I was doing the following:

unpack the original apk with 7z


replace classes.dex


repack directly as apk with 7z


sign and zipalign


the “sign” part of step 4 was not working!




I tried the steps you provided and they work! Thanx a lot!




However, now when I try to install the modified app, I get the following message:

“  Unfortunately, Package installer has stopped.”

I checked the space and it is ok, I also tried to install another app and it was installed successfully!

any idea what is going wrong!




thanx,,

Modhi..







Sent from Windows Mail





From: Steven Arzt
Sent: ‎Monday‎, ‎August‎ ‎25‎, ‎2014 ‎5‎:‎39‎ ‎AM
To: Modhi Alsobeihy, soot-list at CS.McGill.CA, soot-list at sable.mcgill.ca






Hi Modhi,

 

What exactly are the steps that you performed on the file? The following should work:

 

1)      Rename the original APK file to ZIP

2)      Open it in WinRAR or a similar application

3)      Replace the old classes.dex file in the ZIP with the new one

4)      Close WinRAR

5)      Rename the APK file back to APK

6)      Sign it

 

Best regards,

  Steven

 



Von: Modhi Alsobiehy [mailto:m99m20 at hotmail.com] 
Gesendet: Montag, 25. August 2014 11:58
An: Steven Arzt; soot-list at CS.McGill.CA; soot-list at sable.mcgill.ca
Betreff: Re: AW: [Soot-list] Converting .jimple files back into a .dex file and reassembling the apk!

 



Hi Steven,


 


Thanx a lot for responding!


 


That what I have been doing but unfortunately if I install the reassembled apk without signing ,installation always fails and I if I try to sign it, jarsigner gives the following error message:


jarsigner: unable to open jar file


 


I aslo tried to remove the “META-INF” folder before resigning the apk and still no luck!!


 


any experience or ideas are really appreciated!


 


Thanx again!


Modhi,, 



 


Sent from Windows Mail


 



From: Steven Arzt
Sent: ‎Monday‎, ‎August‎ ‎25‎, ‎2014 ‎4‎:‎39‎ ‎AM
To: Modhi Alsobeihy, soot-list at CS.McGill.CA, soot-list at sable.mcgill.ca


 



Hi Modhi,

 

Soot produces a new APK file if the source format is set to APK and the output format is set to DEX. If you write out Jimple files and then re-create the DEX file, you need to manually assemble the APK which should however be simple: Just takethe old APK (which is just a renamed ZIP file) and replace the contained classes.dex file with the newly created one.

 

Best regards,

  Steven

 



Von: soot-list-bounces at CS.McGill.CA [mailto:soot-list-bounces at CS.McGill.CA] Im Auftrag von Modhi Alsobiehy
Gesendet: Sonntag, 24. August 2014 08:37
An: soot-list at CS.McGill.CA; soot-list at sable.mcgill.ca
Betreff: [Soot-list] Converting .jimple files back into a .dex file and reassembling the apk!

 



Hi all,


I am trying to automate an instrumentation of an apk but for some reason it is not working as expected!


because of that, I want to do it manually to make sure that the instrumenting statements are correctly placed..


For this to be done, in the ccs2013 tutorial  slide #114 , the steps are:


1• Convert APK to .jimple files (-f jimple)

2• “Instrument” .jimple files manually by editing them in your favorite text editor

3• Convert .jimple files back into a .dex file (-src-prec jimple)

4• Reassemble APK

5• Test the generated APK

6• If it works, automate the instrumentation

steps 1,2, and 3 are done smoothly. I got the classes.dex file, however I did not get how to do step 4! 

I would really appreciate some guidelines explaining how to reassemble an apk starting from classes.dex file!

Thanx,

Modhi,,

 



 


Sent from Windows Mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140826/850c9f0a/attachment-0003.html 
-------------- next part --------------
_______________________________________________
Soot-list mailing list
Soot-list at CS.McGill.CA
https://mailman.CS.McGill.CA/mailman/listinfo/soot-list


More information about the Soot-list mailing list