yashsingh1/xdaforums huggingface dataset:
[Android Software Development] iB4STiD:
nice job man :good:...

yup same issue here .. nexus 5 snap dragon 800.. boot img unpacks but once packed .. device hangs at google boot screen!
[Android Software Development] iB4STiD:
[MENTION=4544860]osm0sis[/MENTION] 1.8 works perfect !!! thank you so much man for all the hard work u put into this easy to use tool!!! nice to be able to repack the nexus 5 kernel... awesome job man!!!:good:
[Android Software Development] TheDarkDefender:
I don't find 1.8 in the op. Could you link it please?

Edit:

Ah never mind. Noticed it is being tested.

Sent from my Nexus 4
[Android Software Development] osm0sis:
While being a Snapdragon 800 device, the Nexus 5 kernel doesn't have a dtb, so unfortunately I still need that feature tested before I feel comfortable releasing it.. and those guys above still haven't responded to me.

If you've got a moment, would either of you mind recruiting some people with Note 3's to test? I'd also really like someone with a Vega like [MENTION=581992]hkfriends[/MENTION] since that was the one with the weird extra data I had to work around.

Glad to hear my other new features extend support to the Nexus 5 though! Thanks. :)
[Android Software Development] hkfriends:
Yes, dude

When I had the Vega A880S, it was the first time to see dtb things and [MENTION=3084245]Chenglu[/MENTION] "Xiaolu" help me to fix the problem for my custom kernel

https://github.com/xiaolu/mkbootimg_tools

Unfortunately I sold my Vega and using Note3 which also come with dtb in its kernel structure. I will try again to test note3 and see how is it
[Android Software Development] osm0sis:
If you ever talked to any other Vega owners, please ask them to test as well.
[Android Software Development] Vekhez:
[MENTION=4544860]osm0sis[/MENTION] how does one 'remove' the ramdisk from a kernel. Basically I want to try get LeanKernel working on 4.4.. but to do that I have to remove the ramdisk (like in MPOkang kernel).. but I have no idea how, it's not as simple as delete the ramdisk folder is it?
[Android Software Development] osm0sis:
I think you'd just unpack and then repack without one. Currently if you remove the ramdisk folder AIK will repack it with an empty ramdisk, I think I'll make it more intelligent to allow people to repack ramdiskless. Great idea! :)

Someone go hunt down a Vega user, the features list is piling up and I'd like to release this soon. :p
[Android Software Development] Vekhez:
I tried it with your AK 4.3 kernel (had it on my desktop at the time.. not on my home PC) and I fastboot booted it and it hangs at the google logo and the colours get shot.. you need to battery pull.

I just unpacked it, then deleted the ramdisk folder then rebuilt it.
[Android Software Development] osm0sis:
Yeah, it's packing an empty ramdisk. Like I said, it currently doesn't support it. I added it into my new build but mkbootimg doesn't want to work without a ramdisk...

Edit: Oh wait, I remember why this doesn't work. If you look in the flashable zips for those ramdiskless kernels, they just have the raw unpacked zImage, and it also contains the split_img and mkbootimg android binaries. It extracts the current ramdisk, then repacks the zImage with it and THEN flashes it itself.

So, no way to do that directly with my tool, naturally, because that's not what it's for. You could use my tool to extract the zImage and then grab mpokang's zip and alter it as a skeleton for ramdiskless flashing, but that's a whole other thread. ;)

Either way, someone go hunt down a Vega user, the features list is piling up and I'd like to release this soon. :p

Edit 2: Added this to the DevDB, pretty cool functionality. :)
[Android Software Development] trevd:
Now then.

Just been scanning the thread , I thought I drop some kitkat binaries here

The archive contains

CM's mkbootimg

CM's unpackbootimg

AOSP's mkbootimg

AOSP's mkbootfs

[MENTION=4544860]osm0sis[/MENTION] I don't know if they are any use to you. Also if you need anything else compiling just drop me a pm and I'll see what I can do. :good:
[Android Software Development] xange:
[MENTION=4544860]osm0sis[/MENTION] : i unpack my phone's kernel img, but is it normal to see this message during the unpack?

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

Android Image Kitchen - UnpackImg Script
by osm0sis @ xda-developers

Supplied image: lupus_v8_hallon.img

Setting up work folders . . .

Splitting image to "/split_img/" . . .

BOARD_KERNEL_CMDLINE
BOARD_KERNEL_BASE 00200000
BOARD_PAGE_SIZE 131072
1 [main] od 2148 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer
. Please report this problem to
the public mailing list cygwin@cygwin.com
1 [main] head 4732 find_fast_cwd: WARNING: Couldn't compute FAST_CWD point
er. Please report this problem to
the public mailing list cygwin@cygwin.com
0 [main] cut 3212 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointe
r. Please report this problem to
the public mailing list cygwin@cygwin.com
BOARD_RAMDISK_ADDR 01200000

0 [main] cut 1140 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointe
r. Please report this problem to
the public mailing list cygwin@cygwin.com
1 [main] cut 5048 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointe
r. Please report this problem to
the public mailing list cygwin@cygwin.com
0 [main] file 3064 find_fast_cwd: WARNING: Couldn't compute FAST_CWD point
er. Please report this problem to
the public mailing list cygwin@cygwin.com
Unpacking ramdisk to "/ramdisk/" . . .

Compression used: lzma
0 [main] xz 3124 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer
. Please report this problem to
the public mailing list cygwin@cygwin.com
0 [main] cpio 2040 find_fast_cwd: WARNING: Couldn't compute FAST_CWD point
er. Please report this problem to
the public mailing list cygwin@cygwin.com
10039 blocks

Done!

Press any key to continue . . .

unpacking lupus v8 for xperia neo (is suppose neo and neo v are using the nearly same kernel, so it should work)

OS: windows 8.1 pro

thanks for your attention.
[Android Software Development] osm0sis:
mkbootfs is definitely useful, thanks! AOSP mkbootimg doesn't have any new changes though, by the looks of it, and CM11's only differs with unpackbootimg gaining dtb support, something I already added awhile back in my own (and I think I did a better job because it's conditional and also adds second image, etc.):

http://github.com/osm0sis/mkbootimg/ :D

P.S. Where is AOSP's mkbootfs hosted? I might as well start building it myself along with my mkbootimg/unpackbootimg forks but I don't see it in https://github.com/android/platform_system_core

Thanks buddy! :)
[Android Software Development] osm0sis:
Reported previously, check the release notes for v1.6 for the workaround for Cygwin hating Windows 8.1. ;)
[Android Software Development] trevd:
[MENTION=4544860]osm0sis[/MENTION] Get You w/ your compilering skillz lol :silly: :good: . I bet you wondered why you wasn't doing it all along?

Right here's the link to the AOSP repositories https://android.googlesource.com/ , mkbootfs is in the platform/system/core/cpio directory , obviously we are currently using the android_4.4_r1.1.

However this is not the droid you're looking for as windows needs some symlink support. so I created a repo on my github with the changes. I also created a "real" Makefile. I've you as a calibrator on that repo so you can push changes direct if you get the urge to get your code on. Finally a little treat in the commit message.

Re CM's DBT "implementation" , tell me about it , lol [ http://review.cyanogenmod.org/#/c/51502/ ]
[Android Software Development] xange:
erm, before you told me about the workaround, i repack the img even though there are error messages came out, and i flashed the modified img into my neo, and everything works fine (twrp, cwm, ramdisk), i just replace the bootogo.

thanks.

i was just testing windows 8.1 though, hate it because need to do modified driver for fastboot, flash, adb :mad:

using haswell processor (8th generation chipset), at least manage to make it works.

1 more, maybe change the working device for Xperia Neo V to Xperia 2011 series, most 2011 series are of the same. Except Neo L and Play I can't confirm about these 2 devices.
[Android Software Development] osm0sis:
Haha awesome T to the R to the E to the V... :p

I can't seem to get it to compile under Cygwin with the make command though, were there any special tricks to doing so last time?

Also, if you've got a minute I'd like you to take a look at the Vega image I added the extra-page workaround for; I ended up finding a root-modded version of the same kernel (which looks like it was just a ramdisk repack), and it doesn't have the weird extra-page data either, and apparently it works, so I'm not sure what to do about it.

If you can't find hkfriend's link in the thread I'll PM you one to both images later today. :good:

Edit: [MENTION=4179234]trevd[/MENTION] Sent you a PM but I guess you didn't see it yet. Any tricks to compiling mkbootfs on Cygwin like you did before? Isn't working out-of-the-box for me.
[Android Software Development] osm0sis:
[MENTION=1380660]iB4STiD[/MENTION] when you get another chance (on top of the other stuff I asked you for over in the Nexus 5 RMA thread), I've just discovered that the official CWM for hammerhead has dtb, so if you could unpack and repack it with the v1.8 Beta I sent you and flash to make sure it still works I'd accept that as confirmation we're good for all normal dtb devices even with the Vega extra-page hack and I can probably release. :cowboy::good:
[Android Software Development] ashyx:
Try decompressing it first.
[Android Software Development] osm0sis:
It is gzip compressed but, otherwise I'm not sure what it is.. glancing quickly I'm thinking it's just a pure kernel Image.gz-dtb with no ramdisk. Maybe there's another partition on the device called ramdisk? I'll check into the "boot.img" file further to see if there's actually any ramdisk hiding in there when I get some time.
[Android Software Development] ashyx:
I have one of these devices and I built twrp for it, but can't remember it's format.

I'll have to check it out later.
[Android Software Development] drakulaboy:
here is the partitions list from the device
[Android Software Development] ashyx:
That's no good, you need:

ls -laR /dev/block
[Android Software Development] drakulaboy:
oww, here is it then https://pastebin.com/raw/f5isEmbP
[Android Software Development] ashyx:
Looks normal to me.

How did you obtain the boot image? I don't think it's correct.
[Android Software Development] drakulaboy:
unpacked the firmware and there was a boot.PARTITION , renamed it to boot.img and that's all
[Android Software Development] ashyx:
Strange, that is the correct image. I take it you used the Amlogic customization tool?

Which device is this?
[Android Software Development] drakulaboy:
i used Customization Tool from Here

it's a T95Z Plus with Amlogic S912 cpu, i want to see if i can do something about with no sound from SPDIF....
[Android Software Development] ashyx:
That's the same box I have. I have no issues extracting the images.

I built TWRP for it so something must be amiss somewhere.

I'm guessing the firmware is Nougat that you extracted the boot image from?
[Android Software Development] drakulaboy:
yeap, android 7.1.2 Nougat, i have a problem on this box, the SPDIF optical audio is not working, no sound from it, tried a lot of firmwares, still nothing.
[Android Software Development] levanhau03:
it miui 10 ( redmi note 5 ) android 8.1

http://bigota.d.miui.com/8.6.7/miui_HMNote5_8.6.7_c6c8f54152_8.1.zip
[Android Software Development] osm0sis:
Unpacks and repacks fine here. AVBv1 signing, so maybe your Java 8 setup isn't working?

CC: [MENTION=5787964]SuperR.[/MENTION]
[Android Software Development] levanhau03:
dm-verity not worked sir ?
[Android Software Development] osm0sis:
Is this a question? It's certainly not what you showed me, you showed me a repack error. It repacks just fine with AIK alone. So either your system configuration is messed up with respect to Java (most likely), or there's some issue in conjunction with [MENTION=5787964]SuperR.[/MENTION]'s kitchen (unlikely).
[Android Software Development] ashyx:
I'll have to test that out. Never used it as I use hdmi.

If you have root and/or twrp why not just pull the boot image from the device?

Anyway this is not an AIK issue so maybe it should be discussed else where?
[Android Software Development] G.M.L:
Hi [MENTION=1143630]osmosis[/MENTION]

Recently I was install 3.2.1 recovery edition and after try to change splash screen through my theme and through TWRP Materialized (z31s1g) or change theme color I was take 2 errors can show it in log the main is

chmod: /data/local/twrp/zip: No such file or directory

and

sh: unzip: not found

(In phone I have 7.1.2 rom and the recovery compiled with kernel for Oreo but work)

If you can take a look at log I will really appreciate
[Android Software Development] osm0sis:
Seems like you've got a $PATH problem somehow. I see the theme is still echoing my fake /sbin/su haxx, that could definitely be part of the problem because it's no longer necessary on my latest releases.

Edit: I just tried on my OP5T with the latest TWRP 3.2.1-2 and Materialised theme and I can't reproduce your issue. Change theme color, adapt splash and change splash to a PNG all worked perfectly with no fuss from AIK-mobile.

So more likely you used a zip or did something on the command line beforehand that messed with the PATH?
[Android Software Development] G.M.L:
Yes very strange.

For the first part ok i was changes the codes from yor last snippet [THEME][TWRP] TWRP Materialised

For the second part this is the strange because with 3.1.1-2 recovery edition works all normal

after change to 3.2.1-0 without to change anything in theme codes not working.

Is it possible to be different directory from /data/local/twrp in 3.2.1-0?
[Android Software Development] osm0sis:
So it's a recovery bug on your specific device. :(

The directory itself doesn't matter, it sounds like the $PATH is broken/missing. Try `echo $PATH`. So what it sounds like you need to do is add export PATH="/sbin:$PATH" as a workaround for your broken recovery temporarily.
[Android Software Development] G.M.L:
Last question and sorry for the disturb because I'm not have lot knowledge with codes

Change this

export LD_LIBRARY_PATH="$savedpath";

With this?

export PATH="/sbin:$PATH"
[Android Software Development] osm0sis:
No, that's something totally different. Like I said, you need to ADD export PATH="/sbin:$PATH"; feel free to add it above that line though if you want. You should probably be testing further to find out what's actually going on with $PATH before hacking stuff into the theme though.. `echo $PATH` from the recovery command prompt for starters.
[Android Software Development] x1haimx:
can you help me to create an twrp image for Huawei Y560-l01 , cause i can't found twrp img for my device
[Android Software Development] osm0sis:
No, not what I do and not what this thread is for.

TWRP How-To is here: https://xdaforums.com/showthread.php?p=32965365#post32965365

Or ask for help on their IRC channel: http://webchat.freenode.net/?channels=twrp
[Android Software Development] x1haimx:
Thank you so much , i will text you if i did it!

:good:;)
[Android Software Development] mrpascal:
Hey [MENTION=4544860]osm0sis[/MENTION] I have written an python script to automate unpackimg and repackimg for your tool . . . :)

I just wanted to contribute happily to your project and also wanted to master my skills . . .

I have also made the executable of my python file so it can be used more easily without python interpreter. .

Can you please give me a chance to show my skills to the other developer :) and to peoples here at xda

You , [MENTION=631273]Chainfire[/MENTION] , [MENTION=4470081]topjohnwu[/MENTION] , [MENTION=402300]amarullz[/MENTION] , [MENTION=3279307]andip17[/MENTION] and [MENTION=4365701]psndna88[/MENTION] are my mentors

I hope you will see this post [MENTION=4544860]osm0sis[/MENTION]

Waiting for your reply. . . . . . :)

regards

mrpascal
[Android Software Development] ashyx:
It's already automated. What more needs to be done? :confused:

The simplicity and ease of use is what makes me prefer AIK other any other unpacking tool.
[Android Software Development] mrpascal:
See this . . .
[Android Software Development] ashyx:
I see what you're trying to do and it's a nice touch. However I'm pretty sure [MENTION=4544860]osm0sis[/MENTION] has considered making such a script himself, but is trying to keep it simple.

I actually prefer how it is.

That being said there is likely a good few that will appreciate your efforts.

I don't think [MENTION=4544860]osm0sis[/MENTION] minds AIK being used in other projects as long as full credit is given and the project is kept up to date, so maybe it's worth it's own thread?
[Android Software Development] mrpascal:
Thanks for your feedback :), I just want that if [MENTION=4544860]osm0sis[/MENTION] include this little touch in his AIK so this will be a huge shoutout for me:o
[Android Software Development] osm0sis:
Okay, to be honest, first thing I thought was this:

:laugh:

But all kidding aside, nice work! As [MENTION=4899305]ashyx[/MENTION] intuited, in the past I have of course considered making AIK fit the more typical menu-based definition of "kitchen," but I prefer a one-click solution so that's what I made, and I think that's how it should stay.

For reference, I also won't be including anything that isn't cross-platform for all the different ones AIK supports, i.e. Windows (x86), Linux (i686, x86_64), macOS (i386, x86_64), Android (arm/64, x86/_64, mips/64). That said, you're welcome to have it available in another thread as a sort of AIK-Win32 "menu add-on" for any interested in such a thing, and I appreciate your interest in contributing to the project.
[Android Software Development] Rom:
@osm0sis

Hello :)

I'm actually trying to unpacking my stock boot img file from my LG G6 (H870) with your unpackimg bat tool, and i get an error:

Supploed image: boot.img
Setting up work folders . . .
Unrecognized format.
Error!

Initialy, i unpack the boot.emmc.win file with your tool, browse into split_img, unzip "boot.emmc.win-zlimage" by 7-zip, browse into the uncompressed folder and rename the "boot.emmc" file to "boot.img" file, but it's unable to unpack for editing, how i can make that ?
[Android Software Development] osm0sis:
So it sounds like you already unpacked it. Instead of going into split_img go into ramdisk, that's all there is to edit.
[Android Software Development] Rom:
Okay, and to remove the warranty warning message, what files would you go through first?

I hesitate between kernel and ramdisk for beginning.
[Android Software Development] osm0sis:
Don't know what that is.. Sounds more like a bootloader/imgdata thing if it's early in the boot, or if it's that white dialog behind the lock screen then it's a dtb dm-verity thing, and you can fix it by flashing Magisk with keep verity checked.
[Android Software Development] Rom:
This is the message that has been implemented directly at the AOSP level by Google, so that developers can let them decide whether or not they accept that end users like us can or cannot unlock the bootloader in order to have root access, which does as you know skip the guarantee.

On some phones, some users have already managed to figure out how to remove or disable this famous message when the phone starts.

Technically, and concerning my phone in the office, more information is provided by one of the members of a team who had already handled the case of the previous LG phones:

https://xdaforums.com/lg-g6/how-to/official-lg-g6-bootloader-unlock-t3614719/
[Android Software Development] osm0sis:
That didn't really explain what you mean.. but I'm guessing you mean the bootloader message, which isn't something AIK can change since it's not part of the boot or recovery partitions.

Check out this thread: https://xdaforums.com/showthread.php?t=2764354
[Android Software Development] Rom:
I'm talking about the warning message every time an android phone starts receiving with an unlocked bootloader.

I know that your tool, although very powerful, would not have helped me to remove the message in question, i will dive into the link that you quoted, thanks for your help.
[Android Software Development] phenoxis:
I have a patched_boot.img generated by magisk that I have confirmed has root and su working.

I'm able to unpack this image with AIK and this creates a ramdisk and split_img directory.

However, the su binary appears to be missing under ramdisk/sbin.

Now, I do a simple

echo "test" >ramdisk/test.txt

(as root) which executes fine and creates a test.txt file under ramdisk.

When I repack this using repackimg.sh with my Image.gz-db file, the resulting image doesn't have root anymore OR the test.txt that I created.

I don't quite understand what's going wrong.
[Android Software Development] osm0sis:
Well, first thing, Magisk doesn't create a su binary anymore, it's all in init which it replaced. Next, any logs? Image or device info? If it's a system-as-root device then the ramdisk you're editing is technically the recovery ramdisk and your new Image.gz-dtb probably doesn't have the hex patch or cmdline patch to allow the rooted ramdisk to override the system one.

Check the Pixel and system-as-root notes linked from the OP of my AK2 thread.
[Android Software Development] phenoxis:
Ah, sorry. I'm coming straight from simpler (Marshmallow) times. I'm trying to do this on a OnePlus 6. I'm not sure what type of boot image it uses.

My goal right now is to have access to dmesg and root on custom kernels that I build. Unfortunately, my kernel builds seem to have wifi disabled which prevent me from doing the magisk patching after I boot into my kernel. Therefore, I was hoping to use a patched kernel and just replace the Image.gz-dtb file and have it work.

Finally, would the AnyKernel2 OP be this thread?
[Android Software Development] osm0sis:
OP6 is definitely system-as-root, meaning it's got the formerly rootfs files as part of the system partition now. It's also a slot device so you've got to make sure you're not running into issues flashing because of that, but yeah building your own custom kernel you'll need to at least hex patch skip_initramfs -> want_initramfs (what Magisk does), or ideally add the patch from flar2 to toggle skip_initramfs using the skip_override on the cmdline in split_img.

And yeah, that's AK2. Links I'm referring to are in the bold paragraph.
[Android Software Development] phenoxis:
So, I included the flar2 patch on my kernel build and added the commands you listed in the post about system-as-root on pixel.

if [ -d $ramdisk/.subackup -o -d $ramdisk/.backup ]; then
patch_cmdline "skip_override" "skip_override";
else
patch_cmdline "skip_override" "";
fi;

if [ -d $ramdisk/.backup ]; then
overlay=$ramdisk/overlay;
elif [ -d $ramdisk/.subackup ]; then
overlay=$ramdisk/boot;
fi;

list="init.rc"; # Not sure waht this list should contain
for rdfile in $list; do
rddir=$(dirname $rdfile);
mkdir -p $overlay/$rddir;
test ! -f $overlay/$rdfile && cp -rp /system/$rdfile $overlay/$rddir/;
done;

I booted a magisk-patched boot image and set up my anykernel.sh with:

kernel.string=BTM Kernel by gurupras@buffalo.edu
do.devicecheck=1
do.modules=0
do.cleanup=0
do.cleanuponabort=0
device.name1=OnePlus6
device.name2=enchilada
device.name3=
device.name4=
device.name5=
'; } # end properties

# shell variables
block=/dev/block/bootdevice/by-name/boot;
is_slot_device=1;
ramdisk_compression=auto;
...
dump_boot;
# begin ramdisk changes
# contains code shown above
# end ramdisk changes

I'm not sure what I'm missing at this point, but I feel like it's still using the default(?) initramfs which doesn't contain the magisk patches.

As a result, I see that the kernel version it is running is in fact mine, but I don't have access to root.