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
hovatek
hovatek
hovatek
Administrator
49,570
13-01-2018, 09:47 AM
#21



(12-01-2018, 06:00 PM)nijazxp 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!

Here's what.
Use the guide at https://www.hovatek.com/forum/thread-20497.html to extract the system.img
Next, deodex using https://www.hovatek.com/forum/thread-15846.html . Its important you check your system folder for other folders which contain apks and odex so you deodex them too
When repacking the flashable zip, pack system as RAW (option 3) so the flashable zip will contain a system.img
Try porting Philz recovery using https://www.hovatek.com/forum/thread-21495.html

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
14-01-2018, 06:14 PM
#22
Nothing works. System bootloops. When i deodex or not. When i put lgx160 (app and priv-app folders) apps or not. Philz recovery maker just closes after choosing android version and everything...when much text gets displayed in less than a seconds.

The only positive thing i noticed is that when i used some philz recovery maker, not yours, but similar, it had only one exe file, it kept reporting to me resolution, secured boot, and few other data while it was working, and one report was something like "detected recovery from boot, we will rename it", but anyways program kept working without closing, it never finishes flashing recovery. But when i unplug phone it says flash successful. I know it's not. But one odd thing, while my root is temporary, meaning it dissappears after reset, i noticed recovery from boot file that is renamed by this program, kept renamed name! How? If I could transfer su using that trick and keep it permanently. I believe all yours and their porters used adb to do that.

But that is not main topic. Rooting was not needed on original lg x150, only fixing system apps. It is already rooted. Now maybe i will try:
1) what i said earlier, to flash system into cache partition and modify files using phone there, of course need to temporarily root phone using kingoroot to be able to access cache partition using xplore apk
2) try to make smallest or no changes to lgx160 system.img and see will it bootloop, what is causing it to bootloop, is it really when i do anything on pc with ext4 partition, i will detect the real reason
3) try to make smallest changes to boot or recovery using various porters that allow unpack repack, and see will they be damaged just like system maybe gets when i modify it.

UPDATE 1: When I unpacked and repacked system.img using assayyed kitchen, and used option to repack to original system size, it didn't damage it, it works.
UPDATE2: It didn't damage it, meaning it works too, in case of not resizing system size to original (default option is used).
UPDATE3: I give up on trying method 1 above, because i was wrong when i said that cache or data partition is same as or larger than system. They are both smaller, so nothing here!
This post was last modified: 15-01-2018, 07:15 PM by nijazxp.
X3non
X3non
X3non
Recognized Contributor
22,062
15-01-2018, 07:27 PM
#23
(14-01-2018, 06:14 PM)nijazxp Nothing works. System bootloops. When i deodex or not. When i put lgx160 (app and priv-app folders) apps or not. Philz recovery maker just closes after choosing android version and everything...when much  text gets displayed in less than a seconds.
...

assayed kitchen seems to be the best in terms of easy repacking.
just so you know, system.img is extremely larger than cache partition in terms of size. SP flash tool wont allow you to flash system.img onto cache. it will throw out an error
nijazxp
nijazxp
nijazxp
Techie Member
55
15-01-2018, 09:30 PM
#24
(15-01-2018, 07:27 PM)X3non
(14-01-2018, 06:14 PM)nijazxp Nothing works. System bootloops. When i deodex or not. When i put lgx160 (app and priv-app folders) apps or not. Philz recovery maker just closes after choosing android version and everything...when much  text gets displayed in less than a seconds.
...

assayed kitchen seems to be the best in terms of easy repacking.
just so you know, system.img is extremely larger than cache partition in terms of size. SP flash tool wont allow you to flash system.img onto cache. it will throw out an error

but very slow... now i selected normal root in that app, and bootloop again...looks like assayyed won't help
the onlly possible way should be working with mount in linux or android, will try that now
possible causes of nothing in windows working is:
file system
file
file properties (premissions)

also advantage of working directly with ext4 mounted file is that it is fast, don't have to extract/convert/compress anything, only have to reflash it with spflashtool, only that is slower
This post was last modified: 15-01-2018, 09:36 PM by nijazxp.
nijazxp
nijazxp
nijazxp
Techie Member
55
16-01-2018, 03:27 PM
#25



Although kingoroot says that they do not support rooting android 5, i read it somewhere yesterday...

OK, finally solved temporary root problem. Used kingo root for pc again, and it says rooting failed. But i noticed i got root on phone, although their superuser was not installed. So it just worked that way without any superuser app. Now i reset phone and lost root again. Then i rooted again and tried to detect where are su and similar root files stored after rooting on phone. Believe it or not, the were stored in /sbin. I thought that was supposed to be in system/sbin maybe. I copied all these files to bin and xbin and copied sbin to system folder. Reset my phone, root is lost again. But I noticed that all modifications I done to system were saved! So I realized, every folder stored in / will be lost immediately. That is true for all android phones, even working and rooted ones. Only mounted partitions were supposed to be there.

Then I used kingo root for mobile and it rooted. And after reset my root persisted. Finally! I think i tried kingo root for mobile previously but had internet problems, so it did not work. Finally I have root, and it works even without superuser app. When there is not kingoroot superuser, then it just works without asking anything. So, this problem is solved. It was never related to locked bootloader. Looks like people who say that, are wrong. I think all these people have same issue as me, not related to locked bootloader.

Now will this in any way increase my chances to repair lg x150 system? Still there is no imei, but that is probably because this firmware uses dual sim, while lg x150 supports single sim. Reflashing partitions didn't repair imei.

But i don't know how to use mount. Words such as loop confuse me. I tried mount -r -w -t ext4 system.img sistem
nothing works... i installed busybox also... tried reading mount on linux debian manpages, and huh, page is long, will take me month to read and learn it...
also android mount is not same as that one, it lacks some commands, but i still am not giving up on mount because i think it is supposed to be working, and much faster than repacking unpacking on windows anything. Also xplore apk support changing permissions of files, in case problem is there. I don't know what should I do now except learning mount, maybe extract somehow all system files of lgx150 (broken), lgx160 (BIN_LGX160-X155-00-V10A-IND), and lgx170 (BRA_X170FTV). I haven't tried flashing this last one yet, but phone has same chipset and resolution and all as my. Only differences dual sim... Hope i will detect problem. Maybe files, or their permissions or user groups, or file system...
Also gonna try making small changes to such files, and detect what causes system to bootloop exactly. Since it's slow on windows due to repacking. Maybe gonna use osforensics and ext2fsd, to mount that on windows and modify file one by one... Use checksums, and dates to detect suspicious differences...
This post was last modified: 16-01-2018, 03:43 PM by nijazxp.
ColinB
ColinB
ColinB
Enthusiastic Member
14
17-01-2018, 09:54 AM
#26
(16-01-2018, 03:27 PM)nijazxp Although kingoroot says that they do not support rooting android 5, i read it somewhere yesterday...

OK, finally solved temporary root problem. Used kingo root for pc again, and it says rooting failed. But i noticed i got root on phone, although their superuser was not installed. So it just worked that way without any superuser app. Now i reset phone and lost root again. Then i rooted again and tried to detect where are su and similar root files stored after rooting on phone. Believe it or not, the were stored in /sbin. I thought that was supposed to be in system/sbin maybe. I copied all these files to bin and xbin and copied sbin to system folder. Reset my phone, root is lost again. But I noticed that all modifications I done to system were saved! So I realized, every folder stored in / will be lost immediately. That is true for all android phones, even working and rooted ones. Only mounted partitions were supposed to be there.

Then I used kingo root for mobile and it rooted. And after reset my root persisted. Finally! I think i tried kingo root for mobile previously but had internet problems, so it did not work. Finally I have root, and it works even without superuser app. When there is not kingoroot superuser, then it just works without asking anything. So, this problem is solved. It was never related to locked bootloader. Looks like people who say that, are wrong. I think all these people have same issue as me, not related to locked bootloader.

Now will this in any way increase my chances to repair lg x150 system? Still there is no imei, but that is probably because this firmware uses dual sim, while lg x150 supports single sim. Reflashing partitions didn't repair imei.

But i don't know how to use mount. Words such as loop confuse me. I tried mount -r -w -t ext4 system.img sistem
nothing works... i installed busybox also... tried reading mount on linux debian manpages, and huh, page is long, will take me month to read and learn it...
also android mount is not same as that one, it lacks some commands, but i still am not giving up on mount because i think it is supposed to be working, and much faster than repacking unpacking on windows anything. Also xplore apk support changing permissions of files, in case problem is there. I don't know what should I do now except learning mount, maybe extract somehow all system files of lgx150 (broken), lgx160 (BIN_LGX160-X155-00-V10A-IND), and lgx170 (BRA_X170FTV). I haven't tried flashing this last one yet, but phone has same chipset and resolution and all as my. Only differences dual sim... Hope i will detect problem. Maybe files, or their permissions or user groups, or file system...
Also gonna try making small changes to such files, and detect what causes system to bootloop exactly. Since it's slow on windows due to repacking. Maybe gonna use osforensics and ext2fsd, to mount that on windows and modify file one by one... Use checksums, and dates to detect suspicious differences...

Have you had a look at your build.prop for the settings related to dual sim support ?
nijazxp
nijazxp
nijazxp
Techie Member
55
17-01-2018, 07:17 PM
#27
(17-01-2018, 09:54 AM)ColinB Have you had a look at your build.prop for the settings related to dual sim support ?

Why would I? If hardware supports dual sim, then it's supported. If hardware doesn't it isn't. Hardware decides. Nothing in software is important. My phone has one sim port, that's it. I just flashed firmware of another phone that has 2 sim ports. That may cause imei to not be stored in same location, meaning firmware is not fully compatible, and that's what causes imei not to be displayed. I am now focused on repairing system partition of my phone, and hope it will fix everything. My phone is lg x150 or lg bello 2, and i used firmware of lg x160 or lg max. I only used their firmware because i found it on internet, people saying "it works on lg x150". Just as a temporary solution, not perfect.

In build.prop there are sim related data like:
persist.gemini.sim_num=2
ro.telephony.sim.count=2

Also these lines are found, which confirm that these phones are almost same (only number of sim supported is different):
ro.MTP.name=LG Bello II
ro.MTP.MX_ID_name: LG Max
ro.MTP.BZ_CH_name: LG Prime II
This post was last modified: 17-01-2018, 07:56 PM by nijazxp.
nijazxp
nijazxp
nijazxp
Techie Member
55
19-01-2018, 05:34 PM
#28
Can somebody tell me how to mount system.img on android? My phone is rooted. I tried these, and got the following responses (see line below):

mount -w -t ext4 -o loop /storage/sdcard1/system.img /mnt/njz
open backing file failed: Permission denied

I also tried using additional options after "loop," like default_permissions,user_id=0,group_id=0,nosuid,nodev ... Also tried changing destination folder, but that makes no difference. Looks like problem is in source folder. It's sdcard with fat32. Why no permission? It's not due to no root, because i use su before these commands and shell looks like @root....
Here's linux manual: http://man7.org/linux/man-pages/man8/mount.8.html

Here's what i found similar, could this solution be applied for me? How?
https://www.redhat.com/archives/libvirt-...00019.html
https://ubuntuforums.org/showthread.php?t=1985773
https://superuser.com/questions/298426/k...ve#tab-top

Looks like they are talking about some folder belonging to root, and not to user (me)? Well, using xplore i can change permissions and users some file or folder belongs to, but can't do that on vfat (fat32) partition. Also looks like they are talking that if image is moved to some root folder it will work, but i do not have enough space on any root folder, file is 1.7 GB.

https://askubuntu.com/questions/767422/c...red-folder

These talk about option security, what that means?
Update1: Tried file_mode=0777,dir_mode=0777, doesn't change anything.
This post was last modified: 19-01-2018, 06:17 PM by nijazxp.
nijazxp
nijazxp
nijazxp
Techie Member
55
20-01-2018, 05:10 PM
#29
Found solution to all problems !!! You won't believe what is it!!! The same problem that causes mount not to work is one that causes my system partition to bootloop. The same problem that shows "permission denied" in mount,  the same that causes system not to be able to work, no matter what i do with files inside.

IT IS BECAUSE I SET SYSTEM.IMG AS READ-ONLY IN WINDOWS !!! THAT IS PROBLEM !!!

Now my original system is back to old state, where it no longer bootloops but few apps not working, and easy to fix.
Also although i removed read-only property, mount had one more problem, and it said that "mount point or device is busy"...
So instead of "-o loop", I used "-o loop=/dev/block/loop1", now it works!!!
Sometimes loop1 gets busy, so i go to loop2, and return. This only happens between restarts, so not common problem.
Umount works too! Finally! Android can't even mount file as -r (read) when thery are read-only. Odd! Need to contact developers of android, linux, root explorer, xplore, and total commander so they fix this bug.

So my advice for all people: NEVER USE READ-ONLY FILES. LINUX OR ANDROID CAN'T CHANGE THESE FILES FROM READ-ONLY TO SOMETHING ELSE.
First time i noticed that my file was read-only is using root explorer, i see it has different letters (permissions in linux) than all nearby files.
But xplore, root explorer, and total commander are not able to change that property, although total commander says that operation succeeded!
Changing permissions won't help. I just put memory card to windows and remove that flag there!!!
PROBLEM SOLVED!

The imei is still missing, though i reflashed original all rom partitions. Gonna try fix that later with any method. Yeah, i used all these roms in scatter, with read-only turned off. So something else is solution there. Here are few pics:

[Image: 20180120_001.jpg]  [Image: 20180120_003.jpg]  [Image: 20180120_004.jpg]  [Image: 20180120_007.jpg]  [Image: Screenshot_2018-01-20_184111.jpg]  [Image: Screenshot_2018-01-20_184121.jpg]  [Image: Screenshot_2018-01-20_184149.jpg]  [Image: Screenshot_2018-01-20_184155.jpg]  [Image: Screenshot_2018-01-20_184207.jpg]  [Image: Screenshot_2018-01-20_184218.jpg]  [Image: Screenshot_2018-01-20_184225.jpg]  [Image: Screenshot_2018-01-20_184241.jpg]  [Image: Screenshot_2018-01-20_184303.jpg]  [Image: Screenshot_2018-01-20_184310.jpg]  [Image: Screenshot_2018-01-20_184408.jpg]  [Image: Screenshot_2018-01-20_190847.jpg]  [Image: Screenshot_2018-01-20_190553.jpg]  [Image: Screenshot_2018-01-20_190358.jpg]

Pictures show how commands work and how they not work. For example when you use umount twice, it doesn't work second time, lol, it's not any problem, but that is message you get if you try unmountin already unmounted or  not mounted now stuff. You can see how I had to create folder in which to mount system.img. Also I had to change from loop1 to loop2 for mount to work, that happens sometimes randomly. You can see which loops you can use, by seeing files in /dev/block/. They are from 0 to 7 in my case.  Also android lacks many linux command abilities, for example loop alone didn't work, also mount doesn't work if you don't define '-t ext4', although you don't have to define it in linux. You can see how system.img lacks w permission in one pic, and it has it in another pic. That's when it's read-only that is lacks -w permission. You can't use linux/android to change that. Also in first few pic you can see some files already present on my desktop, but that is from lg x160 firmware, i only reflashed lg x150 system partition, nothing else, so they were leftover from previous os. I was able to bypass these too error mesasges that appear constantly by quickly pressing ok ok, then some other button or place on display, then again...it was difficult. Learned a lot of stuff yesterday, and it is useful today! It was worth it! Also i used xplore sh execution and editing, because it is easier than terminal.

Note: you may sometimes see -w permission stays even after you change file to read-only. And this read-only file can be mounted. That is some bug, and usually dissappears when you reinsert memory card or reset device. So i am 100% sure read-only was problem.

Here's how lg x160 can be rooted when freshly flashed. I don't have to root lg x150 because as i said, it came already rooted, without any superuser.

[Image: Screenshot_2018-01-20_182907.jpg]  [Image: Screenshot_2018-01-20_183104.jpg]  [Image: Screenshot_2018-01-20_183605.jpg]  [Image: Screenshot_2018-01-20_183702.jpg]  [Image: Screenshot_2018-01-20_183800.jpg]
This post was last modified: 20-01-2018, 08:00 PM by nijazxp.
nijazxp
nijazxp
nijazxp
Techie Member
55
21-01-2018, 03:45 AM
#30



Wtf?! Now nothing works! Like some dark forces are playing with me trying to convince me that i am crazy, that this fixed phone was just a dream. But I say to them "I have evidence, screenshots!". Really, tried reflashing all files of my original phone, now nothing works, no recovery, no startup...although spflashtool flashed successfully. Can't understand. Then tried flashing system of lg x160 while keeping other roms intact, still nothing. My brain can not understand this. It does not make sense. This stuff was at least working until bootloop, now even that doesn't work. Tried running as administrator. Tried reflashing lg x160 with spflashtool 5.1744 original, it works, but nothing of lg x150. Tried spflashtool 5.1532.

Maybe now investigate my hard disk and files for possible corruption. Try using windows xp. Different usb cable. It will take days... Hell... Hallucinations? Tried reflashing phone 5 times, nothing!

Actually when i flashed some combination, can't remember it now (i think all of x160 and system of x150 it startup, but bootloop), and when reflashed all other x150, again no response from power key.

Seems random. Key is in good physical condition i know. Battery is almost full. Very weird!
Looks like problems are just beginning!

Files dates indicate they were not changed since a month ago. Gonna verify checksums i made earlier. Reset pc. Try without internet at all. Try reinstalling os, spflashtool. Try everything until i find out what a hell is happening.

Maybe problem never was in read-only property. But how it worked yesterday? How it worked regardless of read-only property, few weeks or days ago, at least with bootlooping error? I doubt it's virus, because only way it can damage is to change files or os. I haven't virus. Making me crazy!

While I do believe that working system could be due to already present data of lg x160, i do not understand why nothing works before bootloop if i reflash all. Now not even bootloop, no power. Now only lgx160 works when flashed with spflashtool 5.1744, aka with original downloaded secure (signed) files. LG x160 nonsecure files (made via readback) also do not work now. Maybe spflashtool 5.1532 (one that works with nonsigned flashing) got broken?

Yeah, going for whole new os, verification of flash files (checksums etc), and all apps reinstalling. That's only way to know for sure.
Now I am at worse condition than i was before yesterday!
This post was last modified: 21-01-2018, 04:02 AM 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