FORUMS
Remove All Ads from XDA

XPOSED Bootloops in Lollipop

1,517 posts
Thanks Meter: 1,162
 
By ondrejvaroscak, Senior Member on 18th April 2015, 12:05 AM
Thread Closed Email Thread
Fix found and released:

http://forum.xda-developers.com/show...php?p=60454547

Downloads & instructions: http://forum.xda-developers.com/show....php?t=3034811

Discussion & Q&A:http://forum.xda-developers.com/xpos...lipop-t3030118

I asked moderator to close this thread as issue was fixed by releasing new version of Xposed framework. Please send your further questions and post to respective thread.


This thread is about my findings experimenting with Xposed framework. My work is my own research, with information based on work of other members, especially @serajr , @moly82 and others. If I forgot to mention, just PM.

My work is based on Z3 D6603 stock firmware version .690 customized DE, locked bootloader.

Backgroud:
As many of you experienced, Xposed currently causes difficulties on 5.0.2 Lollipop. Xposed causes random bootloops, that are seemingly removed by debloating stock ROM and removing number of user and system APKs. However, root cause was not determined. My goal was to find out, which applications specifically cause incompatibility with Xposed.

My configuration:
Xperia Z3 D6603, firmware 23.1.A.0.690 Customized DE (provider 1&1)
SuperSU PRO 2.46
XZDR v. 2.8.11 Attempt 4
Xposed Alpha 2 - xposed-arm-20150308

Final finding:
Xposed bootloops are not caused by specific application
, or combination of applications. All applications included in DE stock ROM, including but not limited to Google apps, Sony apps and provider specific apps were compatible with Xposed and caused no bootloops.

Xposed bootloops are caused by number of installed packages. In case of my ROM, if total number of packages registered (pm list packages)was greater than 329, system got into bootloop. That bootloop could be resolved by deleting ANY of applications, no matter wether user app, system or system privileged app. I am not sure, if this number varies depending on firmware version and hardware.

My testing:
I spent more than 10 hours to be sure that results I present are based on true observations.

First, I flashed prerooted .690 in recovery, wiped clean, and reflashed in Flashtool excluding system.
After initial boot, I have installed 2.8.11 XZDR and enabled byeselinux in xzdr.prop.

Then I have run script, removing following apps from the system:

/system/app/AnonymousData
/system/app/AntHalService
/system/app/Backup-Restore
/system/app/BasicDreams
/system/app/Books
/system/app/bootinfo
/system/app/BrowserProviderProxy
/system/app/CityIdPermission
/system/app/ClockWidgets-release
/system/app/com.sonyericsson.xhs
/system/app/com.sonymobile.xperialounge.services
/system/app/cover-widget
/system/app/CrashMonitor
/system/app/CrashMonitorSystem
/system/app/DeviceConfigTool
/system/app/Drive
/system/app/DualShockManager
/system/app/EditorsDocs
/system/app/EnchantedForest
/system/app/ExperienceFlow2LiveWallpaper
/system/app/ExternalKeyboardJP
/system/app/FaceLock
/system/app/Galaxy4
/system/app/gmail-reader-service
/system/app/Gmail2
/system/app/GoogleLyricsPlugin
/system/app/Hangouts
/system/app/HoloSpiralWallpaper
/system/app/HTMLViewer
/system/app/IddAgent
/system/app/IntelligentBacklight
/system/app/IntelligentRotation
/system/app/Keep
/system/app/KeyChain
/system/app/Lifelog-googlePreloadLive-release-2.4.P.1.4
/system/app/LiveWallpapers
/system/app/LiveWallpapersPicker
/system/app/Maps
/system/app/Music2
/system/app/Newsstand
/system/app/NewsWeather
/system/app/NoiseField
/system/app/PartnerBookmarksProvider
/system/app/PhaseBeam
/system/app/phone-usage
/system/app/PhotoSlideshow
/system/app/PhotoTable
/system/app/PhotoWidget-release
/system/app/PlayGames
/system/app/PlusOne
/system/app/RecommendationEngineExtension
/system/app/RemoteControlService
/system/app/SemcSimDetection
/system/app/SemcWarrantyTime
/system/app/sneiaccountmanager
/system/app/SomcCameraWidget
/system/app/SomcDlna
/system/app/SomcMovieCreatorRmm
/system/app/SomcPOBox
/system/app/SomcSketch
/system/app/SonyEntrance
/system/app/Stk
/system/app/Street
/system/app/SyncHub
/system/app/talkback
/system/app/Tasks
/system/app/textinput-chn
/system/app/TopContactsWidget-release
/system/app/TouchBlock
/system/app/UnsupportedHeadsetNotifier
/system/app/Videos
/system/app/VisualizationWallpapers
/system/app/WeatherWidget-release
/system/app/white-balance
/system/app/WikipediaPlugin
/system/app/WirelessControllerManagerService
/system/app/WorldClockWidget-release
/system/app/YouTube
/system/app/YouTubeKaraokePlugin
/system/app/YouTubePlugin
/system/priv-app/AndroidForWork
/system/priv-app/BackupRestoreConfirmation
/system/priv-app/com.bambuser.sociallive
/system/priv-app/CoverApp
/system/priv-app/EnterpriseService
/system/priv-app/Exchange2
/system/priv-app/FBCalendarSync
/system/priv-app/filecommander
/system/priv-app/helpapp
/system/priv-app/InputDevices
/system/priv-app/livewaremanager
/system/priv-app/MyXperia
/system/priv-app/ReadyToRun
/system/priv-app/retaildemo
/system/priv-app/SemcEmail
/system/priv-app/SEMCFacebookProxy
/system/priv-app/SemcTvOut
/system/priv-app/SimlockUnlockApp
/system/priv-app/SmartcardService
/system/priv-app/SnpVUStore
/system/priv-app/SocialEngineCore
/system/priv-app/SocialEngineFacebookPlugin
/system/priv-app/SocialEnginePicasaPlugin
/system/priv-app/SomcHotspot2Settings
/system/priv-app/SomcMirrorLinkManualSwitch
/system/priv-app/SomcMirrorLinkServer
/system/priv-app/SomcMirrorLinkSystem
/system/priv-app/SomcMovieCreator
/system/priv-app/SomcPhotoAnalyzer
/system/priv-app/SomcPodcast
/system/priv-app/SomcSeamlessTethering
/system/priv-app/SOMCTwitterAccount
/system/priv-app/SomcWifiDisplay
/system/priv-app/SonyEntrance2
/system/priv-app/TagGoogle
/system/priv-app/UpdateCenter
/system/priv-app/Velvet
/system/priv-app/VoiceDialer


Then I flashed xposed in recovery, wiped Dalvik & cache and installed Xposed installer & 20MP Superior auto module. Rebooted and ensured that 20MP module really makes 20MP pictures.

Then I started to restore removed apps (I removed apps by simply moving them into "/system/_backup/" directory to retain permissions) in groups of ten, rebooting twice after each restore (first reboot to allow ART to optimize apps, second to ensure all works) and reassured that xposed module still works.

After first bootloop I restarted in recovery and using adb started to remove last restored apps, until I could boot again.

Later I tried to remove and restore different combinations of system and user apps. It has no effect which applications I have removed or restored, as long as I kept number of packages on or below 329.

To ensure that my finding is true and no Sony app is causing problem, I have again flashed vanilla rooted Stock, reflashed xposed and installed 20MP superior auto module. This time, I left ROM as it is, did NOT remove any system app, and only removed following USER apps from /data/app:

co.vine.android-1
com.facebook.katana-1
com.kobobooks.android-1
com.mobisystems.office-1
com.navigon.navigator_select_sony_eu-1
com.oneandone.access.apps.musicplayer-1
com.oneandone.android.weatherwidget-1
com.oneandone.controlcenter-1
com.path-1
com.s.antivirus-1
com.scee.psxandroid-1
com.sony.nfx.app.sfrc-1
com.sony.tvsideview.phone-1
com.sonyericsson.androidapp.torchapp-1
com.sonyericsson.trackid-1
com.sonymobile.androidapp.cameraaddon.infoeye-1
com.sonymobile.androidapp.diagnostics-1
com.sonymobile.smallbrowser-1
com.unitedinternet.portal.android.photo.eue-1
de.einsundeins.smartdrive-1
de.eue.mobile.android.mail-1
de.gmx.mobile.android.mail-1
de.neofonie.smas.client.android-1
de.web.mobile.android.mail-1


Only user apps left in /data/app were NDR Utils and Xposed framework installer.

With this configuration xposed 20MP Superior Auto module worked without any problem.

I started to restore user apps back, and got bootloop after restoring one more application above 329 packages limit.

Later on I tried same with installing apps manually from apks, apps installing from Play store and simply copying apps into /data/app and /system/app and /system/priv-app.

Again and again system got immediatelly into bootloop on 330th package. I found that it has not been affected by size of the apk.

I also tried my hypothesis that it can have something to do with autostarted packages, but ven if I disabled autostart of all packages, situation did not changed. As a rule of thumb, when I installed or moved anything above 329 packages, bootloop.

So good news, there is no need to superheavily debloat and perhaps FCK system, just debloat really safe nonsense like Lifelog etc. Bad news is that number of apps in system is limited with Xposed.
The Following 41 Users Say Thank You to ondrejvaroscak For This Useful Post: [ View ] Gift ondrejvaroscak Ad-Free
 
 
18th April 2015, 12:43 AM |#2  
Jhon998's Avatar
Senior Member
Flag UK - Live in UAE
Thanks Meter: 123
 
Donate to Me
More
But now you should massively debloat your phone to be able to have the most number of installed apps on /data.
The Following User Says Thank You to Jhon998 For This Useful Post: [ View ] Gift Jhon998 Ad-Free
18th April 2015, 01:21 AM |#3  
Senior Member
Flag Durham
Thanks Meter: 338
 
More
I have 301 packages and still got bootloops. I never tried debloating the rom as I use majority. I have tried everything suggested from various threads to no avail. If I have xposed installed without any modules active it's fine, as soon as I activate any module results in bootloop. Good thread to start by the way. I'm on ee UK branded 726 firmware with xzdr 2.8.10
The Following User Says Thank You to mickyw1980 For This Useful Post: [ View ] Gift mickyw1980 Ad-Free
18th April 2015, 01:40 AM |#4  
ondrejvaroscak's Avatar
OP Senior Member
Flag Aachen
Thanks Meter: 1,162
 
More
Quote:
Originally Posted by mickyw1980

I have 301 packages and still got bootloops. I never tried debloating the rom as I use majority. I have tried everything suggested from various threads to no avail. If I have xposed installed without any modules active it's fine, as soon as I activate any module results in bootloop. Good thread to start by the way. I'm on ee UK branded 726 firmware with xzdr 2.8.10

You can start experiment with adb to find out where it will stop to bootloop. Mine was at 329.
First create "backup" folder in partition with NTFS (you can backup to SD card too, but you lose permissions, so it is easier on internal). I used "/system/_backup/" so its first folder to be listed in /system. Then to remove application, I run "mv -f /system/app/AppFolderName /system/_backup/app/". You need to be in su and mounted /system rw (mount -o remount,rw /system). To restore the app you just reverse the command "mv -f /system/_backup/app/AppFolderName /system/app/" and reboot.

I can also see that different apps are reporting different number of packages:

"pm list packages" returns 272 packages, while Titanium backup reports 272 system + 7 user, total 279 packages.

And Android reports "Optimizing 240 packages" after wiping Dalvik/cache in TWRP.
The Following 2 Users Say Thank You to ondrejvaroscak For This Useful Post: [ View ] Gift ondrejvaroscak Ad-Free
18th April 2015, 09:40 AM |#5  
Tonio78r's Avatar
Senior Member
Flag houilles
Thanks Meter: 161
 
Donate to Me
More
@ondrejvaroscak, many thanks I have spent hours of testing without finding anything...
18th April 2015, 09:45 AM |#6  
ondrejvaroscak's Avatar
OP Senior Member
Flag Aachen
Thanks Meter: 1,162
 
More
Quote:
Originally Posted by Tonio78r

@ondrejvaroscak, many thanks I have spent hours of testing without finding anything...

Seemingly I was just lucky to confirm suspicion that some others already had, like @maris__ here http://forum.xda-developers.com/show...4&postcount=35
18th April 2015, 10:08 AM |#7  
luminoso's Avatar
Senior Member
Thanks Meter: 81
 
More
This is an amazing research!
18th April 2015, 11:31 AM |#8  
robertogl's Avatar
Senior Member
Flag Pugnello, Italy
Thanks Meter: 683
 
Donate to Me
More
Quote:
Originally Posted by ondrejvaroscak

This thread is about my findings experimenting with Xposed framework. My work is my own research, with information based on work of other members, especially @serajr , @moly82 and others. If I forgot to mention, just PM.

Could you post that on Rovo's Github? I can do for you, if you want.
The Following 2 Users Say Thank You to robertogl For This Useful Post: [ View ] Gift robertogl Ad-Free
18th April 2015, 01:55 PM |#9  
Tonio78r's Avatar
Senior Member
Flag houilles
Thanks Meter: 161
 
Donate to Me
More
Quote:
Originally Posted by ondrejvaroscak

Seemingly I was just lucky to confirm suspicion that some others already had, like @maris__ here http://forum.xda-developers.com/show...4&postcount=35

Effectively, we have now isolated the problem, that's the point
18th April 2015, 01:57 PM |#10  
AndroPlus's Avatar
Senior Member
Flag Kyoto
Thanks Meter: 3,993
 
Donate to Me
More
There's "Too many open files" error when bootloop (I uploaded log on Github, so maybe rovo knows?), so I think it should be the error we have to get over.
I found changing limit can fix the error on linux, so I changed default limit to 4096 in kernel (default was 1024).
If someone has time to test, please try this custom kernel for Z3 (unlocked bootloader needed)
http://x.androplus.org/1DSSBHH
The Following 8 Users Say Thank You to AndroPlus For This Useful Post: [ View ] Gift AndroPlus Ad-Free
18th April 2015, 03:33 PM |#11  
hispanico957's Avatar
Senior Member
Thanks Meter: 344
 
More
Quote:
Originally Posted by AndroPlus

There's "Too many open files" error when bootloop (I uploaded log on Github, so maybe rovo knows?), so I think it should be the error we have to get over.
I found changing limit can fix the error on linux, so I changed default limit to 4096 in kernel (default was 1024).
If someone has time to test, please try this custom kernel for Z3 (unlocked bootloader needed)
http://x.androplus.org/1DSSBHH

And if this is correct line... for bootloader locked, it nedd change xposed.prop ??
...and in which way i can count number of app installed (without to do wipe cache that show on boot how many apps are rebuild ?)

Hispa
Thread Closed Subscribe to Thread

Tags
bootloop, lollipop, xperia, xposed
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes