yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] osm0sis:
No clue. You could try dd if= of= from one slot to the other for the partitions you want/need, but not sure anyone's tried that before, so you're on your own with it.
[Android Software/Hacking General [Developers Only]] JumboMan:
busybox find doesn't support -empty tag.

I am trying to delete emty Directories

busybox find /path/to/directoty -type d -empty -delete

[MENTION=4544860]osm0sis[/MENTION]
[Android Software/Hacking General [Developers Only]] BillGoss:
Thanks to your question I had a look at ADBsync because I've been using rsync. So tried osm0sis' tool and I love it! It's a lot faster than rsync because it uses the USB cable instead of wifi. And it also means that I don't need to have Linux installed on my PC.

Nice work [MENTION=4544860]osm0sis[/MENTION]! (I've also thanked Renate for her app).
[Android Software/Hacking General [Developers Only]] osm0sis:
I just compile what's there and fix some overarching issues, I'm not about to get into nitty-gritty deficits in their tool implementations. Submit it to https://bugs.busybox.net/ or on the mailing list and perhaps someone will look into it for you. :good:
[Android Software/Hacking General [Developers Only]] DiamondJohn:
I test busybox code/functions by running StEricsons BusyBox installer to see if its something inherent in BusyBox or something that is specific to the [MENTION=4544860]osm0sis[/MENTION] build. So far, everything I have had an issue with, fails on both builds; i.e. its the BusyBox source that has the issue.

Good to now know exactly where I can post these issues (https://bugs.busybox.net/) :good:
[Android Software/Hacking General [Developers Only]] loopypalm:
Hi

is there a way to install Busybox as system files and not as magisk module ???
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah, RTFM. https://xdaforums.com/showpost.php?p=64228091&postcount=420 :laugh:
[Android Software/Hacking General [Developers Only]] loopypalm:
i'm not very advanced in android

i just want a zip to install with twrp , that's all

thx :o
[Android Software/Hacking General [Developers Only]] DiamondJohn:
The fact that you ask the question on a thread by a developer that has explicitly built and supports the install via Magisk, it may be the wrong place to ask.

However, there are numerous busybox installers on the playstore that will place the binaries on your system partition.
[Android Software/Hacking General [Developers Only]] guest4711:
You may use an installer like BusyBox (Install a compact but feature-complete version of basic Linux command line utils) - https://f-droid.org/packages/ru.meefik.busybox
[Android Software/Hacking General [Developers Only]] Didgeridoohan:
Did you even read the linked post? It

is

a zip... The same zip even.
[Android Software/Hacking General [Developers Only]] osm0sis:
And I don't think it requires "advanced skills" to rename a file before flashing it in TWRP... :rolleyes::p

Also, everyone else who suggested using another busybox clearly didn't read the link either, so probably shouldn't have commented. Thanks for trying to help, but ?
[Android Software/Hacking General [Developers Only]] TotallyAnxious:
Fix plz.
[Android Software/Hacking General [Developers Only]] BillGoss:
Learn plz. ?
[Android Software/Hacking General [Developers Only]] TotallyAnxious:
You missed the joke lol
[Android Software/Hacking General [Developers Only]] Diiegg:
Hi, I have a trouble I install the A/B twrd retention in a one plus 7pro and now I wanna update the OS, Everytime I update it install but after a reboot it get a loop and I need to enter in the twrd and set slop A and I can boot normal but not update...
[Android Software/Hacking General [Developers Only]] osm0sis:
Retention script only touches boot partition, and a stock OTA overwrites that, so whatever the problem is doesn't have to do with the Retention script. Just flash the OTA to both slots via the latest official TWRP, flashing the official TWRP installer zip again in between and at the end, then reboot to recovery again to flash Magisk and call it a day. :good:
[Android Software/Hacking General [Developers Only]] HippoMan:
(This is regarding my earlier question about whether it's possible to duplicate Slot B to Slot A on my device, so I can boot up on Slot A and get exactly what is currently running in Slot B).

Does anyone know which partitions I should try this with? In the following post (where I asked a similar question in a different thread), there's a large quantity of potential partitions listed:

https://xdaforums.com/showpost.php?p=83339451&postcount=329

Thank you very much.

.​
[Android Software/Hacking General [Developers Only]] osm0sis:
You should probably mirror any partition with _a/_b so they don't get out of sync.
[Android Software/Hacking General [Developers Only]] HippoMan:
Thank you very much.

That's 32 different partitions, but yes, it makes sense that they should all be kept in sync.

I'll back up /system, /data, /vendor, and /boot, and then I'll do the following (assuming that the list of partition names without _a or _b is in a file called /sdcard/partitions.txt) ...

$ su -
# while read p
> do
> echo "#### partition: ${p}"
> dd if=/dev/block/by-name/${p}_b of=/dev/block/by-name/${p}_a || {
> echo "!!!! failed"
> break
> }
> echo "!!!! succeeded"
> done </sdcard/partitions.txt

I'll do it over the weekend, so I have enough time to unbrick my device, in case it gets hosed.

And I'll report my results.

PS: The path name /dev/block/by-name is device-specific and possibly OS-specific. Don't try this on your own device without first reading this thread:

https://xdaforums.com/showthread.php?t=2450045

.​
[Android Software/Hacking General [Developers Only]] loopypalm:
i read the post but did not believe :eek:

it's the 1t time i see something like this (just rename zip to mod it's install process) :good:

installation ended with error :

E:Error creating fstab

but system booted fine and busybox is installed so no big deal i think

i try the same thing (rename) on riru core and EdXposed-SandHook but fail,any idea how to install them in system ?

(i already tried overwrite system files with the ones installed in magisk folder but system don't boot)
[Android Software/Hacking General [Developers Only]] osm0sis:
Those are Magisk modules by others, so are likely only Magisk modules, whereas mine support all legacy roots, Magisk versions and system installs. :D

I don't think I was the first to come up with the rename idea, but there aren't a lot out there doing it. One notable example is [MENTION=4141005]Lanchon[/MENTION]'s RePIT zip, which is a pretty amazing project and relies on renaming to set all kinds of parameters.

Can you give me a recovery.log from the install failure? I'd like to fix it if I can. Glad it worked otherwise! :good:
[Android Software/Hacking General [Developers Only]] loopypalm:
where can i find the log ???

(i googled and find out it's in cache ,but i delete it after instaling riru ...) sorry

i did a scr :

if you still need it i can restore my backup and re produce the error again ^......^ !
[Android Software/Hacking General [Developers Only]] osm0sis:
Ah, that's not a zip flashing error (see how it says successful above?), it's just some error with your recovery, likely unrelated. All good, nothing to fix for me. :good:
[Android Software/Hacking General [Developers Only]] mrrocketdog:
[MENTION=7575685]loopypalm[/MENTION] , not to be butting in but i think osm0sis is looking for the twrp.log after the error.

after error , while still in twrp , go to >advance > copy log. and that will put the log on your sdcard.

apologies if you already knew this. just trying to help. :)
[Android Software/Hacking General [Developers Only]] jcmm11:
You can install Magisk module "Cross Compiled Binaries" by zackptg5

Then install its version of find. It's the gnu version and does support -empty. You should delete the BusyBox version of find so there's no conflict.
[Android Software/Hacking General [Developers Only]] loopypalm:
it's the 1st time i see it (i flashed over 150rom and multiple zip without any error)

but since the device booted it's not big deal , Thx again ^........^ !

i see, so it's not the same as /cache/recovery/last_log ?
[Android Software/Hacking General [Developers Only]] HippoMan:
It worked!!

I ran adb shell, got into root, and ran that script to copy every *_b partition to its *_a partition counterpart. The entire copy procedure took around 10 minutes at the most, with the large /system and /vendor partitions taking the longest.

I then booted into TWRP, set my boot slot to A, and rebooted back to TWRP to make sure that this procedure didn't negatively affect recovery ... and I was able to run fine in TWRP with the slot set to A.

Then, I rebooted to System, still from the A Slot, and the system came up perfectly. I can now boot back and forth between A and B, and I see no difference in my device's behavior.

For any of you who are wondering what this is all about, on my A/B device, I had a problem with my A Slot because of some failed flashes in the past, and it kept getting stuck in a boot loop when booting from Slot A. Since my B Slot works with no problem, I wanted a way to duplicate all the data associated with my B Slot into my A Slot. After reading the thread that I mention above, I realized that it's feasible to use the dd utility to copy to and from Android partitions. So based on my discussion here and the good advice from [MENTION=4544860]osm0sis[/MENTION], I made a list of the names of all of the partitions that have _a and _b counterparts, removed the _a and _b suffixes, ran this list through sort -u so that I have one entry for each partition basename, and then I ran the above script under root on my device using the contents of that partition list as input.

I don't know whether this procedure will work as well on all A/B devices, but at least I have had success on my OnePlus 7Pro (GM1917).

Be sure to read all my posts here on this subject before trying this yourself, and take a full backup of /boot, /system, /vendor, and /data before doing anything like this. Also, be sure to read the other thread that I reference above.

UPDATE: it's probably good to back up /modem, as well, since this procedure also duplicates the Modem partition.

.​
[Android Software/Hacking General [Developers Only]] Diiegg:
This will not delete my data ?
[Android Software/Hacking General [Developers Only]] osm0sis:
Only. Touches. Boot. Partition. :rolleyes:
[Android Software/Hacking General [Developers Only]] Iustin_Theft-07:
Magisk busybox module will not install

Offbrand phone, stock-like Android 5.1, custom recovery unavailable

Magisk Stable 20.4

Magisk Manager Stable 7.5.1

It shows as it installs successfully but after a reboot it has no effect. Help :(

Do I have a broken filesystem or what ?
[Android Software/Hacking General [Developers Only]] osm0sis:
You still have a leftover magisk.img somewhere on your device you need to get rid of, or just update to the latest Canary and it'll handle it. Then try again and it'll install fine. :good:
[Android Software/Hacking General [Developers Only]] Spaceminer:
adb + fastboot Installer

I can flash firmware to any partition except the "product" partition. And ADB doesn't work when booted on the stock OS, but it does work with TWRP booted up. Any ideas how to fix this? The device I'm flashing to (Moto G8) uses fastbootd.
[Android Software/Hacking General [Developers Only]] osm0sis:
No idea, these are aging binaries at this point so I'm surprised they work with fastbootd at all. Not sure if [MENTION=4939386]Surge1223[/MENTION] who compiled them would have any insight, but perhaps?

Edit: His thread for fastboot is here: https://xdaforums.com/pixel-2-xl/development/fastboot-arm-arm64-t3722120
[Android Software/Hacking General [Developers Only]] Spaceminer:
Awesome! I was able to check his android file host for newer versions and "aging" is definitely the word for that. It hasn't been updated in awhile now. I'll try compiling Google's latest fastboot binaries for arm & arm64 and see where that takes me.
[Android Software/Hacking General [Developers Only]] osm0sis:
Good luck! It's enough of a rabbit hole that I've never wanted to go down it. :fingers-crossed:
[Android Software/Hacking General [Developers Only]] Surge1223:
Haven't tested these out fully but here's the latest for arm64 built from 11.0.0_r3

https://androidfilehost.com/?fid=8889791610682945419

Didn't even want to mess around with trying for arm though lol, also I didn't test then thoroughly

Edit: updated the link with new arm and arm64 versions of both fastboot and adb.

They may or may not work depending on your Android version and device specifics.

Edit2: I've again re-uploaded a fixed version that fixed the issue about logwrite and tmpdir location. ACK server issues should be gone now .
[Android Software/Hacking General [Developers Only]] Captain_Throwback:
Hi Surge,

Thanks for building these! I just tried them on my device, and for both binaries I'm seeing a missing symbol error:

:/sdcard # adb devices
CANNOT LINK EXECUTABLE "adb": cannot locate symbol "_Unwind_RaiseException" referenced by "/system/bin/adb"...
1|:/sdcard # fastboot devices
CANNOT LINK EXECUTABLE "fastboot": cannot locate symbol "_Unwind_RaiseException" referenced by "/system/bin/fastboot"...
1|:/sdcard #

Any chance you could look into it? I've been hoping for an update to these binaries, so this is very much appreciated.

--Cap

P.S. I just realized you built these from Android 11 but I'm running Android 10, which could be part of the problem. Could the binaries be built from Android 10 instead, for broader compatibility?
[Android Software/Hacking General [Developers Only]] Surge1223:
Yeah that's probs why there's the missing symbol, but I think I can just add libunwind as a dependency and it should work then lol
[Android Software/Hacking General [Developers Only]] Surge1223:
BTW, I updated the link from a few posts above with a new zip that has arm64 and arm versions of fastboot and adb. I compiled them in 11.0.0_r3 though, so the compatibility issues with older devices might still exist.

I did try getting rid of the missing symbol error, but since I never got it on my end ever it'd be hard for me to say whether the changes and inclusions of some libs got rid of the error or not.

In any case, i can say for sure I'm never compiling fastboot for arm again lol that was a crap fest.
[Android Software/Hacking General [Developers Only]] Captain_Throwback:
Nice job! Fastboot seems to be working now.

Adb, however, is throwing an error because it can't create a log file in its preferred location:

:/ # adb devices
* daemon not running; starting now at tcp:5037
adb F 09-24 11:37:12 22996 22996 main.cpp:51] cannot open /tmp/adb.0.log: No such file or directory
ADB server didn't ACK
Full server startup log: /tmp/adb.0.log
Server had pid: 22996 * failed to start daemon
adb: failed to check server version: cannot connect to daemon
1|:/ #

Any idea how to fix that?

EDIT: [MENTION=4939386]Surge1223[/MENTION] Please disregard the above - user error. It's working fine! I overwrote [MENTION=4544860]osm0sis[/MENTION]' wrapper script instead of the actual adb binary - oops!

EDIT 2: And now adb sideload works! Excellent! Fantastic update.
[Android Software/Hacking General [Developers Only]] osm0sis:
Sweet! Thanks all, I'll test on my older devices a bit and see about pushing the updated ones to the Magisk module repo. :highfive:
[Android Software/Hacking General [Developers Only]] Surge1223:
So btw the way to work around that issue of where the log writes and the failure it causes is to declare and define ADB_HOME and HOME in your environment.

In any case, I went ahead and fixed it in source, updated build is below

https://androidfilehost.com/?fid=8889791610682945419

Now a log gets generated on /sdcard

The auth mechanism has changed quite a bit as well as the source structure in general. Im hoping there are no more hiccups, especially not with usb connection or the crypto/verification stuff.

Anyways just thought I'd give an update.

I'll post a patch of the changes I made to source soon, might be helpful for others.
[Android Software/Hacking General [Developers Only]] UserEmu89:
I want to install Nexus Media magisk module. When I install it it removed previous ringtones and sounds. How can i prevent this? There is no explanation of keywords "bullhead", "angle", etc. on the module page (not even in the post that the module links redirect to). Please explain...
[Android Software/Hacking General [Developers Only]] osm0sis:
Read again. How to choose media with keywords is explained in the description on the module page, and again with the noreplace special options further explained in the linked release post.
[Android Software/Hacking General [Developers Only]] UserEmu89:
Re-read many times. Not understanding what is "hammerhead", "bullhead", "Deb/Flo". These keywords are not explained. What's the difference?

I just tried 'noreplace' keyword. It didn't do anything. Magisk says it didn't detected any user input and used the default case. I renamed the file from "x.zip" to "x-noreplace.zip". Is anything wrong here?
[Android Software/Hacking General [Developers Only]] The Fer-Shiz-Nizzle:
Those are codenames of Nexus devices
[Android Software/Hacking General [Developers Only]] UserEmu89:
Oh. I didn't know that.

Anyways, why isn't the no replace keyword working. Read my edited post above!
[Android Software/Hacking General [Developers Only]] osm0sis:
If you'd read the release post you'd see that for Magisk you must put the keywords in a file named /data/.nexusmedia and, yeah, you're using Nexus Media but not aware of what the Nexus devices were called? Google is your friend.
[Android Software/Hacking General [Developers Only]] UserEmu89:
That worked.

One of my alarm ringtones (platinum) is replaced. How can I get it back? I used the "angler" and "noreplace" keywords in that /data/.nexusmedia file.

I'm using Moto G4+ and I like their default ringtones. I only wanted to change the boot animation. I don't like the nexus platinum ringtone.
[Android Software/Hacking General [Developers Only]] osm0sis:
Then don't use my module, it's for all Nexus media, especially the ringtones, and is very clear about that in the opening sentence of the description.

In fact, due to how Magisk works nowadays the bootanimation is the only thing I can't guarantee will work with it on all devices.
[Android Software/Hacking General [Developers Only]] NullCode:
Uhh I know what I want to talk about isn't related to osm0sis 1 single bit, but I can't anywhere else to ask this question.

I really want to start building recoveries. And I've succeeded (sort of). I've only managed to make device tree and compile PBRP for 2 phones and thats it. I can't for the life of me compile SHRP for the Tab S3. The device tree for the tab is a pain in the butt and it doesn't boot. Any help appreciated. Or if there is another thread where anyone can help me, feel free to redirect me.
[Android Software/Hacking General [Developers Only]] edzamber:
Hi all

Any idea about this ? Sh script on S20 don't run. On S9 working

Logcat :

about to run program [/tmp/scripts/busybox] with 4 args
about to run program [/tmp/scripts/busybox] with 4 args
detected filesystem ext4 for /dev/block/dm-1
detected filesystem ext4 for /dev/block/dm-1
detected filesystem ext4 for /dev/block/dm-0
detected filesystem ext4 for /dev/block/dm-0
Extracted file "/tmp/clean.sh"
Extracted 1 file(s)
about to run program [/tmp/scripts/busybox] with 3 args
/tmp/clean.sh: line 6: rm: Too many symbolic links encountered
/tmp/clean.sh: line 7: rm: Too many symbolic links encountered
run_program: child exited with status 127

Script :

#!/sbin/sh

# Clean Folders Yoblue

/tmp/scripts/busybox rm -rf /system_root/system/app/YoBlue.*
/tmp/scripts/busybox rm -rf /system_root/system/app/YoBlueTheme.*

Updater script :

package_extract_dir("minstall/bin", "/tmp");
set_metadata_recursive("/tmp/scripts", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0777);
ui_print(" ");
run_program("/tmp/scripts/busybox","blockdev","--setrw",map_partition("vendor"));
run_program("/tmp/scripts/busybox","blockdev","--setrw",map_partition("system"));
mount("ext4", "EMMC", map_partition("vendor"), "/vendor");
mount("ext4", "EMMC", map_partition("system"), "/system");

package_extract_dir("Edzamber", "/tmp");
run_program("/tmp/scripts/busybox","sh","/tmp/clean.sh");

Envoyé de mon SM-G960F en utilisant Tapatalk
[Android Software/Hacking General [Developers Only]] BillGoss:
[MENTION=4544860]osm0sis[/MENTION], I've been using your adbsync sdcard tool for a while now and I'd like to make one suggestion. Change (x2):

bin\adb push bin\.noadbsync %%i

to

bin\adb push bin\.noadbsync %%i/.noadbsync

The reason being that if the target path doesn't exists, then using the original code the file that gets created is a file with the name of the last directory in %%i and not .noadbsync. Mychange properly creates all the directories.

I came across this bug because I've been formatting my sdcard whilst testing new Android 11 roms for my phone that don't support encryption. After restoring the sdcard from my PC, the excluded directories don't exist on the clean sdcard. So the next adbsync run creates the files instead of directories for the excluded folders.
[Android Software/Hacking General [Developers Only]] osm0sis:
Well, kinda hard to say, but sounds like with /system mounted the commands are maybe cross-symlinked in $PATH and failing. You could make your clean.sh script use busybox's commands instead perhaps.

Interesting, last I checked adb push didn't create parent directories like that. :confused:
[Android Software/Hacking General [Developers Only]] BillGoss:
If the parent directories don't exist then ADB creates them. But if you don't specify the full list of directories and target file name, then ADB can't possibly tell whether the last name is a file or directory and so it creates the last name as a file. This is correct behaviour. So you need to specify the full path and file when/if the path doesn't exist.
[Android Software/Hacking General [Developers Only]] windowz414:
Ah, now I got it. Thanks for the info!

Sorry for the late reply btw. I don't usually check XDA so I mostly miss stuff here.
[Android Software/Hacking General [Developers Only]] BrahmaGandhi:
hi, is it right the latest busybox module v1.31.1 june, 14 2020 ? can i install it in android 11 custom rom (oneplus 3T) ?
[Android Software/Hacking General [Developers Only]] godofsalt:
Yep! Can pull down the Magisk version and flash itcin your recovery
[Android Software/Hacking General [Developers Only]] Legion495:
Hi! First of very detailed and I hope to find what I search.

I looked at https://xdaforums.com/showpost.php?p=52652048&postcount=603

Now I think it might be somewhat related.

Currently I run the GSI from https://xdaforums.com/project-trebl...lopment/gsi-lineageos-17-0-gsi-archs-t4004673

LineageOS17.1 GSI to cut it short. Now I have to update with Fastboot as TWRP will not flash it directly.

The Author "AndyYan" mentioned that addon.d might not be triggered using his system.img via fastboot.

Is there anything I can do to change this? Do you know a method or should it work anyway?

Because programs add scripts into addon.d normally as far as I have seen.

Magisk, Gapps and lineage sh show up in the folder.

I mean preferably I would like to be able to flash with TWRP in the first place but it says "E: Flashing images to File Systems" or something of that nature.

I am used to flashing device specific zips. This is new for me and it is hard to find any information about it without being really deep into that.

Flashing with Fastboot works but does flashing with Fastboot over a existing system work out or will I encounter dataloss on this method?

Meaning update the GSI img I already have running by flashing a newer version over it with fastboot.

I essentially want to only update with a .img that I am given for the system only. And before I try it I would like to ask on that matter.