How to use addon.d or scripts after OTA on LOS without ROOT? - OnePlus 3 Questions & Answers

I think I already know the answer but you'll never know.....
I am looking into options to use LOS17 in combination with LOS recovery because then it is possible to have OTA updates even when storage is encrypted.
Though, I would like to have the option to use a script so I can remove some system apps, add some stuff to build.prop and remove some temporary files after every OTA.
As far as I know the only way this is possible is to add an a script to /system/addon.d.
Therefor I have tried using adb to push a file, though when phone is not rooted, it is not possible to use adb root and then adb remount rw and adb push.
So here the questons;
- Is is possible to add a script to /system/addon.d, though without root and without TWRP?
- When not; is there another way to run a script after every OTA without root and without TWRP?
Setup:
LOS 17.1 without root, encrypted and locked bootloader

I will answer myself as it seems OR a stupid question OR something else....
But, as already expected, without root en with a locked bootloader, the recovery is the only place where you can do something root-related when the recovery is giving this option ofcourse. LOS recovery, automatic OTA updates and additional scripts is therefor not possible because you can not place or modify stuff in /system (as it should be out of security concerns on non-rooted devices).
Though, @nvertigo67 posted a nice post about this topic. After reading I realised that, as I want to be in control of my phone AND I want to pay something back to our great dev's, I will definitely stick with TWRP and flashing and running scripts myself.
How to install LOS with TWRP, encrypt en relock bootloader can be found here.
Topic closed for me.

I messed it up myself with my modified build.prop settings:
By design adb root command works in development builds only (i.e. eng and userdebug which have ro.debuggable=1 by default). So to enable the adb root command the ro.debuggable=1 line must be in build.prop, which I have set to 0 for CTS reasons.
Unfortunately it seems my banking app is looking for this parm because when set to 1 the app is giving an error message on startup.
So no adb root for me as long as I want to use the banking app.

Related

Rooting, Recovery and Clockwork Mod

I've rooted a previous phone (G2) and I'm planning on rooting my Galaxy Nexus before I get too much stuff on it.
I know that I have to unlock the bootloader first and plan on doing that soon. I'll probably use the WugFresh utility linked here: http://forum.xda-developers.com/showthread.php?t=1454314
That said, I'm trying to understand why running a custom recovery is necessary for rooting. I can understand wanting root on startup, but once you're unlocked is it not possible to gain root after the phone was booted?
My concern with running Clockwork is of three parts:
I don't want OTA updates to fail
I don't want to have to reflash stock recovery to get the OTA to install
I don't want to have to reinstall Clockwork Mod between OTAs just to keep root
Perhaps I'm not understanding something in the process here. If someone could spoon feed this information to me it would be greatly appreciated.
1. Don't use a one-click method. Learn to use fastboot and do it manually...it'll serve you well in the long run
2. Once you have CWM you'll have to flash OTA updates manually so they will fail if just downloading so you WILL have to flash the stock recovery to successfuly apply OTA updates without intervention
Mostly what eddyOS said.
CWM isn't permanent unless you remove the install-recovery.xxx (don't remember extension) file from system/etc and I think there is another file in a separate folder but I don't recall where off the top of my head.
so you can use fastboot flash clockwork mod, install a zip and the next time you boot the phone it will restore the stock recovery.
If you want to use clockwork mod to install a zip later just fastboot flash recovery <clockworkmod.img>, then fastboot reboot recovery and you are back in clockwork mod, reboot the phone after flashing and back to stock recovery no problem.
I personally prefer to have CWM permanently on the phone, mostly because i'm lazy and sometimes i like to flash things when I'm not next to my PC. Now that I think about it though ROM manager might let you flash the recovery while on the go.
I wound up using the GNex toolkit linked here to root the phone: http://forum.xda-developers.com/showthread.php?t=1392310
I have the Superuser installed on the phone now, but I didn't flash CWM. I verified that I have root access from Titanium Backup Pro.
That said, can someone tell me why Clockwork either is or sounds like it's required for root?
Is the consequence of rooting my phone with the GNex Toolkit without CWM that the next OTA will remove root?
I still am not sure I completely understand the correlation between the two. As Michael Scott would say, explain it to me like I'm eight...
CWM is not required to gain root access and install the superuser stuff.
There are 2 main components to "rooting" or gaining root access, the su binary and the Superuser.apk app. The su binary provides root access and the Superuser.apk app provides app level root access to other Android apps.The Superuser.apk app can be installed normally through Android but the su binary needs to be installed on the /system mount which is read only.
On most Android devices there have been various exploits of getting the su binary in /system and getting it to stick there. Traditionally these are referred to as rooting methods. On the Galaxy Nexus, because it is a Nexus device, we are provided source code and access to the boot process and storage on the device (referred to as unlocking the bootloader).
When an Android device powers up it goes through a boot up process to load and start the necessary components and services to get the device running. One phase of this boot process is to temporarily load a working OS so various initialization tasks can be done, such as loading device drivers and mounting file systems. This working OS is actually a very barebones linux configuration by loading an instance of the kernel and setting up its file system in RAM.
Because we have access to the source code for this boot process and because the bootloader can be unlocked we can modify the boot process to place the su binary in the /system mount for us. This modified source code can be compiled and used to boot the phone. This is how we "root" the Galaxy Nexus. The toolkits have a copy of this modified boot.img and all it does is unlock your bootloader and boot this boot.img which install the su binary and Superuser.apk files for you.
In regards to CWM. The Android recovery is a special process that can be triggered in the boot process. It itself is also an instance of a working OS by loading a kernel and setting up its file system in RAM. What the CWM developer has done is in addition to his modifications and additions to the recovery utilities he has enabled the ADB daemon and set up the su binary in the recovery's file system so we have ADB and root access when CWM boots up - a very handy feature.
So CWM doesn't "root" your phone at all - it only provides root access when it's booted. OTA updates may remove the su binary but generally it can be restored by rebooting the modified boot.img. There are caveats that I haven't mentioned. Sometimes these OTA updates contain a new bootloader that can invalidate booting a previous boot.img.
silow said:
CWM is not required to gain root access and install the superuser stuff.
There are 2 main components to "rooting" or gaining root access, the su binary and the Superuser.apk app. The su binary provides root access and the Superuser.apk app provides app level root access to other Android apps.The Superuser.apk app can be installed normally through Android but the su binary needs to be installed on the /system mount which is read only.
On most Android devices there have been various exploits of getting the su binary in /system and getting it to stick there. Traditionally these are referred to as rooting methods. On the Galaxy Nexus, because it is a Nexus device, we are provided source code and access to the boot process and storage on the device (referred to as unlocking the bootloader).
When an Android device powers up it goes through a boot up process to load and start the necessary components and services to get the device running. One phase of this boot process is to temporarily load a working OS so various initialization tasks can be done, such as loading device drivers and mounting file systems. This working OS is actually a very barebones linux configuration by loading an instance of the kernel and setting up its file system in RAM.
Because we have access to the source code for this boot process and because the bootloader can be unlocked we can modify the boot process to place the su binary in the /system mount for us. This modified source code can be compiled and used to boot the phone. This is how we "root" the Galaxy Nexus. The toolkits have a copy of this modified boot.img and all it does is unlock your bootloader and boot this boot.img which install the su binary and Superuser.apk files for you.
In regards to CWM. The Android recovery is a special process that can be triggered in the boot process. It itself is also an instance of a working OS by loading a kernel and setting up its file system in RAM. What the CWM developer has done is in addition to his modifications and additions to the recovery utilities he has enabled the ADB daemon and set up the su binary in the recovery's file system so we have ADB and root access when CWM boots up - a very handy feature.
So CWM doesn't "root" your phone at all - it only provides root access when it's booted. OTA updates may remove the su binary but generally it can be restored by rebooting the modified boot.img. There are caveats that I haven't mentioned. Sometimes these OTA updates contain a new bootloader that can invalidate booting a previous boot.img.
Click to expand...
Click to collapse
Thanks a lot for breaking it down for me; much appreciated.
silow said:
CWM is not required to gain root access and install the superuser stuff.
There are 2 main components to "rooting" or gaining root access, the su binary and the Superuser.apk app. The su binary provides root access and the Superuser.apk app provides app level root access to other Android apps.The Superuser.apk app can be installed normally through Android but the su binary needs to be installed on the /system mount which is read only.
On most Android devices there have been various exploits of getting the su binary in /system and getting it to stick there. Traditionally these are referred to as rooting methods. On the Galaxy Nexus, because it is a Nexus device, we are provided source code and access to the boot process and storage on the device (referred to as unlocking the bootloader).
When an Android device powers up it goes through a boot up process to load and start the necessary components and services to get the device running. One phase of this boot process is to temporarily load a working OS so various initialization tasks can be done, such as loading device drivers and mounting file systems. This working OS is actually a very barebones linux configuration by loading an instance of the kernel and setting up its file system in RAM.
Because we have access to the source code for this boot process and because the bootloader can be unlocked we can modify the boot process to place the su binary in the /system mount for us. This modified source code can be compiled and used to boot the phone. This is how we "root" the Galaxy Nexus. The toolkits have a copy of this modified boot.img and all it does is unlock your bootloader and boot this boot.img which install the su binary and Superuser.apk files for you.
In regards to CWM. The Android recovery is a special process that can be triggered in the boot process. It itself is also an instance of a working OS by loading a kernel and setting up its file system in RAM. What the CWM developer has done is in addition to his modifications and additions to the recovery utilities he has enabled the ADB daemon and set up the su binary in the recovery's file system so we have ADB and root access when CWM boots up - a very handy feature.
So CWM doesn't "root" your phone at all - it only provides root access when it's booted. OTA updates may remove the su binary but generally it can be restored by rebooting the modified boot.img. There are caveats that I haven't mentioned. Sometimes these OTA updates contain a new bootloader that can invalidate booting a previous boot.img.
Click to expand...
Click to collapse
su binary provides root level access.
SuperUser.apk is nothing more than a firewall to save you from yourself.
Busybox is a very important util that provides a lot of the su copy, read, write functions.
Having the correct permissions enabled is essential for all of these to work...
The bootloader has write access to system and recovery, but in its locked state it can only flash files signed by the same originator as the bootloader itself. Unlocked, it can flash anything...
Similarly, stock recovery had write access to system etc, but the stock recovery can only flash files by the same originator as the the recovery. Custom recovery has a lot more flexibility...
Unlocking the bootloader allows you to flash a non-signed recovery. The custom (non-signed) recovery allows you to modify pretty much anything, including the installation of the su binary and busybox into /system

Almost Complete Directions for A100(root, unlock, cwm, flash ROM)(HC & ICS info)

A Work in progress.
DISCLAIMER!
This Document ONLY applies to Acer Iconia A100 devices. For info on upgrading from HC to ICS you can look HERE to see the method I used to upgrade from stock HC 3.2 GEN2 to ICS (Note: This was before the general ICS release. It works on OTA update also) Then follow these directions to get to CWM with Custom ROM.
I'm writing this because we STILL don't seem to have a single clear set of instructions. So here is my attempt at getting one started. Please feel free to point out errors, or help us build a set of directions. I'm not trying replace anyones documentation or take credit for anything. All the info in these directions can already be found here in various posts.
Thanks to Vache, Civato, ZeroNull, Euclid's Brother, Ptesmoke, abliss, aznmode, eew245, crossix, Icewyng, toyface, PG101, Smokku and Everyone else for all the Work an Insight.
ROOT
To root ICS Leaks you need to use mempodroid(info & file here). Eew245 wrote up instructions (on applying mempodroid on A100 to obtain a root shell). ZeroNull also has made a basic script found here that will root the device for you if you prefer.
I use the method outlined by Eew245. You can use your own "su" and "busybox" binaries if you saved them. This method provides full permanent root.
I suggest you install superuser.apk and busybox installer after rooting. Superuser.apk will provide access control for superuser and busybox installer will allow you to update busybox. I also recomend installing terminal emulator(don't forget to configure it to use /system/xbin/sh after you install busybox).
UNLOCK
ZeroNull has made an easy to use package with instructions here If you don't have the Android SDK installed ZeroNulls method works fine. However if you want to use your own platform-tools you will need to modify the scripts first.(Just change the path for adb. Otherwise it will try to look for adb in the scripts working directory instead of platform-tools).
Pic of Bootloader warning about unlocking from Acer
PIC HERE
Lock Unlock Icons from same bootloader screen.
PIC HERE
Note: If you miss the window of oportunity running the script or unlock commands the first time. You DON'T need to rerun the whole script. The a200 bootloader is already installed. You just need to fastboot reboot bootloader again from your console, THEN you can use the vol keys and home to unlock the bootloader. BUT do what ever you feel safest doing and just pay attention and be careful. (Here I'm referring to the waiting too long after the script boots recovery into unlock mode. If you wait too long it times out and you can't choose unlock until you fastboot reboot bootloader again.)
RECOVERY
(make sure you have installed the a200/unlocked bootloader first. You will see a message at the top of the screen that says (UNLOCK MODE) when bootloader is showing it's message at boot.)
Here is the message I'm referring to PIC HERE
NOTE: When installing a Custom Recovery at some point you have to rename /etc/install-recovery.sh or remove it. I would recomend you rename it to install-recovery.sh.bak. You should do this before doing "adb reboot bootloader" otherwise when you try to reboot into recovery from ROM manager you will get a dead android because cwm will be overwriten with the old recovery(and you don't want that). If you DO get a dead android carefully read the directions again. Q. Why didn't I put this in a step? A. Because I dont want people to brick a device so I want to make sure they are paying attention before I tell them to rename a file that will keep the system from fixing recovery if they mess up.
Using Acer Recovery Installer 2.99 Beta(NOT MARKET VERSION)
=======================================
Download .apk enable non-market installers. Run installer, enjoy.
The Acer Recovery Installer 2.99 Beta is found HERE
Using ADB/Fastboot to flash CWM
============================
Use the steps found HERE(obviously don't re-root, unlock, just follow the other parts.
Or you can also use A100 TWRP recovery v2.1.0+ I have not tried it yet. It looks nice, has touch screen functionality, I think it uses a different backup format or something though. I'm not sure and have not had time to read up on it yet.
NOTE: Read my note above about /etc/install-recovery.sh
FLASH FROM CWM
==============
If you used ADB/Fastboot method you will need a way to reboot into CWM. ROM manager or bootloader reboot thingie will work for this.
If you installed Acer Recovery Image you can use it the app to boot into CWM.
CWM 5.5.0.4 uses the Volume Up/Down Toggle to navigate the menu and a short click of the power button to select things. Be careful about what you choose to do in CWM.
MAKE A BACKUP!!
===============
If you have just installed a custom recovery NOW would be a GOOD time to make a backup with CWM.
To Install a Custom ROM
===============
(BE CAREFUL. MAKE SURE The ROM you choose to install DOESN'T have a bootloader.blob and/or /recovery folder inside. Otherwise it could overwrite your CWM)
Just put the .zip file on an SD card and put it into the device. Use ROM Manager or Acer Recovery Installer
More to come, and I will add some pics showing what various screen look like when I'm able.
"I suggest you install superuser.apk and busybox installer after rooting. Superuser.apk will provide access control for superuser and busybox installer will allow you to update busybox. I also recomend installing terminal emulator(don't forget to configure it to use /system/xbin/sh after you install busybox)."
So ZeroNull says to not update busybox ...you say to update it...is there really a problem if you update it??
cheeb said:
"I suggest you install superuser.apk and busybox installer after rooting. Superuser.apk will provide access control for superuser and busybox installer will allow you to update busybox. I also recomend installing terminal emulator(don't forget to configure it to use /system/xbin/sh after you install busybox)."
So ZeroNull says to not update busybox ...you say to update it...is there really a problem if you update it??
Click to expand...
Click to collapse
i +1 the question what will break if i update busy box?
cheeb said:
"I suggest you install superuser.apk and busybox installer after rooting. Superuser.apk will provide access control for superuser and busybox installer will allow you to update busybox. I also recomend installing terminal emulator(don't forget to configure it to use /system/xbin/sh after you install busybox)."
So ZeroNull says to not update busybox ...you say to update it...is there really a problem if you update it??
Click to expand...
Click to collapse
I don't know if this helps or makes things worst, but I have updated busybox after using Zeronull's root script on pretty much every ICS leak, CM9, and Flexreaper without any issues at all. I always read that warning, but ignored it because I need a more complete busybox version for certain tasks I run on my tablet.
NoSudo said:
A Work in progress.
Using ADB/Fastboot to flash CWM
============================
Use the steps found HERE(obviously don't re-root, unlock, just follow the other parts.
Click to expand...
Click to collapse
Just a little tip. Actually same thread post#28 uses very simple method thanks to mapaz04 to flash the recovery.
Great job though!
I did almost the same in my native language.
cheeb said:
"I suggest you install superuser.apk and busybox installer after rooting. Superuser.apk will provide access control for superuser and busybox installer will allow you to update busybox. I also recomend installing terminal emulator(don't forget to configure it to use /system/xbin/sh after you install busybox)."
So ZeroNull says to not update busybox ...you say to update it...is there really a problem if you update it??
Click to expand...
Click to collapse
I have not used ZeroNulls root method. So I am not sure why he says that. I think his script MAY just use the su and busybox in place in /data/local/ or something(not sure havnt D/L the package to figure it out). You CAN setup su and busybox in the correct locations WITHOUT an issue in ICS.
I use the "hard" method which is very simple. I KNOW you can remove the /data/local/tools copy afterwords doing it by hand.
An Explanation:
The reason you have to push su, mempodroid, busybox, and a mount script to /data/local/ is because you can get write access to it WITHOUT su. Then you run mempodroid which does a little magic and tricks system into thinking a shell was started by root. This drops you into the # prompt(temp). Then you mount /system(still using the files from /data/local). Then you copy the files to the correct path inside /system. Once you chmod su and run it you get root becase su is a special kind of executable. It's what is called an SUID application. As long as the permissions are correct to allow you read/exec access to both su and busybox. You no longer need /data/local/tools. At this point you CAN update busybox and su if you like.
P.S. You can also use your OLD su and busybox for the whole thing. I saved my old su and busybox and always just reuse them then update.
If you want to understand more I would suggest reading up on what SUID is all about and also learn about Unix file permissions.
I can confirm that: rooting,bootloader unlock and change on the recovery can be made with OTA update.
Nice work!
gertjanad said:
Nice work!
Click to expand...
Click to collapse
Thanks, and a bump to keep the info around the first page.
Added to bump it back up so people can find it.
Is there a kernel that allows overclocking yet
Sent from my A100 using XDA
I have not played with OCing, I honestly don't see a need.
I know cwm 5.5.0.x has an Overclock menu so I'm guessing yes you can. But I am not familiar enough with the device/cpu to know how the multipliers etc are to be configured, nor do I experience lag or performance issues that would cause me to desire lowering battery efficiency and increase heat for faster performance.
Though I am familiar with the process on PCs both jumpered and jumperless.
Up!

[Q] Rooting does not work 100% fine

Hello.
I have rooted my phone using
http://htc-one.wonderhowto.com/how-to/unlock-bootloader-root-your-htc-one-m8-0154444/
(in short, it's using SuperSU 2.00)
After some efforts, Root Checker says i am fine. I can get id 0 from adb, and via ssh.
But ... Busybox fails to install.
And if I remount /system RW, and mess in there a bit (like mkdir /system/tmp ), the mess is removed after reboot. Changes are not permanent.
Must I change my su app for superuser mentionned in the FAQ of the section (via recovery) ? Are there things to do before this migration ?
Other possible issues ?
I am used to fully unlocked HTC Sensation, where I changes to /system are easily permanent. But it was done using an exploit, few before HTC allowed rooting officially. Rooted M8 does not seem as much friendly ...
I *really* need busybox to work, and make permanent changes to /system. I am stuck.
Thanks.
doublehp said:
Hello.
I have rooted my phone using
http://htc-one.wonderhowto.com/how-to/unlock-bootloader-root-your-htc-one-m8-0154444/
(in short, it's using SuperSU 2.00)
After some efforts, Root Checker says i am fine. I can get id 0 from adb, and via ssh.
But ... Busybox fails to install.
And if I remount /system RW, and mess in there a bit (like mkdir /system/tmp ), the mess is removed after reboot. Changes are not permanent.
Must I change my su app for superuser mentionned in the FAQ of the section (via recovery) ? Are there things to do before this migration ?
Other possible issues ?
I am used to fully unlocked HTC Sensation, where I changes to /system are easily permanent. But it was done using an exploit, few before HTC allowed rooting officially. Rooted M8 does not seem as much friendly ...
I *really* need busybox to work, and make permanent changes to /system. I am stuck.
Thanks.
Click to expand...
Click to collapse
The /system partition is write protected on stock, meaning you can't add, modify, or delete files there. To disable this, you need to flash a kernel or rom with this disabled. Pretty much all sense based roms/kernels will state this in the features. I believe S-Off also disables it if you want to go the extra mile.
PS: Write protection is disabled in recovery. That is why superuser/root could be installed there.
PPS: Here is the kernel I run (protection disabled): http://forum.xda-developers.com/showthread.php?t=2705613
akitten007 said:
The /system partition is write protected on stock, meaning you can't add, modify, or delete files there. To disable this, you need to flash a kernel or rom with this disabled. Pretty much all sense based roms/kernels will state this in the features. I believe S-Off also disables it if you want to go the extra mile.
PS: Write protection is disabled in recovery. That is why superuser/root could be installed there.
PPS: Here is the kernel I run (protection disabled): http://forum.xda-developers.com/showthread.php?t=2705613
Click to expand...
Click to collapse
So, is there a way to install busybox via recovery ?
I did 3 things in recovery: all in /system/xbin
- chmod +s su
- touch t
- mkdir tmp
after reboot to normal mode, SUID bit was removed, but t and tmp are still here.
So, how do I install busybox ?
New issue: /data has the nodev flag; is it possible to remove it ?
I did not found /dev/shm ; was it moved somewhere else ? Any other place for similar use ? (world write temp folder in RAM).
akitten007 said:
PPS: Here is the kernel I run (protection disabled): http://forum.xda-developers.com/showthread.php?t=2705613
Click to expand...
Click to collapse
If your kernel allows me to install busybox, can i backup my original kernel to restaure it afterwards ?
Can I install busybox manually via recovery+adb ? I don't have any dev suite, but a good linux station; so, I can unzip, list, copy, and so on ... if there is not too much work to do.
doublehp said:
If your kernel allows me to install busybox, can i backup my original kernel to restaure it afterwards ?
Can I install busybox manually via recovery+adb ? I don't have any dev suite, but a good linux station; so, I can unzip, list, copy, and so on ... if there is not too much work to do.
Click to expand...
Click to collapse
Now you're starting to go over my head. If you want to keep your current kernel, I would try using this method here to manually add the module that disables the protection http://forum.xda-developers.com/showthread.php?t=2702575. I usually just install busybox using rom toolbox or any other busybox app. You could search for a busybox zip, but just disabling the write protection is a better option in my opinion. And I have actually 0.00 idea what flags mean on folders (sorry).
I rooted using TWRP recovery and super su. That guide you posted gives unnecessary instructions. TWRP automatically installs the SU binary and Super su the first time you boot into it. I was able to update Super su via google play, no need for the update zip. Just follow the instructions after rebooting to system from TWRP recovery.
I'm s-off, unlocked, my kernel, firmware and os are stock, only thing that isn't is recovery. I have write access to system and external sd card. All I did was make it writable with root explorer and have installed busy box no problem using this app https://play.google.com/store/apps/details?id=stericson.busybox.
I was given a better fix.
http://forum.xda-developers.com/showthread.php?t=2701816
In short:
adb push /mnt/big/tmp/wp_mod_m8.ko /mnt/sdcard/Download/
insmod /mnt/sdcard/Download/wp_mod_m8.ko
mount -o remount,rw /system
cd /system
touch z
mkdir zz
reboot
[email protected]_m8:/storage/emulated/legacy # cd /system/
[email protected]_m8:/system # ls
app
bin
build.prop
customize
etc
fonts
framework
lib
lost+found
media
priv-app
tts
usr
vendor
xbin
z
zz
[email protected]_m8:/system #
The miror is on maintainance for now. So, the guy on IRC gave me his local backup. I will push it here for 30 days:
http://dl.free.fr/gSha53ljz
(server will delete it after 30d nobody downloads it)
Busybox still fails to install; don't know why.

Root Nexus 5x without flashing only to enable Miracast

Hello,
There is only one thing I want root for - to enable the modification suggested here http://forum.xda-developers.com/nexus-5x/help/miracast-t3232833 to enable miracast.
Is there a way to obtain root without any custom recovery or flashing anything? Like in some way use adb to simply modify the build.prop file on the device?
Thank you for your thoughts.
schwarznavy said:
Hello,
There is only one thing I want root for - to enable the modification suggested here http://forum.xda-developers.com/nexus-5x/help/miracast-t3232833 to enable miracast.
Is there a way to obtain root without any custom recovery or flashing anything? Like in some way use adb to simply modify the build.prop file on the device?
Thank you for your thoughts.
Click to expand...
Click to collapse
You're on the right track!
You absolutely can edit the build.prop by using ADB. Just google how and you do not need root in order to edit build.prop. I've done it with my work phone to change the density.
Hi There. Thanks for replying. I see that the concept is pretty simple -- use adb to pull the build.prop file, edit it, and then use adb to push the build.prop file back.
This page has an example: https://www.quora.com/How-do-I-edit-the-build-prop-file-in-Android-without-Rooting-it
What I can't figure out is how to actually push the file back without rooting. I think I have to mount the system partition in read/write. To do that I think I need root. I try running adb as root, to then mount the partition, but I get "adbd cannot run as root in production builds." Any suggestions on how to get around that?

Is it possible to encrypt device after rooting? If so, how?

It seems that most of the community is gravitating toward disabling forced encryption, so I might be alone here, but I actually like the idea of having the device encrypted.
I rooted my device without flashing twrp (I'll cover the steps I took in just a second) so that it could retain the original stock recovery. I'm trying to keep the device as stock as possible, just with root and xposed.
Steps I took are as follows...
Download
Minimal ADB and Fastboot
TWRP
SuperSU (beta)
Xposed
Enable developer mode on device
Code:
adb reboot fastboot
Code:
fastboot boot twrp*.img
(I had to nuke /data at this point, otherwise it wouldn't boot)
Turn on ADB sideload in TWRP
Code:
adb sideload BETA*.zip
Code:
adb sideload xposed*.zip
It's successfully rooted and xposed framework is installed, but it's not encrypted, and if I go into Settings -> Security -> Encryption and attempt to encrypt the device, it will just hang for hours at a time.
If anyone can offer any insight as to how I can get it rooted with xposed framework while retaining device encryption, that would be super helpful.
Figured it out.
Have to create a flag file for SuperSU. It can be any of the following (note leading dot to indicate it's a hidden file)...
/data/.supersu
/cache/.supersu
/system/.supersu
In it, the file needs to contain the following:
Code:
KEEPFORCEENCRYPT=true
Easiest way to accomplish this, for my purposes, is to do
Code:
adb shell 'echo "KEEPFORCEENCRYPT=true" >/data/.supersu'
I restored completely to stock before doing this, to avoid any possible issues. Also, this currently only works with BETA version (SuperSU 2.74). This particular flag's behavior might be inverted in the future, i.e., SuperSU might leave forceencrypt flag by default and require a flag to disable forceencrypt.

Categories

Resources