yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] osm0sis:
Updated my default alarm setting workaround for OxygenOS just now, working on latest Magisk and OP6T. :D

https://xdaforums.com/showpost.php?p=75374306&postcount=1616

Edit

: Thanks [MENTION=5301049]Titokhan[/MENTION] for the nice write-up! https://piunikaweb.com/2019/02/02/how-to-set-custom-alarm-tone-on-oneplus-phones/ :)
[Android Software/Hacking General [Developers Only]] HemanthJabalpuri:
[MENTION=4544860]osm0sis[/MENTION]

After flashing your unSU.zip..

My device is not booting into homescreen

It shows only bootanimation...

After restoring backup and lookup of your script

I found the following error...

My device is running on KitKat with SuperSU so

There is no app_process32/64 file in KitKat

therefore

if [ -e app_process64 ]; then
ln -sf app_process64 app_process;
else
ln -sf app_process32 app_process;
fi;

should be changed to

if [ -e app_process64 ]; then
ln -sf app_process64 app_process;
elif [ -e app_process32 ]; then
ln -sf app_process32 app_process;
fi;

or f option in ln command should be removed..

Your script forces app_process32 to symlink to app_process by overwriting the hardlinked app_process binary
[Android Software/Hacking General [Developers Only]] osm0sis:
Yes. It is only for modern Android versions. You also need to reflash your boot.img if it was systemless root or the device won't boot.
[Android Software/Hacking General [Developers Only]] adikri:
I know but as I stated I don't know about GitHub so I offered my "testing" .. I can only offer what I have.. :cowboy: i am just trying to be helpful
[Android Software/Hacking General [Developers Only]] adikri:
gappaintegrator

Sometime it works, and sometime it don't

Os : stock android 8.1 Oreo

Device : Asus max Pro m2

Screenshot has been attached for the same..
[Android Software/Hacking General [Developers Only]] HemanthJabalpuri:
Thanks..

I found that with magisk binary we can trim raw ext4 images using the following command

magisk imgtool trim <img path>

It trimmed 1.46gb of image having 770mb data to 800mb image file....
[Android Software/Hacking General [Developers Only]] MPeti1:
Hi!

fsck seems to be not working for me. I wanted to repair my exfat sdcard (because since a reboot android complains about that it got corrupted...), but even without args it always returns the following error message: " fsck: can't read '/etc/fstab': No such file or directory"

I've taken a look at it and it seems that what it wants is "/fstab.qcom" , but it would just give misinformation because the sdcard's line specifies vfat as fs, but in reality it's exfat
[Android Software/Hacking General [Developers Only]] osm0sis:
I've never seen a patch to get that working on booted Android. There isn't even a guarantee of an actual fstab file anymore on system-as-root and Treble devices, but it should work in TWRP where there is an /etc/fstab.

Edit: Just like the mount command, you can specify the actual block device from /dev/block, the fs opts and type (e.g. -t f2fs) so it doesn't have to look in fstab and it looks like it'll work, but depending on the filesystem the applet to then further check may not exist, since it appears to just wrap.

:/ # fsck --help
BusyBox v1.29.3-osm0sis (2018-11-17 02:42:59 AST) multi-call binary.

Usage: fsck [-ANPRTV] [-t FSTYPE] [FS_OPTS] [BLOCKDEV]...

Check and repair filesystems

-A Walk /etc/fstab and check all filesystems
-N Don't execute, just show what would be done
-P With -A, check filesystems in parallel
-R With -A, skip the root filesystem
-T Don't show title on startup
-V Verbose
-t TYPE List of filesystem types to check
:/ # fsck -RV -t ext4 /dev/block/bootdevice/by-name/vendor_b
fsck (busybox 1.29.3-osm0sis)
fsck: can't read '/etc/fstab': No such file or directory
[fsck.ext4 (1) -- ] fsck.ext4 /dev/block/bootdevice/by-name/vendor_b
fsck: fsck.ext4: No such file or directory
:/ #

Busybox only has build options for fsck.minix for whatever reason, and no e2fsck like recovery or booted Android does.
[Android Software/Hacking General [Developers Only]] pkgnex:
https://git.busybox.net/busybox/tree/?h=1_30_stable

:p
[Android Software/Hacking General [Developers Only]] osm0sis:
:rolleyes:
[Android Software/Hacking General [Developers Only]] pkgnex:
Gotta poke fun at each other sometimes, buddy!

(It's been hours since it dropped... HOURS!)
[Android Software/Hacking General [Developers Only]] MPeti1:
Thanks for the help, but then probably it wouldn't work anyway, because I wanted to fix an exFat filesystem. The problem was that after a fast reboot the system said that the sd card got corrupted, and even windows wasn't able to fix it, although this happened many times in the past and it was able to fix it in seconds. The sd card is now completely dead, so kind of problem solved, but rather gone
[Android Software/Hacking General [Developers Only]] osm0sis:
Looks like TWRP also has fsck.exfat, fsck.fat and fsck.ntfs. Ah well.
[Android Software/Hacking General [Developers Only]] MPeti1:
Good to know, thanks :)
[Android Software/Hacking General [Developers Only]] alecxs:
my phone have binary /system/bin/fsck_msdos
[Android Software/Hacking General [Developers Only]] HemanthJabalpuri:
[MENTION=4544860]osm0sis[/MENTION]

Can you please update busybox to 1.30.1....

and commit from https://xdaforums.com/showthread.php?t=2239421&p=78837205 to unSU.zip beacuse now Magisk supports from android v4.2....

John Wu also made this commit in Canary build https://github.com/topjohnwu/Magisk/commit/10613686ed11187298aa8658a431dc5835f20fde
[Android Software/Hacking General [Developers Only]] FriendlyNeighborhoodShane:
Is there any way to list all the activities and services of any installed app through the terminal? I couldn't find anything other than dumpsys package [package], which only seems to list activities and in a weird arrangement. If there isn't, is there any external utility I can compile and use for phones?

Thanks
[Android Software/Hacking General [Developers Only]] alecxs:
I don't know, but there is an App (cn.wq.disableservice apk) that can show services. maybe the developer can help
[Android Software/Hacking General [Developers Only]] DragonFire1024:
Wow no one knows this?

adb shell ps

Yes there really are that many processes and or services. If you have root, you can use 'pmdump' tool. It will dump, if there is any, memory of apps and services, but not all.

https://github.com/friendlyJLee/pmdump
[Android Software/Hacking General [Developers Only]] nussbaum:
apps_Packages Info https://f-droid.org/app/com.oF2pks.applicationsinfo

is quite informative and open source.
[Android Software/Hacking General [Developers Only]] FriendlyNeighborhoodShane:
I actually didn't mean all the running processes on a linux-level. I need to list all (running or not) the (android-level) activities and services of any single package.

Ah, I knew of all these apps (Another open one would be stanley) but I never found a way to do it directly through command line with an inbuilt utility. But it never occured to me to ask a dev or check the sources.

Thanks!
[Android Software/Hacking General [Developers Only]] DragonFire1024:
Those processes are both Linux and Android.
[Android Software/Hacking General [Developers Only]] FriendlyNeighborhoodShane:
Yeah, but still not what I need, as I'm looking for a way to list all the activities and services (AKA components/classes) of any specific android package.
[Android Software/Hacking General [Developers Only]] DragonFire1024:
It's the pro version (they do have a free version), but it's worth the money. It has root options and an Xposed module, but does not require them

App: https://play.google.com/store/apps/details?id=ccc71.at

All their apps: https://play.google.com/store/apps/dev?id=4922756745736611300

If root, you can see every apps move, permission, services, receivers, revoke them and disable the services. Very powerful and can screw you up if not careful.
[Android Software/Hacking General [Developers Only]] edzamber:
Hi all

I'm on S9 G965f, with my own Custom TW Rom base.

I try to build a script for installing apks into data/app from twrp recovery.

On Pie, its no more possible to just copy data/app/app-folder. As far we reboot, app is remain not installed.

Only way i found is to use preload installer but works only on clean install. I can't find where value "1" is write in data to tell to system that preload already run one time. So i can't reset this value to 0 and run preload istaller again.

If someone can help me to make a sh script that can install into data/app it will be great.

Many thanks [emoji3]
[Android Software/Hacking General [Developers Only]] osm0sis:
I think there are Magisk modules that do this already. Basically you wait until data is decrypted and install using the pm command in a boot script (package manager).
[Android Software/Hacking General [Developers Only]] edzamber:
In fact i would like install apk in data/app with my Rom zip installation with aroma istaller...
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah, can't really be done anymore from what I've read.
[Android Software/Hacking General [Developers Only]] edzamber:
I found in Viper4a zip it propose to istall Viper4android apk in data/app from aroma but i can't understand how to adapt this script to install any apk. Can you have a look ?

Here attached file look to install.sh from common folder

https://mega.nz/#!jpsjgS7Y!oEnODrxftpXOQF27y8lL1x0WVi0XgOmmpe39-eYMsaU
[Android Software/Hacking General [Developers Only]] timbuctoo:
Symlink creation error from cpio in anykernel.sh | Franco kernel (Pocophone on LOS16)

I'm getting an error (highlighted in code below) while flashing Franco kernel (that uses anykernel) for the Pocophone F1:

# dump boot and extract ramdisk
dump_boot() {
dd if=$block of=/tmp/anykernel/boot.img;
$bin/unpackbootimg -i /tmp/anykernel/boot.img -o $split_img;
if [ $? != 0 ]; then
ui_print " "; ui_print "Dumping/splitting image failed. Aborting..."; exit 1;
fi;
mv -f $ramdisk /tmp/anykernel/rdtmp;
mkdir -p $ramdisk;
cd $ramdisk;
[COLOR=Red]gunzip -c $split_img/boot.img-ramdisk.gz | cpio -i;[/COLOR]
if [ $? != 0 -o -z "$(ls $ramdisk)" ]; then
ui_print " "; ui_print "Unpacking ramdisk failed. Aborting..."; exit 1;
fi;
cp -af /tmp/anykernel/rdtmp/* $ramdisk;
}

I saved the log from TWRP (also attached with this post) and zeroed the error further down to the cpio command above that gunzip was piping to.

The log indicates the error is because cpio can't create a symlink:

cpio: can't create symlink 'bin' to '/system/bin'

I can manually create a symlink to /system/bin (ln -s), but under which path? The error does not say where this symlink has to be created. Can anyone please help?

I had posted the queries on the Franco kernel thread as well (posts#1837 and #1878), but went unanswered. I'm finally reaching out here.

Thanks in advance to anyone who can chip in with a resolution.

-- Update --

I got an answer from Franco in his thread hinting your tweet. Am on Magisk 18.1. What's the resolution though?
[Android Software/Hacking General [Developers Only]] kevintm78:
Have you tried the fix that was posted? In my case I flashed the unSU.zip (probably not necessary, just wanted to start clean) and then my stock boot.img. After that I flashed my anykernel zip then magisk v18.1. Since then I've been able to flash anykernel without errors. Hope that helps.
[Android Software/Hacking General [Developers Only]] osm0sis:
The resolution is in the linked post in my tweet my dude.. you need to start with an untouched boot.img, then either use the latest Magisk Canary or redownload Magisk stable (it was silently updated at one point, I forget which version) and flash it over that untouched boot.img. Then the ramdisk will never get broken, and then AK2 will flash over top correctly again.

This was never a bug in AK2, AK2 just exposed the bug in Magisk.

Nope, no time to dig into other people's script problems at the moment. Maybe ask someone already familiar with the Viper scripts.. like the Viper devs.. in the Viper threads?
[Android Software/Hacking General [Developers Only]] jcmm11:
Latest BusyBox Magisk module. I assume the install won't work on the Canary builds due to no more img files. Any reason I can't just replace the binary and module.prop? (New or removed applets?)
[Android Software/Hacking General [Developers Only]] osm0sis:
Why would you assume that? Latest Canary still has backwards compat using magisk_merge.img and symlinks, plus if you check the commit I also updated my installer for the new "imageless" Magisk for once topjohnwu eventually removes those compatibility symlinks. ;)

https://github.com/Magisk-Modules-Repo/busybox-ndk/commit/5ec838fdaa1527f96d285a12cc495bf983e17d47

Anyway, formal release later when I've got more time. :good:
[Android Software/Hacking General [Developers Only]] timbuctoo:
Yup, I remember; that was the infamous Magisk version 18. Updating the same version with a newer file is not at all good software development practise; creates ambiguity, confusion and is covering up mistakes. If a version is screwed up, the least a developer could do is put a note to users to not use it, and bump the version number up. Sadly quite a number of developers on XDA do this, including topjohnwu and Franco.

Tried the fix - uninstalled Magisk 18.1, flashed stock boot.img followed by Magisk 18.1 and then Franco kernel. While the boot process was stuck in the animation for half an hour on my Pocophone F1, and a hard reboot resulting in the same, I got to TWRP flashed the ROM and the usuals, and the system booted just fine. So, all's well that ends well.

Anykernel works great now; many thanks for the fix.
[Android Software/Hacking General [Developers Only]] Nebrassy:
[MENTION=4544860]osm0sis[/MENTION] is it possible to support addon.d v2 in anykernel2?
[Android Software/Hacking General [Developers Only]] osm0sis:
Anything like that would require root, like Magisk's v2 support. I think instead I'll try to get flashafterupdate working on v2.
[Android Software/Hacking General [Developers Only]] Nebrassy:
Not sure if you get what I mean, I'm not that experienced with it, I mean having an addon.d v2 script for roms that support it like los to keep the kernel after an ota update (including a/b devices)
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah and it's more worthwhile to work on getting any zip in a directory reflashed after an update since both would require the same trick of executing as root to get that stuff done. Then you could just put your kernel zip in that directory and both problems are solved. See what I'm getting at now?
[Android Software/Hacking General [Developers Only]] Nebrassy:
Ah yeah I get it, would that work for a/b devices though?
[Android Software/Hacking General [Developers Only]] DragonFire1024:
Hello [MENTION=4544860]osm0sis[/MENTION] just a quick question. What do you use to unpack the boot.img in the Kernel init.d injector flash zip? We have begun unlocking the Amazon tablets and I have an old model Fire 7. For the first time, without an error or soft bricking the tablet, the zip worked. I am curious because we currently do not have a way to unpack and repack an Amazon boot.img (mediatek base?) without the headers getting messed up and the kernel crashing (because amazon does something to them that makes this very hard). There is a way to edit and keep your mods on a boot img for the 8.9in amazon tablet (not mediatek), by running a few shell commands after your patch, but that's all we had until your zip. I've known about this zip and many of your others for a while and are regular lineups for any device that's compatible.
[Android Software/Hacking General [Developers Only]] osm0sis:
Well yeah, that's what addon.d-v2 is for. :)

Check out my AnyKernel2 thread, since that's all it is. There's no MTK support in the experimental init.d injector zip though, so that is kinda weird. Please try out the boot.img files for both of the devices you're talking about with my Android Image Kitchen, and if it doesn't repack a working image post the boot.img files in that thread so I can take a look.
[Android Software/Hacking General [Developers Only]] DragonFire1024:
I can confirm through many times over, using countless tools as well as yours (aside from any kernel) and failed flashes that it doesn't work on the Amazon Fire 10. I can 'dd' boot or system images and they will flash back, if nothing is touched anywhere. I haven't yet been able to repack either images and flash them back, without failure. So far as I saw, aside from the ancient 8.9, your zip is the only one to pass a flash whether rooted or unlocked.
[Android Software/Hacking General [Developers Only]] osm0sis:
Do what I asked you to do please, so that I can examine them.

If they're truly this bizarre then my zip would not support them in the least and the more likely event is it failed to unpack and for some reason it didn't report it or you didn't notice, and so nothing was changed.
[Android Software/Hacking General [Developers Only]] DragonFire1024:
I am at work so I can't upload them. Doing dd on the img was odd. There's no ramdisk in it. To make the exploit work, it's removed. Then if you make a small edit to it, flash it, the necessary second patch is performed in TWRP right after. So the zip probably malforms the image, but regardless of that, the patcher always runs after the boot image is touched. Since dd does not yield a true image, that's a dead end. And of course editing the stock image always ends in failure.
[Android Software/Hacking General [Developers Only]] jallenhayslett:
[MENTION=4544860]osm0sis[/MENTION]

Last two Magisk BusyBox module updates seem to have broken my ability to force run fstrim from the terminal. I tried installing the module via recovery as well, no dice. Terminal returning "fstrim: not found" message. Was fstrim removed from the BusyBox package?

Pixel2, Stock 8.1, Magisk 18.1:7.0
[Android Software/Hacking General [Developers Only]] jcmm11:
Interesting. Looks like something happened with the extract portion of the script.

"busybox fstrim" will still work.

running the following:

cd /system/bin/

ls -l | grep busybox

Gives the following results (this is all of it)

lrwxrwxrwx 1 root root 7 2019-03-03 18:53 [ -> busybox

lrwxrwxrwx 1 root root 7 2019-03-03 18:53 [[ -> busybox

-rwxr-xr-x 2 root root 1474120 2019-03-01 01:14 busybox

lrwxrwxrwx 1 root root 7 2019-03-03 18:53 nologin -> busybox
[Android Software/Hacking General [Developers Only]] osm0sis:
https://github.com/Magisk-Modules-Repo/busybox-ndk/commits/master

Weird. That logic didn't change at all from a normal Magisk install. No issue here on my OP6T with xbin. How about an install log? Try uninstalling and then installing again?
[Android Software/Hacking General [Developers Only]] jcmm11:
Very very weird.

I just went and modified module.prop so it thought it had an older version again and let it update. Looks like it worked correctly this time (although I haven't rebooted yet). The module directory is correctly filled in now though. Going to reboot now. If it somehow loses most of the entries I'll let you know - but I'm definitely not anticipating that.

The one thing I'm not sure of is whether I updated via Magisk or TWRP last time around. Maybe I'll try TWRP tomorrow just to check.
[Android Software/Hacking General [Developers Only]] osm0sis:
I'm being told there is still a "magisk_merge" basically, despite Magisk being imageless now, so maybe that's why it acted weird for you. Working on another commit to fix it with /data/adb/module_update shortly.
[Android Software/Hacking General [Developers Only]] jcmm11:
Not sure how it processed. The module folder was updated directly, there was no merge.img after the update.

Guessing now: merge.img is now a symlink which causes the update to effect the actual folders in /data/adb/

It's possible (not sure) that I initially updated via an earlier version of Magisk that had a glitch. I never checked until I saw the fstrim post.

(I wish he'd post a new template ? )

Edit: there is a modules_update folder rather than a merge.img
[Android Software/Hacking General [Developers Only]] guest4711:
But not all modules use it when updating. Yesterday I've seen a module's update copied the new file into the corresponding module folder and created a file called ".update" (which will be deleted on next reboot)
[Android Software/Hacking General [Developers Only]] jcmm11:
Yeah I just saw one that used the update folder, also added the .update file to the module folder, and had the new module.prop in both folders (since the file being replaced was actually the same in the update as currently can't be sure what happened there)
[Android Software/Hacking General [Developers Only]] osm0sis:
There's still backwards compatibility using actual images (though that may be buggy on some devices). What I was saying is I didn't realize in imageless Magisk there's also an analogous directory to use for merging updates, which is modules_update. I was updating the modules directory directly so that might explain the weird behavior you were seeing.

Edit: Update pushed which uses the correct update directory. :good:
[Android Software/Hacking General [Developers Only]] jallenhayslett:
I'm not particularly knowledgeable about what you guys were discussing, but that last update fixed the problem with an uninstall then reinstall from recovery.
[Android Software/Hacking General [Developers Only]] ooonea:
Busybox for Android NDK updated to 1.30.1 (13014)

Hi, I have a Samsung S9 (starlte) with LineageOS 15.1. Use Magisk Canary Channel v18.2 (0204d053) (18114) with Magisk Manager (c345633d) (194). I tried to download and install the latest version of your BusyBox module, but the installation failed? I attach the log file.
[Android Software/Hacking General [Developers Only]] baldybill:
Went to update BusyBox and got a error that it failed to install. I already have it workeing ok, The update failed.

Lg v20 oreo rom
[Android Software/Hacking General [Developers Only]] osm0sis:
Try again. You guys must have tried to install in all of the 30 minutes it was broken. There has been another update with it working for over an hour now.

Turns out mksh can handle that=$((blah || blarg) 2>/dev/null); like a normal, sensible shell, but ash can't and instead interprets it like it should be $(()), so the fix was literally adding a space. :rolleyes:

https://github.com/Magisk-Modules-Repo/busybox-ndk/commit/56d8c795985a35a271827f9bd6b9edf1e1bebe02
[Android Software/Hacking General [Developers Only]] ooonea:
Solved for me ;)
[Android Software/Hacking General [Developers Only]] hendrik bower:
after the last busybox update, all the modules installed in Magisk are all gone. And I can't install the Repo module
[Android Software/Hacking General [Developers Only]] osm0sis:
That's definitely got nothing to do with my busybox.
[Android Software/Hacking General [Developers Only]] guest4711:
No problems here using latest busybox on latest canary and on latest unofficial. Which Magisk version are you on? Any logs?
[Android Software/Hacking General [Developers Only]] KaMyKaSii:
[MENTION=4544860]osm0sis[/MENTION] is this expected?
[Android Software/Hacking General [Developers Only]] osm0sis:
Yes, if you tap and read the readme it explains that gets populated at install-time.
[Android Software/Hacking General [Developers Only]] hendrik bower:
previously I used magisk 18.1 stable update and I have a problem like I mentioned above. but after using magisk 18.2 canary channel all problems were solved ?
[Android Software/Hacking General [Developers Only]] osm0sis:
I tested on Magisk v17.4, v18.1 Stable and the latest Canary and there was no issue at all with busybox installation on any of them.

Also, general note: Everything still seems good with SuperSU on my older devices too, so I think things have stabilized and I'll be good to write up the release post probably sometime tomorrow. :good:
[Android Software/Hacking General [Developers Only]] marcdw:
Nice. SuperSU is pretty much all I use on my ROMs so that's good to hear. [emoji106]

LG G3 D851, Clean ROM v3.2, NanoDroid (microG), MultiROM, XDA Legacy