[Q] Disabling ART from ADB or otherwise - Nexus 5 Q&A, Help & Troubleshooting

Fairly straightforward question. Is it possible to disable ART and re-enable Dalvik other than via the settings dialog, either via ADB, some sort of flashable zip or from a recovery?
I ask for two reasons. Firstly, when I flashed an experimental 4.4 build on my Galaxy Nexus, I made the mistake of enabling ART. When I restarted, because I'd stupidly flashed an incompatible gapps package, apps would force close so frequently that the constant notifications made it extremely difficult to get into the settings and turn it off again.
Secondly, I just saw a thread on Reddit where somebody was claiming that their Nexus 5 went into a bootloop after enabling ART, and they had to do a wipe to fix it.
So it seems to me it would be quite helpful to be able to disable or enable ART without having to be able to boot.

If you've found a way to fix this, I would love to know. I just turned ART on after installing a new rom, and I'm stuck in a boot loop without a recent backup.

+1
I've enabled ART on my Nexus 4 without issue. Stock ROM.
Enabling it on my 2013 Nexus 7 caused it not to boot past the boot animation anymore.

Just reflash the ROM from recovery. Wipe system and flash. Done. Dalvik will be enabled again. If your not rooted that's another matter but the OP seems to be.

theesotericone said:
Just reflash the ROM from recovery. Wipe system and flash. Done. Dalvik will be enabled again. If your not rooted that's another matter but the OP seems to be.
Click to expand...
Click to collapse
I figured flashing wiping would do it but wasn't willing to wipe if there's an easier solution.
In my case it was Xposed. I flashed the disable zip and that did it. Guess I didn't reboot fully after disabling it from in the ROM.

He said wipe system, not data. It is possible to wipe the system information and leave your data intact.

MisterEff said:
He said wipe system, not data. It is possible to wipe the system information and leave your data intact.
Click to expand...
Click to collapse
Ah yes. I mistook system as data..

I don't know if it allow to switch runtime, but it helps me to avoid bootloop after ota 4.4.2 on my Nexus 5.
To check current library
adb shell getprop persist.sys.dalvik.vm.lib
To set art one
adb shell setprop persist.sys.dalvik.vm.lib libart.so

(IRoN) said:
I don't know if it allow to switch runtime, but it helps me to avoid bootloop after ota 4.4.2 on my Nexus 5.
To check current library
adb shell getprop persist.sys.dalvik.vm.lib
To set art one
adb shell setprop persist.sys.dalvik.vm.lib libart.so
Click to expand...
Click to collapse
adb pull /data/property/persist.sys.dalvik.vm.lib
open the file and replace the "libart.so" with "libdvm.so" (no quotes)
adb push persist.sys.dalvik.vm.lib /data/property/
Reboot and smile

twistedumbrella said:
adb pull /data/property/persist.sys.dalvik.vm.lib
open the file and replace the "libart.so" with "libdvm.so" (no quotes)
adb push persist.sys.dalvik.vm.lib /data/property/
Reboot and smile
Click to expand...
Click to collapse
THANK YOU!!!! It worked for me

twistedumbrella said:
adb pull /data/property/persist.sys.dalvik.vm.lib
open the file and replace the "libart.so" with "libdvm.so" (no quotes)
adb push persist.sys.dalvik.vm.lib /data/property/
Reboot and smile
Click to expand...
Click to collapse
Thanx, it worked for me

twistedumbrella said:
adb pull /data/property/persist.sys.dalvik.vm.lib
open the file and replace the "libart.so" with "libdvm.so" (no quotes)
adb push persist.sys.dalvik.vm.lib /data/property/
Reboot and smile
Click to expand...
Click to collapse
It worked for me too, and I don't even use Nexus device, And done it from adb but in recovery mode with properly mounted partitions.
Thx again.

Boot into Recovery and Fix Permissions has fixed this for me (Galaxy Nexus)
EDIT: Apparently that switches it back to dalvik?!?

twistedumbrella said:
adb pull /data/property/persist.sys.dalvik.vm.lib
open the file and replace the "libart.so" with "libdvm.so" (no quotes)
adb push persist.sys.dalvik.vm.lib /data/property/
Reboot and smile
Click to expand...
Click to collapse
Thanks, this help save my day !

Saved my day too! HTCONE on Viper and I was able to use twrp and a USB otg drive. Thanks!
Sent from my HTCONE using Tapatalk

Quicker way to switch back to Dalvik
My phone was stuck in a bootloop because I did not have enough free space to switch to ART, making my device crash on boot. For a quick way to switch back to Dalvik, see below.
Boot into recovery ('adb reboot recovery' if possible), then mount /data and run this command:
Code:
adb shell "echo libdvm.so > /data/property/persist.sys.dalvik.vm.lib"
adb reboot
It will now be in Dalvik. Enjoy

Related

Does anyone have the proper file to get QuickBoot working?

I know you had to push a reboot file to get it working on some Hero ROMs. What about the EVO version?
The Hero way works.
FIRST, install Quickboot from the market. Run it and enable it in the superuser permissions screen.
Download the reboot.txt file I attached and rename it to "reboot" (take off the ".txt"). Move it to where ever your "android-sdk-windows/tools" folder is.
Connect your phone to your computer (make sure it is "charge only") and boot into recovery...
Code:
adb shell
reboot recovery
Start your "Windows-recovery.bat" (if using windows) and let it do it's thing in the CMD prompt. Keep that prompt open.
In a CMD prompt OTHER THAN the one opened by recovery.bat type...
Code:
adb shell
mount /dev/block/mtdblock4 /system
exit
This will keep your system mounted but get you out of shell. Now type...
Code:
adb push reboot /system/bin
adb shell
cd /system/bin/
chmod 755 reboot
reboot
Once you're back up, run Quickboot and choose either reboot or recovery (both will now work). It takes about 5 seconds to start rebooting but it does work.
What does this do? does it make recovery stick?
watzone69 said:
The Hero way works.
Download the reboot.txt file I attached and rename it to "reboot".
Once you're in recovery...
Code:
adb push reboot /system/bin
adb shell
cd /system/bin/
chmod 755 reboot
reboot
EDIT: It takes about 5 seconds to start rebooting but it does work.
Click to expand...
Click to collapse
Woo! Thanks!
Edit: Didn't seem to work for me. Damn.
joeavery2 said:
What does this do? does it make recovery stick?
Click to expand...
Click to collapse
No, this just lets you use the QuickBoot app from the Market to reboot your phone.
TheBiles said:
Didn't seem to work for me. Damn.
Click to expand...
Click to collapse
Code:
adb shell
cd /system/bin/
ls
See if the reboot file actually got pushed to the directory. If so, try this:
Code:
chmod 755 /system/bin/reboot
The only other thing I can think of is that I installed Quickboot BEFORE doing all of this. Did you get the SU permission screen when you tried to run it?
Any luck??
Did I mention that the Quickboot "recovery" button works also? Much easier than opening a shell and typing it in.
Of course you still have to run the recovery.bat to get the custom recovery but at least it's one less step.
Still no dice. I also already had QuickBoot installed and granted it root permission prior to pushing the reboot file.
any update to this?
thanks
joey3002 said:
any update to this?
thanks
Click to expand...
Click to collapse
It doesn't work for you?
I updated my earlier post to give more instructions for getting into recovery and pushing the "reboot" file. I hope it helps!
I have a ROM ready to go that changes a couple icons and quickboot works with no probelm. Wifi tether is the only thing I don't have working. I can post it if you would like. I also removed sprint apps and some widgets
I made an update zip that got Quickboot working for me. This is using watzone69's reboot file.
Run from Toast's recovery. http://forum.xda-developers.com/showthread.php?t=690762
watzone69 said:
It doesn't work for you?
Click to expand...
Click to collapse
yes i got it working last night by reading this thread from top to bottom.. then repeated.. thanks

[Q] ClockworkModRecovery (Only wants to wipe data) [SOLVED - Read / Scroll Down]

Ok, so i have a fresh new stock of 21e flashed onto my phone. Rooted with no errors, and I have Clockwork ROM Manager installed.
If I use the app to boot into recovery my phone just automatically Wipes all data then loads back up as if a fresh install was done, so I thought I would check the problem out myself (Power and vol.down), and the only options I have in the Clockwork Boot Menu are as follows:
Android system recovery <3e>
Confirm wipe of all user data?
THIS CAN NOT BE UNDONE.
No
No
No
No
No
No
No
Yes -- delete all user data
No
No
No
Click to expand...
Click to collapse
If I go back one page the only options I have are as follows:
Android system recovery <3e>
Android system recovery utility
reboot system now
wipe data/factory reset
wipe cache partition
wipe cache partition and package recovery
wipe nv dynamic partition
Click to expand...
Click to collapse
I can not go back any further, they are my only options in boot recovery of which I find extremely odd. (Until this is sorted I can not install a new ROM/Kernel and fix my network)
Any help would be much appreciated.
Kind Regards.
Loopy Frog said:
Ok, so i have a fresh new stock of 21e flashed onto my phone. Rooted with no errors, and I have Clockwork ROM Manager installed.
If I use the app to boot into recovery my phone just automatically Wipes all data then loads back up as if a fresh install was done, so I thought I would check the problem out myself, and the only options I have in the Clockwork Boot Menu are as follows:
If I go back one page the only options I have are as follows:
I can not go back any further, they are my only options in boot recovery of which I find extremely odd. (Until this is sorted I can not install a new ROM/Kernel and fix my network)
Any help would be much appreciated.
Kind Regards.
Click to expand...
Click to collapse
That's not ClockworkMod.
That's the stock Android recovery.
ah lol (embarrassing)
Thanks though... ok so it seems that my problem is that the copious amount of things that I try to install clockwork boot, it just wont happen. Any ideas?
Regards
Loopy Frog said:
ah lol (embarrassing)
Thanks though... ok so it seems that my problem is that the copious amount of things that I try to install clockwork boot, it just wont happen. Any ideas?
I am just about to see if I can do something with the LGDP2 V36 UMTS.
Regards
Click to expand...
Click to collapse
You can flash ClockworkMod Recovery with this.
[GUIDES/TOOLS]Making Developing/Flashing/Returning to Stock Easier
The Dark Lestat said:
1. Recovery Manager
This is a flashing tool that will let you install:
Stock Recovery
ClockworkMod Recovery
Touch ClockworkMod Recovery
Requirement:
You'll need to have the LG Thrill / Optimus 3D
You'll need to be rooted.
Superuser and SU have to be updated to the latest app and binary
Update Superuser in the market
Open Superuser app and go to the options
Scroll to the bottom and click "Su binary"
DOWNLOAD LINK: Recovery Manager - 18 MB
How To Use:
Extract the files with WinRar or 7zip
Launch "Recovery Manager.bat"
Make sure your phone is in "USB Debugging Mode" and is plugged in
Choose your option
Wait for the screen to refresh
Boot into recovery to verify it was flashed successfully
Click to expand...
Click to collapse
No Luck :-(
Did your guide word for word, all went successfully.
However.... I can use root applications on the device etc...
Though it appears I can no longer get the clockwork boot anymore?
Loopy Frog said:
No Luck :-(
Did your guide word for word, all went successfully.
However.... I can use root applications on the device etc...
Though it appears I can no longer get the clockwork boot anymore?
Click to expand...
Click to collapse
Try: 3d+volume down+power button
hold til 3 sec after seeing the logo.
Loopy Frog said:
No Luck :-(
Did your guide word for word, all went successfully.
However.... I can use root applications on the device etc...
Though it appears I can no longer get the clockwork boot anymore?
Click to expand...
Click to collapse
You can also use the ROM Manager app to boot into recovery.
p-vlad said:
Try: 3d+volume down+power button
hold til 3 sec after seeing the logo.
Click to expand...
Click to collapse
Nope doesn't work. >_<
The Dark Lestat said:
You can also use the ROM Manager app to boot into recovery.
Click to expand...
Click to collapse
Yeah that's what I was using when it used to work, however now when I do it, It just "deletes all user data". Obviously because it is not having any response from the Clockwork recovery boot, and goes straight into:
Android system recovery <3e>
Confirm wipe of all user data?
THIS CAN NOT BE UNDONE.
No
No
No
No
No
No
No
Yes -- delete all user data
No
No
No
Click to expand...
Click to collapse
I just don't understand why My boot wont change from android to the clockwork boot. >_<
Is it being flashed properly?
Try doing the flashing manually. Download the recovery image from www.clockworkmod.com/rommanager (choose touch for P920, nothing else), then open adb in cmd and type the following commands with phone plugged in:
adb push <image name>.img /data/local/tmp
adb shell su -c "dd if=/data/local/tmp/<image name>.img of=/dev/block/mmcblk0p6 bs=4096"
adb shell "rm /data/local/tmp/<image name>.img"
Replace <image name> with the filename of the img. If everything checks out, you should be able to boot into CWM. If you get errors, post them here
(I took the commands from The Dark Lestat's batch file, props go to him. I was too lazy to search for it Don't judge me, it's 12.30am here)
pandaball said:
Try doing the flashing manually. Download the recovery image from www.clockworkmod.com/rommanager (choose touch for P920, nothing else), then open adb in cmd and type the following commands with phone plugged in:
adb push <image name>.img /data/local/tmp
adb shell su -c "dd if=/data/local/tmp/<image name>.img of=/dev/block/mmcblk0p6 bs=4096"
adb shell "rm /data/local/tmp/<image name>.img"
Replace <image name> with the filename of the img. If everything checks out, you should be able to boot into CWM. If you get errors, post them here
Click to expand...
Click to collapse
Thanks Panda, I'll give it ago later when I have time, and let ya know how I go.
Loopy Frog said:
Thanks Panda, I'll give it ago later when I have time, and let ya know how I go.
Click to expand...
Click to collapse
Also, I'll update the scripts with a newer version, so that it's simplified.
Holy Sh*t .. .
dont use Rom Manager to boot into recovery.. there where so many bad reports about that app.. if you want to boot into recovery.. do this.. .
install Terminal Emulator..
type in ..
su (enter)
reboot recovery (enter)
your phone will boot into what recovery you have .. .
hope that helps!
JastaPein said:
Holy Sh*t .. .
dont use Rom Manager to boot into recovery.. there where so many bad reports about that app.. if you want to boot into recovery.. do this.. .
install Terminal Emulator..
type in ..
su (enter)
reboot recovery (enter)
your phone will boot into what recovery you have .. .
hope that helps!
Click to expand...
Click to collapse
It's not using ROM Manager to BOOT into recovery.
It's using ROM Manager to install ClockworkMod that was the issue.
Very weird indeed. I also have flashed yhe 21E rom from LG. Next I rooted the phone and installed CWM touch. I have no problems with it.
JastaPein said:
Holy Sh*t .. .
dont use Rom Manager to boot into recovery.. there where so many bad reports about that app.. if you want to boot into recovery.. do this.. .
install Terminal Emulator..
type in ..
su (enter)
reboot recovery (enter)
your phone will boot into what recovery you have .. .
hope that helps!
Click to expand...
Click to collapse
Thanks, either/or this doesn't matter at this stage, I need to able to boot into recover for this or even clockwork to do it anyway. I'll keep this in mind nonetheless.
pandaball said:
Is it being flashed properly?
Try doing the flashing manually. Download the recovery image from www.clockworkmod.com/rommanager (choose touch for P920, nothing else), then open adb in cmd and type the following commands with phone plugged in:
adb push <image name>.img /data/local/tmp
adb shell su -c "dd if=/data/local/tmp/<image name>.img of=/dev/block/mmcblk0p6 bs=4096"
adb shell "rm /data/local/tmp/<image name>.img"
Replace <image name> with the filename of the img. If everything checks out, you should be able to boot into CWM. If you get errors, post them here
(I took the commands from The Dark Lestat's batch file, props go to him. I was too lazy to search for it Don't judge me, it's 12.30am here)
Click to expand...
Click to collapse
All went well, expect for the last string, see below;
I renamed "recovery-clockwork-touch-5.8.1.5-p920" - "x"
C:\Users\Astro\ADB>adb push x.img /data/local/tmp
3204 KB/s (5995063 bytes in 1.827s)
C:\Users\Astro\ADB>adb shell su -c "dd if=/data/local/tmp/x.img of=/dev/block/mmcblk0p6 bs=4096"
1463+1 records in
1463+1 records out
5995063 bytes transferred in 0.992 secs (6043410 bytes/sec)
C:\Users\Astro\ADB>adb shell "rm/data/local/tmp/x.img"
rm failed for /data/local/tmp/x.img, No such file or directory
Click to expand...
Click to collapse
Loopy Frog said:
All went well, expect for the last string, see below;
I renamed "recovery-clockwork-touch-5.8.1.5-p920" - "x"
Click to expand...
Click to collapse
I'm about to upload a newer version of it. Let me know if it works.
Alright.
Here's the new Recovery Manager with updated scripts. It should be a lot cleaner now.
Recovery Manager
The Dark Lestat said:
Alright.
Here's the new Recovery Manager with updated scripts. It should be a lot cleaner now.
Recovery Manager
Click to expand...
Click to collapse
You my friend, are truly amazing!! what ever your alterations were; it worked!
Thank you.
Loopy Frog said:
You my friend, are truly amazing!! what ever your alterations were; it worked!
Thank you.
Click to expand...
Click to collapse
I think it's because my scripts were thrown together in the previous one.
Anyways, it's cleaned up.
Glad it worked!

How to setup ART and restore in recovery for KitKat 4.4/CM11 ROM

I've just tested ART feature from friend's recommendation. After activating ART in my CM11 ROM, NFC and Themes Provider keep crashing and phone is not usable. So I think it's good idea to share how to revert ART setting without wiping phone or restore from backup.
Instructions to revert ART
1. Boot into recovery.
2. Run adb shell to access terminal.
3. Type 'rm /data/property/persist.sys.dalvik.vm.lib' This will remove setting default VM runtime to ART.
4. Clear Dalvik cache and reboot. Your phone should run normally now.
Instructions to set ART again
1. Boot into recovery.
2. Run adb shell to access terminal.
3. Type 'echo "libart.so" > /data/property/persist.sys.dalvik.vm.lib' This set default VM to art library file.
4. Clear Dalvik cache and reboot. Your phone should run with ART VM now.
Hope this helps.
tested on huawei honor (u8860)
[email protected]:~$ adb shell
~ # echo "libart.so" > /data/property/persist.sys.dalvik.vm.lib
/sbin/sh: can't create /data/property/persist.sys.dalvik.vm.lib: nonexistent directory
any suggestion? thank you.
hi.
the solution to get art fully working was the following one:
replacing dalvik.vm.dexopt-data-only=0 with dalvik.vm.dexopt-data-only=1 and all went fine...(build.prop)
at least it worked for me. hope it would help.
You need to mount the data partition before running the commands mentioned in the first post there...
This saved my ass! Switched to ART and after reboot, settings would only FC. Could not change anything or switch back through Dev Options. Thank you!!!!
Sent from my HTC6525LVW using Tapatalk
Thanks for the instruction. You save me as I don't have PC now and my custom ROM not support ART.
excuse me, i've been try to switch to art with adb shell, and my phone is boot up but can't get into home screen, it just stuck on starting apps? why ya?

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.

Lollipop and TWRP/CWM Recovery Problem

Hi everybody,
I upgraded to Lollipop using the original image. Everything was fine. No problem of any kind. Then I decided to flash the TWRP recovery. At the first run (just after installation) it was there and worked fine (I even made a backup). However, after a reboot when I went to the recovery I found that it was the stock recovery and TWRP was gone. The back up is also gone from my internal storage. The same thing happened when I flashed the latest version of CWM. After a reboot the flashed recovery is gone.
Please help. Thanks in advance.
joojooman said:
Hi everybody,
I upgraded to Lollipop using the original image. Everything was fine. No problem of any kind. Then I decided to flash the TWRP recovery. At the first run (just after installation) it was there and worked fine (I even made a backup). However, after a reboot when I went to the recovery I found that it was the stock recovery and TWRP was gone. The back up is also gone from my internal storage. The same thing happened when I flashed the latest version of CWM. After a reboot the flashed recovery is gone.
Please help. Thanks in advance.
Click to expand...
Click to collapse
are you using.. fastboot flash recovery recoveryname.img or fastboot boot recovery recoveryname.img?
simms22 said:
are you using.. fastboot flash recovery recoveryname.img or fastboot boot recovery recoveryname.img?
Click to expand...
Click to collapse
I have used "fastboot flash recovery recovery.img"
joojooman said:
I have used "fastboot flash recovery recovery.img"
Click to expand...
Click to collapse
well, if you used boot instead of flash, itll only boot the recovery for a one time use. flash should make it stick. if not sticking, flash a recovery 2 or 3 times, itll stick eventually.
simms22 said:
well, if you used boot instead of flash, itll only boot the recovery for a one time use. flash should make it stick. if not sticking, flash a recovery 2 or 3 times, itll stick eventually.
Click to expand...
Click to collapse
Thank you, I will try that and then report...
Do you have the latest version of the recovery and the root files?
I used CF Root as Chainfire is the man. I ran it first, then I added the recovery.
It stuck for me.
Remove the scripts etc that install recovery such as inatall-recovery.sh and recovery.boot.p in system and system/bin
Just double check your install-recovery.sh isn't one used to call su because you don't want to remove that if it is.
simms22 said:
well, if you used boot instead of flash, itll only boot the recovery for a one time use. flash should make it stick. if not sticking, flash a recovery 2 or 3 times, itll stick eventually.
Click to expand...
Click to collapse
I flashed ( flash .img ) the recovery 2 or 3 times (even more) but it won't stick. If I do not reboot to system it remains there but as soon as I reboot to system it is gone.
joojooman said:
I flashed ( flash .img ) the recovery 2 or 3 times (even more) but it won't stick. If I do not reboot to system it remains there but as soon as I reboot to system it is gone.
Click to expand...
Click to collapse
you want to find and rename or delete install-recovery.sh in /system/. thats whats replacing your recovery with stock.
simms22 said:
you want to find and rename or delete install-recovery.sh in /system/. thats whats replacing your recovery with stock.
Click to expand...
Click to collapse
I actually tried that, but had the following problem:
Code:
sudo adb shell mv /system/bin/install-recovery.sh{,.bak}
mv: rename /system/bin/install-recovery.sh to /system/bin/install-recovery.sh.bak: Read-only file system
Do you have an idea how I can come around this issue?
edit: I have figured that out, check post #15
tweaked said:
Do you have the latest version of the recovery and the root files?
I used CF Root as Chainfire is the man. I ran it first, then I added the recovery.
It stuck for me.
Click to expand...
Click to collapse
I do not want to root. Is it possible? I just want to have recovery. The problem is remained.
joojooman said:
I do not want to root. Is it possible? I just want to have recovery. The problem is remained.
Click to expand...
Click to collapse
From my understanding you need root to be able to edit files in /system. And in there is the script that "misbehaves" for us.
But I've not quite understood how to come by the read only file system problem
naro said:
From my understanding you need root to be able to edit files in /system. And in there is the script that "misbehaves" for us.
But I've not quite understood how to come by the read only file system problem
Click to expand...
Click to collapse
Does it mean that lollipop behaves differently from KitKat? I could have recovery without root there. It stuck at the first flash. But now it is removed every time I boot to the system.
I've ran into the same problem except for me I'm not even getting stock recovery. I don't even have one lol
Okay guys so I figured out how to get it to work (and the recovery to stick!)
First of all, get root. CF Auto root is your friend here.
Now to the problem: The recovery seems to be "reflashed" at every boot. (with an "empty" recovery).
To fix it, boot your phone up and connect it to a pc that has adb installed.
remember to not use sudo under windows, just keep that part out
Code:
sudo adb shell
Now you are on a shell in your android. Since /system is mounted readonly, we first have to remount it:
Code:
[email protected]:/ $ su
[email protected]:/ # mount -o rw,remount /system
now change the install script (I just added a .bak to the name so we do not have to delete it) and remount the filesystem and read only again:
Code:
[email protected]:/ # mv /system/bin/install-recovery.sh{,.bak}
[email protected]:/ # mount -o ro,remount /system
Finally flash the recovery as you are used to, it will now stick:
Code:
sudo adb reboot-bootloader
sudo fastboot flash recovery openrecovery-twrp-2.8.1.0-hammerhead.img
sudo fastboot reboot
From here on, you are back in android and your recovery should have sticked
Maybe you should go to system and find a file like this
recover --from--boot
then delete it
Alright, well the above solution definitely helped, but now when i try to enter super su, it tells me the binaries arent updated and the root needs to be done manually.....but didnt i just do this?
naro said:
From my understanding you need root to be able to edit files in /system. And in there is the script that "misbehaves" for us.
But I've not quite understood how to come by the read only file system problem
Click to expand...
Click to collapse
joojooman said:
Does it mean that lollipop behaves differently from KitKat? I could have recovery without root there. It stuck at the first flash. But now it is removed every time I boot to the system.
Click to expand...
Click to collapse
You can have a recovery without root. Also root is only "in" android. If your recovery has a file manager, it can edit /system files without root because android isn't running lg, ergo no protection. Its just like taking a hard drive out of a computer and adding it as a 2nd in another computer. You don't need that computers password to get the data.
So flash the ROM and see if you can delete them using the recovery file manager or adb whilst booted into recovery
---------- Post added at 08:45 AM ---------- Previous post was at 08:43 AM ----------
naro said:
Okay guys so I figured out how to get it to work (and the recovery to stick!)
First of all, get root. CF Auto root is your friend here.
Now to the problem: The recovery seems to be "reflashed" at every boot. (with an "empty" recovery).
To fix it, boot your phone up and connect it to a pc that has adb installed.
remember to not use sudo under windows, just keep that part out
Code:
sudo adb shell
Now you are on a shell in your android. Since /system is mounted readonly, we first have to remount it:
Code:
[email protected]:/ $ su
[email protected]:/ # mount -o rw,remount /system
now change the install script (I just added a .bak to the name so we do not have to delete it) and remount the filesystem and read only again:
Code:
[email protected]:/ # mv /system/bin/install-recovery.sh{,.bak}
[email protected]:/ # mount -o ro,remount /system
Finally flash the recovery as you are used to, it will now stick:
Code:
sudo adb reboot-bootloader
sudo fastboot flash recovery openrecovery-twrp-2.8.1.0-hammerhead.img
sudo fastboot reboot
From here on, you are back in android and your recovery should have sticked
Click to expand...
Click to collapse
This was all unnecessary.
boot recovery
Flash ROM
mount system
adb shell
rm /system/blah
That was all.
Re
I had the same problem yesterday except that i was intending to install both root and TWRP recovery. I flashed TWRP and ran it then installed supersu, the root did not work and TWRP was gone after rebooting the system.
I used the "cf auto root" utility made by chainfire. It worked (even though the root has few bugs)
I noticed that cf-auto-root flashed some boot img before installing root and twrp. I think you may want to give it a look.
rootSU said:
This was all unnecessary.
boot recovery
Flash ROM
mount system
adb shell
rm /system/blah
That was all.
Click to expand...
Click to collapse
This is what I did:
Boot to recovery-->
Flashing TWRP img-->
Then immediately going to TWRP file manager-->
Changing install-recovery.sh to install-recovery.sh.old -->
Then immediately made a backup --> reboot to system, turning the cellphone on and off several times
TWRP is there BUT:
The only point is that I cannot see the backup folder in my internal storage. It is clear that it has taken some
space (almost 2GB) but I cannot see the TWRP backup folder.

Categories

Resources