[Droid Eris Q&A, Help & Troubleshooting] bftb0:
Workaround for XDA App - we don't need no steenking Premium App :D

Here's a little present for you folks (see attached).

I fooled around a little (OK, a lot) and using the "sqlite3" utility on the phone (GSB v1.6, probably most other ROMs, too), I created a replacement "tapatalk.db" file which you can use to replace your existing subscribed/favorites list for the XDA app, with a version pre-configured for all 5 of the Eris Forums. (If you have more subscriptions/favorites than that, you can add them back manually afterwards)

This will allow even users that have never bookmarked/"favorite-ed" Eris forums to access them in the XDA app. (Note that I did not fool around with the market "Tapatalk" app, so I have no reason to believe it will work for that, but who knows. The same hacking method that I used will probably work there, too, and I've included an thumbnail sketch of that below for anyone interested.)

XDA app data location: /data/data/com.quoord.tapatalkxda.activity/

File in question is: /data/data/com.quoord.tapatalkxda.activity/databases/tapatalk.db

Instructions/Outline:

1) Make sure XDA app is not running.

2) Make a backup copy of current "tapatalk.db" file

3) Unzip the zip file (provided below)

4) Push ErisForums-tapatalk.db to /data/data/com.quoord.tapatalkxda.activity/databases/tapatalk.db

5) Find out what UID/GID owns the files in /data/data/com.quoord.tapatalkxda.activity/databases/, and then

6) "chown" the replacement tapatalk.db file, as in (example) :

chown app_666:app_666 /data/data/com.quoord.tapatalkxda.activity/databases/tapatalk.db

(in your case, the file ownership will be something different - "app_105", "app_117", whatever).

That's pretty much it. (7) Fire up the XDA app (com.quoord.tapatalkxda.activity.apk) and enjoy.

This next section you can skip if you are not interested in the details - but it describes how you could possibly do the same thing with Tapatalk.

================================================================================

The basic method is to dump the contents of a given SQL table (using "sqlite3", already on your phone) to a text file which can be edited, and then reload it back into the "tapatalk.db" SQL database. (Again, by using "sqlite3"). Obviously, you need adb or god forbid a terminal emulator to do this.

You can find background information on using sqlite/sqlite3 here; a SQL syntax reference is here.

What I did prior to the below steps was to subscribe to each of the 5 Droid Incredible (leaf) forums - that way I would be modifying an extremely similar case to match the Eris forum IDs.

# [COLOR=green]cd /data/data/com.quoord.tapatalkxda.activity/databases[/COLOR]
# [COLOR=green]sqlite3 tapatalk.db[/COLOR]
sqlite> [COLOR=green].mode insert[/COLOR]
sqlite> [COLOR=green].output sqldump.sql[/COLOR]
sqlite> [COLOR=green].table[/COLOR]
android_metadata favorite subscribeforum
sqlite> [COLOR=green].schema subscribeforum[/COLOR]
CREATE TABLE subscribeforum (id INTEGER PRIMARY KEY AUTOINCREMENT,forumid VARCHER,tapforumurl VARCHAR,name VARCHAR,subonly INTEGER,logourl VARCHAR,subforum BLOB);
sqlite> [COLOR=green]select * from subscribeforum;[/COLOR]
sqlite> [COLOR=green].exit[/COLOR]

At this point you move the sqldump.sql file to your PC, and edit it with a text editor. Note the 2nd field in the SQL table is "forumid". The Eris forum ids are 552, 737, 553, 554, 555. Edit these into place in the correct rows, and modify the text as you wish

Note also the field "subonly". This is important. In my experimentation with the XDA app, if a forum has sub-forums this field will be set to "1", and there will be a large binary blob in the last field of the record - this field in turn has information about the subforums in it. I was able to unpack it, and stuff some modified values into it using a hex editor, and re-pack it, but this method was unsuccessful for some unknown reason ... and much more difficult than what I am describing here. So, rather than just making a single favorite/subscription being the "toplevel" Eris Forum (#551) with 5 subforums, I created subscriptions to each of the 5 "leaf" Eris forums. You will see that these "leaf" forums (forums which have no sub-forums) have "subonly" set to 0, and the binary blob "subforum" is NULL.

Oh yeah, one more thing - when sqlite creates the table dump ("sqldump.sql"), it does not insert the table name into the output record, but instead just says "table". In each line of the "sqldump.sql" file, make sure to replace "table" with the actual name of the table you are loading data into, e.g. "subscribeforum" in the case of the XDA app. (database file "tapatalk.db"; table name within the database is "subscribeforum". Could be slightly different with tapatalk), for instance:

INSERT INTO subscribeforum VALUES(1,555,'http://xdaforums.com/mobiquo/mobiquo.php','Droid Eris Themes and Apps',0,'',NULL);
INSERT INTO subscribeforum VALUES(2,554,'http://xdaforums.com/mobiquo/mobiquo.php','Droid Eris Android Development',0,'',NULL);
INSERT INTO subscribeforum VALUES(3,553,'http://xdaforums.com/mobiquo/mobiquo.php','Droid Eris Accessories',0,'',NULL);
INSERT INTO subscribeforum VALUES(4,737,'http://xdaforums.com/mobiquo/mobiquo.php','Droid Eris Q&A',0,'',NULL);
INSERT INTO subscribeforum VALUES(5,552,'http://xdaforums.com/mobiquo/mobiquo.php','Droid Eris General',0,'',NULL);

Then, push it back to the phone, delete all the records out of the existing database, and "load" these new records into the database:

(Please Note: the "mobiquo.php" URL should be left alone - it is the forum ID values which actually load the correct forum.)

# [COLOR=green]sqlite3 tapatalk.db[/COLOR]
SQLite version 3.7.2
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> [COLOR=green]delete from subscribeforum;[/COLOR]
sqlite> [COLOR=green].read sqldump.sql[/COLOR]
[COLOR=grey][I](these last 3 commands are just to verify that the data loaded)[/I][/COLOR]
sqlite> [COLOR=green].header on[/COLOR]
sqlite> [COLOR=green].mode column[/COLOR]
sqlite> [COLOR=green]select * from subscribeforum;[/COLOR]
id forumid tapforumurl name subonly logourl subforum
---------- ---------- --------------------------------------------------- -------------------------- ---------- ---------- ----------
1 555 http://xdaforums.com/mobiquo/mobiquo.php Droid Eris Themes and Apps 0
2 554 http://xdaforums.com/mobiquo/mobiquo.php Droid Eris Android Develop 0
3 553 http://xdaforums.com/mobiquo/mobiquo.php Droid Eris Accessories 0
4 737 http://xdaforums.com/mobiquo/mobiquo.php Droid Eris Q&A 0
5 552 http://xdaforums.com/mobiquo/mobiquo.php Droid Eris General 0
sqlite> [COLOR=green].exit[/COLOR]

================================================================================

Good Luck and enjoy

bftb0