yashsingh1/xdaforums huggingface dataset:
[Sony Xperia S, Acro S, Ion] letama:
:)

Check what does boot manager in #4: I fit 2 normal kernels + a reduced one on kernel partition, I have an assembly loader that starts first, checks which one has to boot and switch to proper one. Reduced one is handling the boot logic and embeds the recoveries, the other two are untouched kernels to dual boot.
[Sony Xperia S, Acro S, Ion] letama:
That's what I do for the reduced kernel. For the other two, I don't want to, the idea is to run unmodified binary kernels coming from the rom/kernel makers, I can't assume that they enabled lzma for ramdisk. Anyway, we don't really have an issue with space, with last layout I have plenty of space as long as I remove cwm extra commands embedded in each kernel initramfs and trim down a bit un-reasonable bootlogos. Initramfs repackaging is required, so removing few files is not really a problem.

Thanks for the proposal!

In fact, boot logic and switch is working fine, recoveries are working fine too. We have few areas that could be improved:

1) UI: boot menu is not very sexy

2) Getting rid of the need to repackage zips: This is the most annoying problem. We have to patch installation scripts and initramfs as partitions are hard coded. It would be nice if this could be done transparently, but I don't see any easy solution for this.

And we currently have an issue with last FXP kernels that doesn't like to run from loop partition images. I re-partitionned mine to have a second set of native partition, it solves the loop issue we see, but I can't expect anyone to do the same.
[Sony Xperia S, Acro S, Ion] Felimenta97:
I'm kinda lost here (God, too much info for me. Can't understand nothing lol), but...

First thing first: The God Damn God of Development is back!!! Oh, DoomLord, I missed you hahaha Please help all of us.

Second, let me get this straight: A kernel is about 10 Mb, and it contains how the software and hardware should work together, in the most basic level, right?

We have 21 Mb (is that from the 32 Gb thing or it's a separated one?). From what we know, was that something Sony intentionally did to help devs (you guys) and higher end users (like me) or is any other possible reason?

That 21 MB is enough for 2 kernels and a half: The Native one (Stock, most of the time), the Loop (Let's say CM10) and the half one. which is that menu where you can select which kernel to boot and such?

If this 21 Mb is part from the 32 Gb, is there any way to repartition it? (Let's say, take 10 Mb from the SD Card and put into it)

Another thing: K900 mentioned a lot of time ago, that it could be possible to format the SD Card, and repartition to make it something Nexus Like (/data and SD Card integrated). That would be hard to do? And how the recoveries (CWM and TWR) would handle that, backing up and restoring...

Sorry for all those questions.

---------- Post added at 01:45 PM ---------- Previous post was at 01:42 PM ----------

Changing all that orange to ICS Blue would make it a lot better already. Maybe a different font (if that is possible, space wise)

EDIT: Everyone logged off right after I posted this lol

Anyway, @Apology11: Did you repacked PA 2.52 with Camera already?
[Sony Xperia S, Acro S, Ion] letama:
Well, the issue is that kernel is often used to designate "kernel image" (boot.img, kernel.elf, zImage, whatever it's named) which is containing kernel (the real one), initramfs (or cpio, or ramdisk = a bunch of files (init, init.semc.rc, adbd, ...) directories in cpio format, compressed). Strictly talking, kernel is what you get (a zimage) when you compile linux kernel source code. It initialize hardware, provides drivers, and userspace (the environment to launch process/linux applications/Android runtime). A kernel for Xperia S is about 4.5-5.5 MB. On top of this, we add initramfs, ranging from 800KB to 3.0MB depending if initramfs contains recovery apps. Having recovery apps in initramfs is a "trick" used on Sony because we don't have a dedicated recovery partition (at least a one we can use). To be complete, there is also in a kernel image a proprietary file (RPM.bin) that is specific to Qualcomm. All these elements are assembled in an elf file (linux executable format), hence the kernel.elf (dual.elf for instance ;)). Note: boot.img is also an elf file, it has only be renamed but format is elf.

Yes, the 21MB is from the 32GB internal sd. We have 15 partitions on the internal SD (system, data, internal storage, kernel, radio, ...). I don't know if the goal was to help us, it could be also to be future proof as kernel are growing. 20M out of 32 Gb isn't much :)

Right. It handles boot menu, boot logic (special memory driver used by the assembly loader for the switch), and recoveries.

I don't know and I won't test, too high risks of bricking the phone. It's far more dangerous than the internal storage repartition I did. Kernel partition is one of the first (p3), it would mean shifting all the partitions after it and I don't know if Sony bootloader has hard-coded partition position for radio for instance.

Ah, yes, this one was on my list of personal things to do. The issue here is that you have to reformat to ext4 internal storage, modify init.rc and add a specific service if I'm not wrong. It will break compatibility with all the rom out there, so it won't be used by much I guess.

I didn't do it yet, my main problem is that it will complicate me support of boot manager, I need to be as close as possible from what you guys are running. That's why I keep using loopbacks even if repartitionned natives are much better

No problem!

What orange ? On the splash screen before menu ? This one will stay, it's xda colors except if someone provides me a nice splash screen that doesn't take too much memory.

:) No, I'm here, but I have to develop after all, enough talk :)
[Sony Xperia S, Acro S, Ion] championswimmer:
will disagree with the Nexus-ing up of storage+data mashup

many people prefer to use mass storage instead of mtp

will cause sd faults on them and they wont be able to use anyways .

i personally keep the option on mass storage just in case i am on a system that does no t support mtp (like someone else's linux box ;) )
[Sony Xperia S, Acro S, Ion] Apology11:
Bad news! I repacked Paranoid Android 2.521 but it crasehes on bootscreen (same as with 2.52) but this time I can´t use CM10 Kernel because letama reportet it doesn´t work either and for working cam you need latest CM10 kernel with ion.

So we have to find a way to fix this.

My thought is that FXP team changed something on their kernel after last AOKP was build but before PA 2.52 was build. Thats why the crash appeared the first time on PA rom. But thats just my opinion

Sorry for the noobish question, but why does Freexperia Github for ms8660 kernel show the last commit as from 3 months ago, when they just added the cam fix a few days ago?
[Sony Xperia S, Acro S, Ion] letama:
True, it has some disadvantages, mtp is dumb and mass storage is much better. I'm using mass storage mostly in recovery, and it would continue to work there, but it's not the most common use. Anyway, it's just a personal experiment, I want ext4 back on storage, this is not something I plan to require for boot manager.
[Sony Xperia S, Acro S, Ion] letama:
I'm not suprised... No idea why yet, and it's not an easy one to debug :( Definitely link to loopbacks use, it may be a performance problem...

I think they changed kernel base yes, championswimmer knows much more about this.

As far as I know, they're now working directly on Cyanogen git now that it's officially supported.
[Sony Xperia S, Acro S, Ion] Apology11:
So you think it is not caused by lzo compression for ramdisk?

But as I ´m not really familiar with this I think I just can wait, if you need some testing or trying a new repack method just tell me.
[Sony Xperia S, Acro S, Ion] letama:
Probably not, on cm10, ramdisk is loading properly, and Android starts up fine. It's only after 60 seconds that kernel crashes and reboot. As first boot is taking longer, it's sometime not enough to reach first screen.
[Sony Xperia S, Acro S, Ion] Felimenta97:
Thanks for the answer, letama. Sorry again for all those questions. Only one thing: About the boot menu color, I mean the one where you can navigate, the one after the splash screen and before the Sony logo.

About the resizing of the kernel partition, it was more a theorical question.

Oh, another simple question, not strictly related to dual boot: Is it easy to a user with at least some knowledge to uncompress the kernel, change the splash screen, and compress it again? (I know this isn't possible to this kernel due size limits and such, but with a simple kernel)

"What really matters in this world, anyway?"
[Sony Xperia S, Acro S, Ion] Apology11:
Yes. There are many tools provided on xda so its easy.

Letama made a tool for uncompressing and I also saw tools to convert .png files to .rle files. Btw you can change it on bootmanager too, if the size of the whole kernel doesn't get too big.

Xperia S AOKP Tapatalk
[Sony Xperia S, Acro S, Ion] Felimenta97:
Another thing: I will try the KA kernel (just have to find it here), repacked to this. If I want to go back, it is simply flash the 2.50 insecure kernel, right?

"What really matters in this world, anyway?"
[Sony Xperia S, Acro S, Ion] letama:
Yes. Wifi doesn't work with the KA kernel I repacked though.
[Sony Xperia S, Acro S, Ion] Felimenta97:
Forget it then :) Thanks anyway.

"What really matters in this world, anyway?"

---------- Post added at 08:37 PM ---------- Previous post was at 08:27 PM ----------

Also can't wait for repacked PA with camera working.

"What really matters in this world, anyway?"
[Sony Xperia S, Acro S, Ion] mharckk:
i have a question, i noticed that when i charged my phone and want to turn it off it doesnt turn-off its just rebooting :). is there a way for this?

also, maybe krab can help us regarding his kernel to make its wifi work on native partition.

@ letama : have u tried to repacked other KA kernel (lower version like KA6 and below)?

edit: its been a while since ive seen a DooMLoRD's post.. hehehe..
[Sony Xperia S, Acro S, Ion] Apology11:
Hey letama,

only in case you didn´t tried for yourself: I repacked 3.0.50 based CM10 Kernel Kali posted today and it doesn´t work too.
[Sony Xperia S, Acro S, Ion] letama:
Reboot is normal: When you power off with charger plugged in, it should reboot to boot manager and then boot manager starts straight away native firmware. Native firmware must handle offline charging (screen off/charging animation) properly. If your native firmware starts completely, it means that offline charging is broken in it (original problem or repackaging problem).

I repacked previous KA roms, that embeds KA kernel, but no previous standalone KA kernels. I'll test someday, but I have many things to do before that.
[Sony Xperia S, Acro S, Ion] letama:
Ok... Did you try on native too ? Can you post a /proc/last_kmsg from your working firmware (not from recoveries) after trying to boot cm10 ?
[Sony Xperia S, Acro S, Ion] Apology11:
No, because I´m running ICS there atm. If you really need someone to test it there, I will do a backup and test, but if its not necessary, I will only test it on loop for now.

last_kmsg is attached (in txt format because I can´t upload it here otherwise)
[Sony Xperia S, Acro S, Ion] letama:
Ok, exactly same problem apparently... Don't bother testing native, it will probably work.
[Sony Xperia S, Acro S, Ion] Felimenta97:
Ok, quick thing: as a PA tester, I can't wait so the ROM is patched every time (not for testing), so I have to do a backup with TWR, install the PA as test it. However, I sometimes can not go to my PC, boot on W7 (no fast boot yet on my PC with W8), then reflash the kernel, install the TWR again and restore the backup. Can I just install the dual boot kernel update (from PA CWM)?

If not, there is any way so I can install it with CWM, just like most kernels?

"What really matters in this world, anyway?"
[Sony Xperia S, Acro S, Ion] letama:
Easiest way for you is to use cwm in bootmanager, backup your rom, restore from pa cwm. It will restore everything including boot manager. Make sure you use tar backups and not the other method, and you should be safe.
[Sony Xperia S, Acro S, Ion] Felimenta97:
I use TWP. Much better. I can't restore CWM backups with it, so...

"What really matters in this world, anyway?"
[Sony Xperia S, Acro S, Ion] letama:
Agreed, twrp is nicer, ask for twrp on the rom you're testing :)

If you want an install zip, take the upgrade bootmanager_0.5_upgrade.zip file, edit the updater script. It looks like that:

assert(getprop("ro.product.device") == "LT26i" || getprop("ro.build.product") == "LT26i" ||
getprop("ro.product.device") == "LT26a" || getprop("ro.build.product") == "LT26a" ||
getprop("ro.product.device") == "nozomi" || getprop("ro.build.product") == "nozomi");
ui_print("Boot Manager 0.5 upgrade");
ui_print(" ");
ui_print("Extracting files...");
show_progress(0.100000, 1);
package_extract_file("ke01", "/tmp/ke01");
run_program("/sbin/chmod", "755", "/tmp/ke01");
package_extract_file("kf02", "/tmp/kf02");
run_program("/sbin/chmod", "755", "/tmp/kf02");
ui_print("Backup of existing kernels...");
show_progress(0.300000, 2);
assert(run_program("/tmp/ke01", "1", "/tmp/1_zimage", "/tmp/1_initramfs") == 0);
assert(run_program("/tmp/ke01", "2", "/tmp/2_zimage", "/tmp/2_initramfs") == 0);
ui_print("Flashing boot manager...");
show_progress(0.300000, 4);
package_extract_file("dual.elf", "/dev/block/mmcblk0p3");
ui_print("Flashing back kernels...");
show_progress(0.300000, 4);
assert(run_program("/tmp/kf02", "1", "/tmp/1_zimage", "/tmp/1_initramfs") == 0);
assert(run_program("/tmp/kf02", "2", "/tmp/2_zimage", "/tmp/2_initramfs") == 0);
ui_print("All done, please reboot your device...");

It should be that:

assert(getprop("ro.product.device") == "LT26i" || getprop("ro.build.product") == "LT26i" ||
getprop("ro.product.device") == "LT26a" || getprop("ro.build.product") == "LT26a" ||
getprop("ro.product.device") == "nozomi" || getprop("ro.build.product") == "nozomi");
ui_print("Boot Manager 0.5 installation");
ui_print(" ");
ui_print("Extracting files...");
show_progress(0.100000, 1);
ui_print("Flashing boot manager...");
show_progress(0.300000, 4);
package_extract_file("dual.elf", "/dev/block/mmcblk0p3");
ui_print("All done, please reboot your device...");

So when you go to your normal rom and want to go back, flash the dual installer zip, flash twrp, restore your backup.
[Sony Xperia S, Acro S, Ion] championswimmer:
The only change lately that might cause problems is that all custom roms from source (cm, aokp, pa) are using lzo compression.in kernel as well as cpio...

Other than that no other changes that might cause any problem with the loop kernel
[Sony Xperia S, Acro S, Ion] Felimenta97:
So it is just change the update script lines on the update, and I'm good to go?

Anyway, thanks. Btw, I'm testing PA. I'm one of the testers :D

"What really matters in this world, anyway?"
[Sony Xperia S, Acro S, Ion] letama:
Well, I'm 90% sure it's not related to kernel compression: kernel starts, initrd starts, android starts, so everything seems to be decompressed properly. More, the same kernel used at the same location (loop position in p3 partition) is booting fine if I mount ext4 and not loopbacks. The crash is in sysfs, it looks like that at some point a sysfs entry is not removed properly and kernel crashes trying to access it. Why, no clue so far. I started debugging it today, but I'm not deep enough yet.
[Sony Xperia S, Acro S, Ion] letama:
Yes!
[Sony Xperia S, Acro S, Ion] Cach123:
Any progress? :confused: :good:
[Sony Xperia S, Acro S, Ion] letama:
Unfortunately, no. I don't have much time these days and it's deep kernel debugging except if I miss something obvious. sysfs "corruption" seems to be related to msm_bus sysfs directories, but why and how, no clue yet.
[Sony Xperia S, Acro S, Ion] Felimenta97:
@Apology11: You said you would repack the latest PA... Did you did it?

If not, can you, or any other, do that?

"What really matters in this world, anyway?"
[Sony Xperia S, Acro S, Ion] Apology11:
As I said before: I repacked it, but it doesn´t work, because PA kernel doesn´t work on loop like last time, but this time I can´t take CM10 Kernel because letama confirmed that it doesn´t work either.

And I can´t take and older kernel, because for the new features like working cam you need the newest kernel.

So its no use uploading it, unless letama found out what causes the crash.

If you like me to repack it for native, just tell me, that will work.
[Sony Xperia S, Acro S, Ion] Felimenta97:
Oh, I must have jumped or misread your post, sorry. Oh, I understand it. No hurry then :)

"What really matters in this world, anyway?"
[Sony Xperia S, Acro S, Ion] Giblet-dono:
In the AOKP JB thread there is a milestone 1 which has everything working (as far as I could see)

Could someone repack it please for Loop

I would be very gratefull.
[Sony Xperia S, Acro S, Ion] Apology11:
Again: the new cm10 and aokp kernel dont work on loop at the moment, but you need those to get camera working. So it wouldnt be much use. We have to wait till letama finds out what is causing the crash. If everyone wants a repack for native, then just tell me.

Xperia S Tapatalk
[Sony Xperia S, Acro S, Ion] Felimenta97:
Do you have the PA link to the latest version before the camera update?

"What really matters in this world, anyway?"
[Sony Xperia S, Acro S, Ion] Giblet-dono:
I would love to see pacman rom for native!

If someone can repack it I would be happy!
[Sony Xperia S, Acro S, Ion] Apology11:
do you mean the one you posted here?

Okay can do that today, but you will have to wait till I get on my pc.

Xperia S Tapatalk
[Sony Xperia S, Acro S, Ion] Giblet-dono:
I will wait for it, thanks so much!
[Sony Xperia S, Acro S, Ion] Felimenta97:
Found 2.52 now. Thanks.
[Sony Xperia S, Acro S, Ion] Apology11:
PAC Rom for native:

link removed.

@ letama: I got a crash on boot with this rom on native too. I will provide kmsg as soon as I installed a rom on loop.
[Sony Xperia S, Acro S, Ion] letama:
Hello Guys

I'm still looking at the problem, still haven't found the root cause. However, I have a dirty workaround that makes it run. If anyone want to test, flash one of the recent roms crashing like cm10 145 on loop and just after flashed the attached kernel.

Let me know how it behaves for you...

This is not a fix, I only bypass the issue by preventing access to the corrupted sysfs directory. I don't know the impact on real use, device seems fine, it may have an impact on battery life or some drivers could not work.
[Sony Xperia S, Acro S, Ion] letama:
Ok, I'm interested to look at it... Thanks!
[Sony Xperia S, Acro S, Ion] Apology11:
And again the strange issue:

What I did:

- flash PAC rom on native --> booted till bootscreen of the rom and then crashed

- installed AOKP build 5 on loop (because I hadn´t installed anything there and wanted to give you last kmsg) ---> booted fine like before (as i tested it after repacking)

- booted into native to give you the last kmsg, but this time it did not even boot. the screen stayed black after selecting "native kernel"

- flashed the PAC rom again on native but this time I got status 7 error and this is what the kf command says when trying to flash PAC kernel on native now:

kernel id 1, magic: 92799206
Error, invalid kernel signature
[Sony Xperia S, Acro S, Ion] letama:
too big cpio again ? Aokp 5 on loop cpio+kernel size is how much ? And PAC one ?

I have to release 0.6 to fix the issue, but I still have work to do on it...
[Sony Xperia S, Acro S, Ion] Apology11:
AOKP5 worked fine before and its cpio and kernel is 6,88MB

and PAC is 6,24 thats what is strange.

Because I was able to install the AOKP5 kernel after the PAC kernel so I don´t think the PAC kernel corupted something. But AOKP5 worked fine with other builds before so I don´t know why this can corrupt something.
[Sony Xperia S, Acro S, Ion] letama:
6.88 MB ? 6 880 000 bytes or around 7130000 bytes ?

If I'm not wrong, new exact limits are 7340000 for loop, 7927776 for native. It seems you are good, so I don't know why you corrupt. Can you try the same sequence and see if it gets corrupted again ? And maybe provide me only the kernels+cpios so that I can try to reproduce here ?
[Sony Xperia S, Acro S, Ion] Soheil_rf:
@letama

Please make it to work with new cm10 Roms

We love this tool, we love dual boot

Thanks
[Sony Xperia S, Acro S, Ion] Felimenta97:
He's been working on that for quite a long time.

"What really matters in this world, anyway?"
[Sony Xperia S, Acro S, Ion] letama:
Did anyone tried the kernel I posted few posts ago ? It works fine with 145 even if it's not a good fix. I'm still working on a proper one, but it will definitely take time.

I'll repack 146a during the week with the matching kernel soon, again with a dirty fix :).
[Sony Xperia S, Acro S, Ion] Apology11:
Sorry, its about 7130000 bytes :mad:

I attached both so you can try.

But than it could be the size again.

Do you think this could be the cause for cm10 kernels not to work?

I will try to repack them both, but I don´t have mutch time atm.:

http://xdaforums.com/showpost.php?p=34017228&postcount=1790
[Sony Xperia S, Acro S, Ion] letama:
Thanks, I'll check your cpios with my new kernel flasher to see if I can reproduce it or if it complains about size.

This is not the cause for cm10 kernels problems we see, this is really because of loopback use. With the workaround on the "corrupted" sysfs directory (basically, when I detect it I prevent access to it), kernel don't crash and cm10 looks fine, and if I use ext4 partitions on loop kernel, workaround is not needed and works completely fine. So, it doesn't have anything to do with boot manager kernel+cpio handling, it's only a weird kernel bug.

I noticed that compared to native ext4, the app that tries to read the directory (I don't know which app it is unfortunately, kernel backtrace stops at syscall) reads it far later when system is on loopback. It happens around 4/5 seconds when booted on ext4, 30 seconds when booted on loop. No clue why yet. It's not an easy one to narrow down or I do it wrong, don't know :)
[Sony Xperia S, Acro S, Ion] championswimmer:
Precisely which location does it try.to read??
[Sony Xperia S, Acro S, Ion] letama:
It crashes when it tries to access msm_bus_fabric.2048 sysfs directory.
[Sony Xperia S, Acro S, Ion] Jay-kesrwani:
Did anyone notice any damage ? should i try this or not ?
[Sony Xperia S, Acro S, Ion] letama:
So far no damage. I'm not a huge "normal" user of loopbacks as I spent most of my time flashing kernels, not running the builds on loop, but I repackaged quite a lot of roms and tested them on loops, no damaged block so far. It may take more time to wear though, internal SD doesn't wear off as quickly as a microsd card. I'm not really concerned about it, after all, 32 GB is plenty of blocks to kill :).
[Sony Xperia S, Acro S, Ion] Felimenta97:
There is any far estimative of time or times flashing it can start damaging it? I pretend to keep my XS until the end of next year...
[Sony Xperia S, Acro S, Ion] championswimmer:
5 years untill u notice anything major :D
[Sony Xperia S, Acro S, Ion] letama:
No idea. It use to be a lot, but as quality is lowering globally...

I wouldn't be too much flash addict to be on safe side.

Personally, I don't care much and I reflash a lot because of kernel debugging (damn Sony not supporting fastboot boot! Such a pain...). But that's because I don't have problem to move on to another phone if necessary.
[Sony Xperia S, Acro S, Ion] championswimmer:
Really hate sony for that..
[Sony Xperia S, Acro S, Ion] Apology11:
Do you mean there are phones that can boot a kernel without flashing it?

Xperia S Tapatalk
[Sony Xperia S, Acro S, Ion] letama:
Yes, fastboot boot is doing that, loads kernel in memory and starts it. That's very nice as you can have a crashing kernel, reboot and see with a last_kmsg what went wrong. That's one of the major gripe I had with Sony as I like to mess up with kernels, and that's why I started boot manager at first.