how can I push Rom files to internal storage in my Tf300T?
adb push ROM.zip /data/media/0/ ?¿?¿?¿?
adb push ROM.zip /data/local ¿?¿??¿
adb push ROM.zip /sdcard0/ Ç?¿?¿??¿
adb push ROM.zip /sdcard/ ?¿?¿?¿
Related
Hi all,
I am just going to cut to the chase, I only have HBoot and Fastboot USB modes availalbe on my phone. I need to delete the only file that is on the Fat32 partition of my SD card and then copy another onto it.
I don't have an adapter for the SD card that I can plug into my computer so I'm hoping to accomplish this with Android SDK.
ADB is out of the question because my Magic won't boot up to normal mode.
Any help is appreciated.
Doesn't your hboot allow you to mount the sdcard to your computer? If not you may be able to use fastboot to install an hboot that supports this.
RA's recovery ROM (or I think any new one) will allow you to mount the sdcard. Just use fastboot to load it.
If you can't do that for somereason, and solely want to rely on the sdk, use adb like this:
adb shell
adb mount sdcard
cd sdcard
rm <filename>
exit
adb push <filename> /sdcard/
Hi all,
I accidentally deleted internal storage while I was trying to flash paranoid android on my Nexus 5. I then managed to push the ROM.zip back into my phone's internal storage using ADB Push. I installed the ROM but after the ROM installed, the zip file is no longer in the internal storage. What happened to the zip package? Where did it go?
Thanks for your help in advance.
/data/media
Sorry
The media dir is blank. I used the command as ADB push ROM.zip /sdcard
thenighthawk said:
Sorry
The media dir is blank. I used the command as ADB push ROM.zip /sdcard
Click to expand...
Click to collapse
Use
adb rom.zip /sdcard/
Sent from my Nexus 5 using XDA Free mobile app
thenighthawk said:
Sorry
The media dir is blank. I used the command as ADB push ROM.zip /sdcard
Click to expand...
Click to collapse
It isn't blank. You're just using a file explorer without permissions to view it.
If you used CWM recovery when you adb pushed, its as already state by @Aerowinder... . In /data/media because CWM recovery still mounts /sdcard as /data/media instead of what android 4.2+ mounts it as which is /data/media/0
Sent from my Nexus 5 using Tapatalk
rootSU said:
It isn't blank. You're just using a file explorer without permissions to view it.
If you used CWM recovery when you adb pushed, its as already state by @Aerowinder... . In /data/media because CWM recovery still mounts /sdcard as /data/media instead of what android 4.2+ mounts it as which is /data/media/0
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
I used TWRP v2.6.3
I will look in TWRP Mount settings if I can configure the permissions.
thenighthawk said:
I used TWRP v2.6.3
I will look in TWRP Mount settings if I can configure the permissions.
Click to expand...
Click to collapse
What permissions?
Sent from my Nexus 5 using Tapatalk
You're right. There are no permissions to configure in TWRP file explorer.
Should I switch to CWM?
Just boot into android and use a proper file explorer with root access.
Or you can use adb and Linux command line to
mount /data
ls /data/media
To see if the file is there.
Also I know with Philz recovery when you formatted /sdcard, the 0 folder from /data/media/0 was gone leaving only /data/media (until a commit was made to recreate 0) so its possible TWRP does the same making /sdcard temporarily mount to /data/media
Anyway not sure where it is if its not there
No don't change to CWM
Sent from my Nexus 5 using Tapatalk
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.
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.