yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] windowz414:
[NEXUS MEDIA]

I can't install any of Google Nexus medias other than bullhead. The module thinks it's not renamed but I actually did it. Can you help me out?
[Android Software/Hacking General [Developers Only]] osm0sis:
If you read the instructions Magisk always renames to its own thing when copying to a temp directory during flash so you need to use a /data/.nexusmedia file contents to specify options instead.
[Android Software/Hacking General [Developers Only]] jcmm11:
Flashing via FKM or EX Kernel Manager also works, since they don't rename the module.
[Android Software/Hacking General [Developers Only]] Nikhil:
Hi [MENTION=4544860]osm0sis[/MENTION], could you please help with following.

I am trying to remove aosp apps with my nikgapps restoration upon dirty flashing (addon.d execution) of lineageos build. while doing so, I came across Contacts app that is located in /product/priv-app/Contacts.

All the apps that are located in /system/app or /system/priv-app are getting removed but the ones located in /product/app or /product/priv-app doesn't get removed.

I tried removing the Contacts app from below locations on post-restore event of backuptools.sh execution with $S being the system partition.

rm -rf "$S/priv-app/Contacts"
rm -rf "$S/product/priv-app/Contacts"
rm -rf "/product/priv-app/Contacts"

That did not work (was hoping 3rd line would work). I figured, since it's failing only for the folders located in /product partition, it must be a mounting issue.

so I tried adding below line before the execution thinking that mounting will allow the script to delete the Contacts folder

mount -o rw -t auto /product 2>/dev/null;

But that didn't work either.

I used recovery terminal to execute rm -rf "/product/priv-app/Contacts" and that worked.

Any ideas what might have gone wrong? am I mounting it incorrectly? or should I be using busybox mounting?

I've uploaded the addon.d script - GoogleContacts.sh (txt here) for reference just in case.
[Android Software/Hacking General [Developers Only]] osm0sis:
Not sure, you'll be best off adding `mount` and things to dump debug output to figure out why it's failing or how to mount /product correctly.
[Android Software/Hacking General [Developers Only]] DiamondJohn:
I do not have product paths on my device and I have a very old device (hence no actual experience of system as root etc :o), however, are these "product" paths actually symlinks to /system/product/*? and thereby you may have better "luck" removing them from there directly.edit: noted its already covered.

I am not sure of the reason you are trying to "remove" these apps, but if its an option, have you also looked into Hiding, freezing or using magisk to remove them?
[Android Software/Hacking General [Developers Only]] Nikhil:
Okay, I'll dump the output to a file to see the logs.

The reason why I'm trying to remove aosp apps is because with installation of my gapps, the users have Google version of the app and aosp version is just duplicate and useless for them. For example, with Google Contacts in place, users don't use aosp Contacts and would prefer removal of it.

I experienced the same issue while installing gapps on top of rom, figured I wasn't removing stuff with /product/priv-app after mounting /product partition with the way I listed in my last post. That was fixed but the same script changes when I put in addon.d script, they didn't work.

I'm not sure how to freeze, hide an app via recovery. Any thoughts?
[Android Software/Hacking General [Developers Only]] osm0sis:
Just a heads up. My sdcard Fix Permissions Script zip shouldn't be used on Android L. Google's made changes to how the permissions work, and I'm looking into it. :good:

Edit: So far from a clean L install the permissions seem to be okay after all, it might have just been a MultiROM issue.
[Android Software/Hacking General [Developers Only]] Mademos:
Greetings +osm0sis and thanks for your work.

Wouls it be possible to create a cwm script for changing the DPI? So far I only found an aroma app to do it, but since I already use aroma when installing a kernel, it becomes anmoying.

Thanks
[Android Software/Hacking General [Developers Only]] osm0sis:
You probably want to select or enter your desired DPI so a simple flashable script zip wouldn't be able to provide that user interaction. AROMA actually makes a lot more sense for that way.

That said, it's pretty easy to change by editing the build.prop. Use sed to surgically change it via the command line (adb shell or through AROMA Filemanager) or my nano zip to allow you to edit the file (through AROMA Filemanager).

If you go the sed route, once you figure out the command (or find someone else's by Googling it ;)) then you can just save that in a file on your sdcard and run it with "sh /sdcard/dpitweak" or whatever. :) :good:
[Android Software/Hacking General [Developers Only]] :
[MENTION=4544860]osm0sis[/MENTION], I'm currently looking in to pv (pipe viewer). It doesn't normally come on a linux distro unless installed and you won't find it on android or with busybox. I'm working on modifying the source so that I can compile it to run on my device. So far all has compiled without errors or warnings except for 'table.c' which is created by a shell a script the author uses. It's pretty messy too which he mentions to be true himself. So, until I can resolve this dilemma it will take me some time to determine if using pv to pull a more accurate progress time will be possible with this feature or not. I have my hopes on this idea lol. If successful then it won't matter if it's cwm or twrp, because the results will be calculated the same as it is being piped in. Have had to modified some .h files as well. The source isn't really put together so well unless building on certain distros.
[Android Software/Hacking General [Developers Only]] osm0sis:
The new TWRP Holofied, with my Flashify Script zip included, saw release today!

I can't recommend this theme highly enough! [MENTION=2719389]z31s1g[/MENTION] has done some brilliant work! If you use any of the FOURTEEN DEVICES he supports go get it right now along with his repacked recovery with matching curtain!

It's not only a theme, it expands the featureset of TWRP so much that it's the reason I finally switched away from CWM. From setting the start directory to using AROMA Filemanager as an add-on, and now building an interface for flashing .img files directly from recovery using my zip, this is amazing work. :D

He's working on a "Materialised" version to match L soon too so it's a great time to get subscribed to his thread. ;)
[Android Software/Hacking General [Developers Only]] demlv:
So am I understanding this correctly? I import his theme to the standard TWRP and it not only changes the appearance but it also adds your "cwm-flashify.zip" functionality? Or do I need to get one of his "repack" TWRP images?

I'm on Philz at the moment. I really wish that TWRP would make available an option (like CWM and Philz do) for dedupe-style nandroids. :good:
[Android Software/Hacking General [Developers Only]] osm0sis:
You are understanding this correctly! :cool:

It looks nicer with the matching curtain in the repacked recovery.img z31s1g provides, but it's not required in the least. You can also flash the AROMA Filemanager Add-on he provides to add that functionality like PhilZ has. :good:

Dedupe's a cool function, but I don't have any practical use for it since I only ever keep my most recent backup on my device.
[Android Software/Hacking General [Developers Only]] skulldreamz:
Wow osm0sis' I can't thank you enough how happy I am with twrp with the following: 1. 7 different awesome looks to choose from 2. Implementation of screenshot which I think is so underrated this day in age of android and debugging recovery issues... 3. We now have the best file manager on the planet imbedded into twrp. Last but not least the ability to be able to flash .imgs like fastboot but in recovery through your awesome flashify script. Now I had a question about the flash .img part. At the top right I see a zip logo and when I touch it, it changes to a img logo. Is that how it's supposed to be and when it's a img logo I can just flash a img or do I need to do something first kinda like how we had to flash the holofied aroma zip 1 time to get that feature working? Thank you so much and again the best thread on xda in my humble opinion. Thanks to all involved, sorry don't have the names off the top of my head.
[Android Software/Hacking General [Developers Only]] z31s1g:
You got it right, the button toggles between zip and image mode for installing. Just try it, the rest is self explanatory...
[Android Software/Hacking General [Developers Only]] skulldreamz:
Hwy buddy, you would be the one to ask... Lol how would I add a matching curtain to my m8 so it matches your black theme. Thanks for responding so quick too :)
[Android Software/Hacking General [Developers Only]] z31s1g:
Here's the link to 3rd post of the M8 specific thread. Just download the repacked recovery - and flash it via recovery... [emoji2]

http://xdaforums.com/showthread.php?p=52103383

Don't mind the screenshots, they're outdated...
[Android Software/Hacking General [Developers Only]] Polarfuchs:
Hello,

would you like to make a Oneplus One bootunlocker script similar to your Nexus script? Or add it to the script?

I have to hex address of the bits and the partition noted down there

http://xdaforums.com/showpost.php?p=54060141&postcount=395
[Android Software/Hacking General [Developers Only]] osm0sis:
Nice work! My script is only for Nexus devices but feel free to edit the update-binary (shell script) inside to add support for bacon. You'll see I made it extremely easy to do so. :)

All I'd ask is that you call it something else (OnePlus BootUnlocker?) and leave my name somewhere in the script (add yours, of course), plus credit wherever you post it. :good:
[Android Software/Hacking General [Developers Only]] skulldreamz:
Hi I'm using [MENTION=2719389]z31s1g[/MENTION] repacked twrp and all features are working flawlessly. Then I just tried to take a screenshot in recovery and it didn't work. Any help I would really thank you..
[Android Software/Hacking General [Developers Only]] :
Check the ui.xml file and search for "screenshot". Make sure it isn't commented out. If it is not then your TWRP build does not support taking screenshots. The patch for that has yet to be officially supported and will only be seen with unofficial builds and that is assuming the dev used the patch prior to building TWRP. Another way to confirm is when you go to take a screenshot from within the recovery and you see an error. That is a clear indication that your TWRP does not use the patch.
[Android Software/Hacking General [Developers Only]] mdamaged:
Oh...oh...yeah? Well...I just figured out how to set the clock on my DVD player!

Showoff. :mad:
[Android Software/Hacking General [Developers Only]] janres155:
Are the 950iosettings + 875mntsettings + 925vmsettings init.d scripts is recommended for Nexus 5?
[Android Software/Hacking General [Developers Only]] osm0sis:
If you're not running a kernel that already hardcodes them (since that would be redundant), then yeah, they might still help. Give it a shot and let me know! :)

I've heard good things about them even on a SGS5. (y)
[Android Software/Hacking General [Developers Only]] DiamondJohn:
The app I built below is a UI for creating and running scripts, including Hide & Freeze. The thing that would be applicable to you, is that you can also retrieve the script that was run, which I think should also run in recovery.:confused:

TeMeFI
[Android Software/Hacking General [Developers Only]] osm0sis:
Since BasketBuild is long gone at this point I've finally gotten around to embracing AFH and have rehosted my Cygwin-to-Linux CC toolchains, useful arm binaries hoard, the N5/N6/N7'13 Adreno Driver archive, and my Galaxy Nexus Radio archive to my AFH profile here: https://androidfilehost.com/?w=profile&uid=4349826312261817795

I've also gone back to hosting my Nexus Media Installer zip only on a file host since that's much easier for me than making new releases on GitHub for each minor installer script update. :good:

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 consider sponsoring my ongoing work using my GitHub Sponsors profile. For a one-time donation you can hit the donate link from my profile. Thanks for your support!

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

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

UPDATE-mtd-utils.Installer.v2.1.1-signed.zip;

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

UPDATE-ZipSigner.Installer.v3.0-signed.zip:

- try to preserve a working /etc/fstab on AOSP Q-based recovery

- add custom_setup function to better support early actions

UPDATE-Adreno.Systemless.Installer-signed.zip:

- try to preserve a working /etc/fstab on AOSP Q-based recovery

- add custom_setup function to better support early actions

- use custom_setup to find Adreno zip instead of custom_zip_opts to avoid false positive for system install

UPDATE-nano.Terminal.Editor.v4.9.3-signed.zip:

- try to preserve a working /etc/fstab on AOSP Q-based recovery

- add custom_setup function to better support early actions

- update to latest nano official source

AnyKernel3 and my N5X/6P BLOD Workaround AK3 zip also saw updates following the latest AIK release.
[Android Software/Hacking General [Developers Only]] osm0sis:
[MENTION=5377398]TotallyAnxious[/MENTION]

https://twitter.com/osm0sis_xda/status/1283390586641416193

:p:highfive:
[Android Software/Hacking General [Developers Only]] osm0sis:
[MENTION=5377398]TotallyAnxious[/MENTION] https://twitter.com/osm0sis_xda/status/1283390586641416193 :p:high-five:
[Android Software/Hacking General [Developers Only]] TotallyAnxious:
Just don't send me the bill from the cardiologist. :D But TO BE FAIR, I know you have universal healthcare lol.
[Android Software/Hacking General [Developers Only]] TotallyAnxious:
Bet you haven't been asked this before, can we get a another busybox build with the source of the current release? The placebo effect should increase battery life. Because science. Passage of time = less bugs.

Also do all Canadians bring chainsaws to the beach?
[Android Software/Hacking General [Developers Only]] mrrocketdog:
only on boxing day. what i heard anyways. lol[emoji33]
[Android Software/Hacking General [Developers Only]] navigation21:
Can you tell how to verify the Busybox install location? OandbackupX requires the path and using the default results in errors.
[Android Software/Hacking General [Developers Only]] osm0sis:
Still listed as unstable on busybox.net, so we wait for the x.y.1 release, as usual. :)

`which -a busybox`
[Android Software/Hacking General [Developers Only]] TotallyAnxious:
I just needed a reason to make the post be "on topic". :cyclops: You're the official xdanadian!
[Android Software/Hacking General [Developers Only]] osm0sis:
Duplicate. :rolleyes:
[Android Software/Hacking General [Developers Only]] osm0sis:
Here's something amusing I was toying around with the other day on a ROM with SELinux broken:

audit2type() {
grep -oE 'avc: denied(.*)' "$1" | sort -u \
| sed -E 's/.*scontext=(.*) tcontext=(.*) tclass.*/"type \1"\n"type \2"/g' \
| sort -u;
}
audit2allow() {
grep -oE 'avc: denied(.*)' "$1" | sort -u \
| sed -E 's/.*{ (.*) } .* scontext=(.*) tcontext=(.*) tclass=(.*) permissive.*/"allow \2 \3 \4 { \1 }"/g' \
| sort -u;
}

Then, e.g.:

log=/data/local/logcat.txt

logcat -df $log
audit2type $log | busybox xargs magiskpolicy --live
audit2allow $log | busybox xargs magiskpolicy --live

As I quickly learned, if you're having problems with missing types, it's pretty much a moot point, but audit2allow could be handy for some more minor breakage on some ROMs/apps. :p

Oh, and it needs to be busybox xargs, since toybox's doesn't behave like you'd expect with quoted arguments. :silly:
[Android Software/Hacking General [Developers Only]] str8str:
Hi, first off thank you for your work Can you tell me how to keep TWRP installed.? I'm using a one plus 8 pro When flashing a new kernel or boot img it gets wiped does it not? I installed a kernel and I did a oos system update I didn't boot went to magisk tried to install the TWRP retention module but it said couldn't find twrp ramdisk and failed. Do I went ahead and choose to install magisk to inactive slot that went good rebooted and that went fine. But I missed or did something that wiped twrp as the retention script couldn't find it. It says to flash after doing an update but before booting and that's what I did. Or I flashed TWRP to the wrong place? I could boot TWRP with no issues but there are no threads as yet that I'm aware of that gives instructions for flashing and using twrp on this device yet. Tia
[Android Software/Hacking General [Developers Only]] osm0sis:
Every OnePlus device 7T and later has its own recovery_a/recovery_b partitions again, so TWRP isn't in the boot partition, and doesn't get wiped when you flash a new boot.img.

Since OnePlus OTAs overwrite the recovery partition you simply need to reflash TWRP to the opposite recovery slot before rebooting.
[Android Software/Hacking General [Developers Only]] str8str:
Do I need to fastboot flash it every update? Is there a way to do it without a computer?

---------- Post added at 04:36 PM ---------- Previous post was at 04:34 PM ----------

So I need to flash TWRP via fastboot before booting? Is there another way to do it from the phone or does that retention script work to stop the update from over writing it? I'm also getting a red error message when doing anything in twrp it says unable to locate apex files and can't mount system I think.. Do you know what causes that and how to fix it. I'm in the one 8 pro and the only twrp version is the Chinese one so far
[Android Software/Hacking General [Developers Only]] osm0sis:
No. Retention script is only for boot-as-recovery (recovery in the boot partition). You can use any partition flashing app, or use my Fla**** script package with e.g. `fla****.sh --slot _b`; I do have plans to add "inactive" and "both" as an option in my next release. :)

No idea about your apex issue. I also have the 8 Pro and mauronofrio's 3.4.0-2 works great on Android 10, so that's sort of what you get for using Android 11 while it's in Beta and before the TWRP team has had a chance to update decryption.. :silly:

The "Chinese TWRP" is violating GPL by not releasing their source, and honestly, extra ****ing shame on them if they have figured out Android 11 decryption and haven't contributed it back to mainstream TWRP... nobody should be using it until they comply with GPL. :mad:
[Android Software/Hacking General [Developers Only]] str8str:
My mistake I'm using mauronofrio's as well. And I'm not on 11 I'm on 10. Your script still needs to be flashed from a partition flashable app?
[Android Software/Hacking General [Developers Only]] osm0sis:
What? Then TWRP should work fine. My script takes the place of an app, especially if you use it with a File Explorer app that can source scripts correctly, like FX. Same principle as using AIK-mobile without the command prompt: http://imgur.com/a/q9H6T
[Android Software/Hacking General [Developers Only]] DiamondJohn:
The above looked very interesting to me, as I have an app that builds the allows to include in ROM source builds, and have always been meaning to do a similar thing for Magisk allows. So I ran it, and it looks pretty much there. However, just as an FYI, I got the following when I tested it.

...snip...
[COLOR="blue"]ks01lte:/ # logcat -df $log[/COLOR]
[COLOR="blue"]ks01lte:/ # audit2type $log | busybox xargs magiskpolicy --live[/COLOR]
[COLOR="red"]Unknown statement: 'type u:object_r:proc:s0'

Unknown statement: 'type u:object_r:proc_sysrq:s0'

Unknown statement: 'type u:r:untrusted_app:s0:c512,c768'

Unknown statement: 'type u:r:untrusted_app_25:s0:c512,c768'[/COLOR]

[COLOR="blue"]ks01lte:/ # audit2allow $log | busybox xargs magiskpolicy --live[/COLOR]
[COLOR="Red"]source type u:r:untrusted_app:s0:c512,c768 does not exist
Error in: allow u:r:untrusted_app:s0:c512,c768 u:object_r:proc:s0 file read
source type u:r:untrusted_app_25:s0:c512,c768 does not exist
Error in: allow u:r:untrusted_app_25:s0:c512,c768 u:object_r:proc:s0 file getattr
source type u:r:untrusted_app_25:s0:c512,c768 does not exist
Error in: allow u:r:untrusted_app_25:s0:c512,c768 u:object_r:proc_sysrq:s0 file getattr[/COLOR]

[COLOR="Green"]# and for info purposes[/COLOR]
[COLOR="Blue"]ks01lte:/ # audit2allow $log[/COLOR]
"allow u:r:untrusted_app:s0:c512,c768 u:object_r:proc:s0 file { read }"
"allow u:r:untrusted_app_25:s0:c512,c768 u:object_r:proc:s0 file { getattr }"
"allow u:r:untrusted_app_25:s0:c512,c768 u:object_r:proc_sysrq:s0 file { getattr }"

But it certainly has given me a starting point by doing the heavy lifting:good:

I also attached a cut down of the logcat file with the denials only. I am running Havoc Oreo, which is LOS based.
[Android Software/Hacking General [Developers Only]] str8str:
Ya. Does flashify still work? Hasn't been updated in years
[Android Software/Hacking General [Developers Only]] osm0sis:
No clue, haven't tried. I use my Fla**** scripts, like I said. :p
[Android Software/Hacking General [Developers Only]] HippoMan:
Thank you for all these excellent and very useful utilties!

I'm wondering if there is any way to use one or more of these utilities to copy everything associated with one boot slot of an A/B device into the other boot slot.

Right now on my OnePlus 7Pro (GM1917) running OOS 10.3.4, I am booting up in slot B, and slot A gives me a boot loop due to past flashing errors. Are there any utilities I can use to somehow duplicate what I currently have in slot B onto slot A, so that I can boot up from either slot into an identical system?

Another question: the ADBsync sdcard Backup utility seems to be a Windows module. Is there any version of this which runs under linux?

Thank you again!

.​
[Android Software/Hacking General [Developers Only]] str8str:
Sorry for my ignorance but what exactly do I do with the script ie how do I flash it after doing an update to keep twrp
[Android Software/Hacking General [Developers Only]] osm0sis:
I've already explained that to you, including commands; read my previous posts again. I can't spoon-feed this to you any further.
[Android Software/Hacking General [Developers Only]] osm0sis:
Something writing to slot_a and marking it good in bootctl will fix it. Simply flash stock ROM to it in TWRP. You could also just try marking it good in either fastboot or in TWRP command line with bootctl.

ADBSync only exists for Windows, since [MENTION=4474482]Renate NST[/MENTION]'s great adbsync binary only exists for Windows.
[Android Software/Hacking General [Developers Only]] HippoMan:
Thank you very much.

Is there a way that I could somehow pull the ROM out of Slot B and then flash it into Slot A? I checked with bootctl, and it turns out that my Slot A is indeed bootable, but there is just a badly configured ROM in that slot. I'd like to get the exact ROM from Slot B (including my apps, modules, settings, etc.) copied into Slot A, if I can.

Is that even possible?

.​
[Android Software/Hacking General [Developers Only]] osm0sis:
Well, modules and settings are all in /data, so all you need is your ROM and GApps flashed to slot_a.. honestly easiest to flash the ROM stuff, then switch to slot_a, reboot recovery, flash GApps, then switch back. If addon.d is working on the ROM then you'll only need to flash the base ROM stuff. :good:
[Android Software/Hacking General [Developers Only]] HippoMan:
Ah ... that's easier than I thought. Thank you very much!

I have a couple of similar zip files for my ROM, and I don't recall which one happens to be a bad version and which one is currently running in my Slot B. Instead of my taking a chance with each of those ROM's, is there any command I can run which will extract whatever ROM I have in Slot B into some sort of flashable file that I can then load back into Slot A?

If not, I'll ultimately figure out which of those zip files to flash. But if such an extraction utility exists, it would be quite helpful.

.​