FORUMS
Remove All Ads from XDA

[TOOL] Android Image Kitchen - Unpack/Repack Kernel Ramdisk [Win/Android/Linux/Mac]

13,544 posts
Thanks Meter: 29,808
 
By osm0sis, Recognized Developer / Recognized Contributor on 30th December 2012, 03:55 PM
Post Reply Email Thread
27th July 2017, 04:06 AM |#1361  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 29,808
 
Donate to Me
More
Quote:
Originally Posted by cascabel

Apologies. I fell asleep last night (too tired). Tried that but it doesn't do anything. I notice --uninstall also remounts system and it works. I'm using Privacy Guard, not superSU (goves me bootloops). Could that be it? Tried replacing $aik with the set path (/data/local/AIK-mobile) and it gives permission error.

Perhaps. It's all acting fine on the command line but weird via script with your setup. If you're open to it, try SuperSU.
The Following User Says Thank You to osm0sis For This Useful Post: [ View ]
 
 
29th July 2017, 04:49 AM |#1362  
Senior Member
Flag Indianapolis, IN
Thanks Meter: 1,276
 
More
If I use your unSU app to remove su, with systemless root, does it replace the backed up boot image or does it continue to use the one patched by supersu?
If not, Is there a command line option to do that or should I back it up first?
Finally, is sepolicy the only thing supersu patches in the boot or are there other things patched by It?
Thanks
29th July 2017, 05:44 AM |#1363  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 29,808
 
Donate to Me
More
Quote:
Originally Posted by martyfender

If I use your unSU app to remove su, with systemless root, does it replace the backed up boot image or does it continue to use the one patched by supersu?
If not, Is there a command line option to do that or should I back it up first?
Finally, is sepolicy the only thing supersu patches in the boot or are there other things patched by It?
Thanks

You're getting pretty off topic here, and these are all questions you can answer yourself.

Read the instructions for unSU in the post it's attached to.

Read the documentation in the SuperSU zip update-binary header.
The Following 3 Users Say Thank You to osm0sis For This Useful Post: [ View ]
29th July 2017, 05:26 PM |#1364  
Senior Member
Flag Indianapolis, IN
Thanks Meter: 1,276
 
More
Quote:
Originally Posted by osm0sis

You're getting pretty off topic here, and these are all questions you can answer yourself.

Read the instructions for unSU in the post it's attached to.

Read the documentation in the SuperSU zip update-binary header.

Sorry for being OT here.
I did find those and read them after my post.
The Following User Says Thank You to martyfender For This Useful Post: [ View ] Gift martyfender Ad-Free
29th July 2017, 11:01 PM |#1365  
XCnathan32's Avatar
Senior Member
Flag Texas
Thanks Meter: 1,001
 
Donate to Me
More
You're a godsend. I spent forever trying to figure out how to modify a ramdisk without screwing up the permissions, but your tools worked perfectly. Thank you.
The Following User Says Thank You to XCnathan32 For This Useful Post: [ View ] Gift XCnathan32 Ad-Free
31st July 2017, 01:30 AM |#1366  
Senior Member
Flag Cairo
Thanks Meter: 181
 
More
Hello @osm0sis

I want to say thanks alot for ur AIK-mobile it saved me to modify boot.img ASAP without being near laptop. So it amazing but i noticed a weird behavior as attatched.

I'm using mixplorer, busy box for android NDK and magisk. I copied boot.img in same path with unpackimg.sh but excute failed.
Also in emulator it failed.
Success scenario achieved when typing full path of .sh and .img .
I think I'm missed something but i was on a hurry to use for fix issue in boot.img.
Sorry if I'm missed notes in any post.
Please advice.

Click image for larger version

Name:	Screenshot_20170731-020422.jpg
Views:	282
Size:	102.5 KB
ID:	4228250Click image for larger version

Name:	Screenshot_20170731-020621.jpg
Views:	272
Size:	143.6 KB
ID:	4228251Click image for larger version

Name:	Screenshot_20170731-022000.jpg
Views:	278
Size:	215.2 KB
ID:	4228252

Regards,
Ahmed
31st July 2017, 01:31 AM |#1367  
Senior Member
Flag Cairo
Thanks Meter: 181
 
More
Deleted.
31st July 2017, 04:31 AM |#1368  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 29,808
 
Donate to Me
More
Quote:
Originally Posted by atarek

Hello @osm0sis

I want to say thanks alot for ur AIK-mobile it saved me to modify boot.img ASAP without being near laptop. So it amazing but i noticed a weird behavior as attatched.

I'm using mixplorer, busy box for android NDK and magisk. I copied boot.img in same path with unpackimg.sh but excute failed.
Also in emulator it failed.
Success scenario achieved when typing full path of .sh and .img .
I think I'm missed something but i was on a hurry to use for fix issue in boot.img.
Sorry if I'm missed notes in any post.
Please advice.

Attachment 4228250Attachment 4228251Attachment 4228252

Regards,
Ahmed

Looks like a couple of peculiarities with the apps you're using and/or your device's shell.

The aik command should set up the su interactive sub-shell with the AIK-mobile directory in its PATH, but that doesn't appear to be the case. That said, the correct way to run an executable in the same directory as you in Linux is with ./ prepended, so you should try ./unpackimg.sh after aik and I'm sure it will work.

The other issue might be with the way your file explorer executes the scripts. Try FX File Explorer and see if it works.
The Following User Says Thank You to osm0sis For This Useful Post: [ View ]
31st July 2017, 07:35 AM |#1369  
Senior Member
Flag Cairo
Thanks Meter: 181
 
More
Quote:
Originally Posted by osm0sis

Looks like a couple of peculiarities with the apps you're using and/or your device's shell.

The aik command should set up the su interactive sub-shell with the AIK-mobile directory in its PATH, but that doesn't appear to be the case. That said, the correct way to run an executable in the same directory as you in Linux is with ./ prepended, so you should try ./unpackimg.sh after aik and I'm sure it will work.

The other issue might be with the way your file explorer executes the scripts. Try FX File Explorer and see if it works.

Worked in emulator after appending ./ before .sh and .img files.

FX file explorer worked flawlessly. I'll communicate this issue with mixplorer dev.

Thanks alot for ur support
Regards,
Ahmed
The Following User Says Thank You to atarek For This Useful Post: [ View ] Gift atarek Ad-Free
31st July 2017, 09:45 AM |#1370  
shoey63's Avatar
Recognized Contributor
Flag Somewhere in Oz...
Thanks Meter: 3,944
 
Donate to Me
More
Hide Unlocked Bootloader using AIK and pass SafetyNet
This method applies to kernels which haven't already been patched with Sultanxda's method
- Download latest RootSwitchhttps://www.asus.com/zentalk/tw/foru...MHwxNzM1NDI%3D, extract the apk and install it.
-Download RootSwitch.zip (.supersu and custom_ramdisk_patch.sh, needed for passing SafetyNet checks)
https://mega.nz/#F!NwUAxKjA!lodsOX94Wd4I5HfBFR3jJg, extract the files and place them in the root of the /data directory and make them executable. (rename dot.supersu to .supersu first).
- Unpack your boot.img with AIK and add this to the end of the -cmdline line file in /split_img
Code:
androidboot.verifiedbootstate=green
- Repack, flash image-new.img and root/re-root with SuperSU.

That's it. Whenever you want to pass SafetyNet, just toggle off the "Enabled" switch in RootSwitch.

Curious note: /proc/cmdline will still have androidboot.verifiedbootstate=orange in it, but adding androidboot.verifiedbootstate=green seems to over rule it and satisfy SafetyNet that bootloader is locked
The Following 7 Users Say Thank You to shoey63 For This Useful Post: [ View ] Gift shoey63 Ad-Free
31st July 2017, 12:16 PM |#1371  
Vagelis1608's Avatar
Senior Member
Flag Athens
Thanks Meter: 840
 
More
Quote:
Originally Posted by atarek

Hello @osm0sis

I want to say thanks alot for ur AIK-mobile it saved me to modify boot.img ASAP without being near laptop. So it amazing but i noticed a weird behavior as attatched.

I'm using mixplorer, busy box for android NDK and magisk. I copied boot.img in same path with unpackimg.sh but excute failed.
Also in emulator it failed.
Success scenario achieved when typing full path of .sh and .img .
I think I'm missed something but i was on a hurry to use for fix issue in boot.img.
Sorry if I'm missed notes in any post.
Please advice.



Regards,
Ahmed

Run: ./unpackimg.sh boot.img
Or: sh unpackimg.sh boot.img
Same for repacking.sh
The Following 2 Users Say Thank You to Vagelis1608 For This Useful Post: [ View ] Gift Vagelis1608 Ad-Free
Post Reply Subscribe to Thread

Tags
kernel, ramdisk, recovery, repack, unpack

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes