MTK yaffs2 - Android Q&A, Help & Troubleshooting

Hi!
Story goes like this. I have here clone Samsung S4 that I wanted to update the software trough CWM. Unfortunately phone died at some point and now is dead. But, I made backup of the flash with MTKDroidTools and with SP flash tool... and here comes the problems... I can not flash backup back to phone because yaffs2 files are not good page/spare ratio. Thanks to members rua1 and Alex1948 now it is more clear how to change spare ratio on yaffs2 files. Unfortunately I'm not very good with Linux, last night I boot Mint 16 from USB stick and was trying to repair my files but without success.
So, my question is: is someone willing to repair my files in Linux (who understand Linux terminal better)?
Here are some details from phone
View attachment 2574910
View attachment 2574911
{
"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 only have problem with flashing yaffs2 files and secro.img all other are OK. If I try to flash those files I get this error
In attachment is mtd, dumchar_info, MTKDroidTools log and Sp flash tool log so you can see my file structure.Log from MTKDroidTools is from version 2.5.2 because I was using this version when I was making backup from my original phone (you will see other phones data just scroll down to MT6575)
I'm uploading original yaffs files to google drive so later I will update this post with some links.
Thank you all in advance.
Best regards
P.S. INFO FROM MTKDroidTools IS TAKEN FROM SAME PHONE LIKE MINE (FRIENDS PHONE) YES, SAME ONE HARDWARE AND SOFTWARE IS 100% SAME.
Files on Google drive link
https://drive.google.com/file/d/0Bx8Xjd1q6dr3YnFISVJBZFZPSUU/edit?usp=sharing

Little update (memory type)
View attachment 2575196

from guide:
Аttention! Yaffs2 type blocks from this backup can't be Downloaded to phone, they aren't correct! Use backup on 9th step if phone have yaffs2 type blocks!
Click to expand...
Click to collapse
files from archive is wrong
from your log:
10/02/14 11:43:23 Free space: system- 113.7M; data- 54.3M; sdcard- 16.7M; D:\ 170861M
10/02/14 11:43:46 - ERROR - tar: write error: No space left on device
Click to expand...
Click to collapse
it was necessary to release the free memory on SD card before

Hi!
First, thank you for your reply.
Yes , I did figure it out that my files are not OK. I was trying to make them manually in "yafey" for windows (software to create and edit yaffs2 images) but this software have to much bugs so one time it create system.img with full lib folder second time only half of lib files are there and also there is no option for spare ratio change.
So, MTKDroidTools did make my system backup in a folder on my PC but I can not make yaffs2 file from it because there is no software for windows that works fine (I don't use Linux). On Linux it is easy to do (at least for someone who understand Terminal commands).
So, I can send you my backuped system folder if you are willing to make yassf2 file from it (in Linux). Data and Cashe files I have create in yafey and thay are ok.
In yafey if I make new yaffs2 file and insert lib,etc,app,framework... it will not create all files in folders... and after that when I try to flash that created system.yaffs2.img I have error from BROM s_ft_readlen_not_page_aligment (4017) again problem with spare ratio.
I still have here my friends phone so if you have any idea what to do and how to do please tell. I made backup from my friends phone but same thing data,cache,system,secro files are not created correctly. I don't know why is this is it because of the MTKDroiTools or is it because of the phone?

Aaaaaaaaaarghh!!!!!
You wouldn't beleive what I just discover I just try to put my friends phone in recovery so I give a try to make backup.
NORMALY my friends phone don't want to go in recovery (just light on screen), so I have call my friend to ask him does he do something with phones recovery and he said YES i flash some recovery from net trough CWM and after that he can not go in the recovery.
CAN YOU BELEIVE HOW UNLUCKY I AM????????
If someone have any idea???

Related

E: failed to mount /efs

Hi, I was wondering if anyone can help me.
My tablet is unable to mount my /efs directory, or whatever. And while I don't know if they are directly connected,
things like my lock screen, holding my power button to get options like Flight Mode, Data Network, Restart, Etc., is gone. And I have tried screen lock to work, it doesn't. Holding my power button shuts my tablet down (in the same amount of
time that holding it would normally bring up the options screen, as well). I also loose completely my 3g, no matter wish successfully installed rom I run. I am not new to flashing rom at all and navigate trough all kind of step regarding specifics to rom by heart. All I can remember was to try the latest Android 4.1.1 - CyanogenMod 10 Preview and failed to load it, I was stuck in the boot animation for half an hour. So I decide to go back to the new stuck 4.0.4 from my provider. That is where I found the problem. Since, I have try 4.0.4 stuck, 4.04 rooted. The problem occur the same way in every rom and everything else was juste fine. I try the 3.1 stuck and 3.2 stuck and the message E: failed to mount /efs appear when rebooting from odin install.Never been able to load any version of the latest 4.1.1 from pershot. I have found a thread about the same issues from another device http://forum.xda-developers.com/showthread.php?t=1766748. I pass the entire day reading the web for solution, but no cigars so far.
I have the a Telus samsung galaxy tab 10.1 3g.
Thanks in advance if you have any idea how to resolve the /efs mounting problem.
I will added these picture to show that I have lost all important information that is apparently store in some file inside this /efs folder. Apparently this folder as been corrupt when flashing the CyanogenMod 10 Preview especially made for my tablet. So my new question would be to ask.
Do anyone know how to restore this folder even if I have no backup of it?
{
"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"
}
on off on off
try to copy the content of the efs folder with any root browser. it will have files and folders like in the screenshot atached.
Solved.
i had exactly the same problem. Was working on it for the last two days (ofcourse i am a simpleton and rookie )
But yes at last the phone is fixed and working fine with all the parameters.
So dont worry dear. Try to follow these steps : -
1. flash a rom using odin or heimdall - either stock or Cyanogenmod. You can check the repartition if using with the pit file.
2. Root your phone if not already rooted
3. Install busybox
4. Install kTool.apk (Its a small and wonderful apk. Freely available)
5. Install any file manager that supports root browsing
6. Make a backup of your efs with the help of kTool.apk (Its simple)
7. Decompress your earlier backup and copy all the files in the root efs folder with the root explorer
8. Now rename the one that you decompressed the files from as efs.img and copy it into the internal sdcard root
9. Now retore the egs.img using the kTool.apk
This will solve the problem i guess.
Good luck
8.
No file in /efs folder, and no backup
Thanks a lot for the answer guys, but unfortunately there is nothing inside my /efs folder. It's completely empty and therefore I can't copy it, move it backup it,or anything. I also have no backup of this folder. As I understand some file in this folder contain the super important information of my own system like IEME, Serial, etc... So my concern is more like is there is a way to restore this folder even if it doesn't exist. I think the answer is no and the only solution for me is to send it back to Samsung with the stuck roms from my provider and hope for them to not deny the repair so I won't have to pay. I wonder if there is other thing to do but I am pretty sure not. If someone know something let me know. I have already contact Samsung and tell them that my 3g is broken and some strange behavior occur during OTA update. They are going to send me something for me to send the tablet for reparation. Til then I really want to know if there is something I don't understand and if there is still hope. Anyway thanks in advance for anyone who know better then me.
This is EXACTLY what's going on with my tablet, and yes, there's nothing to copy. What do we do?
I originally edited my old post with this, but I wanted to be sure the OP saw it.
I finally fixed mine. See my thread at http://forum.xda-developers.com/showthread.php?t=1876260
I hope it helps

Re: [Q&A] NOS Sense 5 Rom | ask your questions and discuss here

Re: [Q&A] NOS Sense 5 Rom | ask your questions and discuss here
I've been using this rom for a fortnight but unable to understand how the internal storage works.
I previously used ViperDNA after S-off and then moved to this. Totally I made 3 twrp backups. But weirdly I'm able to see only 2 of them which are old in file explorer. When I boot into recovery, only the latest one is available to restore.
Also, I'm unable to copy the twrp backups into my PC. Whichever way I try to copy the folders, only a few files with total size in kb are being copied.
I've attached a screenshot of the file explorer showing 8 gb space as used while analyzer showing only 6gb of it. Very confused. Please help.
{
"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"
}
Sent from my HTC6435LVW using xda premium
venkatp said:
I've been using this rom for a fortnight but unable to understand how the internal storage works.
I previously used ViperDNA after S-off and then moved to this. Totally I made 3 twrp backups. But weirdly I'm able to see only 2 of them which are old in file explorer. When I boot into recovery, only the latest one is available to restore.
Also, I'm unable to copy the twrp backups into my PC. Whichever way I try to copy the folders, only a few files with total size in kb are being copied.
I've attached a screenshot of the file explorer showing 8 gb space as used while analyzer showing only 6gb of it. Very confused. Please help.
View attachment 2205078
Sent from my HTC6435LVW using xda premium
Click to expand...
Click to collapse
browse with file explorer or root explorer and Look for > Root/data/media/Twrp move your back ups to O zero folder/TWRP its where your recovery will look for backups/restore files.
you are unable to backup or copy from twrp /back up to u computer as a new security encryption anti theft in the new TWRP recovery
but you can do it by pulling from your pc through ADB
venkatp said:
I've been using this rom for a fortnight but unable to understand how the internal storage works.
Click to expand...
Click to collapse
When you update to 4.2.2 Android, the file system gets modified to allow for the multi-user environment. Essentially, /sdcard gets replicated into /sdcard/0. When you boot up and try to view your files, you can only see /sdcard/0 - but it appears as /sdcard (very confusing, I know).
I suggest you try using ADB to traverse your filesystem from within recovery (boot to recovery, attach USB cable, run ADB). If you know basic linux commands, this is easy, but basically run
adb shell
ls /sdcard
ls /sdcard/0
to see the differences. The backups you made prior to the switch are probably in /sdcard/0/TWRP instead of /sdcard/TWRP. You can move them like so:
mv /sdcard/0/TWRP/* /sdcard/TWRP/
Then reboot recovery and see if they show up.
ninja'd
Thanks a lot for the detailed responses. Now I can see all backups in recovery. Also cleared my confusion about the file structure. Will try adb to move the backups to pc and let you know... Thanks again
Sent from my HTC6435LVW using xda premium

[BOOTLOGO][GUIDE][Param.lfs] Custom bootlogo for Galaxy Ace 2

Standard Disclaimer: Not responsible for bricking your phone, voiding your warranty, or any other pain or suffering you may feel as result of using this guide.
Well, let's cut to the chase. Following method was inspired by this guide.
Credit goes to @tys0n for original guide.
Programs/scripts needed for this method:
param editor
Python interpretator (2.7.x)
Any graphical editor
Choose graphical editor by yourself as editiing picture won't be described here.
1) Create image image_new.jpg with resolution of 480x800 pixels and size not bigger than 64673 bytes.
2) Take image that you want to replace from /mnt/.lfs (logo.jpg for example, which is bootlogo) and rename it to image_orig.jpg .
Although using this method any picture in param.lfs can be replaced (but with not bigger size than original ones), logo.jpg is only was tested by author.
3) Then dd your param.lfs:
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/param.lfs bs=512000
4) create any empty folder (on PC), put here param_editor.py, param.lfs, image_orig.jpg and image_new.jpg
5) run param_editor.py. If everything was done successfully, in the same folder param_mod.lfs will appear, otherwise message that describe why it has failed will be shown.
Okay, lets to test param_mod.lfs. Of course, you can flash and reboot once it done, but there's a simple method(without having to wait until bootlogo appears... or doesn't) to check whether param.lfs is correct:
1) unmount /mnt/.lfs:
Code:
umount /mnt/.lfs
2) flash param_mod.lfs
Will be careful with typing following command. DON'T type wrong number of partition, otherwise your phone probably will be bricked. Better if you just copy/paste this line.
Code:
dd if=/sdcard/param_mod.lfs of=/dev/block/mmcblk0p1 bs=512000
3) now mount it again:
Code:
mount -t j4fs /dev/block/mmcblk0p1 /mnt/.lfs
4) if you can see your custom bootlogo instead of stock one then everything is ok. Now can reboot and have fun
5) how to restore original param.lfs? Flash param.lfs, dd'd in step 3 ("3) Then dd your param.lfs:")
ToDo: despite of that I have successfully replaced bootlogo, one thing I wanted to check is how to repair the phone in case if something went wrong. For some reason I was not able to flash neither param.tar.md5 nor param.tar . I had to flash three-file stock 4.1.2 to restore it. I would be glad if anyone will provide flashable param.tar.md5 to avoid flashing stock for those who have failed to change bootlogo.
Okay, lets see what bootlogo can be done(custom param.lfs attached below):
{
"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"
}
Why exactly this bull***t (or whatever you can think)? Answer is that everything that I've done (including this guide) is just for fun, and it's first idea that came to my mind. Have fun
Chrono . I was trying do this tutorial. But recently I had a lot of work . Many Thanks , you spared me the time : D
Does not work here... Don't know what went wrong...
Tested logo_nfc.jpg and also logo.jpg
Files are as instucted in one folder...
There is no log or mod output... I got only this (with CMD and param_editor.py)..
Code:
opened param.lfs
opened ./image_orig.jpg
opened ./image_new.jpg
With normal double klick on *.py the cmd window closes to fast to see anything....
Just for test I tried to use original logo.jpg as image_orig.jpg AND image_new.jpg... But I got the same "output" and no mod file nor log...
I Installed Python 3.4.3 from webseite... Is this correct?
EDIT
Installed now Python 2.7.9 - and now param_mod.lfs was created! - Looks like 3.4.3 does not work...
fluffi444 said:
I Installed Python 3.4.3 from webseite... Is this correct?
EDIT
Installed now Python 2.7.9 - and now param_mod.lfs was created! - Looks like 3.4.3 does not work...
Click to expand...
Click to collapse
It should have been to work... probably I missed something as it should not exit without prompt.
ChronoMonochrome said:
It should have been to work... probably I missed something as it should not exit without prompt.
Click to expand...
Click to collapse
Yeb - it's working also with logo_nfc.jpg.
As I said I needed to used Python 2.7.9...
For those with 8160P - It's just a test with "powered by android" logo..
EDIT
And as the logo_nfc.jpg is a bit bigger (65194 bytes) I had to modify the py-script according to this - But as I said it works.
So its not limited to exactly 64673 bytes - But for sure its the best to stay with the same or below original size!
EDIT2
Added "powered by cyanogenmod"
bro i need helpppppppppp
ask
how to use/apply it ??
mavis2032 said:
how to use/apply it ??
Click to expand...
Click to collapse
Omg, for whom Chrono wrote instruction? Just read them, it's so easy...
Custom boot logo for codina I made probably no one wants
thank for @dugeriss for wallpaper
flash from recovery
someone can help me with a samsung chat.? model GT-B5330L, it have the same problem; logo jpg draw failed
really great guide, transformed my old ace.
how to see image in param.lfs?

How to resize any mt6572 devices partition without any hassel

Before Trying this mod wanna clearify something : I am not responsible for bricked device , dead sdcard or thermonuclear war or whatever . Try at your own risk .
Things required before approaching :
1. mtk droid tool
2. Sp flash tool
3. Hex edior or notepad++ (go to plugin manger and install hex editor plugin)
4. some sense about mathmatics
Need to know :
This is not a noob guide , You need to be little bit experienced before trying this mod . It may or may not hard-brick your device . You need to keep backup of the whole device before approaching . And it will resize the whole device's partition . And i am using a this template here : 1gb system , 2gb data , 16mb recovery , 10mb bootimg and 300mb internal sd-card . Don't forget to pull out external sdcard and sim-cards before flashing . And this mod is only for devices with 4gb emmc .
Enough introduction , Let's get our hands dirty
First of all , go to your flash tool backup directory and open EBR1 with notepad++ and you will see somehing like this :
{
"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"
}
avoid the lines before the last four lines , No need to worry about those zeros . all you need to worry about is this :
Same process goes for MBR too .
Now lets come to the tricky point . open my MBR and EBR1 in notepad++ or any other hex-editor you like ; Open your MBR and EBR1 too and compare the last four lines with mine . just adjust the line which mismatches with your MBR and EBR1 . click on the number and adjust .
Use my attached MBR and EBR1 as base . And remember to keep a nandroid backup from custom recovery because you have to completely format and reflash your stock rom for this mod and your data partition will be wiped completely . Last but not least please keep a backup of original MBR and EBR1 somewhere .
That's All . Flash using sp flash tool And Enjoy
Feel free to ask question if you are stuck somewhere .
Credits :
1. @yuweng (for all his support and teaching me a lot about mtk . Really indebted to him )
2. darklord4822 ( for his EBR1 and MBR , he is the reason I found out it is possible to recreate the partition table myself ) . Here is his base link .
Reserved
Few updates
v2 changelog :
1. added scatter file to avoid flash error
Few notes :
Adjust linear start address , physical start address and partition size . Convert hex value to get the decimel bytes online here and use online byte to megabyte converter online here to be sure and if you wanna need more info go to this site .
Hey, not like i dont apreciatte it, i'm gonna try it out, but this guide is kindof half way thru...
Why do i need mtk droid tools? you didn't seem to use it in this guide..
Also it is a noob guide, there is no maths involved, nor an explanation to which number represents what.
Its a copy-paste-wish it works job..
No harm intended, just being objective.
But ty, i'll try it out.
Funny, it worked (altho i had to fix the partitions thru twrp), but now my app2sd is broken
edit:
And i fixed it, i had to adapt fbstab.mt6572 and init.mt6572.rc, removing all the lines refered to sdcard1, since, now, repartitioned our device no longer has an integrated external storage, so those files musnt have 'emulated storage' or 'sdcard1' refered lines.
Ty!

TWRP error (operation not permited) when backup

Hello,
I need help for TWRP on my Samsung Galaxy A20e. My device is rooted for a while and TWRP is newly installed. But the problem is when I try to backup something, I got an error while creating the folder TWRP with the mension of operation not permited. I also have a problem when I touch the Install button, I see a list of folders with random generated names like in the photo. Can anybody help me to solve this problem? I can give more informations if needed.
Thanks for helping !
{
"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"
}
your device is encrypted. you must disable encryption and factory reset device in order to become TWRP functional, as TWRP cannot handle samsung encryption. or use other backup method such as Migrate.
Ok I tried what you wrote but it works only while I don't boot my device after factory reset it. If it happens, the encryption enables automatically and I can't backup anymore. Do you have a solution for this ?
you must disable encryption in /vendor/etc/fstab.samsungexynos7884
(can maybe done with zip)
https://forum.xda-developers.com/t/recovery-unofficial-twrp-3-4-0-0-for-galaxy-a20e-a202f.4141767
How am I supposed to do that ? I tried everything with this file. There is a mount option for /data "filencryption=ice". I tried to delete this with a file editor in the stock system but when I reboot my phone it reappears. When I this this in TWRP the system can't boot.
https://forum.xda-developers.com/t/recovery-unofficial-twrp-3-4-0-0-for-galaxy-a20e-a202f.4141767
Click to expand...
Click to collapse
This link cannot help me because it is just a tutorial and when I do exactly like in i get the same results. I don't unerstand why my phone has this problem and not others. If you have other ideas i would be good
there is download for Disable_Dm-Verity_ForceEncrypt_03.04.2020.zip flashable zip which is supposed to patch fstab (last step in tutorial). you must mount system/vendor writeable (checkbox in TWRP)
aIecxs said:
there is download for Disable_Dm-Verity_ForceEncrypt_03.04.2020.zip flashable zip which is supposed to patch fstab (last step in tutorial). you must mount system/vendor writeable (checkbox in TWRP)
Click to expand...
Click to collapse
I tried installing this zip file from the SD card but it didn't boot (locked on samsung logo) so I did a factory reset with TWRP and after configuring, I got the same results than before.
- in TWRP double check your vendor partition is separate partition (or directory inside system partition)
- in TWRP terminal make sure partition is mounted rw
Code:
mount /system w
mount /vendor w
mount
- install Disable_Dm-Verity_ForceEncrypt_03.04.2020.zip
- in TWRP terminal double check fstab.samsungexynos7884 file fileencryption= flag is gone
Code:
cat /vendor/etc/fstab.*
- in TWRP - wipe - format data - type yes
Thanks for the instructions. It works perfectly ! I am just an idiot because I didn't wipe /data in TWRP but I just swiped to factory reset. Thank you a lot !
maybe I was misleading you with factory reset. might be that TWRP factory reset just behaves like simple wipe, where only files are deleted excluding /data/media
formatting whole partition is required for removing encryption.
edit: Please note if you're interested in undo the patch, you must restore vendor partition. you can of course add the fileencryption= flag back with text editor yourself. However that requires linux line endings (LF) so you can't use Windows text editor (CRLF) that's why you should use Notepad++ and enable view for invisible chars with (π) button. Do not simply copy file back into /vendor you will lose file permissions. Do not use sed you still would lose secontext. only copy content of file into old existing file like this.
Code:
cat /tmp/fstab.new > /vendor/etc/fstab.samsungexynos7884
Btw if you're running custom ROM (such as LineageOS) it's possible to break samsung encryption and use AOSP encryption as fallback by deleting keystore.mdfpp.so and keystore.msm8953.so from /vendor/lib/hw. This way you can use TWRP on encrypted device.

Categories

Resources