yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] Captain_Throwback:
Static version works! Not sure how effective it'll be since it's an old version, though. If I can find out how to compile it myself, that would be ideal (or if you can, lol).
[Android Software/Hacking General [Developers Only]] osm0sis:
Haha no such luck. adb and fastboot were pretty obnoxious to NDK compile statically last time I tried, but maybe you can figure out the trick. I'll update the package with 1.0.26 because even though it's older I do think static's the better solution overall. Might need to use "HOME=/sdcard adb" to connect to newer devices so I'll use a wrapper still but should work better across the board hopefully.

Edit: UPDATE-adb.Installer.v1.0.26-signed.zip is now up in the OP.
[Android Software/Hacking General [Developers Only]] Rydah:
Hello [MENTION=4544860]osm0sis[/MENTION], would you be willing to also build sqlite3 builds in the same respective as you build busybox versions? I attempted to but just am not there yet.

Thanks In Advance

Sent From My LG V10
[Android Software/Hacking General [Developers Only]] osm0sis:
Sorry, as I said in my release post, busybox builds were a necessity for my AIK-mobile package so, as a useful byproduct, I released them on their own as well, but I don't have the time to figure out another complicated build at the moment.

I'd suggest you look for a static arm compile of sqlite3 so that it could work on other architectures through compatibility layers.
[Android Software/Hacking General [Developers Only]] Surge1223:
Yes agreed they are very obnoxious to statically compile. I did it from my phone earlier today but it required quite a lot of flags and some statically compiled dependencies since crypto and ldl are required for adb. But I have the statically compiled 1.0.31 for arm (also was compiled with the pie flags) if you want it.
[Android Software/Hacking General [Developers Only]] Captain_Throwback:
I'm guessing 1.0.32 wouldn't work?
[Android Software/Hacking General [Developers Only]] Surge1223:
Didn't try it yet since they changed the adb source from C to C++. Figured I'd see if I could get 1.0.31 to compile first since it's in C and then weigh between the options of compiling the now primarily cpp based 1.0.32 adb with g++ or to convert it back to C and use gcc (which I'm more comfortable with).

Other than that, I have the crypto, ldl, zip, zlib, and other dependencies statically built in. So it's just a matter of compiling in C++ (unless there are added dependencies in 1.0.32? I glanced over it and only saw a few different things in the Android.mk file but I didn't look closely)
[Android Software/Hacking General [Developers Only]] osm0sis:
Nice job! I think adb is up to 1.0.35 on master, so it'd be great to get a static build of that.

If you could open a thread to document the process of getting adb to build statically on device that would be amazing. I stumbled upon one where someone did something similar for busybox the other day and it was pretty cool. :)
[Android Software/Hacking General [Developers Only]] osm0sis:
Looks like 2016 will hold a lot of script breakage and rewrites:

https://plus.google.com/+OpengappsOrg/posts/FJ2v1kNxzHV

I'm already noticing some weirdness with sed not working at all like it should on my N7 2013.

:eek::mad::(
[Android Software/Hacking General [Developers Only]] MaLiXs:
Wow that not a really good new
[Android Software/Hacking General [Developers Only]] slimcyril:
[MENTION=1143630]osmosis[/MENTION] you're one of the great scripter here on xda & I have five of your scripts running on my phone & they work flawlessly. Please could you write me a flashable or cron script that will make Sclean script (wipe dalvik cache & reboot) located in the xbin to run once every week same time & day. Below is a copy of the Sclean. ...

#!/system/bin/sh

#

# SuperClean & ReStart Script (Wipe Dalvik Cache & Reboot) created by zeppelinrox.

#

line=================================================

clear

echo ""

echo $line

echo " -=SuperClean & ReStart=- by -=zeppelinrox=-"

echo $line

echo ""

sleep 1

id=`id`; id=`echo ${id#*=}`; id=`echo ${id%%\(*}`; id=`echo ${id%% *}`

if [ "$id" != "0" ] && [ "$id" != "root" ]; then

sleep 2

echo " You are NOT running this script as root..."

echo ""

sleep 3

echo $line

echo " ...No SuperUser for you!!"

echo $line

echo ""

sleep 3

echo " ...Please Run as Root and try again..."

echo ""

echo $line

echo ""

sleep 3

exit 69

fi

echo " Commencing SuperClean & ReStart!"

echo ""

sleep 2

for cachedir in /*/dalvik-*; do rm -r /$cachedir/* 2>/dev/null; done

echo " All cleaned up and ready to..."

echo ""

sleep 2

echo $line

echo " !!POOF!!"

echo $line

echo ""

sleep 2

busybox sync

if [ -f "/proc/sys/kernel/sysrq" ]; then

echo 1 > /proc/sys/kernel/sysrq 2>/dev/null

echo b > /proc/sysrq-trigger 2>/dev/null

fi

echo " If it don't go poofie, just reboot manually!"

echo ""

reboot; busybox reboot

echo " ==========================="

echo " ) SuperClean Completed! ("

echo " ==========================="

echo ""

exit 0
[Android Software/Hacking General [Developers Only]] osm0sis:
Just search how to set up cron.d and put that script in it.
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah looks fine.
[Android Software/Hacking General [Developers Only]] slimcyril:
Thanks for the response just ran it & it was installed correctly
[Android Software/Hacking General [Developers Only]] milojoseph:
Good day, stumbled on your page and maybe you can help me (maybe others) I run a s5 rom for some odd this rom and some others disable Logging. when using catlog (and other logs app) and xposed logs it does not show up. I googled around and people said to use Kernel adiutor to manually enable logging but the rom disables it right back.
[Android Software/Hacking General [Developers Only]] dic1911:
till now, i think there's no way you can disable xposed log except delete the original log file and create a same-named dictionary, if you're not sure just check it at /data/data/de.robv.android.xposed.installer/log
[Android Software/Hacking General [Developers Only]] milojoseph:
sorry confusion... my rom disables logging and i needed a script to enable it.
[Android Software/Hacking General [Developers Only]] slimcyril:
[MENTION=1143630]osmosis[/MENTION] please what's the benefits of using the xposed toggler ?
[Android Software/Hacking General [Developers Only]] osm0sis:
For future reference, if I didn't write it or package it it's probably out of the scope of this thread (and you should be asking in the thread you got it from), but I do happen to remember the zip you're talking about.

I think the point was to disable it simply from recovery if it gets stuck bootlooping or on the animation or something. That was before Xposed had the button combo disabling.
[Android Software/Hacking General [Developers Only]] osm0sis:
Update: http://xdaforums.com/android/software/pa-gapps-continuation-t3098071/post64901718

We'll just have to tough it out with our broken scripts until N, I guess. :rolleyes:
[Android Software/Hacking General [Developers Only]] SteveMurphy:
Thanks for checking and updating us. Seems as though the descent to become unhelpful like Apple has accelerated since L, and especially M.

Or, perhaps I'm over exaggerating, although I doubt it.
[Android Software/Hacking General [Developers Only]] slimcyril:
[MENTION=1143630]osmosis[/MENTION] I m unable to mount my filesystem in rw mode, I have used so many scripts in order to remount it rw, terminal emulator displays that's its in rw mode but when I chmod a file in xbin or try to to create a folder it displays read-only filesystem. I flashed your cwm-sdfixpermission script but it failed in recovery. I m using s3 Verizon with the latest safestrap recovery. Please help !!!
[Android Software/Hacking General [Developers Only]] osm0sis:
No. This is not your tech support thread. Ask in Q&A, or maybe the SuperSU thread if you're using the betas.

... You're not even mentioning the right osm0sis
[Android Software/Hacking General [Developers Only]] Captain_Throwback:
[MENTION=4544860]osm0sis[/MENTION]

So when flashing the Busybox zip as part of a ROM install, the method used is similar to how SuperSU is bundled in a ROM install - the zip is added to its own folder, and the shell script is unzip and run directly from the updater-script, like this:

ui_print("Installing Busybox..."); ui_print(" ");
package_extract_dir("busybox", "/tmp/busybox");
run_program("/sbin/busybox", "unzip", "/tmp/busybox/UPDATE-Busybox.Installer.v1.24.1-ALL-signed.zip", "META-INF/com/google/android/*", "-d", "/tmp/busybox");
run_program("/sbin/busybox", "sh", "/tmp/busybox/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/busybox/UPDATE-Busybox.Installer.v1.24.1-ALL-signed.zip");

It's only when yours and the SuperSU zip are run using this method that the log gets truncated, due to the issue explained by [MENTION=4878287]_that[/MENTION] in the SuperSU thread.
[Android Software/Hacking General [Developers Only]] osm0sis:
Ah okay now I'm following you. Okay, since you're really using the zips in an abnormal way here, what's the problem with switching the 0 to 1?
[Android Software/Hacking General [Developers Only]] Captain_Throwback:
Not sure what you mean by abnormal - this method was provided by Chainfire himself, including the syntax for the commands, here: http://su.chainfire.eu/#embed-rom

I can change the 1 to a 0 and I'm sure it'll work fine, but thought you'd want it to work universally, since most people are using the instructions he provided for flashing similar zips. No worries - just wanted to bring it to your attention.
[Android Software/Hacking General [Developers Only]] osm0sis:
Ah I see, I didn't realize that was a thing! Cool. Thanks. :)

Hmm, well it seems like it was just a typo in his instructions and should be stdout, not stdin, so I'll wait and see what Chainfire does about it.

Edit: [MENTION=1162986]Captain_Throwback[/MENTION], I'm still mulling over Chainfire's method for finding the correct FD to the parent ROM zip because it's kind of.. intense, would just the >> fix be acceptable?
[Android Software/Hacking General [Developers Only]] Captain_Throwback:
I was able to modify your script and have it working using Chainfire's method. This is what I used (the readlink portion is a direct copy/paste from his updated shell script):

OUTFD=[B]$2[/B];
ZIP="$3";

readlink /proc/$$/fd/$OUTFD 2>/dev/null | grep /tmp >/dev/null
if [ "$?" -eq "0" ]; then
# rerouted to log file, we don't want our ui_print commands going there
OUTFD=0

# we are probably running in embedded mode, see if we can find the right fd
# we know the fd is a pipe and that the parent updater may have been started as
# 'update-binary 3 fd zipfile'
for FD in `ls /proc/$$/fd`; do
readlink /proc/$$/fd/$FD 2>/dev/null | grep pipe >/dev/null
if [ "$?" -eq "0" ]; then
ps | grep " 3 $FD " | grep -v grep >/dev/null
if [ "$?" -eq "0" ]; then
OUTFD=$FD
break
fi
fi
done
fi

ui_print() { echo -e "ui_print $1\nui_print" [B]>> /proc/self/fd/$OUTFD[/B]; }
set_perm() {
files=$(echo $* | awk '{ print substr($0, index($0,$4)) }');
for i in $files; do
chown $1.$2 $i; chown $1:$2 $i;
chmod $3 $i;
done;
}
show_progress() { echo "progress $1 $2" > [B]/proc/self/fd/$OUTFD[/B]; }
set_progress() { echo "set_progress $1" > [B]/proc/self/fd/$OUTFD[/B]; }

I bolded the items I changed. Using just ">>" seems to redirect all the "ui_print" commands to the recovery.log, which ends up just being log spam.
[Android Software/Hacking General [Developers Only]] osm0sis:
Thanks Captain_Throwback! This testing with readlink stuff is new to me, but I worked through it in adb shell and it makes enough sense to me now that I adapted the above to the rest of my usual script so the latter changes aren't necessary. No real functional changes necessary as you can see. :)

# embedded mode support
readlink /proc/$$/fd/$2 2>/dev/null | grep /tmp >/dev/null;
if [ "$?" -eq "0" ]; then
# rerouted to log file, so suppress recovery ui commands
OUTFD=/proc/self/fd/0;
# try to find the actual fd (pipe with parent updater likely started as 'update-binary 3 fd zipfile')
for FD in `ls /proc/$$/fd`; do
readlink /proc/$$/fd/$FD 2>/dev/null | grep pipe >/dev/null;
if [ "$?" -eq "0" ]; then
ps | grep " 3 $FD " | grep -v grep >/dev/null;
if [ "$?" -eq "0" ]; then
OUTFD=/proc/self/fd/$FD;
break;
fi;
fi;
done;
fi;

ui_print() { echo -e "ui_print $1\nui_print" >> $OUTFD; }
show_progress() { echo "progress $1 $2" >> $OUTFD; }
set_progress() { echo "set_progress $1" >> $OUTFD; }

I did touch up Chainfire's new su.img loop mount script more to my liking though and made sure it all works with CMR's toybox implementation (as I'm sure was also his main concern with it), as well as saves us a few steps if we're using a more sensible recovery like TWRP:

mount /data;
mount /cache;
suimg=$(ls /cache/su.img /data/su.img 2>/dev/null);
if [ "$suimg" ]; then
umount /su;
test ! -e /su && mkdir /su;
mount -t ext4 -o rw,noatime $suimg /su;
for i in 0 1 2 3 4 5 6 7; do
case `mount` in
*" /su "*) break;;
esac;
loop=/dev/block/loop$i;
mknod $loop b 7 $i;
if [ ! -f "$loop" -o ! -b "$loop" ]; then
mknod $loop b 7 $i;
fi;
losetup $loop $suimg && mount -t ext4 -o loop $loop /su;
done;
test -d /su/xbin && target=/su/xbin || target=/su/bin;
else
mount -o rw,remount /system;
target=/system/xbin;
fi;

Just reviewing and making the mount changes on my adb and nano installers then I'll have all 3 updated. :good:
[Android Software/Hacking General [Developers Only]] osm0sis:
OP updated!

UPDATE-Busybox.Installer.v1.24.1-ALL-signed.zip;

UPDATE-adb.Installer.v1.0.26-signed.zip;

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

- add support for Cyanogen(Mod) Recovery's implementation of toybox for mount and adapt [MENTION=631273]Chainfire[/MENTION]'s method for systemless root (su.img) loop mount support

- fix systemless root (su.img) detection support when both /data and /cache don't start mounted (like in CMR)

The busybox installer now uses the much less convoluted "busybox --list" command for the applet list to generate the symlinks, and of course the previously mentioned embedded flashing support for use in ROM kitchens, etc. Thanks [MENTION=1162986]Captain_Throwback[/MENTION] & [MENTION=631273]Chainfire[/MENTION]. :)

Note: These are only installer fixes. If these installed fine for you already, there's no need to reflash; there aren't any updates to the binaries. :good:
[Android Software/Hacking General [Developers Only]] osm0sis:
And the addition of my latest big project!

APK-Patcher (many devices) - link

Simplifies APK modification to make it easier for modification creators to keep creating. Using [MENTION=1299419]JesusFreke[/MENTION]'s brilliant bak/smali and [MENTION=3924617]iBotPeaches[/MENTION]' excellent apktool, modified to run on-device along with the various binaries required, allows on-the-fly APK modifications to be applied via recovery, to whatever ROM APK is present, taking the constant update burden off of the modification creator. The zip is smart and automated, using the APK name to run all the various parts involved for complicated patches and is extensible to any number of APKs in a single zip.

Okay, no more updates for a little while. Everybody stop breaking things. :p
[Android Software/Hacking General [Developers Only]] out386:
You are amazing. Hats off!
[Android Software/Hacking General [Developers Only]] domicq:
[MENTION=4544860]osm0sis[/MENTION] hey, could you tell me which one from gappsintegrator should i use on nexus 5X stock android 6, rooted systemlessly, i tried one from second post, but i got bootlop.
[Android Software/Hacking General [Developers Only]] osm0sis:
Why would you want to use gappsintegrator on a Nexus 5X running Stock ROM? It'll modify system, breaking the OTA-receiving ability you retained by using systemless root. And yeah, also fully untested and experimental on Marshmallow; there are oddities GApps developers are still only just discovering with Marshmallow not allowing app permissions to be granted after the initial ROM boot.
[Android Software/Hacking General [Developers Only]] domicq:
Because of wasting space on /data with system-app updates and Titanium Backup or L*****r makes some of updated apps functionless. I don't care about OTAs.

So for now is there any chance of getting your script to work on my device?

Gesendet von meinem Nexus 5X mit Tapatalk
[Android Software/Hacking General [Developers Only]] SpasilliumNexus:
The reason why Titanium Backup and that other app that is NOT ALLOWED TO BE MENTIONED HERE "breaks" integration is because of the way they are now set up with their libraries extracted next to the APK with Lollipop and Marshmallow. Look in the Chrome app folder for an example of the layout.

Unless he can come up with a way for his script to do so, then it's not possible and doing it manually is the only way.
[Android Software/Hacking General [Developers Only]] domicq:
Delete
[Android Software/Hacking General [Developers Only]] osm0sis:
My script already does that on Lollipop, but as I said, there are further issues/changes in Marshmallow that I'm not sure can be resolved.

Okay well the first thing it needs is a working sed, awk, and unzip, which Marshmallow doesn't provide. Flash my busybox zip then make another symlink from /su/xbin/busybox to /su/bin/sed to override the broken /system/bin/sed. Then give the script another shot in /su/su.d/.
[Android Software/Hacking General [Developers Only]] ashyx:
Just wanna say thanks to [MENTION=4544860]osm0sis[/MENTION]. I have used some of your tools and they have helped make building projects that bit easier. Saves having to do some of the tedious stuff manually.
[Android Software/Hacking General [Developers Only]] domicq:
I did everything, what you wrote and I can't see if any app was integrated.

EDIT: Play store and camera was definitely integrated, but apps like YouTube and maps definitely not.

Here is log, I don't know if it helps you, but here is. ?

Gesendet von meinem Nexus 5X mit Tapatalk
[Android Software/Hacking General [Developers Only]] osm0sis:
If you check the instructions you (likely) need to reboot several times to integrate a large number of apps (on Lollipop+). Can you do that then upload the entire log for, say, 3 or 4 reboots to pastebin.com? Thanks. :)
[Android Software/Hacking General [Developers Only]] domicq:
2nd reboot - integrated some apps (log was smaller) and apps like Maps and Photos won't be able to launch, it asks for uninstalling and again installing (but like systemapp they can't be uninstalled) , Play Services was updating from Play Store

3rd reboot - integrating another apps (log was again smaller) same problem with Maps and Photos

4th reboot - systemUI crash

5th reboot - still SystemUI crash
[Android Software/Hacking General [Developers Only]] osm0sis:
Please upload the combined log like I asked?

Unfortunately, it sounds like those permissions issues I was talking about breaking the apps. Marshmallow is probably out of the question for now unless that can be worked around. I know the Open GApps guys are working on it currently so I'll wait on their lead.
[Android Software/Hacking General [Developers Only]] bkkzak:
I just want to note that I tried this on a fresh on my ZenPad S 8 (was clean installing the newest factory image, ZenUI 5.0.1, then flashed SuperSU, then your BusyBox installer) and TitaniumBackup wouldn't work so I checked the BusyBox version and it said 1.16.1. I saw online that 1.24.1 is the most current, so I used another popular BusyBox installer from the Play Store and TiBU reported that 1.24.1 was now installed.

Just wanted to let you know, because in the recovery install script it said x86 detected, and in this quoted post you said that 1.24.1 is the version that would be installed. Not sure if you knew, this was happening.
[Android Software/Hacking General [Developers Only]] osm0sis:
That doesn't really explain anything unfortunately. TiBU always packages its own busybox which is way back at 1.16.1, so it not working also has nothing to do with my busybox. Is your device x86? System or systemless root? It's sounding to me like everything worked fine, you just didn't know how to check for it. :)
[Android Software/Hacking General [Developers Only]] bkkzak:
Thanks for your reply!

Sorry I should have clarified - because my tablet is x86, I read on the TiBU knowledge base that I have to select "force system busybox" in TiBU. I want to say that when I checked thru TiBU it said BusyBox: 1.16.1 (from system) but not entirely sure. I am 100% that I had already checked "force system busybox" though.

And it is system install SuperSU (ya I had problems with TiBU and systemless on my 6P).
[Android Software/Hacking General [Developers Only]] osm0sis:
TiBU was still showing its internal version, because it's definitely still 1.16.1 for them. When you switched back from systemless root, did you delete /data/su.img? That would definitely fool my installer into believing that you were still systemless and keep it from installing correctly to system. The correct way to test an installation is to open a command prompt and type busybox, and since you didn't do that, I'm still thinking it might have worked just fine.
[Android Software/Hacking General [Developers Only]] bkkzak:
Yep TiBU must have been showing it's internal version; that's just so weird because I did this on my ZenPad: full wipe (system/data/cache's), flash newest factory image, flash SuperSU 2.67 (installed as system), flash your BusyBox installer. Then booted up and installed TiBU, forced system busybox, noticed it wasn't functioning properly, checked and saw old BB version, rebooted, same version. I then installed another BB from Play Store, saw the updated version in TiBU, had a different kind of error, had to mess around with backup location and it finally worked.

In hindsight, I'm guessing that anything past 2.52 is unstable in system install; because I wasn't getting prompts to grant SU privileges (were very delayed or didn't appear at all), I later ended up flashing your unSU then SuperSU 2.52 and was gravy from there forward. Thanks for working with me on this, I think I was just getting a little anxious because I had a busy day of school ahead. Glad all is well on my ZenPad now :D:highfive:
[Android Software/Hacking General [Developers Only]] osm0sis:
PSA: While we wait for Android N to resolve the broken toybox sed, etc. messing up su.d script execution, there is a workaround for systemless root once you have busybox installed to /su/xbin:

su -c "ln -s /su/xbin/busybox /su/bin/sed"

That can be repeated for any other commands we find to be acting oddly in the meantime. You may need to remount /su rw first depending on your setup.

I have also uploaded a fix for adb+fastboot Installer to the OP. I found that the HOME=/sdcard override on the adb command line wasn't necessarily working, so I added it into the wrapper script as an export command instead. :good:
[Android Software/Hacking General [Developers Only]] Surge1223:
What version of toybox are you using? I don't seem to have this issue.
[Android Software/Hacking General [Developers Only]] osm0sis:
It was an issue in the version shipped by Google with 6.0 and 6.0.1, I was told by a Googler that they likely wouldn't be fixing it until N since it's not a security issue.

Are you on Stock ROM?

Edit: It's only broken on 32bit. :good:
[Android Software/Hacking General [Developers Only]] domicq:
sorry for that long rtime without answer, but last time it messed up my rom and duties and school deny me to try it again, i did backup (yeah i was stupid last time) and i'll try it again and upload all logs. But last time there wasn't any combined log, just that one, that says about apps and versions. where can I find it?
[Android Software/Hacking General [Developers Only]] osm0sis:
That's the one. Leave it alone until after several reboots, then put it on pastebin.com for me. Thanks for the help!
[Android Software/Hacking General [Developers Only]] domicq:
and it won't after next reboot overwrite?