How do I flash a boot.img thru terminal emulator? - Samsung Galaxy Nexus

I have a gsm Galaxy Nexus and I just wanted to find out what commands to use to flash a boot image from the terminal. I used to use flash_img command but that doesn't work on the GN.

daggerxXxsin said:
I have a gsm Galaxy Nexus and I just wanted to find out what commands to use to flash a boot image from the terminal. I used to use flash_img command but that doesn't work on the GN.
Click to expand...
Click to collapse
you need to have a working flash_image file in your /system/bin/.

http://forum.xda-developers.com/showthread.php?t=1443017
Will this work? It says ICS on it though..

daggerxXxsin said:
http://forum.xda-developers.com/showthread.php?t=1443017
Will this work? It says ICS on it though..
Click to expand...
Click to collapse
well, there no working flash_image files in that thread. but, there is an alternative method of flashing via terminal there.

simms22 said:
well, there no working flash_image files in that thread. but, there is an alternative method of flashing via terminal there.
Click to expand...
Click to collapse
Oh shoot I think I posted the wrong link. Oh well, I guess I'll see if I can Google the right path for the boot partition and try that command.

Related

need help flashing cw3

okay so i downloaded the recovery.img. and i already have s-off btw. but i dont want to mess up my phone and i dont know how to flash the recovery..someone please help me out here
Ok, so I'm guessing you have ADB installed and able to communicate with the phone.
The way I flash recovery is to use the fastboot command (part of the Android SDK, located right along side ADB). To do this, reboot your phone into hboot (power off, then hold vol down & power). Once in hboot, select the fastboot option on the phone. Then plug the phone into the computer and issue this command:
fastboot flash recovery <your recovery file here.img>
If you are not certain of what you are doing I would recommend reading up a bit - flashing recovery is something that can definitely cause problems if not done correctly.
JTB
okay so in my command prompt i have it set up to my android sdk. and i keep getting errors when i try trying in something. it says is not reconized as an internal or external command
ok well do you actually have fastboot.exe? (it should be in the sdk/tools directory).
no i do not. where do i get that?
Look in platform-tools. It should be in there. If you don't have your platform-tools set in your environment variables, you have to cd to it in command prompt.
Sent from my T-Mobile myTouch 3G Slide
music man you just talked a whole bunch a jibberish that i did not understand lol. i just need the fastboot.exe file. can someone post a download link of that please?
mechlixt said:
music man you just talked a whole bunch a jibberish that i did not understand lol. i just need the fastboot.exe file. can someone post a download link of that please?
Click to expand...
Click to collapse
Within the android sdk, there should be a folder called platform-tools, in addition to tools. Fastboot.exe should be in platform-tools.
In command prompt, type this:
cd C:\locationofandroidsdk\platform-tools
And THEN run this:
fastboot flash recovery C:\locationofcw3image\filenameofcw3.img
And let it run it's course. I would do a nandroid backup first, in case it screws up your /system and /data partitions like it did mine.
Sent from my T-Mobile myTouch 3G Slide
You can also use the android terminal emulator from within android to flash it. In terminal emulator type these commands to do it from within android:
su
flash_image recovery /sdcard/cw3name.img
You have to have the image on your sd card, and you have to have a cyanogen rom I think. Cyanogen roms are the only ones I know of that are packaged with the flash_image command. Otherwise you have to fastboot flash it from windows.
Sent from my T-Mobile myTouch 3G Slide
Where do you get a .img for CWM? I was able to find this link but it's a zip file with a bunch of other stuff in there.
They're floating around. There's a development thread about cm7 rc0, it had a cw3 img attachment in the op I believe. I'd link you but I'm on my phone.
Sent from my T-Mobile myTouch 3G Slide
MusicMan374 said:
They're floating around. There's a development thread about cm7 rc0, it had a cw3 img attachment in the op I believe. I'd link you but I'm on my phone.
Sent from my T-Mobile myTouch 3G Slide
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=915680
This one here? Just thought I'd step in and link to help out, haha.
SefEXE said:
http://forum.xda-developers.com/showthread.php?t=915680
This one here? Just thought I'd step in and link to help out, haha.
Click to expand...
Click to collapse
Yeah that one, thanks haha

How to install Yakju 4.0.2 on Mac?

I just bought a Galaxy Nexus but it was from Hong Kong and had non Yakju firmware on it. I want to install Yakju 4.0.2. I'm on a mac and oem unlocked my Nexus. I have downloaded the firmware from Google for 4.0.2 but now I need help actually installing it. If anyone could write me up a quick step by step guide I'd appreciate it, or link me to one. I'm on a Mac btw.
When I type in "fastboot flash bootloader bootloader-maguro-primekk15.img" into the command prompt it says command not found.
Bump
Sent from my Galaxy Nexus using XDA App
Wondering same thing....
Extract the archive, locate the .sh script, check the directives it contains, run them manually, or use the script.
Alternatively, do what most of us around here have to do, search. It's been covered already a number of times how to convert to Yakju as well as how to use fastboot on mac.
Edit, for the lazy, in the development section, one of the stickies have a link to this guide: http://forum.xda-developers.com/showthread.php?t=1366806
if you're on a mac, you need to add "./" before the commands in terminal
instead of "fastboot flash bootloader bootloader-maguro-primekk15.img", type in
./fastboot flash bootloader bootloader-maguro-primekk15.img
keep in mind your phone should be in fastboot mode when you do this (power off, then hold vol up + vol down + power"
littleasian said:
if you're on a mac, you need to add "./" before the commands in terminal
instead of "fastboot flash bootloader bootloader-maguro-primekk15.img", type in
./fastboot flash bootloader bootloader-maguro-primekk15.img
keep in mind your phone should be in fastboot mode when you do this (power off, then hold vol up + vol down + power"
Click to expand...
Click to collapse
Not correct, sorry.
You'd be better off following the link I provided above. The correct Mac commands are provided.
xyzulu said:
Not correct, sorry.
You'd be better off following the link I provided above. The correct Mac commands are provided.
Click to expand...
Click to collapse
Haha, thanks man.
Sent from my Galaxy Nexus using XDA App
xyzulu said:
Extract the archive, locate the .sh script, check the directives it contains, run them manually, or use the script.
Alternatively, do what most of us around here have to do, search. It's been covered already a number of times how to convert to Yakju as well as how to use fastboot on mac.
Edit, for the lazy, in the development section, one of the stickies have a link to this guide: http://forum.xda-developers.com/showthread.php?t=1366806
Click to expand...
Click to collapse
I tried to follow that guide and couldn't get it to work. How do you direct the command terminal into the right folder? When they say to put fast boot in that folder do they literally mean just the executable file?
Arcadia310 said:
I tried to follow that guide and couldn't get it to work. How do you direct the command terminal into the right folder?
Click to expand...
Click to collapse
You will probably need to cd into the folder.. ie cd Downloads
When they say to put fast boot in that folder do they literally mean just the executable file?
Click to expand...
Click to collapse
Yes, just the file called fastboot-mac
xyzulu said:
You will probably need to cd into the folder.. ie cd Downloads
Yes, just the file called fastboot-mac
Click to expand...
Click to collapse
Do I just type cd and then the name of the folder?
Sent from my Galaxy Nexus using XDA App

Rooting Sprint GNex on Mac?

Okay so I can't find a clear guide on how to root the Sprint Gnex on a Mac. I know it is simple but there is no clear guide on how to do so. I have searched on XDA and Googled it, Can someone please tell me how they rotted their's or if you know of an easy way to do so.
Thanks
Urge
Exact same as windows, except all of the commands are in Terminal instead of Command Prompt, and you put "./" before the commands.
Ex:
Code:
./adb devices
Here's the Mac ADB and Fastboot that I've used countless times attached. Unzip to your home folder and put any images or files you're gonna need for flashing in that folder. I'll assume you know how to navigate Terminal well enough to find the folder.
martonikaj said:
Exact same as windows, except all of the commands are in Terminal instead of Command Prompt, and you put "./" before the commands.
Ex:
Code:
./adb devices
Here's the Mac ADB and Fastboot that I've used countless times attached. Unzip to your home folder and put any images or files you're gonna need for flashing in that folder. I'll assume you know how to navigate Terminal well enough to find the folder.
Click to expand...
Click to collapse
I am trying to root my gs3 will this guide be along the same lines for my device and also how do I go about using the terminal to root it?
moderntech- said:
I am trying to root my gs3 will this guide be along the same lines for my device and also how do I go about using the terminal to root it?
Click to expand...
Click to collapse
What the hell? Why did you bump a thread that is like more than 5 months old?
Sent from my i9250
bk201doesntexist said:
What the hell? Why did you bump a thread that is like more than 5 months old?
Sent from my i9250
Click to expand...
Click to collapse
This thread has the closest information that I need to root, and instead of starting a new thread and potentially not having someone answer my question I am contacting you, the one that provided said information to pick your brain.
moderntech- said:
This thread has the closest information that I need to root, and instead of starting a new thread and potentially not having someone answer my question I am contacting you, the one that provided said information to pick your brain.
Click to expand...
Click to collapse
This is the Google Galaxy Nexus forums!
sent from my Google Galaxy Nexus

[HOWTO] Root Galaxy Nexus GSM with installed Jelly Bean

How to root Jelly Bean
(galaxy nexus gsm yakju)
Full post here:
http://www.androidpolice.com/2012/0...-jelly-bean-heres-a-method-that-works-how-to/
Short form:
1. adb push CWM-SuperSU-vXXX.zip /sdcard/
2. adb reboot bootloader
3. fastboot flash recovery recovery-clockwork-5.5.0.2-maguro.img
4. install zip from sdcard (CWM-SuperSU-vXXX.zip)
After reboot clockwork will no longer be available.
UPDATE 2nd October 2012:
Originally Posted by efrant
The newer versions of CWM will ask you if you want to disable the automatic re-flashing of the stock recovery, once you click reboot (if it sees that /system/etc/install-recovery.sh and/or /system/recovery-from-boot.p are present).
Click to expand...
Click to collapse
UPDATE 20th July 2012:
Delete /system/recovery-from-boot.p. You don't need to keep it.
Original Fix (outdated):
To fix this rename /system/recovery-from-boot.p to /system/recovery-from-boot.p.bkp EDIT: (filename doesn't matter) ###
Download supersu from this link (recent version)
http://forum.xda-developers.com/showthread.php?t=1538053
Have fun
+1
works great!
qByte said:
How to root Jelly Bean
(galaxy nexus gsm yakju)
Full post here:
h**p://***.androidpolice.com/2012/07/01/having-trouble-rooting-the-galaxy-nexus-on-jelly-bean-heres-a-method-that-works-how-to/
(sry for stars but I can't post links)
Short form:
1. adb push JB-SuperSU.zip /sdcard/
2. adb reboot bootloader
3. fastboot flash recovery recovery-clockwork-5.5.0.2-maguro.img
4. install zip from sdcard (JB-SuperSU.zip)
After reboot clockwork will no longer be available.
To fix this rename /system/reboot-from-recovery.p to /system/reboot-from-recovery.p.bkp
JB-SuperSU.zip
md5: 4b3973aae9b7fb734f83f680da5f4ddb
sha1: 35caff48e17c7f65a7616814ad9afd8cb0998b58
Have fun
Click to expand...
Click to collapse
wonderful, my root was wonky after upgrading to 4.1.1
thanks a lot!
Great guide.
There is a small mistake,rename reboot-from-recovery.p to reboot-from-recovery.bak (not p.bkp)
And that will work.
Cheers.
Hello everyone,
I have been having problems trying to install the root. When i try to run the command "fastboot oem unlock" it says "waiting for device". Is this because i installed an update that was pushed out on Friday? Or am i doing something wrong? Also Windows 7 detects my nexus tablet as a portable media player. Are there any drivers avail be for the nexus tab for windows users?
Thanks
hitsndc said:
Hello everyone,
I have been having problems trying to install the root. When i try to run the command "fastboot oem unlock" it says "waiting for device". Is this because i installed an update that was pushed out on Friday? Or am i doing something wrong? Also Windows 7 detects my nexus tablet as a portable media player. Are there any drivers avail be for the nexus tab for windows users?
Thanks
Click to expand...
Click to collapse
I'm on OSX so I don't know all the fine details but it sounds to me like you are missing the correct USB drivers from Samsung for ADB to recognize your device. Not sure if you can get the drivers separately but I'm pretty sure the right ones are included with Samsung Kies.
Hello!
why my nexus is losing the recovery ClockworkMod every time it restarts?
I am using this version: touch-recovery-clockwork-5.8.0.2-maguro.img
thanks
maicoalvim said:
Hello!
why my nexus is losing the recovery ClockworkMod every time it restarts?
I am using this version: touch-recovery-clockwork-5.8.0.2-maguro.img
thanks
Click to expand...
Click to collapse
Read the OP....
"After reboot clockwork will no longer be available.
To fix this rename /system/reboot-from-recovery.p to /system/reboot-from-recovery.p.bkp"
cymru said:
Read the OP....
"After reboot clockwork will no longer be available.
To fix this rename /system/reboot-from-recovery.p to /system/reboot-from-recovery.p.bkp"
Click to expand...
Click to collapse
thank you! it worked!
Ok I feel retarded, why can't I find /system/reboot-from-recovery.p? I used my root explorer and even searched for it
Xg3nFatality said:
Ok I feel retarded, why can't I find /system/reboot-from-recovery.p? I used my root explorer and even searched for it
Click to expand...
Click to collapse
I am having same problem
Sent from my Galaxy Nexus
This one works! Thanks so much!
Srirama said:
Great guide.
There is a small mistake,rename reboot-from-recovery.p to reboot-from-recovery.bak (not p.bkp)
And that will work.
Cheers.
Click to expand...
Click to collapse
filename doesn't matter...
qByte said:
[snip]
After reboot clockwork will no longer be available.
To fix this rename /system/reboot-from-recovery.p to /system/reboot-from-recovery.p.bkp EDIT: (filename doesn't matter)
Click to expand...
Click to collapse
You have the wrong file name to begin with. It is NOT reboot-from-recovery.p. It is recovery-from-boot.p...
efrant said:
You have the wrong file name to begin with. It is NOT reboot-from-recovery.p. It is recovery-from-boot.p...
Click to expand...
Click to collapse
thx4info. fixed it
qByte said:
thx4info. fixed it
Click to expand...
Click to collapse
You still have a mistake there there is no "i" at the end. It is recovery-from-boot.p
Sent from my Galaxy Nexus using Tapatalk 2
efrant said:
You still have a mistake there there is no "i" at the end. It is recovery-from-boot.p
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
fixed 2.0
how would I delete recovery-from-boot.p in adb or cwm before I have to reboot and wipe out the option of having root? I can't find the command for terminal. Thanks!
harpoongill said:
how would I delete recovery-from-boot.p in adb or cwm before I have to reboot and wipe out the option of having root? I can't find the command for terminal. Thanks!
Click to expand...
Click to collapse
1. Root Explorer or
2. adb shell > rm
harpoongill said:
how would I delete recovery-from-boot.p in adb or cwm before I have to reboot and wipe out the option of having root? I can't find the command for terminal. Thanks!
Click to expand...
Click to collapse
In cwm/adb:
adb shell
mkdir -p /system
mount -o rw /dev/block/platform/omap/omap_hsmmc.0/by-name/system /system
rm /system/recovery-from-boot.p
reboot
Sent from my i9250

[Q] Lot of question about pre-rooting factory JB system.img on my Galaxy Nexus

I'm new o all this stuff, so go easy with me! :silly:
If I understand correctly the root process, this should be true (correct me if I'm wrong):
Unsecure boot.img is only used to booting as root
Booting as root user allow to use some adb command
Command adb is used to modify system.img, injecting su command and superuser/supersu apk
If this is correct, can i modify a stock JB system.img and put su/superuser/supersu apk? Will this work? Then if this is right:
How can I unpack and edit system.img?
Where I can get the original su command?
Where I should download superuser/supersu apk?
I'd like to learn this stuff and do not use any external tool, apart from fastboot and adb commands. I'm quite familiar with *nix.
Thanks for helping :highfive:
uh..am i misinterpreting something here? why not just boot a custom recovery with fastboot and flash a su/supersu.apk or superuser.apk cwm zip?
sent from my i9250
bk201doesntexist said:
you will be better off building from src, if you're familiar with nix.
if not, no need to inject anything, just boot a custom recovery with fastboot and flash a su/supersu.apk or superuser.apk cwm zip.
sent from my i9250
Click to expand...
Click to collapse
Not so familiar to build system from the sorce, unfortunatly. I don't use a custom recovery... so there is no way of building my own system.img?
Gremo said:
[snip]
can i modify a stock JB system.img and put su/superuser/supersu apk?
Click to expand...
Click to collapse
Yes you could.
Gremo said:
How can I unpack and edit system.img?
Click to expand...
Click to collapse
As far as I know, you cannot unpack system.img using only fastboot and adb (which you indicated you ONLY wanted to use). I know you can use this to convert it to ext4 format and then you can mount it.
Gremo said:
Where I can get the original su command?
Where I should download superuser/supersu apk?
Click to expand...
Click to collapse
Superuser is here, or, if you prefer SuperSU, it is here.
EDIT: But this is a lot of work for nothing. You could just boot an insecure kernel (which you can get from the dev section, or you could build one yourself) and then copy the su and Superuser.apk files to your device, no?

Categories

Resources