[Solved] Can't Flash Fresh ROM using Fastboot Or Recovery - Xiaomi Redmi 1S

SOLVED
Well, I guess I made a goof up.
I was using parted to modify the system partition and the userdata partition. I did so and reverted back to the way they were originally
i.e 838 MB for system 403 MB for cache and the rest for the userdata.
I had made a TWRP backup of my system, data and cache, which I restored once I was done playing around with parted.
Now the problem is that I cannot install any new ROM using Fastboot or Recovery.
While using Fastboot and MI Flash Tool
I get an error when it tries to flash the system partition saying "Unspecified Error(0x80004005: Failed (remote: size too large)"
When I use Minimal ADB and Fastboot to flash system partition it shows success, but upon reboot its stuck in bootloop
When using Recovery to flash any rom zip files it gives me reads "patching system images unconditionally" and stays put. There is no increment on the progress bar or anything. I kept it that way for 2 hours and still not change.
When i chose to flash images instead of zips. There is no option to select the system partition via recovery.
Also everytime I reboot from fastboot to recovery there is an error stating "cannot mount /system"
to resolve this i Wipe the system partition and then its able to mount.
Also I am able to restore the Backup I made using TWRP after wiping cache, system, data partitions.
This is the output for the Print command in the parted utility
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I have no clue on exactly what the problem could be.
Any guidance/solution/discussion welcome.
UPDATE:-
I made a little mess in recreating partitions, the system partition was 1 mb less than what it actually was
recreated it using the actual bytes [not rounded off] from the partition table in the fastboot rom

I was thinking of extending the system partition to make room for larger GAPPS, but i decided not to....

Related

[Q] can't mount system.img

i'm trying to mount system.img to extract the files, but i get errors every time.
i think i don't use the right command, can anyone tell me what is the command for mounting the system.img?
can someone please help me?
should be mount -o rw,remount /dev/block/mmcblk0p1 /system
sinkster said:
should be mount -o rw,remount /dev/block/mmcblk0p1 /system
Click to expand...
Click to collapse
no i get this error:
Code:
can't find system.img in /etc/fstab or /etc/mtab
OverLo4d said:
no i get this error:
Code:
can't find system.img in /etc/fstab or /etc/mtab
Click to expand...
Click to collapse
Which command you are using?
ameer1234567890 said:
Which command you are using?
Click to expand...
Click to collapse
this time i tried the command he suggested, but i tried also this:
Code:
mount -o loop system.img system
or this:
Code:
mount -t ext4 -o loop system.img system
and nothing works
OverLo4d said:
this time i tried the command he suggested, but i tried also this:
Code:
mount -o loop system.img system
or this:
Code:
mount -t ext4 -o loop system.img system
and nothing works
Click to expand...
Click to collapse
I am guessing that you are trying to mount yaffs2 image from nandroid backup! Android does not support mounting yaffs2 images. Perhaps it's a kernel thingy, but I haven't come across any kernel which can do it. Perhaps someone could make a module or something?
In case if you are trying to mount an ext4 image, first create a folder in your sdcard named "system". Then:
Code:
mount -o loop system.img /sdcard/system
ameer1234567890 said:
I am guessing that you are trying to mount yaffs2 image from nandroid backup! Android does not support mounting yaffs2 images. Perhaps it's a kernel thingy, but I haven't come across any kernel which can do it. Perhaps someone could make a module or something?
Click to expand...
Click to collapse
no, it's a system.img converted from system.sin
is there any other way to way or command to extract the files?
OverLo4d said:
no, it's a system.img converted from system.sin
is there any other way to way or command to extract the files?
Click to expand...
Click to collapse
system.img converted from system.sin is the same as system.img from a nandroid backup.
Since you want to extract the img file, you could use this: http://forum.xda-developers.com/showthread.php?t=1645412 or http://forum.xda-developers.com/showthread.php?t=1112906
ameer1234567890 said:
system.img converted from system.sin is the same as system.img from a nandroid backup.
Since you want to extract the img file, you could use this: http://forum.xda-developers.com/showthread.php?t=1645412 or http://forum.xda-developers.com/showthread.php?t=1112906
Click to expand...
Click to collapse
doesn't work, i already tried any kind of unyaffs2
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
OverLo4d said:
doesn't work, i already tried any kind of unyaffs2
Click to expand...
Click to collapse
The sin2img tool you are using may not be compatible with all sin files. Try converting sin to img from flashtool.
ameer1234567890 said:
The sin2img tool you are using may not be compatible with all sin files. Try converting sin to img from flashtool.
Click to expand...
Click to collapse
i'm using bin4ry's sin2img, and it's the only that worked.
I extract the yaffs2 fs with flashtool and got system.yaffs2, but unyaffs2 does not work on it... any idea? (pagesize or something else?)
ldrolez said:
I extract the yaffs2 fs with flashtool and got system.yaffs2, but unyaffs2 does not work on it... any idea? (pagesize or something else?)
Click to expand...
Click to collapse
I already solved the problem and made a tutorial. Look for it in the general section
Sent from my LT18i using xda premium
OverLo4d said:
I already solved the problem and made a tutorial. Look for it in the general section
Click to expand...
Click to collapse
Thanks! To sum up, unyaffs2 does not work, and yaffey does.

Full HTC Desire HD (sense 3.0/android 2.3.5) guide to root, S-OFF/Sim Unlock

I have moved this post to the Desire HD Android Development section (http://forum.xda-developers.com/showthread.php?t=2221039) if a mod wants to delete this thread, that would be great.
I probably won't ever update this.
THIS GUIDE IS MAINLY this guide (http://tau.shadowchild.nl/attn1/?cat=6) SIMPLIFIED TO SOME EXTENT. with parts that werent included in the guide added to the guide and resources added to the ace-tools folder that would have to be downloaded separately.
PREFACE:
Download this and unzip it somewhere (reccommend C:\ root folder): http://www.multiupload.nl/MXW371YT87
Full HTC Desire HD guide to root, S-OFF/Sim Unlock
1. Unlock the bootloader at http://htcdev.com/bootloader/
2. Copy your Unlock_code.bin file that you got in the email to the ace-tools folder.
3. Download rooted stock rom: http://www.multiupload.nl/20T9R21IGY
(link to rom thread: http://forum.xda-developers.com/showthread.php?t=1382235&highlight=rooted+stock )
copy the ROM zip file to your SD card.
4. Install recovery image:
Open cmd and type:
• cd <the directory of the ace-tools folder> (eg cd C:\ace-tools)
Ensure your phone is connected to your PC and then boot into bootloader, then navigate to fastboot.
In cmd:
• fastboot recovery1.img
5. boot into recovery through bootloader and Install the ROM you placed on the SD card, (via install zip fileselect the rom zip)
6. Reboot the phone, ensure the rom is working fine and you have root access you can test this by turning on usb debugging then:
• Adb shell
• Su
You should see the $ turn into a #. If this happens, congrats you have root access.
Then type this:
• Exit
Then again:
• Exit
Then:
• Adb push boot.img /data/local/tmp
• adb shell dd if=/dev/block/mmcblk0p22 of=/data/local/tmp/boot.img
• adb pull /data/local/tmp/boot.img
• adb push goldcard /data/local/tmp
• adb shell chmod 775 /data/local/tmp/goldcard
• adb shell cat /sys/class/mmc_host/mmc2/mmc2:*/cid
take note of the string of numbers and letters that appear.
then:
• adb shell /data/local/tmp/goldcard -c <string of numbers and letters should go here> -o /data/local /tmp/goldcard.img
• adb shell dd if=/data/local/tmp/goldcard.img of=/dev/block/mmcblk1
• adb push misc_version /data/local/tmp
• adb shell chmod 775 /data/local/tmp/misc_version
• adb shell /data/local/tmp/misc_version -s 1.11.111.1
7. If this is all fine boot into bootloader again.
From bootloader go to fastboot.
Go back to the cmd window on your PC from earlier, type in:
• Fastboot oem lock
Then type:
• fastboot oem rebootRUU
• fastboot flash zip firmware.zip
• fastboot reboot-bootloader
unlock the bootloader again using the Unlock_code.bin you got from HTC:
• fastboot flash unlocktoken Unlock_code.bin
then flash boot.img in ace-tools folder:
• fastboot flash boot boot.img
next:
• fastboot flash recovery recovery.img
8. boot to recovery again then:
• adb push gfree /tmp/
• adb shell chmod 775 /tmp/gfree
• adb shell /tmp/gfree -f
reboot to bootloader and you should see it says S-OFF at the top of the screen, if It does congrats your done.
VICTORY:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
help me out if you feel like it by signing up to dropbox with my refferal link:
Always have your stuff when you need it with @Dropbox. Sign up for free! http://db.tt/G8qfL77X

"Couldn't mount SD card" rooting Nexus 7 (2013)

Hi,
I have been trying to root a Nexus 7, and I always end up having the problem that the recovery cannot mount the sdcard. I have wiped the entire device several times and tried installing different google stock images: marshmallow (6.0.1 MMB29O and MMB29Q) and lollipop (5.1.1 LMY48T). I tried installing Cyanogenmod, but couldn't install it without access to the sdcard from the recovery. I also tried different recovery methods.
This is the bootloader loading screen
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The stock recovery function failing to mount:
Team Win Recovery:
And ClockworkMod Recovery:
I also tried other versions of those recovery tools, but with the same result. I have no problem accessing the SD card from the Android OS, and accessing the device in USB mode was not a problem either.
It would be great if someone knew what the problem is. I have been searching, but couldn't find anything that helped.
Thanks for the help.
Aitor86 said:
I have no problem accessing the SD card from the Android OS
Click to expand...
Click to collapse
Android works fine but recovery does not? Unusual.
Please boot TWRP, run the following and post the log file:
Code:
adb shell blkid > data.txt
adb shell cat proc/partitions >> data.txt
adb shell head /sys/block/mmcblk0/device/* >> data.txt
adb shell dmesg >> data.txt
adb shell cat /tmp/recovery.log >> data.txt
k23m said:
Android works fine but recovery does not? Unusual.
Please boot TWRP, run the following and post the log file:
Code:
adb shell blkid > data.txt
adb shell cat proc/partitions >> data.txt
adb shell head /sys/block/mmcblk0/device/* >> data.txt
adb shell dmesg >> data.txt
adb shell cat /tmp/recovery.log >> data.txt
Click to expand...
Click to collapse
Hi, thanks for the help. This is the output of that code:
pastebin.com/fP5q3DPE
Aitor86 said:
Hi, thanks for the help. This is the output of that code: pastebin.com/fP5q3DPE
Click to expand...
Click to collapse
Hi mate, you wrote "I have no problem accessing the SD card from the Android OS" but the reality is "a few weeks ago I had no problem" - correct?
Your log:
Code:
mmc0: unrecognised EXT_CSD revision 7
mmc0: error -22 whilst initialising MMC card
Try the latest TWRP first, OK?
k23m said:
Hi mate, you wrote "I have no problem accessing the SD card from the Android OS" but the reality is "a few weeks ago I had no problem" - correct?
Your log:
Code:
mmc0: unrecognised EXT_CSD revision 7
mmc0: error -22 whilst initialising MMC card
Try the latest TWRP first, OK?
Click to expand...
Click to collapse
I have no idea what the problem was, but using the latest TWRP (3.0) did the trick. The sdcard is visible, and I can access any file I want from there.
Just to answer your question, the SD card was still accessible from the Android OS, so summing up, the only recovery tool that worked was the latest version of TWRP.
Thanks for the help!!!! I thought I was using the appropriate version, and I had spent more time than I would admit trying to get this working.
Hi
Sent from my iPhone using Tapatalk

Unable to wipe dalvik/cache in Twrp

See attached pic. I thought installing supersu 2.72 would solve this encryption issue? Or maybe I'm just confused (most likely scenario). Any help would be appreciated. Thanks [emoji1]
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I'm not 100% positive but I think because dalvik/cash can not be cleared because it is part of data partition and it is encrypted as we all know.
Sent from my Nexus 5 using XDA-Developers mobile app
In TWRP, click WIPE, click WIPE ENCRYPTION, swipe to format data. Only way its going to work. data is encrypted. Sorry ya going to have to start from scratch again.
schmeggy929 said:
In TWRP, click WIPE, click WIPE ENCRYPTION, swipe to format data. Only way its going to work. data is encrypted. Sorry ya going to have to start from scratch again.
Click to expand...
Click to collapse
Beware this will wipe the entire data partition and all data.
You cannot wipe Dalvik from outside the OS. I believe apps like 3ctoolbox will allow you to wipe Dalvik from within the OS (still need a reboot).
Sent from my HTC 10 using Tapatalk
datafoo said:
Beware this will wipe the entire data partition and all data.
You cannot wipe Dalvik from outside the OS. I believe apps like 3ctoolbox will allow you to wipe Dalvik from within the OS (still need a reboot).
Sent from my HTC 10 using Tapatalk
Click to expand...
Click to collapse
Thanks for the reply fellas. I don't mind starting from scratch but I'd be safe with wiping data? Don't want to redo everything to find my radio is broken.
Genetic517 said:
Thanks for the reply fellas. I don't mind starting from scratch but I'd be safe with wiping data? Don't want to redo everything to find my radio is broken.
Click to expand...
Click to collapse
As long as you re-encrypt your data partition either with su 2.72 forceencrypt or using stock boot+system images, you'll be fine.
I was able to wipe cache without messing up anything else by flashing stock recovery back, wiping cache and then flashing TWRP again (all before rebooting the phone).
You can use command wipe data & cache
Code:
fastboot -w
C:\Program Files (x86)\Android\android-sdk\platform-tools\fastboot.exe
Code:
C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot -h
usage: fastboot [ <option> ] <command>
...
...
options:
-w Erase userdata and cache (and format if supported by partition type).
...
...
reboot into bootloader mode
E.g
Code:
D:\adb_1.0.35>fastboot -w
Creating filesystem with parameters:
Size: 26004684800
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 6348800
Block groups: 194
Reserved block group size: 1024
Created filesystem with 11/1589248 inodes and 143784/6348800 blocks
target reported max download size of 536870912 bytes
Creating filesystem with parameters:
Size: 234881024
Block size: 4096
Blocks per group: 32768
Inodes per group: 7168
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 57344
Block groups: 2
Reserved block group size: 15
Created filesystem with 11/14336 inodes and 1961/57344 blocks
erasing 'userdata'...
OKAY [ 1.510s]
sending 'userdata' (138917 KB)...
OKAY [ 3.088s]
writing 'userdata'...
OKAY [ 1.354s]
erasing 'cache'...
OKAY [ 1.747s]
sending 'cache' (5992 KB)...
OKAY [ 0.201s]
writing 'cache'...
OKAY [ 0.153s]
finished. total time: 8.052

twrp error - unable to mount system_root (invalid argument)

Hi guys. i was an lineage but decided to go back to stock rom. Now twrp can't install the rom-zip.
Message: "unable to update logical partition: /system_root" (same meassage with /vendor and /product)
It seems that the system partition is missing 'cause twrp can't wipe it.
Anyone a idea how to fix?
Install fastboot rom with miflash
Wow, thanks. Went super easy.
I'm stucked as well. From MIUI12 Android 10 I flashed
[ArrowOS] [R] Xiaomi Mi 10t Lite [gauguin] [NIGHTLIES] [UNIFIED]
to be on Android R and to flash
[ROM][11.0][gauguin] Havoc-OS 4.4 [OFFICIAL] [21-04-2021].
So I could install ArrowOS but since now I cant flash Havoc / Magisk / Gapps via TWRP or OrangeFox.
It always says
Failed to mount '/system_root' (No such file or directory)
Failed to mount '/vendor' (Invalid argument)
Failed to mount '/product' (No such file or directory)
I'm sitting and searching for a solution since 5 hours..wtf...i was close to throw the phone against the wall..
geoanto555 said:
Install fastboot rom with miflash
Click to expand...
Click to collapse
I tried to flash "Xiaomi Mi 10T Lite Latest Europe Stable Version Fastboot". During the flash this error message popped up
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Strangely it somehow worked because I'm having MIUI12 with Android 11 on the device... so after 5 hours back and forward, I'm at the situation as before, what a waste of time. If someone can help me, I'm willing to do another try.
It finally worked. Here were my steps of going crazy, but finally reached the goal:
Unlocking Bootloader
Downloading the roms above + Orange Recovery + Magisk + GApps
Switch off device, reboot into fastboot mode and connect it to the PC
Flash recovery and restart into recovery directly
Wipe Cache, Dalvik, Data
Format Data
Flash ArrowOS
Wipe Cache, Dalvik, Data
Format Data
Restart
Activate USB Debubbing
Restart into recovery
Try to flash Havoc
Get several error messages and watch for the next 5h indian youtube videos about fixing
Download "Xiaomi Mi 10T Lite Latest Europe Stable Version Fastboot" from c.mi.com and flash it via miflash tool
Put the Havoc rom on the external storage
Switch off device, reboot into fastboot mode and connect it to the PC
Flash recovery and restart into recovery directly
Wipe Cache, Dalvik, Data
Format Data
Flash Havoc
Wipe Cache
Restart
br4t0 said:
I'm stucked as well. From MIUI12 Android 10 I flashed
[ArrowOS] [R] Xiaomi Mi 10t Lite [gauguin] [NIGHTLIES] [UNIFIED]
to be on Android R and to flash
[ROM][11.0][gauguin] Havoc-OS 4.4 [OFFICIAL] [21-04-2021].
So I could install ArrowOS but since now I cant flash Havoc / Magisk / Gapps via TWRP or OrangeFox.
It always says
Failed to mount '/system_root' (No such file or directory)
Failed to mount '/vendor' (Invalid argument)
Failed to mount '/product' (No such file or directory)
I'm sitting and searching for a solution since 5 hours..wtf...i was close to throw the phone against the wall..
Click to expand...
Click to collapse
did you find something ?

Categories

Resources