Right now I am backing up my files with adb and I have tried the following commands
adb pull /sdcard D:\[backupfolder]
adb pull /sdcard
But they just copy the internal storage folders, while what I want is to copy the stuff in the sdcard. I have tried
/storage/sdcard0
/storage/sdcard
/storage/0
/disk (it is how the folder is called in my phone)
but none of them exist.
Can anyone who has backed up their sd card on a Poco X3 tell me the actual storage path to use in adb? Thanks!
You can't.
Cuz SD card is always some strange digit number.
Try to enter ADB shell and then use the ls command to list all folders.
It should be in Mount or mnt
/sdcard is usually a chain of links that is not followed by ADB.
You need to:
Code:
$ stat /sdcard
And it will tell you where it points to. Then you stat that and keep on going until you stat something that is a real directory.
Related
Suddenly I couldn't find any of my ringtones that stored on the /sdcard/ringtones directory from Ringtones Settings.
The /sdcard/ringtones is still avaliable on the sdcard and If I tried to play them throw the mp3 player they works fine.
I found out that the sdcard is mounted as Read-Only and not Read/Write as before. Even if I plug it in to the PC I can't change any of the data on the sdcard only read it.
The latest change that I made few days ago was to store all cache files on the sdcard. I am not sure that this is the reason but it could be.
Does anyone here have any idea why it happened?
install Rings Extended from the market. Open your soundsettings with the program. It will prompt to open with rings extended or standard.
Don't know about the read-only stuff, but you could take a look at the ownership and the rights you have as a user/admin... if all fails.. format?
thanks for the advice, I will try it...
does anyone have more ideas regarding the read only issue?
yes could this be your problem too http://forum.xda-developers.com/showthread.php?t=473256
unfortunately its not the same issue, I have root access to the phone and when I run the mount command this is the output I have for /sdcard
/dev/block/mmcblk0p1 on /sdcard type vfat (ro,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8)
I can't use the camera and the ringtones because of that.
I do able to remount the /sdcard as rw but any time I reboot the phone it become ro.
can you please copy for me the output that you have from mount command on /sdcard/ and the permissions you have on that directory from ls -l command?
zrubi said:
unfortunately its not the same issue, I have root access to the phone and when I run the mount command this is the output I have for /sdcard
/dev/block/mmcblk0p1 on /sdcard type vfat (ro,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8)
I can't use the camera and the ringtones because of that.
I do able to remount the /sdcard as rw but any time I reboot the phone it become ro.
can you please copy for me the output that you have from mount command on /sdcard/ and the permissions you have on that directory from ls -l command?
Click to expand...
Click to collapse
I suspect the fat partition on your sdcard got corrupted. Try a reformat
you were right thanks
I did chkdisk from windows and it did fix the fs.
now its working just fine...
I'm trying to run: adb shell, but I keep getting error msg: "adb" is not recognized as file or program.
I have Adnroid SDK r08, lattest from the site, installed on my Windwos XP.
I'm doing this, because I cant mount my SD Card on Clockwork, so I can't proceed Flashing with a new ROM, the phone it self under Android, is recognizing the memory.
It is formated under FAT32 and was re-formated with the phone as a couple of posts suggests.
Could someone help me? Thanks
Before running adb, you should change your working directory to the directory where it is located.
For example, if you've installed android sdk in C:\andsdk, then you should use the following command to use it:
Code:
cd C:\andsdk\tools
adb shell
Done, I can already access to adb shell, but when Im trying to mount the sdcard, it says that its unable to mount.
So when I'm trying to Install ROM from SD Card, at Recovery Menu - Clockwork, it says that its unable to mount the SDCard.
Are you sure that your SD card is inserted properly?
Well the card works perfectly when I'm running Android. No problems at all.
Then, they came up (problems) as soon as I went into Recovery menu (Clockwork) and the phone was rooted perfectly with unrevoked 3.31
Things that I've already tried:
- Format SDCard under Fat32 and re format it with the phone => The SD Card works perfectly under Android but cannot mount on Recovery Menu.
- Format SDCard under Ext3 and 4, same as previous.
Any suggestion are welcome, and thank you so much.
When you ask ADB to list devices ('adb devices'), is yours recognised?
As soon as I got into Recovery Menu:
Ran: adb devices
This is what I got:
List of devices attached:
XXXXXXXXXXX - recovery
Click to expand...
Click to collapse
xxx - corresponds to my phone code
Then I do:
adb shell
mount /sdcard
And I get:
mount: mounting /dev/block/mmcblk0p1 on /sdcard failed: No such file or directory
Any suggestions?
Thank you!
Have you tried mounting the SD card in ADB while booted into Android?
This thread sounds like a similar thing, and might be worth reading.
when you upload a file to a device ( adb push) where does it go? I cannot see any of my zip files in any subdirectory via recovery filemanager. So I can't install them obviously.
It should go where you tell adb where to put it... i.e. adb push whatever.zip /storage/emulated/0 should put it in your internal storage (not in a subfolder). With my old Archos tablet I used adb push update.zip /data/media/0 (which is a symlink to internal storage).
I wanted an encrypted external sd on my phone that i could remove and transfer files to as needed.
This is the solution I conjured up after doing some testing and research
Thanks to @POQDavid who wrote How to decrypt and split adopted storage? which ive modified
Make sure your SD card is formatted as internal storage
Your device must be rooted.
Use a file browser like ES Explorer/Ghost/TotalCommander, browse to /data/misc/vold.
Copy the .key file to another folder and then move to your pc
DO NOT need to dump the hex like in other guides
Copy your key somewhere safe on PC
Code:
sudo mkdir /etc/keys/
cp <keyfilename>.key /etc/keys
On any Linux distro check where your drive is mounted, you can use
Code:
fdisk -l or lsblk
to find the large encrypted partition of the SD card, my SD card was mounted to /dev/sdd2.
Create the mount point:
Code:
sudo mkdir /mnt/1
Then run this command
Code:
sudo cryptsetup create usbcrypt1 /dev/sdd2 --key-size 128 --key-file /etc/keys/<keyfilename>.key
If your key is correct you can mount it by
Code:
sudo mount /dev/mapper/usbcrypt1 /mnt/1/
Test the mount
Code:
ls /mnt/1
Finally you can run
Code:
cd /mnt/1
to browse the decrypted storage.
Automation
Im tired now and so far I have automated this using terminal aliases
Just drop the alias into command and hit enter, the cryptmount to mount and cryptumount to unmount. (alias will be removed on reboot) edit and insert into ~./bashrc to make aliases stay
Code:
# alias mounting
[B]alias cryptmount="sudo su -c 'cryptsetup create usbcrypt1 /dev/sdd2 --key-size 128 --key-file /etc/keys/<keyfilename>.key' && sudo su -c 'mount /dev/mapper/usbcrypt1 /mnt/1'"[/B]
#alias unmounting and luksClose
[B]alias cryptumount="sudo su -c 'umount /mnt/1' && sudo su -c 'cryptsetup luksClose usbcrypt1'"[/B]
Remember to replace <keyfilename> with your keyfile name to make it work.
Next step make this automount in crypttab using dm-crypt method if thats possible... Any help appreciated.
cheers and good night
Table reserved for 2
Ok it works, but kind of a hassle. To copy files over you basically should copy them to a readable folder like user or any other one you can create directories in after mounting.
Copy your files to the encrypted drive, unmount .
then using a file manager with root access on your phone copy them from /mnt/expand/<UUID> to /mnt/sdcard and you should be good. It works for be but i wont be using this method anymore because its a pain to copy large amounts of files so many times. better to use an OTG usb for that
However this does have benefits if your phone is destroyed and only the adapted sd card exists and you need access to your files.
Enjoy.
[xzel] said:
Ok it works, but kind of a hassle. To copy files over you basically should copy them to a readable folder like user or any other one you can create directories in after mounting.
Copy your files to the encrypted drive, unmount .
then using a file manager with root access on your phone copy them from /mnt/expand/<UUID> to /mnt/sdcard and you should be good. It works for be but i wont be using this method anymore because its a pain to copy large amounts of files so many times. better to use an OTG usb for that
However this does have benefits if your phone is destroyed and only the adapted sd card exists and you need access to your files.
Enjoy.
Click to expand...
Click to collapse
Is it possible to browse adoptable storage from twrp using the aforementioned method?
I have busybox and cryptsetup in termux so i can use it from twrp terminal..?
Unreal_Hawkz said:
Is it possible to browse adoptable storage from twrp using the aforementioned method?
I have busybox and cryptsetup in termux so i can use it from twrp terminal..?
Click to expand...
Click to collapse
I believe you can mount it thru termux but I havent tried, I tried this on an Ubuntu system.
Hi guys,
as the title states, I'm not able to delete the folder "/sdcard" I created.
What I tried:
TWRP:
File manager > Go into folder > Delete - error 1
Mount system > File manager > Go into folder > Delete - error 1
Mount system and Micro SD card > File manager > Go into folder > Delete - error 1
Mount everything > File manager > Go into folder > Delete - error 1
ADB:
adb shell rm -rf /sdcard - resource busy
adb shell mount -o remount,rw and then rm -rf /sdcard - resource busy
Why is this folder there?
Well, I have this HTC e8 with barely no battery and when I was installing LOS yesterday there was a power outage and it corrupted the installation. After being able to go into recovery I lost the touch controls in TWRP. Went via adb and didn't remember the path to the sd card, so I could send the restore command. After trying the ls and find commands and end up with millions of records my "brilliant" idea was to use the mkdir command to test for the common sd card path names...
Anyway, after reinstalling LOS (with wipe data) I noticed it didn't let me use the sd card without formatting. Then I went into TWRP File Manager and found out the "/sdcard" folder I created had all the folders that LOS usually creates in my sd card (which the path is "/external_sd"). So now I need to delete this folder and reinstall everything again so that LOS can see "/external_sd" as the true sd card path
Do you guys have any suggestion I can try here?
Thanks in advance
You cannot operate on a folder / file that is currently in use by another process - this might be a daemon or whatever: If you try nevertheless then you get error message "Resource is busy" or similar.
When I try to mount a partition then I always do it this way
Code:
cd /
mount -o rw,remount <mount_point>
what always worked for me.