[fix] fix for sleep of death bug for redmi 3s/x/prime - Xiaomi Redmi 3s Guides, News, & Discussion

I've been dealing with this bug for months now, and i tried every fix possible
i've narrowed it down to the /persist partition
it seems that it gets somehow coruppted, dunno how
If u're dealing with SOD it can be fixed with a simple command line from TWRP
Code:
adb shell make_ext4fs /dev/block/bootdevice/by-name/persist
here's the output of that command
make_ext4fs /dev/block/bootdevice/by-name/persist
Creating filesystem with parameters:
Size: 33554432
Block size: 4096
Blocks per group: 32768
Inodes per group: 2048
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 8192
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/2048 inodes and 1166/8192 blocks
Click to expand...
Click to collapse
After flash persist partition using fastboot or either using FlashFire app(which i recommend cut fastboot didnt work for me9
Cheers

shows need size for file system!!!!!

fabianhaines said:
shows need size for file system!!!!!
Click to expand...
Click to collapse
did u use exact command and ran it from TWRP?
Root is needed btw

Wait what, isnt this partition actually needed by the system ? I don't think formatting it like this helps.
Usually /data gets corrupted - run "e2fsck -f" on it and you will see corrupted blocks.

Sounds funny, but whenever I had this, I'd just press and hold my power button for as long until the phone boots up. (Takes a minute or a bit more)

ive noticed that it happens frequently when using an app that uses GPS for a long time

i found bug in bluetooth n wifi can't turn on with this code
I was success to fix SOD in my redmi 3s with that code, but now i found other bug in wifi n bluetooth can't be turn on,
If i flash original persis.img, i can use wifi n bluetooth normally, but SOD back again...
Can u help me to solved this problem? Thanks..

Arfiela said:
I was success to fix SOD in my redmi 3s with that code, but now i found other bug in wifi n bluetooth can't be turn on,
If i flash original persis.img, i can use wifi n bluetooth normally, but SOD back again...
Can u help me to solved this problem? Thanks..
Click to expand...
Click to collapse
Hi can you tell me how you flashed the presist? After trying I am facing the same problem. Cant fix it

Arfiela said:
I was success to fix SOD in my redmi 3s with that code, but now i found other bug in wifi n bluetooth can't be turn on,
If i flash original persis.img, i can use wifi n bluetooth normally, but SOD back again...
Can u help me to solved this problem? Thanks..
Click to expand...
Click to collapse
Are you fix it already?

So this method just reformat persist partition, just like twrp do right?

Related

[Q] [SOLVED] Help, e2fsck damages filesystem, /data mounts in RO mode (can't boot)

Hello. At first I want to ask if any of you working on Gingerbread experienced "Force Close" loop on restart for many applications (for repair required format /data backup or restore via CWM)?
I spent a lot of time to get to the source of the problem, because even though the system version of JB's okay, it's GB is more stable and does not eat much RAM, moreover is much better for multitasking in the current situation.
Get to the point. The problem appears to be that from time to time, as in any filesystem, in the user partition (/ data) errors may occur that normally are repaired at boot time by e2fsck program. Moreover, in the case of my own and yet another piece of Samsung I8160 e2fsck is unable to complete repairs due to an error related to the library supports file systems.
When I connect ADB in recovery mode, umount /data and issue the command "e2fsck -y -f /dev/block/mmcblk0p5" the mass of errors are discovered, and repairing starts, but of course does not end well:
Code:
"FILESYSTEM WAS MODIFIED,
invalid argument passed to ext2 library while rewriting block and inode bitmaps "
...which tells that filesystem was modified, but the wrong argument was passed to the filesystem library and the correct structure not been written completely, resulting in an even greater massacre on the partition. It is not difficult to guess that the system will not boot normally (/data mounted in read only mode), and applications will start the "Force close" loop .
The story is not only on my phone, but also in other arts. After formatting it for a few weeks until you see the error and restart. After restoring a backup via CWM has usually only until the next reboot.
Has anyone experienced this? Is anyone able to solve this problem?
I tried stock ROM and kernel, reflashing, substitution of e2fsck binaries and libext2fs libraries. Chip does not have bad blocks, checked by dd command and calculated CRCs.
Please don't reply "do full wipe," not considering myself an Android noob, I want to solve the problem.
Have you ever tried to do filesystem check on Gingerbread and did it work for you? "e2fsck -y -f /dev/block/mmcblk0p5" ?
Can you restart the phone without problem?
Can you try if it works now?
Part of the log with dmesg at boot:
Code:
<4> [10.306152] EXT4-fs warning (device mmcblk0p5): ext4_clear_journal_err: Filesystem error recorded from previous mount: IO failure
<4> [10.306213] EXT4-fs warning (device mmcblk0p5): ext4_clear_journal_err: Marking fs in need of filesystem check.
<4> [10.331756] EXT4-fs (mmcblk0p5): warning: mounting fs with errors, running e2fsck is recommended
============SOLUTION==============
No one in this and general android forum was able to help me. So I had to find solution on my own.
It seems, that CWM 5 (on my 2.3.6 XXLL2 Samsung I8160 kernel) formatting procedure has bugs, and after some restarts, e2fsck tries to repair filesystem, but it can't because of non standard(?) structure on partition.
How to solve this:
Get your own mke2fs binary and boot into CWM, connect ADB and format /data using mke2fs. This works fine with e2fsck. No more this problem, just don't use CWM to format/restore /data, just backup/restore it via dd.
If you want to go back to old good&stable GB on I8160 and need help, write me a PM, I'll send you gtalk/jabber.==
The best way to solve this problem, is to flash a new firmware / ROM and start fresh.
If you need a guide or help, feel free to ask me via PM or leaving a reply below.
Be sure to click dat THANKS button if I helped!
Ronny927 said:
The best way to solve this problem, is to flash a new firmware / ROM and start fresh.
If you need a guide or help, feel free to ask me via PM or leaving a reply below.
Be sure to click dat THANKS button if I helped!
Click to expand...
Click to collapse
If it was so simple, I wouldn't ask it on the main forum.
e2fsck is not able to properly end repairing process because of mentioned error:
Code:
invalid argument passed to ext2 library while rewriting block and inode bitmaps
Reflashing, factory reset DOES NOT help in this situation, because after some time every filesystem has some errors that need to be repaired and this does not work as it should.
I get it now.
Anyone else has any idea how to solve this?
bump

[Q] Unable to mount /data

Hey guys,
unfortunately i think i bricked my prime
Today i flashed crombi-kk rom which worked flawlessly fine. I came from HairyBean 2.31 so all i did was to up update my TWRP via fastboot and then flash the rom. As said, that worked fine. After my first boot of the rom i thought that i would like to test the "F2FS" option. For this i updated TWRP to v2.8 via the zip-file from this thread: http://forum.xda-developers.com/showthread.php?t=2772093 . This also worked and i've got my TWRP to the new version.
Now i wanted to format the /data partition to F2FS so i went to
Wipe>>Advanced Wipe>>Choose Data>>Repair or Change File System>>Change File System>>F2FS
At this time it told me that it can't UNmount the partition and therefore it couldn't change the file-system.
Dumb as i am i thought: "Okay, then why don't just unmount the partition" so i did this (Mount>>Disabled "Data") an then retried to format the data partition with f2fs. During this process i have to assume that something went wrong? It gave me some error which i fool can't remember.
From this point i couldn't access the /data partition anymore, i can't mount it nor can i boot into Android.
I still have access to TWRP and can get to fastboot access. I have no ADB Access in TWRP - it just can't recognize the prime. In Windows-Hardware Manager it just says: Transformer?! (i have universal naked driver installed)
Forget the last sentence - it seems that my USB-Cable is partly broken. Sometimes it recognizes the prime and sometimes not!
Is it gone forever or is there still hope to recover it?
Hopefully someone can help me, i'm really desperate
P.S.: D didn't want to make things worse, so i stopped messing around with it - would it help to reflash the ne0zone75_tf300t.blob file? Is this even possible if i already updated the TWRP to a newer version?
NiffStipples said:
I still have access to TWRP and can get to fastboot access.
Click to expand...
Click to collapse
As long as this is the fact, we don' t call it 'bricked'.
Try following one after another:
1. TWRP>>Wipe>>Advanced>>[check / data]>>repair file system, flash ROM again.
2. Fastboot:
Code:
fastboot -i 0x0b05 erase userdata
- then flash ROM again.
3. Last ressort: Flash stock ROM and start from scratch.
... hope you've pulled your nvflash files. Good luck!
... you might also want to flash another TWRP, though ne0zone75's normally works well. Try the official 2.8.3.0 (for tf300t because you are on Hairy Bean), works good with my prime.
Thanks a lot for your reply
I've tried the steps you provided:
1) While repairing the data partition it said again that it can't mount the data partition. (Picture of it in the attachment)
2) Reflasing the rom worked okay but as expected it couldn't boot (stuck in bootscreen) - in TWRP the /data partiton was again unmountable
3) erasing the userdata via fastboot gave me the following:
Code:
erasing 'userdata'...
FAILED (command write failed (Invalid argument))
finished. total time: 0.002s
At this time i didn't tried to reflash the rom because i don't think it would change anything?!
4) i only have the old nvflash files from ages ago when i started flashing with androwook - i fear they are the wrong ones? I don't have any clue what to do with these - are there good instructions to get the tab back to it's factory state?
Last but not least - do you have a link for the right TWRP you're talking about. I don't want to gave the wrong one a try
NiffStipples said:
Thanks a lot for your reply
I've tried the steps you provided:
1) While repairing the data partition it said again that it can't mount the data partition. (Picture of it in the attachment)
2) Reflasing the rom worked okay but as expected it couldn't boot (stuck in bootscreen) - in TWRP the /data partiton was again unmountable
3) erasing the userdata via fastboot gave me the following:
Code:
erasing 'userdata'...
FAILED (command write failed (Invalid argument))
finished. total time: 0.002s
At this time i didn't tried to reflash the rom because i don't think it would change anything?!
Click to expand...
Click to collapse
Sounds as if partition table is faulty.
1. You could try to redo the Hairy Bean procedure.
2. If you feel lucky, then you could try to format partition manually using
Code:
mkfs.ext4 /dev/block/mmcblk0p8
4) i only have the old nvflash files from ages ago when i started flashing with androwook - i fear they are the wrong ones?
Click to expand...
Click to collapse
nvflash files don't grow sour; you could try without changing to wheelie your blob.bin. If it works, you are safe and can continue with the other blobs.
I don't have any clue what to do with these - are there good instructions to get the tab back to it's factory state?
Click to expand...
Click to collapse
Best instruction you find here: http://forum.xda-developers.com/showthread.php?t=1894867
Last but not least - do you have a link for the right TWRP you're talking about. I don't want to gave the wrong one a try
Click to expand...
Click to collapse
I have actually the (official) one from http://www.techerrata.com/browse/twrp2/tf300t
Good Luck!
Okay, now i know why they always say that flashing is nothing for noobs
I'm a little bit confused - what (in your opinion) is the best shot i should give a try?
Formatting manually (from where? In TWRP or via adb? I'm on Windows)
Reflash everything with NVFLASH (is that possible without any hassle - the NVFLASH files are from ICS-times and i'm on JB/KK?!)
I know it's annoying to help someone who doesn't know what he's doing - hope you have time to get me through this flashing nightmare :/
NiffStipples said:
Okay, now i know why they always say that flashing is nothing for noobs
Click to expand...
Click to collapse
Everybody starts as a noob.
I'm a little bit confused - what (in your opinion) is the best shot i should give a try?
Formatting manually (from where? In TWRP or via adb? I'm on Windows)
Click to expand...
Click to collapse
I would first do that manually from TWRP>>Advanced>>Terminal Command>>Select Folder (root)>>type in: mkfs.ext4 /dev/block/mmcblk0p8
Reflash everything with NVFLASH (is that possible without any hassle - the NVFLASH files are from ICS-times and i'm on JB/KK?!)
Click to expand...
Click to collapse
Important is, that blob.bin works with
Code:
wheelie.exe -r --blob blob.bin
After that you should flash 'bricksafeTF201.img' and 'unlock-token-TF201'. Then you can flash any blobs of unblobbed ROMs you can find in the internet or flash stock ROM (JB). Then proceed to fastboot custom recovery and zipflash custom ROM.
I know it's annoying to help someone who doesn't know what he's doing - hope you have time to get me through this flashing nightmare :/
Click to expand...
Click to collapse
I went through any misstep you can think of with the three of 'em: TF201, TF300T, TF700T.
Mmmmh, the command
Code:
mkfs.ext4 /dev/block/mmcblk0p8
gives me back:
Code:
mkfs.ext4: not found
NiffStipples said:
Mmmmh, the command
Code:
mkfs.ext4 /dev/block/mmcblk0p8
gives me back:
Code:
mkfs.ext4: not found
Click to expand...
Click to collapse
Oops! My bad, try
Code:
make_ext4fs /dev/block/mmcblk0p8
.
.... for information's sake type
Code:
fdisk -l /dev/block/mmcblk0p8
You should get
Code:
Disk /dev/block/mmcblk0p8: 29.6 GB, 29618601984 bytes
4 heads, 16 sectors/track, 903888 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Hooray! :victory: Thanks a lot - everything is back where it belongs
Just for the learning effect - do you have any idea what did go wrong in my case and how would i correctly change the format of the data partition to f2fs? I think i've read a lot of times that this would improve rom speeds a lot?!
NiffStipples said:
Hooray! :victory: Thanks a lot - everything is back where it belongs
Just for the learning effect - do you have any idea what did go wrong in my case and how would i correctly change the format of the data partition to f2fs? I think i've read a lot of times that this would improve rom speeds a lot?!
Click to expand...
Click to collapse
Congrats!
If you would care to tell what you did last, one could make a guess, what went wrong.
... and yes, changing /data (only!) to f2fs makes a tremendous difference in speed. Normally TWRP complies the job without probs. What TWRP do you have now?
I prefer @ne0zone75's which I linked some posts before. They work on all my tabs.
I have installed v2.8.3.0 from the site you gave me above
Mh, as said in the first post i did the following steps to change the format
I tried Wipe>>Advanced Wipe>>Checked "Data">>Repair or Change File System>>Change File System>>Choose F2FS
Then the system gave me an error that it couldn't access the partition because it was mounted or couldn't be unmounted or something like this
So i went back to Mount>>unchecked "Data"
And then again to Advanced Wipe>>...>>Change File System>>F2FS
After that something went wrong because after that step i couldn't mount the data partition anymore?!
NiffStipples said:
I have installed v2.8.3.0 from the site you gave me above
Mh, as said in the first post i did the following steps to change the format
I tried Wipe>>Advanced Wipe>>Checked "Data">>Repair or Change File System>>Change File System>>Choose F2FS
Then the system gave me an error that it couldn't access the partition because it was mounted or couldn't be unmounted or something like this
So i went back to Mount>>unchecked "Data"
And then again to Advanced Wipe>>...>>Change File System>>F2FS
After that something went wrong because after that step i couldn't mount the data partition anymore?!
Click to expand...
Click to collapse
Yes, but what did you to fix it then?
Oh sorry, now i get it
I just used your command for repartitioning(?!?): make_ext4fs /dev/block/mmcblk0p8
I am still of two minds of f2fs on these tablets.. Just gone back to ext4 to compare... As was getting to sticky on the F2fs with redraws and lag..
Anyway good to hear a successful conclusion on the come back by the OP
NiffStipples said:
Oh sorry, now i get it
I just used your command for repartitioning(?!?): make_ext4fs /dev/block/mmcblk0p8
Click to expand...
Click to collapse
Good! Glad, it helped you. Now you could try the 'mkfs.f2fs' command also.
Already tried that - this time it worked without problems :highfive:
Thanks again for the great help!! F2FS brings the prime to a whole new level, now i just have to figure out how to change the dock layout language
NiffStipples said:
Already tried that - this time it worked without problems :highfive:
Thanks again for the great help!! F2FS brings the prime to a whole new level, now i just have to figure out how to change the dock layout language
Click to expand...
Click to collapse
That should be no problem. If you click in dock, there should be a keyboard icon in notification area, clicking it settings dialog will appear. Additional in settings>>language and input>>physical keyboard you can set keyboard layout of dock.
das chaos said:
Oops! My bad, try
Code:
make_ext4fs /dev/block/mmcblk0p8
.
.... for information's sake type
Code:
fdisk -l /dev/block/mmcblk0p8
You should get
Code:
Disk /dev/block/mmcblk0p8: 29.6 GB, 29618601984 bytes
4 heads, 16 sectors/track, 903888 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Click to expand...
Click to collapse
DC,
I wonder if this is why my f2fs where playing up for me?
using your commands I get the following..
Code:
[email protected]:/ $ su
[email protected]:/ # fdisk -l /dev/block/mmcblk0p8
Disk /dev/block/mmcblk0p8: 29.6 GB, 29618601984 bytes
4 heads, 16 sectors/track, 903888 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/mmcblk0p8 doesn't contain a valid partition table
[email protected]:/ #
Disk /dev/block/mmcblk0p8 doesn't contain a valid partition table
this is what I am looking at as a problem maybe?
is there a terminal command to see all the partitions and sizes?
I might have to take this thing back to scratch and start again as been flashing left right and center on it of late.
dgcruzing said:
DC,
I wonder if this is why my f2fs where playing up for me?
using your commands I get the following..
Code:
[email protected]:/ $ su
[email protected]:/ # fdisk -l /dev/block/mmcblk0p8
Disk /dev/block/mmcblk0p8: 29.6 GB, 29618601984 bytes
4 heads, 16 sectors/track, 903888 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/mmcblk0p8 doesn't contain a valid partition table
[email protected]:/ #
Disk /dev/block/mmcblk0p8 doesn't contain a valid partition table
this is what I am looking at as a problem maybe?
is there a terminal command to see all the partitions and sizes?
I might have to take this thing back to scratch and start again as been flashing left right and center on it of late.
Click to expand...
Click to collapse
No that's normal for f2fs, only fat systems have readable PT. What I was interested was geometry of fs and that is the same as mine. So everything is o.k. You have your tab up and running - that counts.
There is a free app Storage Partitions in the store, which can do no more than show information about partitions. Mainly an exploit of commands
Code:
cat /proc/mounts
and
Code:
cat /proc/partitions
das chaos said:
No that's normal for f2fs, only fat systems have readable PT. What I was interested was geometry of fs and that is the same as mine. So everything is o.k. You have your tab up and running - that counts.
There is a free app Storage Partitions in the store, which can do no more than show information about partitions. Mainly an exploit of commands
Code:
cat /proc/mounts
and
Code:
cat /proc/partitions
Click to expand...
Click to collapse
Used that one and another to have a look..
This is what I get, just for the hell of it..
As said for me.. F2Fs on this one doesn't play nice and the last few days I am back to Ext4..
Running it in and let it settled, putting it through its paces with plenty of tabs in chrome open and multitasking back and forwards in to Tapatalk and it runs normal with out lag and redraws..
I am using apex as a launcher and under F2Fs with kept in memory set..it was redrawing to the max and timing out from coming out of sleep..
Playing with other tweaks to see if can get it to a sweet spot.
Will let it settle for a few days and play then swop back and see which is better with the tweaks added

Missing backup option in recovery

Hi!
I installed CM 12.1 recently and found that the cyanogen recovery doesnt offer any backup option. Since I need this, I went back to my backup (CM 11).
I am a little confused about how I should proceed to use CM 12.1 AND have the backup option in recovery:
Can I just flash CWM (from the clockworkmod website) or TWRP recovery after installing CM 12.1? I read that this replaces the kernel of the i9100 aswell, will this result in any issues?
And can I flash it by using the cyanogen recovery (download the zip and install in recovery)?
And will CM 12.1 replace the recovery immediately, even if I unchecked "Update Cyanogen recovery" in the developer options? (I think I tried to install CWM before but it got replaced nevertheless...)
I hope that this question hasn't been asked already, I found so many topics which couldn't really help me...
Thank you!!
GridLockFour said:
Hi!
I installed CM 12.1 recently and found that the cyanogen recovery doesnt offer any backup option. Since I need this, I went back to my backup (CM 11).
I am a little confused about how I should proceed to use CM 12.1 AND have the backup option in recovery:
Can I just flash CWM (from the clockworkmod website) or TWRP recovery after installing CM 12.1? I read that this replaces the kernel of the i9100 aswell, will this result in any issues?
And can I flash it by using the cyanogen recovery (download the zip and install in recovery)?
And will CM 12.1 replace the recovery immediately, even if I unchecked "Update Cyanogen recovery" in the developer options? (I think I tried to install CWM before but it got replaced nevertheless...)
I hope that this question hasn't been asked already, I found so many topics which couldn't really help me...
Thank you!!
Click to expand...
Click to collapse
CM recovery is almost like a stock recovery! you cant flash anything unless is signed!
First you cant flash random recovery! "A kernel is a recovery and a recovery is a kernel." it must be build and compatible with phone and ROM that you using!
After you flash your rom, recovery will get replaced by roms buildin recovery/kernel! SG2 doesn't have a separate partition for recovery.
Here is KK kernel and LP kernel by @gsstudios
ultravy said:
CM recovery is almost like a stock recovery! you cant flash anything unless is signed!
First you cant flash random recovery! "A kernel is a recovery and a recovery is a kernel." it must be build and compatible with phone and ROM that you using!
After you flash your rom, recovery will get replaced by roms buildin recovery/kernel! SG2 doesn't have a separate partition for recovery.
Here is KK kernel and LP kernel by @gsstudios
Click to expand...
Click to collapse
Thank you! I now use the dorimanX Kernel (+Trim) and finally have a proper recovery AND cm 12.1
It's a bit slower (Cm 12.1) than Cm 11, but I guess that's a different problem.
Thanks again!
GridLockFour said:
Thank you! I now use the dorimanX Kernel (+Trim) and finally have a proper recovery AND cm 12.1
It's a bit slower (Cm 12.1) than Cm 11, but I guess that's a different problem.
Thanks again!
Click to expand...
Click to collapse
Be sure to check for brickbug before do trim on partitions! but i trimmed anyway on a temporary trim kernel! And this is my result! do a test before and compare them after you do a trim!
GT-I9100 appears to have a separate recovery partition
ultravy said:
CM recovery is almost like a stock recovery! you cant flash anything unless is signed!
First you cant flash random recovery! "A kernel is a recovery and a recovery is a kernel." it must be build and compatible with phone and ROM that you using!
After you flash your rom, recovery will get replaced by roms buildin recovery/kernel! SG2 doesn't have a separate partition for recovery.
Here is KK kernel and LP kernel by @gsstudios
Click to expand...
Click to collapse
By SG2, I assume you meant GS2. I have an GT-I9100.
I've read several times in various places that GS2s do not have a separate recovery partition. Though I'm quite new to android in general, it seems that my GS2 does.
Here is a bit of my PIT (heimdall print-pit --verbose) output:
...
--- Entry #6 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 6
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 73728
Partition Block Count: 16384
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: KERNEL
Flash Filename: zImage
FOTA Filename:
--- Entry #7 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 7
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 90112
Partition Block Count: 16384
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: RECOVERY
Flash Filename:
FOTA Filename:
...
Here are the details of all the partitions listed in the verbose PIT output (sorry about the formatting):
Partition offset blocks hi-end size (MiB)
GANG 0 0 0.00
BOOT 0 8192 8192 4.00
EFS 8192 40960 49152 20.00
SBL1 49152 2560 51712 1.25
SBL2 53248 2560 55808 1.25
PARAM 57344 16384 73728 8.00
KERNEL 73728 16384 90112 8.00
RECOVERY 90112 16384 106496 8.00
CACHE 106496 204800 311296 100.00
MODEM 311296 32768 344064 16.00
FACTORYFS 344064 1048576 1392640 512.00
DATAFS 1392640 4194304 5586944 2.00
UMS 5586944 24133632 29720576 11.00
HIDDEN 29720576 1048576 30769152 512.00
blank 0 0 0 0.00
15022.50 Total
As you can see, there are no overlaps. In fact, the SBL1 and SBL2 have unused space after them - if they were 4096 blocks (2 MiB) instead of 2560 (1.25 MiB), then all the space would be allocated in contiguous, non-overlapping chunks.
Q1: is my reading correct, that is, my GS2 does have a separate recovery partition? (As there are several GS2 models, my question relates to the I9100.)
Second point. It seems that when I flash a CWM recovery, it really is being written to (what I believe to be) the recovery partition.
On my Linux desktop:
$ ls -l zImage
-rwxr-xr-x. 1 me me 6190876 Mar 16 2013 zImage*
$ sha1sum zImage
ee4464781de5396b769eab9325ae43a84e942ef9 zImage
$ adb shell
Now On my GS2:
[email protected]:/ $ su
Note: I used a block size of 4 because 4 x 1547719 = 6190876.
[email protected]:/ # dd if=/dev/block/mmcblk0p6 bs=4 count=1547719 | sha1sum
ee4464781de5396b769eab9325ae43a84e942ef9 -
1547719+0 records in
1547719+0 records out
6190876 bytes transferred in 26.631 secs (232468 bytes/sec)
As you can see, the sums agree. So, assuming /dev/block/mmcblk0p6 is pointing to the (presumed to exist) recovery partition, the zImage contents is definitely there.
So, it seems to me that RECOVERY is a separate chunk of the storage partition, and that I have successfully written an image to that partition. Booting CM 12.1 does not overwrite this. CM appears to ignore it.
Q2: If that is correct, why does booting into recovery still boot the "Cyanogen Recovery" - and, is there any way to get it to boot off the zImage?
Q3: Can anyone please post some useful links into how this all works? I've spent quite a while looking, but I have yet to find anywhere that clearly (and accurately!) documents how this all works.
Tx
jimstaffer said:
By SG2, I assume you meant GS2. I have an GT-I9100.
So, it seems to me that RECOVERY is a separate chunk of the storage partition, and that I have successfully written an image to that partition. Booting CM 12.1 does not overwrite this. CM appears to ignore it.
Q2: If that is correct, why does booting into recovery still boot the "Cyanogen Recovery" - and, is there any way to get it to boot off the zImage?
Q3: Can anyone please post some useful links into how this all works? I've spent quite a while looking, but I have yet to find anywhere that clearly (and accurately!) documents how this all works.
Tx
Click to expand...
Click to collapse
Yes i meant gt i9100! Indeed partition blocks shows recovery and kernel, but i think there is some link between them, otherwise experienced devs should figure this out by now! You should ask a dev for detailed information!
help me out...
am stuck with 12.1 ... i want to downgrade but am unable to find suitable help, way & firmware...even phn's internal memory is not allowing to modify it,,,as says its read only memory... its nealy full but i cant remove anything ...
garry4rm.asr said:
am stuck with 12.1 ... i want to downgrade but am unable to find suitable help, way & firmware...even phn's internal memory is not allowing to modify it,,,as says its read only memory... its nealy full but i cant remove anything ...
Click to expand...
Click to collapse
put your phone on download mode and install a kernel using ODIN. Here are some of the pre-made kernel .tar files for ODIN: http://forum.xda-developers.com/galaxy-s2/development-derivatives/convert-kernel-zip-to-tar-t2994381 Flash one of these under PDA and enter you phone in recovery mode again. Try installing a zip or see if you can access internal storage. If problems still occurs, try mounting you internal sd card in CWM under the mounts and storage menu.
If all still doesn't work, then you should consider flashing back to stock.
gsstudios.
gsstudios said:
put your phone on download mode and install a kernel using ODIN. Here are some of the pre-made kernel .tar files for ODIN: http://forum.xda-developers.com/galaxy-s2/development-derivatives/convert-kernel-zip-to-tar-t2994381 Flash one of these under PDA and enter you phone in recovery mode again. Try installing a zip or see if you can access internal storage. If problems still occurs, try mounting you internal sd card in CWM under the mounts and storage menu.
If all still doesn't work, then you should consider flashing back to stock.
gsstudios.
Click to expand...
Click to collapse
every link open with a new confusion and a new link.... my mind like its in a grinder and cant see which way its rotating....pheeeeewwww....
plz provide link with compatible kernal of i9100 12.1 CyanogenMod, lollypop.....
found a way to delete but with small time window
today when i made my mind to accept that its over with s2...but again when phn is on the way of booting and installing apps.... a 5-10 seconds time window is there to le me delete some media...but as soon as phn is fully booted..again same nonsense starts to appear " some files cannot be deleted or this is read only memory"......

Boot loop - cant mount system, cache etc, problem with mmcblk0?

Phone is Elephone P7000, I can flash various stock roms and custom to it, doesn't boot into recovery unless I use CWM, which I can boot into and connect via adb.
Chip is MT6752, I've never flashed over bootloader or userdata, just the rest. Got it working a couple times, with different roms though would freeze after a while or a x has stopped working (I've had this phone since it was released and never updated the stock rom - I got the x has stopped working error before ever flashing anything and it got stuck in a boot loop after that), resetting stuck in boot loop, haven't got it working since then despite multiple flashing attempts. I have not tried firmware upgrade with SP Tool since that does the whole lot also haven't tried formatting.
Typically rebooting from CWM would help (just regular, not into fastboot), but to no avail anymore.
Memory Test on sptool passed everything except for nand flash which says it was not found.
in adb shell frompc via CWM recovery running.
fdisk -l /dev/block/mmcblk0
fdisk: can't open '/dev/blockmmcblk0': I/O error
obviously mmcblk1 (the external SD card) works just fine.
parted /dev/block/mmcblk0 print
Error: /dev/block/mmcblk0: unrecognised disk label
Again mmcblk1 will be fine.
It shows up using cat /proc/partitions
major minor #blocks name
179 0 15267840 mmcblk0
e2fsck /dev/block/mmcblk0
e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/block/mmcblk0
Could this be a zero-length partition?
C:\adb>adb shell
~ # mke2fs -n /dev/block/mmcblk0
mke2fs -n /dev/block/mmcblk0
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
954720 inodes, 3816960 blocks
190848 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=3909091328
117 block groups
32768 blocks per group, 32768 fragments per group
8160 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
~
Is there any chance of repairing this partition with a tool like you can on a PC?
Otherwise what should I do from here?
Athiril said:
Phone is Elephone P7000, I can flash various stock roms and custom to it, doesn't boot into recovery unless I use CWM, which I can boot into and connect via adb.
Chip is MT6752, I've never flashed over bootloader or userdata, just the rest. Got it working a couple times, with different roms though would freeze after a while or a x has stopped working (I've had this phone since it was released and never updated the stock rom - I got the x has stopped working error before ever flashing anything and it got stuck in a boot loop after that), resetting stuck in boot loop, haven't got it working since then despite multiple flashing attempts. I have not tried firmware upgrade with SP Tool since that does the whole lot also haven't tried formatting.
Typically rebooting from CWM would help (just regular, not into fastboot), but to no avail anymore.
Memory Test on sptool passed everything except for nand flash which says it was not found.
in adb shell frompc via CWM recovery running.
fdisk -l /dev/block/mmcblk0
fdisk: can't open '/dev/blockmmcblk0': I/O error
obviously mmcblk1 (the external SD card) works just fine.
parted /dev/block/mmcblk0 print
Error: /dev/block/mmcblk0: unrecognised disk label
Again mmcblk1 will be fine.kcuf
It shows up using cat /proc/partitions
major minor #blocks name
179 0 15267840 mmcblk0
Is there any chance of repairing this partition with a tool like you can on a PC?
Otherwise what should I do from here?
Click to expand...
Click to collapse
Ok bro heres how to repair your phone.You need a firmware image of your device and you need some way to flash it.Google
"your device" firmware then download and flash it.Everything will be repaired and your device will be in working order.
boyam99 said:
Ok bro heres how to repair your phone.You need a firmware image of your device and you need some way to flash it.Google
"your device" firmware then download and flash it.Everything will be repaired and your device will be in working order.
Click to expand...
Click to collapse
I'm not sure if you read what I've written, I've reflashed the phone repeatedly, apart from the preloader since that could be disastrous, and userdata partitions.
Anyone else reading: I want to try parted mklabel to give it a new label, but not sure what label to give it, and then try resuce under parted.
Athiril said:
I'm not sure if you read what I've written, I've reflashed the phone repeatedly, apart from the preloader since that could be disastrous, and userdata partitions.
Anyone else reading: I want to try parted mklabel to give it a new label, but not sure what label to give it, and then try resuce under parted.
Click to expand...
Click to collapse
hey am trying to help you dont say am not helping
---------- Post added at 08:39 AM ---------- Previous post was at 08:30 AM ----------
Athiril said:
I'm not sure if you read what I've written, I've reflashed the phone repeatedly, apart from the preloader since that could be disastrous, and userdata partitions.
Anyone else reading: I want to try parted mklabel to give it a new label, but not sure what label to give it, and then try resuce under parted.
Click to expand...
Click to collapse
do u have a backup of your device.If the stock rom isnt working its either a software problem or its the phone
---------- Post added at 08:39 AM ---------- Previous post was at 08:39 AM ----------
Athiril said:
I'm not sure if you read what I've written, I've reflashed the phone repeatedly, apart from the preloader since that could be disastrous, and userdata partitions.
Anyone else reading: I want to try parted mklabel to give it a new label, but not sure what label to give it, and then try resuce under parted.
Click to expand...
Click to collapse
do u have a backup of your device.If the stock rom isnt working its either a software problem or its the phone

[Guide] How to solve WiFi/Mobile data constantly dropping

This guide works only if your WiFi is dropping and can't get any signal but you DO have IMEI.
Why this happens?
As this is an A/B device TWRP stores it's logs on /persist/cache/recovery, filling up this directory and collapsing persist making WiFi/Mobile signal reset.
How is it solved?
Simply deleting these logs inside /persist/cache/recovery they are named "log" and "last_log". Erase these logs, reboot and solved!!
Once you recover your signal make a backup of efs/persist and save it in a safe place to prevent this from happening again.
Please comment if you have any issues
All credits to @Jleeblanch who discovered this bug on TWRP
I'll leave a screenshot from the directory
I will post update for TWRP that should fix this bug asap too, but for now for the users effected, definitely do the above to fix [emoji6]
Dude, you are my friggin' hero. I am on a g7, but it appears to have worked.
Thank you!
I am in a bit of a pickle, I was sent a link to this post... So, my wifi does work, I even tried to flash a stock recovery for my model of g6. It however does not read my sim card. Before I did all this it was working with my carrier, google fi. I went into this folder. (I also did remember to mount persist) and it does not have a cache folder to begin with. So I am still pretty stuck. Any ideas? It's a moto g6 xt1925-13. Id also like to note it says baseband <none>. I also goofed and didn't make a backup like I should of.
Toonka95 said:
I am in a bit of a pickle, I was sent a link to this post... So, my wifi does work, I even tried to flash a stock recovery for my model of g6. It however does not read my sim card. Before I did all this it was working with my carrier, google fi. I went into this folder. (I also did remember to mount persist) and it does not have a cache folder to begin with. So I am still pretty stuck. Any ideas? It's a moto g6 xt1925-13. Id also like to note it says baseband <none>. I also goofed and didn't make a backup like I should of.
Click to expand...
Click to collapse
Hello, do you have IMEI?
Most probably not so you need to flash the latest pie stock rom from your channel. The complete rom and via fastboot, I believe you already have your stock rom, however it can be found on lonlinet mirrors and the fastboot commands can be found here on xda on a thread named going back to stock.
If you still have trouble don't hesitate on asking again
juampapo546 said:
Hello, do you have IMEI?
Most probably not so you need to flash the latest pie stock rom from your channel. The complete rom and via fastboot, I believe you already have your stock rom, however it can be found on lonlinet mirrors and the fastboot commands can be found here on xda on a thread named going back to stock.
If you still have trouble don't hesitate on asking again
Click to expand...
Click to collapse
Hey just an update, I was using lolinet, but I was downloading the retail rom, turns out I needed retar. All is restored. NEXT TIME ill back up!
Hello,
IMEI and WiFi now work properly.
Thank you very much.
Is this fix only relevant if the persist partition is full? My wifi mostly works, but drops out ~8 times a day. Most of the time I can fix it by turning wifi off, waiting ~5 minutes, then turning it back on again. I have an IMEI and my SIM card works fine. I tried deleting the log files as per the first post, but it didn't fix the wifi dropouts. However, before doing this my partition was not full:
Code:
evert:/ # df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.8G 288K 1.8G 1% /dev
tmpfs 1.8G 0 1.8G 0% /mnt
tmpfs 1.8G 28M 1.7G 2% /tmp
/dev/block/mmcblk0p69 49G 42G 6.7G 87% /data
/dev/block/mmcblk0p38 27M 3.1M 24M 12% /persist
/dev/block/mmcblk0p64 232M 15M 217M 7% /oem
/dev/block/mmcblk0p30 12M 7.3M 4.4M 63% /dsp
/dev/block/mmcblk0p55 4.3M 380K 3.9M 9% /bt_firmware
Langurites said:
Is this fix only relevant if the persist partition is full? My wifi mostly works, but drops out ~8 times a day. Most of the time I can fix it by turning wifi off, waiting ~5 minutes, then turning it back on again. I have an IMEI and my SIM card works fine. I tried deleting the log files as per the first post, but it didn't fix the wifi dropouts. However, before doing this my partition was not full:
Code:
evert:/ # df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.8G 288K 1.8G 1% /dev
tmpfs 1.8G 0 1.8G 0% /mnt
tmpfs 1.8G 28M 1.7G 2% /tmp
/dev/block/mmcblk0p69 49G 42G 6.7G 87% /data
/dev/block/mmcblk0p38 27M 3.1M 24M 12% /persist
/dev/block/mmcblk0p64 232M 15M 217M 7% /oem
/dev/block/mmcblk0p30 12M 7.3M 4.4M 63% /dsp
/dev/block/mmcblk0p55 4.3M 380K 3.9M 9% /bt_firmware
Click to expand...
Click to collapse
As u said, this is if persist is filled up. If it is then you wont be able to use wifi at all, it would only connect for a few seconds so you def have smth else going on, try flashing stock again
juampapo546 said:
As u said, this is if persist is filled up. If it is then you wont be able to use wifi at all, it would only connect for a few seconds so you def have smth else going on, try flashing stock again
Click to expand...
Click to collapse
Thank you for the reply. Yeah, I tried a bunch of other things… flashing stock, flashing a backup of EFS and persist, erasing modemst1 and modemst2, but it still keeps dropping out unfortunately.

Categories

Resources