yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device General] churchrickshaw:
[MENTION=4695495]moly82[/MENTION] & [MENTION=4206150]Black Plague[/MENTION]

The on body detection is a feature that exists even on AOSP and CM roms, it was a Google feature found under Settings > Security > Smart Lock. I think it might be part of the framework so it won't exist in the apps or priv-apps folders.

The feature is suppose to know when you've placed the phone down on a flat surface and then lock it. If it's in hand or on body, it will stay unlocked.

[MENTION=1685993]TheRealsaad[/MENTION]if you post your stock listing of apps and priv-apps then maybe someone here can help determine which apps shouldn't have been removed. You can use moly82's method in the previous post to ls > txt the directories.
[Sony Cross-Device General] Black Plague:
@Cow07

Bro its there after several restart I dont know how it came zZZZ
[Sony Cross-Device General] sewb:
Does that mean I can flash it over existenz y?

Mega is works fine for me:)
[Sony Cross-Device General] FcukBloat:
so strange! really don't know what it can be so... don't think the problem is something deleted with the script (why should it give bootloop in z1 and not in other phones?! :eek: ), so maybe it is something else of the extras....?! btw will post soon a debloat script only, very small and so very clean, if you want and will try it we can be sure if the problem is the debloating itself or the extras... sorry again mate! :crying:

ah ok thanks good to know! so yes it must be there if it is in the FW you use! :)

yes it should work fine as it will be only (re)moving stuff, but existenz is not debloated already?
[Sony Cross-Device General] sewb:
Great. Maybe it is. Haven't tried it really yet. Flashed another rom instead.. I'll check that, thanks
[Sony Cross-Device General] FcukBloat:
ok so this is the debloat script cleaned of all the other stuff (and VPN pacakge is not removed anymore)

https://www.dropbox.com/s/ayhystodeinkwtc/Bloatware_Removal.zip?dl=0

or

https://mega.nz/#!zQRzWTAS!tWW3rqVs69NCZPXupbdjcb-iKSuqtKzJqWsj_17HfO0

...this will just debloat and nothing else, so it should be 100% safe?

if you want to try it, and if you are already on LP 5.0.2, you can just flash the above linked zip, and it should just debloat your LP install. don't see why it should give a bootloop. if you try it, please report, so in case it works I will update OP accordingly, with debloat zip only and then an optional extra package ;)

you can try flashing the above on top of existenz, it should work fine.
[Sony Cross-Device General] sanogueralorenzo:
[MENTION=4695495]moly82[/MENTION] the googleplay services battery drain fix I was asking about: http://xdaforums.com/google-nexus-5/general/script-google-play-services-battery-t3059585

btw, what is the new Bloatware_Removal.zip you just posted? To try and solve the bootloops from the z1? Should every user install this?

there is also memory leak of bootanimation in lollipop: http://www.phonearena.com/news/How-...sibly-speed-up-your-devices-boot-time_id66233

It says it more noticeable in devices with less than 2GB of ram.
[Sony Cross-Device General] FcukBloat:
I heard about that drain but in the past and about a old version of gms.. really doubt it is still present in latest versions and need to be applied.. also, I have phone always entering correctly in deep sleep according to cpu spy ;)

about the memory leak, what I understood is that sony fixed it already in their fw.... can someone confirm? if that is not true, I can maybe include it... (just applied the fix in my phone in the meantime and didn't see any problems in the bootanimation, don't know if it really fixed anything though :p )

I changed OP as I splitted scripts: one only for debloating, the other to install extras and other optional things as suggested by someone ;) and one more to restore all things changed that could be dangerous in some phones like z1 (stock bootanimation, permissions.xml etc). so you can see now new approach in OP, that should also help understanding/fixing bootloop problem.

not really needed to do anything if you applied previous script(s) ;) (only differences are that I restored vpn apk and removed ims aurora)
[Sony Cross-Device General] churchrickshaw:
[MENTION=1268645]Sweb[/MENTION], existenzy is not heavily debloated like this one. He includes a lot of stuff in his rom though so I wouldn't use a debloat script. I'd just manually cut and paste these out of the apps or priv-apps folder (just like how this script does) and monitor the phone after. Existenzy is a full featured rom so debloating could break stuff.

[MENTION=5999802]sanogueralorenzo[/MENTION] that drain was fixed on Sony's FW. That bootanimation leak was for stock Google roms. They've basically used a different and smaller bootanimation. You could do the same to cut down on the animation time, but there's no leak in the current one from Sony.

Thanks [MENTION=4695495]moly82[/MENTION] for splitting these things up! I think I was the one that asked for it originally lol. It's rare that you get a contributor that's willing to consider suggestions so quickly and to help one or two users who have specific issues with their phones.

[MENTION=1685993]TheRealSaad[/MENTION] if you're still planning on installing the script (should try again! moly82 changed quite a bit of stuff for you) and if it still fails with the new version, could you try installing superusermode? maybe something that moved out requires some sort of signature check? I don't have your phone so I'm throwing some ideas out there. I think the plain debloat script should really work though!
[Sony Cross-Device General] ThaRealSaad:
So now I just wipe everything and flash this latest zip you just uploaded? You sure it should work right? because I wan't to settle on one ROM and I don't want anymore bootloops haha.
[Sony Cross-Device General] FcukBloat:
you can do the very base approach, means just debloating, which is safer. I can't assure it will 100% work, but I really guess so!

are you on 5.0.2 already? stock? if so, actually no need to wipe anything, just apply my last script and next reboot you should see some more cleanliness all around :p but I suggest to wipe at least cache and dalvik ;) (of course my zip needs to be flashed on top of a lp fw :D )

which fw base are you using?

btw, if this attempt works, we can then see and maybe proceed further with more cleaning and try also the extras ;)

let me know!
[Sony Cross-Device General] churchrickshaw:
Nandroid back up!
[Sony Cross-Device General] ThaRealSaad:
Yeah man I've always tried your debloat script on the latest stock LP 5.0.2 (14.5.A.0.270) for Xperia Z1 and my bootloader is unlocked too. And I've got a bootloop everytime and everytime I flash a zip I lose the recovery so I have to flash stock .ftf using FlashTool which is a hassle. So now I'm going to settle on my stock rooted firmware because I'm really tired of all the customization. But thanks for the effort and next time I feel bored I will try your latest script method and report back. Thanks!
[Sony Cross-Device General] MightySashiman:
is there a chance all this debloating could be ported to z3 tablet compact ? i have one, and there are barely any prerooted roms available, let alone debloated ones. :'(
[Sony Cross-Device General] Black Plague:
@moly82

bro I have done everything, created clean rom fixed xtp and obd but I left vpn stuff so that I cant connect Psiphon ot hotspot shield, can u please create a flashable zip for this vpn only
[Sony Cross-Device General] FcukBloat:
are you sure you really lost recovery? I mean, here too when I am in a bootloop I can't enter in recovery, but when I force the phone to shutdown, and then switch it on again, I can enter recovery. so forcing shut down, either with long press power button, long press power + vol down button (or vol up) or pressing the reset switch (if you have it in z1, in z3c it is near the sim slot) I can then enter recovery if i remember right...

z3 tablet compact running LP 5.0.2 I guess? if so, I am pretty sure the debloat script could be applied to it too, I mean all sony LP fw should have more or less the same apks... did you try? or send me list of all packages in system/app and system/priv-app so I can check first if they are the same.. (see two pages back how to do that ;) )

no need to create flashable zips, with my approach you just need to move back the vpndialogs folder from the backup location to system/priv-app ;) see OP "restore something" part it is very very easy mate! ;)

and btw in latest version vpn is not removed anymore, so actually you can also reflash your fw and the debloat script immediately later and you will get vpn back... (don't wiping data you are not gonna loose any personal data ;) )
[Sony Cross-Device General] MightySashiman:
Well, I gave it a try :) I actually built a prerooted rom wit PRFCreator from the last stock FTF available for the Z3TC (SGP612, 32Gb Wifi version), superuser zip and dualrecovery zip. your script works perfectly, i followed your instructions in post #1. The only slight issue I found is that the 1080p boot animation doesn't fill the screen interely (the Z3TC screen is FULLHD+ 1920x1200 16:10, slightly taller than strict FULLHD 1080p 16:9). Thanks again for your hard work ! And looking forward to debloating LP 5.1 if it eventually gets released by Sony.

Quick question : is it possible to remove "Music" and "Album" too ? (Sony's camera app seems hardwired to album when it comes to photo reviewing ; can this be changed to, say, googles' photo app ?)
[Sony Cross-Device General] FcukBloat:
good! ;)

considering you spoke of the bootanimation, and the bootanimation is touched only following also the "optional" part in OP, I guess you flashed also Extras_1080.zip right?

if so, you can restore the stock bootanimation (that was working fine I think :p ) very easily ;) just move back the bootanimation.zip file you will find in /system/__Backup/various/bootanimation/ back to its original position ( /system/media ) overwriting the one you will find there. then reboot and let me know! :o

5.1 should come, and hope it will be soon :p (somewhere I did read eta is July...!). will surely work on it too as at the moment I can't use any custom rom around (camera bug :( )... I have never been so long with a stock fw! btw it is working very nice with xposed I like it :good:

for sure you can remove album and music too ;) they are respectively SemcAlbum and SemcMusic in /system/priv-app

if you remove them, I suggest you to follow the script approach, so just move those folders in /system/__Backup/system_priv-app to get rid of them, and then reboot. Be sure to uninstall also any eventual update you may have installed via settings > apps > downloaded though, or after moving out thos folders, you will still see them installed.

just one thing by the way: I would have removed Album, as I don't use it (I use quickpic) but removing it, you can't review pictures anymore from camera! when you will click the small preview in camera, nothing will happen. as you said, it is hardwired someway ;) that's why I didn't include it in the script, otherwise it would be in the debloat list :p

so my suggestion is to keep it along with your favourite image viewer... ;)

no problems instead about music, you can remove it safely (I didn't, as I use it as my favourite music player)
[Sony Cross-Device General] MightySashiman:
THx !

I wonder if the "hardwiring" between sony camera and album apps may be solved with an xposed module. I have not the slightest knowledge in android programming, let alone xposed framework programming, but I this would not be the most difficult module to build...
[Sony Cross-Device General] sanogueralorenzo:
Few links about steadyshot stabilization lost in lollipop:

http://talk.sonymobile.com/t5/Xperi...video-doesnt-work-since-Lollipop/td-p/1008004

http://xdaforums.com/z3-compact/help/steadyshot-intelligent-active-gone-t3106177

do you guys know if this problem has been addressed, the comparison between both kitkat and lollipop is huge!
[Sony Cross-Device General] churchrickshaw:
This has not been fixed. I believe this was dumbed down because of performance issues in LP (overheat, etc). Nothing that this script can do or include.
[Sony Cross-Device General] MightySashiman:
Following up from a post I wrote a while ago, having installed the rom v7, removed the backed up apps (to make space), then updated to v8 with the script, I haven't got apps needed to access the service menu. Would anyone be so kind as to upload the apps required to restore such feature ?

Thx in advance !
[Sony Cross-Device General] FcukBloat:
here you are.. both service menu and qcomriltunnel (the latter to see all info in service menu and avoid delays when opening service menu)

both need to be put in system/app but take care to fix all permissions before rebooting or you will end in a bootloop ;)

https://www.dropbox.com/s/3v2l151xe3fb9fu/serviceMenu.zip?dl=0

ps. i suggest you to copy all stuff in backup folder somewhere (e.g. sdcard) before deleting it from system this way u will have it immediately available in case you decide to restore anything later ;)
[Sony Cross-Device General] MightySashiman:
Thanks !

Ok so I actually rebooted to recovery, mounted the system partition, used the "fix permissions" feature of TWRP. rebooted, bootloop, OF COURSE. damn it. Which "fix permissions" feature were you talking about please ?
[Sony Cross-Device General] FcukBloat:
no mate, don't use that fix permissions. never used it here. i meant you had to manually fix permissions from file manager before rebooting. or use some flashable zips you can find around.

that's why i suggest you to don't remove the backup folder, or if you need space in system, just remove the stuff you are sure you'll never need ;)

when you get bootloop, just enter twrp > advanced > file manager and delete the things you added in system, so you can boot up the phone again.

now you can try this:

https://www.dropbox.com/s/ckuxhxz9m1adieg/restore.zip?dl=0

just open it with 7zip (don't uncompress it), drag in system/app or system/priv-app the things you need, close the zip to save and flash it through twrp and reboot. it should also fix all permissions correctly.

let me know bye!
[Sony Cross-Device General] churchrickshaw:
[MENTION=4695495]moly82[/MENTION] was there anything that I should be doing to get bookmarks to sync with the aosp browser? Doesn't seem to work
[Sony Cross-Device General] dark.blue:
sorry if this dumb question.

is this scrip flashable for KK stock?
[Sony Cross-Device General] FcukBloat:
you mean your chrome desktop bookmarks? if so, they sync fine here. just need to go to account > google > sync browser (I have auto sync off so I do that manually)

do you have ChromeBookmarksSyncAdapter in system/app?

no it is for LP, I used to debloat kk too but I always did it "on the fly", didn't write a list for it..
[Sony Cross-Device General] churchrickshaw:
OK got it to work. Had to get a new copy of the files from your latest extras zip. Flash doesn't work though...
[Sony Cross-Device General] FcukBloat:
Yes it seems flash doesn't work with all phones and never tested it here actually..if you confirm it doesn't work i'll remove the relevant libs from the zip :)
[Sony Cross-Device General] churchrickshaw:
Seems like this aosp browser (or version?) doesn't play videos on some sites that are flash based. I realized that other aosp based browsers such as Asus and HTC does a better job at getting the html5 version of the video. However, neither if them sync bookmarks.

I also tried the 5.1 aosp browser and it works better with videos and certain flash content as well. I couldn't get bookmarks syncing to work though and it seems to not have incognito mode.

Flash does work with the phone but I had to delete your libs and install the flashplayer.apk and use Dolphin browser but that doesn't sync bookmarks either.

I'm going to look for the latest 5.0.2 and 5.1 and test again. At this point though, it seems like the flash libs are useless. I may keep the dolphin setup just for those sites that are entirely made of flash.
[Sony Cross-Device General] MightySashiman:
Sooo I'm back again begging for help. I did a stupid mistake :

I wanted to get rid of that background defocus thing of Sony's.

With my file manager (Solid Explorer 2), I browsed to the priv-apps folder, and cut-pasted /system/priv-app/bgdefocus folder to /system/__Backup/system_priv-app.

But, I'd forgot to check if this app had been updated through the Play store, which, oh how surprising, it had.

So in the play store, i tried uninstalling background defocus. It stayed in "uninstalling..." stage forever.

At some point, I decided to just kill the play store process.

I copy-pasted the /system/__Backup/system_priv-app/bgdefocus folder back to /system/priv-app/

Re-opened the play store, and strangely, Background defocus doesn't appear as installed at all.

So I went back and removed /system/priv-app/bgdefocus (still preserving the backed-up version)

The Background Defocus app still showing up in the launcher's app menu, i decided to reboot my phone to let Android put things straight.

Boot loop.

From the recovery (TWRP), I've tried restoring /system/__Backup/system_priv-app/bgdefocus folder back to /system/priv-app/

Still bootloop.

I've also checked in /system/app that there is no bgdefocus laying around.

The "fix permissions" in TWRP doesn't seem to do anything relevant.

I think the best thing to do is, through the file manager of the recovery, manually remove this damn bgdefocus thing completely (app / cache / data / anything else ?) but I'd love some input from you guys as to what to do to defck my phone.

It's a pain Android is so sensitive. I wonder what's so critical about a random non-critical app which would trigger a reboot.

Thanks so much in advance for you insight.
[Sony Cross-Device General] FcukBloat:
wow mate you did a pretty mess :D you did touch too much /system.... btw strange you got a bootloop if you deleted the bgdefocus from /system...

btw, after removing the one in /system/priv-app, you just needed to delete the one in /data/app as well..... that's all!

actually the best would be uninstall it first from downloaded apps in settings (no play store) so you can also delete its data (this way you delete the one in /data), and then delete/move away the one in /system....
[Sony Cross-Device General] MightySashiman:
there wasn't any thing in /data/app related to bgdefocus strangely (or hidden under some weird name then).

I finally gave up and reinstalled my whole damn phone, with your prerooted rom + debloat script, and had to go through the whole setup / app install process. :rolleyes:

My main frustration is not having being able to understand why this damn bootloop, because there doesn't seem to be any boot log in Android.

Do you know of a good website/ document which explains android paradigm of app updating through the play store ? (especially for system apps for which the original version is never deleted)
[Sony Cross-Device General] FcukBloat:
in /data it will not be called bgdefocus, but something like com.sonymobile.xxxxxx (in this case com.sonymobile.backgrounddefocus ;) )

btw if you can't find it, just uninstall it from settings > app !

dunno of particular websites, but it is very easy, I mean in case you update from play store apps originally placed in system, you will have a relevant folder for that app in both /system and /data/app...

ps. if you had a bootloop very problably the problem was in /system, so why you did a clean install? you could just wipe system and repeat the steps in OP, overwriting all the /system partition and leaving /data untouched, this way next boot you could have all your data back again, no need to setup and reinstall anything...!
[Sony Cross-Device General] mj084:
Happy Birthday Mate:beer:
[Sony Cross-Device General] FcukBloat:
many thanks buddy!! :o :good: [emoji14]
[Sony Cross-Device General] ondrejvaroscak:
Don't forget you need to wipe Dalvik/cache any time you remove or relocate any app no matter if system, privileged or user.
[Sony Cross-Device General] neol23:
If you are restoring with copy / paste from backup folder, you need to set the following permissions for restored folders:

And each file should have:

I do not see it mentioned in the Op.

...

Not true, simple reboot is sufficient ;).
[Sony Cross-Device General] cashflow67:
Hi [MENTION=4695495]moly82[/MENTION] I have read your instructions but I wonder something. Why you wrote made a full wipe? I'm already xperia Z1 .270 FW. Locked bootloader and stock kernel. Why wipe system?
[Sony Cross-Device General] FcukBloat:
yes you are right if you are on lp already and you are not going to flash a pre-rooted fw, but keep the existing one, you must NOT wipe system! will correct it soon thanks :o
[Sony Cross-Device General] cashflow67:
No problem mate. I flashed Roms into my phone 20 times in a month and I made a master degree :D

Thanks for your effort. I've already debloated my ROKZL v.3.1 ROM due to I dont use any sony and google apps except for music,album, google play store and google play services. I flashed your script and it seems nothing happened :D
[Sony Cross-Device General] FcukBloat:
lol but take care some things are "hidden" in settings (intelligent gestures, connectivity things etc) or stuff like overlays you won't notice at all so you may not notice immediately :o btw did you check the spreadsheet file linked in OP? there you can see all things i removed ;) :)
[Sony Cross-Device General] cashflow67:
Yes I checked but I think it is still insuffient :D What's new is there. And pls make a pre-rooted ultra lite rom :(

No one thinks that and we have to debloat after flash :(

---------- Post added at 01:42 PM ---------- Previous post was at 01:40 PM ----------

And my friend [MENTION=4695495]moly82[/MENTION] I want to ask you. Can you debloat more? For example make an another script which is extra debloated?
[Sony Cross-Device General] FcukBloat:
so i think the script was not effective ;) what's new should be removed.. maybe in z1 fw packages are named differently.. see screenshots in OP where you can see the only apps that should be present in drawer after applying my script, if you have more things then something didn't work ;)

ps. if you post a list of all the packages you have in app and priv-app will check! ;)

can't make ultra lite rom for z1, i have z3c.. and when 5.1.1 is out will probably do that for z3c :o

to debloat more is not so easy, I've removed almost everything i could except for packages related to stock keyboard and launcher that are probably needed by many and the camera addons that i may need sooner or later..!
[Sony Cross-Device General] cashflow67:
Delete

---------- Post added at 02:37 PM ---------- Previous post was at 02:35 PM ----------

@moly82 Just let me teach how to list these system apps on my rom. I will provide a log, but I dont know how to do it :(
[Sony Cross-Device General] FcukBloat:
for example via terminal with:

ls /system/app > /sdcard/sysapps.txt

and

ls /system/priv-app > /sdcard/privapps.txt

;)
[Sony Cross-Device General] cashflow67:
I did it but it says Is not found
[Sony Cross-Device General] FcukBloat:
LS?
[Sony Cross-Device General] basti2909:
[MENTION=4695495]moly82[/MENTION]

Looking forward for 5.1 update :=)
[Sony Cross-Device General] FcukBloat:
soon I think :p
[Sony Cross-Device General] FcukBloat:
good news changes in 5.1.1 are very minimal so the debloating script can be flashed already in 5.1.1 and it will work fine, just tested ;)

will just add a few apks in the script I see they added in the FW, an updated script will come soon, but in the meantime you can already flash the one in OP if you want and you will already get a very clean 5.1.1 intall! ;)
[Sony Cross-Device General] framerper2:
Looking forward to it! Thank you for all your hard work!
[Sony Cross-Device General] iffiscb:
Can i use it on my c6603 UB/LP. 454 rooted with philz touch recovery?
[Sony Cross-Device General] FcukBloat:
updated script ready and 100% working with lp 5.1.1 will upload it tomorrow ;)

yes as long as it is lp 5.0.2 or 5.1.1.. but wait tomorrow for updated files ;)