• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [Without PC] Unpack, Edit, Repack boot.img

Have you made them available?

Inside MyMind script is a variable for your boot partition. You need to change it to your boot partition before applying the zip to your device. It's currently set to my boot partition. Be sure to read everything lol.
 
Forgot to show this
yte2e5y4.jpg

My goal is to add lines to default.prop and write the img to dev/block, what is terminal command to write dev/block?
Edit-Sorry, didn't see your reply from earlier, thanks
 
Forgot to show this
yte2e5y4.jpg

My goal is to add lines to default.prop and write the img to dev/block, what is terminal command to write dev/block?

See post number 45. Already showed you the commands lol.
 
Keeps saying this in term
cpio: can't create symlink from sbin/ueventd to ../init: Operation not permitted

When gunzip -c........

How to fix?
 
Keeps saying this in term
cpio: can't create symlink from sbin/ueventd to ../init: Operation not permitted

When gunzip -c........

How to fix?

If you are doing it on your sdcard then that may be the problem. I normally do this procedure at /data/local/tmp.
 
The sdcard on most devices is vfat. By this standard it makes it difficult to execute off of.
 
Finally got it, had more trouble in terminal because wouldn't paste correctly, input manually and all is well. Thanks for the fantastic tutorial M.M.M., and for sorta guiding me through it. I put the kernel up over on xda for an end of life phone-
http://forum.xda-developers.com/showthread.php?p=53477931

[ROMS] MidnightRom! Jellybean, Sense, or Senseless! (Virgin Mobile Only)
Your work is much appreciated sir
 
Yea, terminal emulator has been giving me problems with pasting in general. I had to throw out that app and start using Privilege Terminal. Personally, I like it better. Only flaw I see with it is when you type then enter exit, the app doesn't close so it has to be done via it's available options at the top right. Otherwise, much smoother. Will miss using Terminal Emulator but it seems broken on 4.2.2. I tried reaching out to the original dev in this regard but no response, so whatever lol.

Glad you got it resolved.
 
Hi op'er, this is off topic, I haven't come across someone with much knowledge that has been so quickly responsive. I'm using a zip align initd script, and a couple apps aren't zipaligning, and are being stored at /data/local, wasting space. Am wondering how to write script to have these deleted after zipalign on boot, if you don't have time or think this post is inappropriate, could you direct me toward info because I've looked and can't find
 
Hi op'er, this is off topic, I haven't come across someone with much knowledge that has been so quickly responsive. I'm using a zip align initd script, and a couple apps aren't zipaligning, and are being stored at /data/local, wasting space. Am wondering how to write script to have these deleted after zipalign on boot, if you don't have time or think this post is inappropriate, could you direct me toward info because I've looked and can't find

Can you send me this script so I can look at it. Need to see what your script(s) is/are doing before I can answer your question with a proper solution given your request.
 
Can you send me this script so I can look at it. Need to see what your script(s) is/are doing before I can answer your question with a proper solution given your request.

https://db.tt/io5H4XYl

Edit- I can't get dropbox link to work, hope I wasnt suspended:mad:

Maybe this'll work
https://docs.google.com/file/d/0B_l3-ta0DHp4bmtveTJ6d24tM0U/edit?usp=docslist_api
Dang, how to make this available public?
Drive is only letting me share it with an email, do you have a throw away email address can send it to ya? Can ya pm me
 
I'm gonna look at it some more. It has a block check in one of those init.d scripts which is suppose to automatically remove the apks from the /data/local/ directory. Will see why it isn't doing this for you. Script may not be written properly.
 
Also, this is ran at each boot.... Why would you want to zipalign your apks at each boot? That isn't necessary. You only need to do this once and it only needs to be done if any changes/modifications have been made to any given apk in general.

Edit : Nevermind. I see that it confirms whether or not it has already been zipaligned and if yes then it moves on to the next one. I guess in that way it isn't too bad, but given it's design I would still be curious if this would slow down the phone on each boot. Would need to run tests for my own curiosity lol.
 
Okay, will delete them

I would hold on to them so if you ever play around with your apks or grab one that someone modified. People have the tendency of not zipaligning them when they do, and it's a good thing to do it actually, but I wouldn't see the need to do it on every boot, but that is just me. I usually use init.d scripts to mod the use of my kernel and such. Like better battery support, etc. Just a recommendation though, not every init.d script is going to be compatible for every android. There will be times where you must look at the script to see what it is doing and adapt it to your device. Also, if you run in to a script that soft bricks your phone you can always go in to recovery and delete it from there, then reboot.

But, I can confirm that your scripts you sent me does already aim to delete any apks from the given directory as you earlier mentioned. The fact that it isn't deleting it for you can only imply to me that the script is running into block checks and it isn't meeting the needed requirements to continue so it stops itself in it's tracks which prevents it from deleting them later on.

The script is deleting them in two forms. It basically does an 'if' check for /data/local/$APK and aims to remove them. It will do some other stuff as well. If this initial check fails it moves to 'else' which again is set to find /data/local/$APK and remove them using rm -f "/data/local/$APK". My guess is that the script is written out in a way where it cannot properly find the apks in the given directory which is why your two specific apps are not being removed.
 
Either that, or because it is failing to zipalign those two apps on your device then this results in the script aborting thus not completely being given the chance to remove them later on.
 
But simply using:

Code:
rm -f "/data/local/$APK"

Will do the trick.

Just make sure to set the APK variable before using $APK.

Code:
for DIR in /system/app /data/app; do
cd $DIR;
for APK in *.apk; do
rm -f "/data/local/$APK"
done;
done;
 
But simply using:

Code:
rm -f "/data/local/$APK"

Will do the trick.

Just make sure to set the APK variable before using $APK.

Code:
for DIR in /system/app /data/app; do
cd $DIR;
for APK in *.apk; do
rm -f "/data/local/$APK"
done;
done;

Well, it comes as no surprise that this worked, you're the man
 
https://github.com/ModdingMyMind/boot_manipulation

The source has been updated to allow static compiling. Been meaning to update the repo for sometime. Finally did lol.

A reminder though that the binaries do not support DTB and all that other crazy stuff popping up with android on the newer version's. I can easily add support but since I do not need them I don't plan to for right now.
 
Fixed up the Makefile in my repo to compile sources using -O3 optimizations. Compiling with this flag will greatly increase the size on the finish build but it will also GREATLY increase the performance when using it on your android device.
 
Was successful at compiling mkbootimg, unmkbootimg, and mkbootfs as one multi call binary.

Think of it as busybox only in this case, boot manipulation lol.

It's not added to the OP.

However, I have pushed my commit to my repo on github. So feel free to fork, clone, or download and build it.

Just change to the project directory and run, "make multi". It should handle the rest assuming you have all that is needed on your system to build correctly.
 
Added support for the following:
- dt support for bootimg.h mkbootimg.c and unmkbootimg.c
- Added dtbtool and dtc sources
- Added getline and getdelim sources to accommodate the usage of getline within dtbtool.c
- Modified main and usage in some source files to prevent confliction upon compiling
- Updated main.c and makefile to accommodate these changes for a successful multi call binary compilation

https://github.com/ModdingMyMind/boot_manipulation/commit/0ce22339a889e701a40c78a60d9e2958330b468d
 
The attachment is not updated with any of these changes. Must build it from source if you wish to have these changes. I can assist if need be.
 
Back
Top Bottom