SimpleMobileTools / Simple-Contacts

Easy and quick contact management with no ads, handles groups and favorites too.
https://www.simplemobiletools.com
GNU General Public License v3.0
792 stars 261 forks source link

restore VCF via adb #1074

Open JOHNFFFEE opened 1 month ago

JOHNFFFEE commented 1 month ago

hi there , i am trying to do some app automation ,

i would like to run restore - push into the phone a vcf file i have , via adb , automatically .

at the moment i was able to pop up the windows to import the contact , and have a selection of where to restore the imported file (phone storage / phone storage not visible by other apps)

however even i press ok manually it fails to fine the file , no matter what , i am not sure why (i am thinking about permisions, but if i select to import vcf manually it doesnt require any aditional permissions )

i've tried to run

adb shell am start -t "text/x-vcard" -d "file:///storage/emulated/0/contacts_20240604190946.vcf" -a android.intent.action.VIEW com.simplemobiletools.contacts.pro

or

adb shell am start -t "text/x-vcard" -d "file:///sdcard/contacts_20240604190946.vcf" -a android.intent.action.VIEW com.simplemobiletools.contacts.pro

neither of them worked , error was java.io.filenotfoundExecption : /sdcard/...... .

i would like to know how to automatically do that via ADB . (to phone storage , that IS visible to other apps)

thank you .

Maxitendo1 commented 1 day ago

@JOHNFFFEE SimpleMobileTools apps were sold to ad and spyware company. Fork is here:

https://github.com/FossifyOrg