yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] osm0sis:
http://xdaforums.com/showpost.php?p=68465054&postcount=836

Also CM14.1 already has /system/init.d so it may already work out-of-the-box.
[Android Software/Hacking General [Developers Only]] fr3quency:
Good morning [MENTION=4544860]osm0sis[/MENTION]. Are you planning to release a .zip of busybox 1.26?
[Android Software/Hacking General [Developers Only]] Ibuprophen:
[MENTION=4544860]osm0sis[/MENTION], just read that BusyBox 1.26.0 is an unstable build.

Here's one link that I've read regarding that release:

http://news.softpedia.com/news/busy...x-released-with-over-200-changes-511154.shtml

Sent from my Communicator (SCH-I535) on the Bridge of the U.S.S. Enterprise (N.C.C. 1701).
[Android Software/Hacking General [Developers Only]] osm0sis:
Yup, the 1.x.0 release is always labeled unstable, so I always wait it out until the 1.x.1 stable release since my busybox is used in a number of projects and I don't want to risk issues.
[Android Software/Hacking General [Developers Only]] :
''Also CM14.1 already has /system/init.d so it may already work out-of-the-box'' - nope init.d is not working and even sysinit,debuggerd or custom init.rc services[by me] not working and i also tried sepolicy enjection for my custom service and for your script also it did not worked and i think supolicy by chainfire and su.d is only hope but currentaly i am not using supersu.
[Android Software/Hacking General [Developers Only]] osm0sis:
Agreed. su.d is probably the path of least resistance. Buuut, this (or part of this) might also be what you need?

http://xdaforums.com/showpost.php?p=69834092&postcount=351

Merry Christmas/Happy holidays everyone! Here's to another year of Android hacking! :D
[Android Software/Hacking General [Developers Only]] InterestingTwist:
[MENTION=4544860]osm0sis[/MENTION]

Do you know a way to reliably check if the device is one of the pixels?
[Android Software/Hacking General [Developers Only]] jcmm11:
I would check the value of ro.product.device in build.prop

The value would be "sailfish" for Pixel and "marlin" for Pixel XL
[Android Software/Hacking General [Developers Only]] InterestingTwist:
The problem is you don't know which system to mount
[Android Software/Hacking General [Developers Only]] jcmm11:
I would think it really doesn't matter. That value should be the same in any copy of build.prop.

Note - I do not have a Pixel at this time, just going by what I've heard.
[Android Software/Hacking General [Developers Only]] osm0sis:
Recoveries have those values in their default.prop so it should also work without system mounted, but just in case anyone else needs it, this is how I added slot detection to AK2, grabbing it from the recovery property, then falling back to reading it directly from the commandline:

https://github.com/osm0sis/AnyKernel2/commit/eeddea9c3b727bb494bd728caa68c7c3d4dbb059
[Android Software/Hacking General [Developers Only]] str8str:
Happy new year and thanks for your awesome work
[Android Software/Hacking General [Developers Only]] robcore:
[MENTION=4544860]osm0sis[/MENTION]

Chris, stupid question...are you familiar with reodexing on LP?
[Android Software/Hacking General [Developers Only]] InterestingTwist:
Only way to do it currently is thru Lucky P******
[Android Software/Hacking General [Developers Only]] Ibuprophen:
Titanium Backup can do it...

Sent using the d2vzw Communicator from the Bridge of the U.S.S. Enterprise (N.C.C. 1701).
[Android Software/Hacking General [Developers Only]] osm0sis:
And there was some discussion on how to do it from the command line awhile back in here. Worth a search if you're interested. Someone said they'd take a stab a updating my odex script but I'm not sure they ever made any progress.
[Android Software/Hacking General [Developers Only]] lynnux:
[MENTION=1143630]osmosis[/MENTION] I've installed your version of busybox on my devices for a while, because I trust you, and because I was having problems installing and using another much-recommended version. It seemed too much trouble for something that seems so basic. For an average end-user who only does simple stuff like flashing custom roms, sound mods, etc, is there going to be much difference between one busybox version and another? I'm just curious. Thanks for your work.
[Android Software/Hacking General [Developers Only]] InterestingTwist:
I've updated every version since 1.2x and I haven't noticed a difference in any of them.
[Android Software/Hacking General [Developers Only]] osm0sis:
I do plenty of scripting, and honestly I've never needed half of what I have in there, let alone what others have added to their compiles, so I imagine it'll be just fine for your purposes. :p
[Android Software/Hacking General [Developers Only]] InterestingTwist:
I just wish the stock busybox would include lzip, I have to extract the one from opengapps zip to get it.
[Android Software/Hacking General [Developers Only]] mauam:
BB 1.26.1 stable is out:cool:
[Android Software/Hacking General [Developers Only]] osm0sis:
I'll add the NDK bring-up to my to-do. Thanks.

In the meantime.. do these official builds work for anyone?

https://busybox.net/downloads/binaries/1.26.1-defconfig-multiarch/
[Android Software/Hacking General [Developers Only]] grep_i:
There's no version I could use I'm on armV7
[Android Software/Hacking General [Developers Only]] osm0sis:
Ah, it looks like they used to officially roll v7 but stop at v5 now for some reason. :confused:

I'll be doing NDK builds probably next week unless there turns out to be a lot of patch rebasing required. :fingers-crossed:
[Android Software/Hacking General [Developers Only]] igloo_01:
I am having some issues with adbsync I hope someone can help with as I find it an invaluable tool for my backups!

I had the file running fine on my Nexus 5 but have just upgraded to the OnePlus 3T and now, every time I try to run the file, I get "Error "device not found" from ADB.

The exact text I get is:

I have tried changing the mount point and do not think it's to do with that. Any ideas??! Thanks.
[Android Software/Hacking General [Developers Only]] osm0sis:
Once connected does `adb shell` work? It might be one of those devices that you need to specify for all commands with adb -d.
[Android Software/Hacking General [Developers Only]] igloo_01:
Thanks for the reply. Seems to be working fine.
[Android Software/Hacking General [Developers Only]] osm0sis:
It uses its own older adb. I'm guessing that's the reason for the different conflicting outputs you're seeing.
[Android Software/Hacking General [Developers Only]] igloo_01:
So is there a way I can still run your adbsync? I can seem to do what I want when I run adb commands through command prompt (inc push and pull) but when I try to run your utility it just comes back with that error. Do I need to add in the -d command that you mentioned?
[Android Software/Hacking General [Developers Only]] osm0sis:
Yes, either figure out and add -d to use the adb I include, or update the adb.exe + . dll files in the adbsync bin/ folder to your newer ones which work on the 3T.
[Android Software/Hacking General [Developers Only]] igloo_01:
OK, I'll give that a go - thanks!
[Android Software/Hacking General [Developers Only]] Primokorn:
99-flashafterupdate.sh addon.d script doesn't work with custom kernels?

I dirty flashed a Lineage OS update on my Nexus 5. Magisk zip has been flashed but blu_spark kernel has been erased.
[Android Software/Hacking General [Developers Only]] osm0sis:
Worked on the final CM14.1 builds, with SuperSU and franco.Kernel AK2 zips, and those are pretty complicated script zips, so I'm not sure why blu_spark wouldn't work, but, my way of hacking ad-hoc FlashAfterUpdate support into addon.d has always been a matter of timing, so mileage can definitely vary with different combinations of zips.

You can try adjusting the wait time in the .sh to see if you can resolve it. Usually it'll be because it didn't wait long enough and the boot.img flashed from the ROM zip over top. It is however also possible it waited too long and ran out of time before the recovery forced the reboot, so if one doesn't work try the other.
[Android Software/Hacking General [Developers Only]] igloo_01:
I found a useful website with links to get the lastest adb files https://plus.google.com/+ElliottHughes/posts/U3B6H3Sejvv I didn't realise adb needed updating - adbsync seems to be running perfectly now (it's still in progress). Thanks very much for your help.
[Android Software/Hacking General [Developers Only]] InterestingTwist:
[MENTION=4544860]osm0sis[/MENTION]

Know a good way to detect a device with a Qualcomm processor? I was thinking grep for "msm" but I did not know if that was on other processors as well.
[Android Software/Hacking General [Developers Only]] veez21:
grep qcom
[Android Software/Hacking General [Developers Only]] InterestingTwist:
Which file?
[Android Software/Hacking General [Developers Only]] veez21:
build.prop or grep Qualcomm /proc/cpuinfo
[Android Software/Hacking General [Developers Only]] InterestingTwist:
not going to work, I'm on a 6P (810) and qcom isn't found.

Edit: I'll try CPU info
[Android Software/Hacking General [Developers Only]] osm0sis:
msm is a Qualcomm trademark and not on other processors, but it also doesn't cover all of Qualcomm's; they also have apq and qsc, maybe others.

Not sure the best way. grepping bootdevice or something from /proc/cmdline or `getprop` would likely do the trick.

Edit: Ah didn't even see this new page until after I posted. :p

[MENTION=7296895]veez21[/MENTION] is right, /proc/cpuinfo looks best - my N5 shows:

Hardware	: Qualcomm MSM 8974 HAMMERHEAD (Flattened Device Tree)
[Android Software/Hacking General [Developers Only]] djb77:
[MENTION=4544860]osm0sis[/MENTION]

I noticed in your git for Busybox you're up to 1.26.2, is there any chance of seeing an update from the current 1.25.1 installer you have in this thread please?

TIA
[Android Software/Hacking General [Developers Only]] osm0sis:
Yessir. I ran into some major problems with my Cygwin installation that ended up occupying way too much of my time off last week so I didn't get to roll the actual builds. I'm at work all weekend and I've got some installer changes to make still, so probably on my days off, by the middle of this coming week I'll have it ready.
[Android Software/Hacking General [Developers Only]] djb77:
Many thanks to you, try and not work too hard lol :)
[Android Software/Hacking General [Developers Only]] skulldreamz:
Do you have the udev rules set up properly?

Sorry bout that, I'm assuming that your on Linux ?
[Android Software/Hacking General [Developers Only]] numb_:
Hi osm0sis!

Did you have or know a script to set SELinux in enforcing mode on boot? I'm running eucos rom and it's set on permissive :(

I know i can run setenforce 1 by terminal, but there is a way to automatize that?

Thanks for your work! :D
[Android Software/Hacking General [Developers Only]] fluffi444:
Use Init.d for autostart scripts. Check if your ROM and kernel is supporting this.
[Android Software/Hacking General [Developers Only]] jcmm11:
Instead of init.d, if you have SuperSU installed in systemless mode, you can use /su/su.d

In either case create a script, place it in the directory, give it permissions of 755
[Android Software/Hacking General [Developers Only]] numb_:
Something like this?

#Set Enforce SELinux

setenforce 1
[Android Software/Hacking General [Developers Only]] jcmm11:
That should do it
[Android Software/Hacking General [Developers Only]] osm0sis:
As promised! ;):D

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-adb.Installer.v1.0.31-signed.zip:

- add /system/system (Pixel) and basic Magisk (installs to /magisk/adb-ndk/system/bin) support to installer

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

- update to latest nano official source

- update to latest terminfo files

- add /system/system (Pixel) and basic Magisk (installs to /magisk/nano-ndk/system/bin) support to installer and recovery wrapper script

- add --term <terminfo> argument to wrappers so that users may easily experiment with different terminfo choices

- change default TERM for booted Android wrapper to the greatly improved "screen", recovery wrapper default TERM remains "pcansi" since it still works better overall in more cases there

UPDATE-Busybox.Installer.v1.26.2-ALL-signed.zip

- update to latest busybox stable official source

- add /system/system (Pixel) and basic Magisk (installs to /magisk/busybox-ndk/system/xbin) support to installer

See the related commits here: https://github.com/osm0sis/android-busybox-ndk

AnyKernel2 also saw some Pixel-related fixes and gained MTK support in the last couple weeks. Now, back to the salt mines to continue·work on AIK v2.5.. :eek::cowboy:

Edit

: Guess the Magisk support was incomplete. Fix soon or zero stars. :p
[Android Software/Hacking General [Developers Only]] Captain_Throwback:
Any reason you didn't include [MENTION=4939386]Surge1223[/MENTION]'s adb 1.0.37 rather than the older 1.0.31 build?

Also, thanks for adding Magisk support! Great work.
[Android Software/Hacking General [Developers Only]] osm0sis:
Ah! Wasn't aware he had completed work on it and uploaded his builds! I'll test them out tomorrow and update my release post if all is well. :D :highfive:

Edit: It matches md5sum with one I already had on my dev PC, so I'm thinking this is the old one that doesn't connect device-to-device. If so, that's why I haven't updated.. but I will test it again to be sure.

Perhaps [MENTION=4939386]Surge1223[/MENTION] can enlighten us further and give us an updated build if he has one lying around. :)

Edit 2: [MENTION=1162986]Captain_Throwback[/MENTION], unfortunately it is the broken device-to-device one, where the connected device doesn't pop-up with the RSA key request and just remains unauthorized; switching back to 1.0.31 and it works immediately - so the zip will have to stick with it for now until Surge uploads his newer working builds. :fingers-crossed:
[Android Software/Hacking General [Developers Only]] igloo_01:
Thanks for the reply. I'm on Windows but figured out it was just that my adb needed updating.
[Android Software/Hacking General [Developers Only]] ste22032:
Hi [MENTION=4544860]osm0sis[/MENTION], I'm using your flashafterupdate script to automatically restore the custom kernel I use at every ROM update (unofficial LineageOS). This kernel has an associated app and you can choose the folder in which download newer versions of kernel, of course I selected FlashAfterUpdate folder. Do you think should be possible to modify the script to automatically delete an old version of the kernel in that folder so that only the most recent one is flashed? Or maybe I should talk to the kernel/app developer asking to implement this feature? I'm a bit lazy to not want to manually delete the old version every time lol, but I'm also interested in the possibility to automate certain aspects, thanks!
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah I'd say that's more of an issue with the app. :good:
[Android Software/Hacking General [Developers Only]] numb_:
Didn't work..

On chainfire documentation I found this

So i presume the right script would be

#!/su/bin/sush
#
# /system/addon.d/99-setenforce.script

(
echo 1 > /sys/fs/selinux/enforce
)&

but I should chmod 0700 like he said or 0755?

EDIT: Didn't work.. after 20 minutes of booting I needed to reboot in recovery and deleted the script to make the phone boot
[Android Software/Hacking General [Developers Only]] jcmm11:
I placed the following into /su/su.d/local.sh

#!/system/bin/sh
#
getenforce > /data/local/selinux.txt
setenforce 0
getenforce >> /data/local/selinux.txt
setenforce 1
getenforce >> /data/local/selinux.txt

Gave permissions of 755

Booted with no problem. Output pictured below.

Where did you place the script?

If in su.d how did you get to it from recovery in order to delete it?
[Android Software/Hacking General [Developers Only]] jcmm11:
Forgot the output
[Android Software/Hacking General [Developers Only]] grep_i:
You can mount /su in TWRP custom recovery as a loopback device.

See my earlier post about manually removing suhide which incorporates this technique.

mount /su in TWRP
[Android Software/Hacking General [Developers Only]] jcmm11:
I'm aware of that. But he didn't mention anything about doing that so was wondering what he actually did. Easier way to do it is just flash Osmosis's script :good:
[Android Software/Hacking General [Developers Only]] Surge1223:
I haven't messed with it lately, last time I looked I'm pretty sure I saw the issue.

Besides a few changed libraries (and C to C++), a few compatibility fixes for adbd, the big issue is that aosp changed from openssl to boringssl during the time between 1.0.31 and 1.0.37.

Now this itself doesn't really pose an issue for building adb, but because they changed the logic behind the RSA check, iirc it seems the first go around I edited the check but now must revisit.

On a side note:

I've been aggressively going after setools, and this time purely with the ndk, so things like libpoldiff, sediff, checkpolicy, dispol, libseaudit, etc are now buildable, unfortunately I'm getting stuck at libsefs. Once I get done we should have some nice tools. I confirmed checkpolicy and dispol parse sepolicy correctly and allow me to write out a new policy.

Let me know if have any plans for selinux related stuff.
[Android Software/Hacking General [Developers Only]] grep_i:
Okay I wasn't aware that there was a script by Osm0sis to remove selfmade startup scripts from /su/su.d if so than you are right that it is easier to flash one zip than typing 4 commands.
[Android Software/Hacking General [Developers Only]] jcmm11:
Stop being pedantic. The script simply mounts /su and makes it accessible.
[Android Software/Hacking General [Developers Only]] grep_i:
I also was not aware of that either and please don't call me pedantic if you do not explain yourself good enough, also can you be more specific and tell me the name of the script I can always find a use for such a script.
[Android Software/Hacking General [Developers Only]] jcmm11:
SUmount, you'll find it under flashable zip scripts in the OP of this thread (along with all sorts of other goodies). The script toggles the mount state for /su
[Android Software/Hacking General [Developers Only]] numb_:
I used SUmount script to delete the script in su.d folder..

Tried your script but after several minutes it didin't boot. Placed in /su/su.d and chmod 755
[Android Software/Hacking General [Developers Only]] jcmm11:
Then it's something specific to your phone/install.
[Android Software/Hacking General [Developers Only]] numb_:
I think so.. thanks for your help :highfive:
[Android Software/Hacking General [Developers Only]] Surge1223:
I got some good news and some bad news, the bad news first

I switched from master branch to the current tag roms build (android-7.1.1_r13) on so others can easily checkout, cherry-pick etc. This puts us back down to 1.0.36 for adb.

I have a buncha commits staged, but only one pushed so far (the most significant though). Also since the libcrypto_utils dir is only in master branch, I had to implement so makefile trickery to not mess with peoples repos.

But the good news is that I was able to build it and tested that device to device works.

So I'm not sure what all else people use adb for maybe you both want to go ahead and test and see if anything needs fixing?

Link https://www.androidfilehost.com/?fid=673368273298924834
[Android Software/Hacking General [Developers Only]] osm0sis:
Network adb worked on the 1.0.37 test build you had up before, it was just the device-to-device (i.e. with microUSB-to-microUSB cable) which wasn't working.. But, with your new 1.0.36 everything works great so I'll add it to the installer in my next run of updates! :)

Many thanks, as always, for your awesome work! :D
[Android Software/Hacking General [Developers Only]] grep_i:
1.0.37 is that own creation ? the latest by Google is 1.0.36
[Android Software/Hacking General [Developers Only]] osm0sis:
At HEAD of the AOSP master branch it is up to 1.0.37, but yes you're right, at the current Nougat release tags it's 1.0.36. Surge mentions the tag he used in his last post. :)
[Android Software/Hacking General [Developers Only]] blue whale:
@ osm0sis, you say all the links are in the op, but the file UPDATE-unSU-signed.zip dates back to nov 2015,

https://xdaforums.com/showpost.php?p=63615067

and now I do not know whether it is the latest version since the post of yours that I quote here dates from nov 2016
[Android Software/Hacking General [Developers Only]] osm0sis:
Attachments inherit their dates from the post, so that date you're seeing has no bearing on how new they actually are.

You'll know it's the latest because I told you it's newer and you downloaded it again. :p
[Android Software/Hacking General [Developers Only]] blue whale:
so you confirm that your file works for supersu 2.79 that is found in KATE-ZCX-TWRP-3.0.2-X-20161230 for the device xiaomi redmi 3 note SE ?
[Android Software/Hacking General [Developers Only]] osm0sis:
How can I confirm that? I don't own every device ever made. :silly:

But yes, it should work everywhere except for Pixel (since that's a whole other thing).
[Android Software/Hacking General [Developers Only]] osm0sis:
Take 2! :silly::p

See the quoted post for the Magisk install locations of the fixed zips, and see the original Nexus Media release post for usage instructions. Thanks to [MENTION=1162986]Captain_Throwback[/MENTION] for making me aware of the additional requirement in more recent versions of Magisk for valid modules. :)

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-adb.Installer.v1.0.36-signed.zip:

- update to adb v1.0.36 static arm compile by [MENTION=4939386]Surge1223[/MENTION]

- fix basic Magisk support (add module.prop)

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

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

- fix basic Magisk support (add module.prop)

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

- add /system/system (Pixel) and basic Magisk (installs to /magisk/nexusmedia/system/media) support to installer

- improve installer size by separating out md5sum-identical common files and implementing *.tar.xz sub-archives for each device

Also AIK v2.5 (Android Image Kitchen, AIK-mobile and AIK-Linux) launched this week, adding the long-awaited Sony kernel.elf unpack support (repacks as boot.img for unlocked bootloaders) and MTK device support. I re/wrote some things into my own updated tools ([MENTION=357342]tobias.waldvogel[/MENTION]'s unpackelf + OmniROM's mkmtkbootimg - now mkmtkhdr) for this one, and I've got a few more planned so it's been interesting/time-consuming! ;):cowboy:

Edit

: Reuploaded to make sure the Magisk install directories matched the id and were unique. Should be good now. [MENTION=5787964]SuperR.[/MENTION] should be good to include the new busybox in his kitchen now as well. :good:
[Android Software/Hacking General [Developers Only]] fluffi444:
You are awesome! So may very useful projects. I love AIK. Daily tool for ramdisk modifications... ?
[Android Software/Hacking General [Developers Only]] robcore:
AIK 2.5 is running without a hitch my friend, :) thank you a million times over! Also for what it's worth I chipped in and reported the aik knockoff app as ip theft...
[Android Software/Hacking General [Developers Only]] drickles:
[/COLOR]I was wandering if there were any flashable script zips instructed to clear datvik and cache partitions upon every reboot. This custom ROM I'm on tends to enter a bootloop Everytime I reboot my phone and the only way I can get my phone back on is if I go clear my datvik and system cache from TWRP. So was wondering if a flashable script like that existed in order to ease my work prevent me from manually going through that process again. Thank you