Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
A few months ago, I've developed a windows application to get my android application sqlite database with this adb command : adb exec-out run-as mypackagename cat /databases/mydbname.db > myPCaddress(D:\mydbname.db)

It was working correctly but after a while when I want to test it again, the command copy a file in the PC, which has 1kb size and not even a database file! I'm so confused and I don't know what is the problem.Please help me.

What I have tried:

I've tried using : adb -d shell "run-as mypackagename cat /data/data/mypackagename/databases/mydbname.db" > myPCaddress (D:\mydbname.db)
and I've got same result and with adb pull, it shows remote permission denied.
Posted
Comments
Richard MacCutchan 21-May-18 3:54am    
Your question is not clear. What is the Windows application doing in this situation?
marimir 21-May-18 4:06am    
windows application run adb command :adb exec-out run-as mypackagename cat /databases/mydbname.db > myPCaddress(D:\mydbname.db)
Richard MacCutchan 21-May-18 4:07am    
Please edit your question, show the code that has the problem, and what results you see.
marimir 21-May-18 4:29am    
forget about the question..
I want to copy my android application database to my PC with adb command. I've opened cmd.exe and navigate to adb folder. After executing this command ==> "adb exec-out run-as mypackagename cat /databases/mydbname.db > myPCaddress(D:\mydbname.db)" the copied file size in my PC is 1kb and it is not a sqlite database file. This is my problem.
Richard MacCutchan 21-May-18 4:44am    
You should use "adb pull", which will do a proper binary copy. The cat command is for text files.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900