Hovatek Forum MOBILE Android Spflashtool author & how to flash LG X150 (LG Bello 2)?
Can't login? Please, reset your password.
Hovatek is recruiting! Apply Now


Spflashtool author & how to flash LG X150 (LG Bello 2)?

Spflashtool author & how to flash LG X150 (LG Bello 2)?

Pages (4): Previous 1 2 3 4 Next
nijazxp
nijazxp
nijazxp
Techie Member
55
19-12-2017, 08:52 PM
#11



Wow, 1st time that I hear for that stuff. When I used that preloader with my files, scatter loaded properly. Then same error message appeared as for using their preloader with my files, so i followed that guide and used spflashtool 5.1532 (weird, higher numbers means older version?), it succesfully flashed all files. I was almost happy...

Then now it bootloops. After logo and sound, it restarts. Then I flashed to their preloader only, while keeping rest intact, then it bootloops only little later, when saying optimizing apps - your android is upgrading, 5 of 113 or 19 of 113...

I tried full reset using recovery (removing data and cache), still same. Can you fix that?

If I could somehow use your preloader for working scatter, but flash my preloader which is original. I already tried loading your preloader for making scatter work, then switching it with my preloader but then whole tool closes after pressing flash.
Also, if size is not supposed to be so large, then why mtk droid tool made scatter with that adresses?

Could this problem be system partition related? The main reason why i wanted to flash my original lg x155 is because i touched system apps like google play, which prevented me from using phone after i made factory reset, wizard could not complete its process saying "android keyboard (aosp) stopped working" and "gapps stopped working", so i decided to pick up original files from similar phones (according to some info they are same phones, just different variants or countries, like one is indian, one european etc). But that problem somehow allowed me to start wizard (first time setup), but now i do not come to that point...

Never succeeded opening any img file on pc.

I will now try to flash downloaded system partition only, while leaving rest untouched, to see if its system partition file or bootloader problem.
Didn't work. LG logo frozen, doesn't even restart.
I think its bootloader problem only. And I can't understand why preloader file should not be sam as written size in scatter?
This post was last modified: 20-12-2017, 02:47 AM by nijazxp.
ColinB
ColinB
ColinB
Enthusiastic Member
14
19-12-2017, 10:27 PM
#12
Windows 10 & Miracle Box.

This is the driver that worked for me
.png
MTK_VCOM_Working.PNG
Size: 21.42 KB / Downloads: 10

.png
Miracle_Box_Windows10_64_Bit_00.PNG
Size: 299.79 KB / Downloads: 8
hovatek
hovatek
hovatek
Administrator
49,570
20-12-2017, 11:06 AM
#13
(19-12-2017, 04:10 PM)nijazxp Somebody said preloader is needed even when we only want to flash some other, one only file, like system.img. Bootloader needs to be present.

This is false for SP Flash tool but often true for Miracle Box. You should only flash the preloader when the phone is totally dead (no sign of life) or for tools like Miracle Box that insist.
Do a full dump (ROM_0) as explained at https://www.hovatek.com/forum/thread-526.html instead of one file at a time then process the ROM_0 using MTK Droid tools.
This kind often skips preloader.bin but lets see the outcome first.

Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.
nijazxp
nijazxp
nijazxp
Techie Member
55
21-12-2017, 08:07 PM
#14
No, I mean preloader is needed to be present there, not flashed. Scatter file also, of course. Or no readback can occur.

OK, I almost solved my problems. Now I tried backing up whole rom (up to bmtpool) using spflashtool and processing it with mtk droid tool. It's OK. I observed only preloader gets "cleaned" while all other files are intact, just like they are backed up one by one with spflashtool.

I renamed all my wrongly named files to proper names, as shown in mtk droid tool. And I processed my preloader just like i processed whole rom, and it got cleaned. It's few kB different than the one you sent me.

But bootloop occurs. Now I analyzed things in more detail. Here is what I observed.

When I flash all my files, bootloop occurs (actually 1st time phone power ups it appears during logo animation, but second time and onwards it appears during "system is upgrading" for example app 7 of 123...). So I think problem is only in system partition (system.img). That was original reason why I touched my original lg x150, because i changed some system apk files (updated them to last version) but look i should not have touched them. I integrated updates to apps to system partition using lucky patcher. Apps like Google, Google Play Store, and few more... But weird thing is that last time i fully reset my phone before touching it with flash tools, it was able to power up and i was able to skip first time setup with some difficulties. It was popping up "aosp stopped working" and "gapps force closed"... Now it's worse, but it's supposed to be same as before. I do not know why it isn't.

When I run integrity root check, results are: 366 new files, 46 lost files, 10 modified files. Also I collected whole root check log when my phone still worked and i know exactly which files, they are few apks and odexes. So I copied these original files from lg x160.

My idea to solve this problem was to just replace these few files, when phone powers up with those difficulties, but now it doesnt power up up to home screen. So I extracted whole firmware using mtk extractor 2.6.3 and replaced those files and repacked to system.img. BUT THE BIGGEST PROBLEM IS THAT THE SYSTEM.IMG SIZE IS NOT SAME, IT IS SMALLER. That happend even when I select 1800 MB in that app, seems button just doesnt function. Regardless of button data or slider position, firmware is almost always the same size when repacked. Will creating dummy files, or copying already present ones in some folder up to 1800 MB exactly fix problem? Or whole structure has to be somehow same? Which app to use? Can I mount it to some linux or android emulator as some different partition and do it there?

When I flash lg x160 system-sign.img while keeping all other untouched (original lgx150), it works. But I don't wanna x160 system.img.
When I readback that working lg x160 system partition to system.img, and flash it it works again (i mean when it's no longer system-sign.img). Good.

But when I read system.img( i now made of lg x160 which works) using mtk extractor, and repack it, while not changing anything, and flash it it doesn't work! Looks like problem is in mtk extractor. I used option for android 4, while I have android 5. But under option for android 5 it only has option system.new.dat, list file, file contexts. I do not know what that means. Could that be problem?

Oh, and root integrity check is able to read system files when repacked using mtk extractor. But phone doesn't start. It auto restarts to recovery or freezes or keeps restarting...

Can I somehow mount system.img in linux or android or android emulator and modify these few files there without changing system.img file size? Help! Here's app i used.
I just need to change some files, which i already prepared for replacement/copying. I need to keep partition intact. Just like when viewing system folder using x-plore or any other file manager on android.

And we can finally conclude: all my other flash files are OK, they are not problem. Only few files in system.img. When I was renaming improperly named files I verified file size with ones mtk droid tool made, and they are same, OK. Another evidence that system.img is only problem, is that lg x160 system works when i use all other partitions (flash files) of lg x150.

And one more thing i observed is that spflashtool 5.15.32 can't flash -sign files. It can flash, but then phone wont power app. -sign support was only added in spflashtool apps versions that have auth file option. Reverse is also true, but at least error message is shown in that case "no sign header" for which i now have the solution as written in your guide.

Good conclusion. Learned a lot of new stuff.

UPDATE (few hours later):

I found app called Passmark OSFMount. It can mount, read, edit, write ext4 and all many partitions on windows. Works! Can also modify partition size.
So now I added those files from my lgx160 to put back missing files, in hope they will be same or at least work on my system.

previous results: 366 new files, 46 lost files, 10 modified files
new results: 366 new files, 0 missing files, 28 modified files
Much better!

New files are not complicated problem, just delete them, only possible harm could be that files for root (like su...) won't work so phone will be unrooted more or less.
But I can easily reroot or backup files somewhere...no problem!

I analyzed these 28 modified files, they are: 26 *.odex files, app_process32, boot.oat. Luckily we all know what are odex files, they are kind of java or jar file found in apk files.
Luckily apks are original, so i could extract them from there. Or make lucky patcher do that on working phone or emulator, it has option "make odex".
Now I am not worried about app_process32, boot.oat. Because I know I did not modify them just before or after bricking phone. Maybe they are modified by rooting, whoever rooted this phone before. But they are not cause of bootloop. Conclusion: it's all about odex files, correct?

My system partition is definitely readable on windows on this app for reading files, and in recovery in android.
Probably when phone still worked with difficulties I copied few lgx160 odex files with some leftover original or updated system apps....whatever i did.
But odex file has to be of that app!!! Not of another app or another app version. Maybe that is problem. That's why phone can't run even any system app after boot...because odex in apk and outside is not same...odex is not of that apps.

Or I could simply remove all odexes, correct? I heard this only slows down booting, but apps will still work. Then later when phone works, remake them using lucky patcher if i want to (not a must).

It must be only odex problem, correct? What else could be? Everything else is OK!
At this moment phone is not working, but I hope it will when i do that.

And best of all, my recovery root integrity check log says that my other partitions are original and OK:

uboot NORMAL check Pass
uboot ADVANCE check Pass
bootimg NORMAL check Pass
bootimg ADVANCE check Pass
recoveryimg NORMAL check Pass
recoveryimg ADVANCE check Pass
logo NORMAL check Pass
logo ADVANCE check Pass
System check FAIL!!

I collected this log from cache partition after running that test in recovery: cache/recovery/last_log.1
You can see my log in attachments. Results are at the end of file! You can count all result by searching for repetative patterns, and pressing count option in notepad++...

And this interesting information is found in that log file, which confirms that these 3 phones are more or less the same:
ro.MTP.name=LG Bello II
ro.MTP.BZ_CH_name=LG Prime II
ro.MTP.MX_ID_CIS_name=LG Max
This post was last modified: 22-12-2017, 03:50 AM by nijazxp.
ALBA
ALBA
ALBA
Senior Member
550
22-12-2017, 11:25 AM
#15



(19-12-2017, 08:52 PM)nijazxp Wow, 1st time that I hear for that stuff. When I used that preloader with my files, scatter loaded properly. Then same error message appeared as for using their preloader with my files, so i followed that guide and used spflashtool 5.1532 (weird, higher numbers means older version?), it succesfully flashed all files. I was almost happy...

Then now it bootloops. After logo and sound, it restarts. Then I flashed to their preloader only, while keeping rest intact, then it bootloops only little later, when saying optimizing apps - your android is upgrading, 5 of 113 or 19 of 113...

I tried full reset using recovery (removing data and cache), still same. Can you fix that?

If I could somehow use your preloader for working scatter, but flash my preloader which is original. I already tried loading your preloader for making scatter work, then switching it with my preloader but then whole tool closes after pressing flash.
Also, if size is not supposed to be so large, then why mtk droid tool made scatter with that adresses?

Could this problem be system partition related? The main reason why i wanted to flash my original lg x155 is because i touched system apps like google play, which prevented me from using phone after i made factory reset, wizard could not complete its process saying "android keyboard (aosp) stopped working" and "gapps stopped working", so i decided to pick up original files from similar phones (according to some info they are same phones, just different variants or countries, like one is indian, one european etc). But that problem somehow allowed me to start wizard (first time setup), but now i do not come to that point...

Never succeeded opening any img file on pc.

I will now try to flash downloaded system partition only, while leaving rest untouched, to see if its system partition file or bootloader problem.
Didn't work. LG logo frozen, doesn't even restart.
I think its bootloader problem only. And I can't understand why preloader file should not be sam as written size in scatter?

You have to leave it for Optimizing to finish upgrading.. please be patient when handling Android device or else you will end up with totally brick device
nijazxp
nijazxp
nijazxp
Techie Member
55
22-12-2017, 02:23 PM
#16
(22-12-2017, 11:25 AM)ALBA You have to leave it for Optimizing to finish upgrading.. please be patient when handling Android device or else you will end up with totally brick device

No, tried it for an hour, even with full wipe of /data and /cache using recovery. It starts up, waits 10 sec, and resets, and forever. That doesn't happen with lg x160 system.img flash file, but only with my. I believe odex files of my system apps are not appropriate (original). I messed it up.

So here's what I tried. I removed all odex files last night so that now I have only that files missing, and 2 system files modified, and many added, and it still doesn't work. Now I am gonna try to manually extract odex files of these system apps and put them in place (rename etc). Hope their hash will be original one.

And for those of you who want to mount ext4 on windows 10 for example, and modify files there. You actually need 2 apps.
1. PassMark OSF Mount
2. ext2fsd
You just install, but do not use the second one, because it provides driver for viewing ext4, or your windows will not recognise and will ask you to format mounted img. Make sure you put driver to auto start and all 3 options in setup enabled.

PassMark OSF Mount actually comes as OSF (os forensics) package, and is part of it, comes as Mount Drive Image option, in Start (on left side), Housekeeping when you scroll down.

Or you can just use first app and use some linux os on virtualbox and mount that mounted unrecognised drive in Windows, in linux os.

Here is pic.
This post was last modified: 22-12-2017, 02:29 PM by nijazxp.
hovatek
hovatek
hovatek
Administrator
49,570
22-12-2017, 06:58 PM
#17
(21-12-2017, 08:07 PM)nijazxp No, I mean preloader is needed to be present there, not flashed. Scatter file also, of course. Or no readback can occur.

This is false

Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.
nijazxp
nijazxp
nijazxp
Techie Member
55
22-12-2017, 07:17 PM
#18
(22-12-2017, 06:58 PM)hovatek
(21-12-2017, 08:07 PM)nijazxp No, I mean preloader is needed to be present there, not flashed. Scatter file also, of course. Or no readback can occur.

This is false

No, it's true unfortunately. Just tested it.  Sad
If no scatter is loaded then it says: "Pleas load a scatter file before execution".
Then in help it says: "The scatter file need be load before you can do download, format, read back and other operation."
If scatter is loaded but preloader not found, scatter is not properly loaded, and message: "S_DL_GET_DRAM_SETTING_FAIL" "[EMI] Obtain DRAM Failed!"

Dodgy
hovatek
hovatek
hovatek
Administrator
49,570
22-12-2017, 07:35 PM
#19
(22-12-2017, 07:17 PM)nijazxp No, it's true unfortunately. Just tested it.  Sad
If no scatter is loaded then it says: "Pleas load a scatter file before execution".
Then in help it says: "The scatter file need be load before you can do download, format, read back and other operation."
If scatter is loaded but preloader not found, scatter is not properly loaded, and message: "S_DL_GET_DRAM_SETTING_FAIL" "[EMI] Obtain DRAM Failed!"

Dodgy

So you're saying one can't do an SP flash tool readback without a preloader.bin present?
As for your /system , it seems to have been modified before the dump so getting it to pass integrity test might be......
Anyway, instead of deleting odex files, why not deodex the system.img?

Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.
nijazxp
nijazxp
nijazxp
Techie Member
55
12-01-2018, 06:00 PM
#20



(22-12-2017, 07:35 PM)hovatek
(22-12-2017, 07:17 PM)nijazxp No, it's true unfortunately. Just tested it.  Sad
If no scatter is loaded then it says: "Pleas load a scatter file before execution".
Then in help it says: "The scatter file need be load before you can do download, format, read back and other operation."
If scatter is loaded but preloader not found, scatter is not properly loaded, and message: "S_DL_GET_DRAM_SETTING_FAIL" "[EMI] Obtain DRAM Failed!"

Dodgy

So you're saying one can't do an SP flash tool readback without a preloader.bin present?
As for your /system , it seems to have been modified before the dump so getting it to pass integrity test might be......
Anyway, instead of deleting odex files, why not deodex the system.img?

Month has passed, and i am not making any progress. None custom recovery porter works. Tried cwm, twrp, philz... How to deodex system apps? How to do anything with these few system apps? If I touch it with some program, phone bootloops, tried ext4 unpacker, osforensics, none work. I cannot even root my phone expect temporarily using kingoroot on pc. What is the next step? All of this just because few system apps are changed! Gapps can't be installed in mediatek recovery, it just doesn't read. I do not know where to start! By trying to open system.img in some linux os? How? Maybe I could replace these few system apps using gapps, but manually. Why none custom recovery works? I tried all porters, and none work!!! MtkTools also never was able to root or flash any recovery...even after rooting it with kingo root. Nothing works! Also I tried reflashing my original secro and nvram and all others, and still no imei... I am tired and confused! Installing linux only makes me more tired...

To be clear: i installed lgx160 firmware as temporary solution, although i have all backups of lgx150, where only system.img has few apps problematic, caused by replacing original (old version) ones with new ones from google play, like Play Store, Play Services, Google, Calendar, Various Offices...and then after one factory reset my phone kept displaying "gapps stopped working" and "android keyboard (aosp) stopped working"...and if i pressed ok and ok, it displays infinitely the same messages, but i could somehow access settings and desktop by quickly pressing ok and another location on display....but now even that doesn't appear...now freezes at logo. I didn't change any flash files! It was not supposed to be like this. I know that problem is only in system.img because when i keep my phone flashed with lgx150 all partitions, and system from lg x160 it works! But with root problems and imei problems...

And integrity check verified all files like recovery, boot, logo, system, and says they are original, except these few modified system apps. (apk or odex files). So my problem is only in few system files in system partition, but how to access system partition??? My idea is to replace them with android 5.0 gapps ones that i downloaded a month ago, in zip.

If I touch even single system partition file using ext4unpacker and similar tools for windows, my phone bootloops, even if i just add additional file called text.txt, these programs somehow damage everything maybe.
HOW TO ACCESS SYSTEM.IMG FILES AND REPLACE THEM??? IS THERE ANY WAY?
I guess only 2 solutions is to use non-windows os, that is linux or android.
Can I mount system.img in android and browse it with any file manager? Does phone has to be rooted? I guess temporary root will help there.

Also I tried all youtube videos, all google results, nothing helped. Even if i touch single file of boot.img or recovery.img, my phone bootloops. WTF!

Here is great idea, do you thin it will work? This won't require root or any special knowledge of terminal commands. Just flash system.img instead of cache.img or user.img??? Interesting? Both are ext4, and they have enough space. Even if some additional files may appear in that partition from user (data) or cache, i may delete them. I am gonna try!
This post was last modified: 12-01-2018, 07:31 PM by nijazxp.
Pages (4): Previous 1 2 3 4 Next
Users browsing this thread:
 1 Guest(s)
Users browsing this thread:
 1 Guest(s)
YtWhTl
live chat
whatsapp telegram instagram