LG Viper roms?

brandonabandon

Well-known member
Sep 18, 2013
255
0
0
Visit site
off work. i got 4.0.4r1 synced and built with projectopencannibal ics device, the stock ics kernel, and all the samsung stuff like nigel mentioned. i compiled the twrp2.7 recovery with no problem. @josh, i figured i could loki without the aboot and googled for some time, the only results were a loki.zip which loki's att devices strictly, and obviously thee loki readme but the aboot is required. i think coding loki into the build is neccesary and/or dd'ing loki @ the flashed recovery.img? idk. anyway i can i will. @nigel, not sure how savvy yer build skills are, although with cm9 and any cm from my experience. swap frameworks av and native with aosp ics and also androidruntime.cpp, use display-legacy and audio-legacy. could be the samsung references, so if yer starting a new device tree, it may not be necessary. good luck all. i expect to see development lol.
 

Jaegerjaquez69

Active member
Apr 10, 2014
33
0
0
Visit site
You do need the aboot, but only to patch your kernel or recovery. You can pull it off zvk/zvi like so.

Code:
adb shell
$: su
#: dd if=/dev/block/mmcblk0p8 of=/sdcard/aboot.img
#: exit
$: exit
adb pull /sdcard/aboot.img ./aboot.img

Here's a short run down of the loki process.
Code:
mkdir loki
git clone https://github.com/djrbliss/loki.git ./loki
cd ./loki
At this point you have the loki source but you need to edit the Makefile for it to compile for x86 arch(your vm/pc)
simply remove or comment out the
Code:
CC := arm-linux-androideabi-gcc
CC_STRIP := arm-linux-androideabi-strip
in the Makefile and it should compile with the make command

then simply run it like so
Code:
./loki_tool [patch] [boot|recovery] [aboot.img] [in.img] [out.lok]

Example:
Code:
./loki_tool patch recovery path/to/aboot.img path/to/recovery.img path/for/new/patched/recovery.lok

And thats it!

But here is an X86_64 loki_tool binary and aboot just incase people want to skip pulling it or compiling loki themselves.
Dev-Host - loki_tools.zip - The Ultimate Free File Hosting / File Sharing Service
 

brandonabandon

Well-known member
Sep 18, 2013
255
0
0
Visit site
lol i couldnt build jbliss loki, however yer loki compiles fine, i thought comment it out also but i wasnt sure if it was priority. funny thing, the aboot.img i posted on jbliss' github i attained the same exact way. although he says its not a real aboot.img. maybe bad upload? it was zvi. anyhow. on it.
 

Jaegerjaquez69

Active member
Apr 10, 2014
33
0
0
Visit site
lol i couldnt build jbliss loki, however yer loki compiles fine, i thought comment it out also but i wasnt sure if it was priority. funny thing, the aboot.img i posted on jbliss' github i attained the same exact way. although he says its not a real aboot.img. maybe bad upload? it was zvi. anyhow. on it.
Try zvk, ill check if zvi is actually the same aboot when i get home
 

brandonabandon

Well-known member
Sep 18, 2013
255
0
0
Visit site
brandonabandon@beast:~/lok$ ./loki_tool patch recovery aboot.img recovery.img twrp.lok
Loki tool v2.1
[+] Detected target Sprint LG Viper build LS840ZVK
[+] Original kernel address: 40208000
[+] Original ramdisk address: 41200000
[+] Output file written to twrp.lok

however when flashing.
shell@android:/ # /data/local/tmp/loki_tool flash recovery /data/local/tmp/twrp.lok
sh: /data/local/tmp/loki_tool: not executable: magic 7F45

so i did this.
brandonabandon@beast:~/lok$ adb shell
shell@android:/ $ su
shell@android:/ # dd if=/data/local/tmp/twrp.lok of=/dev/block/mmcblk0p13
9628+0 records in
9628+0 records out
4929536 bytes transferred in 2.073 secs (2377972 bytes/sec)

hangs at reboot recovery, however, soft reset/canceled factory reset/phone boots normally. im working on a kernel atm. i will leave recovery to the pros. lol.
 

thenameisnigel

Well-known member
Apr 27, 2012
1,446
148
63
Visit site
brandonabandon@beast:~/lok$ ./loki_tool patch recovery aboot.img recovery.img twrp.lok
Loki tool v2.1
[+] Detected target Sprint LG Viper build LS840ZVK
[+] Original kernel address: 40208000
[+] Original ramdisk address: 41200000
[+] Output file written to twrp.lok

however when flashing.
shell@android:/ # /data/local/tmp/loki_tool flash recovery /data/local/tmp/twrp.lok
sh: /data/local/tmp/loki_tool: not executable: magic 7F45

so i did this.
brandonabandon@beast:~/lok$ adb shell
shell@android:/ $ su
shell@android:/ # dd if=/data/local/tmp/twrp.lok of=/dev/block/mmcblk0p13
9628+0 records in
9628+0 records out
4929536 bytes transferred in 2.073 secs (2377972 bytes/sec)

hangs at reboot recovery, however, soft reset/canceled factory reset/phone boots normally. im working on a kernel atm. i will leave recovery to the pros. lol.

You don't use loki_tool on the phone, you just loki_flash.

Try reading djrbliss's readme for instructions on how.
Sent from my SPH-L710 using Tapatalk
 

brandonabandon

Well-known member
Sep 18, 2013
255
0
0
Visit site
lol. tried to dd a stock kernel with perks. reboot hangs and cancel factory reset shows the unlock screen pictured above.hmmm. i will explain this procedure if necessary.

edit: w/ "loki'd" kernel, after flashing "loki'd" recovery.
 
Last edited:

thenameisnigel

Well-known member
Apr 27, 2012
1,446
148
63
Visit site
I know what dd is and does, but you're not following the instructions for Loki. chmod 755 and chmod a+x the loki_tool binary on your device and flash it USING loki.

Sent from my SPH-L710 using Tapatalk
 

Jaegerjaquez69

Active member
Apr 10, 2014
33
0
0
Visit site
I doubt it would work for him since we don't have by-name symlinks

as far as i can see the only change would be to loki.h
Code:
#define BOOT_PARTITION "/dev/block/platform/msm_sdcc.1/by-name/boot"
#define RECOVERY_PARTITION "/dev/block/platform/msm_sdcc.1/by-name/recovery"
#define ABOOT_PARTITION "/dev/block/platform/msm_sdcc.1/by-name/aboot"
to
Code:
#define BOOT_PARTITION "/dev/block/mmcblk0p8"
#define RECOVERY_PARTITION "/dev/block/mmcblk0p13"
#define ABOOT_PARTITION "/dev/block/mmcblk0p7"
Then it should flash. But that will once again limit the source to the viper till a better way to integrate it is done.

Flashing with dd should be fine, by looks of loki_flash.c it only performs checks to see if it will be compatible with the aboot, but we pretty much know it is already.
Code:
jaegerjaquez@buildroid:~$ md5sum aboot-zvi.img 
8d2186e0982a1b8b87d193780a199555  aboot-zvi.img
jaegerjaquez@buildroid:~$ md5sum loki/loki/testing/aboot.img 
8d2186e0982a1b8b87d193780a199555  loki/loki/testing/aboot.img
ZVI and ZVK do have the same aboot so I'm guessing it's just the aboot you're using.

@nigel
I'm wondering what to do about the recovery. The only think I can think of is it's missing it's init.rc and other rc scripts? You're more experienced in this department, what do you think is causing the bootloop?
 

Jaegerjaquez69

Active member
Apr 10, 2014
33
0
0
Visit site
nIddUYe.png
Fixed bootlooping, and got it to boot into cwm.
Almost there, just have to fix keys. Little help Nigel :-[

Oh and Nigel you'll get a kick out of this. Reboot works! :p

Also feel free to make any changes and fix my dumb mistakes, and lets get our git set up!
https://github.com/Jaegerjaquez69/android_device_lge_cayman

Edit:
Well while I work on this I managed to navigate the menu enough to do a zvk backup. I'll send that your way nigel.

Edit2:
Seems like CWM does its back-ups differently now.
https://plus.google.com/103583939320326217147/posts/L5aVZe7C9vg
Did you need the blob and hash db's?
Or should I try building another recovery?

Edit3:
nvm looks like there is a format option, just can get to it yet..

Edit4:
Maybe the issue is the graphics.c? It's skipping every other menu item.

Edit5:
Uploading the tar now.

Edit6:
Done,
Here is the ZVK system.tar.a http://www.androidfilehost.com/?fid=23329332407586941
not sure why .a but a rename to .tar and its a normal tar archive
Also doing a keytest, it seems its not letting the first key press through then on second keypress it will send the last key press with the current one, so duplicated keypresses.

Edit7:
If anyone wants to build, TWRP doesn't have the navigation issues of cwm. Just use my device tree and and the twrp source and it should build fine.

Here is a ics compatible TWRP recovery i've tested out you can flash with dd or loki_flash
http://www.androidfilehost.com/?fid=23329332407586966
 
Last edited:

thenameisnigel

Well-known member
Apr 27, 2012
1,446
148
63
Visit site
View attachment 112955
Fixed bootlooping, and got it to boot into cwm.
Almost there, just have to fix keys. Little help Nigel :-[

Oh and Nigel you'll get a kick out of this. Reboot works! :p

Also feel free to make any changes and fix my dumb mistakes, and lets get our git set up!
https://github.com/Jaegerjaquez69/android_device_lge_cayman

Edit:
Well while I work on this I managed to navigate the menu enough to do a zvk backup. I'll send that your way nigel.

Edit2:
Seems like CWM does its back-ups differently now.
https://plus.google.com/103583939320326217147/posts/L5aVZe7C9vg
Did you need the blob and hash db's?
Or should I try building another recovery?

Edit3:
nvm looks like there is a format option, just can get to it yet..

Edit4:
Maybe the issue is the graphics.c? It's skipping every other menu item.

Edit5:
Uploading the tar now.

Edit6:
Done,
Here is the ZVK system.tar.a http://www.androidfilehost.com/?fid=23329332407586941
not sure why .a but a rename to .tar and its a normal tar archive
Also doing a keytest, it seems its not letting the first key press through then on second keypress it will send the last key press with the current one, so duplicated keypresses.

Edit7:
If anyone wants to build, TWRP doesn't have the navigation issues of cwm. Just use my device tree and and the twrp source and it should build fine.

Here is a ics compatible TWRP recovery i've tested out you can flash with dd or loki_flash
http://www.androidfilehost.com/?fid=23329332407586966

The CWM issue is with the recovery_ui.CPP, I'll work on it as soon as possible which means right now.

Sent from my SPH-L710 using Tapatalk
 

Edward McInnish

Well-known member
Dec 2, 2012
69
0
0
Visit site
sorry for my absence. I am utterly shocked. sadly, you are in territory I cannot be of much aid in. I about crapped a brick when i saw the recent screenshots. Whats the current status anyhow?
Personally i think that being able to make a full recovery backup could aid in developing a new rom much more smoothly than the pain in the **** meathods we were having to do before. then again, i was never able to get a dev environment going to build a copy of cm for the galaxy exhibit for experience.
 

Jaegerjaquez69

Active member
Apr 10, 2014
33
0
0
Visit site
sorry for my absence. I am utterly shocked. sadly, you are in territory I cannot be of much aid in. I about crapped a brick when i saw the recent screenshots. Whats the current status anyhow?
Personally i think that being able to make a full recovery backup could aid in developing a new rom much more smoothly than the pain in the **** meathods we were having to do before. then again, i was never able to get a dev environment going to build a copy of cm for the galaxy exhibit for experience.

TWRP is working as far as most of it's features, and I have made a backup of the zvk /system
It's available here
system.ext4.tar.a | system.ext4.tar.a | by Jaegerjaquez for Generic Device

If you know anyone interested in making roms based off of stock roms, point them here. Might just garner some interest back into the device and liven the place up a bit.
 

Edward McInnish

Well-known member
Dec 2, 2012
69
0
0
Visit site
definitely should make a note on XDA and phandroid. thats where most of the "master coders" hang out, especially XDA.
I would love to see 4.4 on this little device. would open up a brand new world for sure.
Edit: Tr?s bien on making it this far!
Edit 2: any way i can get that on ZVI? I have no means of recovering anymore should something go wrong, and had pretty much decided if this device died i would replace it with an s3 or note 2. better to use what i got than to spend money i don't have though.
Edit 3 (final?): Reregistering on Phandroid. If i can, i will post a notice. probably will result in a ban though. worth the try regardless.
 
Last edited:

Jaegerjaquez69

Active member
Apr 10, 2014
33
0
0
Visit site
get what on zvi? the recovery?
if so, yeah it should work its near the end of my last lengthy post.

and exposure should be good, thanks

Edit:
Well I managed to get my kernel built and booting.
OC + smartassv2 kernel
XVhrzVk.jpg
I'll raise the overclock by more as I test it out.
 
Last edited:

thenameisnigel

Well-known member
Apr 27, 2012
1,446
148
63
Visit site
get what on zvi? the recovery?
if so, yeah it should work its near the end of my last lengthy post.

and exposure should be good, thanks

Edit:
Well I managed to get my kernel built and booting.
OC + smartassv2 kernel
View attachment 113367
I'll raise the overclock by more as I test it out.

Can you send me the kernel so I can use it in an ICS rom.

Sent from my SPH-L710 using Tapatalk
 

Trending Posts

Forum statistics

Threads
942,999
Messages
6,916,826
Members
3,158,765
Latest member
be1digital