Related
With the advent of Blackrose custom HBOOT which gives us S-OFF, we can now resize the MTD partitions of our N1. This method is the one used by lbcoder in the Desire thread where you patch the recovery and boot in order to pass modified MTD partition information which supersedes the one provided by the SPL. Using this, I've managed to increase my userdata partition by ~50 MB by taking ~50 MB from the cache partition.
These instructions are for advanced users only. This will involve hex calculations and command line instructions that are not for the faint of heart. I don't believe it's dangerous though so anyone could still try since I will try to make these instructions as detailed as I possibly can.
What you need:
N1 with Blackrose HBOOT (I'm not sure this is needed though after I read more in-depth about the patch)
hex calculator (or a pencil & paper if you want to do it manually)
adb
fastboot
unpack-bootimg.pl
mkbootimg
recovery.img <- in my case I used ClockWorkMod 5.0.2 from here
boot.img <- taken from CM zip (in my case my KANG)
Partition Layout:
0x000003ee0000-0x000003fc0000 : "misc"
0x000004240000-0x000004640000 : "recovery"
0x000004640000-0x0000049c0000 : "boot"
0x0000049c0000-0x00000dac0000 : "system"
0x00000dac0000-0x0000139c0000 : "cache"
0x0000139c0000-0x00001fe00000 : "userdata"
Partition Sizes in Hex:
0x0000000e0000 : "misc"
0x000000400000 : "recovery"
0x000000380000 : "boot"
0x000009100000 : "system"
0x000005f00000 : "cache"
0x00000c440000 : "userdata"
Step-by-step Instructions:
A>Backup your current system: (OPTIONAL)
*I'm assuming you're using CWM 5.0.2 for the backup step since I tried using 3.X and the restore didn't work
1.) Boot your N1 into recovery using either adb reboot recovery or through the bootloader
2.) Backup your current system (I'm going to assume you know how to use your recovery for this)
B>Calculate new MTD parameter values:
*For this example I'm going to transfer ~50MB of cache space to my userdata partition:
1.) Since I know the cache partition is ~100MB in size, I'll just divide the hex size in 2:
0x5f00000 / 2 = 0x2f80000 <= this will be our new cache size
**Note that there is a minimum of 0x20000 (128k) for a partition and the size must be divisible by it which is why I'm playing safe and just dividing the original number in order to get an easier value for this example.
2.) Add the new cache partition size to the original cache partition starting address to get the new starting address of the userdata partition:
0xdac0000 + 0x2f80000 = 0x10a40000 <= this will be the new starting address for userdata
3.) Get the new userdata size by subtracting the new starting address of userdata with the ending address:
0x1fe00000 - 0x10a40000 = 0xf3c0000 <= this will be the new userdata size
C>Create a new recovery.img file which uses the new values:
1.) Breakdown the recovery.img file into it's kernel and ramdisk components using unpack-bootimg.pl:
.\unpack-bootimg.pl recovery.img
*This will yield 2 files and 1 directory. You can delete the directory since we only need the files.
2.) Rename the kernel from the recovery.img-kernel.gz made from unpack-bootimg.pl to recovery.img-kernel.
3.) Create the recovery-new.img file using mkbootimg with the new MTD command embedded:
mkbootimg --cmdline 'no_console_suspend=1 console=null mtdparts=msm_nand:[email protected](misc),[email protected](recovery),[email protected](boot),[email protected](system),[email protected](cache),[email protected](userdata)' --kernel recovery.img-kernel --ramdisk recovery.img-ramdisk.cpio.gz -o recovery-new.img --base 0x20000000
*Note that the values for cache starting address, userdata starting address and userdata size have been changed to the newly calculated values in the previous step.
**This will yield recovery-new.img which will be used in the next steps.
D>Create a new boot.img file which uses the new values:
1.) Breakdown the boot.img file into it's kernel and ramdisk components using unpack-bootimg.pl:
.\unpack-bootimg.pl boot.img
*This will yield 2 files and 1 directory. You can delete the directory since we only need the files.
2.) Rename the kernel from the boot.img-kernel.gz made from unpack-bootimg.pl to boot.img-kernel.
3.) Create the boot-new.img file using mkbootimg with the new MTD command embedded:
mkbootimg --cmdline 'no_console_suspend=1 wire.search_count=5 mtdparts=msm_nand:[email protected](misc),[email protected](recovery),[email protected](boot),[email protected](system),[email protected](cache),[email protected](userdata)' --kernel boot.img-kernel --ramdisk boot.img-ramdisk.cpio.gz -o boot-new.img --base 0x20000000
*Note that the values for cache starting address, userdata starting address and userdata size have been changed to the newly calculated values in the previous step.
**This will yield boot-new.img which will be used in the next steps.
E>Flash the recovery-new.img:
1.) Boot into bootloader and use fastboot command to flash the new recovery:
fastboot flash recovery recovery-new.img
F>Make system operational:
1.) Boot into recovery mode.
2.) Erase everything (factory reset)
3.) Either:
- Flash the ROM you took the original boot.img from OR
- Restore the backup you made previously (this only works (or has been tested) on CWM 5.0.2)
4.) DO NOT REBOOT YET!!!
G>Flash modified boot.img:
1.) Use adb to reboot to bootloader directly from recovery: (this is for safety since if you boot from an unmodified boot.img you'll have to start from F again.
adb reboot bootloader
2.) Use fastboot to flash the new boot image:
fastboot flash boot boot-new.img
3.) You may restart normally.
For those who've read this far, everything above has been rendered obsolete! Here's an editor for the SPL itself for the partition sizes:
http://intersectraven.euroskank.com/tools/SPLHexEditor.exe
*Instructions are in dla5244's thread 2nd post.
Try it at your own risk though!
Credits:
dla5244 - for bringing S-OFF to our N1 even after a looong time since its release
Firerat - for the original patch idea
Lbcoder - for coming up with the idea in the Desire thread
Reserved!
(I'm learning to reserve now... )
2 Questions:
Is the userdata space where downloaded apps go?
why didn't you choose any other partition to transfer empty space from?
drzplaya1121 said:
2 Questions:
Is the userdata space where downloaded apps go?
why didn't you choose any other partition to transfer empty space from?
Click to expand...
Click to collapse
1.) Yes.
2.) This is a sample. If you want to transfer from system or to system from cache, this example will show you how to do so.
thank U. Now I have no need to buy a new phone because of constantly running out of memory
Does it mean that every time I flash a new kernel, the whole effort will go waste?
Also, can I use the same procedure for Amon RA recovery??
rjmohit said:
Does it mean that every time I flash a new rom (which obviously has a different boot.img), the whole effort will go waste?
Also, can I use the same procedure for Amon RA recovery??
Click to expand...
Click to collapse
For that you need to do only steps D, F and G. If you flash only a kernel which uses koush's anykernel updater, you don't need to do anything.
intersectRaven said:
For that you need to do only steps D, F and G. If you flash only a kernel which uses koush's anykernel updater, you don't need to do anything.
Click to expand...
Click to collapse
Thanks.
One more silly question
Will the following procedure work.
1. Flash any ROM.
2. Then flash the modified boot.img (which may not belong to that ROM).
3. Then optionally flash the desired kernel.
rjmohit said:
Thanks.
One more silly question
Will the following procedure work.
1. Flash any ROM.
2. Then flash the modified boot.img (which may not belong to that ROM).
3. Then optionally flash the desired kernel.
Click to expand...
Click to collapse
Yeah. That would work since you're replacing the kernel anyways. What's important is that the kernel is compatible with the ROM.
Well done IR cannot wait to resize my data partition..
Okay, I extracted the recovery.img file, now when I try to extract recovery.img-kernel.gz, it gives the following error: not in gzip format. Exactly same happens for boot.img. I tried extracting it with different extractors on windows and ubuntu, nothing worked. Pls help.
I don't like using MTD because over time you will notice lag. If your already using sd-ext then your data is basically not being used. And I believe that cache never gets past 50% usage. Just putting in my two cents
rjmohit said:
Okay, I extracted the recovery.img file, now when I try to extract recovery.img-kernel.gz, it gives the following error: not in gzip format. Exactly same happens for boot.img. I tried extracting it with different extractors on windows and ubuntu, nothing worked. Pls help.
Click to expand...
Click to collapse
That's odd. In my installation, it worked flawlessly. Were there no errors during the run of unpack?
blahbl4hblah said:
I don't like using MTD because over time you will notice lag. If your already using sd-ext then your data is basically not being used. And I believe that cache never gets past 50% usage. Just putting in my two cents
Click to expand...
Click to collapse
intersectRaven said:
That's odd. In my installation, it worked flawlessly. Were there no errors during the run of unpack?
Click to expand...
Click to collapse
Nope. No errors. :-/
rjmohit said:
Nope. No errors. :-/
Click to expand...
Click to collapse
Found the problem. It seems it was never compressed in the first place. Ark sees this and just copies the file without the .gz extension.
*Instructions edited accordingly.
I may sound a bit noobish, but I'm facing one more hindrance:
How exactly do I run the mkbootimg file in the ubuntu terminal? I mean, can you give me the exact syntax?
I was facing a similar problem with the perl script, but then I found a solution on google, but didnt find anything for the mkbootimg. Can I run it under windows cmd?
rjmohit said:
I may sound a bit noobish, but I'm facing one more hindrance:
How exactly do I run the mkbootimg file in the ubuntu terminal? I mean, can you give me the exact syntax?
I was facing a similar problem with the perl script, but then I found a solution on google, but didnt find anything for the mkbootimg. Can I run it under windows cmd?
Click to expand...
Click to collapse
I already posted the syntax in the instructions. You just need to make sure the mkbootimg file has execute permissions in order for it to run.
Updated OP with SPL editor program.
intersectRaven said:
Updated OP with SPL editor program.
Click to expand...
Click to collapse
I tried your program. Everything worked fine. Just that my /cache now shows 290 MB free, while I had resized it to 20 MB!! Is that a bug? /system & /data show proper sizes though. thanks.
rjmohit said:
I tried your program. Everything worked fine. Just that my /cache now shows 290 MB free, while I had resized it to 20 MB!! Is that a bug? /system & /data show proper sizes though. thanks.
Click to expand...
Click to collapse
Is it the display on the program or display on the Android device when booted?
Wait, I found it. It's a bug. Thanks! I'll edit it when I get home. For now, please double check the values by reopening the made file before flashing. If the values are incorrect, please DON'T FLASH!!!
Hi,
can anyone point me to any 7.0 OTA Location I can download it from? Especially for the RETEU branch, because I messed up some flashing and need the Modem, BT, etc. firmware files to reflash them.
The files in urgent need are:
NON-HLOS.bin
fsg.mbn
BTFM.bin
adspso.bin
boot.img
oem.img
NVM. Fixed the issue by myself!
I need them too!
Issue fixed
where did you get them?
You can get them yourself with a php script [1] or curl command.
(You may also want to look at this thread by @erfanoabdi: [TOOL] Motorola OTA Link Generator Tool)
For cenvenience, he hosted this as a web page:
http://motorola.erfanabdi.ir/
Enter the details of your device and current os exactly as reported by "fastboot getprop all", device=XT1650 (not XT1650-03).
e.g.
Model: XT1650
Software Version: Blur_Version.24.21.46.griffin.retail.en.US
Carrier: reteu
==> These entries then produce this link:
http://motorola.erfanabdi.ir/?model=XT1650&sv=Blur_Version.24.21.46.griffin.retail.en.US&carrier=reteu
You will get OTA updates from there on that you have to install sequentially. (Download, then scroll down and get the next OTA..)
If you found this useful, go to @erfanoabdi's thread [2] an press on 'thanks' ...
[1] @erfanoabdi's source code on Github: Motorola-OTA-Link-Generator-Tool
[2] @erfanoabdi's xda thread: [TOOL] Motorola OTA Link Generator Tool
nevermind
I've bricked radio/modem in my ZUK Z2 pro by hidden settings and „Set GSM/UMTS band” to USA band (only choice)
I live in Europe. I am a quite advanced user, I always root every phone.
Android Google play offered me to install an app „hidden settings”. I did.
There was a select radio band option. I clicked it just to check. In old MTK phones in engineering mode there were a list, like this http://www.cellphonemic.com/image/cache/data/B9500-band-500x500.jpg
But in new ZUK Z2 pro with android 6 there was a choice of USA band (only choice).
Something like this
http://attach.en.miui.com/forum/201608/23/031335orzj1vxxar1vymvm.png.thumb.jpg
It affected only the first SIM slot. Now my first SIM cannot connect - cannot send/receive calls and cannot send SMS. Changing to 3G and 2G gives me a no service. Changing to 4G gives me connection but only data works, cannot call, cannot send a SMS.
Many people have this problem after „Set GSM/UMTS band” to USA band (only choice). This is not a ZUK Z2 problem but Android settings problem.
IT'S STUPID that it could be undone. In OLD android there were a list:
"Automatic", "EURO Band", "USA Band", "JAPAN Band", "AUS Band", "AUS2 Band"
Method:
start an adb shell
type:
am start -n com.android.settings/.BandMode
works.
In new android there is only one entry "USA band".
I know people tried many things.
“Factory reset but that didn't help.”
“I did factory reset and nothing, I installed the factory image and either. “
I did for instance:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1
Restart. No result.
It's very frustrating that the software will not allow me to reverse what he did.
Problem probably is here:
https://android.googlesource.com/pl....0_r26/src/com/android/settings/BandMode.java
Many people on many forums described this on many different phones and there is no solution.
One guy mentioned:
“Switch the phone to FLIGHT/AIRPLANE MODE (I did this by dragging down the top menu bar on my phone which is running a custom rom)
Press the menu key and SELECT RADIO BAND - you'll see the complete list of country bands - do NOT select a band yet....”
but it does NOT work for zuk z2 pro.
Zuk Z2 pro is no alone. One said: “Tks 4 ur guide !” but another “I try your trick,but not work in my device.”
One guy (Bitdomo's) made a custom rom for “nexus 5x” - instead of querying the baseband for available band modes just displays all six band modes. People were happy. “I flashed your ROM and then Phone Information had Auto in select band using which I switched back to GSM.”
https://img.xda-cdn.com/Lpw6Ao9fHG6...es.hu/151126/ffsafas_www.kepfeltoltes.hu_.png
or “ I resolved the problem by flashing Bidomo's ROM”.
But I don't have Nexus 5, I have Zuk Z2 pro.
So the only solution to change baseband is changing the source code of BandMode.java, compile and flash my own rom in the Zuk Z2 pro ?
Not cool Google.
There is probably also a second option:
“Well guys, if anyone else is having this problem now, there is an easier method. You can just restore your efs backup. Yes it's for root users only, but if you have it, it's as easy as rebooting to twrp and restoring efs then reboot without wiping anything.
Btw I have really no idea why google didn't implement an auto band option...”
But I don't have EFS backup...
some said:
“i just flash radio .img solved.”
I don't have radio.img for Zuk Z2 pro
Probably this setting has changed just a byte in a configuration. Does anybody have any idea where could it be ? Or any idea how to fix this baseband ?
Please help.
PS Fortunately second SIM card in my Zuk Z2 pro works. Strange, heh?
Problem SOLVED, but crazy.
As I mentioned I ****ed up my sim1 network when I clicked hidden settings (also can be reach by *#*#4636#*#*) and „Set GSM/UMTS band” to USA band (only choice in ZUK Z2 pro). Then my first sim1 could not call/send sms. Sim2 worked ok.
Even
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1
and restart had had no result.
My baseband was:
#> getprop | grep -i baseba
[gsm.version.baseband]: [.2.0.c1.9-00026-M8996FAAAANAZM-1]
[gsm.version.baseband1]: [.2.0.c1.9-00026-M8996FAAAANAZM-1
I downloaded
https://drive.google.com/drive/folders/0B_e7IyAKmSLcTE0wdXcxdDhFb2c?usp=sharing
the same
filename: zuk_z2_baseband_2.0.079.zip
Baseband version: .2.0.c1.9-00026-M8996FAAAANAZM-1
supported Android version: 6.x/7.x
mentioned here https://zukfans.eu/community/threads/zuk-z2-baseband-collection-versions.4565/
There was a file
bytes 81568256 name NON-HLOS.bin
This is for ZUK z2, I have "zuk z2 pro" version but someone says it is the same.
The version match I hope.
But before I flashed it I made a backup of my modem by
# ls -l /dev/block/bootdevice/by-name/ | grep modem
lrwxrwxrwx 1 root root 16 Sep 28 1970 modem -> /dev/block/sde11
lrwxrwxrwx 1 root root 15 Sep 28 1970 modemst1 -> /dev/block/sdf1
lrwxrwxrwx 1 root root 15 Sep 28 1970 modemst2 -> /dev/block/sdf2
# dd if=/dev/block/sde11 of=/storage/emulated/0/DCIM/Camera/NON-HLOS-my.bin
194560+0 records in
194560+0 records out
99614720 bytes (95.0MB) copied, 1.575881 seconds, 60.3MB/s
and then I copied NON-HLOS-my.bin by android ftp server to my local computer disk. It was REALLY IMPORTANT !
I flashed
adb reboot bootloader
fastboot -i 0x2b4c flash modem non-hlos.bin
fastboot -i 0x2b4c erase modemst1
fastboot -i 0x2b4c erase modemst2
fastboot -i 0x2b4c reboot
(*) non-hlos was from
zuk_z2_baseband_2.0.079.zip
Baseband version: .2.0.c1.9-00026-M8996FAAAANAZM-1
After reboot I had neither cell network or wifi network !!!
Again erasing:
adb reboot bootloader
fastboot -i 0x2b4c erase modemst1
fastboot -i 0x2b4c erase modemst2
fastboot -i 0x2b4c reboot
The same
No wifi ! no sim 1, no sim2 !!!
**** I said.
So fortunately I had a backup.
So
adb reboot bootloader
fastboot -i 0x2b4c flash modem NON-HLOS-my.bin
fastboot -i 0x2b4c erase modemst1
fastboot -i 0x2b4c erase modemst2
fastboot -i 0x2b4c reboot
My wifi network and sim2 network were back, but not only ! Crazy thing, but my sim1 started working again !
Crazy heh ?
Probably this new NON-HLOS.bin which didn't work wrote something in the configuration and after re-flashed NON-HLOS-my.bin again it was able to went away from this stupid USA band and refreshed.
After this: sim1 and sim2 work again. Both can see GSM/3G, I can call/send sms by both.
SOLVED !
I have same problem with my new Lenovo legion pro 2 phone what steps would I have to change
I did look at suggested threads and nothing seemed to be answered not using just ADB with root provided by TWRP, everything was using TWRP recovery UI
I have a LeEco Le S3 (X522) running stock
Code:
Android Version: 6.0.1
EUI Version: 5.8.018S (Stable)
Build: IFXNAOP5801810091S release-keys
but I feel this is irrelevant as this is a general question.
What I have done so far.
Code:
cat proc/partitions
and backed up the output using just
Code:
> sdcard/<name_of_command_&_args>
same for
Code:
df
and
Code:
mount
and finally
Code:
ls dev/block/xxx/byname
you can see the output of those here /anonymous/5a2bb0a231a58b8842036bb5c82d016a gist on github
and then I used DD to backup partitions to IMGs on sdcard/ for aboot, boot, misc, sbl1, recovery and system (I also used TWRP to do the same to just cover it)
then copied those images and backups off using adb pull, is that all I need to do to recover to stock,
aka am I missing anything? partition table perhaps in case that gets stuffed up too?
I need help to root my Aligator S5065 Duo phone. It ha Andoid 7.0 and the chipset is Mediatek MT6580.
Here is some info from the phone:
BB Chip : mt6580
MS Board. : ALIGATORS5065
Build Time : Tue Jan 23 15:35:41 CST 2018
Krenel Ver. : 3.18.35+ ([email protected]) (gcc version 4.8 (GCC)) #2 SMP PREEMPT Tue Jan 23 16:11:14 CST 2018
Android Ver. : 7.0
SW Ver. : alps-mp-n0.mp2-V1-droi6580.weg.n
Custom Build Verno. : unknown
IMEI1 : XXX
IMEI2 : XXX
Modem Ver. ALIGATOR_S5065_OS_1.1_2018 0123
Bar code : 010901MT000000000000003891_155648
The idea was:
1) make a full backup using MTK Droid Tool
2) flash TWRP using SP Flash Tool
3) boot TWRP and install Magisk
Problems:
1) MTK Droid Tool v2.5.3. doesn't support this chipset and I didn't found a newer version - so no full backup
I've tried to download a stock ROM or a full backup.
I have found MT6580__ALIGATOR__ALIGATOR_S5065__alps-mp-n0.mp2-V1_droi6580.weg.n__Android_7.0.ispff but it seems to need Infinity CM2 Dongle for flashing, which I don't own.
I have also found ALIGATOR S5065 – 7.0_MT6580_WL581M.LG.ALIG.HB.N.F.S12.B18.0927.V3.02_OS_1.1_20170927.zip which seems to be usable but not exactly the same as I have in my phone, at least it contains a scatter file. With the help of this scatter file I have I've read back my phone but the read imgs are considerably bigger, than the original ones in the zip - that doesn't seem right?
2) I have downloaded TWRP_3.2.3-0_20180803_UNOFFICIAL_MT6580_N.zip which should be a TWRP recovery for my chipset and the same kernel version, so I hoped it could work. But when trying to flash it with SP Flash Tool I get "PMT changed for the ROM" error message. The suggested solution for this error seem to be very risky (formating the phone, atc.), so I didn't dare to try ...
Now I'm stuck and I don't know how to proceed.
Any help would be really appreciated
Some progress:
I got a custom TWRP recovery image from Matty1993 <- thank you very much
I flashed it using adb and fastboot:
adb devices - successfully listed my device
adb reboot bootloader
fastboot flash recovery c:\adb\recovery.img - got this error message: "FAILED (remote: 'not allowedin locked state')"
Locked bootloader, unlocking ...
fastboot flashing unlock
- (bootloader) Start unlock flow
- OKAY [ 18.800s]
- Finished. Total time: 18.816s
Flashing the recovery.img
fastboot flash recovery c:\adb\recovery.img
Sending 'recovery' (10226 KB) OKAY [ 0.359s]
Writing 'recovery' OKAY [ 0.640s]
Finished. Total time: 1.030s
Success
fastboot reboot-bootloader
Rebooting into bootloader OKAY [ 0.000s]
Finished. Total time: 0.016s
fastboot erase cache (I don't know if it was a good idea but it was in the tutorial, I was following)
******** Did you mean to fastboot format this ext4 partition?
Erasing 'cache' OKAY [ 0.109s]
Finished. Total time: 0.125s
fastboot reboot
Rebooting OKAY [ 0.000s]
Finished. Total time: 0.016s
Now when booting the phone complains:
Orange state
Your device has been unlocked and can't be trusted
Your device will boot in 5 seconds
In 5 second it starts to boot but it stays forever on the "POWERED BY android" logo
I can boot to TWRP recovery (also fastboot), so I did and flashed magisk (because the main goal was to root my phone) and selected to delete cache/dalvik.
I'm not able to switch off the phone, it reboots. I had tu pull the battery (luckily it's removable).
The phone info changed
BB Chip : mt6580
MS Board. : ALIGATORS5065
Build Time : Tue Jan 23 15:35:41 CST 2018
Krenel Ver. : 3.18.35+ ([email protected]) (gcc version 4.8 (GCC)) #2 SMP PREEMPT Tue Jan 23 16:11:14 CST 2018
Android Ver. : 7.0
SW Ver. : alps-mp-n0.mp2-V1-droi6580.weg.n
Custom Build Verno. : unknown
IMEI1 : unknown
IMEI2 : unknown
Modem Ver. ALIGATOR_S5065_OS_1.1_2018 0123
Bar code : unknown
The IMEIs and Bar code are now "uknown".
What did I wrong and what to do, to fix it?
forget MTK Droid Tool it is outdated and does not support scatter for devices > 4 GB. you can use SP Flash Tool for full ROM dump. First thing you should do is backup your nvram partition, hopefully it is not too late...
https://www.getdroidtips.com/backup-restore-imei-nvram-data-mediatek
If you already have backup of stock boot.img:
- copy file to /external_sd/TWRP/BACKUPS folder
- rename it to boot.emmc.win
- create a backup of current boot (just in case)
- restore renamed stock boot.emmc.win from TWRP
regarding boot stuck:
- Format Data and Wipe Cache from TWRP, reboot recovery, wipe again (Wipe -> Format Data -> type yes)
- reboot TWRP, check if /system /data and /cache is mounted/mountable (you should see folders or files inside)
- reboot system and wait 5 minutes, first boot may take a while because the data partition is forced encrypt
- if android is completely booted, check IMEI
Now, if your device is in good condition, reboot recovery and make a full TWRP backup.
Thank you very much for your help.
I did a dump before, using the SP Flash Tool and the scatter from the downloaded ALIGATOR S5065 – 7.0_MT6580_WL581M.LG.ALIG.HB.N.F.S12.B18.0927.V3.0 2_OS_1.1_20170927.zip file.
So I have a sort of a "backup"
Now I'm going to read and I'll report back how it went.
blakegriplingph said:
NVRAM data must have been wiped off somehow, as that's one reason as to why your serial numbers have gone kaput.
Click to expand...
Click to collapse
If this is the case, you can "download" (=flash) your backup files from SP Flash Tool. In scatter file change entries to "is_download: true". Open the edited scatter file with SP Flash Tool. Make sure you uncheck all checkboxes, except nvram, nvdata (and cache, if you still have problems with this partition). Double click on file name and select the file for each partition. Make sure EMMC_USER is selected. The file sizes must fit partition size. Do NEVER flash PRELOADER! Press start, then connect phone, then insert battery.
nvram.bin 5120 KiB (0x00500000)
nvdata.bin 32768 KiB (0x02000000)
cache.img 409600 KiB (0x19000000)
If done, hold Volume Up key while unplug + plug in USB cable, this will boot into recovery. Wipe Cache and Data
My sizes of the backup files:
nvram.bin 5 242 880 seems OK
nvdata.bin 33 554 432 seems OK
cache.img 419 430 400 bigger
Is there a way I can check the integrity of them before flashing?
And what when I get the "PMT changed for the ROM" error message?
I've attached the used scatter file
Should be fine if you use same scatter file used for read back. If you got "PMT changed" (probably wrong scatter file), you must restore all partitions (except preloader) with the exactly same scatter file you have created your backup. Then your phone should be restored to its original state no matter if scatter file was wrong. Once you get your phone in good condition, you can create your own scatter file with current partition layout from WwR MTK v2.30
Matty1993 said:
All good mate yeah orange state is because you unlocked bootloader and didnt factory reset [...]
If you still get dramas with orange state let me know ill manually patch the dm-verity out of your boot.img for you
Click to expand...
Click to collapse
Orange state just mean unlocked bootloader, you can't get rid of. Do not lock the bootloader again, just leave it orange state is fine...
I thought so and it doesn't really bother me
Matty1993 said:
Your device comes with out of the box encryption in your boot.img fstab your system path will be /dev/block/platform/mtk-msdc/******/msdc/by-name/system /system ext4 ro wait, "verify"
Click to expand...
Click to collapse
Zdendav said:
I did all the steps:
- wipe, format
- factory reset
hangs on the "POWERED BY android" logo, when trying to boot
- flashed boot.img in fastboot
- reboot
I was not fast enough to go onto TWRP, it tried to boot, hangs on the "POWERED BY android" logo
-reboot into TWRP
- wipe, format
- factory reset
still hangs on the "POWERED BY android" logo, when trying to boot
I can borrow exactly the same phone from a relative (fully working) - maybe I should do a full backup of it, then I'll have "clean" images of boot, recovery etc.
Meanwhile I did another full backup and this time I used WwR MTK v2.30 to create a correct scatter.
I attach both scatter files.
Click to expand...
Click to collapse
as @Matty1993 already figured out, your phone seems fine, just dm-verity prevents to boot because of recovery checksum mismatch. You have to disable dm-verity.
Install Disable_Dm-Verity_ForceEncrypt.zip from TWRP. This will patch your boot.img and modify fstab entries. Format Data, then use "Copy Log" option and upload recovery.log here
aIecxs said:
Should be fine if you use same scatter file used for read back. If you got "PMT changed" (probably wrong scatter file), you must restore all partitions (except preloader) with the exactly same scatter file you have created your backup. Then your phone should be restored to its original state no matter if scatter file was wrong. Once you get your phone in good condition, you can create your own scatter file with current partition layout from WwR MTK v2.30
Click to expand...
Click to collapse
I did try and I got the "PMT changed" even when I selected all partitons except preloader ..
I did borrow exactly the same phone from a relative and created a full backup and from it a proper scatter file. I compared both scatter files and there are differences (as expected)
I attach both scatter files
I don't know how to proceed.
1) Lock the bootloader?
2) Flash parts from the borrowed phone? Which parts?
PS I have also a backup of userdata taken in factory mode.
don't flash anything with SP flash tool, just see my previous post. boot + recovery + nvram are identical, but tee1 + tee2 + teeinfo missing, and metadata + userdata have different size. keep the backup created with scatter file from WwR_MTK this seems to be the right one
aIecxs said:
Install Disable_Dm-Verity_ForceEncrypt.zip from TWRP. This will patch your boot.img and modify fstab entries. Format Data, then use "Copy Log" option and upload recovery.log here
Click to expand...
Click to collapse
Done. Did it all in one go (without any reboot), then powered off.
Log is attached
aIecxs said:
don't flash anything with SP flash tool, just see my previous post. boot + recovery + nvram are identical, but tee1 + tee2 + teeinfo missing, and metadata + userdata have different size. keep the backup created with scatter file from WwR_MTK this seems to be the right one
Click to expand...
Click to collapse
Sorry I missed your post until I posted mine ...
I'll keep all backups until it's sorted out.
And thank you very much aIecxs and Matty1993 for all your help
thanks for the log. seems there is something wrong, maybe with TWRP or maybe with phone.
Code:
E:Primary block device '/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/userdata' for mount point '/data' is not present!
Failed to mount '/cache' (Invalid argument)
Error installing zip file '/external_sd/Disable_Dm-Verity_ForceEncrypt_04.03.19.zip'
Flash stock boot.img and stock recovery.img from fastboot. reboot into stock recovery. Wipe Data + Cache. reboot to bootloader. boot into TWRP from fastboot. copy log to sdcard and upload again. reboot your phone and wait 5 minutes.
I flashed the stock recovery and boot in fastboot in one go.
Then rebooted to recovery but there is only "Supported API: 3" in the lower left corner of the display and that's all.
What to do next?
Edit: It's even worse, I'm not able to enter fastboot, recovery etc., the phone doesn't react to the volume button and always show the orange message a boot to the Supported API: 3 screen.
This indicates something is wrong with cache partition. Usually a normal system boot from stock boot.img will fix this. If you can't enter fastboot mode, flash recovery from SP Flash Tool. Try this version it has changed fstab. This should fix the /data mount. Then you should be able to enter fastboot again.
Code:
[strike]/data ext4 /dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/userdata flags=encryptable=/dev/block/platform/mtk-msdc.0/by-name/metadata[/strike]
/data ext4 /dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/userdata flags=encryptable=/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/metadata
Regarding /cache try following from fastboot:
Code:
fastboot format:ext4 cache
after this wipe cache again from stock recovery (you can boot stock recovery from fastboot without flashing it). if cache still not mounted in TWRP, your only choice left is flash backup of cache partition from your friends phone from SP Flash Tool
edit: attachment deleted
Flashed your recovery, now it always boots into twrp, volume buttons still seem to not work, I'm still not able to enter fastboot.
Edit: I was able to enter fastboot by "adb reboot bootloader" when in TWRP, strangely "adb reboot fastboot" booted into TWRP.
I formatted the cache, rebooted into stock recovery, formatted the cache again.
Rebooted into TWRP, in file manager the cache is empty, in the mount menu I'm not able to tick any of the listed partitions to mount it ...
I'm not able to post the new log, it copies it to /data/media but in the file manager the location is empty ...
i have added some mount points, please download and flash again. you can copy recovery.log from adb
Code:
adb pull /tmp/recovery.log C:\adb\recovery.log
please post output of df and mount
Code:
adb shell
mount
busybox df -aT
/ # mount
rootfs on / type rootfs (rw,seclabel)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
/ # busybox df -aT
Filesystem Type 1K-blocks Used Available Use% Mounted on
tmpfs tmpfs 463204 44 463160 0% /dev
devpts devpts 0 0 0 0% /dev/pts
proc proc 0 0 0 0% /proc
sysfs sysfs 0 0 0 0% /sys
selinuxfs selinuxfs 0 0 0 0% /sys/fs/selinux
tmpfs tmpfs 463204 32 463172 0% /tmp
adb functionfs 0 0 0 0% /dev/usb-ffs/adb