yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] osm0sis:
Update many of the things!

(Links in the OP.)

SuperSU v2.78-SR3 altered the /su mount script slightly, so accordingly I've modified my zips that contain my variation on it, since papa Chainfire probably knows best when it comes to all the weird and wild recoveries out there. ;)

My strings patch spurred a bit of discussion on the official busybox mailinglist and they've instead opted to implement proper "-t radix" functionality for the offset formatting (as I'd originally suggested in my patch message, so I guess I still win :p). As such - and I don't intend to make a habit of this - I wanted to include the accepted upstream patch (which will be in 1.26.0), as well as an important cpio ownership fix upstream patch I'm surprised hasn't made it in as an official 1.25.1 patch yet. cpio is so massively important for Android, particularly for ramdisk unpacking/repacking, that I didn't think it could wait. :cowboy:

Lastly, by popular demand, I've uploaded an updated version of my (surprisingly) popular unSU Script zip, which was originally for uninstalling SuperSU 2.56 (since the APK's uninstall mechanism was flawed at that time), but has since seen 58944 downloads(!) because people started using it "off-label" over custom ROMs to unroot and pass SafetyNet checks. Along with expanded functionality, it's of course now also signed, and I've decided to keep it in its original SuperSU thread location since so many users have linked to it there. :cool:

I work on these projects in my limited time off, so if you like the progress I'm making, or enjoy anything else I've done on xda, please do hit the donate link from my profile. Thanks for your support!

UPDATE-unSU-signed.zip:

- improve/update SuperSU uninstallation (a few files were missing from the list)

- detect all different roots and unroot each as necessary

- add uninstallation of Koush's SuperUser

- add uninstallation of SuperSU Systemless *

- add uninstallation of phh's Superuser *

- add uninstallation of ROM su binaries

*(requires user to flash ROM boot.img to complete)

UPDATE-Busybox.Installer.v1.25.1-ALL-signed.zip:

- add strings -t upstream patch

- add cpio ownership fix upstream patch

- updated /su mount script

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

- update to latest nano official source

- updated /su mount script

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

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

UPDATE-CMSetup.Fix.For.GApps.Installer-signed.zip;

UPDATE-SUmount-signed.zip:

- updated /su mount script

GN Bootloader Image Replacement Hack Script (logohack.sh) saw a minor update to support the new strings -t argument, and GN Synapse Injector Addon zip also saw a minor update to bring the latest AK2 commits to it. I've also got a bug report in to the file utility (used in AIK-mobile) tracker since there's a regression with linker errors on Android ARM+MIPS builds. :good:
[Android Software/Hacking General [Developers Only]] fhem:
Busybox?? Do I understand correctly this update replaces your previous v1.25.1 release ?? Thanks for your continued support and hard work.
[Android Software/Hacking General [Developers Only]] osm0sis:
Correct. New builds of busybox 1.25.1 with added patches to fix cpio ownership and add strings -t functionality. That's in the change list and post, but I guess it bears repeating since it is somewhat confusing having the same version number.

[MENTION=5787964]SuperR.[/MENTION] on this one too so he can update it to the new build in his Kitchen.
[Android Software/Hacking General [Developers Only]] robcore:
Ahh so far I've been forced to use busybox on rails with my kernel because it's been the only build I've found with 100% Synapse compatibility. On a whim I tried your new build and it's perfect! Thank you so much, my friend : )
[Android Software/Hacking General [Developers Only]] JohnCorleone:
The second part I didn't know and I greatly appreciate! :svetius:

As for the first part, I found a link that someone re-posted with it already included it's a "UPDATE-SuperSU-v.2.78-forceencrypt.zip" but I absolutely appreciate the confirmation that I stay encrypted after losing that pre boot PIN verification screen!

---------- Post added at 04:06 PM ---------- Previous post was at 04:03 PM ----------

Sorry bout that...was in a rush and posted in the wrong favorited thread! My apologies!
[Android Software/Hacking General [Developers Only]] ScottIsMyName:
A suggestion for removing systemless SuperSU.....

I've seen a few instances (and I'm not sure how they come about) where some leftover files will cause SuperSU to fail when flashing. I think it would be nice to have these files removed if they are found, even though they probably shouldn't be there in the first place. Files that I've seen that cause this problem are:

/data/custom_ramdisk_patch.sh
/data/custom_boot_image_patch.sh

Both of these files are documented in the SuperSU installer:

# During boot image patch, /data/custom_ramdisk_patch.sh will be called,
# with the name of the ramdisk cpio file as parameter. The script must
# replace the input file and return a 0 exit code.
#
# Just before flashing, the boot image patcher will call
# /data/custom_boot_image_patch.sh with the name of the patched boot image
# as parameter. A device-specific patcher can further patch the boot image
# if needed. It must replace the input file and return a 0 exit code.
[Android Software/Hacking General [Developers Only]] veez21:
yeah, papa Chainfire knows best :laugh:
[Android Software/Hacking General [Developers Only]] osm0sis:
That's a fair suggestion - I see where you're coming from - but custom_ramdisk_patch.sh and custom_boot_image_patch.sh weren't placed there by SuperSU, they were placed there by the user. And the boot image patch script is used and called by other things than just SuperSU now, (like AnyKernel2 and the TWRP Materialised theme, to name a couple), so I don't think I should be touching them. The user put them there so the user should remove them.
[Android Software/Hacking General [Developers Only]] rignfool:
Actually... I think that's a Magisk remnant... It has to do with converting SuperSU to a Magisk mod...
[Android Software/Hacking General [Developers Only]] Captain_Throwback:
Indeed.

Which is why [MENTION=4470081]topjohnwu[/MENTION]'s Magisk uninstaller should be removing it (the current version doesn't, though). I'm sure he'll update it once v9 comes out to properly remove all of the files placed by Magisk, including the custom ramdisk patch.
[Android Software/Hacking General [Developers Only]] Alxoom33:
Not so sure, Magisk is a real litter bug! Leaves files and extension all over and dosn't clean up after itself.
[Android Software/Hacking General [Developers Only]] DarkHeart Z:
[MENTION=4544860]osm0sis[/MENTION] Bro you did a big favor to all of us by creating a standalone git repo for a lot of real necessary android binaries . Please make one for adb too . There's only one standalone source for adb ; but it's not been updated for 7 years :( . Can you you make a standalone source for adb too ? And please keep cygwin compile support in it too if you do . Regards
[Android Software/Hacking General [Developers Only]] osm0sis:
[MENTION=4939386]Surge1223[/MENTION] has adb building up to 1.0.31, but I'm not seeing the repo on his GitHub (https://github.com/Surge1223), so maybe he can upload it?

I know after 1.0.31 Google switched to c++ and he got it building but ran into some snags getting the full functionality. I'm not sure if he's made any more progress recently.

Edit: Here's his post with 1.0.31 (including his makefile!): http://xdaforums.com/showthread.php?p=68336334#post68336334
[Android Software/Hacking General [Developers Only]] DarkHeart Z:
You're a lifesaver bro . can you please add makefile's in your current aapt and zipalign sources too ? I am having difficulties making one .
[Android Software/Hacking General [Developers Only]] osm0sis:
Eh? All the .mk files are already there. You need to use the NDK, same goes for Surge's adb. A "regular" Makefile would be too complicated/redundant to rig up to orchestrate things correctly for a complex NDK utility. My repos have a build.sh file to make things extra simple.
[Android Software/Hacking General [Developers Only]] DarkHeart Z:
I know . I already have ndk downloaded . And it's way easier . But I'm using [MENTION]SuperR[/MENTION]'s kitchen in cygwin as I don't have a 64bit pc now . 32 bit windows is really last option I have . But cygwin has this nasty habit like linux for not providing complete functionality under it's shell for binaries which are independent . I compiled mkbootimg and unpackbootimg before and mkbootimg couldn't recognize boot.img-zImage while I poitned out it's location correctly . But when I recompiled that binary from cygwin's built in cross compiler ; it just worked out of the box ; like there never was any issue . It happened with a lot of binaries too . That's why I'm asking for it . And zipalign's zopfli binary's makefile is really complete . I tried test compile and it worked out of the box . I however found out a makefile for adb . But i found out some errors while compiling them and couldn't solve it . Can you help me with that ?

here it is :

# standalone Makefile for adb for windows
SRCS+= adb.c
SRCS+= adb_main.c
SRCS+= sysdeps_win32.c #replaces fdevent.c
SRCS+= adb_client.c
SRCS+= commandline.c
SRCS+= console.c
SRCS+= file_sync_client.c
SRCS+= get_my_path_windows.c #replaces get_my_path_linux.c
SRCS+= services.c
SRCS+= sockets.c
SRCS+= transport.c
SRCS+= transport_local.c
SRCS+= transport_usb.c
SRCS+= usb_windows.c #replaces usb_linux.c
SRCS+= adb_auth_host.c
SRCS+= adb_auth.c
SRCS+= adb_listeners.c

#VPATH+= ../libcutils #not used, because of USE_SYSDEPS_WIN32

SRCS+= ../libzipfile/centraldir.c
SRCS+= ../libzipfile/zipfile.c

CPPFLAGS+= -DADB_HOST=1
CPPFLAGS+= -DHAVE_FORKEXEC=1
#CPPFLAGS+= -DHAVE_SYMLINKS #readlink will fail
#CPPFLAGS+= -DHAVE_TERMIO_H #No concept of tty in Windows
CPPFLAGS+= -DHAVE_SYS_SOCKET_H
CPPFLAGS+= -DHAVE_OFF64_T
CPPFLAGS+= -D_GNU_SOURCE
CPPFLAGS+= -D_XOPEN_SOURCE

#Added for Windows
CPPFLAGS+= -DHAVE_WINSOCK
CPPFLAGS+= -D_WIN32
CPPFLAGS+= -DHAVE_WIN32_IPC
CPPFLAGS+= -DHAVE_WIN32_PROC

CPPFLAGS+= -I.
CPPFLAGS+= -I../include

#Locally compiled
CPPFLAGS+= -Iopenssl/include/
LDFLAGS+= -Lopenssl/
CPPFLAGS+= -Izlib/
LDFLAGS+= -Lzlib/

#Precompiled
LIBS+= AdbWinUsbApi.dll
LIBS+= AdbWinApi.dll

LIBS+= -lcrypto -lpthread -lz #lrt dropped, not used in Windows
LIBS+= -lws2_32 -lgdi32

CC= i686-w64-mingw32-gcc
LD= i686-w64-mingw32-gcc
CXX= i686-w64-mingw32-g++

CXXFLAGS+= $(CPPFLAGS)

OBJS= $(SRCS:.c=.o)

all: adb.exe

adb.exe: $(OBJS)
\t$(CXX) $(CXXFLAGS) -c -o adb_io.o adb_io.cpp
\t$(LD) -o $@ $(LDFLAGS) $(OBJS) adb_io.o $(LIBS)
\ti686-w64-mingw32-strip $@

clean:
\trm -rf *.o adb.exe

I suppose a lot of flags are missing right ?
[Android Software/Hacking General [Developers Only]] osm0sis:
No, I'm afraid I can't. I don't know the intricacies of all the crazy involved in getting adb to cross-compile, but I'm sure there's a lot of it. Surge might be able to help when he responds to my mention above. :good:

As I stated in the AIK thread though, the NDK makes host compiles of certain utilities, and adb is definitely one of those, so Cygwin and standard Makefiles should really be unnecessary.

Now, all that said, the latest adb for Windows is always included in Android-SDK/platform-tools and it works perfectly well in Cygwin, so why are we trying to reinvent the wheel?
[Android Software/Hacking General [Developers Only]] Phrodini:
You still have/do updates for the n6 adreno GPU drivers?
[Android Software/Hacking General [Developers Only]] osm0sis:
I just updated the systemless installer frontend last week. Qualcomm hasn't released any new beta drivers since Nougat dropped. The most recent ones are still on my BasketBuild: https://basketbuild.com/devs/osm0sis/adreno
[Android Software/Hacking General [Developers Only]] Phrodini:
Thanks.. I missed that part of the update
[Android Software/Hacking General [Developers Only]] DarkHeart Z:
because [MENTION=5787964]SuperR.[/MENTION]'s kitchen recently got cygwin support ( not official though ; experimental ) . I am helping him with that . Before the kitchen failed to extract my boot.img . It always showed 'there was error extracting your boot.img' . Then I recompiled mkbootimg.exe and unpackbootimg.exe using mingw64 cross compiler . unpackbootimg successfully extracted the boot.img manually . But mkbootimg always failed to detect the given kernel . Always said ' could not load kernel boot.img-zImage even after I specified that in --kernel option . Then i recompiled it using cygwin's gcc . And worked perfectly . No errors . Even superr's kitchen's errors disappeared too . Now I'm facing same with adb.exe . It's failing to get by-name directories from my device while it shouldn't as ususal . i tested adb.exe manually and it's detecting my device properly . But I think as it's an independent binary ; it's not reponding to all calls from cygwin base system . That is why it's not working properly . same happened with unpackbootimg too . i recompiled using cygwin's gcc and the error disappeared . that's why I am trying to recompile it to make it work with cygwin .
[Android Software/Hacking General [Developers Only]] osm0sis:
No problem, and if you're wondering if there are newer drivers you can just check Qualcomm's site directly: https://developer.qualcomm.com/software/adreno-gpu-sdk/tools
[Android Software/Hacking General [Developers Only]] DarkHeart Z:
I ran into similar problems whil trying to build adb from cygwin . Always missing file error or missing annotation warning and sometimes even worse -Werror flag creates massive issues in compilation of liblog . Life has been hell for me past few days .

[MENTION=4544860]osm0sis[/MENTION] Bro have you ever ran into any problems like missing bouncycastle packages issue while building signapk.jar ? I tried building it from android_platform_build ; but was unable to do so . A lot of missing symbols and missing packages error poped up . How do I get a workaround for this ? Is there an additional bouncycastle.java file or what ? Is there any native libraries required for this ? I'm in real crisis here . I tried compiling through jdk 8 .

javac signapk.java

This was the command I used .
[Android Software/Hacking General [Developers Only]] osm0sis:
signapk isn't something I've ever tried to build, sorry! :(
[Android Software/Hacking General [Developers Only]] DarkHeart Z:
​

Thats ok . I'm at a loss here . Tried compiling signapk for fixing zip signing issue occuring in the superr kitchen . And bro one more thing I was unable to extract nexus 5x factory image of android 6.0.1 . I tried simg2img . compiled directly from source . But it was unable the read the image . Tried imgextractor 1.3.7 . It showed error too . Any way to fix this ? I'm at a loss in both sides . Googling didn't help a bit :(
[Android Software/Hacking General [Developers Only]] osm0sis:
I've always used the old sgs2converter.jar in Windows. Looks like someone reverse engineered it here: https://github.com/eladkarako/Sgs2Converter

Should be a good lead.
[Android Software/Hacking General [Developers Only]] Surge1223:
If my errors were just CFLAGS (-Werror in your case) I'd ecstatic, lol. Liblog requires libcutils and libbase iirc, so probs need those first. Also, I'm pretty sure you don't get similar errors to my errors LOL, my errors usually occur at the final link step, aka the last thing in the compile process before if spits out the executable or lib seems like your errors are mostly compile/flag related. Do yourself a favor and and gtfo windows/cygwin

Just look at the classpath for for signapk.jar, it probs requires aosp Java classes.
[Android Software/Hacking General [Developers Only]] DarkHeart Z:
Worths a try . Will try it for sure . :)

---------- Post added at 04:44 AM ---------- Previous post was at 04:35 AM ----------

I wouldn't do those in cygwin if there was not a big fuss surrounding it . A cygwin compatible rom kitchen requires it to be built with cygwin . Same happened with unpackbootimg too . Now it's fine . So which file contains aosp java classes ? I mean bouncycastle ; And some symbolic files which went missing and a lot of missing symbol error poped up .

Edit : Silly me . Found the bouncycastle package in aosp . [MENTION=4939386]Surge1223[/MENTION] Bro can you tell me the standalone techniques for Only building signapk ?
[Android Software/Hacking General [Developers Only]] smeejaytee:
Hi guys I wonder if someone can help me please, is there a script for s2s please, I've changed Roms to RR and I'm really missing this feature lol
[Android Software/Hacking General [Developers Only]] osm0sis:
Unless your ROM or kernel support it underneath there's nothing any script can do.
[Android Software/Hacking General [Developers Only]] smeejaytee:
Ah OK I was hoping there might be something to inject it into the ramdisk, no worries thanks for replying.
[Android Software/Hacking General [Developers Only]] DirkStorck:
Hi [MENTION=4544860]osm0sis[/MENTION] would it be possible for your to create a zip that installs sqllite3?

Thank you!
[Android Software/Hacking General [Developers Only]] osm0sis:
It's just a binary and doesn't require jumping through any hoops to run. Download it and put it where you want it?
[Android Software/Hacking General [Developers Only]] DirkStorck:
Yeah sure....but I have to set permissions and I have to do it each time I flash the ROM....with a zip I would simply add the zip after the ROM....I know, I am just lazy ;)
[Android Software/Hacking General [Developers Only]] osm0sis:
Make your own. That's how I started. Stop asking for things you can do yourself. :)
[Android Software/Hacking General [Developers Only]] kvevand63:
Simplest way... Google Zip Me.apk, also available on Play Store.
[Android Software/Hacking General [Developers Only]] Ibuprophen:
[MENTION=4544860]osm0sis[/MENTION], just a few quick questions regarding some of your flash files.

First, is the BusyBox flash file compatible for Nougat?

Second, though i know that the BusyBox app needs to be installed first, is the BusyBox flash file for installing the Binary as well as performing a Symlink of the Binary it installs?

UPDATE/EDIT: Third, Is the SUmount as well the CMSetup Fix for GApps Installer flash files compatible for Nougat?

UPDATE/EDIT: Finally, are the above flash files compatible with the d2vzw (Verizon Galaxy S3) device?

I hope they are not stupid questions. I just wanted to be positive regarding the questions above.

Thank you for your time and understanding.

Happy Holidays!
[Android Software/Hacking General [Developers Only]] osm0sis:
1+2) I have no app. Not sure what you're talking about. My zip does everything intelligently. I'm using it currently on both of my primary devices running Nougat, and have had zero issues.

3) SUmount is for systemless SuperSU installations, so of course that includes Nougat. CMSetup Fix currently isn't necessary on CM14.1, and hopefully it stays that way.

4) No idea directly but they should work just fine.

;):)
[Android Software/Hacking General [Developers Only]] UltraM8:
delete
[Android Software/Hacking General [Developers Only]] Ibuprophen:
[MENTION=4544860]osm0sis[/MENTION], I know that your a busy person and I really hate to bother you but, can you please provide me with some guidance in any corrections regarding my understanding in the following?

When performing a complete wipe and installation of CM14.1, and using a few of your flash files, am I correct in stating the following :

Select the "CMSetup.Fix.For.GApps.Installer" and the "SUmount" before the CM14.1, GApps package, and the SuperSU?

Then select the "adb.Installer" and the "sdcard.Fix.Permissions" at the very end of the of the flash files listed above?

I just wanted to be sure as to the order in which to install your flash files.

Also, on another topic, my External MicroSD's File System is "VFAT". Though it works great on the CM13 (Android 6.0.1), is it just as Compatible of a File System for the CM14.1 (Android 7.1)?

Thank you!
[Android Software/Hacking General [Developers Only]] osm0sis:
CMSetup Fix should NOT be flashed on CM14.x currently since it isn't necessary ... I told you the last time you asked. Anything else you want to be systemlessly installed you obviously just need SuperSU installed first so there's a place for things to install to once it sets up /su ..

I would think it was obvious, but you don't need to flash sdcard fix permissions unless something seems broken. This generally only happens after an adb restore from a backup to desktop.
[Android Software/Hacking General [Developers Only]] Ibuprophen:
My DEEPEST APOLOGIES!

It had just occurred to me that I had previously asked a few of those questions.

Will never happen again!!!

Thank you for your time and understanding.
[Android Software/Hacking General [Developers Only]] osm0sis:
Hey man no worries. :)
[Android Software/Hacking General [Developers Only]] ew:
Thank you for your contributions to the community and support.

Forgive me in advance for asking what may be a noob question - I have searched the thread and either did not find or not understand enough to give the the guidance I am looking for.

Here is what I am trying to do. I am running CM13 on an LG G4 with the Lama kernel. I have an int.d script for tuning the kernal. I can copy the script into the int.d folder, set the appropriate permissions and then everything is perfect.

However, when I reflash due to an update, my script is gone. I am looking for a way to package the int.d script into a flashable zip file that would automatically copy the file into the int.d folder and set the permissions. I could then put that into my flash queue to avoid the manual steps. Are there any suggestions on the best way to do that?

I hope the question is clear and thank you again for your patience.
[Android Software/Hacking General [Developers Only]] osm0sis:
If you root with SuperSU then you can put your script in su.d and it'll survive ROM flashes.
[Android Software/Hacking General [Developers Only]] jhedfors:
Hi [MENTION=1143630]osmosis[/MENTION]. I am wondering if a script could be created that sets the Android Device ID? I would like to be able to do a factory reset, let Google restore the apps, but the device ID be the same one as I have been using. One reason among others is so I don't "use up" device limits on Play Music.

Thanks for your hard work.
[Android Software/Hacking General [Developers Only]] ew:
Thanks for the response. I am rooted with SuperSU and my script is not surviving ROM flashes. I have SuperSU on the list of items that I flash with each ROM update - perhaps that is my issue...
[Android Software/Hacking General [Developers Only]] osm0sis:
You need to put the script in /su/su.d/

No idea how to set the ID, though I know Titanium Backup does it, so maybe you could start by turning on full root logging for it to maybe see how it does it.

You can save yourself the trouble pretty easily if you go into Play Music settings and remove your "ghost devices", if that's your main concern.
[Android Software/Hacking General [Developers Only]] ew:
Thank you - I wasn't looking carefully enough at your original response. I appreciate the help
[Android Software/Hacking General [Developers Only]] marcdw:
I use the same device id on all ROMs but I use an app to do so (haven't seen a script for that yet).

Normally, after flashing and initial start of ROM I skip the Google account setup. Set up the ROM, make sure it works, check permissions, etc., then change the ID (reboot?). Now Google gets setup. Never used Google restore before, ID change is for other reasons.

As mentioned, you can use TiBu to restore ID. Just flash it after ROM and gapps so it's ready to go.

LG G3 D851, VanirAOSP LP ROM (ZenUI/ASUS Apps), Tapatalk 4.9.5
[Android Software/Hacking General [Developers Only]] :
hi [MENTION=4544860]osm0sis[/MENTION] init.d injector not working in cm14.1 ,service exited with error 127 ,although selinux domain is defined is it possible to run service onetime as permissive and there is error in init.rc script its showing "i" as deprected so, i replaced "i' with "FILE" .I am using enforcing selinux.