yashsingh1/xdaforums huggingface dataset:
[Android Software Development] asgharSo:
i run AIK with process in c#

my project run as administrator

if you unpack img with run as administrator , you cannot access ramdisk directory to edit and create file or dir.

windows 10 64

but not problem if i unpack img with normally
[Android Software Development] osm0sis:
So just unpack it normally, that's how I intended it, so I'm not about to fix something that isn't broken.
[Android Software Development] asgharSo:
AIK has a problem with run as administrator and then does not allow access to ramdisk.

I just wanted to report this.

Now you say this is not a project problem, there is no problem, we are the solution to this problem...

this problem is on

"%bin%"\chmod -f 755 ramdisk >nul 2>&1

thanks
[Android Software Development] osm0sis:
No, you're the cause of the problem, AIK isn't meant to be run as administrator. If you don't set ramdisk root as 755 you will break some ramdisks that don't set that themselves.

I've spent 5 years on getting it working well under Windows without mkbootfs, not sure why you don't get how complex that is and take my word for how I intend it to run for these reasons.
[Android Software Development] asgharSo:
I respect your efforts.And as I used in my project,

You said "AIK isn't meant to be run as administrator" and I say no problem, we'll fix it ourselves (sorry ,previous meaning is Google Translate's fault :fingers-crossed:)

I set ramdisk folder to 755 before repacking and there are no problems at the moment.

Thankful :highfive:
[Android Software Development] osm0sis:
Interesting, but then unfortunately you run into an inconsistent setup, with things only working for you until you repack, after which you wouldn't be able to edit anymore until you unpacked again to set the ramdisk up again without the chmod 755.

Honestly your best bet is to figure out how to make your C# program run AIK without administrator privs.
[Android Software Development] asgharSo:
Whatever you say is true.

Good luck
[Android Software Development] hadad:
Very useful tool, I still remember until now while learning to port ROM I often use AIK to configure boot.img. And now I didn't think that AIK already has a mobile version for the magisk module. Awesome :):good:
[Android Software Development] RebelLion_:
Idk about Windows, but Linux sudo has an option to run a command as a user even if you are in a superuser shell. Maybe Windows has something like this in its powershell, to run a command as a user other than the current admin or whatever?
[Android Software Development] asgharSo:
I extract ramdisk by run as administrator with 777 access.

Then I give it 755 access before I want to pack.

Just a few minutes ago I tested on m3 m305f and the phone booted without any problems.

But about your question.

Yes, this is possible, but it asks the user for password information, and if you publish public software, no one will trust why the software asks the user for their computer password.

If you want to set 755 access to a folder by running as admintrator with the chmod binary in aik, access to the desired folder will be unavailable even as an administrator.Unless you want to change the access to the desired folder again with chmod to another access.
[Android Software Development] kory-vadim:
When unpacking boot.img on the phone, it gives the following error:

Android Image Kitchen - UnpackImg Script

by osm0sis @ xda-developers

Supplied image: boot.img

Removing old work folders and files...

Setting up work folders...

Image type: OSIP

Signature with "AVBv2" type detected.

Splitting image to "split_img/"...

header size 0

sig size 0

bootstub size 8192

mboot: unpacking error: kernel size likely wrong

Error!

Defines as, Image type: OSIP, but should be Image type: AOSP.

If in the androidbootimg.magic file you comment out the line: 1000 search \ xFC \ xFA \ xBC \ x00 OSIP bootimg (headerless), then it is normally detected and unpacked.
[Android Software Development] osm0sis:
Upload your file or how do you expect me to help you?
[Android Software Development] kory-vadim:
For some reason I can't upload to the site, here is a link to google disk

https://drive.google.com/file/d/1DjzL8QsW73UzSSpJWDTNNDxhFS2E2MF3/view?usp=drivesdk
[Android Software Development] osm0sis:
Interesting! Can confirm that does indeed trigger a false positive OSIP detection. I'll look into it more. :good:
[Android Software Development] harissiddiq:
Supplied image: boot.img.lz4

Removing old work folders and files . . .

Setting up work folders . . .

Splitting image to "/split_img/" . . .

Android magic found at: 21

BOARD_KERNEL_CMDLINE idboot.selinux=permissive

BOARD_KERNEL_BASE 10000000

BOARD_NAME 18A003KU

BOARD_PAGE_SIZE 1006632960

BOARD_KERNEL_OFFSET 00008000

BOARD_RAMDISK_OFFSET ef000711

BOARD_SECOND_OFFSET f0100001

BOARD_TAGS_OFFSET f1000008

BOARD_DT_SIZE 1393688577

Unpacking ramdisk to "/ramdisk/" . . .

Compression used: data

Error!

Press any key to continue . . .

i am stuck at that a50 boot android 9

---------- Post added at 03:16 AM ---------- Previous post was at 03:16 AM ----------

Supplied image: boot.img.lz4

Removing old work folders and files . . .

Setting up work folders . . .

Splitting image to "/split_img/" . . .

Android magic found at: 21

BOARD_KERNEL_CMDLINE idboot.selinux=permissive

BOARD_KERNEL_BASE 10000000

BOARD_NAME 18A003KU

BOARD_PAGE_SIZE 1006632960

BOARD_KERNEL_OFFSET 00008000

BOARD_RAMDISK_OFFSET ef000711

BOARD_SECOND_OFFSET f0100001

BOARD_TAGS_OFFSET f1000008

BOARD_DT_SIZE 1393688577

Unpacking ramdisk to "/ramdisk/" . . .

Compression used: data

Error!

Press any key to continue . . .

i am stuck at that a50 boot android 9
[Android Software Development] osm0sis:
And why would you think it could handle a boot.img.lz4? The OP clearly states AIK is for boot.img, so go ahead and decompress your lz4 file first... :rolleyes:
[Android Software Development] lchang.atsoft:
Image with separate partitions

Hi osm0sis,

I have an image that is made up of separate partitions (such as boot, system, vendor, odm, etc.) The boot partition is very small and it doesn't contain any ramdisk. Can your tool be used to unpack and repack the system partition? If yes, could you tell me how? Thanks!
[Android Software Development] osm0sis:
super.img doesn't contain boot, boot is in a separate partition, and no super can't be unpacked with this. I think [MENTION=5787964]SuperR.[/MENTION]'s can though. Once you have an actual boot partition dump you can unpack it with AIK.
[Android Software Development] i@life:
Help

Hello anyone, How to fix touch screen with editing /copy base Rom to new Rom on aosp or making some update script copy from base??.... please need help my device run on Android 7 but i want to go new Rom 8
[Android Software Development] ipdev:
Hi.

Just Ran into some new boot images that I can not unpack.

Pixel 4a (5G) - bramble-rd1a.200810.020

Pixel 5 - redfin-rd1a.200810.020

Both error out when unpacking.

Image type: AOSP

Signature with "AVBv2" type detected.

Splitting image to "split_img/"...
BOARD_KERNEL_CMDLINE
BOARD_KERNEL_BASE 0x00d6f1a6
BOARD_NAME
BOARD_PAGE_SIZE 0
BOARD_HASH_TYPE sha1
BOARD_KERNEL_OFFSET 0x00008000
BOARD_RAMDISK_OFFSET 0xff291486
BOARD_SECOND_OFFSET 0xff290e5a
BOARD_TAGS_OFFSET 0xff290e5a
BOARD_HEADER_VERSION 3
BOARD_HEADER_SIZE 0
unpackbootimg: malloc.c:2379: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
./unpackimg.sh: line 218: 781569 Aborted (core dumped) "$bin/$arch/unpackbootimg" -i "$img"
Error!

These both include a vendor_boot.img but, I did not think that was the answer.

Unrecognized format.
Error!

I thought I read something about it some where but, my search-foo is not working tonight.

Must be too many symlinks to follow or a broken-pipe in my brain tonight. :D

If someone can point me in the correct direction, I would appreciate it.

--

I can unpack Pixel 4a (sunfish) along with the 4(s), 3a(s), 3(s) and 2(s).

rp1a.201005.006

I re-downloaded AIK from the OP to make sure I was using the newest version. (v3.7).

I tried on Linux [fedora 32 with cpio 2.13]

I know cpio version 2.13 causes problems. I have not found a compatible repo to downgrade from.

Manually downgrading I keep finding more dependencies that I have to manually downgrade as well.

Android 10 [custom aex rom Nexus 7 (2013)]

MacOS (10.13.6)

The boot image(s) I pulled from the factory roms.

Boot images GoogleDrive - Link

I doubt I need to link it but, to be compleate.

Google Factory Images developers.google - Link

Cheers. :cowboy:
[Android Software Development] osm0sis:
Yep, bramble and redfin use bootimg hdr_v3 which is not yet supported by my C mkbootimg/unpackbootimg and AIK. I finally received my new PSU in the mail and got my PC working again over the weekend however, so I'm hoping to start work on the bring-ups soon. 🤞
[Android Software Development] techdoctorusa:
view current folder on android

by running this shell script

https://www65.zippyshare.com/v/f0lCEyQn/file.html

run with FX File Explorer: the file manager with privacy

https://play.google.com/store/apps/details?id=nextapp.fx

why is this useful

well some linux programs

require to cd to current folder

now with this script you can

replace print $folder with cd $folder

to cd to current folder

just modify script to your needs

maybe get aik-linux running on android
[Android Software Development] thetoolz:
sh: /storage/emulated/0/Download/AIK-mobile/unpackimg.sh[50]: /storage/emulated/0/Download/AIK-mobile/bin/busybox: can't execute: Permission denied

sh: /storage/emulated/0/Download/AIK-mobile/unpackimg.sh[66]: /storage/emulated/0/Download/AIK-mobile/bin/remount.sh: can't execute: Permission denied

Keep getting permission denied how do I fix
[Android Software Development] osm0sis:
Looks like you unzipped it into your sdcard. It's a flashable zip. Install it properly via Magisk Manager, FKM or TWRP and follow the instructions.
[Android Software Development] lchang.atsoft:
Initialization Screen

When Android starts for the first time after a ROM flash, there is a screen with a progress bar where Android installs pre-apps. I would like to change the background on that screen but can seem to figure out where it is located. It is probably embedded in an app. Does anyone know? Can you point me in the right direction? Thanks!
[Android Software Development] Franc89:
Elf unpack and repack support only Sony or can support also abl.elf ?
[Android Software Development] osm0sis:
Hmm? ELF Android boot.img is only a Sony thing, and old Sony devices at that; they've since embraced the standard, though still have their custom SIN signing. abl is a bootloader partition, so not able to be unpacked regardless.
[Android Software Development] lchang.atsoft:
Amlogic Logo Partition

Does anyone know, on an Amlogic device, what is the format of the logo.PARTITION? It contains several BMP images such as bootup, upgrade_success, upgrade_error, etc. I want to know how they are packed and what tool I can use to unpack and repack them. Thanks!
[Android Software Development] alphahere:
Plenty of info at this website.

https://wiki.odroid.com/odroid-n2/software/building_android
[Android Software Development] dirtyreturn:
https://r.tapatalk.com/shareLink/to...1&share_fid=3793&share_type=t&link_source=app

[08/03/2019] AMlogic Tools [7.1.0][A new milestone][Donate Version Available]
[Android Software Development] &(*):
[MENTION=4544860]osm0sis[/MENTION]

Is there anyway to also repack a vendor image with this tool? I am having issues getting the android build system to function properly in linux and keep getting an error from ninja when trying to compile and build a vendor.img along with boot.img. Shell will build the dtb for kernel and that's it.
[Android Software Development] Hitman478™:
I'm unable to extract prodcut.img from oneplus 7t original oxygenos, i've seen that the phone is in supported list, however i'm getting this error (see screenshot), other partition are working, tried boot and recovery
[Android Software Development] tbalden:
System image isn't either kernel image or recovery image stated in the original post. So it shouldn't really work for any device, I'd opine. It must be an accidental side product if it works for some.
[Android Software Development] Hitman478™:
Yeah, system and vendor not working too.. i'd like to open that product.img but i'm not able with anything and it's annoying :(
[Android Software Development] Manssizz:
hi.. i try to unpacking amlogic based recovery, this my original recovery.img. but i have error like this log.

Spoiler content hidden.
[Android Software Development] osm0sis:
Same issue as this in the second post:

Xiaomi Mi Box 3S - some newer Amlogic devices use special image signing that adds an "AMLSECU!" signature within the header and appears to encrypt the ramdisk, so the image itself will unpack/repack but cannot be re-signed, and the ramdisk cannot be unpacked or modified

What's your device called? I'll add it to the unsupported list.
[Android Software Development] Manssizz:
thanks for quickly replies

my device is ZTE B860H with amlogic s905x. tested with 2 variant 1/8 and 2/8 doesn't work
[Android Software Development] HemanthJabalpuri:
@osm0sis

when I am trying to unpack without root, I am getting cpio: can't stat old file: Permission denied.
[Android Software Development] osm0sis:
What command did you use? Full log and image file.
[Android Software Development] HemanthJabalpuri:
Main thing I am doing is executing without root.

It is normal AOSP boot.img. busybox cpio gives that error, but not full cpio. Tested in Termux.
[Android Software Development] osm0sis:
Oh, so you're willfully using it wrong.
[Android Software Development] HemanthJabalpuri:
Yes. I don't has a rooted mobile now. But want to patch it for someone.
[Android Software Development] osm0sis:
Then use the desktop versions. Mobile requires root for the environment setup.
[Android Software Development] Koken2003:
Hi. I'm using Redmi K30 4g. When I just unpack and repack the recovery.img without changing anything, it doesn't boot anymore. Device boots into fastboot mode. Before unpack repack, it worked perfectly.
[Android Software Development] osm0sis:
As always, upload the file and a log. Also, what platform did you try to unpack on? If Windows, try Mobile perhaps.
[Android Software Development] ingbrzy:
@osm0sis

Happy new year at first!

I have tried to unpack (AIK3.7 linux) boot.img, vendor_boot.img, vm-bootsys.img from Xiaomi Mi 11 (android 11 device) and have following errors:

boot.img

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

Supplied image: boot.img

Setting up work folders...

Image type: AOSP

Signature with "AVBv2" type detected.

Splitting image to "split_img/"...
BOARD_KERNEL_CMDLINE
BOARD_KERNEL_BASE 0x013ef7aa
BOARD_NAME
BOARD_PAGE_SIZE 0
BOARD_HASH_TYPE sha1
BOARD_KERNEL_OFFSET 0x00008000
BOARD_RAMDISK_OFFSET 0xfec10e82
BOARD_SECOND_OFFSET 0xfec10856
BOARD_TAGS_OFFSET 0xfec10856
BOARD_HEADER_VERSION 3
BOARD_HEADER_SIZE 0
unpackbootimg: malloc.c:2379: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
/home/ingbrzy/Downloads/AIK-Linux-v3.7-ALL/AIK-Linux/unpackimg.sh: line 218: 81778 Aborted (core dumped) "$bin/$arch/unpackbootimg" -i "$img"
Error!

vendor_boot.img

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

Supplied image: vendor_boot.img

Setting up work folders...

Unrecognized format.
Error!

vm-bootsys.img

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

Supplied image: vm-bootsys.img

Setting up work folders...

Unrecognized format.
Error!

Here is Xiaomi Mi 11 boot.img, vendor_boot.img, vm-bootsys.img

File on MEGA

mega.nz

Thank you for your help!
[Android Software Development] osm0sis:
Yep hdr v3 isn't supported yet, as already reported. I hope to get to the bring-up soon. 👍
[Android Software Development] morpheus______:
If you need help with that, DM me. imjtool (http://newandroidbook.com/tools/imjtool.html) supports v3 allready. Here's an illustration with the format
[Android Software Development] osm0sis:
Yeah it's not hard I just need more free time! 😶

I'm off for a week tomorrow from work, but I've got some big projects I still need to get done at our new house too, so 🤞
[Android Software Development] bin120499075:
Hope to update the Android 11 support code as soon as possible, thank you.
[Android Software Development] scarlet-glass:
Hi @osm0sis

I also encountered the problem of failure to understand the package, and I hope to fix it as soon as possible to support Android 11.

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

Supplied image: boot.img

Setting up work folders . . .

Image type: AOSP

Signature with "AVBv2" type detected.

Splitting image to "split_img/" . . .

BOARD_KERNEL_CMDLINE
BOARD_KERNEL_BASE 0x009e57e4
BOARD_NAME
BOARD_PAGE_SIZE 0
BOARD_HASH_TYPE sha1
BOARD_KERNEL_OFFSET 0x00008000
BOARD_RAMDISK_OFFSET 0xff61ae48
BOARD_SECOND_OFFSET 0xff61a81c
BOARD_TAGS_OFFSET 0xff61a81c
BOARD_HEADER_VERSION 3
BOARD_HEADER_SIZE 0
0 [main] 飪県
飩€飩?飩夛倸 飩€RJ飩?548 cygwin_exception::open_stackdumpfile: Dumping stack trace to unpackbootimg.exe.stackdump
Error!
[Android Software Development] tomatolei:
AIK-Linux-v3.7-ALL.tar.gz无法解压缩s21 boot.img

error info

Android Image Kitchen - UnpackImg Script

by osm0sis @ xda-developers

Supplied image: boot.img

Setting up work folders...

Image type: AOSP

Signature with "AVBv2" type detected.

Splitting image to "split_img/"...

BOARD_KERNEL_CMDLINE boot.hardware=qcom androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 androidboot.usbcontroller=a600000.dwc3 swiotlb=2048 loop.max_part=7 cgroup.memory=nokmem,nosocket firmware_class.path=/vendor/firmware_mnt/image printk.devkmsg=on

BOARD_KERNEL_BASE 0x000a7901

BOARD_NAME ole=null androidboot.hardware=qcom androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 androidboot.usbcontroller=a600000.dwc3 swiotlb=2048 loop.max_part=7 cgroup.memory=nokmem,nosocket firmware_class.path=/vendor/firmware_mnt/image printk.devkmsg=on

BOARD_PAGE_SIZE 0

BOARD_HASH_TYPE sha1

BOARD_KERNEL_OFFSET 0x00008000

BOARD_RAMDISK_OFFSET 0xfff58d2b

BOARD_SECOND_OFFSET 0xfff586ff

BOARD_TAGS_OFFSET 0xfff586ff

BOARD_OS_VERSION 57.91.77

BOARD_OS_PATCH_LEVEL 2118-03

BOARD_HEADER_VERSION 3

BOARD_HEADER_SIZE 0

unpackbootimg: malloc.c:2401: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.

/home/AIK-Linux-v3.7-ALL/unpackimg.sh: 行 218: 89884 已放弃 (核心已转储) "$bin/$arch/unpackbootimg" -i "$img"

Error!

root@leilei-virtual-machine:/home/AIK-Linux-v3.7-ALL#
[Android Software Development] osm0sis:
Y'all need to read. Literally any of my recent replies.
[Android Software Development] boxcubee:
@osm0sis

Thank for your hard work & this great tools.

Is there any way to make files on ramdisk having N/A timestamp by using aik for mobile ?
[Android Software Development] osm0sis:
I don't see any command line options in cpio that would let you remove timestamps from a ramdisk altogether.
[Android Software Development] boxcubee:
In the past I accidentally got the "N/A" timestamp after repacking & I don't know why.

any trick probably ? :unsure:

Flashing magisk on my device could change the timestamp but magisk is detected & I think it is not a must since I don't need root nowadays. I use aik to put a simple script in my device ramdisk.
[Android Software Development] soilentgreen:
sudo.exe inside android Image Kiitchen v.3.7 detected by 30 engines as Trojan/Malicious...

Virus Total

and hybrid-analysis

So it is safe to use?
[Android Software Development] osm0sis:
Read the OP, Windows sudo is built from source and is safe. It simply triggers a lot of heuristics because it asks for Administrator privileges. Please submit it as false positive to wherever you can. Windows Defender already accepted it as false positive thanks to @SuperR.
[Android Software Development] soilentgreen:
It seems to me as false positive too. I reported it as false positive few hours ago to emsisoft, so I wait for their answer.
[Android Software Development] CXZa:
So, someone puts a virus into some package and you ask him is it safe??

It's probably safe, but it sucks because of these alerts. There are alternative ways of doing it, but O insists to use his sudo for some reason. It would be easier for users if he would not... IMO
[Android Software Development] osm0sis:
We're not going back to mkbootfs, and we're not going to hack in secondary scripts. I've yet to see a better way than Windows sudo, since only it can pipe output correctly.

x86 (Win32) build · Issue #10 · mattn/sudo

Hi! Could you please add a Win32 (x86) build to your 0.0.1 release? I've been struggling to find a self-contained elevated command executor for Windows that pipes output correctly, and this looks l...

github.com
[Android Software Development] soilentgreen:
The reason I asked it becuse it seemed weird that tool with source, on xda, and made by @osm0sis who is Recognized Developer / Recognized Contribut, is detected by 30 engines.

But I don't understand your replay, In one hand you say it's virus and "sting" me.

on the other hand you say it probably safe.

Are you using that tool?
[Android Software Development] osm0sis:
He was just being sarcastic.
[Android Software Development] soilentgreen:
I didnt realise it

Shame on me!!
[Android Software Development] soilentgreen:
VirusTotal

VirusTotal

www.virustotal.com

So now it detected by 25 engines and not 30 like yesterday included Emsisoft.
[Android Software Development] CXZa:
One can never be sure... ;)

(actually people are many times a bit too paranoid, IMO...)

Antivirus "False Positive" Problems

Antivirus False Positive Problems

www.nirsoft.net

NirBlog » Blog Archive » Antivirus companies cause a big headache to small developers.

I use tool, naturally, otherwise why bother... good tool...

But I don't use the sudo.exe. Avira quarantined it, and some other tools some of which were my own. Then I removed Avira, and forgot to restore files from its quarantine, dammit !

Also that sudo causes two prompts which too can be a bit annoying - unless your admin password is like space.

Last time I suggested replacing it with some elevate prog. which didn't cause alarm. I also have talked about using vbs. and also about just checking if admin and then asking user to run bat as admin...

vbs, this: http://ss64.com/vb/syntax-elevate.html

Also, I mainly unpack to check these images and admin rights are not needed that often when repacking. So, I have just used AIK without it.

I now made this repackimg_noSUDObutVBS.bat. I don't understand why vbs is not an option, It seems to work okay.
[Android Software Development] 8oldemar:
These utilities are not needed for Windows, right?

I cannot build an image with which my Xperia 5m2 can boot successfully. Even if I don't make any changes. Just unpack and repack. And no errors are given. After writing image-new.img in fastboot mode, my device stops loading. But one person from github.com wrote that he used AIK (though for Linux) and received a root on his Xperia on android 11.
[Android Software Development] osm0sis:
No idea what you mean "not needed for Windows", they're included in the AIK zip.

Try unpack and repackimg --original, and see if that boots. Then upload the untouched .img and the broken image-new.img with unpack/repack logs and I'll take a look.
[Android Software Development] 8oldemar:
With original it's boots. With only unpacked+repacked (not modified) - no, at the stage of loading the kernel, my device writes that the software is corrupted and turns off. The size of the new image is 2 times smaller than the original - is this normal?