Search code examples
android-studioflutterdartprojectprogram-entry-point

unable to find main.dart and lib folder from imported flutter project


hi there! i backed up my flutter project folder due to some issues with my drive, i fixed the issues only for me to try importing the project and continuing my work and it turns out i can't find my main.dart file along with my entire lib folder the only recognizable thing left in the project seems to be the assets folder

help me, please this has really pushed me way behind schedule

also I would be much grateful if i could get an app that decompiles flutter apks as my code is still in debug mode and i have the apk file.

thanks

enter image description here


Solution

  • To get source code of your apk file(debug) :-

    Step 1- download strings for Windows (in your case)

    https://learn.microsoft.com/en-us/sysinternals/downloads/strings

    Step 2- Since kernel_blob.bin has all your app's source code, Run this command,

    strings /path/to/extracted/apk/assets/flutter_assets/kernel_blob.bin > extracted_code.dart
    

    Here, replace, "path to extracted" to your own path.

    Step 3

    You’ll need to clean the extract_code file, and strings like “dart”, “import”, “void” and other keywords in ‘extracted_code.dart’, will help you find the code itself.(search for them to get your code)