yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] osm0sis:
Haha oh yeah, I forgot about that.

1-Jun-2013 975experimental by Franco's Dev Team

It has my lmk launcher whitelist (+ launcher niceness tweak), systemui niceness tweak (thanks boype/Fancy Kernel for the idea there), and those crazy dalvik vm heap tweaks everyone's been so keen on messing with the last few months, but set with setprop so that you don't have to edit your build.prop. The heap tweaks especially are what I consider ROM territory so would never be part of osmod or any of the other FDT scripts, and the other ones are already in osmod, but have never been released standalone.
[Android Software/Hacking General [Developers Only]] bgiesing:
[MENTION=4544860]osm0sis[/MENTION] here's a problem I am having with the GApps integrator script.

## GApps Auto-Integration Script Log

Sat Aug 22 21:23:07 CDT 2015
/data/app/com.android.chrome-2 /system/app/Chrome
cp: /data/local/tmp/gapp/lib/arm*/*: No such file or directory
cp: /data/app/com.android.chrome-2 is a directory (not copied).
/data/app/com.androidexperiments.lipflip-2
/data/app/com.google.android.apps.chromecast.app-1
/data/app/com.google.android.apps.hangoutsdialer-1
/data/app/com.google.android.apps.inbox-1
/data/app/com.google.android.apps.paidtasks-1
/data/app/com.google.android.apps.photos-2 /system/app/Photos
cp: /data/local/tmp/gapp/lib/arm*/*: No such file or directory
cp: /data/app/com.google.android.apps.photos-2 is a directory (not copied).
/data/app/com.google.android.apps.youtube.creator-1
/data/app/com.google.android.calendar-1 /system/app/CalendarGooglePrebuilt
cp: /data/local/tmp/gapp/lib/arm*/*: No such file or directory
cp: /data/app/com.google.android.calendar-1 is a directory (not copied).
/data/app/com.google.android.googlequicksearchbox-1 /system/priv-app/Velvet
cp: /data/local/tmp/gapp/lib/arm*/*: No such file or directory
cp: /data/app/com.google.android.googlequicksearchbox-1 is a directory (not copied).
/data/app/com.google.android.keep-1 /system/app/PrebuiltKeep
cp: /data/local/tmp/gapp/lib/arm*/*: No such file or directory
cp: /data/app/com.google.android.keep-1 is a directory (not copied).
/data/app/com.google.android.launcher-1 /system/priv-app/GoogleHome
cp: /data/local/tmp/gapp/lib/arm*/*: No such file or directory
cp: /data/app/com.google.android.launcher-1 is a directory (not copied).
/data/app/com.google.android.music-2 /system/app/Music2
cp: /data/local/tmp/gapp/lib/arm*/*: No such file or directory
cp: /data/app/com.google.android.music-2 is a directory (not copied).
/data/app/com.google.android.talk-1 /system/priv-app/Hangouts
cp: /data/local/tmp/gapp/lib/arm*/*: No such file or directory
cp: /data/app/com.google.android.talk-1 is a directory (not copied).
/data/app/com.google.android.tv.remote-1
/data/app/com.google.android.youtube-2 /system/app/YouTube
cp: /data/local/tmp/gapp/lib/arm*/*: No such file or directory
cp: /data/app/com.google.android.youtube-2 is a directory (not copied).
---
[Android Software/Hacking General [Developers Only]] osm0sis:
It's pretty clearly stated it's only for Jelly Bean and KitKat currently. ;)

I plan to add support for Lollipop soon and M later when it's released, as soon as I have some more free time. :)
[Android Software/Hacking General [Developers Only]] bgiesing:
Definitely must of missed that... My bad [emoji28]
[Android Software/Hacking General [Developers Only]] chenvaron:
Help with locked N9

Hi,

(please pardon my ignorance, this is all somewhat new to me)

I had my N9 bricked, by a recent OTA update (from LMY47X), into the GDBOD (Google Dancing Balls of Death).

So can't go back in time and enable OEM unlock in Dev options... My device is currently listed as locked.

While looking for a why to reverse the situation I came across this post.

I'm able to boot into either FASTBOOT or RECOVERY but I don't understand how to run Nexus BootUnlocker Script from my windows OS (sorry, no LINUX yet).

Any help/referral to a previous post on the subject (tried searching with no success) would be greatly appreciated!

Thanks!
[Android Software/Hacking General [Developers Only]] osm0sis:
You need a custom recovery unfortunately. :(
[Android Software/Hacking General [Developers Only]] chenvaron:
Thanks! Could you point me in the right direction?

How does one go about doing a custom recovery?

I'm one step from giving up on the brick...

Tried TWRP:

target reported max download size of 518205818 bytes

sending 'recovery' (13320 KB)...

OKAY [ 0.795s]

writing 'recovery'...

(bootloader) Device State : Locked

FAILED (remote: Can not flash any images while device state is locked!)

finished. total time: 0.949s
[Android Software/Hacking General [Developers Only]] osm0sis:
Can't be done when locked, you have to RMA. :(
[Android Software/Hacking General [Developers Only]] str8str:
You have to unlock your boot loader and root b4 a custom recovery can be installed and if your not sure on this I would read read read until you fully understand the process or you could make your phone into a heavy paper weight
[Android Software/Hacking General [Developers Only]] osm0sis:
Here's a better, fixed up version of the Android version check, using sdk version instead of build number, adding the SELinux permissive command line while repacking the kernel:

# add SELinux commandline only in KitKat and newer
sdkver=$(mount /system; grep "^ro.build.version.sdk" /system/build.prop | cut -d= -f2; umount /system);
if [ "$sdkver" -ge 20 ]; then
cmdtmp=`cat $split_img/boot.img-cmdline`;
case "$cmdtmp" in
*selinux=permissive*) ;;
*) echo "androidboot.selinux=permissive $cmdtmp" > $split_img/boot.img-cmdline;;
esac;
fi;

Also! [MENTION=1162986]Captain_Throwback[/MENTION]! I discovered init.d working in Lollipop with Enforcing on one of my older implementations still in use on a GN custom kernel and I just figured out why!

Turns out class late_start is more locked down than class main! Changing the service class back to main allows it to at least run on custom ROMs with SELinux enforcing (haven't tested stock yet) so none of the above SELinux trickery is required, you'd just have to add a sleep or an intelligent check to wait for encryption in your scripts!

Now I just need to work on getting script zip signing working with Java 8 and I'll upload a new version.

Edit

: Actually late_start was working fine, even on stock Nexus kernel, it was just still too early to run scripts on my test devices! Snippet edited above in the quote and now the SELinux stuff is unnecessary (but I'll leave it since it's a good script example). :D :victory:
[Android Software/Hacking General [Developers Only]] TKruzze:
Now that, I'd pay money for! [emoji6]
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah I'm hoping it'll be as easy as recompiling MinSignAPK. :fingers-crossed:

I've also been doing a fair amount of testing trying to get my GApps Integrator script working as desired on Lollipop, and that has been a huge annoyance due to the way the APKs are retained in /data/app still, and Lollipop refusing to recognize the newer files are installed and that they need to be optimized... I tried to implement one of the tricks [MENTION=5849464]mikeoswego[/MENTION] described a few pages back to trigger one but so far it results in quirky behavior from (likely corrupting) the packages.xml in one way or another. I attempted to be more careful with it and remove the entire <package></package> block (rather than just <package> like mike suggested) and it still gets the system confused and downloading GMS multiple times. Got a few more ideas to try like cleaning up /data/app after my edits, but I'm open to suggestions if anyone has gotten something similar working before. :)

[MENTION=1162986]Captain_Throwback[/MENTION] I just did some further testing and it turns out I also had init.d working fine with late_start, I just didn't realize it since the scripts still weren't executing correctly on my N5; it wasn't an SELinux denial just a complaint about the filesystem not being ready I think, so late_start was still too early. I added sleep 2 to the beginning of the quoted sh service command and now I've even got it working on stock ROM kernel. :highfive:
[Android Software/Hacking General [Developers Only]] mikeoswego:
I've never gotten back to my effort on this. I noticed that on the apps where my method was failing and either causing the app to fail or be redownloaded multiple times, there was a "KEY" value in the definition for the newer version of the app where I had deleted the entire definition for the newer app from packages.xml. Apps without that "KEY" value could be reintegrated without problems.

To be clear, what my script was doing (and maybe not in the one I posted here) was to remove the entire <package></package> block and then update the <updated-package> </updated-package> entries to removed the "updated-" part for that app. I didn't get around to trying to integrate any "KEY" value from the newer package entry into the original package entry in packages.xml.
[Android Software/Hacking General [Developers Only]] osm0sis:
Looks like I had MinSignApk working on my setup (JRE 1.8.0_60) all along, it was just a Cygwin update to cp doing something weird to the resulting file permissions that made me think it was broken! Resolved it in my local signing script, signed and tested; updated Kernel init.d Injector AK2 zip is now up in the OP. :D

Please remember to Thank the OP if you haven't already!

Edit

: Ughh and it stopped working on Marshmallow, hopefully just a side effect of not having root on an SELinux Enforcing kernel.

Edit 2

: Yeah, works mostly now again with SuperSU v2.52 and the modified boot.img's currently in use. So presumably that'll only continue to improve as Chainfire irons out the details of rooting Marshmallow going forward. :good:
[Android Software/Hacking General [Developers Only]] osm0sis:
Not too far back someone wrote me in a PM or another thread to say ADBsync sdcard Backup wasn't working in Windows 10, but I've just updated to Windows 10 and it seems to work great as always! Maybe whoever it was will see this and produce some more information for their use case so I can help. :)

Edit: Sidenote - [MENTION=5849464]mikeoswego[/MENTION], I just worked this out:

hextc() { date --date="@$(printf "%d\n" 0x$1 | rev | cut -c 4- | rev)"; }

It will convert the numbers of ft, it & ut from packages.xml into human-readable date+time. :)

Turns out they are time since epoch, plus 3 trailing zeroes (for some reason - futureproofing?), converted into a hex number.
[Android Software/Hacking General [Developers Only]] mikeoswego:
Nice function! I haven't had time to do anything further with GApps reintegration so I'm glad that you're still looking at it.
[Android Software/Hacking General [Developers Only]] skulldreamz:
Thank you so much for this incredible progress you are making for vanilla aosp. Can't wait to test this out on my nexus 5X in a couple days when it arrives!
[Android Software/Hacking General [Developers Only]] osm0sis:
Awesome! Just remember GApps Auto-Integration will break OTA functionality since it's changing system files and all the new Nexus devices are pretty strict about that with their block image updates. :) :good:

And of course, backup first, and use at your own risk, since it depends on root, init.d/su.d and SELinux behaving correctly on each particular device and setup.
[Android Software/Hacking General [Developers Only]] mikeoswego:
Here are some initial results on a MotoX Victara running CM12.1

Log:

## GApps Auto-Integration Script Log

Wed Oct 21 14:37:41 EDT 2015
/data/app/com.android.vending-1 /system/priv-app/Phonesky (80391200 > 80381100)
/data/app/com.google.android.apps.chromecast.app-2
/data/app/com.google.android.apps.docs.editors.docs-1 /system/app/EditorsDocs (54120735 > 53920836)
/data/app/com.google.android.apps.docs.editors.sheets-2 /system/app/EditorsSheets (54120735 > 53920836)

I've rebooted 3 times and this is all that has appeared in the log. PlayStore and Docs are re-integrated, Sheets is not. The directories in /data/app are still in place, there is an "integrated" file in both /data/app/com.android.vending-1 and /data/app/com.google.android.apps.docs.editors.docs-1 but not in /data/app/com.google.android.apps.docs.editors.sheets-2

ls /data/app/ | grep -E 'com.andro /data/app/ | grep -E 'com.android|com.google.android' <
com.android.vending-1
com.google.android.apps.chromecast.app-2
com.google.android.apps.docs.editors.docs-1
com.google.android.apps.docs.editors.sheets-2
com.google.android.apps.docs.editors.slides-1
com.google.android.apps.gmoney-2
com.google.android.apps.magazines-2
com.google.android.apps.translate-1
com.google.android.apps.walletnfcrel-2
com.google.android.deskclock-1
com.google.android.gm-1
com.google.android.gms-1
com.google.android.inputmethod.latin-1
com.google.android.keep-1
com.google.android.maps.mytracks-1
com.google.android.music-2
com.google.android.play.games-2
com.google.android.street-1
com.google.android.tts-1

Not sure it's relevant; I see these lines in dmesg:

<5>[ 4.841675,1] type=1400 audit(2041622.260:4): avc: denied { read } for uid=0 pid=240 comm="ls" name="app" dev="mmcblk0p39" ino=425368 scontext=u:r:sysinit:s0 tcontext=u:object_r:apk_data_file:s0 tclass=dir permissive=0
<5>[ 4.846886,2] type=1400 audit(2041622.270:5): avc: denied { search } for uid=0 pid=242 comm="mount" name="block" dev="tmpfs" ino=8079 scontext=u:r:sysinit:s0 tcontext=u:object_r:block_device:s0 tclass=dir permissive=0
<5>[ 4.846989,2] type=1400 audit(2041622.270:6): avc: denied { remount } for uid=0 pid=242 comm="mount" scontext=u:r:sysinit:s0 tcontext=u:object_r:labeledfs:s0 tclass=filesystem permissive=0
<5>[ 4.871789,2] type=1400 audit(2041622.290:7): avc: denied { remount } for uid=0 pid=245 comm="mount" scontext=u:r:sysinit:s0 tcontext=u:object_r:labeledfs:s0 tclass=filesystem permissive=0

And not unexpected in logcat:

W/PackageManager( 783): Failed to parse /data/app/com.android.vending-1: Application package com.android.vending already installed. Skipping duplicate.
W/PackageManager( 783): Failed to parse /data/app/com.google.android.apps.docs.editors.docs-1: Application package com.google.android.apps.docs.editors.docs already installed. Skipping duplicate.

I don't see anything else that looks relevant.

Attached is my packages.xml in case that is helpful.
[Android Software/Hacking General [Developers Only]] osm0sis:
Sounds like root isn't working 100% for your init.d setup so it's failing to mount /system, etc. Try su.d instead?
[Android Software/Hacking General [Developers Only]] mikeoswego:
Now that you mention it.. A while back I was trying to do something and couldn't gain write access to /system from init.d scripts on the CM rom. As a side note, in adb shell, CM defaults to read only but at least there it can be remounted r/w by root. I've just posted about this in the Victara CM forum and will see if anyone of the maintainers will respond.

I'll try installing SuperSU in the CM rom so that I can try su.d.
[Android Software/Hacking General [Developers Only]] mikeoswego:
With SuperSU installed, the script worked perfectly. After a couple reboots all the apps were reintegrated, /data/app was cleaned up, etc. The only flaw is bizarre; the log file isn't being created in /sdcard.
[Android Software/Hacking General [Developers Only]] osm0sis:
init.d or su.d? If one, try the other. It sounds kind of like what I've encountered so far trying to get my init.d Injector working on Marshmallow.
[Android Software/Hacking General [Developers Only]] mikeoswego:
I installed SuperSu so that I could create an su.d directory and run the script from there and yes, the lack of log in /sdcard appears to be the same problem as in the post you linked to. This is with SuperSU 2.52 beta.

I am unable to get the script to even run from init.d with SuperSU installed.

More bad news; GMail is being deleted. It appears that after a run of the script, GMail seems to be a system app according to Titanium Backup. GMail did something strange, it synced a pop3 account that is set to never sync (and the setting to not sync was still set.) Then after a reboot, GMail had been deleted.

I restored from backup, tried the script again, and the same thing happened again. I suppose it is going to take a lot more logging to figure this out and CM is fighting that along with the mounting of /system r/w.

I'll try this on the stock based ROM that I maintain and see what kind of results I have there.
[Android Software/Hacking General [Developers Only]] mikeoswego:
On the Motorola 5.1 based ROM which does not have init.d support, rooted with SuperSU 2.49 the reintegrator script seemed to work fine from su.d but no logging. Since files are being manipulated in both /system and /data, maybe there could be a test to see if the log was created in /sdcard and if not it could be put somewhere else.

After integrating, PlayStore wanted to update Docs, Slides, Sheets, and Drive even though I thought it had already done those apps prior to installing the script (after TWRP restoring this ROM from a backup made 3 weeks ago.) I allowed that to happen and did some more reboots. All apps seem to be working fine, but the following directories still exist in /data/app with no "integrated" file in them:

com.google.android.apps.docs.editors.docs-1

com.google.android.apps.docs.editors.docs-2

com.google.android.apps.docs.editors.sheets-1

com.google.android.apps.docs.editors.sheets-2

com.google.android.apps.docs.editors.slides-1

com.google.android.apps.docs.editors.slides-2

I deleted those folders manually with no ill effect. GMail integrated fine without the side effects that occurred with the CM rom.

This is definitely progress toward reintegrating the GApps!

Perhaps this script could be run in a TWRP flashable zip and people could just run it when they felt like it, preferably after a fresh backup; avoiding any problems with timing, /sdcard access, etc.
[Android Software/Hacking General [Developers Only]] brux4me:
great backup tool for the phone. simple customizable and time saving. thanks.

if l just want to backup a few folders, it seems a little un automatic, as i understands, it defaultly backup all folders, and have to manually add ignored folders, so if there a lot of folders, and i just want to backup a few specific ones', is there a better way ?
[Android Software/Hacking General [Developers Only]] osm0sis:
Maybe for that use case you'll want to look for more of a cloud based sdcard folder sync app. Some even let you sync with Samba/Windows shared folders directly across your home network.
[Android Software/Hacking General [Developers Only]] gialakias:
Use this one, is great with encryption too! https://play.google.com/store/apps/details?id=com.semaphore.drivesyncrypt
[Android Software/Hacking General [Developers Only]] brux4me:
<br />

<br />

Maybe for that use case you'll want to look for more of a cloud based sdcard folder sync app. Some even let you sync with Samba/Windows shared folders directly across your home network.[/QUOTE]

ok thanks anyway. it takes some extra time to add ignored folder lists at the first few times, but after that, it is efficient.

---------- Post added at 10:56 PM ---------- Previous post was at 10:53 PM ----------

thanks for this.
[Android Software/Hacking General [Developers Only]] osm0sis:
I'm making some progress on building my own busybox in Cygwin for each Android architecture!

Between this: http://blog.droidzone.in/2012/11/30/compiling-statically-linked-busybox-for-android-arm-devices/ where [MENTION=3357461]zeppelinrox[/MENTION] reported success on Cygwin, and this: https://github.com/tias/android-busybox-ndk to weed out a few more erroring applets I think I'm getting somewhere. :)

If all goes well I'll have the new AIK-mobile out by next week some time while I try to make my busybox as feature-filled as I want with patches, etc.
[Android Software/Hacking General [Developers Only]] skulldreamz:
Just curious what you think of this build and if there are too many applets for a "normal" busybox build
[Android Software/Hacking General [Developers Only]] osm0sis:
Well so far a bunch of stuff that tias notes need to be disabled is still enabled in the blog post's .config, and judging by the errors it seems like tias is correct. I'm also seeing a few more I need to remove that have changed since then like I2C*, TELNET*, SYNC and MDEV. Once I chop out all the broken stuff I'll see what I'm left with and if I want more. Ideally, I'd like to have something on par with Stericson, and tias provides a number of patches I can apply which get us close to that.

[MENTION=3357461]zeppelinrox[/MENTION] I'm still having issues with linking and includes from the NDK standalone CCs, any pointers from when you got it working in Cygwin?

Edit: Nevermind, I think I figured it out. I was overcomplicating things with some ldflags pointing to sysroot that apparently aren't necessary/break things. :)
[Android Software/Hacking General [Developers Only]] dasdreHmomenT:
hi and hank you a lot for all the scripts.

I'm having a problem with the gapps integrator on a AOSP ROM, 5.1.1:

init.d didn't work, so I put it in su.d. After that, on the first reboot messenger, maps and store were integrated.

I rebooted again and didn't get the "optimizing..." so I rebooted another time.

Now all my GApps besides the three mentioned above are just gone. Their folders in /data/apps are gone as well. In /system/apps there are folders with apks inside, but they are not installed (and can't be installed by opening them - parsing error).

The only outlier is Play Services which stayed in /data.

No log was created in /sdcard.

Any ideas?
[Android Software/Hacking General [Developers Only]] osm0sis:
Hmm not sure why there was no log if it was clearly doing something.. Perhaps it was executing too early for /sdcard to be mounted.

Lollipop support is highly experimental at this point as the way the optimization and cleanup works, especially on AOSP (versus Nexus), is drastically different. CM seems to be a no-go, and as for AOSP, it works quite well on my trusty old Galaxy Nexus (minus a few stray /data/app directories that weren't being cleaned) and I've heard others on several devices have it working reasonably well, but I've also heard several reports like your own that it doesn't work on other devices.

There's no rhyme or reason to it I can see so far, honestly the script could use a fresh set of eyes if there's someone else interested in collaborating to bring it the rest of the way for Lollipop and Marshmallow.
[Android Software/Hacking General [Developers Only]] dasdreHmomenT:
thx for the reply, will watch this thread as to any updates on the script because the idea is brilliant.
[Android Software/Hacking General [Developers Only]] smint86:
I'm currently using it on LP with a cm caf ROM on OnePlus One, which works quite okay. Had to put it in su.d, but it's doing its job. Only apps which are not deleted from data/app are:

com.google.android.apps.docs.editors.sheets-2

com.google.android.apps.translate-1

They are mentioned in the log, though. I don't really know why they aren't moved, even after several reboots. Last log is from 2 days ago now, at least 5 reboots in between.

The rest (Maps, Play store, docs, street, YouTube) are moved correctly. I'm unfortunately not that good in scripting, but could ship in logs if you need.

Swyped via Tapatalk