Related
I need to wipe the dalvik-cache through adb. could someone tell me the command for this. I can't find the command in the search.
i updated my recovery image (google how to update recovery when still rooted [the unlockr method]) and it cured the problem instantlu.
blue carebear
I will look into that, thanks.
bernard_photography said:
I will look into that, thanks.
Click to expand...
Click to collapse
Here's a guide on how to update recovery. Download updated recovery of your choice (RA, Clockworkmod, etc.) and name it recovery.img. Put it on the root of your sdcard. Now, when booted into normal Android, run this:
Code:
adb shell
cd /sdcard
flash_image recovery recovery.img
reboot recovery
Done!
bernard_photography said:
I need to wipe the dalvik-cache through adb. could someone tell me the command for this. I can't find the command in the search.
Click to expand...
Click to collapse
The command to issue within the adb shell would be
Code:
rm -r /data/dalvik-cache/*
Thank you! That is exactly what I needed.
buck2202 said:
The command to issue within the adb shell would be
Code:
rm -r /data/dalvik-cache/*
Click to expand...
Click to collapse
I found you were missing a letter. Should be: rm -rf /data/dalvik-cache/*
you left off the "f" in "-rf".
bernard_photography said:
I found you were missing a letter. Should be: rm -rf /data/dalvik-cache/*
you left off the "f" in "-rf".
Click to expand...
Click to collapse
The f isn't necessary.
I have searched for the last 30 mins and can't seem to find what the latest recovery image is, or how to upgrade my phone to it.
I want to get the image that allows the use of ext4 to test out the latest Fresh toast and can't seem to find it.
Anyone got a link or a quick how to?
http://forum.xda-developers.com/showpost.php?p=4898505&postcount=1
Every version including 1.6.2 and instructions in that link.
Bielinsk said:
I have searched for the last 30 mins and can't seem to find what the latest recovery image is, or how to upgrade my phone to it.
I want to get the image that allows the use of ext4 to test out the latest Fresh toast and can't seem to find it.
Anyone got a link or a quick how to?
Click to expand...
Click to collapse
copy the .img file to your SD card
unmount the sd card from the PC
open CMD
type
abd shell
su
flash_image recovery /sdcard/recovery_filename.img
reboot.
danknee said:
http://forum.xda-developers.com/showpost.php?p=4898505&postcount=1
Every version including 1.6.2 and instructions in that link.
Click to expand...
Click to collapse
adb shell
su
cd /sdcard/
flash_image recovery recovery-RA-heroc-v1.6.2.img
reboot
Jus10o said:
adb shell
su
cd /sdcard/
flash_image recovery recovery-RA-heroc-v1.6.2.img
reboot
Click to expand...
Click to collapse
Beat me to it. Yeah, just do that. Keep in mind you need to put it on the root of your SD before that.
Thanks all, got it.
I'm trying to update my recovery using the steps above but I keep getting " 'adb' is not recognized as an internal or external command, operable program or batch file." o_0
Edit: Nevermind, I got it.
Hi everyone,
A few days ago I got the OTA 2.2.1 on my MT3G and then rooted it using the SuperOneClick tool. I was able to remove all useless apps, pushed others to /system/app with Root Explorer, etc., there is only one to do, and I am clueless: how to replace the stock Android System Recovery <3e> with a custom recovery image, so I can do Nandroid backups, flash .zip files, etc?
I used the ROM Manager app to flash Clockwork, got an "Installation successful" confirmation, but then on reboot into recovery mode my phone got stuck on the MT3G logo. I had to remove the battery, then in second attempt the phone booted into the <3e> image. Restarted again, opened the ROM Manager, according to it Clockwork was installed. Total craziness! Then I tried to flash it using Better Terminal Emulator (su, flash_image recovery /sdcard/Clockwork.img) but I got a "flash_image: not found" message, though I had the image on my sd card.
Any good ideas, folks?
All useful suggestions much appreciated, thanks!
They've been excluding flash_image from htc roms lately. What your gonna have to do is put flash image on your sdcard with the recovery.img. Then mount your sdcard and run the flash_image from your sdcard and flash the recovery image. After your done then you remove the installrecovery.sh from system/etc. That is what keeps installing the factory recovery when you reboot. I get home and onto a decent internet connection in a few hours and I'll upload some adb commands to help you do this.
make sure you have the recovery.img and flash_image on your sdcard
run these commands in adb
Code:
adb shell
su
mount -o remount,rw -t yaffs2 /dev/mtdblock3 /system
rm /system/etc/install-recovery.sh
cd sdcard
mount -o remount,exec /dev/block//vold/179:1 /sdcard
./flash_image recovery /sdcard/recovery.img
exit
exit
It's kinda relative to the topic. I'm stuck on clockworkmod and would like to get back to stock recovery as the new HBOOT doesn't let me flash roms. Is there any way I can do so?
Look in my guide... all the files, steps and binaries are included...
Check out my signature!
Thanks, Asadullah. One more question: Are there different versions of flash_image for different android versions, because I saw in another forum a user complaining he/she didn't use the right binary.
Edit: I've extracted a flash_image binary from CM 6, hope it will work
Edit2: It worked, thanks a lot, man!
I think that flash_image from different devices is different someone correct me if I'm wrong. Glad it worked
Sent from my HERO200 using XDA App
I forgot to ask you one more question, don't want to open a new thread for this one, perhaps you can help again
I put the code you gave me through the terminal, since adb denied me of su permission. I installed the SDK, and after typing "adb devices" in cmd it saw the phone. "Adb shell" worked (saw the dollar sign), but then intead of getting the pound sign, su gave me "permission denied". But I get the permission when using the terminal. I also cannot see the phone directories when I open DroidExplorer, but otherwise it sees the phone and I get su permission when I use its command prompt. I thought there may be a problem with the root, but if there was, then how was I able to delete and push system apps and install the custom recovery? What do you think may cause the problem? Thanks.
Sent through XDA App
lgtsanev said:
I forgot to ask you one more question, don't want to open a new thread for this one, perhaps you can help again
I put the code you gave me through the terminal, since adb denied me of su permission. I installed the SDK, and after typing "adb devices" in cmd it saw the phone. "Adb shell" worked (saw the dollar sign), but then intead of getting the pound sign, su gave me "permission denied". But I get the permission when using the terminal. I also cannot see the phone directories when I open DroidExplorer, but otherwise it sees the phone and I get su permission when I use its command prompt. I thought there may be a problem with the root, but if there was, then how was I able to delete and push system apps and install the custom recovery? What do you think may cause the problem? Thanks.
Sent through XDA App
Click to expand...
Click to collapse
I know it's been a while and you didn't get a reply, and while I found this thread because I too am having enormous trouble rooting this whatever it is cheap chinese android 2.2.1 momo 2 thing covered completely in chinese language apps that I simply cannot use even for the low price it cost me - I thought I'd offer an answer, most likely wrong, but one that may help the next person who may fall into your position.
adb root is an option to start the adb service in root mode, and I can only assume that means for the device.
As I have not been able to get this thing sorted, not knowing what it is really - no phone, no camera, no buttons on the case apart from power/sleep - Home/Esc which do nothing on booting apart from alert the PC to detect a new USB device, no market access, but otherwise exactly what I required - I dont know if it'll help.
But I hate threads left in a question, because I always find them. And this circle of frustration seriously should not be real, it just cannot be this damn hard to do something...
yikes!
help please
Asadullah said:
They've been excluding flash_image from htc roms lately. What your gonna have to do is put flash image on your sdcard with the recovery.img. Then mount your sdcard and run the flash_image from your sdcard and flash the recovery image. After your done then you remove the installrecovery.sh from system/etc. That is what keeps installing the factory recovery when you reboot. I get home and onto a decent internet connection in a few hours and I'll upload some adb commands to help you do this.
make sure you have the recovery.img and flash_image on your sdcard
run these commands in adb
Code:
adb shell
su
mount -o remount,rw -t yaffs2 /dev/mtdblock3 /system
rm /system/etc/install-recovery.sh
cd sdcard
mount -o remount,exec /dev/block//vold/179:1 /sdcard
./flash_image recovery /sdcard/recovery.img
exit
exit
Click to expand...
Click to collapse
i cant get it how to use it.. i havve recovery & flash img
please if u dont mind can u please litel more explain it
thanks
sky rider said:
i cant get it how to use it.. i havve recovery & flash img
please if u dont mind can u please litel more explain it
thanks
Click to expand...
Click to collapse
root your phone
install terminal emulator on your phone
type in everything that you quoted except for adb shell
Confused in differences
Asadullah said:
They've been excluding flash_image from htc roms lately. What your gonna have to do is put flash image on your sdcard with the recovery.img. Then mount your sdcard and run the flash_image from your sdcard and flash the recovery image. After your done then you remove the installrecovery.sh from system/etc. That is what keeps installing the factory recovery when you reboot. I get home and onto a decent internet connection in a few hours and I'll upload some adb commands to help you do this.
make sure you have the recovery.img and flash_image on your sdcard
run these commands in adb
Code:
adb shell
su
mount -o remount,rw -t yaffs2 /dev/mtdblock3 /system
rm /system/etc/install-recovery.sh
cd sdcard
mount -o remount,exec /dev/block//vold/179:1 /sdcard
./flash_image recovery /sdcard/recovery.img
exit
exit
Click to expand...
Click to collapse
Sir, is there a differences behind these flash_image recovery and recovery.img because its too confusing to think that they are the same or not
Jkhim said:
Sir, is there a differences behind these flash_image recovery and recovery.img because its too confusing to think that they are the same or not
Click to expand...
Click to collapse
Honestly it's been so long I forgot ?? I don't think you need too use flash image anymore
rm failed????
Asadullah said:
They've been excluding flash_image from htc roms lately. What your gonna have to do is put flash image on your sdcard with the recovery.img. Then mount your sdcard and run the flash_image from your sdcard and flash the recovery image. After your done then you remove the installrecovery.sh from system/etc. That is what keeps installing the factory recovery when you reboot. I get home and onto a decent internet connection in a few hours and I'll upload some adb commands to help you do this.
make sure you have the recovery.img and flash_image on your sdcard
run these commands in adb
Code:
adb shell
su
mount -o remount,rw -t yaffs2 /dev/mtdblock3 /system
rm /system/etc/install-recovery.sh
cd sdcard
mount -o remount,exec /dev/block//vold/179:1 /sdcard
./flash_image recovery /sdcard/recovery.img
exit
exit
Click to expand...
Click to collapse
sh: ./flash_image: not found how to fix this sir? im so new about this, sorry about that
---------- Post added at 05:22 AM ---------- Previous post was at 04:43 AM ----------
Asadullah said:
They've been excluding flash_image from htc roms lately. What your gonna have to do is put flash image on your sdcard with the recovery.img. Then mount your sdcard and run the flash_image from your sdcard and flash the recovery image. After your done then you remove the installrecovery.sh from system/etc. That is what keeps installing the factory recovery when you reboot. I get home and onto a decent internet connection in a few hours and I'll upload some adb commands to help you do this.
make sure you have the recovery.img and flash_image on your sdcard
run these commands in adb
Code:
adb shell
su
mount -o remount,rw -t yaffs2 /dev/mtdblock3 /system
rm /system/etc/install-recovery.sh
cd sdcard
mount -o remount,exec /dev/block//vold/179:1 /sdcard
./flash_image recovery /sdcard/recovery.img
exit
exit
Click to expand...
Click to collapse
sir is this CM.12 cyanogenmod fakelollipop is an example of flash_image even its in a zip file? because i cant get it at all, im stuck at flash_image not found
I downloaded the mac files from xda and followed the instructions in the readme.txt file but whenever I plug in the command line:
# /data/local/redbend_ua restore /sdcard/zImage /dev/block/bml8
Goes through the blurb but then I get:
failed to read from /sdcard/zImage (Bad file number)
Thought I might have a corrupt file or something but I've downloaded it 3 times with the same result.
Can anyone help please?
Anyone?
Anyone?
xjedi
Nevermind. Got it.
Nevermind.
After wrestling with it for so many days, I got it to work by
cd /data/local
# chmod 755 redbend_ua
# ./redbend_ua restore /sdcard/zImage /dev/block/bml7 - Instead of this
# ./redbend_ua restore ./zImage /dev/block/bml7 - I changed it to this
and so the same with the other command for the next reboot for ..../block/bml8 as well
Now I'm happily doing backups and going to flash a new ROM. Woohoo!
I'm in a similar situation, have a mac n im trying to install cwm but I cant figure out from the instructions in the download. Can you please tell me exactly what you did and what you typed in the terminal box?
I followed this same procedure on my mac. I seem to remember running into this, but was able to get it working after trying one or two times.
Here is my suggestion. Learn how to use a linux command line (which is basically what the mac terminal is). I am quite familiar using the command line, so that knowledge along side the mac instructions for clockwork made this much easier. If you learn the basic commands (ls, grep, cd, chmod, etc), you will understand what the instructions are telling you to do much better and have much more success getting this to work. And with time, you'll find these tasks are more easily completed on the mac. No need to screw around with drivers or clunky tools (sorry, I don't like odin).
Sorry I can't be of more help, but I can tell you it does work. If I remember correctly, you can't paste into the terminal. So, if you are typing the commands manually, double check all your spellings before entering them. Good luck
Sent from my SCH-I500 using XDA App
my advice is to boot camp your mac
Sent from my SCH-I500 using XDA App
Boot camp is best, you want Odin around just in case
There's also a pretty good tutorial somewhere in here on how to install ClockworkMod using a Mac. But also not a bad idea to use bootcamp or some virtual machine to install windows on a Mac for Odin purposes... now if I can get my lazy butt to fry's and buy windows 7 for my Mac... lol
Sent from my SCH-I500 using XDA App
alxb577 said:
I'm in a similar situation, have a mac n im trying to install cwm but I cant figure out from the instructions in the download. Can you please tell me exactly what you did and what you typed in the terminal box?
Click to expand...
Click to collapse
@alxb577
These are the instructions I used but with the little changes I did to make it work for me.
Copy zImage to the root folder of your SD Card
Open Terminal
$ cd (path to android sdk)/tools
$ ./adb push (path to redband_ua)/redbend_ua /data/local
$ ./adb shell
$ cd /data/local/tmp
$ chmod 0755 rage.bin
$ ./rage.bin
(username)$ ./adb shell
# mount -t rfs -o remount,rw /dev/block/stl9 /system
# cd /data/local
# chmod 755 redbend_ua
# ./redbend_ua restore ./zImage /dev/block/bml7
--Phone Reboots--
$ ./adb shell
$ su
# cd /data/local
# ./redbend_ua restore ./zImage /dev/block/bml8
--Phone Reboots--
i keep getting "n o such directory" on the first command. i know i have the directory because i copied sdk to it so i could have a shorter path name.
username$ ./adb push /androidsdk/tools/redbend_ua /data/local
-bash: ./adb: No such file or directory
am i entering this correctly. been up all night working on this because i cant use odin on any of my three different xp machines. i keep getting floating point error r6002 when i try to opin odin on those eventhough i just used odin two days ago to flash my galaxy tab.
can anyone help me with these commands or help me fix my floating point errors o nmy xp machines? do these adb commands work in windows as well?
When in terminal, type "cd .." a couple of times, then "cd and*" and that will change your directory to the android sdk folder. Then "cd tools" to point it to the tools folder. Try your commands after that
Thanks for the help but, I ended up just running those adb commands in windows and it worked!! Good to know though incase I have to whip my hackintosh back out when I get another fascinate.
A side note, can someone point me to info on fixing the floating point error r6002 i got on all three of my xp machines when trying to run odin? This was the whole reason i was trying to install cwmod with my mac.
Sent from my GT-P1000 using Tapatalk
[GUIDE] How to do a full backup to /sdcard-ext
How to backup your atrix with adb
Prerequisites:
update: adb,fastboot,moto-fastboot all in one zip
1. Get adb (from one of the following) (awesome thread about adb where to get it and how to use it)
a) Android adk
b) Gladroot or many of the other older rooting methods that are script based in the stickys
c) obtain moto-fastboot for your os version
32 or 64 bit ms windows xp, vista, or 7
64 bit linux
32 bit linux
Mac osX
fastbootandfriends? d) Drivers for your device - windows 32 and 64 bit (motorola.com site) other os's do not need driver files.
2. Obtain root on your device
a) look in the sticky threads (I prefer the CWM zip here)
Warnings:
Do not restore /data "/dev/block/mmcblk0p16" if your going from one rom to another. use titanium backup or another utility.
Do not restore /pds "/dev/block/mmcblk0p3" unless you have a issue with your touchscreen or unless instructed to do so by someone that understands /pds.
Do not ever share your pds.img with anyone
Backup:
adb shell
su
Then type the dd commands below to create a image file on your external sdcard for the following...
Boot
dd if=/dev/block/mmcblk0p11 of=/mnt/sdcard-ext/boot.img
Click to expand...
Click to collapse
System
dd if=/dev/block/mmcblk0p12 of=/mnt/sdcard-ext/system.img
Click to expand...
Click to collapse
Data
removed use tibu
Click to expand...
Click to collapse
Osh/Webtop
dd if=/dev/block/mmcblk0p13 of=/mnt/sdcard-ext/osh.img
Click to expand...
Click to collapse
Recovery
dd if=/dev/block/mmcblk0p10 of=/mnt/sdcard-ext/recovery.img
Click to expand...
Click to collapse
PDS
dd if=/dev/block/mmcblk0p3 of=/mnt/sdcard-ext/pds.img
Click to expand...
Click to collapse
MOVE YOUR IMAGE BACKUPS OFF YOUR SDCARD!!!
Restore:
to restore use moto-fastboot (from the pudding thread)
boot
moto-fastboot flash boot boot.img
Click to expand...
Click to collapse
System
moto-fastboot flash system system.img
Click to expand...
Click to collapse
Data
removed use tibu
Click to expand...
Click to collapse
Osh/Webtop
moto-fastboot flash webtop osh.img
Click to expand...
Click to collapse
Recovery
moto-fastboot flash recovery recovery.img
Click to expand...
Click to collapse
WARNING - PDS is tricky - Do not touch pds unless you have to.
Also do not ever share your pds.img with anyone
PDS
adb push pds.img /data/local/tmp
adb shell
su
chmod 777 /data/local/tmp/pds.img
dd if=/data/local/tmp/pds.img of=/dev/block/mmcblk0p3
Click to expand...
Click to collapse
Why not just use cwm?
Sent from my Motorola Atrix using the XDA App
thebeardedchild said:
Why not just use cwm?
Sent from my Motorola Atrix using the XDA App
Click to expand...
Click to collapse
Because CWM nandroid restore has messed up a bunch of users touchscreens
Great info in one place, thanks!
Thanks
Sent from my MB860 using XDA App
I had to change the restore process for data to use adb as moto-fastboot will not flash a image that big.
my /data was 2 gig.
do not forget to delete data.img from /sdcard after you restore.
also keep in mind that your /data will be pretty big and will take quite a long time to restore.
also do not use DD if you have fat fingers and are prone to mistyping "of" and "if" since o and i are next to each other on most keyboards.
joe ferreira said:
Because CWM nandroid restore has messed up a bunch of users touchscreens
Click to expand...
Click to collapse
Wow that's stupid...Is there a fix on the way for that? This method here seems a little more intensive than just using CWM..
Oh well, thanks for giving us something to use while CWM sucks!
can we run these backup commands phone-side via terminal emulator?
the dd commands are best ran via adb
you can run them in terminal emulator but if terminal emulater fc's while your restoring then it could cause issues.
adb is the best way to do this.
really you should all be using titanium backup for /data anyways.
to avoid fat fingers you can also copy and paste.
Great thread Joe!
Permission denied
So I'm a bit of a n00b but I feel like I do pretty well at following directions. Obviously I'm missing something here because after typing "adb shell" and getting the '$' prompt I type the "su" command and am bumped to a new line without a '$' prompt. So far so good, but as soon as I type "dd" I immediately get "Permission denied". It won't even let me enter the entire line! Any help would be greatly appreciated.
AjaxTheCleaner said:
So I'm a bit of a n00b but I feel like I do pretty well at following directions. Obviously I'm missing something here because after typing "adb shell" and getting the '$' prompt I type the "su" command and am bumped to a new line without a '$' prompt. So far so good, but as soon as I type "dd" I immediately get "Permission denied". It won't even let me enter the entire line! Any help would be greatly appreciated.
Click to expand...
Click to collapse
you need root.
you type
adb shell
Click to expand...
Click to collapse
then type
su
Click to expand...
Click to collapse
then it will prompt you on the phone if you have root access to accept the root access request.
I had to remove the /data backup part until I can work the kinks out.
I will update and repost when it is finished
Thank you for the helpful response! I was able to install and run SuperUser on the device so I thought I had successfully rooted. Having been in helpdesk and IT for years there really is no excuse. I failed to follow my own first rule which is to reboot. After restarting my phone I was able to successfully logon to su and execute those commands, but it took finding out that I did in fact NOT have root access to prompt me to try such a thing. Thanks for providing helpful info and not flaming me (sincerely!)
what happens if you are on windows and not linux? can't restore the larger files through fastboot.
y2whisper said:
what happens if you are on windows and not linux? can't restore the larger files through fastboot.
Click to expand...
Click to collapse
your host system does not have anything to do with what I was discussing about image size.
the backup of /data was something that I had to takeout until i figure it out.
as always you should take multiple backups. I use titanium backup as well as the methods discussed in this thread.
i see. so how do I use moto-fastboot? to restore? (where to put the files etc)
y2whisper said:
i see. so how do I use moto-fastboot? to restore? (where to put the files etc)
Click to expand...
Click to collapse
correct me if I'm wrong, but I think you put the files in the fastboot folder.
if you don't put it in the fastboot folder -- you would have to type the full path of the file?
so im guessing --
fastboot flash recovery C:\MyDocuments\recovery.img
or something like that? im a noob too hehe
yeah that part i got down, but when I try to restore the system.img it doesn't let me due to the size.
EDIT
it says image is to big, use 0x10000000 bytes chunks
Failed <remote: 00000006>>
my sys files is 327680kb
Nevermind managed to find my way thanks to Magnetox!