Skip to content

How to build and debug

Jingang Guo, KK edited this page Jul 8, 2015 · 10 revisions

This project is build under VisualStudio Express 2013 for Desktop, you can download the tool on Microsoft.com for free.

[How to Build]

  1. Clone the repository
git clone https://github.com/kkguo/apkshellext.git
  1. update submodule
cd apkshellext/ApkShellext2
git submodule init
git submodule update
  1. Start the project with VS express
  2. Create a key for yourself. see MSDN
  3. Build the solution
  4. Go to bin/Debug, run install to register

[How to Debug]

  • Log, Using the diagnostics feature from SharpShell
    HKEY_LOCAL_MACHINE\Software\SharpShell\LogMode = 4
    HKEY_LOCAL_MACHINE\Software\SharpShell\LogPath = <your log file path>
  • Stepping the register process, you need to manually change the debug option, as C# express is not officially supporting this (but actually it does work)

    • Close up VS express.
    • open ApkShellext2.csproj.user with a text editor.
    • un-comment
    • change the path according to your setting
    • Open VS express as administrator
    • set your break point
    • Run.
  • Stepping the handlers

    • Build the whole project, if you cannot write into the dll, run restart_explorer.bat under bin/Debug
    • Debug -> attach to process, find explorer.exe, OK
    • set break point in the handler code
    • Open a folder with apk files, and if you are triggering the handler, you should get to the break point.
  • Some Hints

    • if you cannot set the break point, check following registry key, it's listing one or more version numbers. remove those version you are not using, or remove the whole sub key if you don't know and restart the install.bat.
    HKEY_CLASSES_ROOT\CLSID\{1F869CEE-4FDA-35D9-896F-43975A87D1F6}\InprocServer32
    HKEY_CLASSES_ROOT\CLSID\{dcb629fc-f86f-456f-8e24-98b9b2643a9b}\InprocServer32
    HKEY_CLASSES_ROOT\CLSID\{946435a5-fe96-416d-99db-e94ee9fb46c8}\InprocServer32