Can't push files via ADB - Nexus 5 Q&A, Help & Troubleshooting

Hi so I recently flashed a rom and I didnt realize that the file was broken(wiped the device before of course) so when it gave me the error message flashing it I just rebooted and it went back to the previous rom. But I cant access the sd card anymore, so i cant download stuff, put files on it etc.(I guess its because of the dirty flash). Problem though is that I also can't push files via adb. Gives me this error message(when I give the adb command 'adb push C:\cm12.zip sdcard'): failed to copy 'C:\cm12.zip' to 'sdcard': Is a directory. I also sometimes get the Read-only file system error message
What am I doing wrong?

Wrong command syntax.
Correct syntax would be:
Code:
adb push C:\cm12.zip /sdcard/

Timoooo said:
Hi so I recently flashed a rom and I didnt realize that the file was broken(wiped the device before of course) so when it gave me the error message flashing it I just rebooted and it went back to the previous rom. But I cant access the sd card anymore, so i cant download stuff, put files on it etc.(I guess its because of the dirty flash). Problem though is that I also can't push files via adb. Gives me this error message(when I give the adb command 'adb push C:\cm12.zip sdcard'): failed to copy 'C:\cm12.zip' to 'sdcard': Is a directory. I also sometimes get the Read-only file system error message
What am I doing wrong?
Click to expand...
Click to collapse
Maybe you must first flash userdata.img and then use correct syntax as @beekay201 wrote it.

beekay201 said:
Wrong command syntax.
Correct syntax would be:
Code:
adb push C:\cm12.zip /sdcard/
Click to expand...
Click to collapse
This what I got:
Code:
failed to copy 'C:\cm12.zip' to '/sdcard//cm12.zip': Permission denied
zagorteney said:
Maybe you must first flash userdata.img and then use correct syntax as @beekay201 wrote it.
Click to expand...
Click to collapse
Where do I find that?

Timoooo said:
This what I got:
Code:
failed to copy 'C:\cm12.zip' to '/sdcard//cm12.zip': Permission denied
Where do I find that?
Click to expand...
Click to collapse
Code:
adb push C:\cm12.zip /sdcard/cm12.zip

Timoooo said:
Where do I find that?
Click to expand...
Click to collapse
Userdata.img is a part of a factory image. If you wiped also internal storage in TWRP (BTW-make it sure that it is for hammerhead) and you can't see you sd card and adb won't recognize it, flashing userdata.img will fix this.

zagorteney said:
Userdata.img is a part of a factory image. If you wiped also internal storage in TWRP (BTW-make it sure that it is for hammerhead) and you can't see you sd card and adb won't recognize it, flashing userdata.img will fix this.
Click to expand...
Click to collapse
but that wipes everything doesnt it?
beekay201 said:
Code:
adb push C:\cm12.zip /sdcard/cm12.zip
Click to expand...
Click to collapse
still permission denied

@Timoooo
Do you use encryption?

zagorteney said:
@Timoooo
Do you use encryption?
Click to expand...
Click to collapse
Don't think so lol

Timoooo said:
Don't think so lol
Click to expand...
Click to collapse
Recovery you use?

so... get the userdata.img put it on the same directory as fastboot/adb.exe and
"adb reboot bootloader"
then "fastboot devices" (just to make sure u have it)
then "fastboot flash userdata userdata.img"
when that succeeds... "fastboot erase cache" and then boot into recovery or even into system.

Timoooo said:
but that wipes everything doesnt it?
still permission denied
Click to expand...
Click to collapse
If you run 'adb devices', do you see your device's sn? Instead of pushing to /sdcard/, try pushing to /data/media/0 (iirc)

bitdomo said:
Recovery you use?
Click to expand...
Click to collapse
Twrp

beekay201 said:
If you run 'adb devices', do you see your device's sn? Instead of pushing to /sdcard/, try pushing to /data/media/0 (iirc)
Click to expand...
Click to collapse
I'll try that when I get home later. Yeah the device is listed in adb mode

beekay201 said:
If you run 'adb devices', do you see your device's sn? Instead of pushing to /sdcard/, try pushing to /data/media/0 (iirc)
Click to expand...
Click to collapse
same as before :/ permission denied
androidcues said:
so... get the userdata.img put it on the same directory as fastboot/adb.exe and
"adb reboot bootloader"
then "fastboot devices" (just to make sure u have it)
then "fastboot flash userdata userdata.img"
when that succeeds... "fastboot erase cache" and then boot into recovery or even into system.
Click to expand...
Click to collapse
doesn't that erase everything though?!

I wonder if fix permissions in twrp would work. Just trying to avoid flashing userdata.

beekay201 said:
I wonder if fix permissions in twrp would work. Just trying to avoid flashing userdata.
Click to expand...
Click to collapse
now I'm stuck in a boot loop :/

Still can't boot up anybody got an idea?

If you are not afraid of losing anything just wipe all and flash a factory image. Seems you have few other options.

wangdaning said:
If you are not afraid of losing anything just wipe all and flash a factory image. Seems you have few other options.
Click to expand...
Click to collapse
This.

Related

NS4G Recovery Question

So I just rooted via Pete's instructions, I'm on CWM 3.1.0.1 or something but I see some people are on 4.x.x.x what should I be on? Rom manager only lists the 3.1.0.1 thanks in advance.
DigitalDementia said:
So I just rooted via Pete's instructions, I'm on CWM 3.1.0.1 or something but I see some people are on 4.x.x.x what should I be on? Rom manager only lists the 3.1.0.1 thanks in advance.
Click to expand...
Click to collapse
you should upgrade to the latest, 4.x.x.x.
Im not really finding a link to that CWM version, if I flash one of the kernels will it give me the newest recovery? I know that's how people did it on the fascinate.
Going into the nexus s developement thread and look for cwm 4.x.x.x section posted by j_r0dd. The latest should be 4.0.1.4. Grab that .img file and put it into your C:\AndroidSDK\tools folder or wherever you have it located.
1. Open cmd,
cd C:\whateveryounamedit\tools
2. Boot into bootloader
3. Plug in usb and type: fastboot devices, your devices # should pop up, sometimes if its blank its still connected.
4. Type: fastboot flash recovery nameofrecovery.img
I would give a link, but im on the app.
Sorry.
EDIT: oh and be sure you grab the one for ns4g devices.
Wow thanks for being so helpful! I'll do that ASAP.
Your welcome.
kijp15 said:
Going into the nexus s developement thread and look for cwm 4.x.x.x section posted by j_r0dd. The latest should be 4.0.1.4. Grab that .img file and put it into your C:\AndroidSDK\tools folder or wherever you have it located.
1. Open cmd,
cd C:\whateveryounamedit\tools
2. Boot into bootloader
3. Plug in usb and type: fastboot devices, your devices # should pop up, sometimes if its blank its still connected.
4. Type: fastboot flash recovery nameofrecovery.img
I would give a link, but im on the app.
Sorry.
EDIT: oh and be sure you grab the one for ns4g devices.
Click to expand...
Click to collapse
adb doesn't seem to recognize fastboot as a command? I'm in the bootloader though.
Anyone have a zip of the cwm 4.x.x.x recovery?
Did you install android sdk on your computer? If not, you should do that before you proceed.
EDIT: or did you put adb to your path on your computer
I'm on W7 so I just went to platform-tools and typed cmd in the address bar. However fastboot isn't in platform-tools?
So I went to tools but got another error trying to flash.
Sorry for all the questions I've never had to use fastboot.
Or just put the .img file on the root of your sdcard.
Open terminal
type flash_image recovery /sdcard/nameofrecovery.img
Download android terminal
su
flash_image recovery /sdcard/nameofrecovery.img
Hit enter, it should now read the .img file
After that type reboot recovery to check it. Hope this helps.
kijp15 said:
Download android terminal
su
flash_image recovery /sdcard/nameofrecovery.img
Click to expand...
Click to collapse
If it says no image found?
DigitalDementia said:
If it says no image found?
Click to expand...
Click to collapse
Are you doing correctly?
I've done it a tons of time and it never gave me that msg.
When downloaded it, did it say .txt at the end, if it did change it from
.txt to .img.
And try again.
Positive. I renamed it cwm4.img for ease of use and I type:
su
flash_image recovery /sdcard/cwm4.img
Then it says flash_image: not found
kijp15 said:
When downloaded it, did it say .txt at the end, if it did change it from
.txt to .img.
And try again.
Click to expand...
Click to collapse
Still an image file.
Is your img file in any folders?
If it is your doing something wrong that I don't know about. Ha. If it is take out and out it on the root of your sdcard.
I've just flashed a img wit this same exact process and it went threw.
kijp15 said:
Is your img file in any folders?
If it is your doing something wrong that I don't know about. Ha. If it is take out and out it on the root of your sdcard.
I've just flashed a img wit this same exact process and it went threw.
Click to expand...
Click to collapse
Ugh... frustrating! It's not in a folder, it's right on the root mocking me. Okay just so I know I'm doing it right I do it like this:
su
flash_image recovery /sdcard/cwm4.img
Right? With the spaces between recovery and /sdcard/ ?
Hmmm... that is right.. is your terminal a black or blue background?
If its black your have the wrong terminal.

[Q] Stuck in TWRP 2.1.1 with no Sideloader

Hi All,
I wanted to change the stock ROM on my tf700t so I downgraded to V10.6.1.14.8 from V10.6.1.14.10 installed unlocker and installed GooManager. Now when GooManager went to InstallOpenRecovery Script it got stuck on the 'download has started' screen. I looked for alternative options and found out that you could install via the ADT/SDK options using latest twrp.blob file. So I went to the twrp site and got latest blob file but rather stupidly they list the oldest at the top and the newest at the bottom?. So I ended up installing the 2.1.1 version using adb terminal via these instructions:
su
dd if=/sdcard/twrp.blob of=/dev/block/mmcblk0p4
Then reboot to complete installation.
Now I did this but I didn't put the Roms that I wanted into the default SD Card first and this version of TWRP doesn't support microSD or ADB Sideload. It now just keeps rebooting into TWRP and when I connect to PC in TWRP the PC just recognizes the driver as Transformer but none of the ASUS drivers work. I have no idea where to go from here, backup doesn't seem to work....?
I've been looking around but seems perhaps I've hit a unique issue.
Any help on how I can progress from here to get the latest version of TWRP or indeed any decent ROM - I was originally going for cm-10.2-20131112-NIGHTLY-tf700t.zip and googleapps.
Help would be most appreciated.
Thanks,
Kavster
also worth mentioning i did a wipe data via the switch on with volume down and the 3rd icon of wipe as I was following this guide - cannot get boot recovery now just boots into TWRP...
android.sc/update-asus-transformer-pad-tf700t-to-cm-10-2-android-4-3-jelly-bean-rom
am I screwed..???
Kavster76 said:
also worth mentioning i did a wipe data via the switch on with volume down and the 3rd icon of wipe as I was following this guide
Click to expand...
Click to collapse
This option causes the bootloader to force starting the recovery until the wipe is done. The problem: The ancient recovery that you flashed cannot access the eMMC due to bootloader incompatibilities.
So your only chance to unbrick now is to get adb shell access working, then try "adb reboot bootloader" and see if you can get back to the bootloader menu. Then choose Android and run the following in Terminal or via adb shell:
Code:
su
dd if=/dev/zero of=/dev/block/mmcblk0p3 bs=32 count=1
The problem is that the TF700T is only recognized just as 'transformer' in Windows 7 device manager and I don't have a driver that will allow me to see the device via adb. Any ideas on how I can get the right driver so that I can see it again in the adb devices:
C:\Users\Kavster\Documents\adt-bundle-windows-x86-20131030\sdk\platform-tools>adb devices
List of devices attached
C:\Users\Kavster\Documents\adt-bundle-windows-x86-20131030\sdk\platform-tools>
Then I can the adb shell.....
Thanks.
Kavster76 said:
The problem is that the TF700T is only recognized just as 'transformer' in Windows 7 device manager and I don't have a driver that will allow me to see the device via adb. Any ideas on how I can get the right driver so that I can see it again in the adb devices:
C:\Users\Kavster\Documents\adt-bundle-windows-x86-20131030\sdk\platform-tools>adb devices
List of devices attached
C:\Users\Kavster\Documents\adt-bundle-windows-x86-20131030\sdk\platform-tools>
Then I can the adb shell.....
Thanks.
Click to expand...
Click to collapse
Have you tried the Universal Naked Drivers?
http://forum.xda-developers.com/showthread.php?t=1426502
flumpster said:
Have you tried the Universal Naked Drivers?
http://forum.xda-developers.com/showthread.php?t=1426502
Click to expand...
Click to collapse
Yes the Naked Drivers worked and device is now recognised. But it wont boot back into bootloader using the "adb reboot bootloader". It reboots but goes back to TWRP so how can I rebuild the bootloader from here.? Can I also install new version of TWRP..??
Cheers...
Kavster76 said:
Yes the Naked Drivers worked and device is now recognised. But it wont boot back into bootloader using the "adb reboot bootloader". It reboots but goes back to TWRP so how can I rebuild the bootloader from here.?
Click to expand...
Click to collapse
Hmmm, OK, try this:
Download and extract this to your computer:
http://forum.xda-developers.com/attachment.php?attachmentid=1985941&d=1369339132
then run:
Code:
adb push bootit.ko /
adb shell insmod /bootit.ko
If you are lucky, this reboots into the bootloader menu from which you can use fastboot to flash a working recovery. At least it helped this user: http://forum.xda-developers.com/showthread.php?t=2291974
_that said:
Hmmm, OK, try this:
Download and extract this to your computer:
http://forum.xda-developers.com/attachment.php?attachmentid=1985941&d=1369339132
then run:
Code:
adb push bootit.ko /
adb shell insmod /bootit.ko
If you are lucky, this reboots into the bootloader menu from which you can use fastboot to flash a working recovery. At least it helped this user: http://forum.xda-developers.com/showthread.php?t=2291974
Click to expand...
Click to collapse
Excellent stuff !!!! - that worked I now am back to the original bootloader screen. Now I have RCK / ANDROID / WIPE-DATA what should I now do to get the stock rom (I'm too nervous now)..?
Kavster76 said:
Excellent stuff !!!! - that worked I now am back to the original bootloader screen. Now I have RCK / ANDROID / WIPE-DATA what should I now do to get the stock rom (I'm too nervous now)..?
Click to expand...
Click to collapse
I'd use fastboot to flash a proper version of TWRP now.
OK So clicking Android has taken me back to 4.2.1. Think I'll do some more reading before messing about with it again - Thanks for all your help - Much Appreciated !!!!!
Trying to get back to the latest TWRP I have renamed openrecovery-twrp-2.6.3.1-tf700t.blob to twrp.blob I then put it in /sdcard root copied it over and ran the following:
C:\Users\Kavster\Documents\adt-bundle-windows-x86-20131030\sdk\platform-tools>adb shell
[email protected]:/ $ su
su
[email protected]:/ # dd if=/sdcard/twrp.blob of=/dev/block/mmcblk0p4
dd if=/sdcard/twrp.blob of=/dev/block/mmcblk0p4
12212+1 records in
12212+1 records out
6252648 bytes transferred in 3.658 secs (1709307 bytes/sec)
[email protected]:/ #
everytime I reboot it is still in 2.1.1 TWRP and not the 2.6.3.1 version..?
and I have to run bootit.ko to get back again.
Kavster76 said:
everytime I reboot it is still in 2.1.1 TWRP and not the 2.6.3.1 version..?
and I have to run bootit.ko to get back again.
Click to expand...
Click to collapse
You have to clean the misc partition (mmcblk0p3) before the bootloader will cooperate again, see my previous answer.
_that said:
You have to clean the misc partition (mmcblk0p3) before the bootloader will cooperate again, see my previous answer.
Click to expand...
Click to collapse
Meaning he has to flash TWRP in fastboot not in adb shell - correct?
If yes - how is it different?
So I did the following - copied openrecovery-twrp-2.6.3.1-tf700t.blob to twrp.blob and then put it in same directory as fastboot.exe but still same issue after reboot - still on twrp 2.2.1:
C:\Users\Kavster\Documents\adt-bundle-windows-x86-20131030\sdk\platform-tools>fastboot -i 0x0B05 flash recovery twrp.blob
sending 'recovery' (6106 KB)...
OKAY [ 2.605s]
writing 'recovery'...
OKAY [ 1.482s]
finished. total time: 4.087s
C:\Users\Kavster\Documents\adt-bundle-windows-x86-20131030\sdk\platform-tools>
Surely that should of worked..?
Kavster76 said:
So I did the following - copied openrecovery-twrp-2.6.3.1-tf700t.blob to twrp.blob and then put it in same directory as fastboot.exe but still same issue after reboot - still on twrp 2.2.1
Click to expand...
Click to collapse
You have to clean the misc partition (mmcblk0p3) before the bootloader will cooperate again, see my previous answer. In post #3.
_that said:
You have to clean the misc partition (mmcblk0p3) before the bootloader will cooperate again, see my previous answer. In post #3.
Click to expand...
Click to collapse
OK Cheers (sorry wasn't sure what post you were on about), all sorted now phew...
Backing up system now and I'm ready to install latest CyanogenMod...
_that said:
run the following in Terminal or via adb shell:
Code:
su
dd if=/dev/zero of=/dev/block/mmcblk0p3 bs=32 count=1
Click to expand...
Click to collapse
Just out of curiosity: Is this command equivalent to
Code:
fastboot erase misc
to wipe the misc partition?
Thanks!
berndblb said:
Just out of curiosity: Is this command equivalent to
Code:
fastboot erase misc
to wipe the misc partition?
Click to expand...
Click to collapse
In theory, yes. However, when asking the bootloader for supported partitions (fastboot getvar all), "misc" is not among them, so I don't know if it really works.
Latest CyanogenMod all installed and looking good....
Thanks for all the help (I have added thanks) !!!
Kavster.
about qoute #8
hi friend.I have this problem too but my phone is samsung i9001.as you said,I downloaded the file and extracted it and then conected my phone to the pc and went to this path {start*accessories*command prompt} and entered the command "adb push bootit.ko" ,but responsed " adb is not recognised as an internal or external command, operable program or batch file" . I m too unhappy now,because my phone just boot to TWRP and like Kavster I have used TWRP 2.2.1 without adb sideload option.please help to rescue my phone.tanks dear friend

stuck in twrp

I deleted my rom file while doing a wipe. adb sees the device, so I ran from cmd and cd'd into the platform tools directory. Then ran:
Code:
C:\Users\Administrator\Desktop\android-sdk-windows\platform-tools> adb push ROM.zip
But when I run that, I get the man pages or error:closed
At least it's good that adb sees my device after running adb devices. Is there something wrong with the way I'm trying to push the rom over?
You need to tell it what to push it. \sdcard\download. Or something along those lines
Sorry, you need to use / not \
Sent from my Nexus 5 using XDA Free mobile app
jd1639 said:
You need to tell it what to push it. \sdcard\download. Or something along those lines
Sorry, you need to use / not \
Sent from my Nexus 5 using XDA Free mobile app
Click to expand...
Click to collapse
I'm trying eveything I can think of, but still nothing. So close.
When I run adb status-window I get:
<-[2J<-[2HAndroid Debug Bridge
State: sideload
did you try adb push ROM.zip /sdcard/ROM.zip but changing the name ROM.zip to whatever the exact name of your file is?
goofball2k said:
did you try adb push ROM.zip /sdcard/ROM.zip but changing the name ROM.zip to whatever the exact name of your file is?
Click to expand...
Click to collapse
I just tried that, and got:
error:closed
Ran the original command with sideload:
C:\Users\Administrator\Desktop\android-sdk-windows\platform-tools> adb sideload ROM.zip
and got:
* failed to write data 'protocol fault <no status>' * 1%
If all else fails, just flash stock, reroot and start fresh.
Return to Stock
OK, I got it done. I rebooted the phone back into recovery mode, and ran the original command which finally worked. I got a new rom installed successfully! Thanks for the help guys, all is well, and lesson learned.
wolfen69 said:
I'm trying eveything I can think of, but still nothing. So close.
When I run adb status-window I get:
Sorry didnt noticed that you tried
Click to expand...
Click to collapse

Is there a way to delete/uninstall an APK and its data from fastboot?

so i went into FKU franco kernel updater and changed my CPU max speed from 1500 back to the default but did not change my voltage settings back to default. now the device is softbrocked and just boots to the google nexus splash screen
I have tried flashing:
system.img
boot.img
bootloader.img
stock 4.4.4 kernel
yet regardless of flashing the above the device still is softbricked and wont get past the nexus google logo.
the only thing i have not flashed over is my user data and thats because i dont want to lose my pictures and video of my little boy that i didn't get to back up yet due to my dropbox just hitting its limit.
Im hoping I can remove the franco updater app and its user data and boot but maybe thats not possible?
Thanks for any and all help!
nextelbuddy said:
so i went into FKU franco kernel updater and changed my CPU max speed from 1500 back to the default but did not change my voltage settings back to default. now the device is softbrocked and just boots to the google nexus splash screen
I have tried flashing:
system.img
boot.img
bootloader.img
stock 4.4.4 kernel
yet regardless of flashing the above the device still is softbricked and wont get past the nexus google logo.
the only thing i have not flashed over is my user data and thats because i dont want to lose my pictures and video of my little boy that i didn't get to back up yet due to my dropbox just hitting its limit.
Im hoping I can remove the franco updater app and its user data and boot but maybe thats not possible?
Thanks for any and all help!
Click to expand...
Click to collapse
Do you have a custom recovery? If so, use adb while in recovery to pull your files. If not, then flash one then pull them.
Not sure why you mentioned "boot.img" then "stock 4.4.4 kernel", boot.img = the kernel lol
Don't know why your device won't boot even after flashing stock boot.img, but if you use TWRP you can use the file manager to delete the .apk/other files.
Lethargy said:
Do you have a custom recovery? If so, use adb while in recovery to pull your files. If not, then flash one then pull them.
Not sure why you mentioned "boot.img" then "stock 4.4.4 kernel", boot.img = the kernel lol
Don't know why your device won't boot even after flashing stock boot.img, but if you use TWRP you can use the file manager to delete the .apk/other files.
Click to expand...
Click to collapse
thanks, i deleted the franco files and still cant boot.
i want top pull files but it looks like I need ADB and currently i can only get into fastboot mode.
(i'm using wugfresh toolkit, i know some say manual is the way to go but right now this is what I have to go on and have had no issues thus far with it)
i was using the button pull files in the tool kit but its not detecting the device since im in fastboot mode.
i swear I did a factory reset before and my photos were still present but many articles online say in 4.4 that a factory reset will wipe your photos.
nextelbuddy said:
thanks, i deleted the franco files and still cant boot.
i want top pull files but it looks like I need ADB and currently i can only get into fastboot mode.
(i'm using wugfresh toolkit, i know some say manual is the way to go but right now this is what I have to go on and have had no issues thus far with it)
i was using the button pull files in the tool kit but its not detecting the device since im in fastboot mode.
i swear I did a factory reset before and my photos were still present but many articles online say in 4.4 that a factory reset will wipe your photos.
Click to expand...
Click to collapse
Don't use toolkits. You say you've had no issues but you have and that issue is that you don't know how to use adb and fastboot
Click the link in my signature to get to the sticky roll -up thread. From there you will find my "adb and fastboot. What is it?" thread. Please read it. You'll have ALL the information you need to get your photos etc off your sdcard
Stock recovery - factory reset wipes sdcard
Custom recovery - factory reset preserves sdcard
Sent from my Nexus 5 using Tapatalk
rootSU said:
Don't use toolkits. You say you've had no issues but you have and that issue is that you don't know how to use adb and fastboot
Click the link in my signature to get to the sticky roll -up thread. From there you will find my "adb and fastboot. What is it?" thread. Please read it. You'll have ALL the information you need to get your photos etc off your sdcard
Stock recovery - factory reset wipes sdcard
Custom recovery - factory reset preserves sdcard
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Thanks,
since i can not boot, i am forced to use TWRP recovery and then go ingo CMD shell and ADB there however when I do ADB Devices i get the serial number showing its connected but then it says RECOVERY at the end.. much lke when you are in fastboot it says FASTBOOT at the end of the device.
i tried doing a pull using this:
adb shell
mount data
exit
adb pull data/media/0 c:\MyBackup
but when I do ADB Shell, the command prompt says this
~ # ←[6n
if t that prompt i type mount data then I get this:
mount data
mount: mounting /dev/block/mmcblk0p28 on /data failed: Device or resource busy
~ # ←[6n
im not sure how else to get to a working ADB to perform a proper pull if i cant boot into the device fully
nextelbuddy said:
Thanks,
since i can not boot, i am forced to use TWRP recovery and then go ingo CMD shell and ADB there however when I do ADB Devices i get the serial number showing its connected but then it says RECOVERY at the end.. much lke when you are in fastboot it says FASTBOOT at the end of the device.
i tried doing a pull using this:
adb shell
mount data
exit
adb pull data/media/0 c:\MyBackup
but when I do ADB Shell, the command prompt says this
~ # ←[6n
if t that prompt i type mount data then I get this:
mount data
mount: mounting /dev/block/mmcblk0p28 on /data failed: Device or resource busy
~ # ←[6n
im not sure how else to get to a working ADB to perform a proper pull if i cant boot into the device fully
Click to expand...
Click to collapse
It could say "device busy" if data is already mounted. Does twrp have a "mounts and storage" menu like CWM? Where you can mount data? If so, check if it is mounted there (would typicall say "unmount data" if it was mounted, otherwise it would say "mount data" if it is unbmounted)
nextelbuddy said:
Thanks,
since i can not boot, i am forced to use TWRP recovery and then go ingo CMD shell and ADB there however when I do ADB Devices i get the serial number showing its connected but then it says RECOVERY at the end.. much lke when you are in fastboot it says FASTBOOT at the end of the device.
i tried doing a pull using this:
adb shell
mount data
exit
adb pull data/media/0 c:\MyBackup
but when I do ADB Shell, the command prompt says this
~ # ←[6n
if t that prompt i type mount data then I get this:
mount data
mount: mounting /dev/block/mmcblk0p28 on /data failed: Device or resource busy
~ # ←[6n
im not sure how else to get to a working ADB to perform a proper pull if i cant boot into the device fully
Click to expand...
Click to collapse
ok so i went into TWRP and UNMOUNTED DATA
and then I went back in to cmd prompt and tried mount again and it worked i guess since theres no error. I typed EXIT and was brought back to normal windows command prompt. I then typed
adb pull data/media/0 C:\Users\srobertson\Desktop\Nexus 5 7-15-2014 DCIM
and when I hit enter it just shows a list of ADB commands as if it didnt recognize anything yet when I do ADB DEVICES it shows the device and ID
nextelbuddy said:
ok so i went into TWRP and UNMOUNTED DATA
and then I went back in to cmd prompt and tried mount again and it worked i guess since theres no error. I typed EXIT and was brought back to normal windows command prompt. I then typed
adb pull data/media/0 C:\Users\srobertson\Desktop\Nexus 5 7-15-2014 DCIM
and when I hit enter it just shows a list of ADB commands as if it didnt recognize anything yet when I do ADB DEVICES it shows the device and ID
Click to expand...
Click to collapse
If you're going to put spaces in your folder names, you'll have to enclose the entire path in "...
Example
adb pull data/media/0 "C:\Users\srobertson\Desktop\Nexus 5 7-15-2014 DCIM"
Best to avoid spaces though.
I'll put this in the guide, thanks.
rootSU said:
If you're going to put spaces in your folder names, you'll have to enclose the entire path in "...
Example
adb pull data/media/0 "C:\Users\srobertson\Desktop\Nexus 5 7-15-2014 DCIM"
Best to avoid spaces though.
I'll put this in the guide, thanks.
Click to expand...
Click to collapse
Thanks so much for your help
I ended up taking the leap and performing a Factory reset from TWRP and when I logged back into the phone I saw all my media was still present Whew.
just for posterity I went ahead and tried your code in ADB to make sure the quotes worked and it did so thank you very much and i will keep those notes handy for next time.

Help with relocking the bootloader, HAVE TA

Hi.
I am pretty new to the world of Sony and I want to relock my bootloader so I can get stock firmware from my region so it looks legit (Reselling)
I have taken a TA backup but I don't know how to flash it again. Tried TWRP with no luck and I also read som other threads around here that didn't make sense to me.
I am on Windows 10 and have the single SIM Xperia XZ.
https://forum.xda-developers.com/showpost.php?p=69972315&postcount=20
First push TA.img to the folder he mentions.
Do not flash TWRP.
Boot it. fastboot boot TWRP.img
After restoring your TA-Partition flash a stock ROM. If you reboot your phone before flashing stock it will bootloop.
DHGE said:
https://forum.xda-developers.com/showpost.php?p=69972315&postcount=20
First push TA.img to the folder he mentions.
Do not flash TWRP.
Boot it. fastboot boot TWRP.img
After restoring your TA-Partition flash a stock ROM. If you reboot your phone before flashing stock it will bootloop.
Click to expand...
Click to collapse
Okay. But the part I was wondering about is:
- Pushed TAbackup.img (I renamed it) to /data/local/tmp and verified md5sum is same as original backup. (Data/local/tmp - Is this on the phone? How?)
KazuhiraDokky said:
Okay. But the part I was wondering about is:
- Pushed TAbackup.img (I renamed it) to /data/local/tmp and verified md5sum is same as original backup. (Data/local/tmp - Is this on the phone? How?)
Click to expand...
Click to collapse
Follow this instruction, i was restored my TA successfully. Boot into TWRP and enter adb command
https://forum.xda-developers.com/showpost.php?p=70903982&postcount=256
THANK YOU!
Haha christ I see it now. Never noticed before I can push commands when it is in TWRP. Thank you so much. Been wondering about this for quite some time.
Would this also work ?
Flash stock ROM using Emma -> Temporally boot TWRP (fastboot boot TWRP.img) -> dd TA Partition ->reboot.
_mow_ said:
Would this also work ?
Flash stock ROM using Emma -> Temporally boot TWRP (fastboot boot TWRP.img) -> dd TA Partition ->reboot.
Click to expand...
Click to collapse
Have not used emma personally...
But: yes, as I wrote above for Flashtool.
Thank you for your answer.
I was just wondering if there is any particular reason for first restoring TA and then flashing the Stock ROM.
flashing ROM first is safer
I just posted the link where I read about the first sucsessful restore.
It is less dangerous (no potential boot loop) to flash the ROM first and then restore the TA partition.
The only thing you have to remember that way is to enable adb (developer options) and only boot into recovery and not flash it.
Flashing Stock first with Emma worked for me. However on the first boot-up I was asked to enter my password (i didn't set a password) so I had to enter 30 random Passwords until the Phone resets itself. But now everything seems to work.
Thank you.
_mow_ said:
Flashing Stock first with Emma worked for me. However on the first boot-up I was asked to enter my password (i didn't set a password) so I had to enter 30 random Passwords until the Phone resets itself. But now everything seems to work.
Thank you.
Click to expand...
Click to collapse
For me, i flashed rom with flashtool, i checked wipe all (apps_log, userdata, ssd,....). On first boot-up it doesn't ask me for the password .
rain_effect said:
Follow this instruction, i was restored my TA successfully. Boot into TWRP and enter adb command
https://forum.xda-developers.com/showpost.php?p=70903982&postcount=256
Click to expand...
Click to collapse
I tried this but it's not working. I backed up the TA img and cant restore it. I am in twrp recovery mode and did the adb devices to check if it showed up and it does. It's when I put the command "adb push TAbackup.img /data/local/tmp/TAbackup.img" it gives me an error saying "adb: error: cannot stat 'TAbackup.img': No such file or directory". I installed the minimal and fastboot drivers under C drive. I moved the backup up TA img to this folder and running the adb commands from this folder. It keeps on failing regardless. Please can anyone help me with this?
You need to change tabackup.img with the Real file name of your ta Backup
Bitti09 said:
You need to change tabackup.img with the Real file name of your ta Backup
Click to expand...
Click to collapse
so I shouldn't rename it ? All the guides say to rename it. I don't remember the original name of my backup since I renamed it to TAbackup.img
breakwaterr said:
so I shouldn't rename it ? All the guides say to rename it. I don't remember the original name of my backup since I renamed it to TAbackup.img
Click to expand...
Click to collapse
then
adb push TAbackup.img /data/local/tmp/TAbackup.img
and
adb shell dd if=/data/local/tmp/TAbackup.img of=/dev/block/bootdevice/by-name/TA
should work if you renamed the backup to TAbackup.img
Bitti09 said:
then
adb push TAbackup.img /data/local/tmp/TAbackup.img
and
adb shell dd if=/data/local/tmp/TAbackup.img of=/dev/block/bootdevice/by-name/TA
should work if you renamed the backup to TAbackup.img
Click to expand...
Click to collapse
I already renamed it to TAbackup.img and it doesn't work. it says no directory file error
breakwaterr said:
I already renamed it to TAbackup.img and it doesn't work. it says no directory file error
Click to expand...
Click to collapse
are you doing the commands in same folder as the TAbackup file is ?
If you use Windows its possible that windows is hiding the file extension so that you've possible renamed the file to TAbackup.img.img which is shown as TAbackup.img
Bitti09 said:
are you doing the commands in same folder as the TAbackup file is ?
If you use Windows its possible that windows is hiding the file extension so that you've possible renamed the file to TAbackup.img.img which is shown as TAbackup.img
Click to expand...
Click to collapse
OMG thank you so much man. renaming the file to only TAbackup worked. THANK YOU SO MUCH!!

Categories

Resources