AccountManager: deletion of /e/ Account prevents re-adding /e/ Account
- /e/ version: v1.2-beta.2
- Device model(s): cedreic
- Device rooted: no
Summary
removing an /e/ Account and re-adding an /e/ account seems impossible
Edit: closing as being PEBCAK - that's the behaviour you get when not being online at all, I didn't notice. One could add a warning ofc
The problem
Delete an existing /e/ Account and readd an /e/ Account. There was a bug in v1.0 onboarding that didn't use the correct sync endpoints when using username@murena.io
. This is the use-case when doing this user flow.
(Not using the correct endpoint on @murena.io entry was fixed in #5443 (closed) as far as I can tell)
What is the current behavior?
Screen returns to account type list
What is the expected correct behavior?
Screen offers /e/ login screen
Technical informations
Relevant logs (adb logcat
)
not much, davx is just outputting
I davx5 : [foundation.e.accountmanager.syncadapter.EeloAccountAuthenticatorService] Cleaning up orphaned accounts
Pulled accounts dbs don't give me a hint
adb pull /data/system_ce/0/accounts_ce.db
adb pull /data/system_de/0/accounts_de.db
$ echo .dump | sqlite3 accounts_de.db
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE android_metadata (locale TEXT);
INSERT INTO android_metadata VALUES('de_DE');
CREATE TABLE accounts ( _id INTEGER PRIMARY KEY, name TEXT NOT NULL, type TEXT NOT NULL, previous_name TEXT, last_password_entry_time_millis_epoch INTEGER DEFAULT 0, UNIQUE(name,type));
CREATE TABLE meta ( key TEXT PRIMARY KEY NOT NULL, value TEXT);
INSERT INTO meta VALUES('auth_uid_for_type:e.foundation.webdav.google','10125');
INSERT INTO meta VALUES('auth_uid_for_type:e.foundation.webdav.eelo','10125');
INSERT INTO meta VALUES('auth_uid_for_type:foundation.e.accountmanager.google.address_book','10125');
INSERT INTO meta VALUES('auth_uid_for_type:foundation.e.accountmanager.address_book','10125');
INSERT INTO meta VALUES('auth_uid_for_type:e.foundation.webdav','10125');
INSERT INTO meta VALUES('auth_uid_for_type:foundation.e.accountmanager.eelo.address_book','10125');
INSERT INTO meta VALUES('auth_uid_for_type:com.google','10093');
CREATE TABLE grants ( accounts_id INTEGER NOT NULL, auth_token_type STRING NOT NULL, uid INTEGER NOT NULL, UNIQUE (accounts_id,auth_token_type,uid));
CREATE TABLE shared_accounts ( _id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, type TEXT NOT NULL, UNIQUE(name,type));
CREATE TABLE debug_table ( _id INTEGER,action_type TEXT NOT NULL, time DATETIME,caller_uid INTEGER NOT NULL,table_name TEXT NOT NULL,primary_key INTEGER PRIMARY KEY);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-06-26 15:06:34',1000,'accounts',0);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-06-26 15:06:44',1000,'accounts',1);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-06-26 15:07:30',1000,'accounts',2);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-06-26 15:07:40',1000,'accounts',3);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-06-26 15:10:54',1000,'accounts',4);
INSERT INTO debug_table VALUES(1,'action_account_add','2022-06-26 15:13:24',10125,'accounts',5);
INSERT INTO debug_table VALUES(1,'action_set_password','2022-06-26 15:13:24',10125,'accounts',6);
INSERT INTO debug_table VALUES(2,'action_account_add','2022-06-26 15:25:46',10125,'accounts',7);
INSERT INTO debug_table VALUES(3,'action_account_add','2022-06-26 15:26:26',10125,'accounts',8);
INSERT INTO debug_table VALUES(3,'action_called_account_remove','2022-06-26 15:31:39',10125,'accounts',9);
INSERT INTO debug_table VALUES(3,'action_account_remove','2022-06-26 15:31:40',10125,'accounts',10);
INSERT INTO debug_table VALUES(1,'action_called_account_remove','2022-07-13 19:24:34',1000,'accounts',11);
INSERT INTO debug_table VALUES(1,'action_account_remove','2022-07-13 19:24:35',10125,'accounts',12);
INSERT INTO debug_table VALUES(2,'action_called_account_remove','2022-07-13 19:24:35',10125,'accounts',13);
INSERT INTO debug_table VALUES(2,'action_called_account_remove','2022-07-13 19:24:35',10125,'accounts',14);
INSERT INTO debug_table VALUES(2,'action_account_remove','2022-07-13 19:24:35',10125,'accounts',15);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-07-13 19:24:48',1000,'accounts',16);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-07-13 19:24:59',1000,'accounts',17);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-07-13 19:27:21',1000,'accounts',18);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-07-13 19:27:26',1000,'accounts',19);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-07-13 19:27:30',1000,'accounts',20);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-07-13 19:15:33',1000,'accounts',21);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-07-13 19:16:18',1000,'accounts',22);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-07-13 19:17:20',1000,'accounts',23);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-07-13 19:17:25',1000,'accounts',24);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-07-13 19:19:39',1000,'accounts',25);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-07-13 19:19:45',1000,'accounts',26);
INSERT INTO debug_table VALUES(-1,'action_called_account_add','2022-07-13 19:19:50',1000,'accounts',27);
CREATE TABLE visibility ( accounts_id INTEGER NOT NULL, _package TEXT NOT NULL, value INTEGER, PRIMARY KEY(accounts_id,_package));
DELETE FROM sqlite_sequence;
CREATE TRIGGER accountsDelete DELETE ON accounts BEGIN DELETE FROM grants WHERE accounts_id=OLD._id ; END;
CREATE INDEX timestamp_index ON debug_table (time);
CREATE TRIGGER accountsDeleteVisibility DELETE ON accounts BEGIN DELETE FROM visibility WHERE accounts_id=OLD._id ; END;
COMMIT;
$ echo .dump | sqlite3 accounts_ce.db
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE android_metadata (locale TEXT);
INSERT INTO android_metadata VALUES('de_DE');
CREATE TABLE accounts ( _id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, type TEXT NOT NULL, password TEXT, UNIQUE(name,type));
CREATE TABLE authtokens ( _id INTEGER PRIMARY KEY AUTOINCREMENT, accounts_id INTEGER NOT NULL, type TEXT NOT NULL, authtoken TEXT, UNIQUE (accounts_id,type));
CREATE TABLE extras ( _id INTEGER PRIMARY KEY AUTOINCREMENT, accounts_id INTEGER, key TEXT NOT NULL, value TEXT, UNIQUE(accounts_id,key));
DELETE FROM sqlite_sequence;
INSERT INTO sqlite_sequence VALUES('accounts',3);
INSERT INTO sqlite_sequence VALUES('extras',23);
CREATE TRIGGER accountsDelete DELETE ON accounts BEGIN DELETE FROM authtokens WHERE accounts_id=OLD._id ; DELETE FROM extras WHERE accounts_id=OLD._id ; END;
COMMIT;
Relevant screenshots
Solutions
Workaround
I guess if I overwrite the
Possible fixes