(maybe outdated) Experimental reset of eDrive


Just wanted to share how I reset eDrive.

NB 1 : this is experimental
NB 2 : this will re-upload ALL your files (but won’t override if already in /e/ Cloud)
You’ve been warned !

Step 0 (“Let’s warm up”)

On phone, enable Developer mode, adb shell, root mode.
Connect to phone using adb, enable root, launch a shell.

Step 1 (“Where’s the trashcan ?”)

Uninstall the eDrive package with pm uninstall --user 0 foundation.e.drive.
Check with pm list packages foundation.e.drive.

Step 2 (“A new star is born”)

Reboot phone to system.
Restart root shell.
Check that eDrive is reinstalled with pm list packages foundation.e.drive.
At this step, /data/user/0/foundation.e.drive should show only shared_prefs dir (caches are to be ignored), no databases dir.
Also, /data/user/0/foundation.e.drive/shared_prefs/preferences.xml should exist, but not contain “initService_has_run”.
At this step, it’s a good idea to add a file (take a photo of your cat for example !)

Step 3 (“Move your a** !”)

Issue am broadcast -a android.intent.action.MY_PACKAGE_REPLACED foundation.e.drive/.receivers.PackageEventReceiver.
This will initialize the database, trigger the scanner to fill it, and then launch the OperationManager (it will read the database and launch files transfer).
The preferences.xml file should now be populated.
To check the database : sqlite3 /data/user/0/foundation.e.drive/databases/eelo_drive.db then select * from synced_file_state; (.quit to … quit).
You can watch progress with logcat -C *:d|grep -i -E "observerservice|owncloudclient|operationmanagerservice".
Also, your new file may appear in /e/ Cloud (Files/Recent).
Where do they go ? See here from line #155 (hardcoded are Cloud folders).

Step 4 (“Don’t even think of breathing”)

Not all files are being uploaded ?
Next sync will happen in 31 minutes, so be patient.

Don’t forget to disable Developer mode.

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone


At step 2, if package did not install automagically, issue pm install --user 0 /system/app/eDrive/eDrive.apk command.
At step 3, better launch the logcat before am broadcast (in separate session) : the broadcast can be launched again if in error.