Restore Stock - Alternative to MiFlash? - Xiaomi Mi A1 Questions & Answers

Hello XDA Community.
MiFlash appears to require a windows based machine to run the software (which I do not posses), therefore I am interested in an alternative method to restore my device to stock.
From my past experiences with nexus devices, I was able to download the factory image, extract, boot into fastboot, connect to a computer, and then execute the included flash_all.sh file. Is that still a working option for our Mi A1s?
Thank you in advanced!

You can always flash manually by using commands one by one like- fastboot flash system system.img etc etc

Yes, you can just go to here
And just place all those commands into a .bat file and execute it (if your in windows), don't flash userdata partition if you want to save the user data and internal SD files

Thank you both!
Sent from my iPhone using Tapatalk

Related

[Q] How to make a system folder into a system.img

Hello XDA, I'm kind of new to ROMs etc. and would appreciate some help. I am trying to install mikegapinski's 2.3.7 ROM (v5) through fastboot and whereas in the past I have seen a boot.img and a system.img, there is a boot.img and a system folder. Is there a way to make the folder into a system.img file that I could flash onto my GT540?
In short, how do you make a system.img file out of a folder with system files in them?
hey there !
(system.img + boot.img) is for fastboot
fastboot flash boot boot.img
fastboot flash system system.img
and the (system folder + boot.img) is for recovery
use any recovery
select zip from sdcard
select the zip
i dont think you can convert the folder to a .img(or the other way around) . and if the rom you are talking about mike's aosp v5 then i wont recommend it as for now there are problems with the ram and so it becomes very laggy. i would recommend mur4iks swiftdroid asis but the choice is yours
I know you can 'extract' images using 'unyaffs' but I never made an image from a folder (except when dumping partitions). I think there is a way though.
If you have Linux on your PC, then you can use the 'yaffs' tool. Search it on Google.
This is how even AOSP compiles system folder into system.img
Sent from my LG GT540 Swift using XDA App
I list found this. Should work!
http://db.tt/ROQSWTW6
Sent from my LG GT540 Swift using Tapatalk
can someone please help me to make system.img from system extraxted folder.
my phone its dead and i can find right rom for it
allway hang on boot logo
Please
link for download
https://www.dropbox.com/s/c99ashouw0fb4hp/system.rar
PS
will if neeed no problem
I got it. If you use Linux, you can create an iso file of the system folder, and then convert it to .img. Just follow it:
In a terminal(CTRL+ALT+T):
Code:
mkisofs -o /path/to/the/system/folder ~/system.iso
dd if=~/system.iso of=~/system.img
rm ~/system.iso
Your system.img will be on your home directory.
and it work's too ? (when you flash it from fastboot)
y2yu said:
can someone please help me to make system.img from system extraxted folder.
my phone its dead and i can find right rom for it
allway hang on boot logo
Please
link for download
https://www.dropbox.com/s/c99ashouw0fb4hp/system.rar
PS
will if neeed no problem
Click to expand...
Click to collapse
pls if you find a solutuon please pm me. And do you think flashing the system.img will solve booting probz?
suggestion
take a look at this url, and examine the zip file contained.
you could boot into cwm and install the zip (not suggesting, its what i did)
if u make a zip file in the same layout you could install your zip and it will update the system partition.
as you have a desire, heres whats required
on phone: place phone into fastboot mode
on computer: unzip to a folder , place the img file in such folder,
open a command prompt, (navigate to folder using the cd command)
and type: fastboot boot bravo-cwm.img
mount sd card, toggle usb storage, place your zip in root of sdcard.
then untoggle, go back, select option to install zip from sdcard.
choose select zip file.
find your zip.
tap on the file, and it will install...
you SHOULD by this point have an updated phone as you desired (lol)
if it does not work as you expected, have a look for a standard system.img for your phone, and put that into a zip
name the zip (i put it in caps, weather needed i dont know) PM99IMG.zip
place it into root of sdcard, and put phone into the first screen of recovery menu, the white screen.
it will analyze your zip and ask you to install, press up to flash and then the required option to reboot when its done to revert your phone back to normal.
hope this helps there buddy,
ill most likley forget to check back, so if u need any help pm me and ill see what i can do,
Is this working
Edu_Renesto said:
I got it. If you use Linux, you can create an iso file of the system folder, and then convert it to .img. Just follow it:
In a terminal(CTRL+ALT+T):
Code:
mkisofs -o /path/to/the/system/folder ~/system.iso
dd if=~/system.iso of=~/system.img
rm ~/system.iso
Your system.img will be on your home directory.
Click to expand...
Click to collapse
HI Bro,
Is the output file system.img after flash into the rom?
phone stuck in usb logo... i have zenfone 4
Yaffey for Windows Might Help
tejasjadhav said:
If you have Linux on your PC, then you can use the 'yaffs' tool. Search it on Google.
This is how even AOSP compiles system folder into system.img
Sent from my LG GT540 Swift using XDA App
Click to expand...
Click to collapse
And if you have Windows on your PC, try Yaffey! http://www.xda-developers.com/yaffey-for-all-your-yaffs2-needs/

[Q] HUGE problem! >:_(

Hi,
I was going to install a ROM on my Nexus, so I made a backup and wiped EVERYTHING. Including the SD card so now in clockworkmod
it can not mount the SD card, I cannot mount it to my computer... I am shaking and my hands are cold... I cant flash any rom HELP NOW!!!! ((((
thanks
No need to panic, its a nexus.
can you adb push a ROM zip to your sdcard?
if you can't then you can always flash a factory image with fastboot and you'll be back to normal in no time.
So take a deep breath and chill.
Sent from my Nexus 7 using xda premium
nodstuff said:
No need to panic, its a nexus.
can you adb push a ROM zip to your sdcard?
if you can't then you can always flash a factory image with fastboot and you'll be back to normal in no time.
So take a deep breath and chill.
Sent from my Nexus 7 using xda premium
Click to expand...
Click to collapse
I have a factory image please tell me how'd I do that in fastboot! (only if they had a begging at knees thing)
ok i will write you some step by step functions to follow in order to get yourself a rom onto your device
Info that is Needed!
Do You Already Have ADB functioning on your Computer
If Yes - Skip to Step 2
If No Proceed from Step 1
----STEP 1----
install the ADB drivers for your device
im going to assume you have a windows machine here so the followthrough will be for windows (i use Win7 but it should be the same)
BOOT YOUR DEVICE INTO RECOVERY WHILE PLUGGED INTO YOUR PC BUT DO NOT CLICK ON ANYTHING
1. Download These Google Drivers for Nexus Devices http://www.themoviedb.org/movie/15092-crank-ii-high-voltage
2. extract the folder
3. press the start button
4. right click on "Comptuer" or "My Computer (XP)
5. Click on Manage
6. in the new window press "Device Manager" on the left
you should see in the tree on the right (a device with a yellow exclamation mark ! probably called nexus)
7. right click it and press update driver software
8. press browse my computer for driver software
9. press let me pick from a list of device drivers on my computer
10. press have disk
11. press browse
12. on the new window navigate to the folder you extracted earlier and select the android_winusb.inf
13. press ok
14. there will either be 1 or 2 options to choose - click Android Composite ADB Interface and then press next
15. tick always trust software from google inc. and then install
your device should now have ADB capablilities
Proceed to step 2
----STEP 2----
this will use adb to push a file to your device while it is in recovery mode which you can then flash
1. Download This - http://www.mediafire.com/?50baad8rykng2j0
these are adb & fastboot binaries which will allow your pc to send files to your nexus via ADB
2. extract the downloaded archive to somewhere easy to remember ( i suggest C:\fastboot )
3. rename your downloaded custom rom to rom.zip (for simplicity) and copy it to the extracted directory (the one with adb.exe & fastboot.exe)
4. bring a command prompt to this directory
- in the directory you extracted (c:\fastboot) hold shift and right click in a blank area of the main window
- click "open command window here"
or
- Windows Key & R
- in the new box type cmd then press enter
- type cd c:\fastboot (where c:\fastboot is the directory where you extracted)
now to push it over
5. in the cmd window type adb devices and make sure your device is listed
your should see something like
list of attached devices
XXXXXXXXXXXXXXXX Recovery
where XXXXX is your devices serial number
6. in your cmd window type adb push rom.zip /sdcard/
this will take a while to complete but once it is down go back to your device and try to install a rom as you usually would
you should see the file in your internal memory to install now
^^ I was too slow!
First install the android SDK (Google it) then you need to put fastboot in your path you need to open my computer, system properties, advanced system settings, environment variables button at the bottom, then in the bottom window scroll down til you see find path and edit it and add the path to the android SDK and in particular the platform-tools folder.
So if you download the android SDK to your C drive, the path you will be adding will be like ";C:\android-sdk\platform tools" (note the semi colon at the start, important to separate entries)
Once the path is set up you can use fast boot in cmd just by typing fastboot xxxxx rather than typing C:\android-sdk\platform-tools fastboot xxxxx every time.
So next thing is to extract the images to somewhere.
Inside the zip is another zip called image-nakasi-jzo54k,
unzip that til you have .IMG files, system.img, boot.img etc.
then once they are extracted you use cmd to CD to that folder where you have the images and you can start to flash them.
fastboot flash system system.img
fastboot flash boot boot.img
You could just use flash-all.bat but and that will flash them all automatically but will wipe your internal SD.
Sent from my Nexus 7 using xda premium
If you JUST read that, I figured it out, and if I can flash all the partitons correctly, I will punch the thanks button.
cburk01 said:
yay new problem
Ok, so I unzipped it, extracted the thing inside, but it was it a weird format Windows recognized as "file". So, I added .zip to the end. WinRAR opened it, I saw the files, began to extract when an error popped up about the archive being damaged. WTF.
Click to expand...
Click to collapse
What was the name of the file that you had problems with?
the first one is a .tgz file then .tar but the one with the images inside that is .zip (looking at it now)
use 7-zip instead of winzip
Sent from my Nexus 7 using xda premium
nodstuff said:
What was the name of the file that you had problems with?
the first one is a .tgz file then .tar but the one with the images inside that is .zip (looking at it now)
use 7-zip instead of winzip
Sent from my Nexus 7 using xda premium
Click to expand...
Click to collapse
Now I REALLY DO have a problem. I flashed boot.img, system.img, userdata.img, everything to the right partitons and still have a problem. Boot loop. Sticks on Google logo. Why? I did everything right. I even tried fastboot boot boot.img, no luck. I saw some people having boot loop problems, too on 4.1.2. So now, until you reply, I am going to try a custom kernel. Scratch that I'm using ToolKit to download and install 4.1.1.
If you flashed userdata.img that means your internal SD is wiped.
did you run flash-all.bat that is in the folder?
It would be no harm to do that now since everything is wiped already.
no matter what its still recoverable so don't worry.
Sent from my Nexus 7 using xda premium
nodstuff said:
If you flashed userdata.img that means your internal SD is wiped.
did you run flash-all.bat that is in the folder?
It would be no harm to do that now since everything is wiped already.
no matter what its still recoverable so don't worry.
Sent from my Nexus 7 using xda premium
Click to expand...
Click to collapse
*facepalm* with the SD I already wiped that before I flashed. And I didnt run flashall.bat or what ever its called so I am going in to try that. Ran flashall got some weird radio flashing error so now continuing with ToolKit.
Flash-all.bat just automatically flashes all the images by running one command, it simplifies the process.
It just isn't ideal if you wanna keep your SD contents.
that's why you flash images separately, so you don't flash userdata.img but since you already wiped it then you're good to go.
Sent from my Nexus 7 using xda premium
WOOT!!!!!!!!!!!!!!!!!!!! Although I don't know if my backup will work, my tablet is now booted up into Android 4.1.1. Now I am going to root it, install a ROM, restore my data partition from TWRP, and (hopefully) have what I have been waiting for. A updated, functioning Nexus 7. *mashes thanks button*
Hey, should I update to 4.1.2 THEN root or root on 4.1.1 THEN flash the ROM?
cburk01 said:
WOOT!!!!!!!!!!!!!!!!!!!! Although I don't know if my backup will work, my tablet is now booted up into Android 4.1.1. Now I am going to root it, install a ROM, restore my data partition from TWRP, and (hopefully) have what I have been waiting for. A updated, functioning Nexus 7. *mashes thanks button*
Click to expand...
Click to collapse
Your backup is most likely gone, its stored on the SD card and that is wiped. Unless you have it on your computer, then you are all good.
Glad its back to life and now you know how to fix it if anything goes wrong.
What you learned today is very valuable to know.
It's nearly impossible to kill a nexus device (from a software perspective)
Sent from my Nexus 7 using xda premium
---------- Post added at 12:19 AM ---------- Previous post was at 12:18 AM ----------
cburk01 said:
Hey, should I update to 4.1.2 THEN root or root on 4.1.1 THEN flash the ROM?
Click to expand...
Click to collapse
Update first
Sent from my Nexus 7 using xda premium
Yes, I have my backup on my Macbook (running Windows 7). Thanks for all the useful advice. lol about the Nexus devices are hard to kill thing, I imagined a cockroach. And about the valuable lesson thing, I learned fastboot commands and adb stuff all when I was messing with (then soon after fixing) my HTC EVO 3D. Oh, I love XDA. Thanks again.
-cburk

[Q] CWM update brain fart - need help

Hi All,
I wanted to update my ideos s7-104 (best buy US) to the Joenilan froyo fusion rom and made one mistake along the way. I copied the .zip file to the external sd card not the internal sd card. So zip file is not available to CWM (2.5.1.8). I tried manually pushing the file to the tablet with ADB (from computer) but the tablet is not visible to the system (windows 7 64bit with drivers installed, I could not get HiSuite to install with upgrade.cmd). This is strange becasue the Upgrade utility which uses adb flashes the rom just fine. Of course I wiped the system and reformatted the device per the instructions. Now when the unit boots it goes the fastboot and then stops with option to reboot with back/home which works. I don't think the unit is bricked just yet since I can still get into the CWM recovery.
Does anyone have any bright ideas to move the Ideos S7 Froyo v1.3-EXT4 Stable.zip to the internal sdcard?
Thanks for all the useful information previously posted!
Bruce
St. Louis MO
Hi, let see if i can help you, if you have a backup restore, if you dont that implies some work, i dont use windows i prefer linux, you can try to create a virtual machine, with windows xp or linux ubuntu and then with fastboot commands push the file to sd card.
Another way, get the oficial rom for your tablet copy the file to ext-sdcard and follow the install instrutions of the rom, you must create the dload directory in ext-sdcard.
it look like you lost the system files and the kernel of the device, so it boot in to fastboot, fastboot does not acept adb, but fastboot has some commands to copy kernel and system file to the device, it cant copy a zip file, must be a img file.
Version 6.0.1 of cwm reads update files from ext-sdcard so you can also try to install that recovery version with fastboot.
Remember: it always a good idea to have a backup before doing anything.
Hope that helps.
Fixed
hal_2000 said:
Hi, let see if i can help you, if you have a backup restore, if you dont that implies some work, i dont use windows i prefer linux, you can try to create a virtual machine, with windows xp or linux ubuntu and then with fastboot commands push the file to sd card.
Another way, get the oficial rom for your tablet copy the file to ext-sdcard and follow the install instrutions of the rom, you must create the dload directory in ext-sdcard.
it look like you lost the system files and the kernel of the device, so it boot in to fastboot, fastboot does not acept adb, but fastboot has some commands to copy kernel and system file to the device, it cant copy a zip file, must be a img file.
Version 6.0.1 of cwm reads update files from ext-sdcard so you can also try to install that recovery version with fastboot.
Remember: it always a good idea to have a backup before doing anything.
Hope that helps.
Click to expand...
Click to collapse
Thanks so much for the tips. I was able to flash the trzmod-v3 image and now I have a working tablet again. Pretty slick I must say.
Hi, well done, i'm working with cm9 for s7 maybe in some few days you can try cm9
hal_2000
does anyone know the combination to get into recovery and cwm.
thank's
sorry my bad english
BANOUNDROID said:
does anyone know the combination to get into recovery and cwm.
thank's
sorry my bad english
Click to expand...
Click to collapse
Hi, with s7 power off press, menu + call(green key) + power, wait a few seconds and you get cwm screen if it is install
Hal_2000

how to build a flashable deployment file

HI,
I have looked at various tutorials and can't seem to find one specific to what i am looking for. Apologies if it's out there and i just haven't found it.
I have a bunch (like 250) of brand new Samsung Note 3's (Canadian N900W8 build) that have stock 4.4.2. I am required to get them all configured with a specific set of apps installed and various shortcuts on the home screen along with some custom settings (APN, data limits etc). so far i have been doing this manually and it is very time consuming and tedious. If there a way to take a phone i have already configured and make a file that i can flash in odin to each of the new phones that will mirror all of the changes i need to the new phones? Or some other tool to automate the process of deploying that many devices. If anyone can point me to a tool or tutorial i would be eternally grateful and may manage to retain my sanity.
I haven't seen anything like this yet in my browsing, most of the tutorials i have seen are for compiling/building a full rom.
Thanks
bugleboy said:
HI,
I have looked at various tutorials and can't seem to find one specific to what i am looking for. Apologies if it's out there and i just haven't found it.
I have a bunch (like 250) of brand new Samsung Note 3's (Canadian N900W8 build) that have stock 4.4.2. I am required to get them all configured with a specific set of apps installed and various shortcuts on the home screen along with some custom settings (APN, data limits etc). so far i have been doing this manually and it is very time consuming and tedious. If there a way to take a phone i have already configured and make a file that i can flash in odin to each of the new phones that will mirror all of the changes i need to the new phones? Or some other tool to automate the process of deploying that many devices. If anyone can point me to a tool or tutorial i would be eternally grateful and may manage to retain my sanity.
I haven't seen anything like this yet in my browsing, most of the tutorials i have seen are for compiling/building a full rom.
Thanks
Click to expand...
Click to collapse
This might not work for reasons I don't know about, but why not make a nandroid backup of the completed ROM and Apps etc, and copy it to multiple extSDCards then run a Restore on each phone? Although I guess you'd need to flash a custom recovery first... hm...
Maybe someone who knows ADB ins and outs could suggest something - connect phone, push SW out etc.
So i found a tutorial that described how to dump an img file for various partitions using ADB commands. I used the following to dump the system partition
Code:
dd if=/dev/block/mmcblk0p23 of=/mnt/extSdCard/backup/system.img bs=4096
I then coppied the system.img to computer and used a tool i found on here to convert it to system.tar.md5. I put a new phone into download mode and open odin load the system.tar.md5 into the PDA section it verifies the file ok, but when i try to flash it it fails instantly and a message appears on the phone saying "Unsupport dev_type"
I have seen a couple different versions of this tutorial out there, and i even tried booting to a ubuntu live CD to try to use the linux commands i saw on a different tutorial to convert the .img to a .tar.md5 but the result is the same.
Does anyone have any experience getting this method to work? any suggestions?
Thanks
bugleboy said:
So i found a tutorial that described how to dump an img file for various partitions using ADB commands. I used the following to dump the system partition
Code:
dd if=/dev/block/mmcblk0p23 of=/mnt/extSdCard/backup/system.img bs=4096
I then coppied the system.img to computer and used a tool i found on here to convert it to system.tar.md5. I put a new phone into download mode and open odin load the system.tar.md5 into the PDA section it verifies the file ok, but when i try to flash it it fails instantly and a message appears on the phone saying "Unsupport dev_type"
I have seen a couple different versions of this tutorial out there, and i even tried booting to a ubuntu live CD to try to use the linux commands i saw on a different tutorial to convert the .img to a .tar.md5 but the result is the same.
Does anyone have any experience getting this method to work? any suggestions?
Thanks
Click to expand...
Click to collapse
Maybe check adb setting in Developer menu? There's an ADB over network setting in there. Not sure if it will help, after looking at it it says it is reset on boot...
I ended up using a nandroid backup as suggested earlier. However i initially had issues doing that i think because i was using TWRP recovery and it requires the backups to be in a folder named uniquely per device id or something which requires you to make a backup on that device before you can copy the backup files . TWRP also write protected the backup folders requiring root to be able to copy a backup onto it.
I changed to CWM and it works much better, all i have to do is flash CWM recovery to a new device and then boot it to copy the backup files and then reboot to recovery and restore the backup.
bugleboy said:
I ended up using a nandroid backup as suggested earlier. However i initially had issues doing that i think because i was using TWRP recovery and it requires the backups to be in a folder named uniquely per device id or something which requires you to make a backup on that device before you can copy the backup files . TWRP also write protected the backup folders requiring root to be able to copy a backup onto it.
I changed to CWM and it works much better, all i have to do is flash CWM recovery to a new device and then boot it to copy the backup files and then reboot to recovery and restore the backup.
Click to expand...
Click to collapse
Make sure all the devices have the same bootloader and modem. What Firmware version are you using as a base?
Sent from my SM-N9005 using Tapatalk
celderic said:
Make sure all the devices have the same bootloader and modem. What Firmware version are you using as a base?
Sent from my SM-N9005 using Tapatalk
Click to expand...
Click to collapse
They're all using the same 4.4.2 base image, the only change i made was flashing a custom recovery to be able to create the initial backup of the configured phone and to restore the backup to the stock phones saving me having to maunally configure each device.

[Guide] [Unbrick] How to revive a hard bricked Moto G5

This guide is for hard bricked Moto G5 Cedric
Hard bricked means a device which can not enter bootloader mode normally
This method has now been confirmed working
Works with XT1672 XT1670 XT1671 XT1675 XT1676 XT1677 (and most likely all others and if you ask if it will work on your version I will just copy & paste this to you!)
Smaller Image
Thanks to Luka Panio, Omega, and nift4 we now have a smaller image size
Goto This github page and under assets download mmcblk0.img.gz
Extract mmcblk0.img from the zip file to PC
Previous Larger Images
Mega
Download mmcblk0.zip image from Mega
Create your own mega account and import the file into your mega account. Log into your account and download it from your own account
Extract mmcblk0.img from mmcblk0.zip to PC
Or for those of you who can't use mega or have unstable Internet I've split the large file size into smaller multiple zip files. You must download each part and then extract using an unzip tool like winrar or 7zip
Android File Host
Download mmcblk0.zip mmcblk0-part1.zip and mmcblk0-part2.zip from Android File Host
Extract mmcblk0.z01 from mmcblk0-part1.zip
Extract mmcblk0.z02 from mmcblk0-part2.zip
Extract mmcblk0.img from mmcblk0.zip (If prompted point to mmcblk0.z01 and mmcblk0.z02 but it shouldn't ask if all files are in the same folder)
Requirements
Freshly formatted microSD card 16gb if using the smaller image or at least 32gb if using the previous larger images (It needs to have at least 31.3gb free after formatting - if it displays as less you will need to buy a 64gb microSD card or use the smaller image)
7zip
Linux mint live usb/dvd
USB card reader
Method
The BEST method to flash the sdcard with mmcbk0.img file is to use LINUX!
Windows users have no need to install Linux on their PC, you can run Linux from a bootable usb-stick that is at least 8gb or a dvd
Do not run Linux as a virtual machine on Windows! Use the live USB/DVD
0) Put the Moto g5 on mains charge until you have finished flashing the sdcard so it's fully charged ready for the boot test!
1) Run Linux, preferably cinnamon or mate versions of Linux Mint
2) Insert the sdcard in pc or card reader and open "Disks" app
3) In "Disks" app select sdcard and you will see the sdcard partitions
4) Press "-" to delete the partition (delete all partitions if there is more than one)
5) Press "+" to create a new one and name it mmcblk0, set FAT(FAT32) file format and press "CREATE"
6) Press "Play" button to mount the sdcard, look to see what path the sdcard has (/dev/sd??) and then close the "Disks" app
7) Go to Desktop, open "Computer" and navigate to the location where the img file is extracted (mmcblk0.img)
8) Open the window where img file is with root (right click on window and select "open as root")
9) In root window open the Terminal (right click on window and select "open terminal")
no need to type "su" in terminal, it has root already (see notes if using Linux live usb/dvd)
10) Type in terminal the command written below and don't forget to eliminate that "1" from the sdcard path,
that "1" can make the difference between the phone booting or not!!!!!
Things to note
Linux Live dvd doesn't have open as root so just open in terminal and add sudo to the start of the commands
I've included this in the commands below
If you get a status error just remove status=progress from the terminal command below
Terminal comands
- if your sdcard is seen like " /dev/sdb1"
in terminal apply this command:
Code:
sudo dd bs=4M if=mmcblk0.img of=/dev/sdb status=progress oflag=sync
-if your sdcard is seen like " /dev/mmcblk0p1"
in terminal apply this command:
Code:
sudo dd bs=4M if=mmcblk0.img of=/dev/mmcblk0 status=progress oflag=sync
and the flashing process should start
When it finishes, test the sdcard in the phone and it should boot!
If you get a size error of the sdcard in terminal you have to change the sdcard and try again!
Thanks to @vaserbanix for the original version of this guide
Re-flash Stock Firmware
Once the phone is in bootloader mode you can flash stock firmware via fastboot
Note that in order to flash gpt the firmware MUST be the same or newer than the version currently on your phone
Firmware can be download from Here
Once you have firmware that is the same or newer than your current version you can remove the sd card and run these commands (assuming you have fastboot all setup on your pc)
If you get a security downgrade error when you try to flash gpt.bin or bootloader.img then the firmware you are trying to flash is too old!
Code:
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot oem fb_mode_clear
fastboot reboot
I might consider doing this if you explained what this loader.img is?
Is it something one would flash to recover their G5?
Exanneon said:
I might consider doing this if you explained what this loader.img is?
Is it something one would flash to recover their G5?
Click to expand...
Click to collapse
Potentially - its used to boot off the sd card so those with a bricked phone can access the bootloader through booting it off their sd card & then flash the firmware via fastboot
See
https://www.aryk.tech/2017/02/how-to-unbrick-debrick-qualcomm-android.html?m=1
I hope the solution is achieved soon
Here you go:
https://cloud.wdata.de/index.php/s/JK2by8YBQCSrsof
Device Info:
Cedric XT1676 Retail
LineageOS 14.1
TWRP 3.2.1 (32bit)
staffe said:
Here you go:
https://cloud.wdata.de/index.php/s/JK2by8YBQCSrsof
Device Info:
Cedric XT1676 Retail
LineageOS 14.1
TWRP 3.2.1 (32bit)
Click to expand...
Click to collapse
Thanks for uploading it
Hello, I followed all the steps of the link, using a 16gb card and the file here hung and nothing, the phone does not start.
In my case it is an xt1676 which only turns on the led and blinks when I connect it to the pc by usb or the wall charger.
takoa said:
Hello, I followed all the steps of the link, using a 16gb card and the file here hung and nothing, the phone does not start.
In my case it is an xt1676 which only turns on the led and blinks when I connect it to the pc by usb or the wall charger.
Click to expand...
Click to collapse
I take it the programme wrote the loader image successfully to sdcard
So either the person who uploaded the Loader.img interrupted the extract & so its corrupted or this phone can't boot off the sd card with this method
It does say it may take a while to boot but who knows
If anyone else can upload a Loader.img using the methods in the first post so there's a comparison please do
Yeah right.
What is strange to me, although maybe it is, is the size of the file hung here, 165 mb.
the 16gb card is formatted in fat32, is it correct?
Does the DiskImageRev2 program automatically create the card to be bootable?
Why install the qualcomm drivers if the phone does not have to be connected to the PC? It is assumed that the phone will boot in bootloader mode and there only need the adb / fastboot controllers.
I do not mind to keep trying since the phone I give for lost at the moment.
Can someone return to the first post with an xt1676?
Thank you.
TheFixItMan said:
I'm trying to work on a solution for guys with a hard bricked moto g5 but as I no longer own this device anymore I need someone to provide the following
Requirements
Rooted moto g5
Busybox installed
Terminal emulator installed
What I need
In terminal emulator type su and grant superuser access
Then type
Code:
dd if=/dev/block/mmcblk0 of=/sdcard/Loader.img bs=1024 count=168960
Wait for the command prompt to return (it may take a few mins)
Post the Loader.img file created on the root of sdcard here
Click to expand...
Click to collapse
https://drive.google.com/file/d/1H2Qkc1XKbr7Is46n5xdCFlgiuIH1m-vE/view
Device : XT1677
takoa said:
Yeah right.
What is strange to me, although maybe it is, is the size of the file hung here, 165 mb.
the 16gb card is formatted in fat32, is it correct?
Does the DiskImageRev2 program automatically create the card to be bootable?
Why install the qualcomm drivers if the phone does not have to be connected to the PC? It is assumed that the phone will boot in bootloader mode and there only need the adb / fastboot controllers.
I do not mind to keep trying since the phone I give for lost at the moment.
Can someone return to the first post with an xt1676?
Thank you.
Click to expand...
Click to collapse
I presume it's needed for some devices who use different methods of flashing stock firmware
Someone else has uploaded an image file so you can try that one from a xt1677
Yes formatted fat32 - you should just have to select the drive the sdcard card is assigned to on your pc in the program eg f: and then select image file & then write - and accept the warning
It should make it bootable
Iv no idea if this method will work with this device
then it does not work in this model or the file posted here is wrong. Because I have done it as here is exposed and nothing.
I'm going to try the one from xt1677
TheFixItMan said:
So either the person who uploaded the Loader.img interrupted the extract & so its corrupted or this phone can't boot off the sd card with this method
It does say it may take a while to boot but who knows
Click to expand...
Click to collapse
Hmm, there haven't been any error messages on my side. I pulled the image again with above dd-command. I also tried with adb shell instead of terminal emulator but it's always the same file with the exact same file size.
staffe said:
Hmm, there haven't been any error messages on my side. I pulled the image again with above dd-command. I also tried with adb shell instead of terminal emulator but it's always the same file with the exact same file size.
Click to expand...
Click to collapse
I assume the file is correct - it's probably more the case of this phone doesn't support this method
If I get my hands on this device again in the future I can properly test things but at the moment all I can do is throw out ideas for people to try
Think I'll leave it now as without the device there's not a lot I can do
nothing, it does not work. it does not start :crying:
As I said, only the LED flashes when connected by USB or charger.
I recommend using rufus for flashing it to the sd card, it has never failed me yet, and supports up to 16gb.
Edit: I have the XT1675, if anyone would find it useful for me to post this variant's bootloader then I'd be happy to do so.
Edit again: Isn't dd used for writing an image to flash storage for later booting rather than extracting it?
takoa said:
nothing, it does not work. it does not start :crying:
As I said, only the LED flashes when connected by USB or charger.
Click to expand...
Click to collapse
It seems, some qualcomm devices need a full mmcblk0 dump to be able to boot from sdcard (e.g. LG G5)¹. I don't know if thats the case for our device but you can give it a try:
Loader_XT1676.zip Uncompressed filesize: ~4GB
¹ "The Loader method requires a full ROM Dump also known as a full blk0 backup of a working LG G5 H850 correctly flashed or written on a pretty good and fast class 10 SD Card."
Source: https://www.aryk.tech/2018/03/lg-g5-h850-unbrick-solutions.html
Exanneon said:
Edit again: Isn't dd used for writing an image to flash storage for later booting rather than extracting it?
Click to expand...
Click to collapse
dd basically clones/copies the source-data block by block to another disk, partition or (img-)file.
staffe said:
It seems, some qualcomm devices need a full mmcblk0 dump to be able to boot from sdcard (e.g. LG G5)¹. I don't know if thats the case for our device but you can give it a try:
Loader_XT1676.zip Uncompressed filesize: ~4GB
¹ "The Loader method requires a full ROM Dump also known as a full blk0 backup of a working LG G5 H850 correctly flashed or written on a pretty good and fast class 10 SD Card."
Source: https://www.aryk.tech/2018/03/lg-g5-h850-unbrick-solutions.html
dd basically clones/copies the source-data block by block to another disk, partition or (img-)file.
Click to expand...
Click to collapse
Thanks for the info - if someone can try this full Loader.img & let me know if it works I'll write up a guide
Iv added the guide to the first post if people want to test
Like Iv said before I no longer own this device - I have not tested this & it may not work
Feel free to add potential solutions to help those with bricked devices

Categories

Resources