yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] Surge1223:
The -Z flag is useful for selinux contexts. And to generate metadata updater script info. I believe in order to enable it you need to enable selinux related configs in whatever config you use.

It's been awhile since I sat down to reconfig a new busybox (I've been on 1.23 for like a year) but iirc you might need to build selinux libs in aosp tree and add them to the Android.mk as local static libs for busybox.

(for the screenshots, etc above bbx = busybox, I change the name since I use bbx in my ramdisk and don't want apps to use it)
[Android Software/Hacking General [Developers Only]] LoverBoy2415:
[MENTION=4544860]osm0sis[/MENTION] .. Gonna Flash your Busybox for first time :) ..Now using 1.24.1 by stericson ..

Does your Busybox is a one-time install zip ?

In future if I want to change Busybox from other source means..

can i install over it just like that or will it cause any issues? Like if i wanna Choose To Install jrummy Busybox in future from Its App ..Will be there be problems in installation ? So that I need to Clean flash the ROM again To Install Another Busybox ? .. Or No Problem .. ?

Sorry for so much of questions :) ..

Sent from my Nitro
[Android Software/Hacking General [Developers Only]] osm0sis:
If your root is systemless you naturally wouldn't need to reflash your ROM. ;)

It's up to other peoples' busybox installers to clean up after a previous, so I can't tell you what theirs can and can't do. Mine's fairly well thought out, supports system and systemless root, cleans up efficiently after a previous installation, and I'm the only one I know of doing builds for all Android and Android x64 architectures, so you're in pretty good hands. :)
[Android Software/Hacking General [Developers Only]] LoverBoy2415:
Thanks for the Reply [MENTION=4544860]osm0sis[/MENTION] .. Done :) Flashed it..

...

Thumps up ..for your Brilliant Work ;) ..

Sent from my Nitro
[Android Software/Hacking General [Developers Only]] osm0sis:
So I discovered nano has been kinda broken since I updated the source... :eek::rolleyes:

...Updates to the OP! ;)

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

- hunted down and reverted a commit from 2.5.3 that was breaking file opening (and hanging the Android shell) and submitted the bug for a fix in 2.5.4.

- update to a new 2.5.3 build compiled without the offending commit.

UPDATE-Flashlt.Installer.v2.2-signed.zip:

- add support for MultiROM TWRP + homebrew naming scheme (TWRP*.img) to both .sh and recovery zip.

- add a separate wrapper script (dumpit.sh) for the main script's --dump functionality; simply specify the partition (boot, recovery, radio/modem).

- if no partition is specified for dump, default to dumping boot.

- use busybox for all string parsing commands (if present) in the main script.

- clean up output for MTD devices and match output style to EMMC.

- refactor in order to add image dump trimming(!).

- fix mistaken hashbangs in .sh files (left over from recovery script), fixing standalone command prompt execution.

- hide some occasional possible stderr from lsof in the sourced execution workaround.

- add system/su (flashіt) symlink to enter to a command prompt in the working directory (and provide --restore functionality for symlink if required).

- update/fix placement and wording of installation completed instructions.
[Android Software/Hacking General [Developers Only]] tedrogers61:
Sorry if this question has already been asked, but I have an Nexus 5X that I need to return under warranty, but I've unlocked the bootloader so the tamper flag is set.

It's easy enough to reset on a good old N5, but does the script from the 1st post now work with N5X?

It's been a few years and I was hoping there was some kind of development on this front?

All help gratefully received.

Thanks.
[Android Software/Hacking General [Developers Only]] gialakias:
The tamper flag is not affected for 5x. Check from the bootloader with the command fastboot oem device-info if I remember well.
[Android Software/Hacking General [Developers Only]] tedrogers61:
Yes thanks for this. I ended up just trying it, and checking with fastboot oem device-info each time, and tamper was false on unlock and lock again. Didn't expect the full wipe on locking again though; I'm sure the old N5 just used to wipe on unlock only, and not lock too.
[Android Software/Hacking General [Developers Only]] shoey63:
Nope that doesn't do the trick. LED's don't even turn on during the boot process. (didn't do it before with you unmodded version either)Must be something else. Sorry for wasting your time.
[Android Software/Hacking General [Developers Only]] osm0sis:
All the busybox lzma config switches are otherwise the same, FAST was the only difference. Hmm. Maybe [MENTION=4904057][NUT][/MENTION] can explain.

On the upside, AIK is probably fine since I included an xz binary for lzma and xz recompression, so maybe I had already come across this issue and that was my solution. Who knows anymore, that was ages ago when I worked this stuff out. :p

xz) repackcmd="bin/xz $level -Ccrc32";;
lzma) repackcmd="bin/xz $level -Flzma";;
[Android Software/Hacking General [Developers Only]] :
[MENTION=4544860]osm0sis[/MENTION] can you please design a flashable zip or script to disable zram in android marshmallow?

Thanks in advance.
[Android Software/Hacking General [Developers Only]] osm0sis:
That's pretty easy stuff from a command prompt, and a script isn't really needed where many tweaking apps exist already which do just that.

https://github.com/osm0sis/GN-Synapse-Injector/blob/master/ramdisk/res/synapse/actions/zram#L6-8
[Android Software/Hacking General [Developers Only]] :
Actually I'm a naive android user have very less knowledge of command based tweaking. I have heard somewhere that that disabling zram will enhance low memory device performance. I also searched for apps related to zram tweaking but with no success.

So my kind request is to please guide me.

Sent from MotoG 2014 Titan

Stock official Marshmallow
[Android Software/Hacking General [Developers Only]] osm0sis:
Actually I believe ZRAM is supposed to help low memory device performance, take the Galaxy Nexus as an example.

As for your device, make sure you have ZRAM running in the first place with an app called ZramCC. Then there are literally hundreds of ZRAM control and monitoring apps when I looked on the Play Store a second ago. And I'm pretty sure the well-known Trickster app lets you modify ZRAM as well.

If your device doesn't have ZRAM support enabled in the kernel there's no way to add that with an app, you'll have to go find a custom kernel for your device and talk to the developer if they don't already use ZRAM.
[Android Software/Hacking General [Developers Only]] Surge1223:
So I'm building the full nano suit, but I have a persistent issue with compiling because of the libtinfo.a (from ncurses) I compiled is missing some dependencies that leads to the following.

Do you have a good copy of libtinfo.a? (I need to use it when compiling nano for tty and terminfo compat)

The errors below stem from the bad libtinfo.a, except for the glob errors, I haven't paid attention to figuring that error out yet tho
[Android Software/Hacking General [Developers Only]] jesssiii:
Never heard of that before. What, exactly, would you need from someone with a 6P?

Sent from my Nexus 6P
[Android Software/Hacking General [Developers Only]] osm0sis:
Hah so I just learned there's a step beyond an "OOPS" in Android errors while putting gappsintegrator through its paces on CM13 for my Galaxy Nexus.. :p

04-24 23:50:56.521 931 931 E AndroidRuntime: Error reporting WTF
04-24 23:50:56.524 931 931 E AndroidRuntime: Original WTF:
04-24 23:50:56.524 931 931 E AndroidRuntime: android.util.Log$TerribleFailure: Error reading package manager settings
04-24 23:50:56.524 931 931 E AndroidRuntime: Caused by: java.io.FileNotFoundException: /data/system/packages.xml: open failed: EACCES (Permission denied)

The boot was hung (sdcard refused to mount :eek:), so I went in with adb shell and checked the permissions:

-rwx------ 1 root root 487775 2016-04-24 23:38 packages.xml

Then restored my backup and this is what they should be:

-rw-rw---- 1 system system 514515 2016-04-25 00:23 packages.xml

I also discovered the free space calculation can report an APK could be integrated when it actually can't because of a difference in the df output in CM not having decimals a lot of the time, so I'm just testing out some fixes now that I imagine will fix things on a number of devices/ROMs/setups. :)

Edit: P.S. [MENTION=2861395]jesssiii[/MENTION], see my reply in the linked BootUnlocker thread, where I also @ mentioned you. :good:
[Android Software/Hacking General [Developers Only]] osm0sis:
Milestone update! Can't find a ROM on my test device that can make it fail now. :D:cowboy:

gappsintegrator: v6 - abort on broken script environments, logging improvements, fixes:

- remove oldest log entry once log exceeds ~16kb to create a rolling log and limit length

- test for awk and sed, attempt to use busybox sed if system version is broken, and abort if neither are found/working

- ensure proper ownership and permissions of /data/system/packages.xml to avoid possible WTF breakage on some ROMs or setups

- fix free space calculations when df reported amount has no decimal point (CM toybox)

- fix libsize calculations when unzip -l does not report a total due to deviations from the zip standard in APK compression (invalid zip magic)

https://github.com/osm0sis/gappsintegrator/commit/1f0438dcc711eec9dd4a354af94e3df7f596a0d6

And the requisite bugfix/new milestone release. ;)

gappsintegrator: v7 - improve freespace calculations, more script environment checks:

- expand script environment element checks to all possibly non-standard commands

- fix new libsize counting method for older zip standard-compliant APKs, and ensure no possible variable issues arise within the multiple loops present

- improve freespace calculation by accounting for whether libraries will be removed/repacked for the integrated APK

- add a buffer space amount now that calculations aren't so "quick and dirty" anymore, increasing when libraries are removed/repacked to account for growth

- add exclusions for known APKs with library incompatibility on KitKat and below (thanks [MENTION=6404745]MastahF[/MENTION] and Open GApps for maintaining a current list)

https://github.com/osm0sis/gappsintegrator/commit/6a81ca05acee2208b8aec695eaf97bc0fc9e6b08

Download via GitHub's raw copy of the latest version. :good:
[Android Software/Hacking General [Developers Only]] osm0sis:
Bugfix! Turns out Google Calendar v5.5 and Android System WebView v50 trigger the same System UI FC/permissions issues we saw with Google TTS and Google Keyboard.. I'm still not sure why this happens, but now that I have 2 examples of APKs where one version to the next it has become a problem I'm hoping I can dissect and compare to v5.4 and v49, respectively, to maybe figure out how to workaround or at least detect the issue on the fly. :fingers-crossed:

Please let me know if there are any others that need to be added to the exclusions which I haven't yet come across in my testing.

gappsintegrator: v7.5 - update Marshmallow exclusions:

- add calendar and webview to exclusion list since recent app updates (5.5 and 50, respectively) have made these trigger the SystemUI FC/permissions issue

https://github.com/osm0sis/gappsintegrator/commit/4a3cb1e8cd19cd42e9b8096d3f318e808cb36cf9

Major update! Thanks to a great brainstorming session with [MENTION=6404745]MastahF[/MENTION] of Open GApps a workaround for the Marshmallow System UI FCs has been found, and I've rewritten the exclusion list into a blacklist for the workaround to use. Unfortunately, despite tearing apart the APKs I noted changed above, I wasn't able to find a way to detect a "bad" APK on-the-fly; must be something in classes.dex or resources.asrc since there was nothing obviously different in the required permissions, AndroidManifest.xml, or the zip structure itself.

The workaround forces a rebuild of the permissions lists, a side-effect of which is that granted user app permissions will be reset until you run the app again to request them. Even though this is pretty minor, I have found we can get away with having this only occur during the cleanup following the integration of one of the flagged (blacklist) apps, so there continues to be as little inconvenience as possible. :cowboy::highfive:

gappsintegrator: v8 - workaround for Marshmallow breakage, update KitKat exclusions:

- rewrite Marshmallow exclusion list into a workaround with blacklist to prevent breakage (System UI FC/permissions issues) following integration of APK by forcing a rebuild of runtime-permissions.xml as part of the cleanup (noted in log with "~") (thanks [MENTION=6404745]MastahF[/MENTION] for the idea)

- add streetview to exclusion list for KitKat as it now conflicts with maps (thanks [MENTION=6404745]MastahF[/MENTION] and Open GApps)

- rewrite zip/zipalign check to output results in log

https://github.com/osm0sis/gappsintegrator/commit/68fa4d4778e3dc3caaf61b16a131d2f0baadfc79

Download via GitHub's raw copy of the latest version. :good:
[Android Software/Hacking General [Developers Only]] marcdw:
Nice. Do you use fiops for internal, external, or both?

LG G3 D851, ParanoidAndroid ROM, Tapatalk 5.8.2
[Android Software/Hacking General [Developers Only]] smint86:
I'm currently trying to set up gapps-integrator v8 with CM13 (CAF based) on my OPO. I placed the script in /system/su.d, but unfortunately I get the following output in the log:

Thu May 12 15:47:47 CEST 2016
* Missing script environment element detected: awk
---

What could be the culprit? Should I contact the kernel maintainer, ROM dev or would it be an easy fix by myself?

Additional information: I'm using SuperSU Beta v2.71 and xposed v83.

Swyped via Tapatalk
[Android Software/Hacking General [Developers Only]] osm0sis:
A lot of Marshmallow ROMs are missing awk because Google/AOSP started using toybox and it doesn't have awk (yet). Simplest solution is to install busybox. My flashable busybox installer zip does a pretty good job. :)

I'd also strongly recommend you put a current zip and zipalign in /su/bin or /system/xbin to process APKs properly (without using the fallback method) and save space in /system. They can be found on my BasketBuild.

Edit: Just re-pushed v8 with checks for zip and zipalign to warn which method will be used. :good:
[Android Software/Hacking General [Developers Only]] Niggo372:
[MENTION=4544860]osm0sis[/MENTION] Hey, thanks very much for your work, it's greatly appreciated! I tried your ADB+fastboot installer on my Pixel C, and while fastboot seems to work, ADB shows the connected Nexus 5X as offline. Any idea how to fix that?
[Android Software/Hacking General [Developers Only]] hamzaeid:
thanks pro:o
[Android Software/Hacking General [Developers Only]] osm0sis:
I seem to recall having to do adb kill-server, going to a su prompt then adb devices to start the service again as root (for both fastboot and adb). Offline usually means unauthorized though, so try connecting with USB Debugging enabled on your N5X while booted and see if you get a confirmation prompt. Set it to always trus your host device and after that it should work in recovery too.
[Android Software/Hacking General [Developers Only]] rogers11:
I want to run gappsintegrator on my stock rooted Nexus 10. I've installed Busybox from here, added init.d support from here: http://xdaforums.com/showthread.php?t=1933849 with term-init script and verified that it is working (test-script in system/su.d). I placed 000gappsintegrator in su.d but nothing happens and there is no log on sd-card. What am I doing wrong?
[Android Software/Hacking General [Developers Only]] smint86:
Worked pretty well so far. zip was already present in /system/xbin, so l added zipalign. From the log I got the following:

Fri May 13 06:41:41 CEST 2016
/data/app/com.google.android.apps.adm-1
/data/app/com.google.android.apps.maps-1 /system/app/Maps (925101124 > 923100124)
/data/app/com.google.android.googlequicksearchbox-1 /system/priv-app/Velvet (300643756 > 300612736)
/data/app/com.google.android.street-1
---

Fri May 13 16:51:47 CEST 2016
/data/app/com.google.android.apps.adm-1
/data/app/com.google.android.apps.maps-1
/data/app/com.google.android.googlequicksearchbox-1
/data/app/com.google.android.street-1
---

Sat May 14 09:58:29 CEST 2016
/data/app/com.google.android.apps.adm-1
/data/app/com.google.android.street-1
---

Sat May 14 11:51:06 CEST 2016
/data/app/com.google.android.apps.adm-1
/data/app/com.google.android.apps.translate-1 /system/app/TranslatePrebuilt (50002462 > 44000162)
/data/app/com.google.android.street-1 /system/app/Street
/data/app/com.google.android.street-2 /system/app/Street (25289 > 23582)
---

It shows no errors, so I think it works fine. There's only one thing I'm wondering about: When I check /data/app, there are still google folders present. com.google.android.apps.adm-1, com.google.android.apps.translate-1 and com.google.android.street-2. Aren't they ment to be removed?

Swyped via Tapatalk
[Android Software/Hacking General [Developers Only]] osm0sis:
After another reboot or so the extra Street will get removed. That normally occurs. The other doesn't have a system partition counterpart so gets listed but remains un-integrated. Glad it's working well for you! :)

Let me know if you come across any apps/versions that need to be added to the integration workaround blacklist. :good:

Are you rooted with SuperSU? su.d only works with SuperSU and requires no further mods. init.d is less reliable by comparison, so I wouldn't bother with any of those mods nowadays.

Then, are you systemless root? If so /su/su.d might be what works instead of /system/su.d - weird that test-script would work though.. :confused:

https://github.com/osm0sis/gappsintegrator/blob/master/000gappsintegrator#L31

The more recent script versions create an empty file/update the file date+time as soon as sdcard is accessible to let you know it's working, then it can take a while into boot for processing to finish and the log gets written from buffer after the script completes.
[Android Software/Hacking General [Developers Only]] rogers11:
The device uses SuperSU 2.65 in system-mode and I already use the latest version of v8. :(

I've also removed the init.d mod by restoring a backup in the meantime but no change.
[Android Software/Hacking General [Developers Only]] osm0sis:
Sounds like either /sdcard or /system never become writable from the script's perspective, which would basically hang the script waiting for them. Could you try updating to the latest SuperSU Beta to see if it resolves it?

I've been using the betas with no issues since Marshmallow came out. :good:
[Android Software/Hacking General [Developers Only]] rogers11:
So, running SuperSU 2.72 now in system-mode and having 000gappsintegrator with 775 permissions in /system/su.d. Still no log or anything else.
[Android Software/Hacking General [Developers Only]] osm0sis:
Okay, so 2 things to try; first, dmesg output directly after boot might contain the script's output, second, you could also try to run the script from a su prompt in Terminal Emulator and see if the output provides any hints.

Does /sdcard work normally and /system mount rw correctly while booted on the N10?
[Android Software/Hacking General [Developers Only]] rogers11:
SD-card works without problems and I have no problems mounting /system rw.

Here is the terminal output (looks strange for me):

1|root@manta:/system/su.d # sh ./000gappsintegrator

: not foundntegrator[6]:

' unexpectedtegrator[16]: syntax error: 'do

dmesg output attached
[Android Software/Hacking General [Developers Only]] mikeoswego:
Did you edit the script using Windows notepad or copy the script from webpage and then save it using Notepad? If so, the line endings got changed from Unix style to Windows style which will cause the problem you're seeing.

Go to the link at Github where the script is located, above the script at the right is button that says Raw. Right click on that and select Save Link As and download the file directly. If you do want to edit it, use Notepad++ which will automatically detect the correct line endings in the saved file. (Notepad++ will not help if you copy and paste from the web page, though. Although with Notepad++ you can change the line endings using the correct menu items.)
[Android Software/Hacking General [Developers Only]] osm0sis:
Thanks for figuring that out! I was starting to hit my head against the wall haha

Easiest way to download is to long-press/right-click my link to the raw copy and Save Link/Save As... :)
[Android Software/Hacking General [Developers Only]] rogers11:
In the meantime I've noticed myself that the downloaded file was the problem. I used the Raw copy but my editor Scite is configured to save CrLf. Now I've used the gappsintegrator-master.zip and used the included copy of 000gappsintegrator. Everything is fine now. Thanks a lot and sorry for the trouble.

---------- Post added at 20:53 ---------- Previous post was at 20:49 ----------

Firefox on Android does not have this possibility, so I've used Windows. I think the best way to link to the script would be to link to gappsintegrator-master.zip.
[Android Software/Hacking General [Developers Only]] osm0sis:
I'll think about that, but I expect people would start asking why it doesn't flash in TWRP. :p
[Android Software/Hacking General [Developers Only]] rogers11:
Yep, that's true.
[Android Software/Hacking General [Developers Only]] osm0sis:
Decided I should make a fix release to account for these possibilities.. :p

Timeouts are 120 seconds (2 minutes) for /system to become remountable/writable during boot, and 600 seconds (10 minutes) for /sdcard to become available/writable. That's a pretty long time, but I'm actually hoping that's long enough, since /sdcard doesn't become available until after optimization completes, so during ART optimization it could be close to that on older devices. Please let me know if anyone finds they need to increase the 2 /sdcard limits for a device to keep the log in 1 location and I'll raise the default.

I work on this project 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!

gappsintegrator: v8.5 - add limits for until loops, add fallback log location, fixes:

- don't hang the script forever if /system never becomes writable, provide log output and abort

- don't hang the independent log placeholder or log write loops if /sdcard never becomes writable, switch to a known existing/working location (/data/local)

- add "which" itself to environment check since it doesn't exist without busybox on pre-Marshmallow

- fix Marshmallow breakage workaround, since you can't check for something after you delete it ;)

https://github.com/osm0sis/gappsintegrator/commit/aedebc7c8dc93b64bd9e71f206726215d12cdcf5

Download via GitHub's raw copy of the latest version, or extract it from the repo zip. :good:
[Android Software/Hacking General [Developers Only]] andy_zhang:
Delete

vs985 China user
[Android Software/Hacking General [Developers Only]] osm0sis:
Pretty sure all you had to do was bump it. Glad you found something that's more suited to your skill level.

And kindly stay out of my threads if you're trying to promote other people's work. It's inappropriate.