yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] nemanja066:
1. I think, yes it is, A/B, Xiaomi Mi 8.

2. I searched the topic a bit and I see that you are recommending zip file be moved to the /cache partition. This zip is exactly the zip that disable encryption forcing (disable dm verity & force encrypt).

The magisk script works OK, maybe I need to see where it invokes those required files or what.

Thanks.:svetius:
[Android Software/Hacking General [Developers Only]] osm0sis:
If it's A/B then definitely just #1 then, and #2 wouldn't be a factor. See my edits above.
[Android Software/Hacking General [Developers Only]] Paget96:
Removed
[Android Software/Hacking General [Developers Only]] Paget96:
Hello [MENTION=4544860]osm0sis[/MENTION], a lot of time passed from when I was here last time. :D

Two weeks ago I bought Redmi Note 8pro, rooted it and as a kernel tweaker, let's see how the kernel is set up.

One strange thing I have noticed is that almost all the blocks are treated as a rotational storage, and why the heck it have all the merges enabled.:confused::confused::confused:

One more strange thing, even is it clustered device it have just global tunable for schedutil which by default have both

up_rate_limit_us and down_rate_limit_us set to 0.:eek:
[Android Software/Hacking General [Developers Only]] osm0sis:
Hey! Good to see you. And Merry Christmas to all!

rotational 1 is the default because Linux. Most devices aren't tweaked for flash storage by the manufacturer.

I'm not super familiar with schedutil, but that's the default on my OP7T on stock and arter kernel, so I'm guessing not a big deal either?
[Android Software/Hacking General [Developers Only]] Paget96:
Merry Christmas to you and your family also :highfive: Hmm, so then maybe I should checkout how to optimize that. If you wanna join the development, check this.

https://github.com/Magisk-Modules-Repo/lspeed/tree/v1.5/system/etc/lspeed/binary

Maybe you can help a bit, people just requesting stuff for the new devices, I cannot make them all.

Have a nice day
[Android Software/Hacking General [Developers Only]] GHOST1010:
Where to place file in adb/fastboot , Eg I want to fastboot boot TWRP.img , where should be the twrp.img placed , where is the adb installed?
[Android Software/Hacking General [Developers Only]] jd1639:
Put fastboot and adb in any folder you want. Then in control panel, advanced system settings, environmental variables, edit the path to include the folder that fastboot/adb are in. Then it doesn't matter where the twrp.img is relative to fastboot/adb. Open a power shell in the folder twrp is in and do what you want with it. If you ran snoop's script adb will be in a folder adb.
[Android Software/Hacking General [Developers Only]] GHOST1010:
I mean on Android , while using osmosis adb and fast boot module , to boot twrp on another phone via otg
[Android Software/Hacking General [Developers Only]] osm0sis:
It's like Linux, you can put stuff wherever, you just need to use the path. So sdcard is fine, then provided fastboot works between your 2 devices, fastboot flash recovery /sdcard/twrpimgname.img
[Android Software/Hacking General [Developers Only]] HippoMan:
"Install to inactive slot" without upgrading Magisk?

I am using Magisk v20.1 on my OnePlus 7 Pro running 10.3.0.

It turns out that v20.2 is causing me problems which I haven't figured out yet, and so I want to stay at v20.1 for the moment.

I need to reflash my ROM, and normally, I would do so via OTA followed by an installation of the "TWRP A/B Retention Script" via Magisk, which I subsequently would follow with INSTALL->INSTALL->Install to inactive slot(after OTA).

However, the "Install to inactive slot(after OTA)" procedure only appears under "UPDATE" now, due to the fact that v20.2 is available, and there is no "INSTALL". Therefore, invoking "Install to inactive slot(after OTA)" seems to only be possible if I also upgrade to Magisk-v20.2, which I don't want to do.

Is there any way for me to perform the "TWRP A/B Retention Script" and "Install to inactive slot(after OTA)" procedures while still keeping my Magisk version at v20.1?

Thank you very much.

.​
[Android Software/Hacking General [Developers Only]] HippoMan:
I found the solution ...

https://xdaforums.com/showpost.php?p=81390095&postcount=37734

.​
[Android Software/Hacking General [Developers Only]] wangdaning:
I feel so lucky to have grown my android life in the era of [MENTION=4544860]osm0sis[/MENTION]. When we are all old we will remember the Nexus 5, I still hold mine when I sleep, haha. Not really, but it has had a new battery put in and my son uses it sans sim card (still running Slim rom). Sorry for OT, but thanks for the scripts, also.
[Android Software/Hacking General [Developers Only]] JazzMartian:
Thanks for sharing your works. I'm not a dev or advanced user, so I don't know what to do with a lot of your projects, but I'm interested in learning. It's just been challenging so far, finding info that meets me where I'm at, so it's been a slow process.

Anyways, I wanted to contribute something here and give back. I tried my hand at getting these updated scripts into a flashable zip form. Seems to be ok. Let me know if I messed up. I basically just edited the old zip installer. The zip size is as big as it is cause I read that flashable zips should be archived on "store" compression. But I don't think that's necessarily true, and TWRP will flash them if they're stored on "normal" compression too. But I figured it was better to error on the side of caution.
[Android Software/Hacking General [Developers Only]] osm0sis:
I appreciate you using the idea as a learning process, but there is no such thing as /system/etc/init.d anymore, so neither zip will work. Normal compression should work totally fine, by the way. :good:

That said, I also don't want them up in a zip (that works, the old one is there for posterity), or I would have done it myself, so please take it down; those scripts haven't been updated since Lollipop or Oreo, so I wouldn't necessarily trust them all on a modern device.

Those who do want to tinker with them should be able to place them themselves in the appropriate directory for their ROM/root. That way they also know what to do if/when things go wrong.

Hopefully you understand, and don't find this discouraging. Scripting is super handy, and can be pretty fun, so keep it up! Your best bet might be to go to my Complete Shell Script update-binary replacement thread and start by learning to piece together your own installer with the functions I've provided. :)
[Android Software/Hacking General [Developers Only]] mrrocketdog:
=osm0sis;81516769]I appreciate you using the idea as a learning process, but there is no such thing as /system/etc/init.d anymore, so neither zip will work. Normal compression should work totally fine, by the way. :good:

That said, I also don't want them up in a zip (that works, the old one is there for posterity), or I would have done it myself, so please take it down; those scripts haven't been updated since Lollipop or Oreo, so I wouldn't necessarily trust them all on a modern device.

Those who do want to tinker with them should be able to place them themselves in the appropriate directory for their ROM/root. That way they also know what to do if/when things go wrong.

Hopefully you understand, and don't find this discouraging. Scripting is super handy, and can be pretty fun, so keep it up! Your best bet might be to go to my Complete Shell Script update-binary replacement thread and start by learning to piece together your own installer with the functions I've provided. :)

only about 3 or 4 of us left with /system/etc/init.d. just a tad behind the times. [emoji99]
[Android Software/Hacking General [Developers Only]] JazzMartian:
Gotcha, file removed. I just noticed the date of when you posted it! I have a device that's still on Lollipop, so I still have some use for it. But yeah not many others. Anyways, I appreciate the encouragement. Will see if I can make sense out of your Complete Shell Script update-binary sometime (read into some of it so far), as that is an area of interest. :)
[Android Software/Hacking General [Developers Only]] thesupreme85:
Hello guys

If anyone can help with the issue that i got with busybox and magisk

Running miui 11 7.0 based on note 4x mido

Can't get busybox to work in magisk

Tried flashing trough magisk installer and with Orange Fox Recovery

I get the same results

Any suggestions
[Android Software/Hacking General [Developers Only]] gloeyisk:
Open any file manager app with root extension, go to /data/adb/<module-name> and because the issue is about BusyBox then delete the BusyBox folder. Reboot once, then re-flash the module.
[Android Software/Hacking General [Developers Only]] Didgeridoohan:
[MENTION=4570272]thesupreme85[/MENTION]

And don't forget to save the installation log in case it still doesn't work. It would tell us a lot more about what goes wrong.
[Android Software/Hacking General [Developers Only]] thesupreme85:
I deleted the folder with the root file explorer like suggested.
[Android Software/Hacking General [Developers Only]] osm0sis:
So as usual with cases like this you've got a su.img left over from not cleanly uninstalling SuperSU when you switched to Magisk.

Delete su.img from /cache and/or /data, then reflash my busybox module from the Magisk repo. :good:

I'm getting pretty tired of this issue, so I'm going to add su.img to the Magisk installer's root removal function.. su.img SuperSU has been long dead. :rolleyes:
[Android Software/Hacking General [Developers Only]] thesupreme85:
It works.

Thanks for helping so quickly.
[Android Software/Hacking General [Developers Only]] DiamondJohn:
Just an FYI. I am testing an alpha ROM (LOS android 10) and running (ie testing) your Magisk busybox

Is it expected to be getting SELinux denials? as I said, the ROM is pretty young, and obviously the SELinux is not quite there (its permissive for starters).

01-19 00:43:50.577 14244 14244 I busybox : type=1400 audit(0.0:725): avc: denied { ioctl } for path="pipe:[91381]" dev="pipefs" ino=91381 ioctlcmd=5413 scontext=u:r:magisk:s0 tcontext=u:object_r:magisk_file:s0 tclass=fifo_file permissive=1

the ROM is permissive so its no issue right now. I have not tested it on my Oreo daily, which is enforcing. I am running stericsons busybox on that device.

a few more can be seen at: https://hastebin.com/uqigumiyiz.bash
[Android Software/Hacking General [Developers Only]] osm0sis:
Might be something off with your Magisk/busybox installation; normal context for a module file is system_file, not magisk_file. :confused:
[Android Software/Hacking General [Developers Only]] DiamondJohn:
So I am reading that I have done something wrong.

Do you have any idea why it is showing as a "magisk_file" instead of as a system file? Anything i could look into on the device?

Busybox works on the device, and the files are monted to /system/xbin, with owner and group being "root", and the permissions are 777. which ois the same as my Oreo device, which is running sterricson.

I installed Magisk 20.3 using TWRP and the flashable zip. I did that after I booted once, without Magisk installed.
[Android Software/Hacking General [Developers Only]] osm0sis:
I would just doublecheck the files in /data/adb/modules/busybox-ndk to make sure their context is system_file, and if they are I probably wouldn't worry about the denials.
[Android Software/Hacking General [Developers Only]] JazzMartian:
Thanks for the BusyBox zip. However, I recieve an error in recovery when flashing:

"E: Error creating fstabs"

Using TWRP. This has occured on 2 different devices. Has happened on Kit-Kat (stock), Lollipop (stock), Marshmallow (LineageOS), Nougat (LineageOS), and Oreo (LineageOS).
[Android Software/Hacking General [Developers Only]] osm0sis:
Harmless srderr log output just trying to mount partitions your device doesn't have.
[Android Software/Hacking General [Developers Only]] blackeangel:
Hello. I am a fan of your builds. I love autumn * unix systems utilities. Could you compile static Python 3.8.1 for me? Or for all of us. I can’t do it, because I’m not very good at it. Or, it’s not difficult, write the instructions on how to do this, and what you need to install for this. Naturally, the assembly will be carried out on the phone under arm.
[Android Software/Hacking General [Developers Only]] osm0sis:
No thanks.
[Android Software/Hacking General [Developers Only]] alecxs:
[MENTION=6581630]blackeangel[/MENTION] i don't think it's possible because of endless dependencies/modules for example OpenSSL and pycryptodome. maybe you can ask in other thread they can explain better, but don't expect anyone is doing your homework for you...

edit: check this
[Android Software/Hacking General [Developers Only]] Nikhil:
[MENTION=4544860]osm0sis[/MENTION] a little late for this but better late than never ;)

MOD EDIT: Payment details removed.
[Android Software/Hacking General [Developers Only]] Lurizan:
I have two phones & used adb fastboot module for flash stock rom on my pixel 1 and it's work but when I want to flash stock rom on my pixel 3a it's not work

[IMG="example"]https://drive.google.com/file/d/1-5UMZMF7XZcOBLj6tQ1gmmAAKykWZA2s/view?usp=drivesdk[/IMG]
[Android Software/Hacking General [Developers Only]] AndDiSa:
Update your fastboot binaries ...
[Android Software/Hacking General [Developers Only]] abisciter:
How to update?
[Android Software/Hacking General [Developers Only]] amg314:
https://dl.google.com/android/repository/platform-tools-latest-windows.zip
[Android Software/Hacking General [Developers Only]] #vibhanshu:
Can I install it on Android 10 ?
[Android Software/Hacking General [Developers Only]] rodken:
Would I be able to utilize '98-twrp_ab.sh addon.d-v2 script' after dirty flashing?
[Android Software/Hacking General [Developers Only]] osm0sis:
There are a lot of things in this thread. You'll have to be a bit more specific.

Dirty flashing implies A-only, since on an A/B device if you flash the ROM again it goes to the other slot, even in recovery... So is your device actually A/B or not? addon.d-v2 is only on A/B, and recovery sticks just fine through A-only ROM installs.

If you just mean reflashing an A/B ROM in recovery then, as mentioned in my above post, recovery addon.d-v2 support will be in the next TWRP release but is not yet widely available.
[Android Software/Hacking General [Developers Only]] rodken:
On the 2016 Pixel XL, which script would benefit me when reflashing a A/B ROM to get TWRP to stick at this point and time?
[Android Software/Hacking General [Developers Only]] jamesoliver11:
Spotify

Spotify

Thanks for the interest! More to come, I'm sure!
[Android Software/Hacking General [Developers Only]] osm0sis:
Yes. That script already works fine for normal booted A/B OTAs on custom ROMs with addon.d-v2, but for recovery addon.d-v2 people will need to wait for the next TWRP release.
[Android Software/Hacking General [Developers Only]] FriendlyNeighborhoodShane:
Hello [MENTION=4544860]osm0sis[/MENTION] !

Any ideas on how to get the packagename of the Android terminal app that a scriot is being executed on?

As root, so $(id) shows 0, not the real UID.
[Android Software/Hacking General [Developers Only]] osm0sis:
Off the top of my head, the output of ps -A (toybox) or ps (busybox) might be useful.

u0_a323 24569 785 1457260 118960 0 0 R jackpal.androidterm
u0_a323 24604 24569 27332 2900 sigsuspend 0 S sh
u0_a323 24625 24604 61316 2124 wait_woken 0 S su

As you can see in the sample above, the parent of su is the sh whose parent is the terminal app.
[Android Software/Hacking General [Developers Only]] FriendlyNeighborhoodShane:
Thanks for this!

I haven't been exactly able to do this programatically or even by hand though. Maybe Magisk is breaking something?

When I try to follow $$ or $PPID up the tree, I end up with ( sh < magiskd < init ) directly xD

And if I find to my terminal app (tried with both terminal emulator and termux) down the tree, it's

( terminal > [ sh - ] or [ bash -l ] > magisk.bin /sbin/su ) with that su call having no children.

So basically the heirarchy works, but I can't find anything connecting my script or shell process to the su call, magiskd seems to hijack the session.

(maybe could grep the ARGS for su call and check for something else?)
[Android Software/Hacking General [Developers Only]] FriendlyNeighborhoodShane:
UPDATE: Yeppp, that seems to be exactly the case, Magisk su is causing this.

I tried putting $$ from one terminal that su hadn't been called on, and searching ps for that (on another terminal with su, of course) and it is straight ( shell < terminal ).

But maybe there's some other relationship between ( sh < magiskd ) and ( magisk.bin /sbin/su < shell < terminal ) ?
[Android Software/Hacking General [Developers Only]] alecxs:
would you mind updating your busybox installer with selinux variant, or where can i get your binaries?
[Android Software/Hacking General [Developers Only]] osm0sis:
Can't just snap my fingers and make it happen, it will take some work to get busybox to compile with SELinux support, but it's on my to-do for awhile now, and I do intend to get to it.
[Android Software/Hacking General [Developers Only]] alecxs:
easy.. i can get it from any zip meanwhile, pretty sure you already added it somewhere.. i will find thx :)
[Android Software/Hacking General [Developers Only]] DiamondJohn:
Hey, a few posts back, I mentioned I was getting an SELinux denial in my logs from your BB. Out of interest, would the above have anything (in a very vague general way, no details) to do with that?

NB: I am not concerned (it was a single thing from memory and didn;t create a noticeable effect) and am grateful for what you have done and will wait patiently in the odd chance you have time, and spend the time etc etc etc
[Android Software/Hacking General [Developers Only]] osm0sis:
Honestly not sure. Your denial didn't seem to fully make sense to me. We'll see! Magisk busybox now has SELinux support.
[Android Software/Hacking General [Developers Only]] Perepandel:
I'm very confused about this.

I've tried unsuccessfully to install busybox because it was "the recommended shell for the props script". But to my understanding this is merely a Magisk module, and there's no way to "independently" run it; am I wrong? If so, how is one supposed to run the script by hand from a busybox shell? Nevertheless, the "props" script is neither working when I try to run it from any other brand of available shells like Termux or so...
[Android Software/Hacking General [Developers Only]] amg314:
Simply install 'busybox for Android NDK' module from Magisk repo))
[Android Software/Hacking General [Developers Only]] Perepandel:
Hi and thanks for replying! Unfortunatelly, my doubts are still intact:

- That's what I did from the beginning; I have that module properly installed inside Magisk (I see it on my modules list), but still don't know what to do with it neither how to run "props" script.

- How do I run that busybox implementation? I expect to get a runnable shell somewhere.

- After running my SafetyNet test, my ctsProfile still evaluates to false.

The thing is that even though I have the modules installed, I don't know what to do with them. Did I mention that I installed because it was the recommended busybox implementation for the MagiskHide Props Config?
[Android Software/Hacking General [Developers Only]] alecxs:
disable magisk core only mode. open terminal. type: busybox

does it work?
[Android Software/Hacking General [Developers Only]] amg314:
BB is not an app, it's a linux utilities suite.

In Android terminal run command:

which busybox

/system/xbin/busybox -- My tablet show me that BB is installed to /system/xbin/

then run command:

busybox -- You will see long linux utilities list

Run ls command -- you will see current folder file list

Run ls --help -- You will see

*--------------------------------------------------------------------*

usage: ls --color[=auto] [-ACFHLRSZacdfhiklmnpqrstux1] [directory...]

list files

what to show:

-a all files including .hidden -b escape nongraphic chars

-c use ctime for timestamps -d directory, not contents

-i inode number -p put a '/' after dir names

-q unprintable chars as '?' -s storage used (1024 byte units)

-u use access time for timestamps -A list all files but . and ..

-H follow command line symlinks -L follow symlinks

-R recursively list in subdirs -F append /dir *exe [MENTION=274864]sym[/MENTION] |FIFO

-Z security context

output formats:

-1 list one file per line -C columns (sorted vertically)

-g like -l but no owner -h human readable sizes

-l long (show full details) -m comma separated

-n like -l but numeric uid/gid -o like -l but no group

-x columns (horizontal sort)

sorting (default is alphabetical):

-f unsorted -r reverse -t timestamp -S size

--color device=yellow symlink=turquoise/red dir=blue socket=purple files: exe=green suid=red suidfile=redback stickydir=greenback

=auto means detect if output is a tty.

*--------------------------------------------------------------------*

And so on...

https://busybox.net/downloads/BusyBox.html
[Android Software/Hacking General [Developers Only]] Perepandel:
Hi,

This is interesting, because I cannot disable magisk core only mode. I mean, if I disable it, next time I check magisk configuration after rebooting it appears again as "disabled". Same with Magisk Hide, although I successfully changed name of the app to a different one.

Oddly enough, I tried to run busybox in Termux and it works (with no options, so it just throws an option list), but when I try to run props (in Termux) it says that no command is found...
[Android Software/Hacking General [Developers Only]] alecxs:
i can not see the relation to busybox. if it is an applet simply type command with prefix, for example: busybox props
[Android Software/Hacking General [Developers Only]] osm0sis:
Sounds like you're just having an issue understanding how MagiskHide Props Config works. You should read the documentation and OP in the thread for that module, and then direct any further questions you have there.

https://xdaforums.com/apps/magisk/module-magiskhide-props-config-t3789228/
[Android Software/Hacking General [Developers Only]] Perepandel:
Tried it (before my last post) but no luck, either...

I read the docs even before installing the module and to my understanding did what was stated there.

I cannot turn "basic magisk mode" off (or whatever it's called) in Magisk Manager, so I suspect I'm suffering of some unknown Magisk bug...
[Android Software/Hacking General [Developers Only]] DiamondJohn:
It sounds like your question may possibly (yes, that's two possibles) be best addressed either in the thread [MENTION=4544860]osm0sis[/MENTION] referred you to, or specifically in a Magisk thread, if it is indeed a bug in Magisk.
[Android Software/Hacking General [Developers Only]] tres_linguas:
Guys, is it possible that in-built lineageos updater app is sensitive to the existence of new scripts in addon.d? From the point on I placed the flashafterupdate script in that folder, the updater app still downloads new builds but gives an error message after hitting "install" :rolleyes:

I can, however, confirm that everything works fine when done manually so I can exclude the possibility of a malfunctioning script or improperly set permissions etc

I posted the problem already in lineageos forum for my phone (+ telegram group), but no answers so far. Now I'm asking here because the script is from here :fingers-crossed:

Redmi note 4 /mido, official lineageos 16, rooted with latest magisk, default kernel, no xposed nor substratum etc

Any help is appreciated :)
[Android Software/Hacking General [Developers Only]] osm0sis:
Not something I've ever heard of or seen. Perhaps others can chime in.

All of my testing has been on Lineage 16 on my guacamole (OnePlus 7 Pro), which is A/B so the script functions as addon.d-v2 there, and for addon.d (v1) I use my Nexus 7 (flo) on last official Lineage 14.1.

mido is older so I imagine that's addon.d (v1) we're talking about in your case. What's the error you're seeing?