I was searching for an answer for a situation I have, but I failed to find an answer anywhere. I hope I'm asking this in a correct section.
I'm not asking for exact legal advice; I'd like to know what the procedure is and/or how something similar is done.
The main question is:
How can a citizen of a non-EU country apply for a German D type visa while living and working in another EU country (for example Poland) on a long term visa?
The main point in that question is what is the correct procedure to apply for a visa and how do you identify yourself in the current EU country after you have submitted your passport with all the required documents for the visa application and are waiting for a decision?
What is the correct protocol to follow to be legally allowed in the current country while applying for a second country's visa?
What if for example a police officer stops you and asks for your documents?