yashsingh1/xdaforums huggingface dataset:
[MeMO Pad 7 General] Mis012:
Port request

Helo! For sure I don't want ubuntu-touch, but If you guys really want this amazing little device to be more nexus-like, I have by accident recently found out what kali Nethunter is, and Nexus devices are one of two supported brands. And I would love to see this on my tablet. The question is how much architecture-dependent their sources are. So if anyone will become interested after you look here -> https://www.kali.org/kali-linux-nethunter/ I and maybe others would like a choice like this.

But more than port it would need a complete remake of some functions and the fact a huge part of it is based on chroot + vnc is a place for deeper inclusion like surfaceflinger / x11 native switch and even not using chroot at all at the end, and it might be not that easy if it's not implemented yet. But port is the beginning.
[MeMO Pad 7 General] Opensystem:
Id prefer an Android build of some sort before luxuries like this myself

Not to say its not interesting
[MeMO Pad 7 General] Penguineh:
Quick update, the flash did not go well (whatever you do not trust fastboot, it does not want to flash system.img). Ill probably upload my device tree to github any day now :). Slowly recovering with the use of a clonezilla live usb, dd, and a nandroid :).

Since I am a bit more confident with playing around with my tablet's mmc, I **might** see what else I can get to run on it... Hint: maybe I can make what the iPad pro should be :P
[MeMO Pad 7 General] social-design-concepts:
I would recommend flashing through twrp and not fastboot.
[MeMO Pad 7 General] jerbear294:
I think I have some ideas... surfacing...
[MeMO Pad 7 General] Penguineh:
[MENTION=4821597]social-design-concepts[/MENTION]

Yeah, further research indicates that fastboot throws up a fuss for some reason.. (because fastboot thinks the bootloader is not actually unlocked?). In future I am going to get AOSP to build as a zip for twrp.
[MeMO Pad 7 General] jerbear294:
Probably why it's acting up.

Look in Fastboot's menu. It says secure boot's on. May be true for fastboot, but it isn't true for the UEFI.

Fastboot's probably like "wait secure boot's on what are you doing"
[MeMO Pad 7 General] spookmeister101:
I'm just reading with fingers crossed guys!! :)
[MeMO Pad 7 General] Mis012:
I know it's not your fault as manufacturers don't make diferences between UEFI and BIOS etc., but the secure boot in droidboot may mean it thinks that the bootloader is locked (which would make sense as hex viewing reveals the same "boot unsigned images" value for both Asus' and custom bootloader. But even if it really means that the bootloader think secure boot is on, it should not prevent it from flashing images. More likely it is some (known to Asus ?) defect as in kitkat, even flashing the same boot.img as there already was did end up with error.
[MeMO Pad 7 General] social-design-concepts:
More than likely fastboot throws a fuss because of changes between Android 5 and Android 6 sparse image format and nothing to do with the bootloader or secureboot.

This is believe is because how the check for secure boot is performed. Secure boot is only truly enabled when Secure boot is enabled in the UEFI and the UEFI is in USER Mode and Not SETUP Mode, the check for secure boot i believe checks the UEFI SETUP Mode efi var first and if the UEFI is not in SETUP Mode reports back to droidboot that secure boot is enabled with out ever checking the secure boot efi var. Of course this is speculation based off the secure boot check in android-ia userfastboot as we don't have source code for droidboot.

"boot unsigned images" if you look at the source code this is actually easy to understand. there is a way of enabling support for unsigned boot images on the factory bootloader by setting a Non Volatile EFI Var ( droidboot could possibly check this var to also determine if the bootloader is unlocked ) . Now the problem with the option of setting the NV EFI Var to disable the signature checking of kernel images is that the manufacture could also tell the bootloader that the device is not unlock-able what then happens is if the bootloader reads that "boot unsigned images" is supported but the device is unlock-able it would immediately halt the system and power off. so knowing that a manufacture could enable a kill switch in the efi bootloader is why we replace the bootloader instead of setting the boot unsigned images supported efi var.
[MeMO Pad 7 General] vampirefo:
True, it's also 5.1with locked bootloader, like several 5.1 I have seen are unable to flash custom recovery, or any root method via fastboot. No one that I know has tried to flash rooted system.img.

Anyway this insecure bootloader work on any baytrail with 5.0? No need for software?
[MeMO Pad 7 General] social-design-concepts:
Happy Holidays, I'm not going to say any baytrail, it needs to be full uefi with 64bit firmware, secure boot has to be disabled on the device and the uefi firmware has to have the android bootmode, and currently the device has to follow the standard Intel Android GUID's for boot, recovery, droidboot / fastboot, misc partitions since i haven't ported the find boot partition by-label from android-ia kernelflinger yet.

currently i'm working on re-adding support for android back into gummiboot to have a bootloader able to load multiple OS's
[MeMO Pad 7 General] Penguineh:
That sounds awesome! Anyway, [MENTION=4821597]social-design-concepts[/MENTION], when I attempted to build the boot.img (combining the ramdisk and zImage) it does not want to boot - Android should at least show some signs of starting??

I either get kicked back to recovery or a notification about some fallback mode trying to boot my weird boot file..

What configuration or setup should I make the boot.img out of to make it compatible with the insecure bootloader?

I have the page size, base and command line arguments, but it seems to not be enough and seems to be a file format issue - would I be wrong in this assumption?

P.S. You must have got my terminal logs :D! I did get some weird sparse file error! Anyway, when I have the time after Christmas ill just do a zip flash and attempt to at least boot it with the stock kernel.
[MeMO Pad 7 General] jerbear294:
Take all the time you need- as long as I can get the toxicity that is ZenUI off of my tablet I'm happy.
[MeMO Pad 7 General] Ruben Craveiro:
im just wondering how much ram will we get without the laggy zenui?
[MeMO Pad 7 General] profee:
We will not get any, but you can download more RAM anytime you want.

Just kidding. The thing is, the number you see in the pulldown menu isn't actually free RAM. Even now there can be 550-600 mb 'free', and tablet is still underperforming. Actual free RAM amount is much lower (15-30mb usually) and that won't change, and it shouldn't. What will improve is menagement of that used memory, so you most likely won't see it unless you go to developer options>process stats.
[MeMO Pad 7 General] social-design-concepts:
I'll be back on later tonight regarding the boot.img and I'll see if I can locate a write up Intel did on optimizing ram usage on Intel android device builds it was a really good read.
[MeMO Pad 7 General] Opensystem:
https://software.intel.com/en-us/an...r-optimizing-android-application-memory-usage

This one perhaps?
[MeMO Pad 7 General] social-design-concepts:
I'll have to read that one too.
[MeMO Pad 7 General] Opensystem:
More towards app design, but still well written. Merry Christmas everyone!!
[MeMO Pad 7 General] social-design-concepts:
There are are a number of things that could prevent a android.boot.img from booting but the general error does sound like the bootloader having an issue loading it.

How are you flashing it? fastboot, dd, twrp?

Was there any other error message?

What format are you compressing the ramdisk in? I beleive the insecure bootloader only supports gzip.

I haven't even begun to build android 6 yet so i don't know what effect changes between 5 and 6 would have, guess i should resync today.

This is the command the twrp recovery modifier uses to repack the android boot images.

$MKBOOTIMG --kernel $KERNEL --ramdisk $RAMDISK --base $BASE --pagesize $PAGESIZE --cmdline "$CMDLINE" -o $OUTPUTIMG

This is the write up i was referring to : Android* Memory Tuning for Android 5.0 and 5.1

Merry Xmas Everyone. . .
[MeMO Pad 7 General] kitsunezero:
Oh man! you can fix this problem? i have the same :crying:
[MeMO Pad 7 General] Mis012:
Merry christmas everyone! [MENTION=4821597]social-design-concepts[/MENTION] , [MENTION=7057426]Penguineh[/MENTION] how is it going? I know I said it before but this tablet has 300 MB APD partition just for the demo mode and it works well without it. So we have a space to use for something interesting. For example approximately 150 MB could be used by bootimg made of puppy linux. Or just another kernel for testing/other purposes, or another fastboot/recovery. But we need a support of insecure bootloader to boot it. So I can give it whatever GUID and dd whatever here, but the bootloader just supports three GUIDs right now, and all already used. And no it can't be added to any partition except for the ones around in partition table (useless here) unless we want to make a new partition table.

Merry christmas to everyone once again!
[MeMO Pad 7 General] HampTheToker:
I love it when you guise talk nerdy.
[MeMO Pad 7 General] Penguineh:
Status Update!

Been experimenting with various flash methods, and I get the device still showing the intel logo. I suspect this is due to me using the stock boot.img which is probably not compatible at all. Regardless, this is a mammoth task, and if others would like to help - especially those with knowledge of how the insecure bootloader works with the kernel etc, it would be greatly appreciated. I'll have the device tree up for certain say within 24 hours. :) Maybe [MENTION=4821597]social-design-concepts[/MENTION], who I believe has the source can make a CM build :D

-Penguineh
[MeMO Pad 7 General] jerbear294:
Thanks for the status update. Although it's not necessarily the best of news, you did find out how to not make a ROM boot, so I suppose that's good.

Can't wait to ditch ZenUI for good.
[MeMO Pad 7 General] social-design-concepts:
I guess I'll put gummiboot back on the back burner for a moment and start building a ROM.

---------- Post added at 12:13 PM ---------- Previous post was at 11:53 AM ----------

Where's your git?

[MENTION=6013061]Mis012[/MENTION] Gummiboot should be able to take care of booting other OS, The goal is to re add support for the standard android partitions boot, recovery, fastboot, bcb (misc) through auto detection but still support the tradition loader config file to add additional / custom boot entries , maintain gummiboots current boot logic of booting the last OS loaded while still maintaining the android bootlogic if an Android OS was the last boot target, use magic key detection to show the boot menu to choose the OS to load, and hopefully add support loading an OS from microSD and USB storage.

[MENTION=5479482]jerbear294[/MENTION] have you had any issue with the bootloader?

Oh what fun looks like Trekstor Surftab Xintron i 7.0 has Android M Kernel source, wonder what else the included in there that Intel hasn't posted yet. . .
[MeMO Pad 7 General] Mis012:
I can run grub2 with no problems but still cannot boot gnu linux. Sometimes invalid kernel magic number, sometimes (initramfs) unable to find a medium containing a live file system. I don't know if I have any chance to boot from data partition with grub. I would so love to boot gnu linux without buying powered otg cable.
[MeMO Pad 7 General] social-design-concepts:
I've not attempted a full OS yet, I've not had an issue with loading clonezilla. I'll play later at the moment i'm looking at this latest gpl release from trextor to see if it has any goodies inside maybe android-ia will get a push here soon.
[MeMO Pad 7 General] jerbear294:
I have had no issues. Sometimes ZenUI derps while I'm using it and kicks me back to the bootloader, which then says "Falling back to MOS", but that's not the bootloader's fault.
[MeMO Pad 7 General] Mis012:
I think that I read that gimmiboot doesn't support filesystems other then FAT (unless UEFI inplemetation supports them) So we have only that 300 MB partition. With grub, I can actually boot the kernel (sometimes) from any location on data partition. Are you sure gummiboot is more suitable than grub for bootloading? I mean I like how grub is so powerful, and if I compiled it myself it would be even more, not to mention how awesome it would be if I could actually select options from manu without interupting the timer like with refind edited by tuxic001 - I still use it to boot whatever without any need to deal with nvram - it's just completely safe.
[MeMO Pad 7 General] social-design-concepts:
Correct like most uefi bootloaders gummiboot only supports booting from a fat partition ( ie : gummiboot has to be installed in a fat partition which the ESP partition is ) this is a limitation of most uefi firmwares and devices that support booting an efi bootloader from another file system are few and far between an android boot.img / boot partition isn't a fat file system if the need for reading a kernel from another file system is needed support could be added.

The problem with grub2 and other efi bootloaders is the need for an external build system outside of the android build system ( edk2 ) where with kernelflinger , efilinux, and gummiboot can be built against the gnu-efi library.
[MeMO Pad 7 General] Mis012:
This link http://wiki.osdev.org/GRUB_2#Compile doesn't even mention gnu-efi, and I don't understand why to use android build system for compiling UEFI applications which are not os-dependent.
[MeMO Pad 7 General] Penguineh:
Don't worry, I am still determined to get AOSP running on this tablet!! Although, for someone who has a bit more knowledge of what is going on behind the scenes, here is a github link to my version of a (bare, without many of my crazy modifications) k013 device tree.

https://github.com/XDA-Penguins/device-tree-k013

You will see that I have included a extract-proprietary-blobs.sh file. Run this and it will setup your vendor folder with all the blobs necessary. Just make sure you have ADB recognising your device before you run it as it will fail spectacularly otherwise.

If [MENTION=4821597]social-design-concepts[/MENTION] can attempt get a version of CM done, I would be hugely appreciative and should be able to complete a build of AOSP looking though his configuration. (Ramdisk especially)

-Penguineh

(Hopefully I've simplified getting blobs / setting up a device tree)
[MeMO Pad 7 General] vampirefo:
I looked at your tree, that is indeed bare bone, it appears to be missing a lot, perhaps that is by design, anyway how far does it boot? Logcat show anything interesting?
[MeMO Pad 7 General] Penguineh:
Yeah it is very bare bone because my current setup is too unusable for anyone else, I just wanted to release this to simplify someone else creating an alternative rom. My problem lies with the fact that I cannot get the system to boot, I have an idea of what to do, but it will take some time to implement. Worse case comes to worst, I am fairly certain that I could get a stock Android 5 (not nearly as exciting :/) to work properly.

Basically I have to build a new ramdisk and kernel that are compatible with the insecure bootloader. Whilst I was able to get it to boot on the emulator with some appended configuration settings, I believe the build is more device specific than a standard emulator-style kernel build.

Social-design-concepts, keep me posted with your rom if you decide to have an attempt at building one... I might learn something by cross referencing your configurations with the source code of the insecure bootloader.
[MeMO Pad 7 General] vampirefo:
OK, I didn't know the bootloader required a special boot.img, I assumed wrongly I guess you could boot any boot.img.

So really you need to get the boot.img working first, before making a rom, anyway good luck.
[MeMO Pad 7 General] Penguineh:
It seems so yes, I am fairly confident my system.img should work (at least to some degree), it is just getting it to work with the bootloader.

Was it you that built a recovery for the Dell Venue 8 that was included in a early version of the tethered recovery? If so, do you have any clue how it's ramdisk is wrapped up?
[MeMO Pad 7 General] vampirefo:
Wrapped up? You mean packing and unpacking?
[MeMO Pad 7 General] Penguineh:
That would be the right term :). Yeah, was anything special done? Tomorrow I will attempt a full 6.0 kernel build and will make a fresh boot.img. I am just curious if there is a specific step that needs to be done for the bootloader to recognise the file. I am aware of the unpackbootimg and mkbootimg tools and have experimented with them.

The init files would be those generated by the AOSP build process or those extracted from the device and the kernel would be the zImage file. I used the terminal command file to confirm the built ramdisk.img is actually a gzip file and should be in the right format for the bootloader to work with.
[MeMO Pad 7 General] Mis012:
I am qiuet sure the insecure bootloader can boot normal boot.img and nothing else, while your system.img is what should be deployed on system partition. If you get stuck at intel logo (bootloader splash) your problem is with boot.img (vmlinuz + initrd.gz) and not woth system partition. That is quiet obvious if you flash system.img over raw boot partition (or the first 33MB of it, which is the size of boot partition) you can use mkbootimg if you don't aleeady have a boot.img

Edit: late..
[MeMO Pad 7 General] vampirefo:
The dell requires special scripts to unpack and repack boot.img, I don't know your device, most likely you don't need them.

Your device is More like my Ares 8, than my Dell, Ares 8 is straight forward packing and unpacking, no special scripts.

http://xdaforums.com/showthread.php?t=3133165
[MeMO Pad 7 General] Penguineh:
Oh, I have been deploying the right images on the right partitions, even going as far as making a nandroid, and flashing to it's partitions and flashing back to the device. I am just a bit confused about what is actually going on behind the scenes. Give me a little time and I should have some more decisive results to report back.

It is late now, ill address these problems tomorrow

-Penguineh
[MeMO Pad 7 General] Mis012:
Ok, by tomorrow you mean in 8 hours? As it's 13:47 here and XDA doesn't say anything about your local time

---------- Post added at 02:03 PM ---------- Previous post was at 01:48 PM ----------

Mothing special needed for unpacking, not sure for packing
[MeMO Pad 7 General] social-design-concepts:
Your correct there is no real reason to, but for me it is simply a mater of consistency and that gummiboot had support for android from intel before which makes re-adding support easier, but maybe i'll look and grub2 a little later if needed.

[MENTION=7057426]Penguineh[/MENTION] , [MENTION=2472806]vampirefo[/MENTION] and [MENTION=6013061]Mis012[/MENTION] are correct the insecure bootloader boots the standard AOSP boot image format nothing special. As i said before there are countless things that can cause a boot.img not to boot. The intel boot splash will remain on the screen until something else redraws to the fb in the case of android /system/bin/bootanimation and as i said countless things can go wrong before this point.

Looking at your device tree i might suggest not shoting for the stars at first with attempting to build 64bit android and stick to a 32bit build. I also don't see any ufo_gen7 graphic blobs?

[MENTION=2472806]vampirefo[/MENTION] wanna test the insecure bootloader on your tablet i know your device doesn't need it but it be nice to see if it does work on your device as well.
[MeMO Pad 7 General] vampirefo:
Sure I would like to test it, what kernel does Asus MeMO 7 (me176cx) use? my kernel is 3.0.20.x86_64_byt.

hudl2 takes 3.10.62x86_64_byt trying to find an intel using same kernel as hudl2.
[MeMO Pad 7 General] Nexive:
My kernel is 3.10.20-x86_64_byt on my me176cx
[MeMO Pad 7 General] social-design-concepts:
Your device is running a 3.0.xx kernel? Is that a typo? Most Intel device between 4.4.2 and 5.0.1 are running 3.10.xx after 5.1.x it jumps to 3.14.xx.

I'll build a fresh build and send you instructions after my cm-12.1 build completes or fails (I suspect will fail) I know I've not added all the needed sources yet.

Guess I need to see about getting twrp booting with a 3.14.xx kernel.
[MeMO Pad 7 General] Penguineh:
[MENTION=4821597]social-design-concepts[/MENTION] are you using CCACHE, it is pretty great for speeding things along - just sucks when you compile the first time.
[MeMO Pad 7 General] social-design-concepts:
Not at the moment, i will enable it when i get to the point of fixing the build but for now i'm simple tracking down the bare minimum needed for the build. lots of re-syncing.
[MeMO Pad 7 General] vampirefo:
Yes typo

3.10.20
[MeMO Pad 7 General] Penguineh:
After some debugging, it seems that my boot.img actually gets loaded by the bootloader (with some of my modifications).. silly Penguineh....

Anyway, it is still having trouble booting the full system and crashes back to the recovery. :(

I also attempted a dirty flash and I get the same results. I have some ideas though..

Will keep you guys posted.
[MeMO Pad 7 General] Opensystem:
Thanks buddy it's been exciting reading this section the last couple days, we all very much appreciate your effect
[MeMO Pad 7 General] Penguineh:
Hey Guys,

I've tried a couple new things, namely,

Taking a stock generic 6.0 kernel and combining it with the ramdisk -> but it doesn't find any bootable media (Fallback to MOS error)

Testing the kernels in QEMU, they all seem to be fine and output boot messages.

I have gotten to the stage where this boot.img testing should be a full time job (and as such I need to slow down), my tablet has motherboard issues and as such I cannot use the volume down + power recovery shortcut (I have to pull the battery out for a few hours otherwise) - I have to boot into clonezilla, manually mount partitions and flash back the stock boot image, which is such a big PITA. If anyone would be willing to take a look at the kernel + init ramdisk scenario I would be greatly appreciative. I'll upload my full tree to github and we can go from there. Among other things getting kernel to compile on OS X is futile, so Linux is definitely required.

Any other ideas why I would be getting the MOS error with a 6.0 kernel? It is a generic build for x86.

I've had a look at the bootable-uefi repo, but am still unsure.

To save time from flashing, I would like fastboot boot to work, but I believe it thinks secure_boot is on and refuses to test a boot.img.. as such, is there any way to get the following triggering a kernel+ramdisk rather than a recovery:

fastboot flash /system/bin/logcat FB_RecoveryLauncher/fbrl.trigger; fastboot oem stop_partitioning

I have not seen the source code for "fbrl.trigger" so I am clueless. Social-design-concepts might have some knowledge as it is his built recovery included in the temporary-twrp package this command is extracted from.

How is your CM build going [MENTION=4821597]social-design-concepts[/MENTION]?

-Penguineh

P.S. We are not talking about Linux 6.0 here :), I am referring to a Marshmallow compatible Kernel.
[MeMO Pad 7 General] social-design-concepts:
[MENTION=7057426]Penguineh[/MENTION] I'll be back after the new year. Everyone be safe. . .
[MeMO Pad 7 General] jerbear294:
Thread seems dead... nobody's posted in it all year. :P

[MENTION=7057426]Penguineh[/MENTION] any updates?