1. Download our Official Android App: Forums for Android!

Support Boot into recovery without /boot partition

Discussion in 'Android Help' started by pikiwedia, May 5, 2016.

  1. pikiwedia

    pikiwedia Lurker
    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    8
    Joined:
    Apr 26, 2016

    Apr 26, 2016
    8
    5
    6
    hello. I would like to ask if I can boot into recovery mode without boot partition. as far as i understand kernel which talk to hardware is in boot partition. I wonder what happen if I erase it / something go wrong during flashing will I still be able to boot into recovery mode. Does recovery has its own kernel ? what in such a case with bootloader mode? will it work? where is stored bootloader?
     

    Advertisement

  2. scary alien

    scary alien not really so scary
    Moderator
    Rank:
     #8
    Points:
    2,138
    Posts:
    22,293
    Joined:
    Mar 5, 2010

    Mar 5, 2010
    22,293
    23,649
    2,138
    Male
    space alien ;)
    Indy
    Yes, the recovery has it's own kernel and you can boot an Android independently of the boot partition (i.e., booting up/from the recovery partition--that's what you do when you boot in recovery mode).

    If you've got the ability to boot and/or flash your partitions, it's probably a good idea to make a couple of backups of a partition that you might end-up messing with and store those away from your Android device for safe-keeping :).

    (Nandroid backups are your friend :))

    edit: forgot to answer your other questions; the recovery image is stored in the recovery partition, and the boot image is stored in the boot partition; you can write your recovery image to your boot partition and then when you try to boot up "normally", you'd see the recovery that you flashed (that's a non-normal scenario, of course; most folks would NOT want to do that); additionally, writing the boot image to the recovery partition would likely NOT work simply because it (the boot image) is likely to be too large for the recovery partition to hold.

    Cheers!
     
    #2 scary alien, May 5, 2016
    Last edited: May 5, 2016
  3. pikiwedia

    pikiwedia Lurker
    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    8
    Joined:
    Apr 26, 2016

    Apr 26, 2016
    8
    5
    6
    Thank you! That's great /boot and /recovery are independent. I didn't specify the other question clearly. I meant bootloader mode as odin mode for Samsung. I have to use it to flash custom recovery. Where is it stored? I want to know to not mess it up. It's last resort I guess when recovery somehow stops working.
     
    scary alien likes this.
  4. scary alien

    scary alien not really so scary
    Moderator
    Rank:
     #8
    Points:
    2,138
    Posts:
    22,293
    Joined:
    Mar 5, 2010

    Mar 5, 2010
    22,293
    23,649
    2,138
    Male
    space alien ;)
    Indy
    Ah, I was simply speaking generically (didn't know what maker/manufacturer/device you had).

    I've not used Odin w/Samsung for my flashing experiences--just fastboot (and other utils) to flash the boot and recovery images. I'm sure Odin will ultimately flash the boot and/or recovery images in the same way as fastboot would--you're just using a different utility (i.e., Samsung-specific Odin).

    Not sure what you're asking by "Where is it stored?" (i.e, what is the "it" that you're referencing here?)

    It would probably help if you posted / confirmed your device/model/carrier (although I see from your postings it might be a Samsung Galaxy S4 running on Boost Mobile?).

    Pinging our esteemed and very good friend @Lordvincent 90 to weigh-in here if he's available :).
     
  5. Telyx

    Telyx Well-Known Member
    Rank:
     #266
    Points:
    53
    Posts:
    98
    Joined:
    May 25, 2015

    May 25, 2015
    98
    55
    53
    Male
    Garden City, MI, USA
    That's exactly what we do with the ZTE ZMAX to get system r/w since there is something about the boot partition that locks /system down. Then when we're done messing with /system we flash the bootloader and recovery back to their own partitions.
     
    scary alien likes this.
  6. scary alien

    scary alien not really so scary
    Moderator
    Rank:
     #8
    Points:
    2,138
    Posts:
    22,293
    Joined:
    Mar 5, 2010

    Mar 5, 2010
    22,293
    23,649
    2,138
    Male
    space alien ;)
    Indy
    Cool @Telyx! :)

    Is it just the ro.insecure setting in the boot.img that's keeping you from updating /system?

    (each time you want to change /system? if so, you could unpack the boot.img, change that property, repack the boot.img, and then re-flash the boot.img; it's not trivial but is pretty standard and straight-forward to do...)
     
  7. Telyx

    Telyx Well-Known Member
    Rank:
     #266
    Points:
    53
    Posts:
    98
    Joined:
    May 25, 2015

    May 25, 2015
    98
    55
    53
    Male
    Garden City, MI, USA
    I think it's something in the partition itself, not the boot.img, since when we flash recovery to the boot partition recovery can't write to /system. We do at least have zips we can flash in recovery to automate the process of switching/restoring and I think someone recently came up with an app that does it without rebooting to recovery, so at this point it's just a mildly inconvenient quirk. (I don't use my ZMAX regularly--it's my backup now.)
     
    scary alien likes this.
  8. pikiwedia

    pikiwedia Lurker
    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    8
    Joined:
    Apr 26, 2016

    Apr 26, 2016
    8
    5
    6
    By "it" I mean program which run odin mode. Let's say I erase /boot /recovery and /system, will I be able to connect fon to PC in odin Mode and flash it? There has to be somewhere code which is responsible for communication with pc. I wonder if it works without boot and system partition. If yes then where is it. I have galaxy s4 gt-i9505 with firmware ended at ol1
    I want to use cf auto root but I couldn't find exact version to my firmware that's why I'm asking maybe stupid questions just to be sure :) I don't know what boost mode is. I bought this phone without any carrier bundle, just only phone without simlock. It doesn't have fastboot mode only odin.
     
    #8 pikiwedia, May 5, 2016
    Last edited: May 5, 2016
    scary alien likes this.
  9. scary alien

    scary alien not really so scary
    Moderator
    Rank:
     #8
    Points:
    2,138
    Posts:
    22,293
    Joined:
    Mar 5, 2010

    Mar 5, 2010
    22,293
    23,649
    2,138
    Male
    space alien ;)
    Indy
    Ah, thanks--that makes sense :).

    I'll let others (@Lordvincent 90, etc.) point you in the direction of the best place to get the version of Odin that you'll need to download for your PC (so yes, Odin is the flashing utility for your device).

    [edit: and we do have a root area dedicated to the SGS4 that might be useful to you, too]
     
    pikiwedia and Lordvincent 90 like this.
  10. Lordvincent 90

    Lordvincent 90 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
    Rank:
    None
    Points:
    583
    Posts:
    5,559
    Joined:
    Oct 5, 2011

    Oct 5, 2011
    5,559
    4,444
    583
    Male
    entertainer
    grand rapids,mi
    Thanks @scary alien. Good info here.

    Downloading mode operates completely independent of the operating system and recovery.
    You could delete the /system, /boot, /recovery, the internal memory and the sd card and have zero effect on downloading mode.

    As far as cf auto root is concerned... I've never personally used it. I've always used Odin to install a custom recovery and then installed supersu with a flashable zip.
     
    Jfalls63, pikiwedia and scary alien like this.
  11. pikiwedia

    pikiwedia Lurker
    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    8
    Joined:
    Apr 26, 2016

    Apr 26, 2016
    8
    5
    6
    thank you. that's really interesting. The only thing coming to my mind is this protocol to communicate with pc (odin/download mode) has to be implemented in ARM microcontroller. Am I right? And even when I solder blank emmc ic I will be able to connect phone to pc and flash rom?

    I've read to this model I cannot install custom recovery with stock kernel. The guide sais I have to use cf-auto-root to gain root access and I think it changes something in kernel that allows me flash custom recovery. I don't know how safe it is to try flash custom recovery. Every guide l've found to this very model sais about cf auto root.
     
    #11 pikiwedia, May 5, 2016
    Last edited: May 5, 2016
    Lordvincent 90 likes this.
  12. Lordvincent 90

    Lordvincent 90 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
    Rank:
    None
    Points:
    583
    Posts:
    5,559
    Joined:
    Oct 5, 2011

    Oct 5, 2011
    5,559
    4,444
    583
    Male
    entertainer
    grand rapids,mi
    This guide doesn't specify a firmware version. It looks fairly universal to me.

    Disclaimer - As I'm only familiar with the cdma version, i can't confidently say this will work for you, but it matches your model number.
    http://forum.xda-developers.com/showthread.php?t=2219803
     
    scary alien and pikiwedia like this.
  13. pikiwedia

    pikiwedia Lurker
    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    8
    Joined:
    Apr 26, 2016

    Apr 26, 2016
    8
    5
    6
    Yes. it seems to be universal but on cf auto root homepage I have to choose file specific to my firmware version which isn't there. I can find only to my previous version, before OTA update. Theoretically if something go wrong I should be able to flash official Rom which is available to download and should include boot partition so every changes made by cf auto root should be reversed.
     
    Lordvincent 90 likes this.
  14. Lordvincent 90

    Lordvincent 90 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
    Rank:
    None
    Points:
    583
    Posts:
    5,559
    Joined:
    Oct 5, 2011

    Oct 5, 2011
    5,559
    4,444
    583
    Male
    entertainer
    grand rapids,mi
    Yes, that's correct. Should things go badly, you should be able to restore your device with the stock firmware
     
    scary alien likes this.
  15. Jfalls63

    Jfalls63 Android Expert
    Rank:
     #30
    Points:
    818
    Posts:
    4,130
    Joined:
    May 15, 2015

    May 15, 2015
    4,130
    3,052
    818
    Male
    Electrician
    Satsuma,Alabama
    Recently walked two individuals through rooting i9505 with TWRP and SuperSU zip. One was on 4.4.2 and other on 5.0.
     
  16. Lordvincent 90

    Lordvincent 90 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
    Rank:
    None
    Points:
    583
    Posts:
    5,559
    Joined:
    Oct 5, 2011

    Oct 5, 2011
    5,559
    4,444
    583
    Male
    entertainer
    grand rapids,mi
    So, recovery can be flashed on the i9505 variant without root?
     
    scary alien and pikiwedia like this.
  17. Jfalls63

    Jfalls63 Android Expert
    Rank:
     #30
    Points:
    818
    Posts:
    4,130
    Joined:
    May 15, 2015

    May 15, 2015
    4,130
    3,052
    818
    Male
    Electrician
    Satsuma,Alabama
  18. pikiwedia

    pikiwedia Lurker
    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    8
    Joined:
    Apr 26, 2016

    Apr 26, 2016
    8
    5
    6
    So root is needed only to prevent flashing back stock recovery at boot. I didn't even knot there is a back up of it. thx [emoji5]
     
  19. Jfalls63

    Jfalls63 Android Expert
    Rank:
     #30
    Points:
    818
    Posts:
    4,130
    Joined:
    May 15, 2015

    May 15, 2015
    4,130
    3,052
    818
    Male
    Electrician
    Satsuma,Alabama
    I looked at a lot of methods at XDA. Most were from when the S4 first came out I think, 2013.
    CF Autoroot was used alot then as a way to root without tripping Knox. Found a few more current (2014& 15) that had the recovery/SuperSU method listed. Guess newer Android versions allowed it to work.
     
    Lordvincent 90 and scary alien like this.

Share This Page

Loading...