[Q] Broke MTP after ShoStock experiment? - AT&T Samsung Galaxy S II SGH-I777

I am having trouble using Android File Transfer after I tested out ShoStock for a couple of days and was wondering if anyone could offer some help. The trouble is that when I connect my phone to my computer (Macbook Pro running 10.8.3), Android File Transfer starts up and I can transfer files fine to the internal sdcard (usually), but I can't transfer files to the external sdcard. I switch over to the external sdcard view, drag a file over, and then get an error message from AFT telling me I need to restart my phone.
More information:
I did not have any problems with this until after I tested out ShoStock (just curious about it). I ran it for two days and then decided to return to Carbon Rom (very nice rom, btw. It's my DD). When I went back to Carbon, I did all the wipes, ran a kernel cleaning script, formatted system, then flashed. I had some problems related to MTP after that wipe - MTP would not set in the kernel (using STweaks) or in the rom settings. So, I did another full wipe etc. MTP sticks, but it still won't work with the external sdcard. I can use adb to move files to my sdcard, but I rely on MTP for syncing itunes with my phone so I need it work!
I have tried enabling/disabling adb, by the way. Doesn't work.
Also, when I tested out ShoStock, I just used the included kernel. For Carbon, I use AJK v1.49.
Thanks!
---------
PROBLEM SOLVED!
In case anyone encounters this issue, here's what I did:
Using ES File Explorer (or a similar file explorer with root privileges), mount your system as r/w (that means mount "/" as r/w)
Navigate to root and open default.prop in a suitable text editor (I like the ES editor)
Modify this line: persist.sys.usb.config=
To look like this: persist.sys.usb.config=mtp,adb
You might also check that ro.secure is ro.secure=0 (mine was inexplicably set to 1, which is probably why STweaks thought that I didn't have root)
I came across this because I was actually looking for vold.fstab. I couldn't remember where it was, but noticed the default.prop and thought I'd have a look. It was actually set to usb_mount_storage (or something of the like).

Related

How Do I Delete a Corrupted Nandroid Backup

NOTE: I have searched and reviewed the existing threads on items with similar wording. Several on how to recover corrupted files within the backup etc.. Although the questions and issues are similar none describe the issue that I am experiencing.
Samsung Galaxy Note
Rooted on AOSP xXx FJ,(Flappjaxxx) / FJ Mod of ICS UCLF6
Currently on CWM Recovery 5.8.4.3
Situation:
No prior issues experience with nandroid backup, had 2 other backups plus the one I'm referring to (one of AOSP xXx and FJ Modded)
Performed a nandroid backup to try out CM09 from FJ AOSP. All went well... including the CM09 install and apps.
Missed the S-pen functionality and wanted to flip back to FJ Modded ROM.
Attempted to restore the most recent backup... Failed. Booted into CM09 and went to Root Explorer and looked into the backup file. I noticed that the file has a lot of what appears to be random ASCII characters for file names etc... (indicated to me that this file was corrupted).
Since I had other backups, I went to one of the older ones and restored.
Problem: this corrupted backup is taking up about 1.9 GB and I want to delete but it will not allow me. Looked at permissions and it has RW
Question: how the heck do I delete this thing without having to take my SD card out and formatting the sucker?
Thanks in advance
You should be able to plug in your phone to your computer via USB and open folder to view files on the /sdcard. Make sure USB connection is set to "USB Mass Storage" option when connected. Once you opened the folder to view files, you can navigate to the clockworkmod folder, open, and find the backups within that folder and delete that way...
Sent from my MB865 using xda's premium carrier pigeon service
Did you try to delete it in recovery (sorry if there is no such option, never looked for it...) or in root explorer? You could always get a terminal like https://play.google.com/store/apps/details?id=jackpal.androidterm and do like this:
su (if you're rooted)
cd /sdcard/clockworkmod/backup
rm -r 2012-07-12.13.37
Same commands should work in adb as well
Try. Android Commander.
jje
Sent from my GT-I9300 using xda premium
I think that plugging the USB charger into your computer and manually deleting it should do the trick :fingers-crossed:
OK...
Thanks guys for your responses...
- did try connecting to a PC in mass storage mode and tried to delete... did not work
- use Root Explorer to do a delete as well... did not work
- looked to see if there was a delete option in recovery (first thing I looked for) did not find it
I'll try the other options and see where that goes.
JohnnyQ1964 said:
Thanks guys for your responses...
- did try connecting to a PC in mass storage mode and tried to delete... did not work
- use Root Explorer to do a delete as well... did not work
- looked to see if there was a delete option in recovery (first thing I looked for) did not find it
I'll try the other options and see where that goes.
Click to expand...
Click to collapse
If you download clockwork mod (rom manager) you can delete it in the android application in manage and restore backups.
Empty recycle bin on PC sometimes helps when deleted stuff sticks, make sure do this when plugged in ofc
If you're using Windows, run chkdsk ("Scan this drive for errors" in drive's properties) when connected as a mass storage device.
That should help.
If it won't, the guaranteed method is to copy the files you need somewhere else, format the card and put those files back.
to clairfy, you were able to locate the back up files in the folder "clockwork mod-backup" but then it would not delete when you tried?"
Thanks again for all your input.
PC crapped out this past weekend... new hdd installed and re-building with Windows 7 pro-64 (hmmm... maybe I should dual boot to Ubuntu), will need to reinstall some of the linux/android tools.
@frdd... already had terminal installed tried the commands but no luck... it reports back I'm missing files and i get a lot of errors. I guess I'm gonna have to learn Linux/Android
@icomrade... I've got the purchase ver of ROM Manager and haven't fully gone down that rabbit hole but will investigate
@NeverGone\RU... will leave that as a last resort as i've got a 32GB SD card (sucks up time)
@mankows5... yes did find all the directories and files as it should be... just can't delete that 1 backup
Yeah, try Rom manager. Manage and Restore Backups>Select the one you want to delete, then delete it.

Questions about VRUEMJ7 Tether Unlock

Two questions about the following thread (can't post in dev threads until 10 posts are made)
http://forum.xda-developers.com/showpost.php?p=47140596&postcount=1
Does anyone still have the files? The dropbox link doesn't contain any files
Is an external microsd card necessary?
The instructions are
Code:
su
cd /mnt/extSdCard/MJ7_tether_unlock/
sh tether.sh
Wouldn't it be fine to copy the MJ7_tether_unlock folder to root and use the following . . . ?
Code:
su
sh /sdcard/MJ7_tether_unlock/tether.sh
I fixed the link. Should download now. And no you cant use that command the reasoning has to do with how I wrote the script. If you dont have a micro sdcard you could also just make a new folder named "extSdCard" in the /mnt directory and then move the unzipped tether folder there.
Sent from my SCH-I545 using XDA Premium 4 mobile app
Surge1223 said:
I fixed the link. Should download now. And no you cant use that command the reasoning has to do with how I wrote the script. If you dont have a micro sdcard you could also just make a new folder named "extSdCard" in the /mnt directory and then move the unzipped tether folder there.
Click to expand...
Click to collapse
I couldn't get r/w in /mnt
I know there's probably a smarter way to do it, and I never tried the chmod you recommended on /system . . . but I re-wrote your tether and untether sh files to use /sdcard/tether instead of /extSdCard/MJ7_Tether_Unlock
I'm not sure how to remove the "crapware" bundled into the VZW S4, but every time I connect it via usb (to my Mint 15 laptop or W7 machine) it asks me to install some Verizon helper junk. It also mounts as a CD-ROM (due to some .ini file)
Does anyone know where this "storage" area is and if it's safe to blow all that crapware away? My S4 gets mounted as CD-ROM everytime whether or not I have USB debugging enabled. In W7 if I cancel it's "Would you like to install this Verizon helper software?" then the S4 is mounted as a portable media player. In Mint 15, I can easily unmount the ROM and the S4 is mounted as a portable media player.
Since I couldn't get past this, I just moved the renamed "tether" folder over to /sdcard which is the only way I can get the phone to mount.
Surge, thanks for the framework patch, and scripts. I like the extSdCard approach since it is always preserved, but it's just a lot easier for me to use the /sdcard since I've not got an external SD and am too cheap to buy one just for this
After running the scripts, I just copied the entire folder over to my computer in case the /sdcard is ever reformatted
I can't attach the whole thing since I'm filesize limited, but I attached the folder with everything except the original MJ7framework-res.apk
Obviously the instructions are close your original, except you just move the tether folder into /sdcard (which is consquently what shows up as "Phone" when mounted as a portable media player storage area in Mint 15???). Then just
su
cd /sdcard/tether/
sh tether.sh
Thank again surge
darker_slayer said:
I couldn't get r/w in /mnt
I know there's probably a smarter way to do it, and I never tried the chmod you recommended on /system . . . but I re-wrote your tether and untether sh files to use /sdcard/tether instead of /extSdCard/MJ7_Tether_Unlock
I'm not sure how to remove the "crapware" bundled into the VZW S4, but every time I connect it via usb (to my Mint 15 laptop or W7 machine) it asks me to install some Verizon helper junk. It also mounts as a CD-ROM (due to some .ini file)
Does anyone know where this "storage" area is and if it's safe to blow all that crapware away? My S4 gets mounted as CD-ROM everytime whether or not I have USB debugging enabled. In W7 if I cancel it's "Would you like to install this Verizon helper software?" then the S4 is mounted as a portable media player. In Mint 15, I can easily unmount the ROM and the S4 is mounted as a portable media player.
Since I couldn't get past this, I just moved the renamed "tether" folder over to /sdcard which is the only way I can get the phone to mount.
Surge, thanks for the framework patch, and scripts. I like the extSdCard approach since it is always preserved, but it's just a lot easier for me to use the /sdcard since I've not got an external SD and am too cheap to buy one just for this
After running the scripts, I just copied the entire folder over to my computer in case the /sdcard is ever reformatted
I can't attach the whole thing since I'm filesize limited, but I attached the folder with everything except the original MJ7framework-res.apk
Obviously the instructions are close your original, except you just move the tether folder into /sdcard (which is consquently what shows up as "Phone" when mounted as a portable media player storage area in Mint 15???). Then just
su
cd /sdcard/tether/
sh tether.sh
Thank again surge
Click to expand...
Click to collapse
I don't recall recommending to chmod /system as that would lead to a brick if done improperly. Also I guess you could change the script and replace all instances of "/extSdCard" to "/sdcard" which is what you did, I just wanted the zip and folder to be named in such a way that youd easily be able to tell what it was. But why even bother with using a pc? I was saying to run the commands through terminal emulator on the phone.
P.S. /system/etc/autorun.iso
Sent from my SCH-I545 using XDA Premium 4 mobile app
I ran them from terminal emulator. I was just referring to mixing the files over to the phone. ES file Explorer wouldn't write in mnt. When plugged in to the laptop I just prefer to move stuff straight in. The only thing I could get to mount was a scarf
Anyway thanks again
Also, does removing the auto run iso from etc have any adverse effects?
darker_slayer said:
Also, does removing the auto run iso from etc have any adverse effects?
Click to expand...
Click to collapse
Removing or renaming the autorun.iso file does not stop the USB connection from connecting as "installer" when you first plug it in. There is still a delay of 20-30 seconds before it switches to "connected as media device" after you plug it in. If anyone has a permanent solution to this, please post it! I've tried changing the settings in the hidden menu *#7284#, but the settings don't stick and revert back to the "connect as installer" after a reboot.
Zelmo88 said:
Removing or renaming the autorun.iso file does not stop the USB connection from connecting as "installer" when you first plug it in. There is still a delay of 20-30 seconds before it switches to "connected as media device" after you plug it in. If anyone has a permanent solution to this, please post it! I've tried changing the settings in the hidden menu *#7284#, but the settings don't stick and revert back to the "connect as installer" after a reboot.
Click to expand...
Click to collapse
Thanks for the info, I was going to ask about this in a separate thread. After your reply looks like I need to look for some other method.
Also, the phone never mounts anything other than /sdcard/ right? Moving things to other places requires an explorer app?
To add to the growing number of noob questions, is it still possible to run ES File Explorer with SU in version 3? I know I used this way in the past, but I can't find the option and it's not showing me a bunch of stuff like /efs/carrier/HiddenMenus or letting me past into extSdCard
Is there a free root explorer if ES can no longer do it?
darker_slayer said:
Thanks for the info, I was going to ask about this in a separate thread. After your reply looks like I need to look for some other method.
Also, the phone never mounts anything other than /sdcard/ right? Moving things to other places requires an explorer app?
To add to the growing number of noob questions, is it still possible to run ES File Explorer with SU in version 3? I know I used this way in the past, but I can't find the option and it's not showing me a bunch of stuff like /efs/carrier/HiddenMenus or letting me past into extSdCard
Is there a free root explorer if ES can no longer do it?
Click to expand...
Click to collapse
I use ES File Explorer without any problems. Do you have "root explorer" switched ON in "Tools" in the ES File Explorer?
Zelmo88 said:
I use ES File Explorer without any problems. Do you have "root explorer" switched ON in "Tools" in the ES File Explorer?
Click to expand...
Click to collapse
Nope
Looked for it in settings, didn't think to check tools

[Q] Unable to add scripts to init.d folder, cm 10.1

I have been trying to use int2ext, however flashing or placing the script directly fails to work.
There are no errors when using cwm, but when looking in a file manager the script is 0kb, and empty.
Pasting the script using ES file explorer does the same, places a empty 0kb file, this is with system mounted as r/w.
Tried using the file manager that comes with CyanogenMod but it shows an error when pasting rather than placing anything.
Different attempt with Mounts2sd, it asks to update the Init.d, but it fails with the error 'the init.d startup script cannot be copied to the system partition'
Busy box also fails to configure.
I am using CyanogenMod 10.1 for the wildfire s.
Not sure what's going on, followed all instructions when installing cyanogen originally. I will flash again, but unfortunately away from home to restore contacts once I'd re-install (though not major issue) Will go ahead with it if its recommended.
Looking to see if there might be another issue and way to resolve it.
It is partitioned just seems an issue with permissions and access.
Be happy to see the end of this low memory.

Copy file from computer to Android device — maintain modified date

I'd like to copy some files from my Mac or from a directory in my Dropbox to my rooted Android phone. Easy enough. But I need to maintain the modified dates and times for those files once they're on the phone. I have not found a way to do that. All files copied onto the phone take the time stamp of the moment they were written to the phone. I've tried adb push, file copy from the TWRP file manager, Dropsync, ftp from my computer to the Android phone. Copying files to an external OTG flash drive preserves the time stamps, but when I then copy from the external flash drive to the internal one, the modified time becomes the current one. I've tried an ftp server on the phone that supports MFMT, which I know little about, but am under the impression can preserve time stamps. Nope. The phone doesn't support a micro SD card, so I can't try that.
Any ideas of something that might work?
maigre said:
I'd like to copy some files from my Mac or from a directory in my Dropbox to my rooted Android phone. Easy enough. But I need to maintain the modified dates and times for those files once they're on the phone. I have not found a way to do that. All files copied onto the phone take the time stamp of the moment they were written to the phone. I've tried adb push, file copy from the TWRP file manager, Dropsync, ftp from my computer to the Android phone. Copying files to an external OTG flash drive preserves the time stamps, but when I then copy from the external flash drive to the internal one, the modified time becomes the current one. I've tried an ftp server on the phone that supports MFMT, which I know little about, but am under the impression can preserve time stamps. Nope. The phone doesn't support a micro SD card, so I can't try that.
Any ideas of something that might work?
Click to expand...
Click to collapse
cp -p, midnight commander via ssh is also fine. if you do lot of transfers you should have a look on sshfs.
sub77 said:
cp -p, midnight commander via ssh is also fine. if you do lot of transfers you should have a look on sshfs.
Click to expand...
Click to collapse
I may not be set up to compile sshfs or mc, if that's what it takes. This is not an everyday need I have, though.
From a terminal window on the phone, I was able to use cp -p to copy the files (with the desired time stamps) from the OTG flash drive to the dir where I wanted them on the phone. But the time stamps didn't stick. They wrote as the ones at the time the files were written to the phone. I tried rsync, but the phone says the command isn't there.

BLU R1 Plus issues; can't remount /system R+W, can't find APK

Ok, so my wife has a BLU R1 Plus, rooted w/Magisk. She never gets around to telling me what goes on and what problems she's having, but today I had her phone and when I went to charge it, watched a browser window pop up...never a good sign. So I checked it out with MalwareBytes, and yes, kids, there's a trojan, the (in)famous Preinstall Data2, probably installed by BLU itself (although I've had her phone before and never noticed it). Ok, thinks I, this is simple. First freeze it, then rip it from the bowels of the /system directory by the roots (pun intended).
But I can't.
Tried using the paid version of Titanium Backup to freeze it. It reports frozen, but the app is still running and a reboot shows it not frozen. Used Titanium Backup's "open system details" (it doesn't appear in the list of installed apps in the Settings) and used Disable there, with the same results; everything thinks it's frozen until a reboot when it's not again.
So I tried using Root Explorer to make the /system mount R+W, and it couldn't - first time I've ever seen that, and I gotta tell you that concerns me. Next I booted into TWRP recovery and mounted /system there...in this case it WAS writable, which I verified by using TWRP's file manager to move a folder from /system/app to the sdcard partition, checking after a reboot to make sure it was there, then moved it back to /system/app again checking after a reboot to verify it returned. Tried remounting /system with a root terminal, but since there are so many different mount command changes now for the different phones, this one may have been my error.
So apparently I have two separate, and possibly unrelated, issues. Which leads to two questions:
1) Short-term: Since it's intentionally hiding, anyone know what the "Preinstall Data2.apk" is hiding as? (Or does anyone know how to find the location of an APK in the file system from Titanium Backup, either in the UI or inside the backup itself? I poked it pretty hard and can't find it.) If I know it's bogus name, in /system/app or /system/priv-app, I can use TWRP to get rid of the d*mned thing one and for all.
2) Long-term: WTF can I do to fix this thing not allowing me write access to /system ? That's just...wrong, isn't it?
Ok, handled the virus APK...as the folks from TitaniumBackup gently showed me, clicking on the "Current" line in the backup window will show the path to the APK...in this case it was in /data/app, so I didn't need the /system filesystem unlocked to kill the sucker.
Still, would love to know why I can't mount /system R+W...
Even if the app creates something in /data/app/, the real APK is /system/app/preinstallprovider-***_blu_***.apk. You might want to remove it through TWRP.

Categories

Resources