[Q] How does fastboot work? - General Questions and Answers

I'm trying to figure out how fastboot works. I guess it unpacks the .img files into their designated partitions right (another tactic would be to unpack them every time on powerup, but that doesn't make much sense)?
Generally, Is there a good place to get information about android internals (architecture/design documents).
Thanks a lot,
Oren

spierg said:
I'm trying to figure out how fastboot works. I guess it unpacks the .img files into their designated partitions right (another tactic would be to unpack them every time on powerup, but that doesn't make much sense)?
Generally, Is there a good place to get information about android internals (architecture/design documents).
Thanks a lot,
Oren
Click to expand...
Click to collapse
here is a link that should explain everything http://android-dls.com/wiki/index.php?title=Fastboot
Sent from my Fire Kindling A-Pad

Related

expand a nandroid img file

for those who do not know how to do this yet, follow directions given here.
Just took this info from the web. None of this except for the guide is written by me.
I am not responsible for anything please do not contact me if a green sludge starts attacking your neighborhood eating one person at a time.
************************************************************
************************************************************
************************************************************
http://code.google.com/p/unyaffs/downloads/list
made for linux, but if you know a bit of c, you can probably change it to work with windows, maybe I will do that if I have some time this week.
********OR********
http://jiggawatt.org/badc0de/android/unyaffs-x86-win.zip
or http://www.4shared.com/get/fgryPnPx/unyaffs-windows.html
for windows..... instructions below apply for both
if not included in the zips above, cygwin1.dll and unyaffs.exe are included as an attachment of this reply.
open up a command line, in windows vista/7 just press start and then type cmd press enter and change the directory to the folder with the unyaffs and the img in it. in xp press start>run>cmd... then the same
the usage is: unyaffs /path/to/img
example:
(if unyaffs.exe and system.img are both in c:\temp)
"c:\temp> unyaffs /temp/system.img"
note: the '/' is the way linux determines the pathname of a file and since it is built using cygwin(a file allowing for windows) it is preferrable that the path to the actual file is in unix POSIX format ie: / instead of \ between folders and files.
*********WARNING************
this will extract to directory that unyaffs binary is in.
That's so weird -- I was gonna post the same thing tonight. Thx for writing this up. It's odd that more people don't talk or ask about this tool!
I remember reading this stuff back when I got my G1, and tonight I was trolling the themes and apps section cause I couldnt sleep. (which I rarely look at)
I was baffled that this wasnt common knowledge. I figured if there was no threads about it that people just knew how and didnt have any problems with it. My mistake lol...
enjoy.
can you please explain what is it? what it does? thanks
ericizzy1 said:
can you please explain what is it? what it does? thanks
Click to expand...
Click to collapse
Umm, it expands nandroid img files not sure how else to explain it. Clockworkmod backups are in the img file format. This process allows you to extract those files to get stuff out of them
Sent from my SPH-D700 using XDA App
When you create a backup in Clockwork recovery, it leaves you with a folder like this:
2010-11-18.08.52.49
As you can prob figure out, I made that backup on 11/18 at 8:52am
Inside that folder are .img files, such as: data.img and system.img
Those files basically contain your data (like apps you've installed from market) and system (..system apps that might've come with the phone).
In the orig post, he's explaining how to extract the files from these large .img files.
To give an example, I had a couple of corrupted clockwork backups, and wanted to ONLY pull out some database files (like text messages and call logs) which were not corrupted. Even tho the backup was messed up, I could still extract the files I needed by using the method above, then copied them manually to my phone.
decalex said:
When you create a backup in Clockwork recovery, it leaves you with a folder like this:
2010-11-18.08.52.49
As you can prob figure out, I made that backup on 11/18 at 8:52am
Inside that folder are .img files, such as: data.img and system.img
Those files basically contain your data (like apps you've installed from market) and system (..system apps that might've come with the phone).
In the orig post, he's explaining how to extract the files from these large .img files.
To give an example, I had a couple of corrupted clockwork backups, and wanted to ONLY pull out some database files (like text messages and call logs) which were not corrupted. Even tho the backup was messed up, I could still extract the files I needed by using the method above, then copied them manually to my phone.
Click to expand...
Click to collapse
thx
Sent from my SPH-D700 using XDA App
smeyerhuky said:
Umm, it expands nandroid img files not sure how else to explain it. Clockworkmod backups are in the img file format. This process allows you to extract those files to get stuff out of them
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
Right, like if you wanted a file or a few files from clockworkmod img backup, then this process would give you an extended file system, other than what you would normally use to extract the img files. Just trying to understand this so, please correct me if im wrong.... I've been trying to get more knowledge of this, so im still learning.
I prolly sound like a complete idiot, lol...
Sweet! Thanks for this man. I'd been looking for how to do this for some time and kept ending up learning about emulation or some other tangential topic. This is the basic functionality I was looking for. Thanks for posting!
Np. I'm working on writing some stuff on top of the source code that should allow you to browse and pull just one our more file
Its been a but since I looked theory source code so it might take a while... Maybe in between semesters?
Sent from my SPH-D700 using XDA App
Dode you saved my as** thx big thx
Great, now how can I re-compress back to .img after I've made the changes that I want?
EDIT: Nevermind. I just made a zip of the new system folder and flashed it in CWM.
This worked great for me.
Thanks,
Bud
Man, I do not know how to thank you. I was able to recover some important stuff off of my cwm recovery backup. THANKS!!

I just broke webtop

Can someone who has webtop tar up thier osh and post a place I can grab it.
I have been working to get a full version of ubuntu going in webtop, and I was working on reverse engineering the way they did it with the bionic and that did not work well
I will buy a beer or coffee for anyone who can do this for me.
Thanks,
Jim
just got home. give me a few minutes
what file format you want?
You rock, does not matter much, a tar or zip or 7zip or bz2... whatever you put it in I can take it and put it back in place from there.
Thanks,
Jim
lol. while it was pulling, i was messing around with my phone and crashed it..
re-pulling
OSH.IMG.TGZ
dd if=/dev/block/webtop of=/mnt/sdcard/osh.img
did you get it?
Yes, I did. I also gave a donation to you.
THANK YOU!
Jim
I was able to get my webtop working again, by whacking tomoyo, that is the Linux FACL that they are using for webtop.
Thanks again for your help.
Jim
I just broke webtop and I was hoping you could explain to me how to restore it using this .img.tar.gz file. I don't have a clue what to do with it. Please help! I messed up my osh file pretty miserably.
matthewsteross said:
I just broke webtop and I was hoping you could explain to me how to restore it using this .img.tar.gz file. I don't have a clue what to do with it. Please help! I messed up my osh file pretty miserably.
Click to expand...
Click to collapse
it think it's a dd image, so just do the reverse;
dd if=osh.img of=/dev/block/webtop
I'm sorry. I'm oblivious as to what you're talking about... I'm am sorry for my ignorance, is that a command prompt thing for windows or is that something I would use adb for? Also, how do I thank you for replying?
matthewsteross said:
I'm sorry. I'm oblivious as to what you're talking about... I'm am sorry for my ignorance, is that a command prompt thing for windows or is that something I would use adb for? Also, how do I thank you for replying?
Click to expand...
Click to collapse
This thread was from before we had the FXZ files to flash from fastboot.
I believe the proper way to restore webtop would be to grab the 55.11.16 release FXZ. Extract it and extract moto-fastboot to the same directory. Run a cmd and cd to the directory.
Put your phone into fastboot mode by holding volume down while you power it on, hook it up via usb, and
(or you can use the two button salute and choose it from the boot menu)
Code:
moto-fastboot.exe flash webtop grfs.img
You can then use motorola's faux-55.13.26 update to reapply the patches to update the webtop partition to the 55.13.25 version.
This tar.gz file would still work, you'd need to decompress it, adb shell into the phone, run su (to get root) and then run the commands from the directory where the img is stored. I don't think you need busybox to run dd... could be wrong
Flashing with fastboot is the more elegant solution.
(note it's probably not a good idea to write the img files from the fxz directly with dd.)DON'T CROSS THE STREAMS!
I got it to work by flashing in fastboot, thanks for all your help! All is well again and I even have Linux unlocked and running the XFCE-4 desktop environment. Thanks for all your help!

[Q] Is there any APK to exact the boot.img in the phone

I want to unpack the img but don't want to use in my pc(too confused).
so I want to unpack by the phone,
thank you
ytyyutianyun said:
I want to unpack the img but don't want to use in my pc(too confused).
so I want to unpack by the phone,
thank you
Click to expand...
Click to collapse
I don't think there is. Maybe I'm wrong too.
Basically all these boot.img tools are written in shell/bash and is made specifically to run in Linux distros.
Anyways there is an Android app called, Complete Linux Installer that lets you install any Linux OS in your phone. But I doubt whether boot.img tools work, as it needs various library files for it to work.
On a side note, I guess it would be more complex to do it in phone rather than in PC, if there is some way for it to work.
coolsandie said:
I don't think there is. Maybe I'm wrong too.
Basically all these boot.img tools are written in shell/bash and is made specifically to run in Linux distros.
Anyways there is an Android app called, Complete Linux Installer that lets you install any Linux OS in your phone. But I doubt whether boot.img tools work, as it needs various library files for it to work.
On a side note, I guess it would be more complex to do it in phone rather than in PC, if there is some way for it to work.
Click to expand...
Click to collapse
Thank you for your reply, but do you feel strange that the IMG is created by the recovery, so it is rational that there is a tool about IMG building. then why there is no apk. I mean some professional can extract just from the CWM recovery, I think.
need root
if you wanna get boot.img i think you must be rooted.
k0tsompakos said:
if you wanna get boot.img i think you must be rooted.
Click to expand...
Click to collapse
yes, I root, so I can use the recovery to back and restore,
I think any app that can access zip files in the internal and external memory can extract boot.img.
Like ASTRO File Manager and stuff...
recovery?
You wanna install a rom?
or recovery??
or we speak about boot.img? (Boot img is the boot animation when you turn on your phone.)
k0tsompakos said:
You wanna install a rom?
or recovery??
or we speak about boot.img? (Boot img is the boot animation when you turn on your phone.)
Click to expand...
Click to collapse
Nooooo
boot.img is the kernel (zImage + Ramdisk packed into an image file) that lies in the /boot partition
@ OP - If you want to extract boot.img itself, there are various methods and from CWM recovery like you said. I thought you were mentioning about how to unpack the contents of the boot.img say like zImage, Ramdisk and other files.
0ops
0ops yeah... :silly:
Searching for 1 minute and found this tool :good:
--> [TOOL] Boot.img tools [unpack, repack, ramdisk] <--
( I do not send link cause i am new here and can't :angel: )
It works. Have a nice day
k0tsompakos said:
0ops yeah... :silly:
Searching for 1 minute and found this tool :good:
--> [TOOL] Boot.img tools [unpack, repack, ramdisk] <--
( I do not send link cause i am new here and can't :angel: )
It works. Have a nice day
Click to expand...
Click to collapse
Yes, that's the tool and it works :good:
But as OP mentioned, he wanted to do it within phone, I highly doubt though.
coolsandie said:
Yes, that's the tool and it works :good:
But as OP mentioned, he wanted to do it within phone, I highly doubt though.
Click to expand...
Click to collapse
It could be done using this post http://forum.xda-developers.com/showpost.php?p=20227868&postcount=1124 and a hex editor from play store on your phone. But would be even more fiddly than on pc I would imagine, unless your phone has a largish screen. It could be done though.
If editing the ramdisk, you would need to unpack and repack after editing, which usually requires linux. I recently found http://forum.xda-developers.com/showthread.php?t=2036528 for PC, but have not had a chance to try it yet, seems best solution for OP
coolsandie said:
Yes, that's the tool and it works :good:
But as OP mentioned, he wanted to do it within phone, I highly doubt though.
Click to expand...
Click to collapse
thank you coolsandie, the android is based on linux, isn't it, and if I can, I can install busybox.and using the terminal like Android Terminal Emulator, but I do not know the procedure. like you, it's more complex,
Robbie P said:
It could be done using this post http://forum.xda-developers.com/showpost.php?p=20227868&postcount=1124 and a hex editor from play store on your phone. But would be even more fiddly than on pc I would imagine, unless your phone has a largish screen. It could be done though.
If editing the ramdisk, you would need to unpack and repack after editing, which usually requires linux. I recently found http://forum.xda-developers.com/showthread.php?t=2036528 for PC, but have not had a chance to try it yet, seems best solution for OP
Click to expand...
Click to collapse
it's good tool, it can unpack the boot.img, but as to the kernel, I don't know how to unpack. but this tool add to my favorite, thanks Robbie.
OK, I find the app, names: yaffs, the author I don't know because I found in the search engine. so I also cannot find the course
then the app,

[Q] Getting .img from phone

Hi folks.
I have an unusual smartphone from a Brazilian manufacturer, CCE, who have been bought for Lenovo.
This manufacturer are not exactly knowed for their support our product quality and I'm prety sure my device will not be updated or suported for any longer.
It's the SK504 and I want to try to customize the rom, build tunning apps (battery consumption sucks) and things like that. I have a good programming backgroung but not for mobile devices so I'm stepping on eggs for now.
The first thing I tried to do was get a backup from my actual rom so if I mess with something I shouldn't I would be able to come back to a working version through fastboot.
long story short, I managed to obtain through romdump 5 files; checksum.md5, config.gz, system.info.gz and system.tar
but, in the posts I been reading, it gives me the idea that I should get a boot.img, a recovery.img and a system.tar.gz
And with this I would be able to generate my own system.img through a different process.
Since I'm not being able to find what I did wrong, can anyone tell me if there are a different way to get those boot.img and recovery.img?
I tried the "adb backup -f boot.img boot" but it generates a 1kb .img file and I don't believe this is a valid boot.img.
rhodesbauer said:
Hi folks.
I have an unusual smartphone from a Brazilian manufacturer, CCE, who have been bought for Lenovo.
This manufacturer are not exactly knowed for their support our product quality and I'm prety sure my device will not be updated or suported for any longer.
It's the SK504 and I want to try to customize the rom, build tunning apps (battery consumption sucks) and things like that. I have a good programming backgroung but not for mobile devices so I'm stepping on eggs for now.
The first thing I tried to do was get a backup from my actual rom so if I mess with something I shouldn't I would be able to come back to a working version through fastboot.
long story short, I managed to obtain through romdump 5 files; checksum.md5, config.gz, system.info.gz and system.tar
but, in the posts I been reading, it gives me the idea that I should get a boot.img, a recovery.img and a system.tar.gz
And with this I would be able to generate my own system.img through a different process.
Since I'm not being able to find what I did wrong, can anyone tell me if there are a different way to get those boot.img and recovery.img?
I tried the "adb backup -f boot.img boot" but it generates a 1kb .img file and I don't believe this is a valid boot.img.
Click to expand...
Click to collapse
Instead of making a backup, have you tried to find original restore image? Usually it is a an .IMG file.
qwertyu123 said:
Instead of making a backup, have you tried to find original restore image? Usually it is a an .IMG file.
Click to expand...
Click to collapse
I used Root Explorer to look for both, recovery.img and *.img.
No result.
try this http://forum.xda-developers.com/showthread.php?t=2450045

AllWinner: U-Boot Script (Convert .BIN to .FEX)

I need help converting an Allwinner U-Boot .bin file to .fex file so I can stitch it into my android update. I can't quite figure out how to accomplish this. I have found multiple resources to accomplish this but it confuses me a little bit. I'm utilizing a 'Live USB' Xubuntu Distro to attempt this. Basically I need a tiny tutorial of commands to enter so I can succeed.
Alternatively, would a native Linux user convert the file for me using 'Sunxi-tools' bin2fex? I attached the file that needs converted, in case that's an option.
If there's anymore information I need to relay to accomplish this task, please let me know.
Resources....
http://linux-sunxi.org/Sunxi-tools
http://wiki.andahammer.com/AllWinner:_U-Boot_Script
Can you understand me the difference bet. Sboot and U boot ?
aboodgamal13 said:
Can you understand me the difference bet. Sboot and U boot ?
Click to expand...
Click to collapse
I truly have NO idea! I just know that's what it's referred to for my application.

Categories

Resources