This method is a pain in the butt, http://forum.xda-developers.com/showthread.php?t=926749here is a better method!
PERFORM AT YOUR OWN RISK! (I will clean this up as I have more time)
Okay! I have seen several threads on here regarding getting Nookie Froyo working off EMMC. Here is my take on it, I have spent time psuedo bricking my Nook Color over and over, and bringing it back to a factory state. Also all credit for this work goes to the people who actually got all this to work... I am simply compiling the information needed to make this as simple as possible.
First things first… If you make your device not-bootable… it is not the end of the world! Thanks to samuelhalff you can simply just recover using CWR and his recovery image from http://forum.xda-developers.com/showthread.php?t=914690&highlight=emmc . (To make things easier you can get a CWR image that is bootable from your SD card to assist with this from here: http://forum.xda-developers.com/showthread.php?t=922870 .) Please be advised that after the recovery you MUST factory restore Data using the power + n method!
Prereqs:
1. Ubuntu 10.1 (this is what I am using and can verify that it works with no issues.)
2. ADB working over USB.
3. A micro SD card of at least 2gb (more than one helps speed things up!)
4. IOMonsters bootable SD CWR (http://forum.xda-developers.com/showthread.php?t=922870)
5. Nooter 0.2(Thanks Pokey9000, and MBM!) (http://www.mediafire.com/?cfddu9wt9d8dunl)
6. Modified boot files for Nookie Froyo (http://forum.xda-developers.com/showpost.php?p=10747294&postcount=2 )
7. Nookie Froyo 0.5.9 (http://forum.xda-developers.com/showthread.php?t=883175)
8. The factory boot image (http://forum.xda-developers.com/showthread.php?t=919353)
How to:
1. If you are not already completely stock please do so now. (including wiping data.)
2. Boot from your SD card into Nookie Froyo 0.5.9
3. Configure your display to timeout at 30 minutes (so you have time to type this all in!)
4. Type the Following in your adb shell:
adb shell mount -o remount,rw /dev/block/mmcblk1 /
adb shell
mkdir tmpfolder
mount /dev/block/mmcblk0p5 tmpfolder
cd tmpfolder
rm -r *
cd ..
cp -r system/* tmpfolder
umount tmpfolder
mount /dev/block/mmcblk0p1 tmpfolder
exit
adb push [folder-containing-extracted-boot.zip] tmpfolder
adb shell
umount tmpfolder
mount /dev/block/mmcblk0p5 tmpfolder
exit
adb push [folder-containing-extracted-volds.zip] tmpfolder/etc/
adb shell
umount tmpfolder
rm -r tmpfolder
exit
5. Turn your NC off and take out the sd card and pop it into your computer and image Nooter 0.2 onto it.
6. Boot your NC up with Nooter 0.2
7. SSH into your NC from the console (sudo –s root console) with the following command “ssh [email protected]” (if you have to reconnect and you get an error about keys type: “ssh-keygen -R 192.168.2.2”)
8. Eject your sd card (unless you have 2) and put (copy the file, do not image boot.img to the sdcard!) the factory boot.img file onto the sd card (might need to use gpart to wipe out the card and format for fat32, pop it back into your NC.
9. In the ssh console type:
mkdir sdcard
mount /dev/mmcblk0p1 sdcard
cd sdcard
dd if=boot.img of=/dev/mmcblk1p1
10. Power off NC and remove sdcard.
11. Reboot NC and hold down power + n to factory restore data.
12. Boot from your nooter card again the same as before.
13. Once booted, eject your sdcard from the nc and load up the modified boot files from nookie froyo. (just place the files in the root of the sd card)
14. Put the sdcard back into your nc and type:
mkdir sdcard
mount /dev/mmcblk0p1 sdcard
15. Then mount your boot partition and backup the existing files:
mkdir boot
mount /dev/mmcblk1p1 boot
cd boot
mkdir bak
mv * bak
cd ..
cp /sd/* /boot/
16. Reboot your NC and enjoy Froyo on EMMC!
Until I read to part 7 I was thinking of trying this on windows. Have ubuntu also but don't have sdk on it. And not sure of how to get sdk on ubuntu. Can this be done on windows? What if I did 1 threw 5 on windows sdk,then finished it up with ubuntu?
Wondering the same...no Ubuntu here...just Windows 7 (32 & 64 bit). Hoping someone can verify Windows works.
I must say, I followed it up to step 9, and I get totally lost in the weeds from there..
I also suggest this lives in the NookDevs wiki, as it's easier for folks to tweak and make it easier to understand, add info etc to it there.
What if I di 1-5 on windows then the rest with the terminal emulator on the nook? That is if nooter preinstalls emulator.
At step 9 u need to open up an ssh tunnel via the console in ubuntu..if you go on nook devs under rooting they have an ssh connection tutorial... this could be done in windows if you had an ssh client and the dd package or something similar.... however the process at this point in time is fussy and works well on ubuntu 10.1 after i do some more tweaking i may just zip up the premade image...
Sent from my Nook Color (zoom2) using Tapatalk
ericman77 said:
What if I di 1-5 on windows then the rest with the terminal emulator on the nook? That is if nooter preinstalls emulator.
Click to expand...
Click to collapse
Not sure on that... nooter only provides a ramdisk and allows ssh and adb....
Sent from my Nook Color (zoom2) using Tapatalk
U go to the same place as to get it for windows... u could do ur adb stuff in windows and the ssh stuff in ubuntu
Sent from my Nook Color (zoom2) using Tapatalk
K thanks think I will try that then.
I somewhat successfully used this method. However, I had some issues with step 9 since I am on Mac OS X. I could not mount my sdcard at all. No matter how I formatted the card, the system type could not be identified. Nonetheless, I was able to boot into Froyo and just completed the rest of the guide within Froyo.
*Corrections Needed to Guide*
Step 9: Error on mount point. Should be "mmcblk1p1" and not "mmcblk0p1"
Step 14: Mounts are incorrect again, they need to be reversed (sdcard & boot)
Can someone give me a hand...in step 9 where is says 'mount /dev/mmcblk0p1 sdcard' it says file directory doesnt exist. When i list the files i see mmcblk0 so i use that one. when i go to do the "dd if=boot.img of=/dev/mmcblk1p1" i get boot.img does not exist. LS on that shows that the file isnt there. I wrote the boot.img to the sd card and the files that are part of the show but not the image i burned. Can someone get a little more direction on that part. Thanks...
something must be kooky with my NC as i literally copied and pasted this stuff into my console and got it to run... well as long as its working! (maybe people should double check the mounts prior to imaging....)
modembug said:
At step 9 u need to open up an ssh tunnel via the console in ubuntu..if you go on nook devs under rooting they have an ssh connection tutorial... this could be done in windows if you had an ssh client and the dd package or something similar.... however the process at this point in time is fussy and works well on ubuntu 10.1 after i do some more tweaking i may just zip up the premade image...
Click to expand...
Click to collapse
Well, not that I didn't understand the commands, just I can't quite figure out what 9 on is doing
so on step 9 prior to running those commands you need to Place the file onto the sdcard, do not image boot.img to the sdcard... you need the actual file so when you are in the shh console you can dd the image file to that partition... make sense?
I am working on a flashable zip file that should simplify this process greatly.... Stay tuned!
modembug said:
so on step 9 prior to running those commands you need to Place the file onto the sdcard, do not image boot.img to the sdcard... you need the actual file so when you are in the shh console you can dd the image file to that partition... make sense?
Click to expand...
Click to collapse
Yup makes sense ... had been at it for your 5... several went down for two hours. Then had issues with rndis driver but good now that was going to be my next step in the morning. Thanks... will continue where I left off.
Sent from my DROIDX using Tapatalk
I'm looking forward to the flashable version!
Sent from my LogicPD Zoom2 using XDA App
having some issues with the flashable zip... still working at it, just need to replicate these steps in the script... Hopefully later today ill have something
I need a way to manually delete the files in /boot and in /system instead of formatting those partitions in CWR... I think if that was done instead it would prevent the bootloop..
Windows
You should be able to do this in Windows.
Use:
Putty forSSH.
http://www.chiark.greenend.org.uk/~sgtatham/putty/
Win32 Disk Imager to write images to SD Card.
https://launchpad.net/win32-image-writer/+download
Ok...im am on the last two lines....this is what i am getting
when i type mv * bak...i get can't rename 'bak' invalid argument.
I checked and bak is there with files in it.
when i do cp /sd/* /boot/ i get can't stat '/sd/*' no such file or directyory
i have even tried changing sd to sdcard and still nothing. I see the steps should copy from the sdcard to the boot directory, but keep getting that error. thanks for any help you can provide. Everything up until that point works perfectly;
Related
**THE USUAL WARNINGS APPLY**
1/11/11: Updated CWR to 3.0.0.5. Now installs properly through ROM Manager. Nandroid backup works, don't know about restore. Not sure if partition wiping is working I would assume it is. Flashable zips from SD card are working, tested with Quickie OC kernel (HIGHLY RECOMMEND!!!). Attached the CWR 3.0.0.5 image to this post, it is not a flashable zip just the image file zipped. So we have some real progress. w00t!!!
1/2/11: Looks like CWR has been released for NC. I didn't see it up see here you go. Easiest way to get it installed is by downloading ROM Manager in the market and flashing it through the apk. Attached is the .zip, I believe you just rename it "update.zip" and put it on the root of your SD card. Then reboot into recovery. Again your best bet is to use ROM Manager. Link to website: http://www.koushikdutta.com/2010/02/clockwork-recovery-image.html
Awesome, will try this later today, thanks for bringing it to attention
Afraid i cant thank you from my nook, but rest assured i eil soon
install failed here, too.
Failed for me too....
Sent from my Nooted Rook XDA App
Not ready for prime time yet. You need to install uRecRam to use it. give it a day put so for out to be automated. At least that is where it was last night when I went to sleep.
Sent from my rooted droid x
As per the previous post. This is not ready yet and could result in a bricked NC.
http://nookdevs.com/NookColor:Building_Clockwork_Recovery
Unable to post url's
Also I don't think it is backing up all partitions.
Sent from my rooted droid x
Failed me too. Started the process and then failed. Looks like it is close though. Pretty exciting.
WOW, this is great news. Seems like real soon we will be able to make backups.
Awesome. Not too long now until ROMs start getting put together. Hope the teardown reveals working Bluetooth.
Here are the steps to actually making this work if you are the adventurous type. This may brick your device blah blah. I am not responsible, etc. You should only attempt this if you genuinely understand the commands you are performing.
Make sure neither /media or /sdcard are mounted in your OS!
Save this:
http://koush.tandtgaming.com/test/clockwork-b3-nook-uRecRam
adb push clockwork-b3-nook-uRecRam /media/
adb shell
su
mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
mkdir /system/boot/
mount -t vfat /dev/block/mmcblk0p1 /system/boot
cat /system/boot/uRecRam > /system/boot/uRecRam.bak
cat /media/clockwork-b3-nook-uRecRam > /system/boot/uRecRam
umount /system/boot
rmdir /system/boot
Now do the three fingered salute to get into CWM Recovery. VolUp/Down are up/down, respectively. The Nook/home button is Select and the power button is Back.
@Mistar Muffin
worked for me
starkruzr said:
Awesome. Not too long now until ROMs start getting put together. Hope the teardown reveals working Bluetooth.
Click to expand...
Click to collapse
That would be awesome!
Great job,
I tried to compile a scrip with the following but it doesn't work if i put it in a batch file but it works if I run it from DOS. Go figure...
Code:
adb push clockwork-b3-nook-uRecRam /media/
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb shell mkdir /system/boot/
adb shell mount -t vfat /dev/block/mmcblk0p1 /system/boot
adb shell "cat /system/boot/uRecRam > /system/boot/uRecRam.bak"
adb shell "cat /media/clockwork-b3-nook-uRecRam > /system/boot/uRecRam"
adb shell umount /system/boot
adb shell rmdir /system/boot
I will work on the batch for the community to run so it make it easy for noobs...no ETA
Would installing this hose the ability to factory reset (the 8 failed boots/bootcnt method)?
Flashed and it works.
Yes you will loose that ability in it's current state.
I do not recommend using this until it has the capability to backup all of your data. At this point an error can still leave you with no return path, you have been warned!
Edit: Scratch that. I see what I did.
Even if it might not be wise for most to use this yet, very happy to see this available. Looking forward to nandroid . . .
I saw that the nook color comes up in rom manager, does this mean we don't need to install that other file uRecRam.
Sent from my LogicPD Zoom2 using XDA App
I bought my own nook color on saturday, there doesn't appear to be a factory image that can be restored. My new nook color came with version 1.01 preinstalled. Before turning it on the first time I put in nookie froyo and did a dd of all 8 of the stock partitions. Below is the zipped up .img files of mmcblk0p1/mmcblk0p5 (boot/system) from a stock untouched 1.01 nook color. I am also including the factory.zip. This should be enough to restore a bricked nook color with a corrupted boot or system partition. Many people have been able to restore to stock by just using the boot.img because after 8 failed boots it will do a factory reset.
To make this work you must have ADB working first. You may be able to get this to work on ADB Wireless, but I don't recommend it. For instructions on getting adb to work with the nook color go here:
http://nookdevs.com/NookColor_USB_ADB
To use these files unzip them to the sdcard portion of a nookie froyo sdcard, or just about any other rom that runs from the sdcard and run the following commands in an adb shell:
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1
dd if=/sdcard/system.img of=/dev/block/mmcblk0p5
Boot
System
factory.zip
Thanks, you're a life saver!
samuelhalff said:
Thanks, you're a life saver!
Click to expand...
Click to collapse
Did it fix you samuelhalff?
Yes. But I only used boot.img. Then restored to stock with 8 failed boots. Dd'ing system will also work.
If it dosen't boot, do a factory reset with power+n.
Sent from my HTC Desire using XDA App
So if I put the factory.zip on /dev/mmcblk0p3 and replace the current one, when we do the 8 bad boot trigger we would get 1.0.1 flashed instead of 1.0.0 right?
Yes. And I would also do a power+n reset at the end, to avoid any problems.
Sent from my HTC Desire using XDA App
shad0wf0x,
I am having the same problem with my NC not booting after a failed attempt at
re-rooting. I will tell you in advance that I am VERY tech-phobic and don't comprehend all this command-line stuff well at all.
Given your original post above, could you please explain in layman's terms EXACTLY what steps to take to restore my NC to like-new? And hopefully it can be done with just simply putting some files on a micro SD and that's it. Please let me know from start to finish how I do this. Appreciate your help in advance.
vigeh4
P.S. I know I had no business doing this, but I screwed my unit up anyway. I already tried the 8-step interrupt thing before re-rooting but with no success.
vigeh4,
First download the first 2 files, system and boot, and then unzip them. Then you need to copy those 2 files (system.img and boot.img) to the sdcard, either while booted up in nookie froyo or by putting the sdcard in your computer. Then you must have adb working on your computer. open a command prompt or terminal(windows or mac/linux) and go to the location where your working adb is and copy and paste those commands into the window to run them.
Code:
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1
dd if=/sdcard/system.img of=/dev/block/mmcblk0p5
shad0wf0x said:
vigeh4,
First download the first 2 files, system and boot, and then unzip them. Then you need to copy those 2 files (system.img and boot.img) to the sdcard, either while booted up in nookie froyo or by putting the sdcard in your computer. Then you must have adb working on your computer. open a command prompt or terminal(windows or mac/linux) and go to the location where your working adb is and copy and paste those commands into the window to run them.
Code:
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1
dd if=/sdcard/system.img of=/dev/block/mmcblk0p5
Click to expand...
Click to collapse
Sorry, I am WAY confused about how to do this. This adb crap is over my head.
Maybe I just have a $250 paperweight at this point. If I mail you my NC, would you reset to "factory" for a small fee?
Thanks.
OMFG, thank you very much for these files and instructions.
I really thought I bricked it to the point of no return. I initially screwed it up when I installed Clockwork and wouldn't boot past "N", then after tinkering around some more, it wouldn't even turn on ... lol.
@vigeh
First you need to unzip those files you just downloaded. Second, you need to copy the "boot.img" and "system.img" (not the *.zip) to the "/SDCARD" folder on your SDCARD. I had to use WIFI FILE Explorer in Nookie Froyo cuz I messed up my nook so bad, i couldn't copy these files by turning on the USB Storage through the regular method. It took me days to figure this out cuz i'm kinda slow.
I hope you installed the Android-SDK on your computer already. If so, then go to the folder named "\platform-tools" on your PC - this is where ADB.EXE is located. Connect your nook and type "ADB DEVICES" just to make sure your nook is connected to the computer. It'll show up and tell you it is or not. If it is connected then do the following:
1. Type "ADB SHELL" then you'll see a "#" symbol after you hit enter.
2. Type "dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1" just the way it is written by the original poster (minus the "" marks)
at this point, it usually wont say anything. Just wait a few minutes and something will pop up. In my case, it says:
"477033984 bytes <454.9MB> copied, 138.757660 seconds, 3.3MB/s"
"#"
3. Type the second command next to the "#" sign "dd if=/sdcard/system.img of=/dev/block/mmcblk0p5"
wait another few minutes til the next confirmation pops up.
4. turn off nook, remove SD card
5. Hold the N button and the Power button at the same time and it'll ask you to reset the nook to factory settings.
I hope this helps you ....
well im a tard... i did this without reading that YOU CANNOT HAVE GOOGLE APPS!!!! so anyway Im trying to get back to a stock image, but i cant figure out how to copy 700 med +/- of images to 134 meg f free space. someone un-tard me plz . thanks
I have ClockworkMod Recovery installed, and if I put the factory.zip you provided on my sd card and use the option 'install zip from sdcard' will that in fact install factory settings on the nook?
I tried to do the 8 failed boots, but cannot get it to work with this installed.
shad0wf0x said:
vigeh4,
First download the first 2 files, system and boot, and then unzip them. Then you need to copy those 2 files (system.img and boot.img) to the sdcard, either while booted up in nookie froyo or by putting the sdcard in your computer. Then you must have adb working on your computer. open a command prompt or terminal(windows or mac/linux) and go to the location where your working adb is and copy and paste those commands into the window to run them.
Code:
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1
dd if=/sdcard/system.img of=/dev/block/mmcblk0p5
Click to expand...
Click to collapse
How do you get to your "working adb?" I'm probably even more ignorant on this SDK stuff that vigeh4. I have SDK installed though.
How to get adb working is found here:
http://nookdevs.com/NookColor_USB_ADB
gconol said:
@vigeh
First you need to unzip those files you just downloaded. Second, you need to copy the "boot.img" and "system.img" (not the *.zip) to the "/SDCARD" folder on your SDCARD. I had to use WIFI FILE Explorer in Nookie Froyo cuz I messed up my nook so bad, i couldn't copy these files by turning on the USB Storage through the regular method. It took me days to figure this out cuz i'm kinda slow.
I hope you installed the Android-SDK on your computer already. If so, then go to the folder named "\platform-tools" on your PC - this is where ADB.EXE is located. Connect your nook and type "ADB DEVICES" just to make sure your nook is connected to the computer. It'll show up and tell you it is or not. If it is connected then do the following:
1. Type "ADB SHELL" then you'll see a "#" symbol after you hit enter.
2. Type "dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1" just the way it is written by the original poster (minus the "" marks)
at this point, it usually wont say anything. Just wait a few minutes and something will pop up. In my case, it says:
"477033984 bytes <454.9MB> copied, 138.757660 seconds, 3.3MB/s"
"#"
3. Type the second command next to the "#" sign "dd if=/sdcard/system.img of=/dev/block/mmcblk0p5"
wait another few minutes til the next confirmation pops up.
4. turn off nook, remove SD card
5. Hold the N button and the Power button at the same time and it'll ask you to reset the nook to factory settings.
I hope this helps you ....
Click to expand...
Click to collapse
Thanks to Shadowf0x for getting ABD to work
I have a question though, if I dont have the file "SDCARD" in my SD card then can I just make a new file and name it SDCARD, and put both of the .img's into it?
Sir a teema said:
I have ClockworkMod Recovery installed, and if I put the factory.zip you provided on my sd card and use the option 'install zip from sdcard' will that in fact install factory settings on the nook?
I tried to do the 8 failed boots, but cannot get it to work with this installed.
Click to expand...
Click to collapse
I'm not sure if that will work, I guess it's worth a try, however if you replace the existing factory.zip and do a factory reset you will restore back to 1.01 instead of 1.0 if you don't already have a nc that has 1.01 on it. I saw another thread about trying to use the factory.zip with cwm, but I didn't see anyone coming back and say it worked. How to flash back to stock is found here:
http://nookdevs.com/Flash_back_to_clean_stock_ROM
mmaner said:
well im a tard... i did this without reading that YOU CANNOT HAVE GOOGLE APPS!!!! so anyway Im trying to get back to a stock image, but i cant figure out how to copy 700 med +/- of images to 134 meg f free space. someone un-tard me plz . thanks
Click to expand...
Click to collapse
The nookie froyo sdcard partition for me was 900+m, and I've heard that all you need to do for this to work is to flash the boot.img.
Ign3nt said:
Thanks to Shadowf0x for getting ABD to work
I have a question though, if I dont have the file "SDCARD" in my SD card then can I just make a new file and name it SDCARD, and put both of the .img's into it?
Click to expand...
Click to collapse
You could try to mount the media partition in nookie froyo and put them there.
The partition is /dev/block/mmcblk0p8 and type is vfat.
shad0wf0x said:
The nookie froyo sdcard partition for me was 900+m, and I've heard that all you need to do for this to work is to flash the boot.img.
Click to expand...
Click to collapse
Ill try it tonight. thanks
How to use ADB shell. Please back up your sd card before trying this
For all those not sure on how to install ADB shell and then the gingerbread ready xrecovery 0.3, Here is a simple tutorial on how to do it.
First download the xrecovery gingerbread ready zip from http://forum.xda-developers.com/showthread.php?t=859571 Then
1. Download http://forum.xda-developers.com/showpost.php?p=13430042&postcount=25 and put all the files into a folder in C drive, preferentially name the folder adb and extract the zip file into it.
(thanks doomlord for the link)
2. Connect phone to usb and computer and enable unknown sources and enable usb debugging.
3. Reboot into your current xrecovery
4. Go to start on the bottem left of your windows, then Run...
5. Type cmd and then press okay( run cmd )
6. Type cd \adb and press enter
7. Type adb.exe and press enter
8. Type adb shell and press enter
9. Type rm -r /sdcard and press enter
10. Type mkdir sdcard and press enter
11. Type chmod 777 sdcard and press enter
12. Now go to your phone and install custom zip x recovery gingerbread ready
13. Reboot and go back into your new xrecovery
This is for all those that have problems mounting recovery images all credits go to zdzihu and doomlord just providing a simpler way to install it
(btw this is a compilation of instructions from zdzihu's post and doomlord's post and i take absoulutely no credit for it)
good luck with that. All it does is erase, or make your old directory totally unavailable.
uh? it doesent erase anything all my files are still in my sd card just help to fix the cant mount image problem when ur flashing custom zip if your using like prerooted version of 2.3.3 doomlords etc.
my sdcard is coming up blank now in xrecovery....., and I can't connect with the usb either
### Plezzz BACK YOUR SD CARD OR ANY MOUNT/DRIVE UP BEFORE rm -rf /* ANYTHING. ###
All this is going to do is remove everything stored on your sdcard inclueing your security certs if u have passwords or screen locks. Also the only thing that xrec stores on your sd and backups zip an the logo.this will not remove any configs or xrec from the phone.
rm -r /sdcard/xrecovery <--- This Will Remove The Xrec data storeed on the phone but still this will not work .
and this is in the xrecovery install 1.0 see http://forum.xda-developers.com/showthread.php?t=859571
This is a dublepost
Great, thanx for tutorial?!
Weird im not a developer so i dun know why this is happening but my sd card is working perfectly and nothing has been erased. on ericwills rom for the past few hours and it is flying
For all those who dun want to mess around with adb shell, i suggest you to take a look at doomlords thread http://forum.xda-developers.com/showthread.php?t=1196808 if your recovery has some problems mounting images
fyi depending on your computer, it may end up corrupting your sdcard as well.
what computer os are u using? do a full reformat of your sd card?
** ADMINS/MODS, if your going to delete this thread, if you dont' mind please advising me on the correct way to post this or correct place, Thanks **
******************************************************
QUESTION: How can I create a update.zip (i.e., PG05IMG.zip) for the thunderbolt and then flash it with fastboot or in bootloader.
ANSWER: Flash a rom on your phone and then using adb
adb shell dd if=/dev/block/mmcblk0p25 of=/sdcard/system.img
Make a zip folder and put in it system.img along with boot.img from the
rom zip and whatever other partitions you want, perhaps a radio
mdm9k.img and radio.img along with a recovery.img and you can
make your own little custom rom to be flashed with fastboot or as an
update, then you can either put it on the sd card as an PG05IMG.zip and do
a bootloader update (s-off only) or fastboot flash zip (zipname.zip)
for eng-hboot only... really cool.
******************************************************
******************************************************
******************************************************
******************************************************************************************************************************************************************
1. Ok I've been trying dilligently in the past to do 2 things. I want to create my own SYSTEM.img from the roms i'm making so I can create PG05IMG's instead of .zips to flash, that way i can include the radio etc., this is for learning purposes (PLEASE DO NOT SUGGEST WELL KNOWN METHODS OR SIMPLY QUESTION WHY IM DOING THIS UNLESS ITS INVOLVED IN THE SOLUTION PROCESS.)
I have tried several different methods for backing up my system.img etc., I need someone to help me with this, and I'm willing to donate to get this done.
2. Secondly, I need to figure out a way to flash roms from command line using adb while the phone is in recovery, I don't have any problem flashing roms with fastboot if someone can show me or explain how to make the system.img actually work.
Already tried this:
Code:
adb push C:\ROM.zip /data/
adb shell
recovery --update_package=DATA:ROM.zip
This would simply make the thunderbolt go to an exclamation point and do nothing.
I was however able to get this to work on the same version of recovery 5.0.2.1 on a Nexus S I9020T, but not on the Thunderbolt ADR6400L.
Simple anlysis of questions
1. How can I turn a rom.zip (system folder) into a (system.img) "fastboot flashable"
2. How can I take a rom.zip and flash it in recovery using adb
Donation negotiable, and I appreciate any time/clues/answers/suggestions, but I really need to figure this out.
Hi there,
I have a plan in the works already since the beginning of last month. I call it CASUAL. Cross-platform Adb Scripting, Unified Android Loader. Its purpose is to do exactly what you wish. This is a project I intend to begin work on next month. I've set up a repository for the work and I will begin soon. Basically, it will do exactly what you want.
Edit: I do not intend on rushing for the bounty. My goal is to do it right. If someone wishes to rush it, go ahead and collect the bounty. My goal is to provide something which will create an infrastructure contained within a single cross-platform java file. I've got most of the heavy lifting already done from my Heimdall one-click project. However, in order to complete the job, it seems that I must reformat my desktop because my IDEs are acting wonkey.
AdamOutler said:
Hi there,
I have a plan in the works already since the beginning of last month. I call it CASUAL. Cross-platform Adb Scripting, Unified Android Loader. Its purpose is to do exactly what you wish. This is a project I intend to begin work on next month. I've set up a repository for the work and I will begin soon. Basically, it will do exactly what you want.
Edit: I do not intend on rushing for the bounty. My goal is to do it right. If someone wishes to rush it, go ahead and collect the bounty. My goal is to provide something which will create an infrastructure contained within a single cross-platform java file. I've got most of the heavy lifting already done from my Heimdall one-click project. However, in order to complete the job, it seems that I must reformat my desktop because my IDEs are acting wonkey.
Click to expand...
Click to collapse
Adam thanks for your response, really great to hear and the fact that your not rushing for money is great too I understand. But hey, without regard to the cross platform ADB rom flasher, can you just point me in the right direction as far as where to go to learn how to say, "make a system.img of a rom" so I can fastboot flash it..
Like so I can take a rom zip and be able to turn it into a system image that is fastboot flashable on the thunderbolt... at that point i can just manually flash the boot.img and radio and i'm good to go.
So if i can just figure out how to do that one little thing that would be huge and much appreciated... thanks so much man. I will gladly donate for an answer to this question.
halfcab123 said:
Adam thanks for your response, really great to hear and the fact that your not rushing for money is great too I understand. But hey, without regard to the cross platform ADB rom flasher, can you just point me in the right direction as far as where to go to learn how to say, "make a system.img of a rom" so I can fastboot flash it..
Like so I can take a rom zip and be able to turn it into a system image that is fastboot flashable on the thunderbolt... at that point i can just manually flash the boot.img and radio and i'm good to go.
So if i can just figure out how to do that one little thing that would be huge and much appreciated... thanks so much man. I will gladly donate for an answer to this question.
Click to expand...
Click to collapse
Generally, to flash a ROM, you type:
Code:
adb reboot bootloader
then on your desktop you use fastboot and type
Code:
fastboot oem unlock
fastboot flash your partition your file...
I'd follow this guide to get S-OFF: http://forum.xda-developers.com/showthread.php?t=1310014 then find your neato-bandito rom from this forum: http://forum.xda-developers.com/forumdisplay.php?f=943 and flash it.
AdamOutler said:
Generally, to flash a ROM, you type:
Code:
adb reboot bootloader
then on your desktop you use fastboot and type
Code:
fastboot oem unlock
fastboot flash your partition your file...
I'd follow this guide to get S-OFF: http://forum.xda-developers.com/showthread.php?t=1310014 then find your neato-bandito rom from this forum: http://forum.xda-developers.com/forumdisplay.php?f=943 and flash it.
Click to expand...
Click to collapse
Thanks Adam, but, I already know how to flash partitions in fastboot, but what i need to know is how to "make" partitions. as in like, take a system folder and turn it in to a system.img so i can fastboot flash system system.img
Please please need to know thanks
halfcab123 said:
Thanks Adam, but, I already know how to flash partitions in fastboot, but what i need to know is how to "make" partitions. as in like, take a system folder and turn it in to a system.img so i can fastboot flash system system.img
Please please need to know thanks
Click to expand...
Click to collapse
That's not overly hard to do. There's a guide I think on the cyanogen website for how to do it. Basically you use the "dd" tool in linux.
yareally said:
That's not overly hard to do. There's a guide I think on the cyanogen website for how to do it. Basically you use the "dd" tool in linux.
Click to expand...
Click to collapse
Dude please, can you walk me through it, like I said I'll donate. Or alteast give me a link to where its at, then i'll turn this post into a how to for noobs. I learn at 300,000,000 m/s^2
halfcab123 said:
Dude please, can you walk me through it, like I said I'll donate. Or alteast give me a link to where its at, then i'll turn this post into a how to for noobs. I learn at 300,000,000 m/s^2
Click to expand...
Click to collapse
It looks like there's a stupidly large amount of partitions on the Thunderbolt. if you can do this:
Code:
adb shell mount
and get the partition information, I can tell you how to do a backup and restore.
it will be something like this.. this gets run once to get a temporary storage area on the /sdcard
Code:
adb shell mkdir /sdcard/mybackup
Code:
mkdir /PATH/TO/YOUR/DESKTOP/backup
adb shell dd if=/dev/block/mmcblk0p25 of=/sdcard/mybackup/system.img
adb pull /sdcard/mybackup/system.img /PATH/TO/YOUR/DESKTOP/backup/system.img
These commands do: make a new folder for working on your desktop. direct disk backup of mmcblk0p25 (SYSTEM partition). Pull the system.img to your working folder on your desktop.
If you have your image on a Linux or Mac desktop, you can mount it like this..
Code:
cd /PATH/TO/YOUR/DESKTOP/backup
mkdir MountFolder
sudo mount ./system.img ./MountFolder
#if this doesnt work, then do this
sudo mont -o loop -t ext3 ./system.img ./MountFolder
you can make changes to the system which has been mounted onto your computer. Then unmount it and push it back to your device.
to unmount and flash it back you do this:
Code:
sudo umount ./MountFolder
adb push /PATH/TO/YOUR/DESKTOP/backup/system.img /sdcard/mybackup/system.img
adb shell dd if=/sdcard/mybackup/system.img of=/dev/block/mmcblk0p25
This pushes your backup to your device, then does a direct disk write of the image file to the disk partition
↑ last poster pretty much sums it up in detail
AdamOutler said:
It looks like there's a stupidly large amount of partitions on the Thunderbolt. if you can do this:
Code:
adb shell mount
and get the partition information, I can tell you how to do a backup and restore.
it will be something like this.. this gets run once to get a temporary storage area on the /sdcard
Code:
adb shell mkdir /sdcard/mybackup
Code:
mkdir /PATH/TO/YOUR/DESKTOP/backup
adb shell dd if=/dev/block/mmcblk0p25 of=/sdcard/mybackup/system.img
adb pull /sdcard/mybackup/system.img /PATH/TO/YOUR/DESKTOP/backup/system.img
These commands do: make a new folder for working on your desktop. direct disk backup of mmcblk0p25 (SYSTEM partition). Pull the system.img to your working folder on your desktop.
If you have your image on a Linux or Mac desktop, you can mount it like this..
Code:
cd /PATH/TO/YOUR/DESKTOP/backup
mkdir MountFolder
sudo mount ./system.img ./MountFolder
#if this doesnt work, then do this
sudo mont -o loop -t ext3 ./system.img ./MountFolder
you can make changes to the system which has been mounted onto your computer. Then unmount it and push it back to your device.
to unmount and flash it back you do this:
Code:
sudo umount ./MountFolder
adb push /PATH/TO/YOUR/DESKTOP/backup/system.img /sdcard/mybackup/system.img
adb shell dd if=/sdcard/mybackup/system.img of=/dev/block/mmcblk0p25
This pushes your backup to your device, then does a direct disk write of the image file to the disk partition
Click to expand...
Click to collapse
This is very informative and I actually realized something that I think will definitely help me, however its kinda not really the answer to my question.. and at the same time it is kind of another solution to the question that I asked.
What I asked was how to turn the system folder from a *.zip "rom" into a system.img that was fastboot flashable
You basically told me how to make a backup of the system, modify, and flash back to my phone.... which is interesting...
Basically what I take from this, please let me know if i'm on the right track here:
If the goal is to flash a rom on an htcdev unlocked phone one would:
(assuming system.img already created from backup, flashing to another phone)
Code:
adb reboot recovery
adb shell dd if=/dev/zero of=/dev/block/mmcblk0p6 (data wipe)
adb shell mount /sdcard/
adb shell dd if=/sdcard/system.img of=/dev/block/mmcblk0p25
adb reboot bootloader
fastboot erase cache
fastboot flash boot boot.img
fastboot reboot
After trying this, I was both unable to mount sd card for some odd reason
using adb shell mount /sdcard/ and I was also unable to wipe data
at partition mmcblk0p6 with /dev/zero it just hung for 4 minutes.. does it take longer ? I ended it.
My only other option that I can think of is to downgrade the thunderbolt and run revo to get s-off and then make a PG05IMG.zip with a custom system.img and boot.img and flash it as a PG05IMG.zip in bootloader... so coming from this direction which seems to be much much easier, if I say took a PG05IMG for the MR4 (2.11.605.9) replaced the hboot with an eng-hboot, replaced the system.img and the boot.img would it work ??? I'm going to try it lol, probably going to be an epic fail.. any comments appreciated.
UPDATE: after posting this I realized that with a revolutionary s-off, the hboot is protected from being updated with an RUU, in bootloader so I would not have to worry about replacing the HBOOT, the only reason I even mentioned it was because I know that the hboot in the official MR4 RUU is the dev method supported hboot and would probably throw a security warning after flashing... etc., once again any help is great.
There is no direct 1:1 way to convert. However, you can use the update script in the Meta folder as a guide. It will have information to copy files into the system folder and applysymlinks. The commands used by recovery all have a Linux equal.
Delete = rm
Delete recursive = rm -rf
symlink = ln -s
copy = cp
These are android recovery commands which must be translated to their Linux shell equivalants.
AdamOutler said:
There is no direct 1:1 way to convert. However, you can use the update script in the Meta folder as a guide. It will have information to copy files into the system folder and applysymlinks. The commands used by recovery all have a Linux equal.
Delete = rm
Delete recursive = rm -rf
symlink = ln -s
copy = cp
These are android recovery commands which must be translated to their Linux shell equivalants.
Click to expand...
Click to collapse
what if i just straight take the system.img and boot.img and throw them in a PG05IMG.zip and use bootloader to update, will that work ?
halfcab123 said:
what if i just straight take the system.img and boot.img and throw them in a PG05IMG.zip and use bootloader to update, will that work ?
Click to expand...
Click to collapse
I don't know what a pg05img is. However, with samsung devices, we use dd'd system images to flash with Odin. Odin works sorta like fastboot. I don't know if that will help you because I generally use Samsung devices and Samsung does things differently than the rest of Android. From what I understand, fastboot flashing is similar, but I don't know if you can DD an image from a device and just fastboot flash it back onto a device. You can do this with Odin. I don't think there are provisions for flashing images in recovery directly. They DO have executables encorperated within zip files for flashing modems and bootloaders. Before trying a non-standard flashing method, you need to do some reading. It can be risky.
AdamOutler said:
I don't know what a pg05img is. However, with samsung devices, we use dd'd system images to flash with Odin. Odin works sorta like fastboot. I don't know if that will help you because I generally use Samsung devices and Samsung does things differently than the rest of Android. From what I understand, fastboot flashing is similar, but I don't know if you can DD an image from a device and just fastboot flash it back onto a device. You can do this with Odin. I don't think there are provisions for flashing images in recovery directly. They DO have executables encorperated within zip files for flashing modems and bootloaders. Before trying a non-standard flashing method, you need to do some reading. It can be risky.
Click to expand...
Click to collapse
I just made my own PG05IMG.zip and updated in bootloader and it booted into a custom rom, and this is after i erased userdata, cache, system, so i know it works, i even
fastboot oem rebootRUU
fastboot flash zip "customzip.zip"
and that worked too, so stoked man, I can't believe I finally figured it out.
As soon as you told me the mmcblk0p25 could be backed up, it clicked, funny thing is I knew that but I guess I just didn't think it was that simple.
I installed [ROM] [4.4.2] CyanogenMod 11.0 from here
everything runs fine,but i cant write files to the internal storage.
For instance if i start the gallery app it tells me "No internal storage available",another app tells me it "cant write to the cache folder" because the sd is full,mounted,or write locked.Root explorer sees all the files but cant delete,move or copy/paste anything.
Apps that save/download files like podkicker or reddit act normal when trying to save the file but after the download starts the notification disapears and the file is simply not downloaded.Apps that stream content work fine,like youtube,or the stream feature of podkicker.
I have over 2gb free space so its not that,and if i plug into my pc i can move and delete files no problem.I like the rom and like i said everything else seems to work fine.
Thanks in advanced for any help.
I installed [ROM] [4.4.2] CyanogenMod 11.0 from here
everything runs fine,but i cant write files to the internal storage.
For instance if i start the gallery app it tells me "No internal storage available",another app tells me it "cant write to the cache folder" because the sd is full,mounted,or write locked.Root explorer sees all the files but cant delete,move or copy/paste anything.
Apps that save/download files like podkicker or reddit act normal when trying to save the file but after the download starts the notification disapears and the file is simply not downloaded.Apps that stream content work fine,like youtube,or the stream feature of podkicker.
I have over 2gb free space so its not that,and if i plug into my pc i can move and delete files no problem.I like the rom and like i said everything else seems to work fine.
Thanks in advanced for any help.
EDIT:
YAY i got it,
thanks stevemp and Quallenauge,a couple of the things needed to be a bit different though like the "# rm -rf data/*",and the push location line,heres what i did
Plug in the tablet with usb debugging enabled
run cmd and get adb going
type
adb shell
stop
rm -r data/*
mkdir data/local
mkdir data/media
exit
then push the rom file with [adb path]/adb push [rom path] /mnt/storage
when the push finished type adb reboot hold the volume down button and press enter
once rebooted into sde go to dev menu remove android kernel if necessary then choose flash kernel and initramfs
copy the files over
reboot
Everything seems to be working now i can read write files all day.
THANKS AGAIN!!
I'm having the same problem, with both CM11 and 10.2.0 on Verizon LG G2. Could it be a permissions problem?
lalalalas said:
I'm having the same problem, with both CM11 and 10.2.0 on Verizon LG G2. Could it be a permissions problem?
Click to expand...
Click to collapse
Its weird because i can write to the root directory but not any folders in it.Root explorer and es file manager say that its read only but neither will let me switch to read/write.
I made a logcat from boot[at least i think i made it rite,never had to do one before]
But i cant post the link because i dont have 10 posts just add this rpqjxGhG to pastebin
This all also happens with external sdcards as well it turns out,i just tried to make a new file with the built in file manager on the external sd and it said it requires elevated permissions,
root explorer just says file creation failed.
I also get constant "unfortunately,Trebuchet has stopped" messages when doing any thing.
I have also tried terminal emulator for kicks.
I gave it su then tried
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system]
didnt change a thing
then i tried
adb remount
this said error: device not found
Im pretty sure its not my tablet as i can can go back to stock/stock root and write files perfectly fine,ive also re-downloaded the rom twice just to make sure it wasnt bad,and ive probably flashed it around 20 time by now all with the same result.
I hope someone can figure something out.
leadtk said:
Its weird because i can write to the root directory but not any folders in it.Root explorer and es file manager say that its read only but neither will let me switch to read/write.
I made a logcat from boot[at least i think i made it rite,never had to do one before]
But i cant post the link because i dont have 10 posts just add this rpqjxGhG to pastebin
This all also happens with external sdcards as well it turns out,i just tried to make a new file with the built in file manager on the external sd and it said it requires elevated permissions,
root explorer just says file creation failed.
I also get constant "unfortunately,Trebuchet has stopped" messages when doing any thing.
I have also tried terminal emulator for kicks.
I gave it su then tried
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system]
didnt change a thing
then i tried
adb remount
this said error: device not found
Im pretty sure its not my tablet as i can can go back to stock/stock root and write files perfectly fine,ive also re-downloaded the rom twice just to make sure it wasnt bad,and ive probably flashed it around 20 time by now all with the same result.
I hope someone can figure something out.
Click to expand...
Click to collapse
When installing the CM11 firmware, did your format/reset your "android+storage" in "format device" recovery menu?
Storage files should be /mnt/sdcard/ (internal storage) and /mnt/media_rw/sdcard1/ (extern sdcard).
I'm able to create files in both directories as well on the file explorer.
If you want to "unlock" the root ( / ) partition you have to use this one inside the shell:
Code:
mount -o remount,rw /
but this don't have some effects to the mounted storage files.
Quallenauge said:
When installing the CM11 firmware, did your format/reset your "android+storage" in "format device" recovery menu?
Storage files should be /mnt/sdcard/ (internal storage) and /mnt/media_rw/sdcard1/ (extern sdcard).
I'm able to create files in both directories as well on the file explorer.
If you want to "unlock" the root ( / ) partition you have to use this one inside the shell:
Code:
mount -o remount,rw /
but this don't have some effects to the mounted storage files.
Click to expand...
Click to collapse
I was updating by putting the firmware file on the the device then rebooting and flashing the zimage and initramfs,
The reason being if i reset the "android+storage" dosnt that mean the firmware is deleted?
adb dose not see the tablet when its in recovery,it does see it when its on[am i doing something wrong there?],so i cant push the files,and if i export the data partition in windows a pop up and says it needs to be formatted before it can be used.so how am suppose to get the file to the device if i format everything?
leadtk said:
I was updating by putting the firmware file on the the device then rebooting and flashing the zimage and initramfs,
The reason being if i reset the "android+storage" dosnt that mean the firmware is deleted?
adb dose not see the tablet when its in recovery,it does see it when its on[am i doing something wrong there?],so i cant push the files,and if i export the data partition in windows a pop up and says it needs to be formatted before it can be used.so how am suppose to get the file to the device if i format everything?
Click to expand...
Click to collapse
From the guide, install using adb. http://forum.xda-developers.com/showthread.php?t=1871912
Originally Posted by surdu_petru
Installation : Now should be work on all devices Gen9 !!!
...connect USB cable to PC and ( you need to use a Rom with root access ) :
> adb shell
# stop
# rm -rf data/*
# mkdir data/local
# mkdir data/media
# exit
> adb push archos.ext4 /local/ ( need to wait about ~150 seconds ) !
> at the same time do : adb reboot & press and keep volume down ; in SDE -> DEM-> Remove Android Kernel ( if exist ) -> Flash Kernel & Initramfs -> copy here zImage & initramfs.cpio.gz -> OK -> wait to reboot !
Click to expand...
Click to collapse
If you are a Linux user. http://forum.xda-developers.com/showpost.php?p=48731942&postcount=1
YAY i got it,
thanks stevemp and Quallenauge,a couple of the things needed to be a bit different though like the "# rm -rf data/*",and the push location line,heres what i did
Plug in the tablet with usb debugging enabled
run cmd and get adb going
type
adb shell
stop
rm -r data/*
mkdir data/local
mkdir data/media
exit
then push the rom file with [adb path]/adb push [rom path] /mnt/storage
when the push finished type adb reboot hold the volume down button and press enter
once rebooted into sde go to dev menu remove android kernel if necessary then choose flash kernel and initramfs
copy the files over
reboot
Everything seems to be working now i can read write files all day.
THANKS AGAIN!!
leadtk said:
YAY i got it,
thanks stevemp and Quallenauge,a couple of the things needed to be a bit different though like the "# rm -rf data/*",and the push location line,heres what i did
Plug in the tablet with usb debugging enabled
run cmd and get adb going
type
adb shell
stop
rm -r data/*
mkdir data/local
mkdir data/media
exit
then push the rom file with [adb path]/adb push [rom path] /mnt/storage
when the push finished type adb reboot hold the volume down button and press enter
once rebooted into sde go to dev menu remove android kernel if necessary then choose flash kernel and initramfs
copy the files over
reboot
Everything seems to be working now i can read write files all day.
THANKS AGAIN!!
Click to expand...
Click to collapse
I do not know what i am doing wrong but when i type adb shell ..all i get is BUSYBOX v1.7.2 (2012-10-19 CEST) built in shell (ash) Enter help for a list of built in commands ...
I did have ics blue v04 rom on my tablet that i was trying to go from to 4.4.2 ..
I did this before and had the write problem . any help you can give would be appreciated