yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] Tecalote:
Thanks for your tips, now its working in my Rom updater-script succesful :D

I took your newest BusyBox from Github. I used only the arm64 (cause my device is) in your zip and I did following: I added the 64 MB magisk.img to data in my Rom, installed first Magisk, after selinux permissive module, then your BusyBox and at least Huawei-Fix (cause it need already installed Busybox).

Thank you :)
[Android Software/Hacking General [Developers Only]] osm0sis:
BINDSBIN is the new default setup for SuperSU on Oreo, replacing the su.img setup with one linking to a /data directory, very similar to how Magisk does its basic setup. My zip should never install to /su/bin unless /su/xbin doesn't exist (ie. from a version of SuperSU before I talked Chainfire into adding /su/xbin ;)).

If you're still getting a hung boot with the latest SuperSU (SR5) and my latest busybox zip from the OP, then maybe would be worth trying the BINDSBIN SuperSU setup to see if it works any better. You can force it on at least Nougat using `echo BINDSBIN=true > /data/.supersu`, then reflashing SuperSU in TWRP.

Glad you got it working, but this doesn't really fully explain what happened. Did it work with just the new zip and no other changes to your script or the ordering of zips? Or did you have to reorder to have a previous module create magisk.img?
[Android Software/Hacking General [Developers Only]] Tecalote:
I guess in the situation of doing wipes and installing a new Rom with included zips for Magisk and some modules in updater-script, Busybox Installer may not find magisk.img in /data before phone is not already booted fist time. And so Busybox Installer fall may back to system install - as you said. Thats what I guess because I had same problem with YashdSarafs Busybox yds some month ago, before I found yours.

Means: if Rom is installed and booted up first time, if I flash then the Busybox, it will be installed as Magisk Module (also cleaning other Busybox installations before).

But different if its included in updater-script after Magisk zip.

In my second try:

I took the latest Version of your Busybox from Github (deleted the other architectures inside the zip except arm64) - but I beleive I did not use a too old Busybox Version in my first try, because I downloaded it maybe one week ago from your OP.

I changed in updater-script only the ordering of the zips

1) Magisk.zip

2) Selinux permissive.zip

3) your Busybox

4) Huawei Prop Fix.zip (this must be installed after existing Busybox)

And because you said, Busybox-Installer may not find /data/magisk.img - I took the magisk.img from first try with Root-Explorer from data/ and integrated it in my Rom zip in data.

Rom zip inculudes data, cust, product, system, vendor, version, boot.img and the folders for Magisk and modules (each one in seperate folder)

If I get more time, I will test it in this ordering of zips without magisk.img in data and tell you - but for the moment I am happy, that it is working :)
[Android Software/Hacking General [Developers Only]] osm0sis:
RIP official Google support for the Nexus 6 and Nexus 9, who received their final security updates last month. With their demise, I've added their files to my Nexus Media zip. Unfortunately this now increases the zip beyond the allowable XDA zip attachment size (I really wish they'd raise this for Recognized Developers), so for those who aren't using Magisk I've uploaded it to my BasketBuild and the OP link now points there.

In other news Flashlt got a milestone update for Pixel 2 support and experimental (tested, just no guarantees obviously) support for dumping/flashing any device partition! :cowboy:

I work on these projects in my limited time off, so if you like the progress I'm making, or enjoy anything else I've done on xda, please do hit the donate link from my profile. Thanks for your support!

UPDATE-Flashlt.Installer.v3.0-signed.zip:

- create magisk.img if needed (e.g. clean recovery flash of Magisk 14+)

- possible fix for stuck Magisk module update message on some devices by ensuring install is to magisk_merge.img

- bump Magisk template version to 1400

- add support for /dev/block/bootdevice devices

- allow radio/modem flashing on slot devices (experimental)

- Pixel 2 slot prop (ro.boot.slot) support

- allow dump/flash of any existing partition when manually supplied on the commandline (experimental)

- add --exact argument to force disable the fuzzy naming match logic and allow dump/flash of partitions that would otherwise conflict (abootbak, modemst1, etc.)

UPDATE-nano.Terminal.Editor.v2.9.1-signed.zip:

- enable tab completion for filepaths on file open/close since it works and disabling it caused a build error

- disable credits Easter egg (Ctrl+x y zzy ;)) since it doesn't display correctly and saves a little space

- disable file magic detection, syntax coloring, .nanorc, file histories, and native language support functionality since we aren't using them and saves more space

- update to latest nano official source

UPDATE-Nexus.Media.Installer-signed.zip:

- add Nexus 6 (shamu) and Nexus 9 (volantis) media and boot animations

- split out overall common files, and common files shared by generations of devices

AnyKernel2 also saw some major improvements with added multiple ramdisk compressions support as well as Pixel 2 support and dtbo flashing, and GN Synapse Injector AK2 zip was of course updated accordingly, along with a few updates and fixes of its own.
[Android Software/Hacking General [Developers Only]] PiggyFlooper:
I like the way you work, wanting to figure out why things go wrong! Thank you for continuing to update your tools

I'm going to flash the Busybox Installer and post the recovery.log and other logs at your request, will you make it easy on me n tell me what to type into twrp terminal to get other logs -

??

cp -p /proc/last_kmsg /sdcard/last_kmsg.log

Or??

"cat /proc/last_kmsg" > /sdcard/last_kmsg.log

??Anything else

??adb
[Android Software/Hacking General [Developers Only]] osm0sis:
cp /tmp/recovery.log /sdcard/recovery.log;

cp /proc/last_kmsg /sdcard/last_kmsg.log;

I'll edit in a minute with the command for ramoops which has replaced last_kmsg on newer devices.

Edit: cp /sys/fs/pstore/console-ramoops /sdcard/console-ramoops.log

Make sure you get the last_kmsg/console-ramoops from recovery directly after the bootloop/hang without any other reboots in between.
[Android Software/Hacking General [Developers Only]] osm0sis:
Just reuploaded the updated Nexus Media zip with a little derp fix for the installer I had missed. Should work properly now. :good:
[Android Software/Hacking General [Developers Only]] PiggyFlooper:
[MENTION=4544860]osm0sis[/MENTION]

I'm sorry to say, it wasn't your installer that caused my problem, it installed into /su/bin just fine, I apologize.

I was playing around with init.d scripts and put them into /etc/init.d as opposed to /su/su.d

These are what I used-

https://www.dropbox.com/s/pfk0fuy64lormqr/scripts.zip?dl=0

I set up a folder in /system/etc for logging, MAYBE that is why it screwed up my phone, you had mentioned earlier knox may have been triggered, I wonder why it didn't boot into safe mode. It was stuck at splash screen with what it always says at boot-

set warranty bit : kernel

edit-

I found a couple interesting binaries called inotifywait and inotifywatch. I pulled them out of [MENTION=5161352]JustArchi[/MENTION] 's Roms, used for detecting tethering starting to disable dnsmasq. But they're very interesting because they watch a specified directory and when a change is detected, you can do what you want, thru scripting, such as delete files that appear in the watched directory. So what I'm getting at is all logging files, especially ones that take up space on/ data, like /data/system/dropbox. I just went into file explorer (X-plore, love that app) and checked, they're were exactly 1000 files taking up nearly 1MB, /procstats and /usagestats too. Can I offer up a script with these bin's to f' up some logs, or your the boss here, you wanna do it?
[Android Software/Hacking General [Developers Only]] solar666:
Hi, I am trying to install your Nexus Media update as Magisk module as it is available through official magisk repro but failing.

It ends up with an error.

Can you please check this? I assume there is something wrong in the updater script.

Edit: uploaded the magisk installation log.
[Android Software/Hacking General [Developers Only]] osm0sis:
If it fails during the "processing module zip" phase then it's an issue with Magisk Manager possibly only on lower memory devices and large module zips, I've already reported it to [MENTION=4470081]topjohnwu[/MENTION] and it should be fixed in the next public Manager release.

There was a little screw-up in the update-binary script, but I fixed it and pushed a new version to the Magisk repo earlier today; I tested it on my Galaxy Nexus (using a private alpha Magisk Manager with the processing/signing fix) and it worked fine.

If you can't wait for the update to Manager then grab the zip from the link in my OP and flash it manually. :good:

Edit: [MENTION=2919142]solar666[/MENTION] just checked out your log. In your case, you just haven't updated to the fixed version from yesterday, so go refresh the Downloads section in Magisk Manager, do that and all should work.
[Android Software/Hacking General [Developers Only]] KaMyKaSii:
osm0sis, my experience integrating system apps updates with Titanium Backup have been frustrating, all resulting in having to flash the system partition again because of apps that have disappeared or that have had constant FC. Does your gapps integrator script work with SuperSU in SBIN Mode? If not, is it possible for you to update it with support? Thank you very much

Edit: If it is only necessary to put the script in the new su.d folder, forgive me
[Android Software/Hacking General [Developers Only]] aletto:
The Nexus BootUnlocker Script claims that my N5 is not supported and subsequently exits. What am I supposed to do?

edit: Ninja'd
[Android Software/Hacking General [Developers Only]] osm0sis:
I mentioned this in the reset thread, but tell me what version of CWM/TWRP you're using, and how you're running it (flashed to device versus fastboot boot command).

Make sure you're using the latest recovery version and try again, then if you still have the issue, do adb shell and give me the output of a getprop > /sdcard/getprop.txt command.

Also this has been tested and working by many hammerhead users already, so there's something else going on.
[Android Software/Hacking General [Developers Only]] aletto:
I'm using CWM 6.0.4.4 from clockworkmod.com. The getprop.txt is attached.
[Android Software/Hacking General [Developers Only]] osm0sis:
getprop.txt:

[ro.bootloader]: [HHZ11d]

[ro.product.device]: [hammerhead]

And the relevant parts of the script:

getprop() { test -z `/sbin/getprop $1` && cat /system/build.prop | grep $1= | cut -d= -f2 || /sbin/getprop $1; }

device=`getprop ro.product.device`;
bootloader=`getprop ro.bootloader`;

test -z $device && device=unknown;
test -z $bootloader && bootloader=unknown;

elif [ $device == "hammerhead" ]; then
ui_print "Nexus 5: $device";
block=/dev/block/platform/msm_sdcc.1/by-name/misc;
offset=16400;
locked=00;
unlocked=01;
hastamper=1;
else
ui_print "Device: $device";
ui_print "Bootloader: $bootloader";
ui_print " ";
ui_print "Unsupported device.";
abort;

abort() {
ui_print " ";
ui_print "Your system has not been changed.";
ui_print " ";
ui_print "Script will now exit...";
ui_print " ";
umount /system;
exit 1;
}

The fact that the output you have is "Unknown" and not "unknown" shows that it's not even the fallback test -z lines of my script at fault; if it were those lines it would all be lowercase.

So somehow, despite having all that info in getprop, and you can see the script operates with getprops, you're resulting in unknown device info. This isn't occurring for (m)any other people so there must be something seriously weird about how your device is setup. :confused::(

Please be ABSOLUTELY SURE you aren't using an old version of my zip that somehow showed up. Redownload from the OP. I've just done so myself and verified it's the same as my local copy, shown working by [MENTION=4346614]abaaaabbbb63[/MENTION].
[Android Software/Hacking General [Developers Only]] aletto:
I redownloaded from the OP. Same error.

What output are you referring to? The CWM output is lowercase. I think aerozolic just made a mistake (or this problem is even weirder), because "unknown" is indeed lowercase (for me). Sadly, I'm a mere user and the only thing I can do is reading the OP and following instructions =(
[Android Software/Hacking General [Developers Only]] VivaErBetis:
osm0sis, maybe the getprop command sent using adb is getting prop data from a different part/zone than the getprop command sent from custom recovery. AFAIK every custom recovery has their own lil system and maybe it's properties are not correctly set according to the device and doesn't match with the one you expected.

Edit: I saw in your script that you mount /system relaying in the existence of /sbin/busybox. I know TWRP has it but maybe the recovery used that fails doesn't have busybox in that location. Maybe you need to make sure you have busybox including it into your script .zip...
[Android Software/Hacking General [Developers Only]] osm0sis:
The weird thing is, with CWM, busybox and mounting system aren't even required since CWM has a native getprop command.

Alright if they're lowercase then it could be that part of the script at fault... Still no idea why unless the workaround for TWRP not having getprop is somehow triggering on CWM. Again, this definitely works on other devices, and even other hammerhead devices... :confused:
[Android Software/Hacking General [Developers Only]] aerozolic:
And yeah. My typo. The Device and Bootloader are both "unknown" not "Unknown"

View attachment buildprop.txt

View attachment getprop.txt

EDIT: I made it. Downloaded TWRP, booted with it and voila - the script worked. Device Tampered: false
[Android Software/Hacking General [Developers Only]] osm0sis:
Hmm yeah those both look fine. Can you make sure system is mounted and then try the zip again?
[Android Software/Hacking General [Developers Only]] aerozolic:
TWRP did the trick. Something's wrong with CWM
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah definitely. I wonder what could be wrong with it that getprop's working on some hammerhead devices but not others..

Thanks for the help. :)
[Android Software/Hacking General [Developers Only]] aerozolic:
No problem :)
[Android Software/Hacking General [Developers Only]] osm0sis:
Edit: Reposted since it looks like as of noon today we're back in business. ;)
[Android Software/Hacking General [Developers Only]] pauleandro:
Hi, unfortunately, the link of the Nexus BootUnlocker script (GN, N4, N5, N10) is not working.

Tks!
[Android Software/Hacking General [Developers Only]] osm0sis:
Crap. Seems like xda's attachment system is broken. Great day to choose to release I guess. :rolleyes:

404'd downloads from other threads have since gone live so hopefully that happens here shortly as well.
[Android Software/Hacking General [Developers Only]] efrant:
Yeah the attachment system is having issues as of early this morning. It has yet to be fixed. You will likely have to re-upload anything uploaded in the past six hours or so, once the issues have been resolved.
[Android Software/Hacking General [Developers Only]] chrone:
The download link worked just now. Thanks dude. :)

Sent from my Nexus 4
[Android Software/Hacking General [Developers Only]] osm0sis:
BootUnlocker's link is still giving me 404, so I'm not sure what's up on your end. I've removed today's uploads and am waiting for the all-clear to try again. :good:
[Android Software/Hacking General [Developers Only]] pauleandro:
Any other mirror?

Tks.
[Android Software/Hacking General [Developers Only]] chrone:
oh yeah you're right. the bootloader unlocker I downloaded was only 345bytes. lol.

but the other attachment such as the fix permission and reboot to bootloader works fine. :)
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah it should work the same with all su.d directories. No promises gappsintegrator won't also end with a system flash, it's always been highly experimental, and has zero testing on Oreo, but you're welcome to try it!

Somewhere down on my list is trying to get it to work with Magisk..
[Android Software/Hacking General [Developers Only]] adikri:
Gapps integrator works flawlessly however I use it with magisk.. It's a simple init.d script that need only zipalign binary and busybox.. I'm using it for past few months..

But with magisk, when a module is installed wich mount /system/app or /system/priv-app location then integration won't be successful cause with every boot magisk operation first take place before init.d .. So this script can't mount folder for integrating.. But this issue can simply be fix by disabling that particular module that Mount app or priv-app folder.. And reboot.. After rebooting integration will be done.. And enable module again.. And reboot.. Things will be at it's place..
[Android Software/Hacking General [Developers Only]] nextheart:
The zip file named "UPDATE-sdcard.Fix.Permissions-signed" is not being flashed in TWRP.

Device: Redmi Note 3, TWRP: v3.2.0-0, ROM: RR-N
[Android Software/Hacking General [Developers Only]] osm0sis:
recovery.log
[Android Software/Hacking General [Developers Only]] KrissSo:
Help on custom script?

Hi osmosis,

Thanks a lot for your excellent scripts. I've also created a few myself but one - the most simple - refuses to work (notably because it uses the backuptool.functions script that I haven't found). Could you help me on this?

On lineageos, I added google lib (libjni_latinimegoogle.so) in /system/lib in order to have "sweeping keyboard". To preserve this during lineage upgrade, I created a script to backup / restore that file. But after lineageos upgrade, the file is nowhere to be found. What am I missing here?

Any help appreciated!

The script in /system/addon.d:

#!/sbin/sh
. /tmp/backuptool.functions

list_files() {
cat <<EOF
/system/lib/libjni_latinimegoogle.so
EOF
}

case "$1" in
backup)
list_files | while read FILE DUMMY; do
backup_file $S/"$FILE"
done
;;
restore)
list_files | while read FILE REPLACEMENT; do
R=""
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
restore_file $S/"$FILE" "$R"
done
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
# Stub
;;
esac
[Android Software/Hacking General [Developers Only]] guest4711:
If you update your ROM /system/ will be overwritten. So your script will not be started after update...

If you use magisk, put all you need into an subfolder of /magisk.

Or us nanomod as magisk module or flash it via TWRP. It can provide the swipe lib.
[Android Software/Hacking General [Developers Only]] KrissSo:
Ah, I should have said I have not 100% lineage, but microg's version of lineageos (https://lineage.microg.org/) which, unless I'm wrong, retains and executes all scripts from /system/addon.d. One of my scripts for instance reinstalls xposed after an rom upgrade. But the one described above doens't work...
[Android Software/Hacking General [Developers Only]] 93fuelslut:
I extracted the purenexus zip but I still can't find the boot img. What steps am I missing?
[Android Software/Hacking General [Developers Only]] osm0sis:
No idea.. maybe it only uses stock, or maybe it's somehow added into the payload .bin with the system image.. ask your PN maintainer.
[Android Software/Hacking General [Developers Only]] DiamondJohn:
I have not personally played with it (ie created my own), but if you update the ROM using a dirty flash and do not do a manual wipe of system, LineageOS base ROMs by default, make a backup of the system/addon.d folder (before overwriting system) and run these scripts as part of the install from the backup location, and hence you do not loose Gapps (and other system stuff) over a dirty flash. These steps are in the "updater-script" and the "install/bin/backuptoo.sh" file within the ROM zip.

---------- Post added at 11:29 PM ---------- Previous post was at 11:15 PM ----------

The contents of the zip looks like its missing a few other files and has a few "extras"; I normally work with/build LOS based ROMs, so it could be different.

However, in your screen shot, the last item looks like THAT may actually be the (expected) ROM install zip, and may contain the boot image.

ie have a look inside the contained zip file called purenexuss_marlin-7.1.2-20170725-OFFICIAL.zip Checking the "install-script" inside the META-INF (in a sub) folder would give a batter clue.

Weird that the "payload.bin" file is pretty close in size to the "OFFCICIAL" zip file. I actually would not be surprised if the "payload.bin" file is also actually a compressed archive that the desktop version of 7-Zip is able to extract, and may even contain a boot.img file:confused: worth a try.
[Android Software/Hacking General [Developers Only]] 93fuelslut:
Thank you for the reply. What about this idea- if flashing twrp writes to your boot partition, what if I just flash the twrp zip for this issue?
[Android Software/Hacking General [Developers Only]] osm0sis:
Oh yeah, dirty flashing the ROM is just as effective for unrooting, as long as it is flashing a boot.img as well.
[Android Software/Hacking General [Developers Only]] 93fuelslut:
Ok sweet! ?
[Android Software/Hacking General [Developers Only]] DragonFire1024:
Thanks for the ADB and fastboot binaries. I have been trying to find and or compile them for armv7 for sometime until a friend directed me to this thread. I can use ADB on a 7.0 Nougat device to talk to an Amazon tablet running 5.1.1. Now if only this would root it or unlock the bootloader :P Seriously though this is awesome. It allows me to remove bloat from friends' phones. I had a good time at work today 'hacking' the bloatware off because of this little package. You truly made my day.
[Android Software/Hacking General [Developers Only]] Eversmile23:
Hrlp in installing busybox.

My device, HTC Desire 10Lifestyle is rooted with 'magisk'. I want to experiment with some mod, that needs me to give sone commands from terminal editor screen. But I am unable to do so. Is it because of busybox not being installed to '/system/xbin' partition? I had flashed busybox installer zip from recovery. How can I make it work?
[Android Software/Hacking General [Developers Only]] osm0sis:
If your Magisk installation is working correctly then for all intents and purposes busybox IS installed to /system/xbin. Download and flash it through Magisk Manager again, and if that doesn't work try through TWRP.

The simplest test is just typing `busybox` from a $ (user) prompt. This will work for Magisk and SuperSU in su.img mode; SuperSU in SBIN mode needs a # (root) prompt before it'll work.
[Android Software/Hacking General [Developers Only]] Zackptg5:
Deleted
[Android Software/Hacking General [Developers Only]] osm0sis:
Hey, please don't, now that v15 is "stable" I'll do it when I get back from vacation and it'll be backwards compatible. :good:
[Android Software/Hacking General [Developers Only]] Zackptg5:
Gotcha, deleted my last post
[Android Software/Hacking General [Developers Only]] skulldreamz:
[MENTION=4544860]osm0sis[/MENTION] or anyone else. Does anyone know how to boot a boot.img and not flash the .img using just a terminal command line like dd for example? I know how to dd a .img permanently but just want to boot the 3.2.1-0 on my pixel XL as I'm not by a PC today. Thanks
[Android Software/Hacking General [Developers Only]] DodoGTA:
I don't think this is possible without a fastboot command
[Android Software/Hacking General [Developers Only]] DragonFire1024:
There is an ADB binary package you can flash that has fastboot. Look in the OP.
[Android Software/Hacking General [Developers Only]] KaMyKaSii:
But you can not access this binary while the device itself is in fastboot mode. But it would be interesting to install the adb + fastboot on another device and make an OTG + usb cable connection. I'm curious if that would work