MTP broken in OB3? - OnePlus 5T Questions & Answers

Cheers!
I noticed a rather strange thing when trying to copy files to my 5T on my Mac with Android File Transfer. I was unable to create folders, and trying to write data resulted in errors (like again "can't create folder"). Some files present on the phone and visible in e.g. TotalCommander (or any other file manager) would not show up on my Mac. I then switched to my Win10 PC just to find out that creating folders was also giving me grief. /data lists most of the files, but some are missing. Also, there are a lot of devices (like HDDs) present (icon-wise). I thought the file structure might be knackered or there might be something going on with an app (I am rooted and use Magisk), so booted to TWRP to restore boot and system to find out if this would happen with a plain install as well. What can I say... TWRP also comes with MTP and this is working correctly. Booting into a clean OB3 again produces errors. This leads me to the conclusion that either something "broke" when upgrading e.g. OB2 to OB3, or OB3 (at least) is knackered when it comes to MTP.
Does anyone have similar/the same issues?

Related

[Q] DeleteFile and real file system (fat12,fat16)

Hi there,
I'm programming something for Windows Mobile 2003. It basically removes and creates files around. One of the files it deletes is special file.reg, which is normally picked up during the hard-reset.
The file gets deleted using "DeleteFile" and very soon after, I force a hard-reset.
The problem is, the special file.reg is deleted from the file system tree, but it is apparently still available from the hard-reset.
I was wondering if there was another function I had to call to "flush" the file system? If not, I need to find a good trick to 1) enforce the file deletion (like rename first, then delete) and to 2) flush current ghost files left around.
The file system on those persistent drives are fat12 and/or fat16.
Thanks in advance for any input,
Simon
The hard reset returns the machine to its first power up state. If 'file.reg' was part of the original build, then the hard reset will restore it from ROM.
Also any programs you have installed to run on startup, will also be lost, so it is going to be a little difficult, if not impossible, to get rid of this file programatically.
Right, but I'm not talking about the ROM.
I'm talking about the persistent memory which are mounted as \Platform and \Application on this device. Those are FAT12 and/or FAT16, and files deleted (normally) do not come back.
In this case, the files are not coming back, they are not hidden either, but the hardreset process is able to pick them up somehow.
I mean, I call it the problem of the "Ghost files", because they are supposed to be nowhere, but they are found during during the hardreset.
(The files are not recreated, they are still not there, but their contents gets loaded. The info in them cannot be placed in ROM as it contains stuff that changes often)
They come back after a hard reset because during cold boot, they're being copied there from the rom or being created by the system. You may be able to delete them afterwards, but the only way to prevent them from being formed will be to re-cook the rom and stop them from being copied/created during boot-up.
The files DO NOT come back, it's gone, I cannot re-delete it. But somehow it is "read" by a program during the hard-reset.
This file is not part of the ROM, it's part of the persistent memory that doesn't get wiped out upon hardreset but is read-write.
I need to wipe out the ghost file that is stuck on the read/write partition... and I need a way to avoid these being created!
I understand that, but clearly the file is being created (or copied from rom) during cold re-boot, otherwise you wouldn't see it coming back. There isn't going to be any easy way to prevent that, unless you can re-cook the rom, or include some sort of user customization that would delete the files prior to using the device. There are lots of ways that the rom could create the files and put them onto persistant storage.
Hi Farmer Ted,
this is not a ROM issue, recooking the ROM will not help. The problem is a FAT12 or FAT16 filesystem that has bogus data in it.
The problem is most likely a bug in the program that reads the persistent folders... It probably reads it in a way that goes around the change made by DeleteFile()...
Changing that program is not possible (in ROM and I don't have the source, it's also necessary). I just need to make sure it can't find the file I've deleted on the persistent directory (not in ROM).

[Q] MPT Transfer issue

For some reason, MPT suck for me becasue it wont always transfer files between phone and PC.
For example, i select all images i want on my PC and copy them just to see that they aren't all copied. Same goes for APK.
Windows Explorer also can't see some of the thumbnails on camera folder and reports them corrupt but they look and open just fine on phone.
Anyone else has these issues and possible solution?
I don't accept managing media files via adb comments or anything similar.
THanks
does MTP transfer any files at all? or will it only transfer some?
MTP can be finicky sometimes....issues i've had before preventing me from transferring properly include a slightly dirty microUSB port on the phone, where wiggling the connection loses the MTP connection while transferring; drivers not installed correctly; sometimes just rebooting both phone and PC does the trick.
If it fails while transferring a large batch of files, try moving them in small groups, like 20 at a time and see if they all make it then.
PC or MAC? (or linux?)
yeah, it transfers the files but not all of them from one directory for some reason. Sometimes ot didn't trasnfered batches of 2-3 files at the same time which is insane.
Then about an hour ago i reead on some forum that guy recommends backing up files with ADB and deleting problematic directory and than copying files back to it.
I just did that and it works as it supposed to.
Transfers all filess to/from device.
What a strange issue.
GSM GNex/Windiws7 x64
I can confirm this issue. I have it from time to time as well and it seems rebooting my phone does the trick. Sometimes, I just cannot send my titaniumbackup folder from my pc to the phone, where I would get an error saying it cannot be sent or it hasn't been sent.
I'd like to know what's causing this. Is mtp not reliable?
Sent from my Galaxy Nexus using Tapatalk 2
MTP on the Galaxy Nexus/ICS is controlled by the MediaStore, and this can cause trouble.
General fix for this should be similar to what I outlined here.
Thanks for the tip man, i formatted my internal storage and recreated all folders again and it works as intended now.
I did this before you posted this solution.
I'll try it if i ever get this issue again (hopefully not)

[Q] WLAN not working after Nandroid restore on another S3

Hi,
i tried to restore a Nandroid Backup into another Galaxy S3, ROM and Baseband Version is the same.
After Restore everything is fine except WLAN, i can see accesspoints and also can enter the psw but it will not propperly connect to the ap it tells me authentication failure but the psw is correct and it will also not connect to an open accesspoint, something must be messed up with the wlan.
Can anyone help? Else i will use my old way over Titanium Backup but this is more time intensive.
Greetz X23
Anyone? I have exactly the same problem after doing a nandroid restore on my replaced S3. How do I fix this without having to do a factory reset?
Fixed the "Authentication error occurred" problem
I finally solved the problem after trial and error. I found that it was a file called .cid.info in /data that I needed to delete. My WiFi now works again.
vpwrf said:
I finally solved the problem after trial and error. I found that it was a file called .cid.info in /data that I needed to delete. My WiFi now works again.
Click to expand...
Click to collapse
Hi. I just registered cause I am trying to resolve this exact issue.
My situation: Cracked my screen on my I9300 (still working and yes, not the t-mobile version but international) and got a brand new replacement phone (exact same model) so I can get my old one repaired.
Did a NANDROID restore and copied internal SD card content (external SD card was simply physically swapped). Everything seems fine, but WiFi is not connecting to any router (famous "authentication error occurred - incorrect password" message).
Flashing a newer version of my ROM (Android Revolution HD, currently on 20.0, flashing 29.0 on my new phone) works fine, WiFi working as it should. So it is not a hardware issue.
So my question really is (as I simply want to "clone" the software layer of my phone until Android Revolution HD for 4.3 is released):
What else did you modify/change/delete to get this to work? Simply deleting .cid.info after restoring from NANDROID did not resolve the issue.
Any hints are highly appreciated. Been playing around with it for a week now (on and off) but cannot resolve the WiFi issue. Checked several forums and googled like a lot, but without any success. What am I not getting?
I am fairly new to Android (6 months), sometimes missing some (to others) essential background information and vocabulary, but happy to learn and not completely retarded.
Thanks for your help!
Have you tried forgetting the networks then reconnecting? Otherwise try renaming the .rev file. Or you could try copying the .cid.info from a ROM where the WiFi works fine to the Nandroid restored data. That might fix it.
I tried forgetting the networks, without success. I do not know what you are referring to by .rev file, and I do not have another device to restore my NANDROID image to, to then copy the cid.info file. So I kept playing around and this is what worked for me:
I found a file called wpa_supplicant.conf in the following directory: etc/wifi
Opening that file revealed some (as I was assuming) device related information (such as device type, model name, serial number, etc).
I renamed that file to .bak and this resolved my issue. I even deleted that file later on.
After enabling WiFi again, the file was not recreated by the system, even after a system reboot. I am not sure what this file does and how it was created, but so far everything is working as it should.
I also found a second file with the exact same file name at a different location: /data/misc/wifi
The content of that file is different, but some of the information is identical. This file contains WiFi AP information (like AP that I connected to in the past). Deleting that file would break my WiFi and would prevent it from turning ON. So I strongly recommend not to delete that file!
Needless to say: Do not make any modifications to system files without a functional NANDROID backup!
So in the end it seems to have been what I suspected all along. Some system file that was related to my old device and that, if identical, would create issues on the new device. But all of this is pure speculation. I am not an Android/Linux expert and simply tried to apply some logic.
I hope that I will now face no more issues. In case I do, I will report back.
Thanks for your help!
So, after getting my S3 repaired and switching back to it (usual NANDROID restore process), I was facing the exact same issue.
The wpa_supplicant.conf file that I was talking about did not exist, so I tried renaming the cid.info and that worked.
skofox said:
I tried forgetting the networks, without success. I do not know what you are referring to by .rev file, and I do not have another device to restore my NANDROID image to, to then copy the cid.info file. So I kept playing around and this is what worked for me:
I found a file called wpa_supplicant.conf in the following directory: etc/wifi
Opening that file revealed some (as I was assuming) device related information (such as device type, model name, serial number, etc).
I renamed that file to .bak and this resolved my issue. I even deleted that file later on.
After enabling WiFi again, the file was not recreated by the system, even after a system reboot. I am not sure what this file does and how it was created, but so far everything is working as it should.
I also found a second file with the exact same file name at a different location: /data/misc/wifi
The content of that file is different, but some of the information is identical. This file contains WiFi AP information (like AP that I connected to in the past). Deleting that file would break my WiFi and would prevent it from turning ON. So I strongly recommend not to delete that file!
Needless to say: Do not make any modifications to system files without a functional NANDROID backup!
So in the end it seems to have been what I suspected all along. Some system file that was related to my old device and that, if identical, would create issues on the new device. But all of this is pure speculation. I am not an Android/Linux expert and simply tried to apply some logic.
I hope that I will now face no more issues. In case I do, I will report back.
Thanks for your help!
Click to expand...
Click to collapse
It did not work for me. Neither does deleting .cid.info works.
That sucks. It's so frustrating.
Try to play around with it, based on the info in this thread. Make sure you have a working NANDROID backup, to just state the obvious (no offense).
Can you elaborate a little further what you believe caused the issue?
Reflash ing the rom would probably fix this.
Sent from my SAMSUNG-SGH-I747 using Tapatalk

[Q] All folders in sdcard partition not showing

Anyone seen this before? I plugged the N7 into my Win7 computer and when I go to Windows explorer it does not show all of the folders in the sdcard partition. The main problem was I wanted to copy some TB backups over from my GNex to get saved games and such moved over. There was an empty folder named TitaniumBackup on the N7, in windows explorer it shows up as a blank document icon, but when I attempt to go ahead and copy my system knew it was a folder but it couldn't write to/overwrite it.
My GNex does not have this kind of problem, all the folders in the sdcard partition show properly. I tried a reboot of my system as I've seen weirdness before with the MTP protocol and windows not updating its display (like it's caching what it's reading) and that would fix it, but not this time so I don't think that's the issue. I'm wondering if this might be a "fix permissions" kind of issue or something? The permissions look the same as my GNex though looking in Root Explorer.
flyinion said:
Anyone seen this before? I plugged the N7 into my Win7 computer and when I go to Windows explorer it does not show all of the folders in the sdcard partition. The main problem was I wanted to copy some TB backups over from my GNex to get saved games and such moved over. There was an empty folder named TitaniumBackup on the N7, in windows explorer it shows up as a blank document icon, but when I attempt to go ahead and copy my system knew it was a folder but it couldn't write to/overwrite it.
My GNex does not have this kind of problem, all the folders in the sdcard partition show properly. I tried a reboot of my system as I've seen weirdness before with the MTP protocol and windows not updating its display (like it's caching what it's reading) and that would fix it, but not this time so I don't think that's the issue. I'm wondering if this might be a "fix permissions" kind of issue or something? The permissions look the same as my GNex though looking in Root Explorer.
Click to expand...
Click to collapse
Well, I'd start with making sure you have the drivers.
http://developer.android.com/sdk/win-usb.html I could see and write to mine on linux and win 7; of course, only used the drivers on win 7.
Have you tried this SDrescan? https://play.google.com/store/apps/details?id=com.bero.sdrescan&hl=en
Any problems I've had of files/folders not showing up on both my GN/N7 have been fixed by running that first.
Ok guys looks like the problem is fixed. I think part of the problem was my faulty not updating or gps locking first device. The replacement looked like it was going to do the same thing, but now that it's rooted AND rebooted (and rebooted my desktop) all of the folders that should be are showing up. At this point I'm not sure if it was a fault with the first tablet, or the first tablet needed to be rebooted (pretty sure I did that a couple times though) or what.
edit: actually now I realized something weird, in Device Manger windows shows the Android Composite ADB Interface device as under the heading "Samsung Phone" (roughly the right wording) even though it's my Nexus 7 that is plugged in.

some files on SDCard corrupted after Oreo update

I update my Galaxy A5 (2017) SM-A520F to Oreo (original stock rom, not rooted, update via regular download without any external tools) when the update became available some days ago. I'm using an unencrypted SDCard (128 GByte) as external storage so I can insert it into an sdcard reader on my PC to copy large amounts of data. I already used the same sdcard with my previous Zenfone and there where no problems with Nougat on my A5 while keeping all the data on the card (i.e. without reformatting).
After the update to Oreo I got a message once that there is a problem with my sdcard but thinking that's something that can be fixed later I ignored it and can't exactly remember what it said. Now many files on the sdcard are still readable normally but files in some directories are corrupted (then all files in these directories seem to be affected). The files still exists and are physically "readable", but they do not contain any meaningful content and even text files look like random data. The directories with corrupted files might be the first in the alphabet, but I'm not 100% sure as this is difficult to check.
All corrupted files contain the word "CONSOLE" close to the beginning of the file but the rest looks random. This is completely independent from file type and size. I also detected (by comparing with a backup) that the corrupted files got several kB larger and that now the size seems to be exactly a multiple of 4096 bytes. The corrupted files are still unusable if I read the sdcard with the card reader on my PC (same mostly random content).
Is it possible that Oreo tried to begin encrypting file by file (I did never explicitly enable or confirm such an action) and got a problem resulting in some files beeing encrypted without the information that they need to be decrypted when used? Or is it more likely that Nougat began encrypting files and that Oreo somehow fails to decrypt these files? Or is this problem cause by something completely different? While searching for a solution I found many threads with sdcard problems on oreo on all kinds of devices, but nothing really similar.
Did anybody else experience similar problems and is there a solution to restore these files?

Categories

Resources