quesion on fastboot - G1 Android Development

has anyone had a chance to try
Code:
fastboot update update.zip
where update.zip contains img files from the build output of android source.

fastboot flashall xxxxx.zip
try this

Is there a structure to this update.zip or we just zip the img files into update.zip.
Coz the update.zip that is loaded from the sdcard through the bootloader screen is using update-script !!

Related

[Resolved] [Q] How to install stock rom from RUU on Wildfire using linux only?

Hi!
I have an HTC Wildfire, have it rooted, clockwork and cyanogenmod installed. Now, I need to send it back for repair an therefor restore everything as it was. This thread is great help: http://forum.xda-developers.com/showthread.php?t=1160251
I have a problem though: I don't have Windows except for Virtualbox and RUU won't work there. So I need to install the data from RUU*.exe using linux tools only.
So far I have extracted the rom.zip file using wine and
Code:
find .wine/drive_c/ -name 'rom.zip' -exec cp -v {} ./update.zip \;
Inside this rom.zip I have the following:
Code:
android-info.txt radio.img recovery.img system.img userdata.img boot.img hboot_7225_1.01.0001_101117.nb0 rcdata.img splash1.nb0
So I boot into the recovery and try to flash rom.zip which I have renamed to update.zip and copied to /sdcard/. I needed to turn signature checkings off to get past signature checking error, now I get following:
Code:
E:Can't open /sdcard/update.zip
(bad)
Installation aborted
I assume that it is possible to install all the *.img and *.nb0 files, but in what order do I have to install them and how exactly? I have linux, fastboot and adb at my disposal. HTCFlasher doesn't work with wildfire. So, how do I get my stock rom back? Does anybody have an idea?
Found out myself (sort of).
Ok, I bit the bullet, cleaned the cache and did as follows from a folder with all the rom images:
Code:
fastboot flash boot boot.img
fastboot flash radio radio.img
fastboot flash rcdata rcdata.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash userdata userdata.img
fastboot erase cache
fastboot reboot
Now I have HTC stock firmware with HTC Sense on top of it. Probably no root, but I need it to send my wildfire back for repair anyway.
Last thing to do: install hboot with
Code:
fastboot oem mb 9C068490 1 30
fastboot flash hboot hboot_7225_1.01.0001_101117.nb0
Let's hope it'll work.
EDIT: It did work indeed!
Code:
BUZZ PVT SHIP S-ON
HBOOT-1.01.0001
Does anybody know what "fastboot oem mb 9C068490 1 30" exactly does? Except that it is an OEM command of course?

one S stuck

my friend have one s then he flash it with recovery for "one X " after that the phone wont boot only stuck on "hTC this build is for development purposes only do ...etc" and every time i reboot it it gives me the same message
also it says **TAMPERED** whats that mean ?
Ouch. You should have followed the directions to flashing recovery for the One S not X. But I guess you know that now. Tampered means the sky is going to swallow you up in 24 hours. I'd find cover.
Lolz...jk. tampered. Modded. Unlocked bootloader....don't worry about it. As far as getting out of your situation. Go to the Q&A section.
Sent back in time to find Marty.
boot into bootloader and flash the correct recovery..
after that flash a different ROM after doing a full factory reset. You should be fine
azzledazzle said:
boot into bootloader and flash the correct recovery..
after that flash a different ROM after doing a full factory reset. You should be fine
Click to expand...
Click to collapse
i flash the correct recovery and i tried factory reset it didnt work
flash a different ROM then, Chances are if the old owner flash recovery for a One X, he probably flashed a ROM for the One X too !
first off, let someone ok this before you do it as the one s may be different with erasing system than my N1 is, since it has no actual sdcard
you could also try
fastboot erase system
fastboot -w
before doing any fastboot flashing of recovery then rom
maybe even fastboot erase recovery after fastboot -w
have everything on one s sdcard before doing this
without a system wipe, sometimes old rom remnants are left behind and not overwritten when new rom flashes. also one time I had to erase system before recovery would flash
You have various options, depending on your current state, which is always tough to judge if not having the actual device.
You can
1. push system.img and boot.img via bootloader
Start the 1.53 RUU and then look in TEMP folder in a folder with current date, then in the subfolder you find rom.zip. Copy that to another place outside of TEMP.
Now unzip with winrar and copy system.img and boot.img to fastboot folder along with a proper custom recovery
Now flash the 3 images with
fastboot flash boot boot_signed.img
fastboot flash system system.img
fastboot flash recovery r2-modaco-recovery-clockwork-touch-ville.img
Here`s the custom recovery for you - http://minus.com/mIA3OFkYq/4
Now reboot with
fastboot reboot
OR
2. Restore my clean stock nandroid backup
Part 1 - add clockworkmod folder (in case you don`t have them yet)
Boote in recovery and in cmd navigate to fastboot folder
Now type:
adb shell
then
mkdir /sdcard/clockworkmod
then
mkdir /sdcard/clockworkmod/backup
then
mkdir /sdcard/clockworkmod/backup/stockbackup
Now we have the empty folders.
Part 2 - Nandroid push and restore
Now we push the single parts of my backup in clockworkmod/backup folder. Navigate to your fastboot folder in cmd and type:
adb push .android_secure.vfat.tar /sdcard/clockworkmod/backup/stockbackup
adb push boot.img /sdcard/clockworkmod/backup/stockbackup
adb push cache.ext4.tar /sdcard/clockworkmod/backup/stockbackup
adb push data.ext4.tar /sdcard/clockworkmod/backup/stockbackup
adb push nandroid.md5 /sdcard/clockworkmod/backup/stockbackup
adb push recovery.img /sdcard/clockworkmod/backup/stockbackup
adb push system.ext4.tar /sdcard/clockworkmod/backup/stockbackup
Now we have everything in sdcard/clockworkmod/backup/stockbackup
Now you can restore that backup in recovery.
http://minus.com/mquC9WDG6/4
Tip: If you are sure your data partition is fine, you can leave out the data.ext4.tar, but make sure you also delete the md5 of data.ext4.tar before in nandroid.md5. That way you would restore wiithout having data loss
good process and "command" info, even if you don't need to do all of it
especially for folks not real familiar with fastboot/adb
hope OP gets it working

Help - unbrick using fastboot and files from update.zip?

I have bricked my kyobo ereader (gingerbread 2.3.5) but still have fastboot and limited adb (no shell commands since there is no valid system) access on the device.
I have various update.zips for the device but unfortunately these are installable only on a working system (via settings->privacy->updates) and I know of no way of installing the update.zip since there does not appear to be any custom recovery for this ebook reader and booting into recovery does not install the update.zip on the sdcard.
The update.zip for the Kyobo ereader contains boot.img, recovery.img and a system folder containing files and directories for the system partition (an example of an official update.zip is available from m.kyobobook.co.kr/mirasol/update.zip )
I have extracted the system folder on a ubuntu system and need to prepare a system.img file which may be flashed using fastboot. I have also changed owner of the extracted files to root:root and chmod 777 on all the executables in the extracted system folders. A complication is that I only have the windows qualcomm hsusb drivers for fastboot or adb to connect to a pc, so I must use a windows 7 notebook to flash the device (possibly precluding pushing the system folder files to the device since they don't have permission and owner settings in windows)
I have tried various tools to make a system.img including the native linux mkcramfs and tools suggested by various google searches such as mkfs.yaffs2.x86 and make_ext4fs. All these tools could prepare a system.img but unfortunately they have different sizes and I am not sure which img is the correct one. I have tried to flash the various system.img using both fastboot flash system system.img and also by adding the system.img to the update.zip (together with placeholders for the required android-info.txt but in all cases they do not any files onto the sytem partition (although fastboot does send the system.img successfully to the device and writes the 120~180MB img files in about 50-70seconds. I have tried using both the official boot.img and the rooted boot.img. I noticed that the device reboots twice after such flashing which may be because there is some protection from the official recovery.img which checks the system partition an erases it if it does not match.
My first 2 questions are general and the third is specific to my situation:
1. What is the correct tool to generate an android system.img file from the extracted update.zip's system folder on a linux system?
2. Any suggestions on how to flash an update.zip using fastboot or adb?
3. Are there any generic recovery.img which I could try to flash over the official recovery partition on the kyobo mirasol ereader?
Any suggestions anyone?

[Tutorial] Edit Recovery Ramdisk/Change Images etc... - N00b friendly tuto

Introduction
Hi. Before continuing, what is recovery? Your Android device has 6-10 partitions. They are boot, recovery, system, misc and many more. Recovery is a partition like them. In this tutorial, we'll edit a recovery IMG ramdisk without compiling it from source.
Let' s Begin!
We'll just edit the ramdisk of recovery. So what is ramdisk? Ramdisk is a small partition in recovery img. It manages and contains init files. A normal ramdisk contains these files and folders :
Code:
./init.trout.rc
./default.prop
./proc
./dev
./init.rc
./init
./sys
./init.goldfish.rc
./sbin
./sbin/adbd
./system
./data
A recovery ramdisk contains extra files. :
Code:
./res
./res/images
./res/images/progress_bar_empty_left_round.bmp
./res/images/icon_firmware_install.bmp
./res/images/indeterminate3.bmp
./res/images/progress_bar_fill.bmp
./res/images/progress_bar_left_round.bmp
./res/images/icon_error.bmp
./res/images/indeterminate1.bmp
./res/images/progress_bar_empty_right_round.bmp
./res/images/icon_firmware_error.bmp
./res/images/progress_bar_right_round.bmp
./res/images/indeterminate4.bmp
./res/images/indeterminate5.bmp
./res/images/indeterminate6.bmp
./res/images/progress_bar_empty.bmp
./res/images/indeterminate2.bmp
./res/images/icon_unpacking.bmp
./res/images/icon_installing.bmp
./sbin/recovery
So we know contents of ramdisks, let' s edit a recovery!
First, you must use Linux for this. I prefer Ubuntu 12.04+. Then, install Gzip and Gunzip packages to unpack recovery IMG. Then find and download a recovery IMG for your device. I prefer; download CWM image because TWRP isn't basic. You can download CWM from here: http://www.clockworkmod.com/rommanager.
Unpacking the recovery image
Create a new directory on your desktop. Then download and put these Perl scripts to that directory( Perl scripts are in zip files. Extract those scripts! ): http://forum.xda-developers.com/attachment.php?attachmentid=128714&d=1226283768 and http://forum.xda-developers.com/attachment.php?attachmentid=128715&d=1226283768 . Then put your downloaded recovery image to the same folder and rename it to recovery.img . Then open a terminal console and navigate it to your folder. Run unpack script with this command ( Just enter this command when you're in the your new directory on terminal ) :
Code:
unpack-bootimg.pl
And finally, we unpacked the recovery image. Note that these scripts should work for all partition images.
Editing the ramdisk
Now, we unpacked the image that means you can edit he ramdisk. Go to ramdisk-recovery.img folder. That is ramdisk of our recovery image. So you're free! Edit as you like. Just tamper the ramdisk and other folders. By the way, recovery PNGs are in the /res/images/ ( In ramdisk folder ) folder. After editing the ramdisk let' s pack the recovery image;
Repacking
To repacking the image just enter this command in terminal ( Don't forget to navigate your directory using this command; cd /UserName/Desktop/FolderName ) :
Code:
repack-bootimg.pl
Congrats! You just edited the recovery ramdisk . Don' t forget to use Thanks button . You can install the IMG file using Fastboot.

Difference between .img and .zip files?

Dear Experts
Or, at least those more experienced that me,
I've been looking into flashing the ROM of
an Android phone to Lineage OS.
The scant documents that I've looked at
Install LineageOS on lake | LineageOS Wiki
wiki.lineageos.org
Say to first load the .img file,
fastboot flash boot <recovery_filename>.img
Then later:
adb sideload Lineage.zip
What is the difference between the
.img file, and the .zip file?
Is the .img file a prereq for the .zip?
...
Why run both files?
Instead of the 2 stage process,
why not just flash the .zip file?
Thanks
The .IMG file extension is used for disk dumps, whereas .ZIP file extension is used for any content what got compressed.
Fastboot requires disk dumps ( .IMG ), whereas ADB requires archives ( .ZIP ) passed in.
@xXx yYy
More explanations, great.
So, can you go directly to ADB, and
sideload the .zip?
Or, is it always a two (or more) stage process,
fastboot .img file, then
adb sideload .zip?
Thanks

Categories

Resources