Export/Import the Block number list on android

Costas

Administrator
Staff member
at 2015 - Google Dialer Finally Gets Call-Blocking
https://www.androidpolice.com/2015/...he-phone-and-contacts-apps-on-the-play-store/

In Android 6.0 ( Marshmallow API 23 ), blocked numbers are typically stored in a database, and you can't easily access this database without root access. Android manages the blocked numbers through a content provider, and this information is not directly exposed to users for security and privacy reasons.


at August 2016, Android 7.0 ( API 24 ) release introduces a BlockedNumberProvider content provider that stores a list of phone numbers the user has specified should not be able to contact them via telephony communications (calls, SMS, MMS). src - https://source.android.com/docs/core/connect/block-numbers


at 2016
android.provider.BlockedNumberContract
http://opensource.hcltechsw.com/vol...#!/api/android.provider.BlockedNumberContract

android / provider / BlockedNumberContract.java
https://android.googlesource.com/pl...a/android/provider/BlockedNumberContract.java

--

This user advise that
https://play.google.com/store/apps/details?id=com.myblocked

doing the job... but on Android 6.0 the package is invalid... Seek for solution.



Android 7.0+
with root access: sqlite3 /data/user_de/0/com.android.providers.blockednumber/databases/blockednumbers.db 'select * from blocked' source



Click Block list
close the dial pad that opens up and take a screenshot
Click capture more to grab the entire list
Use OneNote or some other OCR program & copy to a spreadsheet



https://stackoverflow.com/a/52255282 & BlockedNumberContract



others saying to use Samsung Smart Switch doing the job.
 

Costas

Administrator
Staff member
*list all providers* - https://stackoverflow.com/a/58750211
adb shell dumpsys package providers

*export* - https://android.stackexchange.com/a/228763
adb shell content query --uri content://com.android.contacts/data > contacts.txt
adb shell content query --uri content://sms > sms.txt

ref - https://gist.github.com/AnatomicJC/e773dd55ae60ab0b2d6dd2351eb977c1

but of course nothing working due BlockedNumberProvider cannot be found.



/data/data/<application_package_name>/databases source
 
Top