yashsingh1/xdaforums huggingface dataset:
[Fire Original Android Development] k4y0z:
I just had some time to test with "nosmp maxcpus=0"

I wasn't successfull getting a kernel to boot this way.

Could you elaborate on the exact commands you used and also which kernel and initrd?

This is what I did:

root@ford:/ # insmod /mnt/sdcard2/atagsproc.ko
root@ford:/ # insmod /mnt/sdcard2/kexec_load.ko
root@ford:/ # mrom_kexec_static -l /mnt/sdcard2/zImage --initrd=/mnt/sdcard2/initrd.img --append="nosmp maxcpus=0"
kernel: 0xb6000000 kernel_size: 3aefb0
kexec_load: entry = 0x80008000 flags = 280000
nr_segments = 3
segment[0].buf = 0xb5fe4000
segment[0].bufsz = 2314
segment[0].mem = 0x80001000
segment[0].memsz = 3000
segment[1].buf = 0xb6000000
segment[1].bufsz = 3aefb0
segment[1].mem = 0x80008000
segment[1].memsz = 3af000
segment[2].buf = 0xb5c03000
segment[2].bufsz = 3db2e6
segment[2].mem = 0x80ebc000
segment[2].memsz = 3dc000
root@ford:/ # mrom_kexec_static -e

The zImage and initrd are extratcted from the TWRP-image
[Fire Original Android Development] gwhite5:
Sorry for the delay. I've been ill for a while.

The kernel boots, but I can't get many of the peripherals to turn on. This includes the display. I'll try and investigate if anyone has got devices in a kernel booted with kexec functional on a MediaTek chipset device, and if so, I'll look at how they've managed it.
[Fire Original Android Development] gwhite5:
I thought so as well. Hmm. Updated posts accordingly.
[Fire Original Android Development] k4y0z:
It does look pretty much the same, these are always the last two lines in the log:

[ 0.567675].(0)[1:swapper/0][SPM] PWAKE_EN:1, PCMWDT_EN:1, BYPASS_SYSPWREQ:0
[ 0.568452].(0)[1:swapper/0][SLP] SLEEP_DPIDLE_EN:1, REPLACE_DEF_WAKESRC:0, SUSPEND_LOG_EN:1

Maybe we should look deeper into why it stops there and ignore the SMP-Stuff for now?
[Fire Original Android Development] stargo:
Hi,

That's the mt-sleep-module. If you just return from its init-function it will just stop at the line before that. BTDT.

It's probably polling for something which is only true on a cold-boot.

Cheers,

Michael
[Fire Original Android Development] k4y0z:
I guess we could try to compare the atags between a cold and a warm-boot and then set the correct values for a warm-boot in the atags-module.

I believe I have seen logs where it would say "not first boot" I believe that happened when rebooting from recovery but I'm unsure.
[Fire Original Android Development] stargo:
Hi,

I've gotten a bit further yesterday and nearly booted once (but the initrd seems to have been corrupted and so there was no userspace).

The main problem now is that the TrustZone gets initialized by the original kernel (with shared memory parameters and interrupts, etc.) and can't be reset, so it is still using the data from the old kernel. I'm not sure if it can be completely deinitialized before kexecing...

I've pushed my changes to: https://github.com/stargo/android_kernel_amazon_ford/tree/kexec

SMP still seems to be broken, so nosmp is required.

Cheers,

Michael
[Fire Original Android Development] gwhite5:
Out of interest, however, kexec is not considered stable on ARM. The SMP issue is not specific to MediaTek devices, but kernels booted by kexec in general on ARM. many ARM devices are unable (or were unable before being patched) to spin up secondary cores after kexec.
[Fire Original Android Development] stargo:
Hi,

Hmm, tell that to my Motorola Omap4 (dualcore) phones. They boot quite happily with kexec and a locked bootloader and are running CM13.

You have to do a bit of device-specific stuff, but that is nothing which is impossible.

The TrustZone-stuff could be a much harder problem, as quite a bit needs to be done before kexecing the new kernel.

Cheers,

Michael
[Fire Original Android Development] gwhite5:
See these emails sent to mailing lists:

http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/348004.html

http://lists.infradead.org/pipermail/kexec/2012-December/007581.html

I'm not doubting kexec will work, and I'm not doubting that it works on any other device either. It appears some SMP implementations simply do not work when the kernel boots by kexec.

I do acknowledge that the wording in my post seemed the opposite. What I meant to really say was that it seems to be specific to ARM because some ARM devices were unable to spin up secondary cores after kexec.
[Fire Original Android Development] gwhite5:
I think the next step would probably to blatantly brute-force this and remove as much MTK drivers that could be at fault that we don't need for a recovery and rebuild until we get further.
[Fire Original Android Development] tonibm19:
This shouldn't be left to dead.

We may never unlock the bootloader, but this would be awesome.
[Fire Original Android Development] DB126:
In the absence of time, talent, family, income (aka job), sleep and a host of other annoying distractions I am sure some selfless individual with nothing better to do would love to tackle this. Not holding my breath.
[Fire Original Android Development] capt_planit:
Are (were) you using Tassadar's kexec tools? I get an "Illegal instruction" when I try to run "mrom_kexec_static -l zImage" and the various kexec-tools I have don't appear to pick up (nor does dmesg) the insertion of the module. I'd like to compile my own kexec-tools from your source if it is availabl.e. Thanks. c_p
[Fire Original Android Development] k4y0z:
I am unsure, since it's been a while since I looked into this.

Are you sure you have loaded the kexec_load.ko and atagsproc.ko kernel-modules?
[Fire Original Android Development] capt_planit:
[MENTION=7104332]k4y0z[/MENTION] Well, without your sources I can't insert atagsproc module since I (of course) get "Exec format error". Definitely the kexec_load module is loaded and I load another atags module (procfs_rw) that provides atag support. Dmesg is rather quiet after I load the module. With the right kexec tools built with my gcc perhaps I could query it? Believe it or not, I think you got further than anyone else with soft_restart kexec (actually booting into the guest kernel). It would be a pity to let the project die. You seem to be close. TYIA c_p
[Fire Original Android Development] k4y0z:
[MENTION=7392525]capt_planit[/MENTION]

Why would you be able to load the kexec module but not the atags module?

All the sources are available on my github (as mentioned in the devdb-entry):

https://github.com/chaosmaster/ford_kexec

https://github.com/chaosmaster/ford_atags_procfs

It would indeed be nice, to have a working kexec, keep us up to date if you have any success!
[Fire Original Android Development] capt_planit:
[MENTION=7104332]k4y0z[/MENTION] Cuz it won't f#!$@ing build! "ford_atags_procfs-master/atags_proc.c:42: error: field 'devinfo_data' has incomplete type" I think I'm missing a header. I'm pretty sure I would need to modify your kexec_tools anyway. This from strace " ["/data/local/mrom_kexec_static", "-l", "zImage"], [/* 27 vars */]) = 0 syscall: unknown syscall trap 0x000351bc" I am unlikely to make much progress where so many have failed. The best I can do up until now is to get to machine_kexec and Oops there when I try to write the reboot_code_buffer.
[Fire Original Android Development] k4y0z:
[MENTION=7182392]capt_[/MENTION]plantit

Apparently there have been some changes to the kernel, which make the modules incompatible.

You could try building the modules against the kernel-version you are using.
[Fire Original Android Development] capt_planit:
[MENTION=7104332]k4y0z[/MENTION] lol capt_plantits!!! I am pretty sure you used Tassadar's kexec-tools. At least, when I use that version with your module and a stray proc_atags module I had lying around I get to here: c0 Disabling non-boot CPUs ...<6>[23160.130559] c0 Bye!

<1>[23160.152017] c0 Unable to handle kernel NULL pointer dereference at virtual address 00000000

I find this promising and am investigating why this occurs. I suspect this "shutdown: Permission denied" when I load my zImage may also be an issue. I can hook that to my_shutdown if need be. I just know that the pre-compiled version has a substantially different source than my source because I don't get that message when I use your mrom_kexec_static. Did you ever try to just load a stock kernel with kexec enabled and then (immediately) kexec again? It seems with the progress you made that might be the way to go forward. c_p
[Fire Original Android Development] k4y0z:
[MENTION=7392525]capt_planit[/MENTION] sorry about messing up your name :D

I believe you are right, I was using Tassadar's kexec-tools.

I'm unsure if I built them from source or just used the binary that comes with Multirom.

You could try checking out kexec-tools from around the time I was playing with this:

https://github.com/Tasssadar/kexec-tools

Does the atags-module you are using really export /proc/atags with sensible data?

Otherwise it might be worth looking into fixing up my atags-module to work with the current kernel-version.

I remember trying to load a stock kernel, which resulted in the same issues, I haven't tried loading it very early though.
[Fire Original Android Development] capt_planit:
[MENTION=7104332]k4y0z[/MENTION] I'd like to provide accurate atags info through a file--not sure how to do that. I rewrote machine_kexec to call cpu_reset instead of soft_restart and now the phone just turns off--no Oops, nothing. I'm using the Tassadar kexec_tools that you link to. It is great to have someone who is still interested in kexec (non-hardboot).

To any other lurkers here, I'd love to see someone try to double-kexec with the resources here in this thread. Just cook up a stock kernel with only a couple changes (enable kexec) and then kexec into it. So long as you can access the running guest kernel (adb shell? a script in init.d??) kexec again to another (non-stock, you choose) kernel. Does this get us past the issue that makes the display unusable? Or do we need to work further on re-initializing the various components that don't seem to spin back up after kexec? Ty c_p
[Fire Original Android Development] capt_planit:
cpu_proc_fin is never called in this implementation. If you can call it sucessfully (I can't) it may help.
[Fire Original Android Development] Guicrith:
Has any progress been made in the last 5 months or is this completely dead?
[Fire Original Android Development] DB126:
Not dead - stability does not infer a lack of utility. Why fix what ain't broke?
[Fire Original Android Development] Guicrith:
So it can execute a new kernel at least 1 out of every 2 attempts and fully boot up, even if unstable after boot?
[Fire Original Android Development] DB126:
Sorry - read the thread title too quickly; thought you were referring to this. Fall back on my previous response. Tough to make progress given lockdowns and (very) small support community. Also think Amazon would have hardened against this type of exploit.
[G2 Android Development] davjan:
Hi everybody ,

this rom is not my build ,found it on google

I flashed this rom, played a bit with it , and like to share it with all of you

tested camera, seems to work OK

other than that it seems to work like any other cm13 build out there at the moment

all variants

VANIR google plus page

FEATURES

Quiet Hours

Volume Panel Overlay Options

Sound Options

Charge Sounds

Battery Light

Animation Controls

Notification Light Settings

Battery Saver Mode

Partition Info

Profiles(CM)

Quick Unlock

Scramble Pin

Privacy Guard

Blacklist

Stock Interface Mode

Advanced Reboot

Automatic Updater

Detailed Device Stats

Alarm Profile Switcher

Advanced Calculator

Camera Effects

DPS Manager

Reverse Lookup (Google-based)

Call Vibrate

Call Flip Action

Incoming Call Style

Speaker Proximity

HOWTO INSTALL

you need

+LG G2 (tested on F320L)

+ hybrid bootstacks

-Make sure you are rooted.

-Make sure you have a custom recovery installed. (TWRP tested)

-Download Rom

-Download GApps package.

-Boot into recovery.

-FULL wipe recomended

-Flash ROM

-Flash android 6.0 GAPPS

-First boot may take up to 10 minutes

-next builds can be downloaded and installed from in settings(about phone)

DOWNLOADS

hybrid bootstacks

ROM LG G2 F320

ROM LG G2 D800

ROM LG G2 D801

ROM LG G2 D802

ROM LG G2 D803

ROM LG G2 LS980

ROM LG G2 VS980

VanirAOSP for other devices

DHO GAPPS (take "60arm-DHO-GAPPs.zip")

BUGS

*This is not my ROM so please report bugs to the developer

*

Report bugs here

*same as on CM13

*external SD not working on F320

*Camera not working in whatsapp(but can take photo in native app and load in whatsapp )

*WIFI disconnect every few minuts on f320k (plz confirm by other f320k users? )

*plz report bugs you find

SCREENSHOTS

SOURCE

http://www.vanir.co
​
[G2 Android Development] davjan:
Anyone tried? I use for 24 hours right now, no gaint bugs found Till now

Anyone else found bugs?

Except the bugs already listed?

Verstuurd van mijn LG f320 met Tapatalk
[G2 Android Development] pedromanzana:
Are there other bootstacks? what happen if I don't install them? It's because I bricked my phone with the bootstacks....
[G2 Android Development] davjan:
Bootstacks works fine on my phone, without the proper Bootstacks you will Not get past the LG bootlogo

Verstuurd van mijn LG f320 met Tapatalk
[G2 Android Development] pedromanzana:
in what rom did you were before going marshmallow?
[G2 Android Development] davjan:
cm12.1 (with the CAF hybrid bootstack)
[G2 Android Development] dark_prince:
Does double tap to wake up work with this rom?

Also, please do tell what do I exactly need if I'm coming from Cloudy G2 v3.3 rom, F320L.
[G2 Android Development] davjan:
yes it works , but plz wait a bit , I will update topic with new version from vanir

you first need to flash the CAF hybrid bootstack, than rom and gapps
[G2 Android Development] davjan:
topic updated
[G2 Android Development] Velkyrix:
BUG FOUND! in f320k once in a few mins, wifi connections go down. found this out when doing a war attack in clash of clans XD

maybe its the kernel? i didn't flash hybrid bootstack for i didn't need to. I had The CAF bootstack. maybe there is a kernel to fix this? or a patch? btw im on the latest one in the download. so just saying. does anyone else have this issue?

Edit: I thought I fixed it with a re-flash. I was wrong D:
[G2 Android Development] fendaris:
This supports all variants. Including the ls980. Change the OK to say all variants and put down the links. Ls980:http://www.emccann.net/nuclearmistake/VanirAOSPNightlies/ls980/
[G2 Android Development] davjan:
I will do, the moment I got home again.

I was only looking for the f320 but Indeed vanir AOSP got builds for al g2 variants, will update topic ASAP

Verstuurd vanaf mijn LG-F320 met Tapatalk
[G2 Android Development] davjan:
topic updated to all variants

thx [MENTION=6264437]fendaris[/MENTION]
[G2 Android Development] Lawlrus:
[MENTION=1010731]davjan[/MENTION]

If you're going to do this, then do it right. You must link their g+ community and people need to post bug reports there NOT HERE
[G2 Android Development] mandroid717:
Tried twice to install the ROM with open gaps. Both times received message Google services not working. Perform full wipe both times. Came from resurrection 6.0.1 ROM.
[G2 Android Development] syrkles:
U have to use vanir gapps
[G2 Android Development] mandroid717:
Was following OP's instructions. Do you have a link
[G2 Android Development] syrkles:
Just Google dho vanir gapps
[G2 Android Development] pedromanzana:
How works the battery? The performace?

Enviado desde mi LG-F320L mediante Tapatalk
[G2 Android Development] mandroid717:
Have it installed with the vanir gapps. Very smooth. Battery so far so good. WhatsApp camera still showing lines.
[G2 Android Development] fischer12345:
Alright so I flashed everything instructed, rom boots up. I start to set up my stuff but I cannot get past the screen after setting up my wifi. It asks me if I have another device to link, which I do not. When I click on the no thanks option, and hit skip, it prompts me with a message saying google play services has stopped. Because of this, I cannot get past this screen. Any ideas? I tried flashing another gapps package, but I am still given the same error.
[G2 Android Development] mandroid717:
I had the exact same issue. I installed vanir gapps. Alls well
[G2 Android Development] gorm:
[MENTION=1010731]davjan[/MENTION]

Pretty sure if the Vanir Team wanted this posted on XDA they would have posted it already.

Like [MENTION=5559940]Lawlrus[/MENTION] said, all links should be to Vanir's G+ page to post issues and logs of course

---------- Post added at 05:48 AM ---------- Previous post was at 05:42 AM ----------

Wtf. Not sure why that posted 4 times lol
[G2 Android Development] Lawlrus:
It doesn't matter that he posted it, they cover 100+ devices, and they dont care if random people make threads, but the only stipulation they have, he didn't follow.

That being less the op is a developer, he's not going to be able to support bugs and issues, so they are to all be posted at their community where developers can actually look at and fix issues.
[G2 Android Development] davjan:
updated topic with google+ link ,

and working gapps (60arm-DHO-GAPPs )
[G2 Android Development] thename123:
I install hybrid bootstack before with last rom, do I need install hybrid bootstack again?

or just from first time?
[G2 Android Development] davjan:
No need to install again, you can just flash rom and gapps (and full wipe)

Verstuurd vanaf mijn LG-F320 met Tapatalk
[G2 Android Development] dark_prince:
Rom is working very well so far. Battery backup is lovely in sleep but same horrid as lollipop when awake. Oh well it's a phone thing I guess.

So far everything is good, neat and fluid, care none about the camera or video playback. Volume was unexpectedly breaking up the speaker so I disabled audio fx. This rom is a daily driver for me. I only needed the double tap to wake up thing with any AOSP based custom rom. Thanks for sharing.
[G2 Android Development] adriannxda:
https://sudosurootdev.com/ - developer's site, which is also mentioned in his profile Sudosurootdev

The builds come from here - https://sudosurootdev.com/builds/
[G2 Android Development] adriannxda:
For F320 users

To get the sd card mounted you need to unpack the kernel(boot.img), add this line

/devices/msm_sdcc.2/mmc_host* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata

to the fstab.g2 file in the ramdisk folder, repack it and flash it. Or, If you are using the 19/12 build, flash the kernel from the attached zip archive.

However, there are problems with write permissions for some apps since Google has changed the way apps get permissions and editing system/etc/permissions/platform.xml does not help. I guess this is a mainstream cyanogenmod issue because other officially supported devices also have it.
[G2 Android Development] thename123:
(with last rom I mean blisspop rom)

I am now on blisspop so do I need install bootstack again?

and full wipe before flashing rom or after? or both?

thank you
[G2 Android Development] Art Vanderlay:
Added to index

[INDEX][LG G2] ROMs, Kernels, Guides and more
[G2 Android Development] vhuiya:
I am install this ROM but update download and flash ROM not complete

Please help
[G2 Android Development] davjan:
You have a f320 and you try to instal a l01f rom?

Verstuurd vanaf mijn LG-F320 met Tapatalk
[G2 Android Development] NxtGenCowboy:
Lets see what happens on a VS980.
[G2 Android Development] Lawlrus:
It runs well
[G2 Android Development] vhuiya:
Update link

Please share link
[G2 Android Development] dark_prince:
http://www.emccann.net/nuclearmistake/VanirAOSPNightlies/f320/vanir_f320_6.0.122115.zip

gapps:

http://www.emccann.net/dho/5-Gapps/60arm-DHO-GAPPs.zip
[G2 Android Development] sabbeer:
Unable to increase sound...
[G2 Android Development] Lawlrus:
Edit the mixer paths...
[G2 Android Development] NxtGenCowboy:
Actually.. alot of apps keep crashing. I'm not sure why.
[G2 Android Development] Lawlrus:
Nothing I've experienced. If they don't happen on other 6.0 ROMs, get some logs and post on the g+ page
[G2 Android Development] NxtGenCowboy:
Yup. Trying to right now, it forces the phone to restart so a pita.
[G2 Android Development] dark_prince:
Bugs:

as of 21-12-2015 nightly:

- LED doesn't blink in colors when testing from the settings (to set the color of LED for notifications etc, but for battery the testing works)

- Landscape mode has display artifacts on nav bar foreground. Like if I pull down notification, a ghost image of pull down notifications appears on nav-bar as well.
[G2 Android Development] vhuiya:
Sound quality very bad

please emplop
[G2 Android Development] sabbeer:
Not working
[G2 Android Development] Lawlrus:
[MENTION=6079519]sabbeer[/MENTION]

You went into es settings and allowed root?
[G2 Android Development] sabbeer:
While enabling root explore
[G2 Android Development] Lawlrus:
Download root browser from jrummy apps. Worked fine for me. Make sure you have root turned on in developer options
[G2 Android Development] sabbeer:
Worked, thanks...
[G2 Android Development] vhuiya:
How to
[G2 Android Development] Lawlrus:
>system>ect>mixerpaths.XML

Find the device specific settings, and change the speaker rx7 value.

Only change it 2-5 steps at a time, if you go too high you can blow out your speaker.

Must reboot after changing.
[G2 Android Development] vhuiya:
Sound is off

Please help

---------- Post added at 12:51 PM ---------- Previous post was at 12:49 PM ----------

Sound is off ?
[G2 Android Development] alexx_kidd:
Yes,you must also set the permission of the mixer file to rw-r-r,like all the other files in that directory already are,and then reboot and BOOM!you've got sound working and increased
[G2 Android Development] Dr.DL:
I'm coming from Cm12

As I try to install CM 13 or other android M aosp, my G2 just freezes, after LG logo appears, it's rapidly disappear and the G2 just keep showing black screen.

I used another rom and updated the recovery but it was ineffective.

should I replace the kernel or something?
[G2 Android Development] Velkyrix:
Base was updated. u should have no problem flashing it the way u would flash cloudyg2 3.3
[G2 Android Development] Dr.DL:
I've installed CM for almost 1 million time and solved almost every single problem I face, I'll try to change the kernel to newer version and see.
[G2 Android Development] dark_prince:
Which rom u had earlier?

Go into recovery > Flash CAF hybrid boostack for your phone (link in 1st post)> Reboot Recovery

Then Wipe: System, Dalvik, Cache, Data

Then flash Zip and Gapps.
[G2 Android Development] vhuiya:
HD video don't playback
[G2 Android Development] robby4:
for me 720p/1080p mkv from a samba NAS is working in VLC and Google Video Player.
[G2 Android Development] pipyakas:
I'm using flymeos on cm12.1 5.1.1

I flashed hybrid bootstack, did a full wipe, and installed vanir

And it failed, log said:

"Patching system unconditionally

Verifying the updated system image...

system partition has unexpected contents after ota update

Error executing updater binary in zip...

Error flasing zip..."

and it failed. it also happen to me with RR 5.1.1 rom too

What is the problem and how to solve it, does anyone know?
[G2 Android Development] Velkyrix:
Try different recovery version. 2.8.4.0 + should work
[G2 Android Development] pipyakas:
i'm currently using twrp 2.8.7.3 :rolleyes:
[G2 Android Development] Velkyrix:
well..... try downloading again idk
[G2 Android Development] son_91:
sd card is working for me on f320 L
[G2 Android Development] risis78:
SD card is mounted on F320K but isn't writable. SDFix not works... Someone fix this?
[G2 Android Development] Lawlrus:
Bugs and such need posted on their g+ community.
[G2 Android Development] miguexneox:
Vanir day 5/01/2016 for G2 F320L , great autonomy , very smoothly and quickly despite economic are in the battery.

Baseband unknown , but it works 2g, 3g and 4g . The wifi also .

It recognizes the sd, works.

Bugs: The video players , Mx player , stock player and player 's file , all malfunctioning when the video comes on. They accelerate.

---------- Post added at 05:09 PM ---------- Previous post was at 05:07 PM ----------

I can write to the micro sd, just give root permissions to the file browser.