How to go back from custom rom to factory

Search This thread

r0tt0r

Senior Member
Jun 29, 2016
69
16
files are from current available factory image available. be sure to use latest available fastboot application.

1. reboot to fastboot
2. fastboot erase userdata (all data is deleted, have a backup)
3. fastboot reboot-bootloader
4. fastboot flash bootloader bootloader-sunfish-s5-0.2-6539975.img
5. fastboot reboot-bootloader
6. fastboot flash radio radio-sunfish-g7150-00018-200701-b-6643937.img
7. fastboot reboot-bootloader
8. fastboot update image-sunfish-rp1a.201005.006.zip
9. fastboot reboot-bootloader
10. choose recovery
11. on the android icon with the red warning shield hold power and press volume up
12. Stock recovery appears. Choose wipe data / factory reset

if in any case the fastboot command gets stuck, replug the device and/or restart bootloader. BE CAREFULL WHEN DOING THIS WHILE RUNNING fastboot flash bootloader !!!!BRICK POSSIBLE!!!!!

After that you can boot up and see its working.
if everything is right, you should flash both slots before
relocking bootloader

so repeat above steps and do point 4. and 6. fastboot flash with

fastboot flash --slot all

from above steps. Check phone boots on both slots. Active slot can be switched via

fastboot --set-active=a
verify it boots then

fastboot --set-active=b
verify again it boots

then proceed with

fastboot flashing lock

(data will be wiped)
 
Last edited:
  • Like
Reactions: Wi1son

Edmontonchef

Senior Member
  • Nov 30, 2016
    754
    312
    39
    edmonton
    If you're doing it this way you should flash the images to both slots.

    Fastboot flash bootloader --slot all (image)
    Reboot bootloader
    Fastboot flash radio --slot all (image)
    Reboot bootloader
    Then
    Fastboot update (extracted sunfish folder)
    Let it do its thing.

    Incase there's any doubt on both slots being stock you can just adb sideload the OTA after you boot
     
    Last edited:
    • Like
    Reactions: Wi1son

    r0tt0r

    Senior Member
    Jun 29, 2016
    69
    16
    If you're doing it this way you should flash the images to both slots.

    Fastboot flash bootloader --slot all (image)
    Reboot bootloader
    Fastboot flash radio --slot all (image)
    Reboot bootloader
    Then
    Fastboot update (extracted taimen folder)
    Let it do its thing.

    Incase there's any doubt on both slots being stock you can just adb sideload the OTA after you boot

    indeed that is correct , ill add this to the post though in case something goes wrong i normally only affect active slot to reduce brick possibility
     

    r0tt0r

    Senior Member
    Jun 29, 2016
    69
    16
    Did you ever look at factory packs? It has flash_all scripts for Linux and Windows and its do all steps as needed.
    Or I'm wrong?

    go and unlock ur phone, flash superiorOS fe. (that was the one i was on) then go back to stock.

    tell me if it was all so easy. this guide is meant if you run into issues like i did and i wanted to not have you struggle through the same.

    if you think running "bat" without seeing any output of what is happening and sit for an hour without anything has happened at all cause fastboot is stuck, then do so and skip this thread.
     
    Last edited:

    mauri311

    Member
    Mar 5, 2010
    11
    0
    If you're doing it this way you should flash the images to both slots.

    Fastboot flash bootloader --slot all (image)
    Reboot bootloader
    Fastboot flash radio --slot all (image)
    Reboot bootloader
    Then
    Fastboot update (extracted taimen folder)
    Let it do its thing.

    Incase there's any doubt on both slots being stock you can just adb sideload the OTA after you boot

    Im confused when you mentioned "Fastboot update (extracted taimen folder)" taimen?

    thanks is advance
     

    Edmontonchef

    Senior Member
  • Nov 30, 2016
    754
    312
    39
    edmonton
    Im confused when you mentioned "Fastboot update (extracted taimen folder)" taimen?

    thanks is advance
    Sorry I meant sunfish (brainfart)
    When you extract the factory image a second folder will show up. It'll say image.sunfish.
    You can type in the terminal ( fastboot update ) then drag and drop that folder. Works the same way as flash-all. Just update bootloader and radio first.
     

    foxxof

    New member
    Sep 20, 2017
    0
    0
    Not enough space

    Hello,
    I end at point 8:
    error: failed to load 'image-sunfish-rp1a.201005.006.zip': Not enough space

    How can I fix the problem ?
     

    r0tt0r

    Senior Member
    Jun 29, 2016
    69
    16
    Hello,
    I end at point 8:
    error: failed to load 'image-sunfish-rp1a.201005.006.zip': Not enough space

    How can I fix the problem ?

    it should be fixable by
    fastboot erase system_a
    or
    fastboot erase system_b
    depending on your current active slot.
     

    foxxof

    New member
    Sep 20, 2017
    0
    0
    it should be fixable by
    fastboot erase system_a
    or
    fastboot erase system_b
    depending on your current active slot.

    fastboot erase system_a
    output :
    erasing 'system_a' . . .
    FAILED (remote: Partition should be erased in fastbootd)
    finished. total time: 0.138s

    fastboot erase system_b
    output :
    erasing 'system_b' . . .
    FAILED (remote: Partition should be erased in fastbootd)
    finished. total time: 0.147s

    :crying:


    i downloaded the latest sdk. (r30.0.5 not 30.0.4)
    now it works!
    :D :eek:
     
    Last edited:

    r0tt0r

    Senior Member
    Jun 29, 2016
    69
    16
    fastboot erase system_a
    output :
    erasing 'system_a' . . .
    FAILED (remote: Partition should be erased in fastbootd)
    finished. total time: 0.138s

    fastboot erase system_b
    output :
    erasing 'system_b' . . .
    FAILED (remote: Partition should be erased in fastbootd)
    finished. total time: 0.147s

    :crying:


    i downloaded the latest sdk. (r30.0.5 not 30.0.4)
    now it works!
    :D :eek:

    btw the message partition should be erased in fastbootd is as far i know the recovery fastboot not the one coming at first (boot recovery, at little android press power+vol)
     

    boomo15

    Member
    Dec 18, 2019
    9
    2
    Partition should be erased in fastbootd

    fastboot erase system_a
    output :
    erasing 'system_a' . . .
    FAILED (remote: Partition should be erased in fastbootd)
    finished. total time: 0.138s

    fastboot erase system_b
    output :
    erasing 'system_b' . . .
    FAILED (remote: Partition should be erased in fastbootd)
    finished. total time: 0.147s
    :D :eek:
    adb reboot bootloader
    fastboot reboot fastboot
    fastboot erase system_a or system_b

    ---------- Post added at 02:45 PM ---------- Previous post was at 02:16 PM ----------

    go and unlock ur phone, flash superiorOS fe. (that was the one i was on) then go back to stock.

    tell me if it was all so easy. this guide is meant if you run into issues like i did and i wanted to not have you struggle through the same.

    if you think running "bat" without seeing any output of what is happening and sit for an hour without anything has happened at all cause fastboot is stuck, then do so and skip this thread.
    Way! Why so much emotions over simple suggestion? You where unlucky and give people a guide in case which is replicate all commands from scripts. Good!
    And for record my experience with this device in short!
    1. Received – setup – Android 11 – OTA to 006 – Canary – root – boot – check all stuff – install my apps – check again – pm list for bloatware
    2. flash superiorOS – make notes not working stuff – root – check again – same not working stuff
    3. flash factory android 10 with flash_all – boot – check
    4. flash CalyxOS – check – root – worked – back to stock with flash all Android 10 – check – all good
    5. flash RR – check – root – buggy for me
    6. flash Android 11 with flash_all – flash GrapheOS -- root -- some apps not working
    7. flash SuperiorOS – root – flashed blu-spark kernel – remove unneeded stuff – restore backup – same bugs
    8. flash factory – root – blu-spark – debloat – working on stock now.
    All time I used flash-all and no any problems. And thank you for your suggestion to skip this tread!:good:
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 1
      files are from current available factory image available. be sure to use latest available fastboot application.

      1. reboot to fastboot
      2. fastboot erase userdata (all data is deleted, have a backup)
      3. fastboot reboot-bootloader
      4. fastboot flash bootloader bootloader-sunfish-s5-0.2-6539975.img
      5. fastboot reboot-bootloader
      6. fastboot flash radio radio-sunfish-g7150-00018-200701-b-6643937.img
      7. fastboot reboot-bootloader
      8. fastboot update image-sunfish-rp1a.201005.006.zip
      9. fastboot reboot-bootloader
      10. choose recovery
      11. on the android icon with the red warning shield hold power and press volume up
      12. Stock recovery appears. Choose wipe data / factory reset

      if in any case the fastboot command gets stuck, replug the device and/or restart bootloader. BE CAREFULL WHEN DOING THIS WHILE RUNNING fastboot flash bootloader !!!!BRICK POSSIBLE!!!!!

      After that you can boot up and see its working.
      if everything is right, you should flash both slots before
      relocking bootloader

      so repeat above steps and do point 4. and 6. fastboot flash with

      fastboot flash --slot all

      from above steps. Check phone boots on both slots. Active slot can be switched via

      fastboot --set-active=a
      verify it boots then

      fastboot --set-active=b
      verify again it boots

      then proceed with

      fastboot flashing lock

      (data will be wiped)
      1
      If you're doing it this way you should flash the images to both slots.

      Fastboot flash bootloader --slot all (image)
      Reboot bootloader
      Fastboot flash radio --slot all (image)
      Reboot bootloader
      Then
      Fastboot update (extracted sunfish folder)
      Let it do its thing.

      Incase there's any doubt on both slots being stock you can just adb sideload the OTA after you boot
      1
      You can do this in a more simple way by flash the stock image via official website from android, just click and follow the instruction
      1
      Awesome guide - Thank you!
      FYI - To lock the bootloder, I had to use " fastboot flashing lock "
    Our Apps
    Get our official app!
    The best way to access XDA on your phone
    Nav Gestures
    Add swipe gestures to any Android
    One Handed Mode
    Eases uses one hand with your phone