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.
But now you should massively debloat your phone to be able to have the most number of installed apps on /data.
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
mickyw1980 said:
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
Click to expand...
Click to collapse
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.
@ondrejvaroscak, many thanks I have spent hours of testing without finding anything...
Tonio78r said:
@ondrejvaroscak, many thanks I have spent hours of testing without finding anything...
Click to expand...
Click to collapse
Seemingly I was just lucky to confirm suspicion that some others already had, like @maris__ here http://forum.xda-developers.com/showpost.php?p=60178824&postcount=35
This is an amazing research!
ondrejvaroscak said:
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.
Click to expand...
Click to collapse
Could you post that on Rovo's Github? I can do for you, if you want.
ondrejvaroscak said:
Seemingly I was just lucky to confirm suspicion that some others already had, like @maris__ here http://forum.xda-developers.com/showpost.php?p=60178824&postcount=35
Click to expand...
Click to collapse
Effectively, we have now isolated the problem, that's the point
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
AndroPlus said:
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
Click to expand...
Click to collapse
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
robertogl said:
Could you post that on Rovo's Github? I can do for you, if you want.
Click to expand...
Click to collapse
@serajr already does, but thank you very much.
AndroPlus said:
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
Click to expand...
Click to collapse
Good that you can fix it for custom kernel Now I hope someone can make solution also for Stock people
hispanico957 said:
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
Click to expand...
Click to collapse
you can see number of installed apps for example in Titanium Backup, or you can run in terminal or adb
Code:
pm list packages > /sdcard/installed.packages.txt
copy the created file "installed.packages.txt" to Excel or some editor with line numbering (Notepad++, Geany) and number of lines tells you number of installed packages.
ondrejvaroscak said:
you can see number of installed apps for example in Titanium Backup, or you can run in terminal or adb
Code:
pm list packages > /sdcard/installed.packages.txt
copy the created file "installed.packages.txt" to Excel or some editor with line numbering (Notepad++, Geany) and number of lines tells you number of installed packages.
Click to expand...
Click to collapse
with command from adb shell pm list packages > c:\installed.packages.txt are 483
In Titanium Backup i have:
backup all user apps: 167
Backup all app data system: 324
Backup all user app and data system: 491
.... which is correct ?
Hispa
hispanico957 said:
with command from adb shell pm list packages > c:\installed.packages.txt are 483
In Titanium Backup i have:
backup all user apps: 167
Backup all app data system: 324
Backup all user app and data system: 491
.... which is correct ?
Hispa
Click to expand...
Click to collapse
I am always getting as representative and basing my work on what is reported by package manager (pm list).
hispanico957 said:
with command from adb shell pm list packages > c:\installed.packages.txt are 483
In Titanium Backup i have:
backup all user apps: 167
Backup all app data system: 324
Backup all user app and data system: 491
.... which is correct ?
Hispa
Click to expand...
Click to collapse
Correct one is down there. "Detach user&system apps from market" or under "manipulate data" part, for example "Clear cache for user &system apps"
Upgraded apps
Today I am experimenting with updates.
All system apps, that are installed by ROM in /system are after update found in /data.
They remain registered as system apps, and after upgrade number of apps reported by pm remains unchanged.
However, the app after upgrade has now 2 apks ... one in original location (eg. /system/apps/Maps) and upgraded apk (/data/app/com.google.android.apps.maps-1).
I am not 100% sure about Android booting, but simple logic tells me, that after boot the process finds both packages, but further only loads the updated one in /data. However I dont know, if this further lowers the number of packages that will cause xposed to bootloop, effectively counting Maps as two packages.
EDIT:
So I tried following experiment: Installed fresh Stock, number of packages: 330
Removed non-Sony USER packages only (book reader, antivirus etc.), leaving ALL system apps in place, and following USER apps:
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.diagnostics-1
com.sonymobile.smallbrowser-1
Number of packages: 323
Then I have let Play and Whats new to update all. Together 30 apps were updated. Number of reported packages by pm: 323
/data/app now contained:
com.android.chrome-1
com.android.vending-1
com.bambuser.sociallive-1
com.google.android.apps.books-1
com.google.android.apps.docs-1
com.google.android.apps.docs.editors.docs-1
com.google.android.apps.genie.geniewidget-1
com.google.android.apps.maps-1
com.google.android.apps.plus-1
com.google.android.gm-1
com.google.android.gms-1
com.google.android.googlequicksearchbox-1
com.google.android.keep-1
com.google.android.marvin.talkback-1
com.google.android.music-1
com.google.android.play.games-1
com.google.android.talk-1
com.google.android.videos-1
com.google.android.webview-1
com.google.android.youtube-1
com.mobisystems.fileman-1
com.scee.psxandroid-1
com.sony.nfx.app.sfrc-1
com.sony.tvsideview.phone-1
com.sonyericsson.album-1
com.sonyericsson.androidapp.torchapp-1
com.sonyericsson.extras.liveware-1
com.sonyericsson.music-1
com.sonyericsson.trackid-1
com.sonyericsson.video-1
com.sonyericsson.xhs-1
com.sonymobile.android.addoncamera.timeshift-1
com.sonymobile.androidapp.cameraaddon.infoeye-1
com.sonymobile.androidapp.diagnostics-1
com.sonymobile.backgrounddefocus-1
com.sonymobile.entrance-1
com.sonymobile.lifelog-1
com.sonymobile.moviecreator.rmm-1
com.sonymobile.sketch-1
com.sonymobile.smallbrowser-1
After installing xposed and wiping cache/dalvik number of Optimized packages was: 294
After next reboot: BOOTLOOP
So went to recovery and removed ALL UPDATES (33 apks)
mv -f /data/app/com.android.chrome-1 /data/_backup/app/
mv -f /data/app/com.android.vending-1 /data/_backup/app/
mv -f /data/app/com.bambuser.sociallive-1 /data/_backup/app/
mv -f /data/app/com.google.android.apps.books-1 /data/_backup/app/
mv -f /data/app/com.google.android.apps.docs-1 /data/_backup/app/
mv -f /data/app/com.google.android.apps.docs.editors.docs-1 /data/_backup/app/
mv -f /data/app/com.google.android.apps.genie.geniewidget-1 /data/_backup/app/
mv -f /data/app/com.google.android.apps.maps-1 /data/_backup/app/
mv -f /data/app/com.google.android.apps.plus-1 /data/_backup/app/
mv -f /data/app/com.google.android.gm-1 /data/_backup/app/
mv -f /data/app/com.google.android.gms-1 /data/_backup/app/
mv -f /data/app/com.google.android.googlequicksearchbox-1 /data/_backup/app/
mv -f /data/app/com.google.android.keep-1 /data/_backup/app/
mv -f /data/app/com.google.android.marvin.talkback-1 /data/_backup/app/
mv -f /data/app/com.google.android.music-1 /data/_backup/app/
mv -f /data/app/com.google.android.play.games-1 /data/_backup/app/
mv -f /data/app/com.google.android.talk-1 /data/_backup/app/
mv -f /data/app/com.google.android.videos-1 /data/_backup/app/
mv -f /data/app/com.google.android.webview-1 /data/_backup/app/
mv -f /data/app/com.google.android.youtube-1 /data/_backup/app/
mv -f /data/app/com.mobisystems.fileman-1 /data/_backup/app/
mv -f /data/app/com.sonyericsson.album-1 /data/_backup/app/
mv -f /data/app/com.sonyericsson.extras.liveware-1 /data/_backup/app/
mv -f /data/app/com.sonyericsson.music-1 /data/_backup/app/
mv -f /data/app/com.sonyericsson.video-1 /data/_backup/app/
mv -f /data/app/com.sonyericsson.xhs-1 /data/_backup/app/
mv -f /data/app/com.sonymobile.android.addoncamera.timeshift-1 /data/_backup/app/
mv -f /data/app/com.sonymobile.androidapp.cameraaddon.infoeye-1 /data/_backup/app/
mv -f /data/app/com.sonymobile.backgrounddefocus-1 /data/_backup/app/
mv -f /data/app/com.sonymobile.entrance-1 /data/_backup/app/
mv -f /data/app/com.sonymobile.lifelog-1 /data/_backup/app/
mv -f /data/app/com.sonymobile.moviecreator.rmm-1 /data/_backup/app/
mv -f /data/app/com.sonymobile.sketch-1 /data/_backup/app/
from /data/app, leaving only previously installed user apps (see above).
Wiped Dalvik/cache, number of Optimizing packages was: 261
Reboot is ok, however, the system apps that have been updated and removed are not working, so the system does not returned to the previous versions and pm reported number of packages is 290...
My speculation so far is, that number of packages to bootloop xposed include all packages KNOWN to system, including previously upgraded. So when you had 323 packages and upgraded 30, number of reported packages remains 323 but actually you have 353 packages. Once you remove the 30 upgraded packages from /data, the app is unfuctional adn removed from packages report. However, apk itself remain in /system/app but simply does not work...
Now I will try other way around, moving upgraded apks back to /data and remove their respective previous version from /system ....
profprof said:
Correct one is down there. "Detach user&system apps from market" or under "manipulate data" part, for example "Clear cache for user &system apps"
Click to expand...
Click to collapse
..its 480
Now to see if number 329 its number magic for avoid bootloop i try and report
Hispa
AndroPlus said:
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
Click to expand...
Click to collapse
Great find @AndroPlus!
I applied the patch on my custom kernel and Xposed works perfectly!
Related
I've done the webtop2sd, webtopfix, and installed xfce4 via synaptic. Today I tried to install openoffice from synaptic (along with it's recommended dependencies and extras). I got the following error, which now happens on every package install:
Code:
Setting up openoffice.org-emailmerge (1:3.0.1-9ubuntu3.3) ...
Adding extension /usr/lib/openoffice/basis3.0/program/mailmerge.py...BusyBox v1.10.2 (2010-10-25 17:12:51 PDT) multi-call binary
Usage: mktemp [-dt] [-p DIR] TEMPLATE
Create a temporary file with its name based on TEMPLATE.
TEMPLATE is any name with six 'Xs' (i.e., /tmp/temp.XXXXXX).
Options:
-d Make a directory instead of a file
-t Generate a path rooted in temporary directory
-p DIR Use DIR as a temporary directory (implies -t)
For -t or -p, directory is chosen as follows:
$TMPDIR if set, else -p DIR, else /tmp
dpkg: error processing openoffice.org-emailmerge (--configure):
subprocess post-installation script returned error exit status 1
Setting up openoffice.org-writer2latex (0.5-8ubuntu1) ...
Adding extension /usr/lib/openoffice/share/extension/install/writer2latex.uno.pkg...BusyBox v1.10.2 (2010-10-25 17:12:51 PDT) multi-call binary
Usage: mktemp [-dt] [-p DIR] TEMPLATE
Create a temporary file with its name based on TEMPLATE.
TEMPLATE is any name with six 'Xs' (i.e., /tmp/temp.XXXXXX).
Options:
-d Make a directory instead of a file
-t Generate a path rooted in temporary directory
-p DIR Use DIR as a temporary directory (implies -t)
For -t or -p, directory is chosen as follows:
$TMPDIR if set, else -p DIR, else /tmp
dpkg: error processing openoffice.org-writer2latex (--configure):
subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of openoffice.org:
openoffice.org depends on openoffice.org-writer2latex; however:
Package openoffice.org-writer2latex is not configured yet.
dpkg: error processing openoffice.org (--configure):
dependency problems - leaving unconfigured
Setting up gawk (1:3.1.6.dfsg-0ubuntu1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
I don't know if I really need these packages, and even though I'm an old-timer with Ubuntu (been running since before Jaunty), I'm not as comfortable with dinking around with dpkg and would rather dpkg stop trying to install these every time. Any help would be appreciated.
its a known issuse i dont think it does work n xfce4 i rries it too and it didnr work eather the other type of cusrom webtop it might woek the debian one
i did get gimp to work well
chuck norris aint got **** on this atrix!
That's strange... I have the same setup (Webtop2SD, XFCE4, OpenOffice, and many others) and all is good and dandy...
By webtopfix you mean to fix dependencies?
How big is your EXT partition you installed the Webtop copy through Webtop2SD app?
I created a 4 GB EXT partition to avoid running out of space. I'm not saying that the error you are seeing is because you are running out of space, but could that be the reason?
Also, are you using the latest Busybox release?
Cheers!
Rayan
I created a 4GB partition. Openoffice seems to be working, I've run a few of the apps. I think these are addins that are failing, and it seems to be a busybox issue at that (or perhaps the deb but I doubt it)... And right now I don't know the busybox release.
I also did the chromium install after that and no issue.
I read somewhere that emailmerge doesn't work with webtop, and that's why it keeps doing that. You'll have to remove it somehow... I'm not smart enough to tell you how though.
Kinda doubt this will work:
sudo apt-get purge openoffice.org-emailmerge
Edit: I read your full log. Run webtopscripts again.
Ok, I'll run it again, but I hope this isn't normal to have to run it multiple times after installing things.
Edit: Wow! Either it missed a lot the first time I ran this script, something undid its changes, or it's just reinstalling packages for fun (actually, the first part of the script had a whole bunch of "already installed" messages, so it probably isn't just re-installing).
I've had to run it three or four times as other packages force upgrades. Fixes most issues. Had some packed named ed that can't install or uninstall, removed it by editing its file in /var... something.
Trolling from my ATRIX 4G's XDA premium app, still on the gold medal winner of worst customer satisfaction for the second year in a row! Congrats!
If you can see an app or component inside Sytaptic Manager, you can remove it the same way you installed it. Just select the option to uninstall.
Cheers!
Rayan
On my last rom (Alien v4, Faux 0.22 1.2GHz Kernel, webtop2sd, Webtop v2.3.4, webtopscripts v1.4) I was able to download and install OpenOffice without an issue; but everytime I launched it the webtop-panel would crash. OpenOffice appeared to work fine though. I'll probably install it again here shortly on this FruitCake 2.3.6 setup, installing xfce4 at the moment.
I think the tzdata issue was biting me. I went in and made the recommended change and it finished installing.
viroid said:
On my last rom (Alien v4, Faux 0.22 1.2GHz Kernel, webtop2sd, Webtop v2.3.4, webtopscripts v1.4) I was able to download and install OpenOffice without an issue; but everytime I launched it the webtop-panel would crash. OpenOffice appeared to work fine though. I'll probably install it again here shortly on this FruitCake 2.3.6 setup, installing xfce4 at the moment.
Click to expand...
Click to collapse
It crashes it in debian chroot, but in a normal environment it worked for me.
Trolling from my ATRIX 4G's XDA premium app, still on the gold medal winner of worst customer satisfaction for the second year in a row! Congrats!
Hi all. If anyone is willing to help please assist me, im currently trying to upload cm 7 Morrison files for our beloved Ruth devices. I still haven't figured out how the 2nd init injector works yet.
For all charm users we can always branch the files and delete the MOTO.ROTATOR line for your devices.
If you have time, patients and sh¡t loads of guts please help or add links for me to checkout.
EVEYTHING IS APPRECIATED! :fistbump:
DEV Device: MB511 (deodexed)
Current System: MT27i xICS
Long Live: V9 Ferrari Rom
code.google.com/p/motorola-flipout-files
Ok if anyone know of any other motorola developers please let me know.
DEV Device: MB511 (deodexed)
Current System: MT27i xICS
Long Live: V9 Ferrari Rom
code.google.com/p/motorola-flipout-files
ruth(MB511) sensors in init.mapphone30_umts.rc
# sensor interface
chown compass compass /dev/lis331dlh --> not found
chmod 660 /dev/lis331dlh
chown compass compass /dev/kxtf9 --> found
chmod 660 /dev/kxtf9
chown compass compass /dev/akm8973 --> not found
chmod 660 /dev/akm8973
chown compass compass /dev/sfh7743 --> found
chmod 660 /dev/sfh7743
chown compass compass /dev/akm8973_dev --> found
chmod 660 /dev/akm8973_dev
chown compass compass /dev/akm8973_aot --> found
chmod 660 /dev/akm8973_aot
chown compass compass /dev/airc --> not found
chmod 660 /dev/airc
so ruth(MB511) sensors should be /dev/kxtf9, /dev/sfh7743,/dev/akm8973_dev, /dev/akm8973_aot
but Morrison sensors in libsensors/nusensors.h
#define AKM_DEVICE_NAME "/dev/akm8973_aot"
#define ACCEL_MODE_NAME "/sys/class/i2c-adapter/i2c-0/0-0018/mode"
#define CM_DEVICE_NAME "/dev/proximity"
#define LS_DEVICE_NAME "/dev"
#define LIS_DEVICE_NAME "/dev/lis331dlh"
I think porting Morrison maybe less suitable for ruth
Thanks phc, and yes I know its a long shot, I still haven't gotten to the lib files, let alone hardware. But morrison IS the closest port for us. All the other devices are to advanced for the device. Do a compare between the two, ram is almost identical, chips are close, gpu aswell. Only thing that isnt is screen size. Thanks for the lost, it will come in handy later.
DEV Device: MB511 (deodexed)
Current System: MT27i xICS
Long Live: V9 Ferrari Rom
code.google.com/p/motorola-flipout-files
Hi,
I used jordan-common and MagicDevTeam's MB508([h t t p s : / / github.com/MagicDevTeam) files,
and compiled eclair AOSP to check different files than create ruth device files.
My ROM VERSION:
RUTEM_U3_01.14.16_DEBLUR_SIGNED_USARUTH15ND0RTINT056.0R_PDS000_USARUTHEHKTWEMARA_P011_A010_HWp3_1FF.sbf
My ruth configure files: ruthconfigureforcm7.zip(h t t p s : / / docs.google.com/file/d/0BxgqJrVwRKJqQUlWTWI3SURGU1U/edit)
https://github.com/phchshow/android_device_motorola_ruth
My unstable update file:v0.1.5.zip(h t t p s : / / docs.google.com/file/d/0BxgqJrVwRKJqaXNzRVJDSU95Slk/edit)
V0.5.0.zip
can work:
battd[2013/03/14]
bluetooth
half work:
audio->media codec can't use.
[2013/03/19]solved some media codec running problem, but video recorder codec still has problem (even use low quality).
[2013/03/23]only mp3 and jpg codec is ok, orthers codec has problem, unknow how to solved...
sensors.
fmradio->FMRadioService.apk can't use, but can purchase "Spirit FM Radio Unlocked" to use.[2013/03/15]
camera->[2013/03/18]replace to use MB508's libcamera.so and libcameraservice.so. can take a picture, but media codec has some problem, so can't photograph.
wifi->[2013/03/23]dhcp has problem, but use command to execute is ok.
use mb508's bootmenu/2nd-init/init, solve setprop question, now wifi is OK.
but no softap beacuse can't compile tiap_drv.ko with 2.6.29 kernel.
ril->[2013/03/25]can call, but no sound, seems like audio codec problem.
not work:
battd->log say INIT BATTD SOCKET SERVER: failed. unknow how to solve. update[2013/03/14]:chmod cpcap permission
camera->used mb508's camera library, log say "mapped at 0x4103c000, not at 0xa7900000" can not load library
used ruth camera library, log say CAMERA HAL not support. unknow how to solve.
radio. unknow how to solve.
wifi->when process step 2, /system/bin/wlan_loader -f /system/etc/wifi/fw_wlan1271.bin -i /system/etc/wifi/tiwlan.ini -e /pds/wifi/nvs_map.bin
failed. [2013/03/16]get new question Failed to start supplicant daemon.unknow to solve.
[2013/03/23]gps->Failed to enable location provider
forget test:
fmradio, gps
phchshow said:
Hi,
I used jordan-common and MagicDevTeam's MB508([h t t p s : / / github.com/MagicDevTeam) files,
and compiled eclair AOSP to check different files than create ruth device files.
My ROM VERSION:
RUTEM_U3_01.14.16_DEBLUR_SIGNED_USARUTH15ND0RTINT056.0R_PDS000_USARUTHEHKTWEMARA_P011_A010_HWp3_1FF.sbf
My ruth configure files: ruthconfigureforcm7.zip(h t t p s : / / docs.google.com/file/d/0BxgqJrVwRKJqQUlWTWI3SURGU1U/edit)
My unstable update file:v0.1.5.zip(h t t p s : / / docs.google.com/file/d/0BxgqJrVwRKJqaXNzRVJDSU95Slk/edit)
can work:bluetooth
halt work:
audio->media codes can't use.
sensors.
not work:
battd->log say INIT BATTD SOCKET SERVER: failed. unknow how to solve.
camera->used mb508's camera library, log say "mapped at 0x4103c000, not at 0xa7900000" can not load library
used ruth camera library, log say CAMERA HAL not support. unknow how to solve.
radio. unknow how to solve.
wifi->when process step 2, /system/bin/wlan_loader -f /system/etc/wifi/fw_wlan1271.bin -i /system/etc/wifi/tiwlan.ini -e /pds/wifi/nvs_map.bin
failed. unknow to solve.
forget test:
fmradio, gps
Click to expand...
Click to collapse
How are you flashing the update.zip files, my phone doesnt seem to respond to any of the changes.
hsr0 said:
How are you flashing the update.zip files, my phone doesnt seem to respond to any of the changes.
Click to expand...
Click to collapse
you can use charm Big Bootstrapped Recovery Update to update.
or use bootmenu to update.
update:
if you want use bootmenu,
you can unzip my update zip (v0.1.5.zip).
WARNING: if step fails, may be need reinstall the system. BE CAREFUL.
1. remount system (root)
mount -o remount,rw / /system
2. push bootmenu files
adb push v0.1.5/system/bin/bootmenu /system/bin/
adb push v0.1.5/system/bootmenu /system/bootmenu
3. chmod files permisson (root)
chmod 0755 /system/bin/bootmenu
chmod 0755 /system/bootmenu/binary/*
chmod 0755 /system/bootmenu/script/*
chmod 0755 /system/bootmenu/recovery/sbin/*
4. change mot_boot_mode(original motorola file) (root)
mv /system/bin/mot_boot_mode /system/bin/mot_boot_mode.bin
5. edit mot_boot_mode (root) update(2013/02/08)
/system/bootmenu/binary/busybox vi /system/bin/mot_boot_mode
#!/system/bin/sh
export PATH=/system/bin:$PATH
/system/bin/bootmenu
mot_boot_mode.bin
6. chmod mot_boot_mode permission (root)
chmod 0755 /system/bin/mot_boot_mode
7. reboot and click click click(loop) "vol down" key until show bootmenu screen
Can you post just the bootmenu files?
I have already tried your steps twice but soft bricked the phone.
hsr0 said:
Can you post just the bootmenu files?
I have already tried your steps twice but soft bricked the phone.
Click to expand...
Click to collapse
OK. I re-installed system. And write script name mkbootmenu.sh
unzip bootmenuDIR.zip
adb push bootmenuDIR/bootmenu /sdcard/bootmenu
adb push bootmenuDIR/mkbootmenu.sh /sdcard
in phone side:
$su
#sh /sdcard/mkbootmenu.sh
#reboot
when MOTO LOGO click click click (loop) "VOL - " (VOL DOWN) until show bootmenu screen
NOTICE: only new system or never changed mot_boot_mode can run this script .
thank you very much, it worked!
However I still do not know why it did not run when I executed it although I did a fresh install with RSD lite.
Maybe because I used windows to create mot_boot_mode file, maybe some character issues occured.
but once again thank you!
Will check it in the morning, so far i've modded most of the make files for CM9 and my only worry is the framework.apk but so far so good :thumbup:
Almost forgot! The 2nd init and a modified boot kernel will be the biggest problems.
DEV Device: MB511 (deodexed)
Current System: MT27i xICS
Long Live: V9 Ferrari Rom
code.google.com/p/motorola-flipout-files
https://github.com/plageran/ruth
Good job, man
My Flipout is waiting for a stable CM
ruth device cpu and gpu
As far as I know, flipout and charm have OMAP 3410 CPU inside, this CPU DOESN'T include GPU. Others like OMAP 3430 in Milestone 1 does include Imagination PowerVR SGX535 GPU.
Please check this location on your device with a root explorer app:
/system/lib/egl/
and in there you will find your gpu drivers, also most phones do have gpu's although it only helps the device a little bit.
I know my device has atleast 3 .so files in there and I think thats android drivers. I must just figure out if it should be recompiled for newer versions of android.
xinbada007 said:
As far as I know, flipout and charm have OMAP 3410 CPU inside, this CPU DOESN'T include GPU. Others like OMAP 3430 in Milestone 1 does include Imagination PowerVR SGX535 GPU.
Click to expand...
Click to collapse
Hijack
How did you manage to get the hijack working? I've been struggling my butt off to get the 2nd-init working:highfive:
phchshow said:
you can use charm Big Bootstrapped Recovery Update to update.
or use bootmenu to update.
update:
if you want use bootmenu,
you can unzip my update zip (v0.1.5.zip).
WARNING: if step fails, may be need reinstall the system. BE CAREFUL.
1. remount system (root)
mount -o remount,rw / /system
2. push bootmenu files
adb push v0.1.5/system/bin/bootmenu /system/bin/
adb push v0.1.5/system/bootmenu /system/bootmenu
3. chmod files permisson (root)
chmod 0755 /system/bin/bootmenu
chmod 0755 /system/bootmenu/binary/*
chmod 0755 /system/bootmenu/script/*
chmod 0755 /system/bootmenu/recovery/sbin/*
4. change mot_boot_mode(original motorola file) (root)
mv /system/bin/mot_boot_mode /system/bin/mot_boot_mode.bin
"5. edit mot_boot_mode (root)
vi /system/bin/mot_boot_mode "
#!/system/bin/sh
export PATH=/system/bin:$PATH
/system/bin/bootmenu
mot_boot_mode.bin
6. chmod mot_boot_mode permission (root)
chmod 0755 /system/bin/mot_boot_mode
7. reboot and click click click(loop) "vol down" key until show bootmenu screen
Click to expand...
Click to collapse
plageran said:
How did you manage to get the hijack working? I've been struggling my butt off to get the 2nd-init working:highfive:
Click to expand...
Click to collapse
He basically rewrote the boot script, so while booting up, it opens the bootmenu script and only then does it do a regular boot..
The normal 2nd init installer don't invoke the boot script in the same way I guess and hence it doesn't work.
Well now since bootmenu works, its like a torchlight in an otherwise dark tunnel.
Another point I want to make is that the flipout cm7 update given is in a bootloop. probably I need to change the files for basil (charm).
I think bootloop is audio device (libaudio.so) error. Maybe like when I use MB508's libcamera.so the message log show "mapped at .... " can't load library.
So should be use charm's libaudio.so to recompile CM7 sources. But maybe make some error, like media codec can't use.
hsr0 said:
He basically rewrote the boot script, so while booting up, it opens the bootmenu script and only then does it do a regular boot..
The normal 2nd init installer don't invoke the boot script in the same way I guess and hence it doesn't work.
Well now since bootmenu works, its like a torchlight in an otherwise dark tunnel.
Another point I want to make is that the flipout cm7 update given is in a bootloop. probably I need to change the files for basil (charm).
Click to expand...
Click to collapse
---------- Post added at 10:55 PM ---------- Previous post was at 10:34 PM ----------
The 5 step should be
"/system/bootmenu/binary/busybox vi /system/bin/mot_boot_mode", I forgot no install busybox no vi.
Defy use logwrapper to hijack, but flipout can't.
I think flipout processed init have not execute logwrapper, let we can't hijack logwrapper.
But mot_boot_mode executed.
So I rename mot_boot_mode to mot_boot_mode.bin and write new script name mot_boot_mode. Make bootmenu can execute.
And modify init.mapphone30_umts.rc
"exec /system/bin/mot_boot_mode" to "exec /system/bin/mot_boot_mode.bin", make 2nd-init can success execute init files.
In My uploaded bootmenuDIR.zip, the 2nd-init directory is modify for eclair to use.
You can modify eclair init files to test 2ndinit.
plageran said:
How did you manage to get the hijack working? I've been struggling my butt off to get the 2nd-init working:highfive:
Click to expand...
Click to collapse
What I've learned so far is that most motorola's have the hijacked kernel from the original device, I'm not sure up to what level of Android os this works but if you dig deep enough. Its all almost the same to stock.
I hope you don't mind me using your scripts for my rom, this changed things big time.
Now to get my build machine up and running and to finish my LIB list for CM
edit: has anyone figured out the fingerprint system yet? I haven't found anything about it yet, whether it's generated or copied over.
phchshow said:
I think bootloop is audio device (libaudio.so) error. Maybe like when I use MB508's libcamera.so the message log show "mapped at .... " can't load library.
So should be use charm's libaudio.so to recompile CM7 sources. But maybe make some error, like media codec can't use.
---------- Post added at 10:55 PM ---------- Previous post was at 10:34 PM ----------
The 5 step should be
"/system/bootmenu/binary/busybox vi /system/bin/mot_boot_mode", I forgot no install busybox no vi.
Defy use logwrapper to hijack, but flipout can't.
I think flipout processed init have not execute logwrapper, let we can't hijack logwrapper.
But mot_boot_mode executed.
So I rename mot_boot_mode to mot_boot_mode.bin and write new script name mot_boot_mode. Make bootmenu can execute.
And modify init.mapphone30_umts.rc
"exec /system/bin/mot_boot_mode" to "exec /system/bin/mot_boot_mode.bin", make 2nd-init can success execute init files.
In My uploaded bootmenuDIR.zip, the 2nd-init directory is modify for eclair to use.
You can modify eclair init files to test 2ndinit.
Click to expand...
Click to collapse
hey dude, r you guys still working on flip/charm? any progress to share?
xinbada007 said:
hey dude, r you guys still working on flip/charm? any progress to share?
Click to expand...
Click to collapse
keep an eye on our github pages, i can only update monthly due to cost's. Still need to get and build my build machine lol!
DISCLAIMER: YOU AGREE TO TAKE FULL RESPONSIBILITY FOR YOUR DEVICE IF YOU PROCEED.
The original thread (http://forum.xda-developers.com/moto-g/general/mod-save-data-space-cache-partition-t2942765) was getting to cluttered up with development and testing so I decided to start a new thread with the "finished" product. The original thread will be renamed to Q&A/Development. We might even ask for the old thread to be closed down. (up to @Bert98, the thread's creator.)
Moto G's internal eMMC card has a ~600Mb partition called /cache, which is not used since the apps' cache is stored in /data, so the latter fills up and the first one stays empty.
Owning a 8Gb model, having 600Mb not available for storage really bugged me, because my phone's memory (/data partition) was always full because it's a 5.7Gb space shared between apps and microSD files.
Now, it may not work for you if:
a) you have A LOT of apps installed.
And by "a lot", I mean more than 90-100 apps, but if you have a 8Gb model, you probably don't
b) you're running ART (this is default in lollipop and newer)
Since ART uses a lot more space than dalvik, the space in the /cache partition probably won't be enough. When I was running ART, it used 1Gb more than dalvik.
Original post by @Bert98
Click to expand...
Click to collapse
This was tested on my moto g 16GB which is running RetailUS_4.4.4 kitkat with CWM recovery. The custom ROM procedure was tested on the same phone but with cm11 Nightly installed.
Prerequisites:
1. You must have "adb root" functioning. If you don't head to this thread: http://forum.xda-developers.com/showthread.php?t=1687590 and there is a free download link at the bottom of the post.
Download and install the apk on your phone. Open up adbd insecure (the new app) and grant it superuser rights PERMANENTLY. Check the box that says "enable insecure binary" and make sure to check the box
that says "enable at boot."
2. You must have a recovery that can accept adb shell commands.
3. Root Access Duh?!
4. A windows machine capable of running batch files.
5. A decent text editor, notepad will work but notepad++ is strongly recommended. (Only needed if you are using STOCK ROM procedure)
Please, please make a nandroid backup before you continue!!!!
Stock ROM procedure:
Read the directions very carefully and then read them again, before continuing.
1. Download the cachemover_v1.3.zip from: LINK REMOVED DUE TO SCRIPT ISSUES.
2. Extract the contents.
3. Connect device to PC and navigate to the extracted folder.
4. Double click/Run the cachemover_Stock.bat
5. Follow the onscreen instructions until you get to the part where it says to edit a file.
6. About halfway through the script it will pull a file called "init.qcom.post_boot.sh" to the folder.
7. Open it with a TEXT editor and navigate to about line 487 (Might be different for 8gb model). Look here for a better understanding: https://www.dropbox.com/s/jr5lyl5s5i2jtpg/where to paste code.PNG?dl=0
8. Start a new line and paste this code in the file: (Refer to the image above for help)
Code:
chmod 655 /cache
chmod 655 /cache/dalvik-cache
chmod 655 /cache/dalvik-cache/*
9. Make sure to save the file in the same folder as the cachemover_Stock.bat
10. Press any key to continue on the script and let it do its thing.
11. It will reboot several times and land you on the home screen/lock screen.
12. If the script hangs after a reboot, you need to unlock the device to reestablish a connection with your computer.
13. There might be one or two force closes but once you close the notifications they will not come back.
Custom ROM procedure:
USE THIS FOR ROMS THAT DO NOT REMOUNT OR CHANGE PERMISSIONS OF /CACHE ON BOOT
1. Download the cachemover_v1.3.zip from: https://www.dropbox.com/s/bzj34g4q1s61ojz/cachemover_v1.3.zip?dl=0
2. Extract the contents.
3. Connect device to PC and navigate to the extracted folder.
4. Double click/Run the cachemover.bat
5. Follow the onscreen instructions.
If anything goes wrong:
Go to recovery, wipe cache, then wipe dalvik-cache and reboot. This should get your device back to how it was.
(If you used STOCK ROM procedure)
The script made a backup of the "init.qcom.post_boot.sh" file to /sdcard/init_backup
You can restore the shell script to /system/etc/ via shell commands or by using a root browser. To restore permissions:
Code:
chmod 740 /system/etc/init.qcom.post_boot.sh
chown root:root /system/etc/init.qcom.post_boot.sh
Custom ROM procedure already has a restore script!
I am currently working on an auto restore script for stock and that will be relased soon, hopefully! :good:
Changelog:
v1.0 - First stable release. Does not work on STOCK ROM.
v1.1 - Added a restore script.
v1.3 - Added support for STOCK ROM. There are still a few bugs.
How it works?!?!
Coming soon...
Huge thanks to @Bert98 and @dd043
Hit the thanks button if it worked! I went through about 50 factory resets, and reflashed the ROM about 25 times, and put about 10 hours of work into this script! Really motivates me for future projects. :laugh:
Thanks for your help man and effort.
I encountered a problem, everything works up until my device boots in CWM to fix permissions, then just sits there doing not alot I don't even see the option in my CWM.
Any ideas? cheers
Sent from my XT1032 using XDA Free mobile app
When it reboots to cwm unplug the cable and replug it, if it hangs just type these commands manually from a command window.
chmod 655 /cache
chmod 655 /cache/dalvik-cache
chmod 655 /cache/dalvik-cache/*
reboot
If this does not work you may ned to go into mounts & storage in the cwm menu and click mount /cache. Then try the commands again.
I'm having some issues on stock.
I thought 0655 fixed everything but no, I can't install any app after moving the dalvik-cache to /cache. I tried chmoding 0777 on the new cache folder, on /cache itself, to no avail.
Code:
E/dexopt cannot open '/data/dalvik-cache/[email protected]' for output
Anyone can confirm it's not only my device? And/or can help find a fix?
Also does someone knows how to execute commands on a particular init step? Real init.rc scripts can do:
Code:
on post-fs-data
mount -o bind /cache/dalvik /data/dalvik-cache
It there was a way to achieve the same from post_boot/init.d we could mount -o bind /cache/dalvik /data/dalvik-cache and all permissions issues would disappear as well as the need for symlink.
You have a typo in the threads title. Just a heads up.
Vuciz said:
You have a typo in the threads title. Just a heads up.
Click to expand...
Click to collapse
Thanks for letting me know!
dd043 said:
I'm having some issues on stock.
I thought 0655 fixed everything but no, I can't install any app after moving the dalvik-cache to /cache. I tried chmoding 0777 on the new cache folder, on /cache itself, to no avail.
Code:
E/dexopt cannot open '/data/dalvik-cache/[email protected]' for output
Anyone can confirm it's not only my device? And/or can help find a fix?
Also does someone knows how to execute commands on a particular init step? Real init.rc scripts can do:
Code:
on post-fs-data
mount -o bind /cache/dalvik /data/dalvik-cache
It there was a way to achieve the same from post_boot/init.d we could mount -o bind /cache/dalvik /data/dalvik-cache and all permissions issues would disappear as well as the need for symlink.
Click to expand...
Click to collapse
Let me try and do that right now... Ill get back to you if it does!
My script works on stock btw... But the mount way seems a bit easier and might cause less errors than my way.
Try it please.
skyguy126 said:
Let me try and do that right now... Ill get back to you if it does!
My script works on stock btw... But the mount way seems a bit easier and might cause less errors than my way.
Try it please.
Click to expand...
Click to collapse
Yes I've tried your script, all went well but the result is the same. The script itself works nicely btw
Applications present before moving cache work perfectly, but I can't install anything new. I suspect it might be my device but before wiping everything I'd prefer feedback from others :fingers-crossed:.
I cannot install new apps as well. The mount command you showed me has the same effect too. I honestly don't know anymore, the sym link did not allow the install of new apps nor did the mount command you sent me. Correct me if I am wrong.
Edit: Going through all the init files on my phone to see which one remounts /cache at boot.
Why does the init.rc get overwritten at boot. Is it because the kernel (boot.img) is the one that copies it over? I have found by changing the perms/locations in this file and init.target.rc you can achieve what this mod is trying to acomplish.
I don't see the mount cache command in CWM strange
I've managed to get back to normal, thanks for everyone's help though, I will keep and eye on the thread
Sent from my XT1032 using XDA Free mobile app
non-windows version?
Thanks for this tool. It's a great idea and our Motos really need it.
However, I have a problem - I do not own a windows license (os x and ubuntu user) and I would prefer not to spend $120 just to use it for this script. Pirating is out of the question for me.
I was wondering if there is any chance of having this script written for linux and/or mac. If impossible, is there a LEGAL way of running windows in a virtual machine? Something like a trial or similar?
If you know how just convert it to shell script for osx and Linux. I give you permission to do this but you may not take credit or rehost your creation.
Ok so I have the kernel extracted and we could modify and flash that, but I believe that it's not really necessary. There are a lot of risks to flashing kernels and I am not willing to take it. So is there a way we can modify dalvik so it creates it's cache in /cache instead.
skyguy126 said:
Why does the init.rc get overwritten at boot. Is it because the kernel (boot.img) is the one that copies it over? I have found by changing the perms/locations in this file and init.target.rc you can achieve what this mod is trying to acomplish.
Click to expand...
Click to collapse
Yes the init.rc is in the boot ramdisk. I don't think it would be worth the trouble to rebuild a boot.img. The moto g is fairly unbrickable but it's quite a lot of work to setup an environment to rebuild an image :/.
Too bad for the mount command, I was sure it was working but maybe I had changed something else and don't quite remember the steps to reproduce
We could possibly implement a shell script toggler for when we need to install new apps, but I'm afraid it'd become annoying fairly quickly: I noticed the issue initially because google play services decided to update itself, failed, and broke all google apps. As far as I know this autoupate can't be disabled.
Thanks for trying!
dd043 said:
Yes the init.rc is in the boot ramdisk. I don't think it would be worth the trouble to rebuild a boot.img. The moto g is fairly unbrickable but it's quite a lot of work to setup an environment to rebuild an image :/.
Too bad for the mount command, I was sure it was working but maybe I had changed something else and don't quite remember the steps to reproduce
We could possibly implement a shell script toggler for when we need to install new apps, but I'm afraid it'd become annoying fairly quickly: I noticed the issue initially because google play services decided to update itself, failed, and broke all google apps. As far as I know this autoupate can't be disabled.
Thanks for trying!
Click to expand...
Click to collapse
How about making a simple apk that toggles this feature. Something like when you click the icon it doesn't even open but gives a little notification of success. Something like that. I myself am not experienced with apks but I can put together a shell script for the apk.
skyguy126 said:
Ok so I have the kernel extracted and we could modify and flash that, but I believe that it's not really necessary. There are a lot of risks to flashing kernels and I am not willing to take it. So is there a way we can modify dalvik so it creates it's cache in /cache instead.
Click to expand...
Click to collapse
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
dd043 said:
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
Click to expand...
Click to collapse
Ill try it. I don't mind doing a bunch of resets because I am using my moto g as a test bench anyway. My daily driver is the OnePlus One
dd043 said:
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
Click to expand...
Click to collapse
EDIT: Unfortunately it didn't work. I don't know if I modified the installd file correctly. The program I used is HxD.
Is there a way we can force dalvik to start after the directories are created. And change dalvik to create it in /cache.
I didn't see anything about how to convert to f2fs for the nexus 6 so I thought i'd write something up as somebody requested me to do this.
What are the benefits of using f2fs over ext4?
I could list pros and cons, but I strongly encourage you to do your own research on the matter.
Should I do this
If you want to at your own risk
Pre-requisites
You need a recovery that supports f2fs in kernel and has the f2fs tools. Dhacker20 has provided one (TWRP 2.8.5.0) here: https://twitter.com/dhacker29/status/568070387306766336
You will need a kernel that supports f2fs for /cache and /data (Obviously I recommend Zen Kernel, but there are some others. Zen has the newest f2fs from upstream, while others may not)
ONLY YOU ARE RESPONSIBLE FOR YOUR DATA. IT IS YOUR RESPONSIBILITY TO UNDERSTAND THE RISKS AND YOUR RESPONSIBILITY TO BACKUP YOUR DATA
How-To
1.) Back up everything you care about to your PC (everything will be erased, including sdcard)
2.) Install a kernel that supports f2fs. Get the boot.img and do "fastboot flash boot boot.img" in bootloader (Like Zen)
3.) Install the recovery with f2fs support (fastboot flash recovery twrp-recvery-f2fs.img)
4.) In TWRP, go to Wipe
5.) Do a full wipe by swiping right
6.) Go to Wipe -> Advanced Wipe
7.) Choose /cache
8.) Choose "Change Filesystem"
9.) Pick f2fs, proceed
10.) Do the same thing for /data
11.) While still in recovery, plug phone into PC and do this:
Code:
# adb shell
# mount -o rw /system
# cp /sbin/fsck.f2fs /system/bin/
# cp /sbin/mkfs.f2fs /system/bin/
# chmod a+x /system/bin/*f2fs*
12.) Reboot and you are done.
Reserved
Is adb shell in terminal app
jiv101 said:
Is adb shell in terminal app
Click to expand...
Click to collapse
No adb is part of the android SDK platform-tools
I did this a while ago (except for step 12), and I remember something happening, which caused my data partition to become corrupted. I tried to format the partition again using ext3 or whatever the default is and that ended up giving me a soft brick. I had to restore the factory software. I have read things of where it does improve R/W speeds but I don't know if it's worth the hassle of possibly losing everything at the drop of a hat if you flash ROMs often.
RSVP..
Thanks for the information on F2FS well needed..!
brando56894 said:
I did this a while ago (except for step 12), and I remember something happening, which caused my data partition to become corrupted. I tried to format the partition again using ext3 or whatever the default is and that ended up giving me a soft brick. I had to restore the factory software. I have read things of where it does improve R/W speeds but I don't know if it's worth the hassle of possibly losing everything at the drop of a hat if you flash ROMs often.
Click to expand...
Click to collapse
The last step is a huge component of the whole process. If the rom doesn't have f2fs-tools in by default (most don't have fsck.f2fs/mkfs.f2fs) you will not have standard integrity checking every time you boot like you do on ext4. If you do the last step you will get integrity checking every time you bootup.
Also, since f2fs is a relatively young file system it can do harm to revert to older versions of the file system. For example, zen kernel has the newest f2fs which was updated last about 2 days ago. If you go on stock kernel you will find an f2fs that is 1+ year old. There may be a compatibility issue between these two where if you flash different roms (which almost always bundle a kernel)/kernels you will almost certainly have an issue.
But that's all part of the risk with using a relatively young file system. I do not understate the risks of data corruption in doing something like this - but anybody who is doing this and has significant worry should take precautions is backing up all their important files.
bbedward said:
The last step is a huge component of the whole process. If the rom doesn't have f2fs-tools in by default (most don't have fsck.f2fs/mkfs.f2fs) you will not have standard integrity checking every time you boot like you do on ext4. If you do the last step you will get integrity checking every time you bootup.
Also, since f2fs is a relatively young file system it can do harm to revert to older versions of the file system. For example, zen kernel has the newest f2fs which was updated last about 2 days ago. If you go on stock kernel you will find an f2fs that is 1+ year old. There may be a compatibility issue between these two where if you flash different roms (which almost always bundle a kernel)/kernels you will almost certainly have an issue.
But that's all part of the risk with using a relatively young file system. I do not understate the risks of data corruption in doing something like this - but anybody who is doing this and has significant worry should take precautions is backing up all their important files.
Click to expand...
Click to collapse
Is there any sort of confirmations when you are doing the last steps? I see this when I do them and I'm not sure if it has actually done the last steps.
C:\Development\platform-tools>adb shell
~ # ←[6nmount -o rw /system
mount -o rw /system
~ # ←[6ncp /sbin/fsck.f2fs /system/bin/
cp /sbin/fsck.f2fs /system/bin/
~ # ←[6ncp /sbin/mkfs.f2fs /system/bin/
cp /sbin/mkfs.f2fs /system/bin/
~ # ←[6nchmod a+x /system/bin/*f2fs*
chmod a+x /system/bin/*f2fs*
~ # ←[6n
C:\Development\platform-tools>
lobrau said:
Is there any sort of confirmations when you are doing the last steps? I see this when I do them and I'm not sure if it has actually done the last steps.
C:\Development\platform-tools>adb shell
~ # ←[6nmount -o rw /system
mount -o rw /system
~ # ←[6ncp /sbin/fsck.f2fs /system/bin/
cp /sbin/fsck.f2fs /system/bin/
~ # ←[6ncp /sbin/mkfs.f2fs /system/bin/
cp /sbin/mkfs.f2fs /system/bin/
~ # ←[6nchmod a+x /system/bin/*f2fs*
chmod a+x /system/bin/*f2fs*
~ # ←[6n
C:\Development\platform-tools>
Click to expand...
Click to collapse
That's about it, you can type exit to get out of adb shell or just close it.
On your device you can make sure f2fs took by simply typing "mount" in terminal emulator. You should see you data and cache reads f2fs now.
lobrau said:
Is there any sort of confirmations when you are doing the last steps? I see this when I do them and I'm not sure if it has actually done the last steps.
C:\Development\platform-tools>adb shell
~ # ←[6nmount -o rw /system
mount -o rw /system
~ # ←[6ncp /sbin/fsck.f2fs /system/bin/
cp /sbin/fsck.f2fs /system/bin/
~ # ←[6ncp /sbin/mkfs.f2fs /system/bin/
cp /sbin/mkfs.f2fs /system/bin/
~ # ←[6nchmod a+x /system/bin/*f2fs*
chmod a+x /system/bin/*f2fs*
~ # ←[6n
C:\Development\platform-tools>
Click to expand...
Click to collapse
Nope, it will only inform you if something went wrong (like file not found) of it all went through with no error it worked.
After you bootup you can verify it worked by typing "mount" in adb shell or terminal emulator. It should say f2fs on /data and /cache. Also in something like root Explorer if you navigate to /system/bin you should see the files you copied (fsck.f2fs and mkfs.f2fs)
bbedward said:
Nope, it will only inform you if something went wrong (like file not found) of it all went through with no error it worked.
After you bootup you can verify it worked by typing "mount" in adb shell or terminal emulator. It should say f2fs on /data and /cache. Also in something like root Explorer if you navigate to /system/bin you should see the files you copied (fsck.f2fs and mkfs.f2fs)
Click to expand...
Click to collapse
Perfect thanks for the quick response looked like it worked. Just out of curiosity is there any reason to format system to f2fs or does it end up causing issues, or just no changes in use?
lobrau said:
Perfect thanks for the quick response looked like it worked. Just out of curiosity is there any reason to format system to f2fs or does it end up causing issues, or just no changes in use?
Click to expand...
Click to collapse
I've tested it partly in testing the newest f2fs Zen merges as well as just general f2fs testing before.
It seems like writes are a bit faster, especially sql stuff. I've seen some grossly huge benchmark differences on other devices - on the n6 I've seen improvements but nothing astronomical like those benchmarks portrayed (I presume the 200% increase in write performance they showed is not accurate regardless) .
Recovery
So currently I'm on a 5.1 stock based rom (sinless) and TWRP 2.8.6
HAve Downloaded the latest Zen Kernel, and am downloading the latest 5.1 Benzo Rom.
Am I going to have issues rolling back to a 2.8.5 recovery - does 2.8.5 support 5.1 based roms?
shaitan667 said:
So currently I'm on a 5.1 stock based rom (sinless) and TWRP 2.8.6
HAve Downloaded the latest Zen Kernel, and am downloading the latest 5.1 Benzo Rom.
Am I going to have issues rolling back to a 2.8.5 recovery - does 2.8.5 support 5.1 based roms?
Click to expand...
Click to collapse
Yea it's compatible. There isn't a 2.8.6 with f2fs support yet that I know if and I haven't had the time to make one myself, but the 2.8.5 one works just fine.
@bbedward
I didn’t know any about the part 11 (I mean I convert mine to F2FS before I read this) so I’m wondering I’m gonna face any problem or not?
And also if have to do it, can I do it now or I have to wipe everything and then do it (cause changing partition to F2FS will clean everything)
Also I’m on your kernel.
dany20mh said:
@bbedward
I didn’t know any about the part 11 (I mean I convert mine to F2FS before I read this) so I’m wondering I’m gonna face any problem or not?
And also if have to do it, can I do it now or I have to wipe everything and then do it (cause changing partition to F2FS will clean everything)
Also I’m on your kernel.
Click to expand...
Click to collapse
Every time you boot your phone, it automatically runs fsck (for ext4 on stock). Essentially it's an automatic integrity check and repair.
So if it finds issues at boot up in the file system, it will tend to fix them automatically. If you look at boot up logs currently you will probably see something like "/system/bin/fsck.f2fs not found skipping integrity check"
You don't have to wipe everything though, you can just install the tools now.
I'm almost happy I posted this now hopefully it saves a few filesystems for folks who didn't do it completely.
---
When you see a kernel say f2fs compatible it means:
- f2fs is built into the kernel or a module is provided
- It's ramdisk's fstab allows for mounting of partitions as f2fs. On zen - it supports /data and /cache
When you see a rom say f2fs compatible it means:
- They have an f2fs-compatible kernel included
- They have the f2fs tools in the rom (As step 11 does)
This is why I say in the title this is "Any Rom" compatible as it will work on any rom, while on other devices you may see "Rom x, rom y, and rom z are the only known roms to be fully compatible." If you just do it this way it doesn't matter because it'll make any rom compatible with f2fs.
@bbedward this worked perfectly! But I just want to confirm that it switches back to ext4 after flashing a new ROM? After wiping and doing a clean flash it seems I'm not booting in f2fs anymore.
Am I doing something wrong or will I have to do this every time I clean flash?
Thanks again for the tutorial!
philsfan said:
@bbedward this worked perfectly! But I just want to confirm that it switches back to ext4 after flashing a new ROM? After wiping and doing a clean flash it seems I'm not booting in f2fs anymore.
Am I doing something wrong or will I have to do this every time I clean flash?
Thanks again for the tutorial!
Click to expand...
Click to collapse
I think most likely when you flashed a rom it overwrote your f2fs kernel, which caused it to reformat to ext4 when you booted it up.
Whenever you flash a rom you will need to flash f2fs-kernel right afterwards, and re-copy the tools (step 11) if the rom doesnt have them already in order to keep f2fs.
bbedward said:
I think most likely when you flashed a rom it overwrote your f2fs kernel, which caused it to reformat to ext4 when you booted it up.
Whenever you flash a rom you will need to flash f2fs-kernel right afterwards, and re-copy the tools (step 11) if the rom doesnt have them already in order to keep f2fs.
Click to expand...
Click to collapse
Thanks for responding so soon!
So I did flash zen9 (so good BTW) immediately after but I didn't repeat step 11 again. So that means Chroma doesn't have the necessary files for f2fs, good to know!
Edit: @bbedward does that mean I don't have to reformat again? Just do step 11?
Edit 2: entered step 11 in recovery and now i'm back to f2fs thanks again!
bbedward said:
The last step is a huge component of the whole process. If the rom doesn't have f2fs-tools in by default (most don't have fsck.f2fs/mkfs.f2fs) you will not have standard integrity checking every time you boot like you do on ext4. If you do the last step you will get integrity checking every time you bootup.
Also, since f2fs is a relatively young file system it can do harm to revert to older versions of the file system. For example, zen kernel has the newest f2fs which was updated last about 2 days ago. If you go on stock kernel you will find an f2fs that is 1+ year old. There may be a compatibility issue between these two where if you flash different roms (which almost always bundle a kernel)/kernels you will almost certainly have an issue.
But that's all part of the risk with using a relatively young file system. I do not understate the risks of data corruption in doing something like this - but anybody who is doing this and has significant worry should take precautions is backing up all their important files.
Click to expand...
Click to collapse
That was probably it! It was just a pain because this is the first phone that I've had in a while that doesn't have an SD card, I had a nandroid, but it doesn't do any good if you can't access your data partition Hahaha I have now taken to uploading my nandroids to Google Drive or putting them on my pc just in case that happens.
Skinny MIUI is all about preserving the good; Working premium drivers for Camera, CPU control, Notification LEDs, Bluetooth, FM Radio etc. while resolving what is bad in the stock offering.
All deletions assume the user has absolutely no interest in being part of the Xiaomi ecosphere. Leave now if that is not you.
This guide applies to MIUI stable versions 7.1.1 thru to 7.2.5 only. Developer, Beta or Eng versions are not good candidates.
STAGE 1:
Boot.img mods: (this is not creating a custom kernel!!!)
The stock boot.img is unpacked, init.d support added and many entries that are not relevant to our hardware removed.
Disabling lines trying to load non-existent services from init.rc, init.mt6795.rc and ueventd.rc etc. stops a bit of churning on each and every boot and frees up a bit of RAM.
There are intentionally no other tweaks contained within the boot.img. All tweaks are done in init.d scripts accessible outside the boot.img.
Note: This boot image made from 7.1.4 will work back to ver 7.1.1 and forward to 7.2.50 / 6.3.31 and is superior to the stock boot images contained in those ROMs.
At this point you can flash the modified boot.img to your phone if you already have a stock MIUI 7.1.1 to 7.2.50 installation that you are going to keep.
If you are going to do a clean install, replace the boot.img in your ROM zip file with this modified one. (backup the original first)
The boot.img is found here: (Now links to folder with all versions available)
https://drive.google.com/folderview?id=0BwdRTuyj12_yRk9Kcm1pZkxuZzg&usp=sharing
STAGE 2:
Full install:
I recommend you install my TWRP 3.02-2 version from here:
https://drive.google.com/open?id=0BwdRTuyj12_yWWp0SUpGV1pzT1k
Before installing your chosen ROM:
Check that the updater script found: \META-INF\com\google\android\updater-script is not going to install Preloader, Uboot (lk), Recovery or logo partitions. If so, edit the updater-script to prevent this happening. This is to reduce the risk of a soft-brick or being locked out of your phone.
Do a factory reset in TWRP (wipe Data, Dalvik, Cache) before installing any ROM.
Install your chosen ROM. Trying to slim down the ROM before install is an arduous affair which tends to end in bootloops so we leave the original ROM alone in this respect..
Do the install without connecting to mobile or WiFi networks and just skip at screens prompting for network connectivity and creating accounts.
Reboot into TWRP once finished with the initial Setup to avoid Recovery from being deleted on first boot.
Install an updated SuperSU zip package from TWRP recovery - V2.46 to 2.71 work equally well.
Do not install a root package other than SuperSU - most online ones are malware!
Update the outdated and incomplete Busybox installation. I have created a TWRP flashable zip to upgrade to the latest version 1.25.0. This is the second edition which has better binaries and no longer creates symlinks to busybox commands.
https://drive.google.com/open?id=0BwdRTuyj12_yd0s1QmNLRzdveFk
Now install a root capable filemanager (Root Explorer or Total Commander recommended). Open it and gain root permissions. Open /etc/perfservscntbl.txt in a text editor and edit as follows:
Code:
CMD_SET_CPU_FREQ, SCN_APP_TOUCH, 403000
CMD_SET_CPU_CORE, SCN_APP_TOUCH, 1
This will lower the number of cores used and the frequency at which it runs when a screen touch is detected (referred to as Touch Boost) Changes are activated on reboot.
Now create a file named 01_tweaks in the /etc/init.d folder. Change the permission of the file to 0755
Tips on creating scripts:
The EOL(end-of-line) characters must be in Unix format - not Windows. Make sure you are using a text editor that saves in Unix format.
Note also that many script files need a blank line at the end to work correctly. Get in the habit of always doing this whether needed or not.
Any line starting with a # character and anything after a # character on a line is not processed and is referred to as "commented out"
Script files must start with the header #!/system/bin/sh as the first line.
Init.d scripts are processed in alpha-numeric filename order hence the common usage of 01_xxx, 02_xxx format for names.
Copy these lines into the 01_tweaks file: Note: Different values for 2.2GHz cpu and freq limited operation.
Code:
#!/system/bin/sh
### Tweak Interactive CPU Governor
echo 806000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 85 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "90 403000:80 806000:85 1326000:90 1625000:95 1950000:99" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 32000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo 10000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 15000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack
### Tweak IO Scheduler
echo deadline > /sys/block/mmcblk0/queue/scheduler ### choose between cfq, bfq or deadline
### Enable this line if using cfq or bfq scheduler only
# echo 0 > /sys/block/mmcblk0/queue/iosched/slice_idle
echo 256 > /sys/block/mmcblk0/queue/read_ahead_kb
### Enable zram swap
# echo 1073741824 > /sys/block/zram0/disksize ### 536870912 = 512MB 1073741824 = 1GB
# /system/bin/tiny_mkswap /dev/block/zram0
# /system/bin/tiny_swapon /dev/block/zram0
### Tweak Entropy to avoid regular depletion of available pool
echo 512 > /proc/sys/kernel/random/read_wakeup_threshold
echo 1024 > /proc/sys/kernel/random/write_wakeup_threshold
#Tweak for wifi router connection issues
#echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6
### FSTRIM: Enable once after installation is finalized and then monthly ##### needs an updated busybox installation to work
# busybox fstrim /data
# busybox fstrim /cache
# busybox fstrim /system
Options: Add / replace lines to do the following:
1. freq limit a 2GHz cpu to 1781MHz (recommended setting)
echo "90 403000:80 806000:85 1326000:90 1625000:95 1781000:99" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 1781000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1781000 > /proc/cpufreq/cpufreq_limited_max_freq_by_user
2. Full speed 2.2GHz cpu
echo "90 403000:80 806000:85 1326000:90 1664000:95 2158000:99" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
3. freq limit a 2.2GHz cpu to 1885MHz (recommended setting)
echo "90 403000:80 806000:85 1326000:90 1664000:95 1885000:99" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 1885000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1885000 > /proc/cpufreq/cpufreq_limited_max_freq_by_user
4. Add a limit to the maximum number of cpu cores allowed to come online (for possible battery saving maybe...)
#Limit max cpu cores available (range 2 - 8)
echo 4 > /proc/hps/num_limit_low_batt
echo 4 > /proc/hps/num_limit_power_serv
echo 4 > /proc/hps/num_limit_thermal
echo 4 > /proc/hps/num_limit_ultra_power_saving
Edit /system/build.prop. Change the line: ro.sf.lcd_density from the default 480 to a value between 400 (everything smaller, more on screen) to 520 (everything larger, less on screen) to suit your taste and eyesight. You can test this out first by issuing the wm density command in a terminal app. e.g wm density 440 will immediately change the density to 440dpi, wm density reset will put it back to whatever the build.prop setting is. Adjust the text size in Settings in conjunction with this to get the best result.
At this point you have a functional set of tweaks that are all tested and proven to provide a battery and performance improvement. There are a lot of detrimental or placebo tweaks out there so be a little bit discerning in what else you add to these tweaks - sometimes less is more. Now is not the time to load up those tweaks!
Do a TWRP backup of System, Data, Boot and NVram partition now to save your efforts up to this point.
STAGE 3:
Now its time to get Skinny: You will need an app that can uninstall and freeze system apps. I use SD Maids App Control feature for this purpose.
Warning: If you intend to use app lock, you will unfortunately need to keep some fingerprint service files. See the post below and a few before it to understand the problem. Thanks to @DarthJabba9 for his work.
I believe that app lock also disables MIUI Optimization if enabled.
http://forum.xda-developers.com/showpost.php?p=67242356&postcount=583
First phase is to get rid of the obvious bloat apps and Xiaomi in-house apps....these in the list below are safe to remove.
Tick off what you have removed and reboot each 10 or so deletions and backup, don't try to delete everything in one hit as you will end up stuck at boot.
WARNING: This removes some functionality that may be useful to some users. You either want the function or you don't - it is your finger pressing the buttons!
Some people may choose to keep the MIUI Home Launcher interface. In this case, keep MIUI Wallpaper as well.
Must keep these - Do not delete:
Updater - disable autostarts, do not freeze
Theme Manager - disable autostarts
Security (com.miui.securitycenter) - leave as-is
FwkPlugin
Network Assistant app
MiuiSDK - disable autostarts
AuthManager
Webview (update via Playstore once install finished)
Xiaomi service framework - disable autostarts, freeze app
Definitely O.K to delete list:
Wallpaper Apps:
Android Live Wallpapers
Black Hole
Bubbles
com.android.wallpaper.holospiral
Live Wallpaper Picker
Music Visualization Wallpapers
Phase Beam
Photo Screensavers
*Miui MiWallpaper * keep if also keeping MIUI Home Launcher.
Xiaomi/MTK Apps:
Analytics
Assistant
Back up Home screen layout (cloud backup)
Backup - delete if you don't use it (use TWRP instead)
Battery Warning - deleting this does not affect battery charging or display
Battery Saver - deleting this improves battery life
Blocklist (AntiSpam) - delete if you don't use it
com.miui.mipub
File Explorer - delete (you should already have a root capable file browser)
Find device - use the generic Google version if you really must, not the Xiaomi one supplied.
FingerprintService
FPCSensorTestTool
FTPreCheck
FWUpgrade
gallery (com.mfashiongallery.emag daily wallpapers)
Games
Home screen
JeejenMIUIContainer
com.securitycore.miui_t (Tencent virus scanner plugin to Security Center)
KLO Bug report
LocationEM2
Metok
MI Account
Mi Cloud
Mi Credit
Mi Drop
Mi Home
MI Service Security Framework
Mi VIP
Mi Voice
Mi Wallet
Miravision
MTKAndroidSuiteDaemon
MtkFloatMenu
MTKLogger
Music
MusicFx
Notes - if you don't use it, delete it.
PowerKeeper (Battery Saver) - deleting this improves battery life
Report Bug
Security service plugin (not securitycenter app)
SystemAd
System Launcher (Miui Home) replace with an alternative Launcher, allow autostart in Security first then delete. ADW Launcher recommended for lightweight and simple functionality (set to 4x6 looks good).
Traffic Control
Uniplay
UpgradeSys
VCalendar
Video
Voice Unlock
VoiceAssist
Weather
Weather provider
Whetstone delete app and delete folder /etc/WhetstonePermission ****Whetstone is linked with several other apps to make it hard to get rid of. It may cause some temporary FC issues - these will pass.
Xiaomi Assistant
Yellow Pages
com.jeejen.knowledge
com.jeejen.store
com.ximalaya.ting.android
com.xiaomi pass
com.xiaomi.o2o
com.xiaomi.jr
Cheetah Mobile CleanMaster SDK + Cleaner - delete
NetworkLocation (com.baidu.map.location) delete app, delete folder: /system/vendor/operator and delete corpses
Android/Google Apps:
Browser - suggest replace with Polarity Browser - minimal permissions required, Ad Blocking, lightweight and fast
Documents
Google Keyboard - replace with something lighter - Hackers Keyboard v1.38.2 recommended
Google Pinyin input
Google Feedback
Google partnersetup
HTML Viewer
Email
Mail
Pico TTS
Print Spooler
com.android.browser.provider
PacProcessor
Note: If you have apps reappear as if by magic, they are being reconstructed from cached information. SD Maid has an excellent "Corpse Finder" function that will delete the orphaned files and prevent this happening. Clear corpses after each reboot.
Second phase is to toggle off the autostarts (receivers) on the apps that do not need to start by default. This is not the same as freezing an app. Some apps will still start by themselves - do not worry too much about this.
Atci_service
Backup
Blocklist
com.mediatek.batterywarning
Download Manager
Google Contacts Sync
Google One Time Init
MIUI SDK (don't freeze)
MTK NLP Service
Notes
One Time Init
Sim Toolkit
Themes (Theme Manager)
Updater
Xiaomi service framework (should also be frozen)
Third phase is to clean up left behind folders and files
/data/miui/app/customized/ remove any app folders that you have uninstalled
/data/miui/app/noncustomized/ remove any app folders that you have uninstalled
delete folder /data/miui/mms
delete folder /data/miui/gallery
delete contents of /data/miui/cust
delete folder /etc/jeejen
delete etc/voicecommand and etc/voiceextension folders if you have removed voice related apps
delete /system/tts folder if you have removed Pico TTS
delete folder /system/etc/radv
/etc/fake_cdrom_install.iso - delete file
/etc/IAmCdRom.iso - delete file
/system/addon.d delete folder
/system/app/jjcontainer/ - delete folder
/system/app/jjhome/ - delete folder
/system/app/jjknowledge/ - delete folder
/system/app/jjstore/ - delete folder
Libs you can remove:
/vendor/lib
libfingerprint_tac.so
libfpcalgorithm.so
/vendor/lib64
libcom_fingerprints_productiontestmanager.so
libcom_fingerprints_sensor.so
libfingerprint_tac.so
/system/lib
libcaFingerPrintShared.so
libcom_fingerprints_service.so
libfamily_jni.so
libjeejenAisound.so
libjeejenmsc.so
libMiraVision_jni.so (if deleted MiraVision App)
libpatcher_game_jni
libvoicerecognition.so (if voice recognition apps deleted)
libvoicerecognition_jni.so (if voice recognition apps deleted)
libweibosdkcore.so
libwhetstone_jni.so (if deleted Whetstone App)
libwhetstone_sdk.so (if deleted Whetstone App)
libxiaomimediaplayer.so (if xiaomi media player deleted)
libxiaomimediaplayerwrapper.so (if xiaomi media player deleted)
/system/lib64
libairtunes_jni.so
libairtunes.so
libBankCardRecognizer.so
libcaFingerPrintShared.so
libcom_fingerprints_service.so
libduokantext.so
libjni_latinimegoogle.so (if deleted Google keyboard)
libjni_pacprocessor.so (if deleted PacProcessor)
libMiraVision_jni.so (if deleted MiraVision App)
libpatcher_game_jni.so
libttspico.so
libweibosdkcore.so
libwhetstone_jni.so (if deleted Whetstone App)
libwhetstone_sdk.so (if deleted Whetstone App)
libxmpass_sdk_patcher.so
xmpass_libweibosdkcore.so
Establish network connectivity.
If Gapps is required but not installed, download open_gapps-arm64-5.0-pico version. You can install individual extra Google apps at any stage later on.
Go through all MIUI Settings and turn off everything you do not need running.
Install your favorite media player, web browser etc. to replace the deleted original apps.
Can replace Calendar and Messenger with Google Calendar and Google Messenger to remove some more Xiaomi dependencies. Contacts & Dialer are much harder to replace - True Phone is the only viable option.
To further limit Xiaomi unsolicited communications, rename (or delete) /system/xbin/tunman to tunmanbak. (This is a tunneling protocol driver that Xiaomi uses without your knowledge or permission).
The startup is disabled in the boot.img but it can still be started after boot unless renamed.
To skinny the Themes footprint:
Go to /system/media/theme/
Delete elder-default folder if no use.
Delete entire contents of miui_mod_icons folder
Delete items in /system/media/theme/default/ that are not going to be used.
Delete items in /system/media/lockscreen/ and /system/media/wallpaper/ that are not going to be used.
Now install your favorite app for monitoring CPU parameters and make sure that on idle, there is only one cpu core running and it sits predominantly on 403MHz. It will jump a little bit but that is normal with the inevitable background activities. Increase the timer_rate if you want more stability at idle rather than cranking up the load figures too far. Up to 50000 or down to 30000 is O.K (remember we are talking microseconds here so 50000 = 50mS)
Congratulations! You now you have a "Super Skinny" MIUI installation. Do a backup now!!!!
Now you will feel the AOSP shining through - and still you have working everything!
This post will list useful tools and items that need further investigation.
Apps for finding and disabling things:
Wakelock Detector-Root - monitor and records wakelock activity
GSAM - monitors what apps / services are consuming battery
Disable Service - disable services started on an app by app basis
SD Maid, Titanium Backup - Freeze / remove apps, toggle autostarts (receivers)
Modify your quick start grid size:
https://drive.google.com/file/d/0BwdRTuyj12_yYlphU3A0UWprcXc/view?usp=sharing
Modify MIUI Homescreen grid:
https://mega.nz/#F!yJdkxbBa!WSIqrhwUQwD7qjzxOuo1Yw
Issues:
Find a way to completely disable XMPush service with and without Xiaomi services framework installed.
Xiaomi Services Framework causes Sim connectivity issues if deleted - do not delete. There will always be one XMPush instance running.
Find out what is causing Audio On wakelock reported by GSAM
Quote: Originally Posted by DarthJabba9
With regard to the "Audio On" wakelock (aka AudioMix Wakelock) reported bt GSAM, I found this somewhere in this forum: "The nexus 6 had the same wakelock and most of us got rid of it by unchecking "use NuPlayer" in developer options". I have now unchecked that option, and will see over the next day or so whether it resolves the problem. This appears to be the fix
What triggers no sim / no service errors
Removing Xiaomi Services Framework is the culprit
Why do some files / folders not show up in root filemanagers?
MIUI locks the files / folders to prevent them being used or shown.
Why does zram not work anymore?
Rename tiny_mkswap, tiny_swapon, tiny_swapoff to teeny_mkswap, teeny_swapon, teeny_swapoff
Make sure owner is root shell and permissions are 0755 for all 3 files.
edit the init.d script to reflect the change in filenames. Now it will work again!
Example full Skinny ROM based on MR7.2.30 ID:
This is how my phone is set up, it has 100% functionality, zero FCs and zero battery drain on idle. The init.d settings are exactly as provided. Compare the directory listings to your own to see what is deleted.
The other major variation to this is for people who want to keep MIUI Launcher (and MIUI Wallpaper), everything else should remain the same. This cost you a bit more RAM usage and slightly more cpu activity (less battery) but is still impressive compared to stock.
/system/app
ApplicationsProvider
AtciService
AutoDialer
BSPTelephonyDevTool
Bluetooth
CaptivePortalLogin
CertInstaller
DeskClock
DownloadProviderUi
DrmProvider
EngineerMode
EngineerModeSim
FM
GoogleCalendarSyncAdapter
GoogleContactsSyncAdapter
KeyChain
MTKThermalManager
MiuiCompass
NetworkAssistant2
NlpService
Omacp
PackageInstaller
Provision
SuperSU
SystemHelper
ThemeManager
Updater
UserDictionaryProvider
WebViewGoogle
XiaomiServiceFramework
YGPS
cit
mcRegistry
miui
miuisystem
/system/priv-app
AuthManager
BackupRestoreConfirmation
BarcodeScanner
CDS_INFO
CalendarProvider
ContactsProvider
DefaultContainerService
DownloadProvider
ExternalStorageProvider
FusedLocation
GoogleBackupTransport
GoogleLoginService
GoogleOneTimeInitializer
GoogleServicesFramework
InCallUI
InputDevices
ManagedProvisioning
MediaProvider
MiuiCamera
MiuiGallery
MiuiKeyguard
MiuiSystemUI
MmsService
OneTimeInitializer
Phonesky
PrebuiltGmsCore
ProxyHandler
SecurityCenter
Settings
SettingsProvider
SharedStorageBackup
Shell
Stk1
TeleService
Telecom
TelephonyProvider
VpnDialogs
WallpaperCropper
com.ghisler.android.TotalCommander ### Total Commander installed as system app
com.hb.dialer.free ### True Phone replacement for Xiaomi Contacts & Dialer
org.adw.launcher ### ADW Launcher installed as system app
Other base apps in /data/app:
com.google.android.apps.messaging ### replacement Google Messenger
com.google.android.calendar ### replacement Google Calendar
com.duokan.phone.remotecontroller ### stock IR remote controller app
pcr.browser.polarity ### Polarity Browser
com.grarak.kerneladiutor ### Kernel Adiutor * disable autostarts*
org.pocketworkstation.pckeyboard ### Hackerskeyboard-v1.38.2 replaces Google keyboard
jackpal.androidterm ### Android Terminal
Thanks a bunch for the info. This is exactly what I'm looking for (my slimming down attempts always resulted in bootloops, so I've been playing it pretty safe so far).
Is this something you repeat every time an update is being pushed to your RN2?
@elaurens By doing this you are forgoing the use of OTA Updates which will unravel everything you have achieved.
I had to go through quite a few bootloops before creating the "safe lists" - I suffer so you can all benefit.
If you are starting with 7.1.4 everything is perfect and needs no more updating
Keep your eye out for additions to these lists as I discover or remember them
I have tried this:
http://forum.xda-developers.com/red...d-enable-clearmotion-miui-based-roms-t3278552
to enable ClearMotion and can vouch for it being safe - as in no malware and no breaking things. It adds the following to Build.prop and puts some hacked drivers in /system/lib.
persist.sys.display.clearMotion=1
persist.clearMotion.fblevel.nrm=255
persist.clearMotion.fblevel.bdr=255
ro.mtk_clearmotion_support=1
ro.mtk_slow_motion_support=1
ro.mtk_16x_slowmotion_support=1
Is this a worthwhile thing to do? There are no negatives in doing so as far as I can see but I don't really have anything that can give this a proper workout.
Can anyone see a difference in video playback? (Must have hardware acceleration selected) I won't recommend this if there is no perceivable gain.
most of the stuff works fine, everything checks out, It's not really anything new, but i find it well written, and it's not just a "placebo build.prop tweaks edit" which is a +. its a smart thing to have it all in a single thread.
however there're some issues with init.d script. even if you get init working, sometimes it just simply wont apply any of the tweaks. interestingly enough, i forced it to create a new text file on every boot, and that works. not really sure whats causing this prob.
anyways, by some magic I eventually made it apply the script, not really sure if it was cause of the rom change, or just pure luck lol
@sikica133 and anyone else having init.d problems:
init.d problems are usually one of the following:
1. incorrect folder permissions.
2. incorrect file permissions
3. No line feed at the end of the file (blank line)
4. incomplete or missing Busybox install
5. missing header in the text
6. Loosing SU privileges
Check init.d folder has 0755 permissions
Check file has at least 0644 permissions
Check and/or insert a line feed at the end of the file
Install busybox on rails, run the cleanup and busybox install, uninstall busybox on rails after this (this gives you an up-to-date and more complete busybox installation)
First line of file must be exactly #!/system/bin/sh
Reinstall a fresh version of SuperSu through TWRP
I sometimes get caught out myself by editing a file on the PC and transferring it back without fixing permissions afterwards:silly:
I have the ultimate build.prop tweak that I will share with you all now, stand back, it is very powerful
persist.sys.use_qualcomm_performance_features_instead=1
nah, i was testing it with a updater-script doing 0755 on all scripts. busybox should be fine cause other scripts did their job. dunno, could be some funny issue on my end. works now, i was just wtf, everything works, this doesnt. no idea what was going one tbh, but it works
could be incompatibility with bbox and the script itself? im running it without feedline atm, and it applies it all. same script i used before when it didnt do anything.
MIUI 7.1.4 and I assume all other versions has a very old and incomplete version of busybox installed (I think it was v1.20?).
It does not have fstrim command (plus a few others) included which is why I recommend updating.
I tried init.d and 01_tweaks script (whith correct permissions).
The system is more time in 806 Mhz., deep sleep not works properly.
I use Stable 7.1.1 .
Deleting script, deep sleep works fine.
Need I install or update busybox for resolve my issue?
@Xabadou This script is the starting point. If you do not "skinny down" MIUI, there are so many things running in the background that you will find it difficult to sit on idle frequency.
How far into skinnying down have you gone?
Also, if you have a 2.2GHz cpu, the 2nd line below frequencies in bold must be modified to valid frequency for that cpu.
If you are not going to skinny down to a great extent, then it helps to bump some of the load settings up a touch.
These are the original lines:
echo 80 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 90 403000:70 806000:81 1183000:84 1326000:87 1469000:90 1625000:93 1781000:96 1950000:99 > /sys/devices/system/cpu/cpufreq/interactive/target_loads
# for 2.2GHz cpu: echo 90 403000:70 806000:81 1183000:84 1326000:87 1482000:90 1664000:93 1885000:96 2158000:99 > /sys/devices/system/cpu/cpufreq/interactive/target_loads
Modify to:
echo 85 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 95 403000:75 806000:81 1183000:84 1326000:87 1469000:90 1625000:93 1781000:96 1950000:99 > /sys/devices/system/cpu/cpufreq/interactive/target_loads
This is enough to get it to sit on 403MHz idle in most cases. If you go higher, you will start compromising smoothness. There are no problems at all with entering deep sleep.
If you are still having problems, you have an app running that is badly behaved - identify it and deal with it.
Refer back post #10, I mention why you should upgrade busybox.
I am running my phone beyond Super Skinny and loving it. Super stable and battery friendly while still being a performance beast. You should notice even at the point of trimming down to Skinny, this phone really starts to liven up.
jajk said:
I am running my phone beyond Super Skinny and loving it. Super stable and battery friendly while still being a performance beast. You should notice even at the point of trimming down to Skinny, this phone really starts to liven up.
Click to expand...
Click to collapse
Do you have a list of the apks (and directories) that you deleted in order to get the skinny ROM? Such a list would be useful for writing a script to automate the task.
P.S.: you might have noticed that I am a script fanatic - I generally find that it is less error-prone to automate such tasks with a script - and you only need to get the script right once.
I use stable 7.1.1 by xiaomi.eu whith your modded kernel and a lot of apps frozen (App Quarantine).
Modified kernel works very good.
Just now I have updated busybox.
I have 2.0 ghz version.
I will try again the script.
Clear Motion mod works fine in MIUI roms but you must use MX Player for play videos.
---------- Post added at 01:20 PM ---------- Previous post was at 01:11 PM ----------
persist.sys.use_qualcomm_performance_features_inst ead=1
Works qualcomm tweaks whith mediatek processors?
@DarthJabba9 The lists ares already mentioned - 1 to get to skinny, 1 to get to super skinny but if you do this in a script on a live system you will likely end up in a bootloop because there are too many odex and cache entries orphaned for Android to handle in one hit. If you intend to apply a script to the ROM files before installation, that is a different story. It takes a bit of effort to figure out how and where MIUI is loading a lot of its components from but is doable.
Why I have not offered a complete ready to go package? It is too easy for users to do it themselves and add their preferences along the way. For those that have actually followed through with the process, I can guarantee that they will instantly loose interest in any other custom ROM.
@Xabadou Thanks for the clarification on ClearMotion. I run VLC set to hardware acceleration and can't see the split screen test mode. Video looks fine regardless, so really hard to tell if anything has changed.
Do the apps that you quarantine stay not running? I had problems with quite a few apps running regardless of being frozen or not so had to uninstall.
You, along with everyone else are not running a modified kernel - the kernel remains intact since we do not decompile and recompile or compile it from source.
The "persist.sys.use_qualcomm_performance_features_instead=1" tweak is a sarcastic dig at the many tweak offerings that do absolutely nothing:silly:
You asked the question showing you were not ready to accept this at face value:good:
If there is no evidence of a tweak doing something positive, don't blindly use it!!!
This is a customized boot image that provides init.d support and has unnecessary entries removed. No tweaks are embedded.
It is built on 7.1.4 and can be used on stock 7.1.1 to 7.1.4.
https://drive.google.com/file/d/0BwdRTuyj12_yR3phb0Zxd05UQjQ/view?usp=sharing
credits to @DarthJabba9 for the alternate init.d support method adopted in this image. It circumvents using busybox run-parts method that appears to have some bugs.
jajk said:
@DarthJabba9 The lists ares already mentioned - 1 to get to skinny, 1 to get to super skinny but if you do this in a script on a live system you will likely end up in a bootloop because there are too many odex and cache entries orphaned for Android to handle in one hit. If you intend to apply a script to the ROM files before installation, that is a different story. It takes a bit of effort to figure out how and where MIUI is loading a lot of its components from but is doable.
Why I have not offered a complete ready to go package? It is too easy for users to do it themselves and add their preferences along the way.
Click to expand...
Click to collapse
Fair enough ...
jajk said:
I will share my custom Super Skinny MIUI boot.img based on MIUI7.1.4 since it is now stable ... It is unpacked and repacked using AndroidMasterChef (downloaded from Needrom). I do not have problems unpacking and repacking again. If you try to unpack and have problems, use the same tool.
Click to expand...
Click to collapse
Thanks for the image. It cannot be unpacked with standard linux tools, but it unpacks ok with AndroidMasterChef.