Battery drain issues - Nokia 7 Plus Questions & Answers

from the last few days i am noticing that my battery is draing to much without even using the phone, last nignt i left my phone at 35% around 11pm next morning when i wake up at 7 my phone was switched off bcoz of 0% battery. what should i do?

try look at cpu/mem usage (from PC terminal/command_prompt with installed adb and connected phone with USB cable, and enabled Developer preview and in it USB Debuging)
Code:
adb shell top
if you see that com.evenwell.powersaving.g3 eating your CPU (for me it wad ~150%), then you can clean broken battery power saving database)
Code:
adb shell pm clear com.evenwell.powersaving.g3
since i have this problem with P DP, and for you of course can be any other problem, you can try it...

Also, if you do not have this problem and your CPU usage seems fine, next big thing you should do is using the RUN_IN_BACKGROUND ignore command for all the dubious services running.
All the info you need is right here:
https://www.xda-developers.com/freeze-app-background-processes-without-root-android-nougat/
After running the command for all non-critical services, my battery life grew exponentially - to an Oreo extent (~2 days on heavily used phone).
You can use the already scripted commands below. I 've used a .bat with all these and ran it from the adb shell:
adb -d shell cmd appops set com.evenwell.AccountProxynbb.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.AprUploadService RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.AprUploadService.data.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.CPClient RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.CPClient.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.DeviceMonitorControl RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.DeviceMonitorControl.data.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.OTAUpdate RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.OTAUpdate.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.PowerMonitor RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.PowerMonitor.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.SettingsUtils RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.SettingsUtils.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.SetupWizard RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.SetupWizard.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.UsageStatsLogReceiver RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.UsageStatsLogReceiver.data.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.apnwidget.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.appwidget.worldclock.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.autoregistration RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.autoregistration.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.backuptool.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.badgeinfo RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.batteryprotect RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.batteryprotect.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.calculator2.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.calendarwidget.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.callblock.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.camera2 RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.camera2.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.cellbroadcastreceiver.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.custmanager RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.custmanager.data.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.customerfeedback.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.dataagent RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.dataspeedindicator.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.defaultappconfigure.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.deskclock.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.documentsui.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.email.data.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.factorywizard RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.fmradio RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.fmradio.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.foxlauncher.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.gallery.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.glance.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.hyperclip.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.magictorch.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.music.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.nps RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.nps.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.pandorasbox RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.pandorasbox.app RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.partnerbrowsercustomizations.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.permissioncontrol.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.permissiondetection.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.phone.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.powersaving.g3.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.providers.downloads.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.providers.downloads.ui.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.providers.partnerbookmarks.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.providers.weather RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.providers.weather.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.screenlock.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.settings.data.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.stbmonitor RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.stbmonitor.data.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.support.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.telecom.data.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.universalsearch.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.weather.overlay.base.s600ww RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.weatherservice RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.evenwell.weatherservice.overlay.base.s600ww RUN_IN_BACKGROUND ignore
Click to expand...
Click to collapse
To this list I've added apps installed for the current user like Facebook, tumblr, Twitter etc or packages I do not want/use for notification. Just find out the name of the package and add the commands before/after:
adb -d shell cmd appops set com.facebook.katana RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.google.android.backuptransport RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.google.android.youtube RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.google.ar.lens RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.hmdglobal.support RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.shazam.android RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.tumblr RUN_IN_BACKGROUND ignore
adb -d shell cmd appops set com.twitter.android RUN_IN_BACKGROUND ignore
Click to expand...
Click to collapse
As a conclusion, not only has my battery life amazingly improved, but my phone is snappier than ever. :good::fingers-crossed:

Hey! But you know what are all the system process you are stoping? Did you fine functionality compromises?

NahuelMS said:
Hey! But you know what are all the system process you are stoping? Did you fine functionality compromises?
Click to expand...
Click to collapse
They're only preventing it from working in the background. If they are ever needed, they aren't disabled, and will work just fine.
IDXelo said:
Also, if you do not have this problem and your CPU usage seems fine, next big thing you should do is using the RUN_IN_BACKGROUND ignore command for all the dubious services running.
...
As a conclusion, not only has my battery life amazingly improved, but my phone is snappier than ever. :good::fingers-crossed:
Click to expand...
Click to collapse
May I ask, is there any way to reverse this once it's done? Do you just replace the "ignore" with "allow" and that's it?

Related

[Q]I'm trying to make a little .cmd file to uninstall my apps. need a little help.

Trying to make a little .CMD Files to uninstall my app so I don't have to type everything in again when I do a flash rom.. here is what I have
Code:
pause
@adb kill-server
@adb shell cd /system/app/
@adb shell su*
pause
@adb shell rm /system/app/RemotePVR.apk
@adb shell rm /system/app/tn55-android-blur.apk
@adb shell rm /system/app/FaceRecognition.apk
@adb shell rm /system/app/Layar-samsung.apk
pause
The issue is at the "@adb shell su*" I get an error saying at the super not found.. now when I type the commands in my self it works great.. but in a .bat file or .cmd files it does not work.. what i'm I missing?
Every call to ADB like this is a standalone command.
That is, when you do a
Code:
adb shell cd /system/app/
what happens is that it starts the adb shell, runs the command, and then exits. So when you call su, you lose superuser access when running the next adb shell command, because that shell instance is now gone, kaput, finito.
I also tried to make a script like this, but got stuck. We need to chain commands to ADB, like you can do in *nix with a semi-colon separator between command, like thus:
Code:
command1 ; command2
("&&" in Windows/DOS)
But ADB doesn't seem to support chaining commands.
I guess you have to do a shell script, put it on the phone and run it from there. Or some kind of "adb sushell" command would be nice...
Thanks I was kinda wondering if that was what was happening.. to bad the su command would not stay active.. o well.... maybe someone will come up with something..
Im not at a pc but can u test
adb shell su command
Does tht work ?
you could make a 2nd script which pushes the 1st to the device with "adb push". this script then gets root with "su" and uninstalls/deletes the apps ... btw. you can try using "pm" (packetmanager) which can install/uninstall/reinstall apps. however i don't know if it works with system apps...
Alright here : (eg, say remove launcher)
Code:
adb shell su -c 'mount -o rw,remount /dev/block/mtdblock3 /system'
adb shell su -c 'rm /system/app/Launcher.apk'
adb shell su -c 'rm /system/app/Launcher.odex'
adb shell pm uninstall com.android.launcher
fyi : "SystemApp Remover" on market essentially does the same thing, except it eliminates the need for u to look for the package name ur self.
Hm, that works, but I get a superuser prompt on the phone for every new command (the "app name" is the command line).
Daneshm90 said:
Alright here : (eg, say remove launcher)
Code:
adb shell su -c 'mount -o rw,remount /dev/block/mtdblock3 /system'
adb shell su -c 'rm /system/app/Launcher.apk'
adb shell su -c 'rm /system/app/Launcher.odex'
adb shell pm uninstall com.android.launcher
fyi : "SystemApp Remover" on market essentially does the same thing, except it eliminates the need for u to look for the package name ur self.
Click to expand...
Click to collapse
sweet that worked. I would get the SystemApp Remover but I can't download paid apps till Google will fix my account. unless there is something like it for free.

[dev] docks and hidden menus

Dock home screens
Code:
adb shell am start -n com.motorola.dlauncher/.DLauncher
adb shell am start -n com.motorola.smartdock/.productivitydock.ProductivityDock
adb shell am start -n com.motorola.smartdock/.bedsidedock.BedsideDock
adb shell am start -n com.motorola.smartcardock/.main.SmartCarDockMainActivity
Blur related
Code:
adb shell am start -n com.motorola.blur.setup/.SignUpOrLogInActivity
adb shell am start -n com.motorola.blur.service.blur/.CloudPickerActivity
Misc.
Code:
adb shell am start -n com.motorola.blur.home/.ProfileSwitcherActivity
adb shell am start -n com.motorola.blur.simmanager/.SimManagerActivity
adb shell am start -n com.android.settings/.TestingSettings

[Q] LG Optimus P880 App Removal (Safe List)

Does anyone have a list of app/bloatware that we can remove safely using Titanium Backup?
Something like a list i saw for Xperia phone:
h t t p : // forum.xda-developers.com/showthread.php?t=1046699&highlight=safe+to
Could you direct me to such a list? or maybe add to this forum. Thanks.
I create my script for remove some app in 4x HD as below
adb shell "su -c 'rm /system/app/AppBox.apk'"
adb shell "su -c 'rm /system/app/CalendarWidget.apk'"
adb shell "su -c 'rm /system/app/CameraTestApp.apk'"
adb shell "su -c 'rm /system/app/Chrome.apk'"
adb shell "su -c 'rm /system/app/ChromeBookmarksSyncAdapter.apk'"
adb shell "su -c 'rm /system/app/DrmProvider.apk'"
adb shell "su -c 'rm /system/app/DrmService.apk'"
adb shell "su -c 'rm /system/app/EmailWidget.apk'"
adb shell "su -c 'rm /system/app/FavoriteContactsWidget.apk'"
adb shell "su -c 'rm /system/app/Finance.apk'"
adb shell "su -c 'rm /system/app/GMS_Maps.apk'"
adb shell "su -c 'rm /system/app/HiddenMenu.apk'"
adb shell "su -c 'rm /system/app/HiddenSIMUnlockManu.apk'"
adb shell "su -c 'rm /system/app/HTMLViewer.apk'"
adb shell "su -c 'rm /system/app/LGCbReceiver.apk'"
adb shell "su -c 'rm /system/app/lgercui.apk'"
adb shell "su -c 'rm /system/app/LGFotaClient.apk'"
adb shell "su -c 'rm /system/app/LGHome3_Theme_Biz.apk'"
adb shell "su -c 'rm /system/app/LGHome3_Theme_Cozywall.apk'"
adb shell "su -c 'rm /system/app/LGHome3_Theme_Marshmallow.apk'"
adb shell "su -c 'rm /system/app/MediaHome_X3.apk'"
adb shell "su -c 'rm /system/app/MemoWidget.apk'"
adb shell "su -c 'rm /system/app/MusicWidget.apk'"
adb shell "su -c 'rm /system/app/NativeLiveWallpapersPicker.apk'"
adb shell "su -c 'rm /system/app/News.apk'"
adb shell "su -c 'rm /system/app/PlusOne.apk'"
adb shell "su -c 'rm /system/app/SmartShare.apk'"
adb shell "su -c 'rm /system/app/Street.apk'"
adb shell "su -c 'rm /system/app/VoiceSearch.apk'"
adb shell "su -c 'rm /system/app/WeatherWidget.apk'"
adb shell "su -c 'rm /system/app/YouTube.apk'"
adb shell "su -c 'rm /system/app/HomeSelector.apk'"
adb shell "su -c 'rm /system/app/LGHome3.apk'"
adb shell "su -c 'rm /system/apps/bootup/LGWorld.apk'"
adb shell "su -c 'rm /system/apps/bootup/LGWorldClockWidget.apk'"
adb shell "su -c 'rm /system/apps/bootup/NativeLiveWallpapers.apk'"
adb shell "su -c 'rm /system/apps/bootup/NativeNoiseField.apk'"
adb shell "su -c 'rm /system/apps/bootup/PowerControlWidget.apk'"
adb shell "su -c 'rm /system/apps/bootup/TodayPlusWidget.apk'"
adb shell "su -c 'rm /system/apps/bootup/PolarisOffice.apk'"
Click to expand...
Click to collapse
somboons said:
I create my script for remove some app in 4x HD as below
Click to expand...
Click to collapse
I think, you should change ".apk" to ".*". It will also remove *.odex files
I will try to use Titanium Backup to freeze them.
More input will be be welcomed. Thanks
m0b said:
I think, you should change ".apk" to ".*". It will also remove *.odex files
Click to expand...
Click to collapse
I already deodex and remove .odex successly.
Will this make my battery last longer.. ? I just got this phone and im not impressed with the battery use..
If i remove all the things above will my phone still work correctly..
supernielsen said:
Will this make my battery last longer.. ? I just got this phone and im not impressed with the battery use..
If i remove all the things above will my phone still work correctly..
Click to expand...
Click to collapse
I am seriously thinking of buying the lg 4xhd. Only stenho some doubts in relation to their consumption, lack of updates and the impossibility to install custom rooms. Give me your opinion about this equipment.
If you tried uninstalling all these app, tell us what the new cell behavior
Manholas said:
I am seriously thinking of buying the lg 4xhd. Only stenho some doubts in relation to their consumption, lack of updates and the impossibility to install custom rooms. Give me your opinion about this equipment.
If you tried uninstalling all these app, tell us what the new cell behavior
Click to expand...
Click to collapse
I have removed almost every app with some exceptions on the ones that i actually use and like..
The phone is so much faster now and running real smooth.. Power comsumption is MUCH MUCH better..
Am actually very satisfied about it now..
EDIT: I actually decided to remove the rest so i took them from the top and down.. !!! That were the biggest mistake in my life.. Lock screen perfect after that just black screen !
Is there anything i can do now.. ?
supernielsen said:
I have removed almost every app with some exceptions on the ones that i actually use and like..
The phone is so much faster now and running real smooth.. Power comsumption is MUCH MUCH better..
Am actually very satisfied about it now..
EDIT: I actually decided to remove the rest so i took them from the top and down.. !!! That were the biggest mistake in my life.. Lock screen perfect after that just black screen !
Is there anything i can do now.. ?
Click to expand...
Click to collapse
Re flash it to it's original state.
Zhus06 said:
Re flash it to it's original state.
Click to expand...
Click to collapse
I made a hard reset.. ? that is not enough..
So i need to do something like flash with odin or what do you mean.. ? Im kinda lost right now and pretty confused..
sheesh..
I know its a somehow not too new thread but for the records...
you always should back up apps with titanium backup before you remove them.
if you didnt:
it should be possible to get these apks from someone else and restore them on your phone by copying them to the appropriate place.
[edit] you can also just make a backup with the preinstalled backup tool.
reset
supernielsen said:
I made a hard reset.. ? that is not enough..
So i need to do something like flash with odin or what do you mean.. ? Im kinda lost right now and pretty confused..
Click to expand...
Click to collapse
I hope this isnt to late to help u.
Try to put out the battery and restart with power + volium down (recovery)
or power + volium up (also named recovery by my phone but its similiar to odin mode) --hold the buttons ´til u can see a white window
try in which mode do u can go.
1.Try to go in second mode.
2.Now u should be able to use the LG PC suite.
3.Connect phone via usb.
4.Click [install usb driver](needs admin rights)
5.If this was succesfulle, click at [SW-Upgrade] (or SW-Update)
If u cant go in recovery mode try to conect it during the boot --Then go to step 2.--
i hope i could help u and it was not to late
and sorry for my bad english
hello! I can not synchronize my google bookmarks with stock browser. I lost chromebookmarksSyncAdapter.apk and ChromewithBrowser.apk and the respective files.odex from system/app folder.
Could someone kindly post them?

Issue with SuperSU on AndroidThings 1.0

I tried to perform a manual installation of SuperSU (2.82 SR5) on my Raspberry Pi running the developer version of AndroidThings 1.0.4, which is based on Android 8.1.0 / API 27. Rather than flashing the zip in recovery, as I'm not sure where to start with that on the Things platform, I manually pushed files and set file permissions and contexts via adb shell. My guide for this was the summary at the top of the script at SuperSU/META-INF/com/google/android/update-binary.
The new su binary appears to work for the most part. I can execute su and read/write with the interactive shell. However, when I attempt to execute the same operations as a command through su (ie: su -c mkdir /system/testdirectory), it responds saying its a read-only filesystem. The filesystem has been remounted with adb remount. I'm unable to perform the remount with the mount command, as /system is not listed in /proc/filesystems. From my understanding, this is due to some recent security model changes in Android. That being said, after the adb remount, all other normal interactions with the filesystem seem to work without issue. I have verified that selinux is in permissive mode.
I don't have busybox installed. These efforts are to allow for installation of busybox for other projects.
Does anybody know whats causing the commands proxied through su to not work correctly?
Here are the commands I used to perform my manual installation.
Code:
cd ~/Downloads/SuperSU-2.82-SR5
adb connect [IP_ADDRESS]:5555
adb root
adb remount
adb push common/install-recovery.sh /system/etc/install-recovery.sh
adb shell chmod 0755 /system/etc/install-recovery.sh
adb shell chcon u:object_r:toolbox_exec:s0 /system/etc/install-recovery.sh
adb shell ln -s /system/etc/install-recovery.sh /system/bin/install-recovery.sh
adb shell chcon -h u:object_r:toolbox_exec:s0 /system/bin/install-recovery.sh
cd armv7
# adding as `su_next` to prevent any issues before dropping it in
adb push su /system/xbin/su_next
adb shell chmod 0755 /system/xbin/su_next
adb shell chcon u:object_r:system_file:s0 /system/xbin/su_next
adb push su /system/xbin/daemonsu
adb shell chmod 0755 /system/xbin/daemonsu
adb shell chcon u:object_r:system_file:s0 /system/xbin/daemonsu
adb push supolicy /system/xbin/supolicy
adb shell chmod 0755 /system/xbin/supolicy
adb shell chcon u:object_r:system_file:s0 /system/xbin/supolicy
adb push libsupol.so /system/lib/libsupol.so
adb shell chmod 0644 /system/lib/libsupol.so
adb shell chcon u:object_r:system_file:s0 /system/lib/libsupol.so
adb shell cp /system/bin/app_process32 /system/bin/app_process32_original
adb shell cp /system/bin/app_process32 /system/bin/app_process_init
adb shell rm /system/bin/app_process
adb shell ln -s /system/xbin/daemonsu /system/bin/app_process
adb shell rm /system/bin/app_process32
adb shell ln -s /system/xbin/daemonsu /system/bin/app_process32
adb shell chmod 0755 /system/bin/app_process
adb shell chmod 0755 /system/bin/app_process32
adb shell chcon u:object_r:system_file:s0 /system/bin/app_process
adb shell chcon u:object_r:zygote_exec:s0 /system/bin/app_process32
# Swapping new su binary in
adb shell cp /system/xbin/su /system/xbin/su_original
adb shell rm /system/xbin/su
adb shell mv /system/xbin/su_next /system/xbin/su
adb shell /system/xbin/su --install
adb reboot
I need to correct myself: the new su binary can only read with privileges. It cannot write at all. I am only able to write either as the adb root shell, or with the stock su binary. I noticed that the device's adbd process relaunches with its own privileged context passed to it when adb remount is run. (adbd --root_seclabel=u:r:su:s0)
If I've run adb root and adb remount, adb shell, and then enter the su binary, I lose the ability to write to the remounted filesystem. So it appears that there is something wrong with the new su binary and its related files.
Anyway, this isn't critical to my project, so I'm abandoning my efforts for now. If anyone has any ideas on what is wrong here, I'd love to hear them and give this another shot!

[SCRIPT] [HACK] root on most variant

REMOVED
Mods please close thread
Code:
adb push su98 /data/local/tmp
adb shell cd data/local/tmp && adb shell chmod 775 su98 && adb shell ./su98 && adb shell su
adb push recovery /sdcard
adb shell cat /dev/zero >> /dev/mtd/mtd2 && adb shell cd /sdcard && adb shell flash_image recovery /sdcard/recovery.img
adb shell rm /sdcard/recovery.img
adb shell reboot
sorry this is incomplete, more like a PoC
I think will not work if bootloader still locked
GiaiPhapAndroid said:
I think will not work if bootloader still locked
Click to expand...
Click to collapse
yEs

Categories

Resources