I. RELATED statements
- This article covers the Xamarin series software copyright for Xamarin INC All
- This article deals with the ideas and methods of cracking software that are prohibited for commercial use
- If it is not necessary, study and research should be based on genuine
- Team or local tyrants if you feel that Xamarin is perfect for your business, be sure to support genuine
- This article prohibits reproduced diffusion
- Should not post the relevant crack, too time-consuming room
Ii. related background 2.1 material background
At the end of 2014, Microsoft announced a series of forecasts at the Connect Developers Conference, one of which is the process of Visual Studio's "Universal Platform" (cross-platform development), where Xamarin begins to walk into more people's eyes. After that, Microsoft is on the road to open source, but also constantly polishing Windows 10 and Visual Studio, and finally in the summer of 2015, officially launched Windows 10, Visual Studio 2015 and other software; today, the visual St Udio 2015 has been released in the RTM version.
2.2 Hack background
- First of all, I am lazy, each platform to learn a new language, I am tired, and eat too much grammar sugar, Java and so do not like;
- Second, the free version of Xamarin features too many limits, trial version of one months;
- Third, the online crack is too old;
- Most importantly, genuine licensing fees are too expensive for an individual.
This article will take the Visual Studio RTM version of Xamarin for Visual Studio 3.11.372 as a blueprint, with Xamarin.android as a description object, introducing Xamarin for visual Stu Dio the idea of cracking.
III. Preparation of the preparatory
Before cracking, we should be equipped with the following weapons, to clear the way for our crack (the default for these tools will be simple operation, this article will not expand how to use; If some tools are not familiar with, suggest to the relevant website to view the operation, Basic is very simple, almost a look will be, recommend the use of genuine software, Reflector and IDA Pro, etc. to find the hack yourself):
- Visual Studio 2010+ or Xamarin Studio
- A fully-installed Xamarin
- An anti-compilation software, Ilspy or Reflector
- Reflexil plug-ins, generally choose the appropriate "AIO" version (All-in-one? I guess.)
- IDA Pro
- @BinSys Write IDA Plugin
- Mono (non-essential)
- Process Explorer (not necessary)
- Grab Bag tool (not necessary)
Four, crack ideas 4.1 probably run the process of the genuine, confirm the relevant validation scope, in this process can grab package 4.1.1 New Xamarin.android project, such as Blank App, the output level of the build to "detailed" above; Explorer view Devenv (VS) How many Xamarin DLLs have been called (Preliminary skills: Know which directory the Visual Studio plugin is typically installed in)
4.1.2 Open Project Properties
4.1.3 now directly generate the project, will pop-up login account, click "Cancel", there will be error alerts
4.1.4 Click Generate again, and randomly login to an account (the default permission is Starter), will start to build. Also, use the process Explorer tool to see which programs devenv (VS) called during the build process to see where
4.1.5 Conclusion
By grasping the packet, it is known that in the Xamarin.android generation process, the network authentication is not involved, and the permission information is obtained only during the login process, and through the process Explorer information, the Mandroid.exe is called during the generation, and the VS is related to What are the DLLs of Xamarin? Quit your Xamarin account and close visual Studio, and the next step is to get rid of your work.
4.2 Confirm Authorization verification related 4.2.1 "standing on the Shoulders of giants"
In general, before the crack will search whether someone cracked a software, thinking how, need to modify the file is which, we leaf out ... I can not find the page I read, remember is a blogspot article, that did say where to engage.
4.2.2, "Boy, I'll watch you."
If no one has done, or the idea is not clear, it is more troublesome, a way of thinking is that the involved Xamarin DLLs are dragged into the ilspy, with a few reminders previously obtained, extract the keyword to "search string", such as Enterprise or Starter, here we Enterprise as an example.
Then, analyzing both the methods and the content, as well as the references, you can determine the permissions to use Xamarinedition to instruct Xamarin.
Then, to analyze what xamarinedition is called, and then analyze these calls, it is possible to determine that most of the xamarinentitlements classes will eventually be called.
Use Reflexil to modify the Xamarinentitlements class, because set is private, so in C # generally directly generated, switch to IL, change il, after modification, please remember update Ilspy object model (Ilspy can immediately update the display Reflector is not possible, and does not know how it is now).
Details, your own, you can clear the set, the field is also deleted, so also the custom attribute also deleted, of course, not only this one attribute, other related attributes of the same truth, and then all changed, click "Verify", no prompt error, you can directly save, He would suggest a strong signature or something, I usually choose the first one (need to put sn.exe in the environment variable PATH).
Modify the source file and the patch name.
4.3 Verify that the current modifications are correct 4.3.1 restart Visual Studio to open the previous project
or bounce out Welcome (→_→ because we just changed the permissions, did not change whether to login, ignore)
4.3.2 Re-build the project, the discovery can be generated directly, indicating that this modification is still useful. 4.3.3 Now, to open the project properties, we want to try the "packaged assembly" feature that requires Enterprise permissions.
Note that in Release mode, tick "Bundle assemblies into native code" and then regenerate and click "Export Android Package". (in debug mode, this option is not packaged as an apk, unless the point is "Start debugging" to automatically pack)
However, it unexpectedly pops up a reminder box:
Then we can get this hint of the wrong step named "Signandroidpackage" and then, exiting Visual Studio, we're going to start hard.
4.4 Mastering the Build Verification Portal 4.4.1 Search "Signandroidpackage", analyze related methods 4.4.2 Analyze the function process continuously, narrow the scope, then get IServiceProvider, Xamarinandroidpackage A series of things that eventually get Mandroid.exe (usually I use the Process Explorer to see if I call something else directly)
4.5 Analysis Mandroid.exe
Nothing to say, I have limited level, specific analysis please read, @BinSys write series of articles
- MonoTouch two or three things (i)
- MonoTouch two or three things (ii)
- MonoTouch two or three things (iii)
4.6 Analysis Mandroid-win.exe 4.6.1 find the Main entrance and analyze
4.6.2 with reflexil changes to save the relevant data and press it into Mandroid.exe (available scripts, code or manual mkbundle), here does not expand 4.7 reopen the previous project, and click on the "Export Android package", No errors
Now, we can compare the difference between packing and not packing.
Packaged:
Not packaged:
Well, let's take a look at Layout:
Five, written in the last
At this point, the basic crack calculation is complete, of course, the small problem is still, most of the details experience, log output inconsistent, account to log in (do not log on every time Welcome feel uncomfortable). And for Xamarin.ios, the scope of the deal is even greater.
PS: Using Xamarin, or learning about the platform, only lowers the cost of language.
Xamarin for Visual Studio cracked log