Android 5.0.2 and New Factory Images For Nexus 7 (Wi-Fi) Available

Android 5.0 is has been publicly available since early November, and the … more

Github Tutorial App Shows You How to Use… Github

Github can get pretty complicated and using it can become quite daunting, especially … more

Google Glass-like Clip-On For Regular Glasses Developed by Sony

For the price of $2,000, a pair of glasses that can run apps, take pictures, … more

Micromax Takes OnePlus to Court! Android Wear Receives Lollipop – XDA TV

Android 5.0 Lollipop is available officially for the Moto 360! … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[SOLUTION] LG G2 VS98012b Problems With Loki (loki.sh) + [ROM][UNOFFICIAL]CM10.2

OP feldenthorne

22nd January 2014, 07:39 PM   |  #1  
OP Junior Member
Thanks Meter: 7
 
3 posts
Join Date:Joined: Jan 2014
Hi, all,

I recently helped an acquaintance that was having a terrible time with an assert_failed error with Loki while trying to install CM 10.2, so I figured I'd explain the problem and solution.

Backing up to the beginning, this acquaintance recently upgraded to the G2 (a few weeks ago) and wanted to test out KitKat. Here, we discovered that the phone had been updated to VS98012b before he'd received it - but rather than reverting to stock, we decided to use the root solution detailed here (http://wiki.cyanogenmod.org/w/Install_CM_for_d802), but we swapped the Loki flash method to that detailed here (http://forum.xda-developers.com/show....php?t=2449670) and used the CWM no-touch image from here (http://forum.xda-developers.com/show....php?t=2498941). [For reference, the touch image doesn't flash properly... but the one without touch is still touch-enabled.]

After gaining root and getting CWM up and running, we decided on the Nightly CM 11 build (ro.build.date=Sat Jan 18 08:04:40 PST 2014) and it flashed with the recommended GApps without a hitch.

Fast-forward three days and said acquaintance is having tons of crashing issues and some apps weren't working too well - certainly not far-fetched for a nightly build. We decided to flash him back to CM 10.2. However, after doing a factory reset, wiping the cache again to be sure, then wiping the dalvik cache, and finally running the CM 10.2 stable version available here (http://download.cyanogenmod.org/get/....2.0-vs980.zip, date: 2013-12-02 21:45:13) we ran into the following error during the install:

Code:
script aborted: assert failed: run_program("/tmp/loki.sh") == 0
assert failed: run_program("/tmp/loki.sh") == 0
Neat.
Some digging lead to a Pastebin (http://pastebin.com/uLtw2vG6) with an explanation of the problem and a proposed solution:
Code:
Shelnutt2@ : autoprime, thats 9/10 times because old loki_patch
...
Shelnutt2@ : if they are stuck in recovery completely because they wiped everything then just remove the assert line you meniotned and flash the rom then flash the zip I just linked
Since I've poked around with ROMs before, I unzipped the CM 10.2 ROM and popped the /cm-10.2.0-vs980/META-INF/com/google/android/updater-script file open to remove the assert line and the deletion line, incidentally. But reflashing the ROM and the linked zip that Shellnutt2 suggested (http://downloads.codefi.re/shelnutt2.../loki_boot.zip, for the curious) didn't actually work for us. Much of the problem, I suppose, had to do with the data and system partitions not being loaded in the loki_boot.zip updater-script.

So a bit of thought lead me to check the CM 11 commits for updates to enable functionality for the VS98012b update - bingo! A conveniently close-to-the-top update (http://review.cyanogenmod.org/#/c/56181/) mentioned that, as Shellnutt2 suggested, loki_flash was updated for this precise reason. Now, I wasn't about the pull the whole CM 10.2 repo and build with the updated loki_flash.c, so I just copied the newest CM 11 nightly's /system/bin/loki_flash, /system/bin/loki_patch, and /system/bin/loki.sh into the CM 10.2 ROM's /system/bin/ and overwrote the old ones (after reverting the updater-script changes, of course). After rezipping, the install worked like a charm!

---
[TLDR]

If you're having
Code:
script aborted: assert failed: run_program("/tmp/loki.sh") == 0
assert failed: run_program("/tmp/loki.sh") == 0
errors,
1) grab the latest CM distribution and copy the loki_flash, loki_patch, and loki.sh files out of /system/bin/ (or from https://www.mediafire.com/?y3ubxgnxzxq89f9, which are from the Tue Jan 21 13:05:13 PST 2014 CM11 Nightly) and
2) paste them over the /system/bin/ equivalents in whatever VS980 ROM you're having problems with,
3) rezip,
4) and clean flash the ROM in recovery.

Presumably, this workaround should work for all VS980 ROMs (tested for CM10.2 and OSE) that haven't updated their loki_patch versions. It probably won't work for any other phone that has loki.sh failed assertions - the GitHub master loki repo (https://github.com/djrbliss/loki/blo...r/loki_flash.c) doesn't say anything like the CM 11 distro, so it's likely a check coded in. But I didn't take the time to look into that on the CM side.

EDIT: This should also work for devices other than the VS980 - I looked up loki_flash.c rather than loki_patch.c (https://github.com/djrbliss/loki/blo...r/loki_patch.c) and incorrectly commented on the situation.
Any phone/software version found in the CyanogenMod 11 Repo listing for loki_patch.c (https://github.com/CyanogenMod/andro...s/loki_patch.c) file - do a CTRL+F - should be able to apply this workaround to flash a ROM with an out-of-date patcher.

EDIT 2:
This solution should, based on the Loki source used for CM11, work for the following G2 models:
AT&T: D80010d, D80010o (however 10o has a reported failure and no successes)
Verizon: VS98010b, VS98012b
T-Mobile / Canada: D80110c or D803
International: D802b
Sprint: LS980ZV7
KT / LGU: F320K, F320L
SKT: F320S, F320S11c

However, if you're just looking for a CM 10.2 ROM with this fix for the Verizon VS980, I uploaded the zip that I flashed for my acquaintance for convenience: http://www.mediafire.com/download/tm...2-vs98012b.zip .

[/TLDR]
---

Hope this helps anyone that's having the same problem - good luck flashing!
Last edited by feldenthorne; 25th January 2014 at 09:49 AM. Reason: Corrected improper information + added new info
The Following 7 Users Say Thank You to feldenthorne For This Useful Post: [ View ]
22nd January 2014, 10:41 PM   |  #2  
Dork6243's Avatar
Member
Flag Southeastern US
Thanks Meter: 18
 
83 posts
Join Date:Joined: Sep 2009
More
Is the Loki patch updated for 12b backward compatible with 11a and so on?

Basically, would one on 11a, be able to flash a ROM with the 12b Loki patch?

Great write up by the way

VS980
23rd January 2014, 02:30 AM   |  #3  
simon_lefisch's Avatar
Senior Member
Thanks Meter: 389
 
1,404 posts
Join Date:Joined: Dec 2010
More
If you're looking for a stable AOSP kk ROM try cyanfox. Its cm based. I've been running it for about 3 weeks with paeks kernel and have 0 probs with it. No lag no crashes no lockups no sods. Its been the most stable AOSP ROM I've found.

Sent from chdhsheh fhhdud
23rd January 2014, 04:27 AM   |  #4  
Skizzy034's Avatar
Senior Member
Flag Amsterdam, NY
Thanks Meter: 1,016
 
4,956 posts
Join Date:Joined: Mar 2010
I've been having the same problem with the AT&T G2 on 10o. Besides downloading, do you think this will work for any of those roms?

Sent from my LG-D800 using xda app-developers app
23rd January 2014, 08:28 AM   |  #5  
OP Junior Member
Thanks Meter: 7
 
3 posts
Join Date:Joined: Jan 2014
Quote:
Originally Posted by Dork6243

Is the Loki patch updated for 12b backward compatible with 11a and so on?
Basically, would one on 11a, be able to flash a ROM with the 12b Loki patch?

Quote:
Originally Posted by Skizzy034

I've been having the same problem with the AT&T G2 on 10o. Besides downloading, do you think this will work for any of those roms?

The listed carrier/software variants in the current (Wed Jan 22 2014) CM11 G2 repo's loki_patch.c (and the uploaded loki_patch zip file) are:

AT&T: D80010d, D80010o
Verizon: VS98010b, VS98012b
T-Mobile / Canada: D80110c or D803
International: D802b
Sprint: LS980ZV7
KT / LGU: F320K, F320L
SKT: F320S, F320S11c

If you were to compile the current (Wed Jan 22 2014) loki_patch.c from https://github.com/djrbliss/loki/blob/master/loki_patch.c (sorry, can't post links because of new member restrictions) yourself, you'd get an added compatibility with:

DoCoMo: L-01F

On PURELY SPECULATIVE terms, there's a good chance other versions of the software for the different carriers could be supported if you download the Loki source and compile it after adding another entry (format shown below in code tags) for your specific carrier/software version. But I don't know anything about the code and have no reason to look into it, so I can't confirm this. Plus, I don't own a G2 myself and can't test this method anyway.

Code:
{
                .vendor = "T-Mobile or Canada",
                .device = "LG G2",
                .build = "D80110c or D803",
                .check_sigs = 0xf813294,
                .hdr = 0xf906440,
                .lg = 1,
        },
23rd January 2014, 07:26 PM   |  #6  
Skizzy034's Avatar
Senior Member
Flag Amsterdam, NY
Thanks Meter: 1,016
 
4,956 posts
Join Date:Joined: Mar 2010
Quote:
Originally Posted by feldenthorne

The listed carrier/software variants in the current (Wed Jan 22 2014) CM11 G2 repo's loki_patch.c (and the uploaded loki_patch zip file) are:

AT&T: D80010d, D80010o
Verizon: VS98010b, VS98012b
T-Mobile / Canada: D80110c or D803
International: D802b
Sprint: LS980ZV7
KT / LGU: F320K, F320L
SKT: F320S, F320S11c

If you were to compile the current (Wed Jan 22 2014) loki_patch.c from https://github.com/djrbliss/loki/blo...r/loki_patch.c (sorry, can't post links because of new member restrictions) yourself, you'd get an added compatibility with:

DoCoMo: L-01F

On PURELY SPECULATIVE terms, there's a good chance other versions of the software for the different carriers could be supported if you download the Loki source and compile it after adding another entry (format shown below in code tags) for your specific carrier/software version. But I don't know anything about the code and have no reason to look into it, so I can't confirm this. Plus, I don't own a G2 myself and can't test this method anyway.

Code:
{
                .vendor = "T-Mobile or Canada",
                .device = "LG G2",
                .build = "D80110c or D803",
                .check_sigs = 0xf813294,
                .hdr = 0xf906440,
                .lg = 1,
        },

There is def. a problem with flashing roms on 10o.
25th January 2014, 09:44 AM   |  #7  
OP Junior Member
Thanks Meter: 7
 
3 posts
Join Date:Joined: Jan 2014
Just as an update, Skizzy034's problem was apparently resolved by flashing the previous AT&T D800 firmware. (Presumably 10d.)
20th February 2014, 02:15 AM   |  #8  
Junior Member
Thanks Meter: 1
 
10 posts
Join Date:Joined: Feb 2014
Perfect!
Thank you very much!!

I was having this exact error while installing 10.2, and your rom worked perfectly. Thanks!
27th February 2014, 05:47 AM   |  #9  
phaze one's Avatar
Senior Member
Flag Seattle
Thanks Meter: 244
 
927 posts
Join Date:Joined: Jan 2011
More
Thumbs up Yeah buddy!
Thanks for the zip dude. ROM is running perfect.
10th March 2014, 02:15 PM   |  #10  
Junior Member
Thanks Meter: 0
 
3 posts
Join Date:Joined: Mar 2014
Thumbs up You have no Idea how much this helps
I thought I was totally screwed haha

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes