yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] Surge1223:
YES Finally! after like a year I was able to successfully build it for arm and aarch64/arm64 yesterday. It required quite a bit of hackery/edits, but nothing that would change/remove functionality. Luckily I used all the Nougat sources from a fresh aosp repo sync, so for the first time since 1.0.32 release we will be up to date.

The lessons learned from this will probabaly open the door to fastboot compile too. I'll edit this post with a link to the files in a bit.

Downlaod link
[Android Software/Hacking General [Developers Only]] veez21:
nice one, thanks
[Android Software/Hacking General [Developers Only]] Maxr1998:
It didn't work that way because the quote is a special grouping character which expects another quote to close the group, that's why it showed a > (which means continuing query in new line).

You would have had to remove the quote from the filename. But I'm glad it works now.
[Android Software/Hacking General [Developers Only]] adikri:
may you add script or something for "resize system + data partition via twrp" and "fix permissions and groups for system & other files-folders sir?

Thanks in advance.. :)
[Android Software/Hacking General [Developers Only]] PiggyFlooper:
[MENTION=5463312]smeejaytee[/MENTION]

Make sure sqlite3 is symlinked to /bin with that script.

Or ...

busybox ln /system/xbin/sqlite3 /system/bin/sqlite3

---------- Post added at 11:23 AM ---------- Previous post was at 10:52 AM ----------

Thank you for this, if I go back to KK, can you come up with script to copy apps from their folder to /data/app then delete the folders?
[Android Software/Hacking General [Developers Only]] smeejaytee:
Where do I put that mate?

I thought it was working lol.

After the counter?
[Android Software/Hacking General [Developers Only]] PiggyFlooper:
Will you try running this, it'll give u more info-

https://mega.nz/#!zxYnSAJA!avP8UuzVFd6I62NLkHKs3ezCgyd6lHwNF4etMwVAXps
[Android Software/Hacking General [Developers Only]] smeejaytee:
Thanks although I did manage to do it and added logs to show its working lol,

I had help from paget96 he's a good man and very helpful.

I have downloaded your version I'll have a look.

Thank you
[Android Software/Hacking General [Developers Only]] smeejaytee:
Edited a bit and working well, it's much more detailed.

Thank you
[Android Software/Hacking General [Developers Only]] Surge1223:
Thank goodness. This is one of the only threads I monitor, and sqlite3 scripts are not my cup of tea lol.
[Android Software/Hacking General [Developers Only]] smeejaytee:
I must say this thread is proving to be a godsend for me
[Android Software/Hacking General [Developers Only]] smeejaytee:
Does anybody know of a script to set zram size at boot please.
[Android Software/Hacking General [Developers Only]] :
I think most of these tweaks are just placebo but id check out lspeed or one of those 'device booster' things in software development.
[Android Software/Hacking General [Developers Only]] osm0sis:
You could also adapt the commands from my GN Synapse Injector zram script into a su.d script. :good:
[Android Software/Hacking General [Developers Only]] smeejaytee:
Not doing it for tweaking as such, I'm doing this one because device default is 800mb and I want to lower it,

I can manually edit the file but I'm starting to like scripts lol.

---------- Post added at 08:47 PM ---------- Previous post was at 08:46 PM ----------

Where can I find this please mate, I have searched the op but can't seem to locate it.

Thank you.
[Android Software/Hacking General [Developers Only]] osm0sis:
https://github.com/osm0sis/GN-Synapse-Injector/blob/master/ramdisk/res/synapse/actions/zram

And I believe that got invoked with "zram zram0 <mb>" so in the middle part where it has -gt 0 are the enabling commands.
[Android Software/Hacking General [Developers Only]] smeejaytee:
Will mess around with it thank you,

What about something that can edit fstab swap as that is the file I usually edit to set zram values,

I tried this and for some reason it creates a duplicate fstab file names fstab swapr

And edits the original with new values but it doesn't delete the original lines.

mount -o rw,remount -t auto /system

sed -ir "/(\/dev\/block\/zram).*/d" /etc/fstab.swap

echo "/dev/block/zram0 none swap defaults zramsize=655360000,swapprio=200" >> /etc/fstab.swap

mount -o ro,remount -t auto /system
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah not too sure about your setup, you should ask in your device/kernel thread.
[Android Software/Hacking General [Developers Only]] smeejaytee:
I use a custom built kernel it didn't have a thread, I'll speak to my kernel Dev personally and ask if he knows anything thanks.
[Android Software/Hacking General [Developers Only]] jesssiii:
I have a script in system/sud to run permissive.

Is there a line I could add to set sweep 2 wake (want to sweep UP) so I don't need a kernel app for one feature to be turned on? It's available with my kernel.

Nexus 6P
[Android Software/Hacking General [Developers Only]] osm0sis:
Yes. You need to find out the path to the sysfs control for the feature. Turn on SuperSU complete command logging for the tweaking app you're currently using, and toggle the sweep 2 wake in the app, then check the log in SuperSU to find out what the command you need to add to your su.d script should be. Alternately, just ask your kernel dev? They could probably have told you the exact command immediately.
[Android Software/Hacking General [Developers Only]] nathanchance:
echo 4 > /sys/android_touch/sweep2wake
[Android Software/Hacking General [Developers Only]] jesssiii:
Sorry, posted to the wrong thread ?

Nexus 6P
[Android Software/Hacking General [Developers Only]] mauam:
Hi [MENTION=4544860]osm0sis[/MENTION],

Can you update busybox to 1.25.1 please!?
[Android Software/Hacking General [Developers Only]] PiggyFlooper:
just wondering, is it stable?

I floop the pig outta my free service for over a year LG Volt
[Android Software/Hacking General [Developers Only]] mauam:
Busybox.net says yes.
[Android Software/Hacking General [Developers Only]] veez21:
Yeah, stable
[Android Software/Hacking General [Developers Only]] fhem:
HELP!!! LOL

[MENTION=4544860]osm0sis[/MENTION] I got mrRobinson's permission (all credits remain w/ him) to try and convert his AdAway_systemless_hosts_v2.zip to run in embedded mode similar to your busybox installer. I have spent a few days trying and have come to conclusion that this old man's brain can't figure it out. Here's what I was trying to do.

1. I used your busybox zip update-binary as a template (also looked at what SuperSu and SuperR. do with their update-binary script)

2. I tried to write a script that mimed yours with the AdAway updater-script and mount_su_image.sh script both incorporated into the update-binary.

3. I have had no success!!! It looks like I should be able to make it work but I guess I am not smart enough to figure it out.

I will not embarrass myself anymore by posting my failures but I am attaching a copy of mrRobinson's zip.

Any guidance/help you can give me will be greatly appreciated. BTW. I still plan on flashing your BB zip with my roms.

Thanks for all your amazing work. :good::good:
[Android Software/Hacking General [Developers Only]] osm0sis:
You'll also note nothing changed but the version number from my last patched build. But yes, I compiled it yesterday morning. ;)

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

- update to latest busybox (1.25.1) official.

See the related commits here: https://github.com/osm0sis/android-busybox-ndk

I also pushed and submitted my strings patch to the official busybox mailinglist. :good:
[Android Software/Hacking General [Developers Only]] osm0sis:
I'm a little curious as to why, since the next version of AdAway will have all this built in.

But the only thing needed to make it embedded is the script snippet, linked from the 2nd OP of my Complete Shell Script Zip Guide thread. :good:
[Android Software/Hacking General [Developers Only]] mauam:
Yes, I noticed that, but my OCD is stronger (said my psychiatrist). Thank you very much:cool:
[Android Software/Hacking General [Developers Only]] fhem:
Boy now I really am embarrassed :o:o

1. When you say built in I assume you mean this?? I should have looked sooner. I see Benzo got something like that w/ his BenzoBlock apk. I decompiled his apk and took a look.

2. I also should have looked at your OP's again before posting. I am sorry!! As far as why ---> I am just trying to understand and learn how to do things. At 71 this old dog is still trying to learn new tricks.

As always thanks for the response and the hard work.
[Android Software/Hacking General [Developers Only]] PiggyFlooper:
I have a question about busybox, is there a changelog anywhere( other than this- https://github.com/osm0sis/android-busybox-ndk/commits/master ) as to what is being added, the last thing I noticed was fstrim. Are there any new features?

can anyone tell me exactly what scriptreplay and setarch do? --help isn't helping enough

I floop the pig outta my free service for over a year LG Volt
[Android Software/Hacking General [Developers Only]] osm0sis:
Yup, that's it! It'll be a toggle in the AdAway settings, and, while it will still probably use a su.d script, it'll be pretty seamless to the end-user. :)

No worries. Let me know if you have any other questions since the new AdAway could still be a while.

Follow the link to my ndk repo, read the busybox site for 1.25.0 (the feature release - .1 is just bugfix), and my release post for 1.25.0. :good:
[Android Software/Hacking General [Developers Only]] fhem:
FYI: I pulled those commits into my clone of AdAway and built the apk. Enabled systemless mode in settings -----> All seems to work fine!!!!! :good::good:
[Android Software/Hacking General [Developers Only]] ianmacd:
Is there an uninstaller knocking around for osm0sis's Busybox? I would like to quickly uninstall it to rule it out as a source of interference to another package, but I can't find an uninstaller anywhere.
[Android Software/Hacking General [Developers Only]] osm0sis:
You can run this from root shell within the directory busybox is installed to to uninstall:

for i in $(ls -al `find -type l` | busybox awk '{ print $(NF-2) ":" $NF }'); do
case $(echo $i | cut -d: -f2) in
*busybox) list="$list $(echo $i | cut -d: -f1)";;
esac;
done;
rm -f busybox $list;

It's just my cleanup script from the installer. :good:
[Android Software/Hacking General [Developers Only]] ianmacd:
Super. I didn't realise it was that trivial. I thought there might be residual stuff elsewhere.

Anyway, that was just what I needed. Thanks.
[Android Software/Hacking General [Developers Only]] robcore:
Well Chris, looks like I'm breaking my promise of not badgering you for expertise some more...to my defense, you're brilliant and kind, a dangerous combination for folks around these parts ; )

Do you have any experience with device trees? Dtbtool/ramdisky stuff I mean?

I just added a note3 to my collection and have started working on it, and I'm hesistent to blindly trust other's methods... I have looked at the basics and understand it in theory. Also I've seen mkqcdbootimg by Sony which I'm not sure I trust for a Sammy image quite yet. Mostly at this point my issue is a mental block moreso than a lack of technical knowledge I guess. I'm kinda terrified of this newfangled technology which is a few years old :P yes, I feel like an idiot.

I dunno, in short, if you feel like it...wisdom please : )
[Android Software/Hacking General [Developers Only]] Matt07211:
What exactly do you want to do with boot.img/ramdisk/what-ever etc. I am willing to help you and point you in the correct direction. :) if it's more about the specific of a device then I can't help you to much in that area.

What exactly do you want to know about device trees? Where they are in the boot.img, or what they are, what they do?? Need some more context.
[Android Software/Hacking General [Developers Only]] robcore:
You ask very appropriate questions given my rambling, vague, half-question! Thanks for your offer : ) basically, I'm wondering if I'm safe following some of the generic methods out there for combining my boot.img and dtb.img when it comes to the last step in the process. Also, if I can unpack a stock ramdisk, modify it, and then use it in a new boot.img, given that it was already combined with the dtb.img.

Thanks for your willingness to help! I've only built for "old school" devices up until now so the additional step is just freaking me out.
[Android Software/Hacking General [Developers Only]] JohnCorleone:
Is there a copy of SuperSU v2.78 forceencrypt floating around? I found a copy but the zip was tiny compared to v2.74 forceencrypt.
[Android Software/Hacking General [Developers Only]] osm0sis:
That has nothing to do with my thread, and please don't cross-post.
[Android Software/Hacking General [Developers Only]] :
Dude if you read the SuperSU OP you'd know that running:

echo "KEEPFORCEENCRYPT=true" >> /data/.supersu

And then flashing regular zip you'd keep forceencrypt. However once your encrypted you do realize that even if forceencrypt is removed you don't unencrypt.
[Android Software/Hacking General [Developers Only]] osm0sis:
Actually they're designed with every other kernel and/or device in mind, since f.K has it all built-in. Running them on f.K at this point would be redundant. :)

All the scripts work by changing the values in files in the sysfs that act like settings files for many kernel functions. If the function is not present (eg. some kernels have different schedulers included) then there is no effect. :good:
[Android Software/Hacking General [Developers Only]] AutomaticFailure27:
So what scripts/codes are included in the "original recipe" f.K? I take your osmod version has basically everything except the experimental stuff in them?
[Android Software/Hacking General [Developers Only]] osm0sis:
f.K-tuna as of r384 has:

- All the finalized tweaked ioscheduler tunables from 950iosettings (deadline, row, cfq), plus the bfq quick-tune optimization for flash media that [MENTION=4793042]pkgnex[/MENTION] did, but hardcoded into the actual scheduler sources so no script is required.

- lmk launcher whitelist and systemui+launcher niceness scripts from 975experimental, integrated into the /sbin/fkbootscript.sh file.

- The partition mount option tweaks from 875mntsettings (system, cache, userdata), but set directly by /fstab.tuna with my workarounds for bootloops/hung boots with certain fstab userdata options added to /init.tuna.rc so no other script is required.

- The sysfs and sdcard mount option tweaks script from 875mntsettings, integrated into the /sbin/fkbootscript.sh file.

- The lease-break-time and kernel entropy pool tweaks from 925vmsettings, but added to /init.rc so no other script is required.

- Some other minor things I had added in previous osmods like proper /system/etc/init.d creation if it doesn't exist, and renaming /system/etc/sysctl.conf if it exists, to keep ROMs from hijacking the kernel settings, both integrated into the /sbin/fkbootscript.sh file. The latter is also in most of the standalone scripts.

r384-osmod adds:

- A newer, smaller /sbin/bb/busybox binary - the latest v1.21.0 by Stericson.

- westwood as default TCP Congestion Avoidance Algorithm and the vm tweaks from 925vmsettings, but added to /init.rc so no other script is required.

:cowboy:
[Android Software/Hacking General [Developers Only]] osm0sis:
Good news, as of ClockworkMod Recovery 6.0.3.5 "Reboot to Bootloader" and "Power Off" options have been added to the Advanced menu, so my flashable zip for that is no longer required on 6.0.3.5 or newer. :good:
[Android Software/Hacking General [Developers Only]] osm0sis:
Updated my N7 BootUnlocker Script:

v4.23:

- Fix the mount issue of the previous version.

- Display current device name and bootloader version to help identify user-errors.

- Check for the actual bootloader version number from getprop, as well as still checking checksum (which doesn't seem to change often).

The last item in particular should make this a bit safer, and while the checksum doesn't change often/ever, I left that check in place so that if the checksum/data ever did get altered without the number changing, that's still a red flag and will stop the process.

The instructions have also been updated to reflect these changes and new line positions. :good:

http://v.ht/N7BU

http://xdaforums.com/showthread.php?t=2068207
[Android Software/Hacking General [Developers Only]] androidfr33k:
[MENTION=4544860]osm0sis[/MENTION],

Thanks for the link to your permission fix script. I had to modify your update-script from your reference to clockworkmod to TWRP. Two instances in the update-script.

It is working now and Android FIle Transfer was not related to my initial thoughts. Its was MTD which cm 10.2 kangs release had disabled it.

Sorry for that confusion on my part.
[Android Software/Hacking General [Developers Only]] androidfr33k:
[MENTION=4544860]osm0sis[/MENTION],

It is possible to have a zip to install stickmount or equivalent so I can install all my backup apps from a USB flash drive. In a situation where I am not near wireless nor a PC to minimally install a USB flash drive mount application so I can install for example titaniumbackup and then its backup folder and install all the apps from there.

I have Google ADT bundle installed on my MAC and if I can remember well I can make the META-INF folder and then sign it with a java digital certificate script then zip it if I am not mistaken just have to find the procedure to do this and see if the ADT/SDK contains the java certification script for the zip file?

EDITED:

I suppose I can use the File Manager in TWRP to copy the essential files over to the internal sdcard/downloads for example. That one went over my head sorry.
[Android Software/Hacking General [Developers Only]] WastedJoker:
I'm using TWRP on my HTC One. I've had issues with perms on my internal sdcard.

Do I need to edit the sdcard permissions fix?

I just used it on a fresh install and now I have stuff spread across /data/media and also in /data/media/0/....
[Android Software/Hacking General [Developers Only]] osm0sis:
My zip doesn't even move files so I don't know what to tell you.

ui_print("");
ui_print("sdcard Fix Permissions Script");
ui_print("by osm0sis @ xda-developers");
show_progress(1.34, 0);

ui_print("");
ui_print("Mounting...");
run_program("/sbin/busybox", "mount", "/data");
set_progress(0.2);

ui_print("");
ui_print("Setting /data/media to media_rw and fixing...");
set_perm_recursive(1023, 1023, 0775, 0664, "/data/media");
set_perm(1023, 1023, 0770, "/data/media");
set_progress(0.8);

ui_print("");
ui_print("Setting /data/media/clockworkmod perms...");
set_perm_recursive(0, 0, 0775, 0777, "/data/media/clockworkmod");
set_progress(1.0);

ui_print("");
ui_print("Unmounting...");
unmount("/data");
set_progress(1.2);

ui_print("");
ui_print("Done!");
set_progress(1.34);

As you can see, all it does is mount, set permissions on /data/media, and the clockworkmod folder if it exists, otherwise this shouldn't do anything. It's basically meant for the Nexus device internal sdcard layout, which is /data/media/0 for user0 (and /data/media/10 for user1, etc for multiuser on tablets), but this should apply to many devices, and as long as they mount the internal sdcard at /data/media/ requires no changes. I don't know how the HTC One is setup, but like I said, there's no way that it's responsible for "stuff spread across" your device.
[Android Software/Hacking General [Developers Only]] Pkt_Lnt:
Was it a 4.2.x of 4.3 install. That happened beginning with 4.2 because of the multiple user feature, and older versions of both TWRP and CWM had trouble with it. So, is your TWRP up to date?
[Android Software/Hacking General [Developers Only]] WastedJoker:
I was trying to troubleshoot an issue which occured after adb pushing a txt config file to /sdcard/ROMCleaner - it caused weird permission issues.

So I completely wiped device, sideloaded ROMCleaner zip and exited the aroma. That was so ROMCleaner would create its folder structure on device. I then used adb to push the config file to /sdcard/ROMCleaner. I confirmed it was in right place using file manager of TWRP 2.6.0.1.

To ensure the adb push hadn't screwed permissions I then sideloaded your fix.

I then sideloaded my rom followed straight by ROMCleaner which detected my config file.

I rebooted and set my device up etc.

That's when I realised the ROMCleaner files had gone from /sdcard/ROMCleaner to /data/media/ROMCleaner.

Not sure how it moved? I know it's a really convoluted flash process but there was reason behind it!

Here's a screenshot of data/media folder structure.

Download, pictures, dcim etc are all at /sdcard/ (and daya/media/0).

There's no issue caused by this but I thought it was curious.

Edit: How do I find out normal internal sdcard path for htc one? I have a feeling it's just /sdcard/ rather than /data/media but then again the rom put usual folders at /sdcard.....
[Android Software/Hacking General [Developers Only]] osm0sis:
That's a symlink.

/data/media/0 = /sdcard = /storage/sdcard0 = /storage/emulated/legacy = /storage/emulated/0

All the same. ;)

Those are literally the same files, not duplicates. Again, nothing to do with me; that's just how Linux and Android work.
[Android Software/Hacking General [Developers Only]] WastedJoker:
But they aren't duplicated - the files only exist in one location but you're right. Something else is at play here! Nothing is broken so I'll just live with it til next time I need a full wipe.
[Android Software/Hacking General [Developers Only]] osm0sis:
I need 3 volunteers: someone with a N4, someone with a N10, and someone with a (currently) unsupported device, like a N7 2013.

I decided to combine my BootUnlocker scripts into one single zip. ;)

Edit: All is working well! Thanks to all the testers! I'll upload the new version next week after my vacation is over. :D
[Android Software/Hacking General [Developers Only]] efrant:
I can volunteer the N4, but am busy this afternoon. Can be available later tonight for testing though.
[Android Software/Hacking General [Developers Only]] efrant:
Just tested it. Works as expected for the N4: if bootloader is locked, it unlocks it; if bootloader is unlocked, it locks it. Well done.
[Android Software/Hacking General [Developers Only]] osm0sis:
Sweet. Thanks! Now just a N10 and something unsupported to go to make sure all of my ifelse logic works. :)
[Android Software/Hacking General [Developers Only]] chrone:
Out of topic and dumb question from me, when will the bootlocker script work on adb sideloading in stock recovery?

Would love to have that if it's possible. :D

Thanks for the great scripts!

Sent from my Nexus 4
[Android Software/Hacking General [Developers Only]] efrant:
For you to be able to flash something using the stock recovery, whatever you are trying to flash needs to be digitally signed by Google. So, unless you can provide us with Google's keys, I don't think it will be possible.
[Android Software/Hacking General [Developers Only]] chrone:
Aha, just what I thought, sorry for the trouble. Thanks for the info. :)

Just got back to pure stock on Nexus 4 and it seems the overall experience is more responsive compared to rooted one. Testing with latest jwr66y build, superuser by koush often produced transition animation and less responsive, while supersu by chainfire kept the phone from deep sleep.

Hehehe

Sent from my Nexus 4