idea for dualbooting android builds... somewhat - G1 Android Development

alrighty, basically im lazy and want someone else to do this for me.
heres my idea:
you install rc33 or whatever you want, make a nandroid backup of it, rename the folder to OS1. this folder contains your boot.img data.img and so on
then install or place a nandroid backup of another build into a folder called OS2..
then you would be able to boot into the modified recovery mode, which would have the selection to run a script, which then asks which OS to flash, 1 or 2, you press 1 or 2 wait for it to flash and reboot, a little hacky way to get a dual boot...
now who wants to repack a recovery image for me?

good idea would be worth a try , too bad im not up to par for the job , but id like to see it done

i'll give this a shot tomorrow and see what happens, not really feeling like doing it now. and i'm not gonna do it via rebuilding the recovery.img, just gonna make a script that does it for me from the recovery terminal. i'm quite lazy as well and i already have a script that runs the fastboot commands from my computer script to flash from one build to another, in theory it shouldn't be too hard to get the script terminal reaady and do that.

tubaking182 said:
i'll give this a shot tomorrow and see what happens, not really feeling like doing it now. and i'm not gonna do it via rebuilding the recovery.img, just gonna make a script that does it for me from the recovery terminal. i'm quite lazy as well and i already have a script that runs the fastboot commands from my computer script to flash from one build to another, in theory it shouldn't be too hard to get the script terminal reaady and do that.
Click to expand...
Click to collapse
I have a .bat file that I use to flash back and forth from Windows.
To RC33
cd C:\Android\
@echo off
echo :::Instructions:::
echo You must have:
echo system.img
echo data.img
echo boot.img
echo installed in the "C:\Android" directory
echo then enable fastboot on device before proceeding
pause
fastboot flash system system.img
fastboot flash userdata data.img
fastboot flash boot boot.img
fastboot reboot
Click to expand...
Click to collapse
To 502H
cd C:\Android\502H\
@echo off
echo :::Instructions:::
echo You must have:
echo system.img
echo data.img
echo boot.img
echo installed in the "C:\Android\502H" directory
echo then enable fastboot on device before proceeding
pause
fastboot flash system system.img
fastboot flash userdata data.img
fastboot flash boot boot.img
fastboot reboot
Click to expand...
Click to collapse
Pretty simple. I have them stored to my desktop. I save my nandroid backups to the appropriate file and just double click. No problem. I just wish there was a script that I can use to reboot into HARDSPL mode (someone tell me if there is).

keatonreckard:
This is the worst idea i've heard so far...
FLASH has a limited life-time, and rewriting the whole system at every boot is a BAD idea.
If you want to dual-boot, you should look into making your own init-system, adding the ability to load another system (From SD).
Binary100100:
"adb reboot bootloader"

there might be a simpler way: change the kernel command so it mounts somewhere in sdcard as root. not sure how to do this without a computer though.

Hey binary, with your phone plugged into your comp pull up you cmd and type adb shell reboot bootloader, the phone will boot right into fastboot mode making it easy to continue the script

just to clarify...i meant a script that is store locally on the device in the recovery image... so then you dont need a computer at all... you can already do this, you just have to type in the commands from the recovery console...i just wanted an easier way to do it

Binary100100 said:
I have a .bat file that I use to flash back and forth from Windows.
To RC33
To 502H
Pretty simple. I have them stored to my desktop. I save my nandroid backups to the appropriate file and just double click. No problem. I just wish there was a script that I can use to reboot into HARDSPL mode (someone tell me if there is).
Click to expand...
Click to collapse
To flash back and forth from windows? You've been running Windows Mobile on the Dream? I must be missing something.

Joushou said:
keatonreckard:
This is the worst idea i've heard so far...
FLASH has a limited life-time, and rewriting the whole system at every boot is a BAD idea.
If you want to dual-boot, you should look into making your own init-system, adding the ability to load another system (From SD).
Binary100100:
"adb reboot bootloader"
Click to expand...
Click to collapse
not flash at every boot...just so you can text out a build and if you dont like it go back to a stable one on the go....
again, im taking the lazy way out

Disregard! - My mind ran ahead of what this post was about and I posted something regarding a slightly different idea!
I don't know about re-installing Nandroid backups...
But, if one wanted to be able to run two different installs...
Seems to me an easier way about doing this would be to have a modified SPL. It could have the option of selecting an update file...
For example, one could put two files on their sd card - update1.zip and update2.zip. The SPL could have one of the following options:
1) reboot into recovery mode - select "alt-s" - then you would have an option to select 1 or 2.
2) have an additional "Alt- " option.
"Alt-s" - runs update1.zip
"Alt-?" - runs update2.zip. (dev could pick the additional letter)
I think this would be great! No reteaching of anyone how to use the process. And, one could leave the primary use-able update.zip as "update1.zip" and use the other as the version being tried out. It wouldn't be a Nandroid back up... But, with the new "nowipe" builds it should work well.
My $.02 worth.

Joushou said:
keatonreckard:
This is the worst idea i've heard so far...
FLASH has a limited life-time, and rewriting the whole system at every boot is a BAD idea.
If you want to dual-boot, you should look into making your own init-system, adding the ability to load another system (From SD).
Binary100100:
"adb reboot bootloader"
Click to expand...
Click to collapse
To be fair, that limited life-time is something like 1,000,000 writes, which would take about... oh... a year straight of constantly rebooting your phone(assuming it takes 30 seconds per reboot)
EDIT: and that assumes re-writing the whole system every time you boot, which I don't think he means since he's saying its in the recovery image.

hmmm....
I know that from the alt+x console you can do this....
mount sdcard
echo "boot-recovery
--update_package=SDCARD:build1/update.zip" > /cache/recovery/command
reboot recovery
so if you wanted 2 builds available (I would think you would need a wipe for 2 completely different builds) but....
make 2 folders in on your sdcard
build1
build2
place a copy of the update.zip from each build you want to boot in the folder
make a script like this
Code:
echo "boot-recovery
--update_package=SDCARD:"$"/update.zip" > /cache/recovery/command
reboot recovery
save the script to the sdcard directory
then when you start your phone you could
1. type "mount sdcard" (no quotes)
2. type "sh sdcard/script.sh build1" (for build 1 located in /sdcard/build1/update.zip)
3. type "sh sdcard/script.sh build2" (for build 2 located in /sdcard/build2/update.zip)
problem would be when wipes are needed. But if you have 2 solid builds and don't need to wipe when swapping it should work.
Just need a way to make a script or bootloader that could run either one of these.
Cannot see another way around it since the OS is loaded into phone ROM/RAM
of course if your build supports the reboot command from the OS then you could just make a script to run when you want to reload the other build. Then you could skip the recovery console.

@beagz - Ha, forgot about that script. Yes, to switch between say, the DudesG build and Haykuro's H build one could write a script like that in Gscript and change back and forth when a new build comes out.
Like now... One could run Dudes G build and try out Haykuro's new ADP1.5 build.
But, I do believe your right about going back to a JF33 build - would need to wipe...

Gimpeh said:
To flash back and forth from windows? You've been running Windows Mobile on the Dream? I must be missing something.
Click to expand...
Click to collapse
Nah.. I was referring to using a bat file on my Windows computer to switch between 1.1 to 1.5 back to 1.1 by just executing the bat.
Now that i know that "adb reboot bootloader" will work it can be completely automated!
... but will it default to fastboot? Hmmm...

tubaking182 said:
Hey binary, with your phone plugged into your comp pull up you cmd and type adb shell reboot bootloader, the phone will boot right into fastboot mode making it easy to continue the script
Click to expand...
Click to collapse
Thanks! But is this going to put the phone in FASTBOOT mode? I'm trying to make this completely automatic if it's possible. Simply keep your latest and greatest backup .img's in a certain directory on your computer and EXECUTE!
Take a shower or whatever... come back and VOILA! Your previous backup.
The method that I've come up with thus far is pretty simple... but you just can't execute and walk away. You still need to enable FASTBOOT at the least on the bootloader. Although I haven't tried messing with it lately. I have my phone just like I want it.
Now that the Official ADP1.5 is out let's get to work on Mulitouch, themes, etc!

Wow this seems crazy but it just might work. Lol.

bat file to automatically restore backups using Windows!
So all you need to do is...
Open notepad, copy and paste the quoted text below, edit the top line of this bat file to the directory of your backups (I used "c:\android" for an example), save as .bat and double click. Wait and your done. Just watch it happen automatically.
Also if you decide to change that directory on the top line also use the directory on the 14th line. Your done. Easy restore to a backup.
HINT! Make a couple of these with a variety of directories on the top to change what backup your want to flash back to.
Example: c:\android\rc33; c:\android\501h; c:\android\adp15; etc
cd C:\android
color A
cls
@echo off
echo.
echo :::Instructions:::
echo.
echo You must have:
echo.
echo system.img
echo data.img
echo boot.img
echo.
echo installed in the "c:\android" directory
echo.
pause
cls
color b
echo.
echo.
echo.
echo Now restoring:
echo.
echo system.img
echo data.img
echo boot.img
echo.
echo to your device.
color c
echo.
echo DO NOT TURN OFF OR UNPLUG YOUR DEVICE DURING THIS PROCESS!!!
@adb shell reboot bootloader
@fastboot flash system system.img
@fastboot flash userdata data.img
@fastboot flash boot boot.img
@fastboot reboot
Click to expand...
Click to collapse
I've tested it and it works beautifully!
Hope it helps!
Thanks to everyone that pointed out the command "adb shell reboot bootloader"
This post is noob friendly.
OR
Use this script below for it to prompt for the location of your backups.
color A
cls
@echo off
echo.
echo :::Instructions:::
echo.
echo Enter directory of nandroid backups that you would like to restore...
set /p flash=path:
cd %flash%
cls
color b
echo.
echo.
echo.
echo Now restoring:
echo.
echo system.img
echo data.img
echo boot.img
echo.
echo to your device.
color c
echo.
echo DO NOT TURN OFF OR UNPLUG YOUR DEVICE DURING THIS PROCESS!!!
@adb shell reboot bootloader
@fastboot flash system system.img
@fastboot flash userdata data.img
@fastboot flash boot boot.img
@fastboot reboot
Click to expand...
Click to collapse
This one is even more noob friendly... but it's not as fast because it requires you to enter the location of your backups.
I hope it helps someone out there. It helps me.

[email protected]:
The average lifetime of flash is 100.000 writes, and flash isn't delivered 100% intact, they're usually delivered with faulty blocks (Depending on where you get it, blah blah blah).
That should change your numbers a bit (A month i believe?)
And, sure, he is using the update-zip, so it's not written to the same pages every time.
But still, it's a bad idea (Other than wearing stuff down, it will also be very slow ).
To dual-boot, modifying the init-system so it could choose from different android-runtimes would be way faster/cooler...

If possible, this would be pretty damn useful. Using a stable build while being able to tinker with experimental builds. Would definitly cut down on the constant flashing back and forth.

Related

Modded recovery and boot images

Here is a zip file containing a modified recovery and boot image, as well as a few other things:
http://rapidshare.com/files/166164961/AndroidMod.zip
http://jf.nyquil.org/AndroidMod.zip
http://android-dls.com/forum/index.php?f=24&t=191&rb_v=viewtopic (see post for actual link to file)
NOTE: if you need a complete RC30 to v1.3 guide, see this page.
The recovery image (recovery_testkeys.img) uses the test keys that are distributed with the android platform source. This means that an OTA update or an update.zip update must be signed with the test key in order for it to install. In other words, it will no longer install OTA updates from t-mobile. You don't want them stealing back root access from you now do you? .
I've also included the test keys and the SignApk.jar tool, so you can sign your own update scripts (for use only with the modified recovery image). You can resign any image, even if it has been signed before. So for example, if you needed to install an "official" t-mobile update, you must re-sign it with the test keys first.
Another bonus in this recovery image is that ADB is enabled while in recovery mode. You can't adb into a shell (no sh binary), but you can at least use it to push and pull files from the device. For example, you could push an update.zip file to the sdcard.
The boot image (boot_nosecure.img) has been modified so that adb has root access by default. So when you do an adb shell, you automatically get a root shell. You can remount the system image using adb, and then push files directly to the system partition.
Finally, the "update - Restore Original RC29 Boot Image.zip" file is an update.zip file signed with the test keys, which will restore your boot partition back to the stock RC29 image. Useful if you accidentally hose your boot partition..
To install the recovery image onto your phone:
Code:
D:\Android\AndroidMod>adb push recovery_testkeys.img /data/local/recovery.img
912 KB/s (0 bytes in 1767424.001s)
D:\Android\AndroidMod>adb shell
$ su
su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cd /system
cd /system
# cat /data/local/recovery.img > recovery.img
cat /data/local/recovery.img > recovery.img
# flash_image recovery recovery.img
flash_image recovery recovery.img
#
Note: You must place the recovery image at /system/recovery.img. the init.rc boot script automatically flashes the recovery partition with that file every time you boot up the phone.
At this point, it's probably a good idea to reboot the phone into recovery mode, and make sure it loads OK. If the recovery image is corrupt somehow, it will throw you back into SPL mode (the multi-color bootloader screen). If that happens, just boot the phone normally, and reflash recovery image.
Once it boots into recovery mode, press alt+L, and the next to top line of text should say something like "using test keys.". If it doesn't, then you're still using the original recovery image.
Note: If you are planning on installing the modified RC30 update, you can ignore the following - there is no need to install the boot image. The update already has a newer, modified boot image.
Now that you know you have the modified recovery image loaded, you can install the boot image:
Code:
D:\Android\AndroidMod>adb push boot_nosecure.img /data/local/boot.img
939 KB/s (0 bytes in 1533952.001s)
D:\Android\AndroidMod>adb shell
$ su
su
# flash_image boot /data/local/boot.img
flash_image boot /data/local/boot.img
# rm /data/local/boot.img
rm /data/local/boot.img
#
Now reboot the phone and let it boot normally. If the boot image was corrupted, it will boot into recovery mode instead. You can use the included update zip file to reload the original RC29 boot image.
Otherwise, if it boots up normally, open a command prompt however you like (telnet, adb, terminal emulator app, etc.) and type "getprop ro.secure". If it says 0, then you're running the modified boot image. Otherwise, if it says 1, you're still running the original boot image.
Attachement..
Hmm. It doesn't look like the attachment made it.. Does anyone have some space I could throw the file up at? It's around 5mb.
JesusFreke said:
Hmm. It doesn't look like the attachment made it.. Does anyone have some space I could throw the file up at? It's around 5mb.
Click to expand...
Click to collapse
I should have some space let me know
JesusFreke said:
Hmm. It doesn't look like the attachment made it.. Does anyone have some space I could throw the file up at? It's around 5mb.
Click to expand...
Click to collapse
Sent you an email with u/p if you need space.
test
anyway to test and make sure i did this correctly.. other than my phone booted and is not a paperweight
jriley60 said:
anyway to test and make sure i did this correctly.. other than my phone booted and is not a paperweight
Click to expand...
Click to collapse
To check the boot image, boot the phone normally, and then get a shell with adb. Type "id", and see if you are root
To check the recovery image, boot up the phone into recovery mode. Once you're in recovery mode, Press alt-l to show the text. The next to top line should say something like "using test keys"
JesusFreke said:
To check the boot image, boot the phone normally, and then get a shell with adb. Type "id", and see if you are root
To check the recovery image, boot up the phone into recovery mode. Once you're in recovery mode, Press alt-l to show the text. The next to top line should say something like "using test keys"
Click to expand...
Click to collapse
When will we see the files? Can you just upload to RS and we will mirror?
neoobs said:
When will we see the files? Can you just upload to RS and we will mirror?
Click to expand...
Click to collapse
Look at the original post. I added a link for the zip file..
boot.img is in correct. assuming typing id in telnet returning uid=0(root) gid=0(root) means i'm root then i'm good, thank you so much. looks like i really should install the emulator it might make things a little easier
JesusFreke said:
Look at the original post. I added a link for the zip file..
Click to expand...
Click to collapse
thank you. Sorry
jriley60 said:
boot.img is in correct. assuming typing id in telnet returning uid=0(root) gid=0(root) means i'm root then i'm good, thank you so much. looks like i really should install the emulator it might make things a little easier
Click to expand...
Click to collapse
Well, that does mean you have root, but that doesn't say anything about whether the boot.img was installed correctly. If you're telneting in, then you would have root access regardless of whether you are running a stock boot image or my modified one.
My boot image allows adb to connect to the phone as root. If you don't use adb, there's no reason to install my modified boot image.
Actually, there's an easier way to tell if you're running my boot image. Get to a command prompt (telnet, adb, terminal emulator app, whatever), and type
getprop ro.secure
If it says 0, then you correctly installed my boot image. Otherwise, if it says 1, you're still running the stock image.
Thanks! Was waiting for this.
Now to screw with my phone like crazy
Not that I don't trust you... but...
Ok... I don't trust you implicitly enough to reflash my phone with your stuff
Any chance you can post diffs against the android source tree so I can apply your changes and build it myself?
No offense - I just like to know what's going on...
RyeBrye said:
Ok... I don't trust you implicitly enough to reflash my phone with your stuff
Any chance you can post diffs against the android source tree so I can apply your changes and build it myself?
No offense - I just like to know what's going on...
Click to expand...
Click to collapse
Not at all
The recovery tool is just a stock build (almost) from the android source, using the test keys, which is the default if you don't specify keys of your own. The only change I made was to make it print out "using test keys" when it runs, just to make it easy to tell if it's running. I can give you a diff if you really want.. but it's a simple change though, and doesn't affect the actual functionality.
For the boot image, I replaced the initramfs image in the boot.img included in the official RC29 update, with the initramfs image from a default build of the android source, which has the ro.secure property set to 0.
I first tried the boot.img that was generated by the default android build, but I had issues with getting wifi to work, so I tried merging the initramfs image with the RC29 boot.img, and it seems to work fine.
I suspect you could accomplish the same thing by extracting the initramfs image from the RC29 boot.img, un-gzipping and un-cpioing it, and then modifying the default.prop file to set ro.secure to 0. Then you would have to package it back up and stick it back into the RC29 boot.img.
ro.secure is the property that the adb service looks at to determine if it should use root user, or drop to the shell user. When ro.secure is 0, adb will run as root.
It can be a bit of a pain to get the android source to build though. Make sure you get the dream specific product files (they aren't downloaded by default when you do a "repo sync"). You'll also encounter issues where it can't find libaudio.so or librpc.so. You'll have to copy these from the phone to a couple of output folders in order for the build to proceed.
If you get stuck, feel free to give me a holler and I'll try and help out.
Be warned.. the build takes quite a while.. on the order of an hour or two at least. But then again, I was doing it in a VM.. it may be faster if you do it on a native linux box.
i cant get it to work i know I'm doing something wrong can you(everyone)help me out(i have Vista 64) i get this error
this i what i type​# C:\Android\AndroidMod>adb push recovery_testkeys.img /data/local/recovery.img​
this is the error​C:AndroidAndroidMod: not found​
please and thank you
EDIT: could we do it off the sdcard?
EDIT2: i think i found my own mistake this cant be done in Windows i need to have shell with adb meaning time to whip out VM
JesusFreke said:
For the boot image, I replaced the initramfs image in the boot.img included in the official RC29 update, with the initramfs image from a default build of the android source, which has the ro.secure property set to 0.
I first tried the boot.img that was generated by the default android build, but I had issues with getting wifi to work, so I tried merging the initramfs image with the RC29 boot.img, and it seems to work fine.
Click to expand...
Click to collapse
Can you talk more about this step of the process? How did you do this "merging"? Did you use mkbootimg?
JesusFreke said:
I suspect you could accomplish the same thing by extracting the initramfs image from the RC29 boot.img, un-gzipping and un-cpioing it, and then modifying the default.prop file to set ro.secure to 0. Then you would have to package it back up and stick it back into the RC29 boot.img.
Click to expand...
Click to collapse
And this could be done without going through the whole process of doing an Android build, right? I'm just thinking about how one might build a simple utility to allow editing of the ramdisk.
alansj said:
Can you talk more about this step of the process? How did you do this "merging"? Did you use mkbootimg?
Click to expand...
Click to collapse
I just used the good ol hex-editor. The gzip file starts with a few specific bytes (don't remember them offhand..), so you can search through the image. There are 2 gzip files, the initramfs is the last one. In mine, it starts at offset 0x00154000.
Once you find it, just cut it out and dump the new one in (there is some 00 padding after the gzip file ends.. not sure if you need to keep the padding or not). You also have to update the size of the initramfs, which is at offset 0x00000010.
alansj said:
And this could be done without going through the whole process of doing an Android build, right? I'm just thinking about how one might build a simple utility to allow editing of the ramdisk.
Click to expand...
Click to collapse
Yes.
Anyway to make this using the update.zip sd card method?
JesusFreke, per some requests in #android on freenode I have setup a wiki (not a device wiki like xda's but more like an "information about android/g1 and how to tweak it" wiki) and would like to put this on there. Let me know if you care (unless you would like to add it in your own words), the wiki is http://android-dls.com/wiki and its still very new, but im trying to to get it built up (RyeBrye is doing most of the work).
humble said:
i cant get it to work i know I'm doing something wrong can you(everyone)help me out(i have Vista 64) i get this error
this i what i type​# C:\Android\AndroidMod>adb push recovery_testkeys.img /data/local/recovery.img​
this is the error​C:AndroidAndroidMod: not found​
please and thank you
EDIT: could we do it off the sdcard?
Click to expand...
Click to collapse
First of, you do know that when we refer to "C:\..." we refer to windows via a command prompt (or "cmd") and when you see "# ..." we refer to a shell connection to the Android phone.
Second, you do have the Android SDK right? If not download it HERE. Now extract that to a folder, preferably close to the C: root. (ex. C:\AndroidSDK)
1)Either extract/copy the files from the "AndroidMod.zip" to the Android Tools folder from the SDK (ex. C:\AndroidSDK\Tools) OR copy "adb.exe" and "AdbWinApi.dll" from the Android Tools folder from the SDK (ex. C:\AndroidSDK\Tools)to the folder where you have extracted the "AndroidMod.zip" to.
2)Open up a command prompt. Start -> Run (or Windows key + R) and type "cmd"
3)CD to the directory where the files are.
EXAMPLE:
C:\Users\[your_user_name_here]> cd \
C:> cd androidsdk\tools
C:\AndroidSDK\Tools>
4) Now follow the Instructions.

110 Error RUU 1.56 Fix - 100% unroot too!

Update - 2/21/2011
If you have bricked an HTC EVO this will likely NOT work for you and this is the wrong info to be reading. I have gotten a few emails from this link about EVO 110 errors.
12/26/2010 - This thread is super old now:
If you ran the 1.56 RUU and your phone no longer turns on visit htc.com, go to support, choose Hero (Sprint) and download the 2.1 system update.
Remove battery from your phone and start it up again, then run the exe file that you just downloaded -
http://member.america.htc.com/downlo...2.27.651.6.exe
------All the info below is kept for reference -------
(As of 3/31/2010 - I am 10 for 10 for getting these back and working!! 3/3 of going back to 100% stock)
Edit: I have no longer kept track... its been over a month and I know personally I've done about 15 more of these... with about half being return to stock.
If you need to contact me, PLEASE EMAIL instead of using private messages, it'll probably turn into a google talk chat anyways, so add me on there, [email protected] (Its just easier than having to log in here and reply to private messages, since I get emails on the go as well.)
So you just ran the 1.56 RUU and got a 110 error. Now your screen turns on and stays black and if you plug the phone into USB you see the HTC logo. Unplug it and see the RUU menu.
Like you, I decided to attempt to roll back using the RUU 1.56. I was hit with the 110 error, and nothing but fastboot would work, I was able to launch ./fastboot-mac oem boot to get into the system.
I tried ./fastboot-mac boot image/bootname.img and a billion other things like everyone else who is having the issue, but just like them I had no success. In the second post below are the steps to resolve this issue. This will either take you to your first Nandroid backup or to whatever ROM you choose to flash once you get recovery back. I have not found a way to get back to 100% stock, but at least your phone wont be a brick.
EDIT:As of 3/30/2010 @ 8:30 PM I was able to get my phone completely 100% to stock. I was able to do this by retrieving a Nandroid restore from someone who used flashrec to make their initial backup. This restore does not touch the recovery image but I was able to boot into my recovery then write the HTC recovery back on top of it. I now have 100% un-rooted phone. See Post number 2 for the right way to do this.?
I've helped a few people over log me in now.
I'm willing to continue doing this but it is cutting into my family time, I will do this for a "respectable" amount of money.
Feel like I've helped you??
Buy me some coffee!
(Zip attached includes fix and stock folders. Use the fix folder FIRST to get completely booted. You can use the stock folder if you want to get 100% stock after you have a running unrooted system but have RA recovery.)
Steps to resolve:
(You SHOULD have a Nandroid backup of some sort, if not download a ROM... Fresh1.1??)
1) Boot the phone to black screen
2) Plug phone into PC/MAC - The HTC logo should appear at this point
---- If you've been doing anything else, rerun the RUU and let it fail and reboot to the HTC logo.
3) PC - fastboot oem boot | MAC - ./fastboot oem boot
(Make sure you turn on USB Debugging under Settings --> Applications --> Developer)
4) Root your phone using asroot2
Code:
adb push asroot2 /data/local/
adb shell chmod 0755 /data/local/asroot2
adb shell
/data/local/asroot2 /system/bin/sh
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat sh > su
chmod 4775 su
5) This is where your Nandroid backup comes into play.
(Browse to your nandroid folder, find your first backup and copy all of the .img files except system and cache to your SD card root directory)
NOTE: At this point you should dismount the SD card if you mounted inside of Android OS(Sense/Launcher)
6) run adb shell (PC - adb shell | Mac - ./adb shell)
7) type su
8) Run the following commands (if you get out of memory errors, type su again and try once more)
NOTE: Do not copy the "#"'s in the commands, the # just means you are running as SU, as opposed to the "$"
Code:
# flash_image recovery /sdcard/recovery.img
# flash_image boot /sdcard/boot.img
# flash_image misc /sdcard/misc.img
9) now... type reboot recovery
This time you should get your recovery menu, should have been RA or whatever you used... from there I did a complete nandroid restore and my system booted.
Also, after I did this I did try to let it boot without doing a recovery and it wouldnt go anywhere... but I'm fairly impatient... it may have wanted to load. I figured it best to do an entire Nandroid restore though.
-------------------------------------------------------------
100% Stock Configuration Work Around
-------------------------------------------------------------
Non-Rooted Nandroid Backup:
nandroid.7z
I was able to get my phone completely 100% to stock. I was able to do this by retrieving a Nandroid restore from someone who used flashrec to make their initial backup. This restore does not touch the recovery image but I was able to boot into my recovery then write the HTC recovery back on top of it. I now have 100% un-rooted phone. I'm not sure how to go about posting a 127MB file, what do you think it the best place?
After restoring the Nandroid backup I tried this:
Code:
Dustan-Bonneys-MacBook:tools dustanbonney$ ./adb shell
$ su
su: permission denied
Then I rebooted to recovery (I used RA 1.5.2)
Code:
Dustan-Bonneys-MacBook:tools dustanbonney$ ./adb remount
remount succeeded
Dustan-Bonneys-MacBook:tools dustanbonney$ ./adb shell
/ # mount -a
mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: No such file or directory
/ # cd /sdcard
/sdcard # flash_image recovery /sdcard/Stock/recovery.img
flashing recovery from /sdcard/Stock/recovery.img
/sdcard # reboot recovery
I was booted to the Triangle and exclamation mark... I pulled the battery and booted up normally.
Stock Kernel - 2.6.27-533ce29d [email protected] )
Stock Build - 1.56.651.2 CL85027 release-keys
Other things that should be mentioned:
If you used RA 1.6.2 - I was unable to get my boot.img or the stock boot.img from the RUU's rom.zip to flash back to the recovery partition. I had to use the RA 1.6.2.img and "flash_image recovery /sdcard/recoverynamegoeshere.img"
It seems that if you've flashed the radio update, the RUU does not write the radio back successfully. Others have had issues going back to the stock radio using the upgrade.zip option as well.
I attempted to use the boot.img, recovery.img, from the RUU's rom.zip with no success. I might try it again. I was able to get to stock recovery (Triangle and exclamation) and to the Hboot menu... but from hboot I had to run the RUU and rebrick the device cause I couldnt get anything at that point, even fastboot oem boot wouldnt load.
There have been times when I get weird issues writing the flash recovery, boot, or misc and when you reboot and load "fastboot oem boot" it wont look like it goes anywhere.... check "adb devices" and your device should be listed. From there do an "adb remount" and then "adb shell" and reflash once more and then "reboot recovery".
If all else fails, I'm available for a small fee.
[email protected]
Anxiously waiting your news. Just encountered this problem today.
Updated ...
imekul said:
Anxiously waiting your news. Just encountered this problem today.
Click to expand...
Click to collapse
Wow! If you've fixed this, I think you're everyone's hero now. We won't have to worry about using the RUU now
I was going to try something similar to this today, but i was unable to brick my phone using the 1.56.651.2 RUU. I was running Flipz updated radio and DamageControl v2.0r2.. The RUU completed successfully..
I was reading over the forum post in http://forum.xda-developers.com/showthread.php?t=645002 and i read that you could boot the system using the command 'fastboot oem boot' I was going to try to use FlashRec to do the work of Flashing the recovery, then booting into recovery and use nandroid.. but you beat me to it! Good work!
I attempted flashing a new recovery image this way with no avail... I also attempted only
Code:
flash_image recovery /sdcard/recovery.img
and still was unable to boot the phone into recovery. I think it had to have been something with doing boot.img and recovery.img at the same time... I dont know what the misc.img does and I'm assuming data.img is userdata... but I did them all and then it worked...
Other users also tried flashrec and with no success... right track though.
chavo2005 said:
I was going to try something similar to this today, but i was unable to brick my phone using the 1.56.651.2 RUU. I was running Flipz updated radio and DamageControl v2.0r2.. The RUU completed successfully..
I was reading over the forum post in http://forum.xda-developers.com/showthread.php?t=645002 and i read that you could boot the system using the command 'fastboot oem boot' I was going to try to use FlashRec to do the work of Flashing the recovery, then booting into recovery and use nandroid.. but you beat me to it! Good work!
Click to expand...
Click to collapse
What do u mean by 3) PC - fastboot oem boot | MAC - oem boot?
blankd3ckskat3r said:
What do u mean by 3) PC - fastboot oem boot | MAC - oem boot?
Click to expand...
Click to collapse
if your using a pc type fastboot oem boot
if your using a mac type ./fastboot oem boot
This!
Thanks Regaw
regaw_leinad said:
if your using a pc type fastboot oem boot
if your using a mac type ./fastboot oem boot
Click to expand...
Click to collapse
Trying this right now.
So far, am getting lots of "mtd: write error" and "mtd: re-read error" Out of memory errors for flashing the recovery image. Guess I'll give this some time, and try to su again and reflash? Or should I kill it as soon as the Out of memory errors pop up and try again?
If you get errors like...
adb shell
su
flash_image recovery .........
(out of memory... etc)
Then...
just su again... so you really su twice
its what I had to do.
imekul said:
Trying this right now.
So far, am getting lots of "mtd: write error" and "mtd: re-read error" Out of memory errors for flashing the recovery image. Guess I'll give this some time, and try to su again and reflash? Or should I kill it as soon as the Out of memory errors pop up and try again?
Click to expand...
Click to collapse
Trying it a second time, and so far am getting a bunch of Out of memory errors. After the first one "finished," I did as you recommended and typed "su" a second time, and then typed the "flash_image recovery /sdcard/recovery.img" command.
So far, looks like it's giving the same errors the second time around.
This second attempt, it ended with "error writing recovery: No space left on device."
Just to be sure, I checked the SD card, and that has over 1 GB of free space.
If you're willing to allow something like logmein.com or some way for me to remote assist you, I would like to try. [email protected] if you're in.
imekul said:
This second attempt, it ended with "error writing recovery: No space left on device."
Just to be sure, I checked the SD card, and that has over 1 GB of free space.
Click to expand...
Click to collapse
Sounds awesome. Thanks. I'll e-mail you now.
Dun Dun Dun... The results are in!
imekul said:
Sounds awesome. Thanks. I'll e-mail you now.
Click to expand...
Click to collapse
dfbonney is the man!!
After a friendly little session on LogMeIn Express, I am good as new! How awesome!!
imekul said:
dfbonney is the man!!
After a friendly little session on LogMeIn Express, I am good as new! How awesome!!
Click to expand...
Click to collapse
We ended up just needing to run
Code:
adb shell
reboot
fastboot oem boot
adb shell
su
//flash commands here
that seemed to do it. so make sure if you're having issues to restart the device and try again!
Edit: Also, we didnt get data.img to work so we only did boot, recovery, and misc.img's

Need an easy programing hand... Create bat file =)...

It's been a long time since the last time I made a bat file and it seems I can't remember how to exactly make one xD... I'm kind of tired of having to put the commands to change the radio, spl and recovery every time, so I've decided to make a simple bat file to be able to choose what files to install if files 1 or 2 (1 being old radio, spl, recovery, and 2 being the new)...
Here is what I got so far xD...
Code:
@echo off
cls
:start
echo.
echo 1. Press 1 to install old files
echo 2. Press 2 to install new files
set choice=
set /p choice=Press 1 or 2 to continue
<--- This section is for option 1 --->(this lines are just to show what option is each)
C:\Android\fastboot flash radio Radio1.img
C:\Android\fastboot flash hboot hboot1.img
C:\Android\fastboot flash recovery recovery1.img
C:\Android\fastboot erase system -w
C:\Android\fastboot reboot-bootloader
<--- End sextion 1 --->
<--- This section is for option 2 --->
C:\Android\fastboot flash radio Radio2.img
C:\Android\fastboot flash hboot hboot2.img
C:\Android\fastboot flash recovery recovery2.img
C:\Android\fastboot erase system -w
C:\Android\fastboot reboot-bootloader
<--- End section 2 --->
fin:
I hope anybody can give me a hand into this =P... I've forgot almost everything in creating this kind of files xD... I know I can make 2 different batch files for the diferents files, but is more commfortable to have everything in just 1 file...
Thanks in advance
YEah..... Not sure how much you want to mess with automated Radio/spl installing. those are the 2 most dangerous parts and what happens if you get an error mid way through?
Be careful
crypysmoker said:
YEah..... Not sure how much you want to mess with automated Radio/spl installing. those are the 2 most dangerous parts and what happens if you get an error mid way through?
Be careful
Click to expand...
Click to collapse
That's why I'm including a "press a key to continue" after each part ...
The only problem so far, wast test the script and forgot to make a nandroid backup xD...
I think this is what you want:
Code:
@echo off
:start
cls
echo 1. Press 1 to install old files
echo 2. Press 2 to install new files
set /p choice=Press 1 or 2 to continue:
if %choice%==1 goto choice1
if %choice%==2 goto choice2
:choice1
echo Choice1 command should go here
set /p anykey=Command complete, press any key to continue...
exit
:choice2
echo Choice2 command should go here
set /p anykey=Command complete, press any key to continue...
exit
Reference:http://en.wikipedia.org/wiki/Batch_file
Thanks, I've already got a functional batch file...
Now I'm gonna port it to C or something to get a program that works for everybody, that way it would be easier to change the radios and stuff...

[Q] I can't install any ROM except Cyanogen

UPDATE: First of all, thanks to everyone that responded. You guys are awesome! I'm returning the phone to HTC and hopefully it gets fixed. I do believe its hardware related but I think the real answer is way over my head.
I'm not really sure whats going on here, but the only ROM I can use / flash is Cyanogen. I was running trickdroid and then the phone decided to freeze and just reboot whenever I tried to launch anything. I cant use my nand from stock, install any sense, aokp or miui ROM. They install and even boot, but then it just freezes and reboots as soon as I unlock the lock screen. I even went as far as returning it back to stock with the RUU, but same scenario. I'm completely stumped. Anyone have anything to suggest? Thanks.
You flashed with a fullwipe and boot.img?
I did, multiple times. I typically do a factory reset, wipe cache, format data, format system, format dalvik then install the ROM. Once the ROM is installed, I then reboot back into fastboot and flash the boot.img. Just to add a little more, your ROM rocks man and I really want to go back to using it. The reason why I had to flash the boot by fastboot is because when I used your script it kept telling me permission denied on certain lines.
Bump
try to flash any sense rom, Format /system in recovery before flashing. Then run an RUU
An RUU wont run unless you have a sense ROM already, So dont worry if the phone dont boot, Aslong as the rom flashes, the RUU should work.
Then just start from the beginning.
Oh and RUU requires RELOCKED bootloader and in some cases Stock recovery
azzledazzle said:
try to flash any sense rom, Format /system in recovery before flashing. Then run an RUU
An RUU wont run unless you have a sense ROM already, So dont worry if the phone dont boot, Aslong as the rom flashes, the RUU should work.
Then just start from the beginning.
Oh and RUU requires RELOCKED bootloader and in some cases Stock recovery
Click to expand...
Click to collapse
I tried this and it didn't work. As soon as i unlock the lock screen it just freezes and reboots. So confused....
dubntz said:
I tried this and it didn't work. As soon as i unlock the lock screen it just freezes and reboots. So confused....
Click to expand...
Click to collapse
Yes but dont worry about that, The RUU should still work even with the phone freezing. You just need the Sense ROM on the phone, Whether it boots or not.
azzledazzle said:
Yes but dont worry about that, The RUU should still work even with the phone freezing. You just need the Sense ROM on the phone, Whether it boots or not.
Click to expand...
Click to collapse
Sorry, but what I meant to say is that I put a sense ROM back on, ran the RUU and it still froze once i tried to unlock the lock screen.
dubntz said:
Sorry, but what I meant to say is that I put a sense ROM back on, ran the RUU and it still froze once i tried to unlock the lock screen.
Click to expand...
Click to collapse
Oh i see... That is so weird
Have you asked in the Cyanogen thread ? The ROM must have altered something deep inside for something like this to happen...
Ive never seen anything like it
azzledazzle said:
Oh i see... That is so weird
Have you asked in the Cyanogen thread ? The ROM must have altered something deep inside for something like this to happen...
Ive never seen anything like it
Click to expand...
Click to collapse
I have not posted anything, although i'm going to now. It is so weird. I can install any sense ROM, but it freezes when I try to unlock the lock screen. I can not install AOKP or MIUI as they just boot loop. Cyanogen is the only ROM that I can flash...lol
dubntz said:
I have not posted anything, although i'm going to now. It is so weird. I can install any sense ROM, but it freezes when I try to unlock the lock screen. I can not install AOKP or MIUI as they just boot loop. Cyanogen is the only ROM that I can flash...lol
Click to expand...
Click to collapse
Have you tried taking out your sim card and rebooting? My phone kept freezing as soon as I unlocked the lockscreen and this is what worked for me...
I have, but no luck.
Sent from my HTC One S using Tapatalk 2
I feel like the phone is not properly wiping or installing the boot.img correctly. I have been trying different things for days. Just doesn't make sense. No pun intended..ha
Just some more experimenting. I tried to use a script from the trickdroid ROM to flash to boot and It came back with some permission denied errors. I'm wondering if that has something to do with it. I don't get any errors like that when I install it through fastboot though...
I'm beginning to think it has something to do with the boot.img not flashing properly. I think there might be some permission issues going on with the phone. I just tried to flash the latest CM nightly with the new boot and it just boot loops.
do you have an sdcard bu
you could try formatting and reloading the card, assume you can get to recovery
also, i fastbooted boot img before flashing rom, one right after the other. thought you said you flashed rom rebooted then flashed boot img, not sure if that matters
good you are wiping system also, or that can cause issues too
rugmankc said:
do you have an sdcard bu
you could try formatting and reloading the card, assume you can get to recovery
also, i fastbooted boot img before flashing rom, one right after the other. thought you said you flashed rom rebooted then flashed boot img, not sure if that matters
good you are wiping system also, or that can cause issues too
Click to expand...
Click to collapse
The ONES has an internal SD Card only so I cant remove it; however, I have formatted it and still the same results. I'm thinking I can't install any ROM that requires a new boot.img. Is something not mounting properly?
dubntz said:
Just some more experimenting. I tried to use a script from the trickdroid ROM to flash to boot and It came back with some permission denied errors. I'm wondering if that has something to do with it. I don't get any errors like that when I install it through fastboot though...
Click to expand...
Click to collapse
This script youre running, is it the one linked from the Trickdroid 4.3 thread, from http://d-h.st/2JV ?
If so check below where it tries to chmod +x fastboot-linux comes before the script cd's to the files directory where fastboot-linux actually lives. So fastboot-linux never gets execute permissions and therefore everything except the echo stuff fails.
Code:
@echo off
chmod +x fastboot-linux
echo "Flashin boot.img"
sleep 1
echo ...
cd files
./fastboot-linux flash boot ../boot.img
echo ...
echo "Flashing complete"
echo ...
echo "Erasing cache partition"
sleep 1
./fastboot-linux erase cache
echo ...
echo "Cache partition cleaned"
echo ...
echo "If there were no errors, you can continue"
echo ...
echo "If not, try again!"
echo ...
echo "Enjoy TrickDroid!"
sleep 20
To make it work edit it like this (move the cd files) or go into files and run chmod +x fastboot-linux before running the script. The Mac script has the same problem.
Code:
@echo off
cd files
chmod +x fastboot-linux
echo "Flashin boot.img"
sleep 1
echo ...
./fastboot-linux flash boot ../boot.img
echo ...
echo "Flashing complete"
echo ...
echo "Erasing cache partition"
sleep 1
./fastboot-linux erase cache
echo ...
echo "Cache partition cleaned"
echo ...
echo "If there were no errors, you can continue"
echo ...
echo "If not, try again!"
echo ...
echo "Enjoy TrickDroid!"
sleep 20
Dunno if this will help your general situation though, good luck!
frdd said:
This script youre running, is it the one linked from the Trickdroid 4.3 thread, from http://d-h.st/2JV ?
If so check below where it tries to chmod +x fastboot-linux comes before the script cd's to the files directory where fastboot-linux actually lives. So fastboot-linux never gets execute permissions and therefore everything except the echo stuff fails.
Code:
@echo off
chmod +x fastboot-linux
echo "Flashin boot.img"
sleep 1
echo ...
cd files
./fastboot-linux flash boot ../boot.img
echo ...
echo "Flashing complete"
echo ...
echo "Erasing cache partition"
sleep 1
./fastboot-linux erase cache
echo ...
echo "Cache partition cleaned"
echo ...
echo "If there were no errors, you can continue"
echo ...
echo "If not, try again!"
echo ...
echo "Enjoy TrickDroid!"
sleep 20
To make it work edit it like this (move the cd files) or go into files and run chmod +x fastboot-linux before running the script. The Mac script has the same problem.
Code:
@echo off
cd files
chmod +x fastboot-linux
echo "Flashin boot.img"
sleep 1
echo ...
./fastboot-linux flash boot ../boot.img
echo ...
echo "Flashing complete"
echo ...
echo "Erasing cache partition"
sleep 1
./fastboot-linux erase cache
echo ...
echo "Cache partition cleaned"
echo ...
echo "If there were no errors, you can continue"
echo ...
echo "If not, try again!"
echo ...
echo "Enjoy TrickDroid!"
sleep 20
Dunno if this will help your general situation though, good luck!
Click to expand...
Click to collapse
It flashed the boot with no issues this time. Still not able to use another ROM. Its so odd. They install but as soon as I unlock the lock screen it just freezes and reboots.
assume you are using the latest clockworkmod recovery for the "OneS"
checked all md5's before flashing anything
can you take the system and boot images from a good sense nandroid or sense rom and put them on your pc in your fastboot.exe folder, open command window cd to fasboot.exe folder and adb reboot bootloader to get into fastboot
then run these commands 3 times
fastboot -w
fastboot erase system
fastboot erase cache
fastboot erase boot
fastboot flash system system.img
fastboot flash boot boot.img
fastboot reboot
you will have restore any user data manully
if you don't have a nandroid copied to you pc from phone do that first
It sounds like maybe you have not wiped everything from cm rom from phone, erasing multiple times may help

Returning to stock, where can I find the stock image?

I need to warranty a phone but I need to turn it back to stock. I am using an older version of TWRP, I am guessing here but do I just download the factory image and flash it and I am done? It seems like everything I get when searching is geared towards the Pixel XL and using ADB rather than TWRP.
Thanks in advance.
Beacuse I part time as an internet troll, I have to chastise you for not reading threw this forum, because well that's why it's there, but hey we all can't use our Brian's all the time, but yes download the factory image for your phone Marlin for Pixel XL and Sailfish for Pixel unzip the file, make sure you have lastest usb drivers installed and click the flash all.bat.
Fastboot and flash factory image.
A wonderful guide: https://forum.xda-developers.com/pixel-xl/how-to/guide-how-to-unlock-root-flash-pixel-xl-t3507886
jerryhou85 said:
Fastboot and flash factory image.
A wonderful guide: https://forum.xda-developers.com/pixel-xl/how-to/guide-how-to-unlock-root-flash-pixel-xl-t3507886
Click to expand...
Click to collapse
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
twilk73 said:
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
Click to expand...
Click to collapse
I'm not a good developer so I cannot answer you that question, but on Google official page, it is recommended to use fastboot or adb to flash factory images...
twilk73 said:
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
Click to expand...
Click to collapse
Because recovery and boot are sort of intermingled now. You would be writing over twrp at the same time you are trying to use it to flash.
Use the flashall bat file. If you want to save data edit out the -w from the bat file.
twilk73 said:
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
Click to expand...
Click to collapse
I am on linux let me just get that out of the way.
So I used adb to fastboot the factory image but nothing happens
the file is in downloads and in the fastboot file. So I type cd Downloads, cd fastboot, fastboot sailfish-nmf260 it all looks good and you can tell adm is working but nothing happens on the phone.
I am current only able to get the phone into fastboot mode I dont know what I messed up but I can no longer even boot into TWRP.
I must have succesfully removed the twrp recovery because no i get the no command screen. If I hold power and press up I can get into the stock android recovery. Is there a way to install the factory image still? Or is the process still the same and I need to adb fastboot? I might need to just do the abd fastboot on a windows computer at work tomorrow.
twilk73 said:
I must have succesfully removed the twrp recovery because no i get the no command screen. If I hold power and press up I can get into the stock android recovery. Is there a way to install the factory image still? Or is the process still the same and I need to adb fastboot? I might need to just do the abd fastboot on a windows computer at work tomorrow.
Click to expand...
Click to collapse
Download the factory image you want here. Unzip the entire contents to the same folder fastboot is located in. Then boot the phone to the bootloader, then plug it in to you computer. Then, if you're using Linux, double click the flash-all.sh file that got unzipped to your fastboot folder. If you're using a Windows computer, double click on the flash-all. bat file instead of the flash-all.sh file. Then sit back and wait. That's about all there is to it. One note. If you want to save your data, open the script you're going to use in a text editor and remove the -w toward the end of the script (remember to save your changes). If you want the phone wiped clean and like new again, just leave it as is.
robocuff said:
Download the factory image you want here. Unzip the entire contents to the same folder fastboot is located in. Then boot the phone to the bootloader, then plug it in to you computer. Then, if you're using Linux, double click the flash-all.sh file that got unzipped to your fastboot folder. If you're using a Windows computer, double click on the flash-all. bat file instead of the flash-all.sh file. Then sit back and wait. That's about all there is to it. One note. If you want to save your data, open the script you're going to use in a text editor and remove the -w toward the end of the script (remember to save your changes). If you want the phone wiped clean and like new again, just leave it as is.
Click to expand...
Click to collapse
ive done these steps but its failing to work. This is exactly what I am doing.
1. Download factory image.
2. Extract factory image into fastboot file.
the fast boot file is in the dowloads folder so I type.
cd Downloads
cd fastboot
fastboot flash-all.sh
iv also tried fastboot the sailfish-nmf260.img and boot.img and flashall. Ive tried several different ways this is what happens no mater what I type.
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> [ <second> ] ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] create bootimage and
flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
Click to expand...
Click to collapse
On the phone nothing happens. It appears that all I am getting is a list of options but none of the options seem to be working either.
I might add that the fastboot folder I am using was downloaded back when I installed twrp is it possible my fastboot file doesnt have the correct files to get the job done?
twilk73 said:
ive done these steps but its failing to work. This is exactly what I am doing.
1. Download factory image.
2. Extract factory image into fastboot file.
the fast boot file is in the dowloads folder so I type.
cd Downloads
cd fastboot
fastboot flash-all.sh
iv also tried fastboot the sailfish-nmf260.img and boot.img and flashall. Ive tried several different ways this is what happens no mater what I type.
On the phone nothing happens. It appears that all I am getting is a list of options but none of the options seem to be working either.
I might add that the fastboot folder I am using was downloaded back when I installed twrp is it possible my fastboot file doesnt have the correct files to get the job done?
Click to expand...
Click to collapse
Have you tried putting phone in fastboot mode and doubble click the flash all.sh file? That's how it is done on Windows.
Sent from my Google Pixel using XDA Labs
Sgace said:
Have you tried putting phone in fastboot mode and doubble click the flash all.sh file? That's how it is done on Windows.
Sent from my Google Pixel using XDA Labs
Click to expand...
Click to collapse
Basically yes. But with linux you cant just double click. So in terminal I typed "cd Download, cd fastboot, fastboot flash-all.sh" that command will attempt to launch that file.
I feel like the issue is with adb on my laptop I tried making sure its updated but i got nothing so ill try to do it on a work computer when I get free time.
Its pretty crappy right now because I am without a phone but heck I pet the dog today during lunch instead of reading the news feed off my phone so I guess the dog is happy lol.
twilk73 said:
Basically yes. But with linux you cant just double click. So in terminal I typed "cd Download, cd fastboot, fastboot flash-all.sh" that command will attempt to launch that file.
I feel like the issue is with adb on my laptop I tried making sure its updated but i got nothing so ill try to do it on a work computer when I get free time.
Its pretty crappy right now because I am without a phone but heck I pet the dog today during lunch instead of reading the news feed off my phone so I guess the dog is happy lol.
Click to expand...
Click to collapse
I don't think you can flash it with fastboot. In Windows, at the command prompt, you just type flash-all.bat and the batch file will run. It contains all the necessary fastboot commands. Perhaps that's where you're going wrong. Try just typing flash-all.sh. Leave the fastboot out.
twilk73 said:
Basically yes. But with linux you cant just double click. So in terminal I typed "cd Download, cd fastboot, fastboot flash-all.sh" that command will attempt to launch that file.
I feel like the issue is with adb on my laptop I tried making sure its updated but i got nothing so ill try to do it on a work computer when I get free time.
Its pretty crappy right now because I am without a phone but heck I pet the dog today during lunch instead of reading the news feed off my phone so I guess the dog is happy lol.
Click to expand...
Click to collapse
Try this for sailfish (fix accordingly if marlin, username of course is common sense, if still confused, you shouldn't be using linux)
I build and use debian sid
Code:
cd /home/username/Downloads
tar xvf sailfish-opr3.170623.008-factory-bb8bb3a3.zip -C /home/username
cd /home/username/sailfish-opr3.170623.008
tar xvf image-sailfish-opr3.170623.008.zip
cd /home/username/sailfish-opr3.170623.008
./flash-all.sh
If you need the latest adb/fastboot name it something like google.sh
Code:
#!/bin/bash
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip \platform-tools-latest-linux.zip
cp platform-tools/adb /usr/bin/adb
cp platform-tools/fastboot /usr/bin/fastboot
piperx said:
Try this for sailfish (fix accordingly if marlin, username of course is common sense, if still confused, you shouldn't be using linux)
I build and use debian sid
Code:
cd /home/username/Downloads
tar xvf sailfish-opr3.170623.008-factory-bb8bb3a3.zip -C /home/username
cd /home/username/sailfish-opr3.170623.008
tar xvf image-sailfish-opr3.170623.008.zip
cd /home/username/sailfish-opr3.170623.008
./flash-all.sh
If you need the latest adb/fastboot name it something like google.sh
Code:
#!/bin/bash
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip \platform-tools-latest-linux.zip
cp platform-tools/adb /usr/bin/adb
cp platform-tools/fastboot /usr/bin/fastboot
Click to expand...
Click to collapse
Sorry I wish I could try this. I had access to a windows computer at work and I was able to get everything done. After doing it at work I have a feeling I wasnt placing the files in the correct folder together to get it to start the update. It can be hard doing this on something other than windows for a dummy like me because most of the tutorials for things like this seem to be windows oriented. Regardless its done. I couldnt lock the boot loader on the windows computer though oddly but no big deal because I can do it on my laptop.
Thanks for all the help guys.

Categories

Resources