[Q] Media Storage issue - Fascinate Q&A, Help & Troubleshooting

This is very frustrating... expert help needed. I have a Samsung Fascinate running AOKP JB 4.2.1 under a clean install (...formatted my system, data, datadata, cache & dalvik prior).
On phone startup, "media storage" seems to scan all internal audio files. The audio list exists... but after a while, the list just disappears and I no longer can choose my ringtones, music, etc. from any application depending on "media storage". I found out the list of media files are in the "internal.db" database under /data/data/com.android.providers.media/databases. So I cleared the "media storage" data, restarted the phone, n observed the folder contents...
On startup, "internal.db" shows up @ ~100 kb and doesn't change in file size. What does change in size is the accompanying wal-file, "internal.db-wal". According to sqlite.org, the wal-file will maintain the audio list and commit it to the database "internal.db" after so many records. Yet, at some point this wal-file drops from ~700 kb of records to 0 kb... no idea why. This is when i can't access my music.
For a long time, this wasn't an issue. I believe the records from the wal-file were already successfully committed to the database. Then I must've cleared the data (for some reason), thereby having "media storage" rebuild the database from scratch... and ultimately revealing an issue with the wal-file. I've even uninstalled the "media storage" package "mediaprovider.apk" from /system/app via TitaniumBackup. Rebooted. Then reinstalled the apk to /system/app. Rebooted. Same issue happens! All else is working perfectly.
I'm no sqlite expert, but is there some way i can force the wal-file to commit? Any other advice? Yes, I googled all i could think of. And i'd like to avoid reinstalling my ROM. Your help is greatly appreciated.
[EDIT]
Found a workaround...
1 - Delete the contents of the folder /data/data/com.android.providers.media/databases.
2 - Reboot and wait ~5 min after startup to let the media store reindex all ur media. DO NOT configure any app's ringtones/sounds just yet.
3 - In terminal, enter the following commands. You should see "x | y | z" after the checkpoint command... where x is 0 (database is ok), y is the number of modified pages, and z is the number of pages successfully committed to the database. y and z should be equal and much greater than 0. If the result is not as described, the database is probably screwed up and u were too late. Go back to step 1 and repeat.
$ su
# cd /data/data/com.android.providers.media/databases
# sqlite3 internal.db
> pragma wal_checkpoint(FULL);
> .exit
# exit
$ exit
4 - Trust the workaround and start configuring ur ringtones/sounds now... or reboot again and ensure the media store database stays fixed. I recommend the latter.
5 - 3 sir!
[/EDIT]

Related

[GUIDE] Removing Duplicate Media Entries with root/adb/sqlite3

STD DISCLAIMER: I am not responsible for you screwing up your phone. Make BACKUPS!
I have the ever-present problem with the media files on my phone showing up as duplicates. I see from around the forums that several other users experience this regularly on CM9/CM10/AOKP based roms. I'm not sure why this is happening, but it seems to be a side-effect of the mediascanner re-indexing media it shouldn't. In this guide I show you what is going on with your data and how to remove the duplicates.
REQUIREMENTS
Your phone must be rooted to access the sqlite3 database.
You must have debugging turned on your phone
You must have access to adb and ideally have used it in the past. This thread is not about adb/driver setup!
PROCEDURE
Connect your phone via USB and make sure your adb server is started.
Code:
[[email protected] ~]$ adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Run 'adb shell' and become superuser (run 'su')
Code:
[[email protected] ~]$ adb shell
[email protected]:/ $
255|[email protected]:/ $ su
su
[email protected]:/ #
cd to /data/data/com.android.providers.media/databases/
Code:
[email protected]:/ # cd /data/data/com.android.providers.media/databases/
cd /data/data/com.android.providers.media/databases/
[email protected]:/data/data/com.android.providers.media/databases # ls
ls
external.db
external.db-shm
external.db-wal
internal.db
internal.db-shm
internal.db-wal
Attach to the external.db database with sqlite3
Code:
[email protected]:/data/data/com.android.providers.media/databases # sqlite3 external.db
external.db <
SQLite version 3.7.4
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>
view the avaible tables (.tables). Now almost every table here, except for the 'files' table is a view based on the files table. What happens is that some data is in 'files' is blanked out and the views create duplicates of the data with seemingly good filenames. However since the primary piece of data in 'files' is missing, all the media players relying on this database freak out.
Code:
sqlite> .tables
.tables
album_art audio files
album_info audio_genres images
albums audio_genres_map search
android_metadata audio_genres_map_noid searchhelpertitle
artist_info audio_meta thumbnails
artists audio_playlists video
artists_albums_map audio_playlists_map videothumbnails
sqlite>
look at the files table sql schema and find an example (.schema files). With the duplicate problem bad data is created with the '_data' field blanked out, but a valid media_type=2, since views rely on the media_type=2 but merges other fields with the file name, etc. you get a media entry that looks good but no entry to pull off the file system. See the _data section of the single entry I queried below to see what a good record looks like. A bad record will have a different '_id' and blank '_data'
Code:
sqlite> .schema files
.schema files
CREATE TABLE files (_id INTEGER PRIMARY KEY AUTOINCREMENT,_data TEXT,_size INTEGER,format INTEGER,parent INTEGER,date_added INTEGER,date_modified INTEGER,mime_type TEXT,title TEXT,description TEXT,_display_name TEXT,picasa_id TEXT,orientation INTEGER,latitude DOUBLE,longitude DOUBLE,datetaken INTEGER,mini_thumb_magic INTEGER,bucket_id TEXT,bucket_display_name TEXT,isprivate INTEGER,title_key TEXT,artist_id INTEGER,album_id INTEGER,composer TEXT,track INTEGER,year INTEGER CHECK(year!=0),is_ringtone INTEGER,is_music INTEGER,is_alarm INTEGER,is_notification INTEGER,is_podcast INTEGER,album_artist TEXT,duration INTEGER,bookmark INTEGER,artist TEXT,album TEXT,resolution TEXT,tags TEXT,category TEXT,language TEXT,mini_thumb_data TEXT,name TEXT,media_type INTEGER,old_id INTEGER, storage_id INTEGER, is_drm INTEGER, width INTEGER, height INTEGER);
CREATE INDEX album_id_idx ON files(album_id);
CREATE INDEX artist_id_idx ON files(artist_id);
CREATE INDEX bucket_index on files(bucket_id, media_type, datetaken, _id);
CREATE INDEX bucket_name on files(bucket_id, media_type, bucket_display_name);
CREATE INDEX format_index ON files(format);
CREATE INDEX media_type_index ON files(media_type);
CREATE INDEX parent_index ON files(parent);
CREATE INDEX path_index ON files(_data);
CREATE INDEX sort_index ON files(datetaken ASC, _id ASC);
CREATE INDEX title_idx ON files(title);
CREATE INDEX titlekey_index ON files(title_key);
CREATE TRIGGER audio_meta_cleanup DELETE ON files WHEN old.media_type = 2 BEGIN DELETE FROM audio_genres_map WHERE audio_id = old._id;DELETE FROM audio_playlists_map WHERE audio_id = old._id;END;
CREATE TRIGGER audio_playlists_cleanup DELETE ON files WHEN old.media_type = 4 BEGIN DELETE FROM audio_playlists_map WHERE playlist_id = old._id;SELECT _DELETE_FILE(old._data);END;
CREATE TRIGGER files_cleanup DELETE ON files BEGIN SELECT _OBJECT_REMOVED(old._id);END;
CREATE TRIGGER images_cleanup DELETE ON files WHEN old.media_type = 1 BEGIN DELETE FROM thumbnails WHERE image_id = old._id;SELECT _DELETE_FILE(old._data);END;
CREATE TRIGGER video_cleanup DELETE ON files WHEN old.media_type = 3 BEGIN SELECT _DELETE_FILE(old._data);END;
sqlite>
sqlite> select * from files where _data like '%Unhuman%';
select * from files where _data like '%Unhuman%';
16566|/mnt/emmc/mp3/Architect - 2010 - Consume Adapt Create/Architect - 04 - Unhuman.ogg|8176842|47362|16559|1345650424|1337460350|application/ogg|Unhuman||Architect - 04 - Unhuman.ogg|||||||-1041554543|Architect - 2010 - Consume Adapt Create|| O A 5 O ? ' A |5|7||4||0|1|0|0|0||338973||||||||||2||131073|0||
query the duplicates in the files tables. Here I look at just one example... This is from a later date than the earlier section. You can see how the one media file id = 16566 has been re-indexed again. 16566 and 19522 have been blanked and new record 22822 has been indexed with the complete record.
Code:
sqlite> select _id,_data,_display_name from files WHERE _data = '' AND media_type = 2;
select _id,_data,_display_name from files WHERE _data = '' AND media_type = 2;
19518||Architect - 13 - Wachsmuth.ogg
19519||Architect - 01 - The ***** is Back.ogg
19520||Architect - 02 - The Shadow of Eve.ogg
19521||Architect - 03 - Fast Lane (Freeze Frame).ogg
19522||Architect - 04 - Unhuman.ogg
19523||Architect - 05 - For You.ogg
19524||Architect - 06 - So I Went Out.ogg
19525||Architect - 08 - Attack Ships on Fire.ogg
19526||Architect - 09 - Pure.ogg
19527||Architect - 10 - I Lost my 808 on a Rainy Day.ogg
19528||Architect - 11 - Awake (Album Version).ogg
19529||Architect - 12 - The Beauty and the Beat (Rokka).ogg
<<more bad entries>>
sqlite> select * from files where _display_name like '%Unhuman%';
select * from files where _display_name like '%Unhuman%';
16566||8176842|47362|16559|1345650424|1337460350|application/ogg|Unhuman||Architect - 04 - Unhuman.ogg|||||||-1041554543|Architect - 2010 - Consume Adapt Create|| O A 5 O ? 'A |5|7||4||0|1|0|0|0||338973||||||||||2||131073|0||
19522||8176842|47362|19515|1345728924|1337460350|application/ogg|Unhuman||Architect - 04 - Unhuman.ogg|||||||-1041554543|Architect - 2010 - Consume Adapt Create|| O A 5 O ? 'A |5|7||4||0|1|0|0|0||338973||||||||||2||131073|0||
22822|/mnt/emmc/mp3/Architect - 2010 - Consume Adapt Create/Architect - 04 - Unhuman.ogg|8176842|47362|22815|1346073675|1337460350|application/ogg|Unhuman||Architect - 04 - Unhuman.ogg|||||||-1041554543|Architect - 2010 - Consume Adapt Create|| O A 5 O ? ' A |5|7||4||0|1|0|0|0||338973||||||||||2||131073|0||
delete all the duplicates. Note we won't be able to delete until we temporarily remove any triggers referring to api functions. If you look at '.schema' again you'll note a trigger refer to _OBJECT_REMOVED, we'll need to remove them. So STEP1. List schema -- cut and paste this to notepad or something. STEP2. DROP TRIGGER on anything referencing _OBJECT_REMOVED. STEP 3. delete our duplicates. STEP 4. re-create all triggers.
Code:
sqlite> drop TRIGGER files_cleanup;
drop TRIGGER files_cleanup;
sqlite> DELETE FROM files WHERE _data = '' and media_type = 2;
DELETE FROM files WHERE _data = '' and media_type = 2;
sqlite> CREATE TRIGGER files_cleanup DELETE ON files BEGIN SELECT _OBJECT_REMOVED(old._id);END;
(optional) Add a trigger to nuke duplicates. So maybe I'd like sqlite3 to remove dupes for me anytime it re-indexes, say for a deletion? Some other events might be too expensive to have this triggering all the time, but I've tested it with a file delete and it works.
Code:
CREATE TRIGGER duplicates_cleanup DELETE ON files WHEN old.media_type = 2 BEGIN DELETE FROM files WHERE _data = '' and media_type = 2;END;
That's IT.
Code:
sqlite> .quit
.quit
Takes about 2-5 minutes to clean up manually, vs waiting 14-30 minutes to re-index a huge collection. This could also be automated if you were so inclined with a better trigger or an app.
UPDATE: 10/26/2012
One clarification: media_type = 2 is audio files -- mp3, ogg, wav and the like. If you have issues with other media you can simple use that media type, or leave the qualifier off for all media types.
I was 'trying out' this trigger, but now have gone for months without any duplicates. I think it works. Basically, you can skip doing any other sql work in the above guide -- just creating this trigger and adding a media audio file. Adding a media file should launch this trigger and clear out any duplicates (may have to reboot once).
Code:
sqlite> create trigger duplicates_cleanup AFTER UPDATE OF _data ON files BEGIN DELETE FROM files WHERE _data = '' and media_type = 2;END;
create trigger duplicates_cleanup AFTER UPDATE OF _data ON files BEGIN DELETE FROM files WHERE _data = '' and media_type = 2;END;
Interesting.
Where do you see duplicates show up? I'm not running aosp.
The reason this caught my eye is because I've always had the issue of duplicate entries in ringtone and notification sounds lists, while there are not duplicate files in /system/media/audio/*. I don't think this is the same issue you are adressing, is it?
creepyncrawly said:
Interesting.
Where do you see duplicates show up? I'm not running aosp.
The reason this caught my eye is because I've always had the issue of duplicate entries in ringtone and notification sounds lists, while there are not duplicate files in /system/media/audio/*. I don't think this is the same issue you are adressing, is it?
Click to expand...
Click to collapse
It's a similar issue. Note the following items in the schema:
is_ringtone INTEGER,is_music INTEGER,is_alarm INTEGER,is_notification INTEGER,is_podcast INTEGER
The same thing could very well be happening where you have two records with mostly the same records but a blank '_data'.
othermark said:
It's a similar issue. Note the following items in the schema:
is_ringtone INTEGER,is_music INTEGER,is_alarm INTEGER,is_notification INTEGER,is_podcast INTEGER
The same thing could very well be happening where you have two records with mostly the same records but a blank '_data'.
Click to expand...
Click to collapse
Meaning it would be the same database?
creepyncrawly said:
Meaning it would be the same database?
Click to expand...
Click to collapse
If the duplicates are all on external media, yes, however, if it's on the internal media then it will be in the internal.db instead of the external.db as posted in my guide.
So if you're seeing duplicates with 'Whistle' showing up twice in notifications, there's probably a problem with internal.db.
Had a little time to play around with this today. First, I was surprised that I didn't have sqlite3 on my phone. I had to install it, using a market app called SQLite Installer for Root by ptSoft. (SHOstock2 v4.1.3)
I ran the query "select _id,_data from files WHERE _data = '' and media_type = 2;" on both the external.db and internal.db but in both cases no entries were found. So no joy finding duplicate entries in notifications and ringtones with this method.
creepyncrawly said:
Had a little time to play around with this today. First, I was surprised that I didn't have sqlite3 on my phone. I had to install it, using a market app called SQLite Installer for Root by ptSoft. (SHOstock2 v4.1.3)
I ran the query "select _id,_data from files WHERE _data = '' and media_type = 2;" on both the external.db and internal.db but in both cases no entries were found. So no joy finding duplicate entries in notifications and ringtones with this method.
Click to expand...
Click to collapse
The schema is maybe different in samsung based roms? How I originally found this was to pick a duplicate and look at the various tables and work backwards through the views and matching up fields.
You can always start with a select * from files and see if you can find where it lists the same name or file name twice. This should be easy to do on the internal.db with it's limited number of entries.
for the past year that i've had my sgs2, i've constantly had this issue with my phone and it's been a constant annoyance. i honestly want to say thank you for this but the problem is i got to step 1 and i went full retard. for some reason, i already have adb on my comp and i guess i used it for something at some point, possibly when i was rooting my phone a while back but i have no clue how to use it that well. i would love to try and get this to work on my phone but can you really dumb it down for those not really familiar with how to do all this? if not, i thank you for putting this up in the first place, i'll try to give it another go.
I tried the fix and it seemed to work until I pulled up ringtones a second time and there were the doubles and even triples. Frustrated that it didn't take I delved deeper into my files and discovered a couple unzipped (but not installed) ROMs that I had extracted just to look at. Deleted them and problem solved. Did I mention I'm a noob, lol?
bandit1210 said:
I tried the fix and it seemed to work until I pulled up ringtones a second time and there were the doubles and even triples. Frustrated that it didn't take I delved deeper into my files and discovered a couple unzipped (but not installed) ROMs that I had extracted just to look at. Deleted them and problem solved. Did I mention I'm a noob, lol?
Click to expand...
Click to collapse
Cool
ok, is there anyway to undo all of this because i have a feeling this might have caused my phone to delete all my pictures i've taken and when i try to flash a new rom, it sends me into a boot loop and i can't reflash anything.
ender127 said:
ok, is there anyway to undo all of this because i have a feeling this might have caused my phone to delete all my pictures i've taken and when i try to flash a new rom, it sends me into a boot loop and i can't reflash anything.
Click to expand...
Click to collapse
Flash to stock?
ender127 said:
ok, is there anyway to undo all of this because i have a feeling this might have caused my phone to delete all my pictures i've taken and when i try to flash a new rom, it sends me into a boot loop and i can't reflash anything.
Click to expand...
Click to collapse
You can "Clear Data" on the "Media Storage" app, this has the same effect as removing the db files.
However a boot loop is already beyond all this... You need to get into recovery to fix that.
well, i figured it was one of two things. after i did this on saturday, i tried to flash new firmwarm (10.31 task) but i got stuck in a boot loop. i can flash to another rom (super nexus) without problems and i can get to a really old nandroid backup. but basically you're telling me if i do a clear data on media storage, it'll wipe anything i did on adb? i really appreciate the responses by the way, i literally just flew out of the country for vacation and luckily i brought a laptop to fix this, but i can't function without my phone running.
ender127 said:
basically you're telling me if i do a clear data on media storage, it'll wipe anything i did on adb.
Click to expand...
Click to collapse
I believe so, yes. At least that is my experience.
How do delete duplicates if the _data is NOT empty
If you have root and can put sqlite3 on your device, this works without scanning and all that silliness:
http://forum.xda-developers.com/showthread.php?t=1847586
---------- Post added at 02:09 PM ---------- Previous post was at 01:49 PM ----------
Sweet, thank you so much for this. I found that on my Galaxy S3, Zedge creates a mess of things. I had up to 5 of each notification and ringtone, all with the same valid info aside from _id. Here's what I did to pick the first entry and clean things up:
sqlite3 external.db
FROM files WHERE _id not in (select MIN(_id) FROM files GROUP BY _data);
You can choose to keep the LAST entry for each by changing MIN to MAX, which might be a better idea if you trust recent modifications over earlier ones. If they all have valid _data it probably does not matter.

Directory Bind on Sony Tab S

Now that, our tablet S is now rooted finally .... thanks to all fellow users and developers for achieving this :highfive:
After rooting, i wanted to try Directory Bind developed by slig.. target to free up some space (internal sdcard). And result, this app is damn good guys! I have Maxpayne, GTA3, 9MM, Asphalt 6, Shadowgun. With all these games installed, i have 8.1gb from 8.9gb in internal storage (source: Sony's File Transfer) :laugh:
Requirement to make this work on sony tab, is ROOT, Enable write permission on sd patch from condi's S.ony Aio
Sounds cool? give it a try
Here's original thread [TOOL] DirectoryBind - move data to external_sd (GameLoft, Shadowgun etc.) ROOT req.
Hi all !
This is my application to bind directories located on external_sd to directories on internal memory (/sdcard/). This way You can transfer large application data directories to external_sd. Could be usefull with ex.: games from Gameloft, other like Shadowgun, applications like CamScanner.
Features:
* Requires ROOT !
* Aimed at specific functionality and features (not idiot-proof)
* You can create any number of Data -> Target directory pairs, mount them manually or choose to mount them on system boot (checkbox does that).
* On/Off switch controls whole mount-on-boot function.
* Diskette icon indicates if mount operation was successful, by taping it You can mount/umount entry.
* Icon changes if application is using mounted entry
* DirectoryBind can tell what application is using this entry (tap at entry in use)
* Long tap on entry (disabled) brings edit/delete window
* App auto umount all entries on USB connected and remount after USB disconnected (for now via BroadcardReceiver UMS_CONNECTED / UMS_DISCONNECTED)
* App shows notification and vibrates if auto umount on USB fails
* If mounting all checked entries (ex. on boot) app is waiting specified time (def. 60 sec) if data directory is not available (happens sometimes at boot)
* Tested sucessfully with Asphalt 6, Shadowgun, DeadSpace, CamScanner
Click to expand...
Click to collapse
Installation and usage is pretty simple. No format of card or extra partition required.
Just install the application and it will ask for root rights. Click allow and you are in the main screen. Now FIRST step, click menu and go for prog "preference" and there click bind on boot, 'alternate dbase mgmt"
and also check default data path, target path and assistant prefix dir- if reqd.
Now start adding games to move data, Add new entry -> click menu -> Data transfer assistant.
Click on the directory you want to transfer and select. -> and tick Transfer files from target to data. and finally click ADD
Now app will create similar path directory on your external sd card and will transfer all data files to same on your external sd card.
Once this transfer is completed, and click menu and click "Bind Checked" All done, data is now on your sd card and test your games.
Rest go through the original thread, after some tries you will succeed. Good luck guys :good:
edit:
Now added Asphault7, Brother in arm 2. Internal memory 7.8gb left
That's Cool!!!

Clockworkmod restore on multiple phones and Android ID

It seems that clockworkmod backup / restore provides an excellent way to create a master configuration (with many programs installed and a lot of detailed settings, but nothing special or protected) which can then be restored on many phones - EXCEPT for a few problems related to Android ID!!!
In more details - it seems that the Android ID and a few other settings derived from that are also cloned and (for the moment) there is no simple way to fix things - as far as I could find all seems (???) to be confined to a database file located in:
/data/data/com.android.providers.settings/databases/settings.db
where in the sqlite3 table called 'secure' there are 3 entries of interest:
_id 51 name android_id value XXXXxxxxxxxxxxxx
_id 57 name wifi_p2p_ssid value Android_XXXX
_id 200 name wifi_p2p_device_name value Android_XXXX
I did try to "adb pull" the file, edit it on PC with SQLite Expert Personal and then "adb push" the file back and then restart the phone but it seems something is not working as expected - the Wi-Fi Direct name does not always seem to change and even more strange I can see some very weird things taking place with other settings (for instance related to lock screen and other stuff) apparently changing "by themselves" when the phone goes to sleep :crying:
Any idea or suggestion on how that can be achieved?
Does the Android ID has any "internal CRC" in the 64-bit value encoded there?
For the moment my tests have been done using a CrisKelo ROM and siyah kernel but I don't think that is essential to the story.

[Q] How to fix edit of platform.xml gone wrong on Note3 SM-N9005?

I did a search and have found similar threads. However, people seem to have been intelligent and back up stuff or installed recovery apps before screwing around with their phones. I did not.
I have a Samsung Note3. Kit Kat 4.4.2 installed OTA once I had it up and running. I rooted it. However, the version of Kit-kat has a famous issue in that it would not allow apps to write to the SD card. I found a site with manual instructions to edit the platform.xml to overcome this issue. The site is as below:
winaero.com/blog/unlock-external-sd-card-writing-for-all-apps-in-android-4-4-kitkat/
However, something went awry after rebooting. I could not see anything on my SD card and I was unable to edit the platform.xml. A solution seemed to be to flash the ROM (using ODIN 3.07). I did this and currently have Baseband version N9005XXUENB1 and Build Number KOT49H.N9005XXUENB7
However, the still has lots of issues. I can stick in a password on wifi and connect to the network but it does not actually communicate with the internet. The H with up and down arrows appears for 3g connectivitiy but also does not work. Bluetooth does not work. Youtube has stopped working errors are common. I am unable to install any apps as cannot use play store, etc. I have pictures and mp3s on my SD card but gallery comes up empty as does music app. The only "file explorer" I seem to have is "my files" app. It comes up as empty (although it shows Total storage available for both SD memory and device storage as using 25/32 and 22/29 respectively.
I am guessing that flashing the ROM did not remedy the corrupt platform.xml in the permissions folder. I think the folder path was etc/permission/platform.xml although am not an expert with android. I was hoping someone might be able to give me a solution to fix the issue. Preferably a completely fresh and clean wipe type solution. Although as I am a "newbie" the greater the simplicity of the solution the better.
Apologies for the length of this issue!
T
laconical said:
I did a search and have found similar threads. However, people seem to have been intelligent and back up stuff or installed recovery apps before screwing around with their phones. I did not.
I have a Samsung Note3. Kit Kat 4.4.2 installed OTA once I had it up and running. I rooted it. However, the version of Kit-kat has a famous issue in that it would not allow apps to write to the SD card. I found a site with manual instructions to edit the platform.xml to overcome this issue. The site is as below:
winaero.com/blog/unlock-external-sd-card-writing-for-all-apps-in-android-4-4-kitkat/
However, something went awry after rebooting. I could not see anything on my SD card and I was unable to edit the platform.xml. A solution seemed to be to flash the ROM (using ODIN 3.07). I did this and currently have Baseband version N9005XXUENB1 and Build Number KOT49H.N9005XXUENB7
However, the still has lots of issues. I can stick in a password on wifi and connect to the network but it does not actually communicate with the internet. The H with up and down arrows appears for 3g connectivitiy but also does not work. Bluetooth does not work. Youtube has stopped working errors are common. I am unable to install any apps as cannot use play store, etc. I have pictures and mp3s on my SD card but gallery comes up empty as does music app. The only "file explorer" I seem to have is "my files" app. It comes up as empty (although it shows Total storage available for both SD memory and device storage as using 25/32 and 22/29 respectively.
I am guessing that flashing the ROM did not remedy the corrupt platform.xml in the permissions folder. I think the folder path was etc/permission/platform.xml although am not an expert with android. I was hoping someone might be able to give me a solution to fix the issue. Preferably a completely fresh and clean wipe type solution. Although as I am a "newbie" the greater the simplicity of the solution the better.
Apologies for the length of this issue!
T
Click to expand...
Click to collapse
Sounds like a bit of a pickle. Since you know that Odin is working and the firmware you have at least flashes correctly, I'd consider installing a custom recovery, backing up EFS folder (and the rom too, just in case there is some weird issue with Odin the 2nd time around) , then wipe everything - /system included. This will make your phone not be able to boot up at all because it will wipe the OS off. Then just boot directly to Download and redo the firmware flash. Something else to consider since you do have the international version, is that some of the firmwares you install might be more carrier or region specific, so there might be a better option to install. I know that there is a some slightly newer version that has NC2 in it as I was trying to fix one of these phones the other day that could not register on any network and ran across that build. Do you remember the build number of the software before you started modding?
Hello. Thanks for the reply.
I am going to ask what are probably very obvious questions but I am a little out of my depth.
1) What does installing a custom recovery involve?
2)How would I backup the EFS directory? When I had ES file explorer I would have been able to try and find it. However, as it is I do not know how to find the directory and back it up. I have connected the phone to a windows laptop and it shows up as note3 but there are no folders or files visible in either the phone or on the card.
3) What is the procedure to "wipe everything"?
I think the final part I know how to do with ODIN. Just go to download boot and load and run odin with the ROM.
I got the BTU ROM is that not for the UK? I tried looking up what NC2 was but did not really find anything the explained what it is.
Thanks again and sorry for the ignorance on my side.
Let's put the custom recovery and all that on the back burner for now.
Was your phone unlocked from the factory or did you get it from a carrier? If from a carrier, which, and is it unlocked now or you are still using it with the original carrier? This one is for Vodaphone http://www.sammobile.com/firmwares/3/?download=27401 but if you are unlocked, it should work anyway, I believe.
Thanks to the people for their replies. I managed to solve the issue as below.
As mentioned previously I had flashed using ODIN and BTU version of N9005XXUENB7. The only other thing that was then required was to enter the recovery (I think power + volume up + home and then release power once samsung name appears). I then selected wipe data/factory. A reboot later and everything was solved.
es0tericcha0s said:
Sounds like a bit of a pickle. Since you know that Odin is working and the firmware you have at least flashes correctly, I'd consider installing a custom recovery, backing up EFS folder (and the rom too, just in case there is some weird issue with Odin the 2nd time around) , then wipe everything - /system included. This will make your phone not be able to boot up at all because it will wipe the OS off. Then just boot directly to Download and redo the firmware flash. Something else to consider since you do have the international version, is that some of the firmwares you install might be more carrier or region specific, so there might be a better option to install. I know that there is a some slightly newer version that has NC2 in it as I was trying to fix one of these phones the other day that could not register on any network and ran across that build. Do you remember the build number of the software before you started modding?
Click to expand...
Click to collapse
Hi, The other day i tried to fix the Platform.xml. on my S5. i noticed sometime after that when i move files using the "My files" app, the phone would not refresh the files so that they would show up in gallery, videos etc.. I tried to undo the Media_rw by using SD Maid to find the Platform.xml and Axel to rewrite the Xml. In the platform.xml. i deleted the Media_rw and replaced the old xml with the old (original) one. I rebooted my phone. On swiping to open the screen i noticed alot of apps crashing one after the other. I when back to SD Maid and searched for Platform.xml and opened it with Axel but it said file not found.. i can not use the internet, i cant use most apps, i cant even use the Kies on my computer. I cant save anything to the storage either. I really need help. Odin is the only thing i can use. but i dont know how i can reset the xml files on my phone.. What exactly am i do to?
please
christaph3r said:
Hi, The other day i tried to fix the Platform.xml. on my S5. i noticed sometime after that when i move files using the "My files" app, the phone would not refresh the files so that they would show up in gallery, videos etc.. I tried to undo the Media_rw by using SD Maid to find the Platform.xml and Axel to rewrite the Xml. In the platform.xml. i deleted the Media_rw and replaced the old xml with the old (original) one. I rebooted my phone. On swiping to open the screen i noticed alot of apps crashing one after the other. I when back to SD Maid and searched for Platform.xml and opened it with Axel but it said file not found.. i can not use the internet, i cant use most apps, i cant even use the Kies on my computer. I cant save anything to the storage either. I really need help. Odin is the only thing i can use. but i dont know how i can reset the xml files on my phone.. What exactly am i do to?
please
Click to expand...
Click to collapse
Hey, I was wondering if you ever got a fix on this without factory reset. I am having the exact same issue.
Same boat here. Please someone help!
woahs said:
Hey, I was wondering if you ever got a fix on this without factory reset. I am having the exact same issue.
Click to expand...
Click to collapse
I am having exact same problem. After editing the platform.xml, my Note 3 is behaving the same way: no access to any storage area (including USB drive), no remote access/online access (even though WIFI and 4G appear to connect just fine), most apps fail with 'Unfortunately ... has stopped' error message, no Google Play...
I really don't want to do a factory reset, but really, does it even help? Is there a way to put the platform.xml back? Is there a way to access the phone via USB cable?
vbcomer said:
I am having exact same problem. After editing the platform.xml, my Note 3 is behaving the same way: no access to any storage area (including USB drive), no remote access/online access (even though WIFI and 4G appear to connect just fine), most apps fail with 'Unfortunately ... has stopped' error message, no Google Play...
I really don't want to do a factory reset, but really, does it even help? Is there a way to put the platform.xml back? Is there a way to access the phone via USB cable?
Click to expand...
Click to collapse
Update: I went ahead and successfully install the all-in-one file to the phone via Odin, but it still has the same issues. Can someone give a hint? thanks
FIX!!!
Hi I'm a god at searching(hence the Go)but an Noob(hence the obie) to Dev on Android but a computer techy(in other words I fix computers upgrade ETC.) Now if you followed EXACT instructions you SHOULD have the Backup copy of platform.xml. If not reply and I'll give those instructions.
So I did the same as this post did to get my issue as well but there's a SOLUTION I just found W/o getting rid of your loved files and its easy!
1. Download the ADB also included in The Android SDK by Google (approx. 3XX MB)
2. DOWNLOAD Root Explorer.APK
3. Extract ADB Dev kit( name should be roughly adt-bundle-windows-x86_64-20140702.zip)Note: I prefered it at C:\Android it avoided Name too long error
4. Open CMD Type: cd C:\<location ADB was extracted>\sdk\platform-tools(if you followed my note it will be "C:\Android\adt-bundle-windows-x86_64-20140702\sdk\platform-tools") and press enter... HINT TO COPY PASTE IN CMD RIGHT CLICK SAVES TIME!!!!
5. Install Root Explorer so you can backup your files(if any) I was unlucky having none on the phone but SD storage is ok!
To do this type ADB INSTALL <Location of Root explorer.exe> For standard windows users with default download locations it would be "C:\Users\<USER NAME>\Downloads\Root Explorer v3.1.9.apk" <COPY PASTE
6. Copy the original back to System>ETC>Permissions and overwrite
7. Factory reset!
Links?
sorry guys bt i have the same note 3 and i delete the platform.xml file .....i did a factory reset bt nothing happened ...can u help plz
Re:FIX!
But you have to set the permissions of platform.xml as 0777.Right?
Step 5 how should it works
Android Goobie said:
Hi I'm a god at searching(hence the Go)but an Noob(hence the obie) to Dev on Android but a computer techy(in other words I fix computers upgrade ETC.) Now if you followed EXACT instructions you SHOULD have the Backup copy of platform.xml. If not reply and I'll give those instructions.
So I did the same as this post did to get my issue as well but there's a SOLUTION I just found W/o getting rid of your loved files and its easy!
1. Download the ADB also included in The Android SDK by Google (approx. 3XX MB)
2. DOWNLOAD Root Explorer.APK
3. Extract ADB Dev kit( name should be roughly adt-bundle-windows-x86_64-20140702.zip)Note: I prefered it at C:\Android it avoided Name too long error
4. Open CMD Type: cd C:\<location ADB was extracted>\sdk\platform-tools(if you followed my note it will be "C:\Android\adt-bundle-windows-x86_64-20140702\sdk\platform-tools") and press enter... HINT TO COPY PASTE IN CMD RIGHT CLICK SAVES TIME!!!!
5. Install Root Explorer so you can backup your files(if any) I was unlucky having none on the phone but SD storage is ok!
To do this type ADB INSTALL <Location of Root explorer.exe> For standard windows users with default download locations it would be "C:\Users\<USER NAME>\Downloads\Root Explorer v3.1.9.apk" <COPY PASTE
6. Copy the original back to System>ETC>Permissions and overwrite
7. Factory reset!
Links?
Click to expand...
Click to collapse
Hi have next message in the install root step could you help me please
Android Debug Bridge version 1.0.31
-a - directs adb to listen on all interfaces for a connection
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <specific device> - directs command to the device or emulator with
the given
serial number or qualifier. Overrides ANDROID_SERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
-H - Name of adb server host (default: localhost)
-P - Port of adb server (default: 5037)
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number
is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number
is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devices.
device commands:
adb push [-p] <local> <remote>
- copy file/dir to device
('-p' to display the transfer progress)
adb pull [-p] [-a] <remote> [<local>]
- copy file/dir from device
('-p' to display the transfer progress)
('-a' means copy timestamp and mode) adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward --list - list all forward socket connections.
the format is a list of lines with the followin
g format:
<serial> " " <local> " " <remote> "\n" adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only) adb forward --no-rebind <local> <remote>
- same as 'adb forward <local> <remote>' but fails
if <local> is already forwarded
adb forward --remove <local> - remove a specific forward socket connection
adb forward --remove-all - remove all forward socket connections
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-d] [-s] [--algo <algorithm name> --key <hex-encoded ke
y> --iv <hex-encoded iv>] <file>
- push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-d' means allow version code downgrade)
('-s' means install on SD card instead of inter
nal storage)
('--algo', '--key', and '--iv' mean the file is
encrypted already)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all]
[-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>
.
If no -f option is supplied then the data is written
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any installed apk expansion
(aka .obb) files associated with each application; the default is noobb.)
(-shared|-noshared enable/disable backup of the device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.) adb restore <file> - restore device contents from the <file> backup
archive
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb get-devpath - prints: <device-path>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1 [parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list of the following values
1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes priority over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.

Monitor system file changes (root) ?

Checked posts / searched for an existing answer... didn't see anything (please move this post if it is in the wrong section)
So I have a app, when I open it asks me what Google ID to uses (preferred ID) but after selecting a Google ID I can not change to a different ID
- If I clear the App Cache the selected ID persists
- If I clear the App Data the selected ID clears and the app returns to the select ID option
- I keyword searched for the App name on my device (Nexus 5x)with Root Explorer (12 different file locations, with subfolders and a bunch of empty folders)
Clearing App Data is a working interim solution, the downside is that every time I clear the App Data the app "downloads assets" (40mb+ ~40 times per day - 1.6Gb!)
What I am hoping to find is a app / script / terminal / log solution that will tell me what file is being modified when I select the Google ID, so I can delete that file re-open the app and change Google Logon
(I contacted the app developer, they said they may be able to fix the problem on the next patch eta 12-24 months)
So I have tried these apps:
https://play.google.com/store/apps/details?id=file.observer
https://play.google.com/store/apps/details?id=scd.lcex
https://play.google.com/store/apps/details?id=eu.thedarken.sdm
But I didn't see system changes (root level) or I didn't know what to look for in LogCat
Any help or suggestions are appreciate!
- I do not have a computer with me (ADB) will be about 7 days before I can try that
- I have been experimenting with deleting files / folders and testing to see if I get lucky (probably not the best method)
- I am not a developer
My current process (as of today) - I clear the app data, then restore the app data with TB (just restoring doesn't clear the sign in status)
As long as my TB backup is "always" in the signed out state, then the "app assets" restore with no issues (and I don't have to keep downloading them)
I am looking for a way to get these (2) operations into a single script / file / shortcut, but it is working for now
I did try the terminal with cp -a (copy the assets - app had a error on library permissions when the files were restored) chmod, chown, and find (try and locate the file) but had minimal success

Categories

Resources