Can't edit files in / with Chainfire boot.img and systemless root - Nexus 6P Q&A, Help & Troubleshooting

So I'm trying to edit a start up script in / (or anywhere really) and I'm not able to edit the files due to access denied errors.
Do we need a custom kernel (like flar's) to edit files in the root (/)? I'm able to echo into files under /sys/ just fine but I can't open them in a text editor.
Thanks!

Related

[Q] U8800 2.3 owerseas remove stock apk

Since I cant post in development section I will ask here if someone can help me. I have U8800 with 2.3 stock rom and I cant remove stock apps (swype in my case).I am rooted with DooMLoRD_v3_ROOT and SU is instaled. I did find apk file (/cust/hw/default/apk) but I am not able to remove it. I tried with titanium backup, root explorer, terminal emulator (cant find target) and with super manager.It seems like I am half rooted as root explorer cant mount rw in cust directory but works in system directory.Any idea is welcome,thank you!
You need to do it manually via adb shell. First to mount the partition as rw and then to remove it. I want to remove this file too, so I' ll try it asap.
EDIT:
I tried but this partition which is on /dev/block/loop0 cannot be mounted rw, I get a permission denied error.
.
In pinkscreen mode delete cust.image file,then delete apps with titanium backup.
We want to delete only some apps.
With your way we loose all huawei' s custom configuration, it' s like we don' t install step3.
This is not a solution.
I hope that we can find solution for this as I want to instal costum swype with my language enabled (slovenian) and can not do it untill I remove stock one. If any of you can post in development section maybe you can ask there if they know the solution for this, thank you!
I fixed it.
I deleted all unneeded apks (stock apps) that stored in cust.img
My method;
1. On Slitaz Linux 3.0
2. Open terminal
3. Copy cust.img from phone to /home folder
4. mkdir tmp
5. mount cust.img /home/tmp
6. cd /home/tmp/hw/default/app
7. Delete apk files what you don't want
8. unmount tmp
9. Copy cust.img from /home folder to phone
Ok, but I dont have linux or terminal on my computer. Is there any way to do this via terminal emulator on the phone? Or is there some step by step guide how to do it as I am not really familiar with terminal or its use.
http://www.multiupload.com/EKPGJ7EUGO
This is "cleared" cust.img. That contains only these apks;
BeyondTheSkyTheme.apk
Calendar.apk
CalendarProvider.apk
DeskClock.apk
ToolBox.apk
1. Download this rar archive and open it.
2. Start your phone in pink screen mode
3. Backup original cust.img to your computer
4. Copy "cleared" cust.img from rar to phone.
Thank you,I managed to install swype in my language and it works great. I was wondering if there is any chance to extract all factory .apk files and post them somewere so people could donload them and install them if they want. I am missing that weather clock widget but swype is far more important to me, so thank you again to make it possible.
This rar archive contains all apks that stored in cust.img -->> http://www.multiupload.com/8DWKNVTXML
Just copy apk file (which ones do you want) to "/system/app" folder and restart.
or
This is only TotemWeather.apk -->> http://www.multiupload.com/IWX7U3G5FU
Just copy to "/system/app" folder and restart.
Thank you, you are the best. Will this cust.img work with 2.3 beta which will be released this thursday according to Huawei? If not I wont update again as I just managed to adjust phone to my needs.
I hope, it will works with the new update. If not, i'll fix it when update released.
could you give us a cleared cust.img for the official 2.3.5???

Auto mount or symlink at boot

Hello, is it possible to do that ?
Regards
Sure, you have a few options.
The best way (hardest):
-requires root and knowledge of the boot.img and ramdisk partitions of Android
-create the symlink or mountpoint by adding the necessary lines the /init.rc file.
Next best way (not hard if you have init.d support):
-requires root
-requires init.d support
-simply write a script to create your symlink/mountpoint, name it appropriately, and place it in the /system/etc/init.d directory.
-with init.d support, this will automatically run the script at boot and set the parameters you've outlined in said script.
The "other" method (avoid this if possible since it relies on loading an app on boot):
-requires root
-download Script Manager from the play store
-write a script to create your mountpoint or symlink
-configure Script Manager to execute the script on boot.
Hello
I found /init.rc, also found init.00.rc and init.01.rc, but i guess we are talking about the first one (init.rc)
I wasn't able to edit it with a text editor on my tf101, do i need something i don't have to edit it ? Or notepadd++ will be enough ?
In case i fail completly with this, is tasker able apply the line for me too ?
Thanks you for your time.
Regards
Magissia said:
Hello
I found /init.rc, also found init.00.rc and init.01.rc, but i guess we are talking about the first one (init.rc)
I wasn't able to edit it with a text editor on my tf101, do i need something i don't have to edit it ? Or notepadd++ will be enough ?
In case i fail completly with this, is tasker able apply the line for me too ?
Thanks you for your time.
Regards
Click to expand...
Click to collapse
The /init.rc can't be directly modified that way. Everything in the root filesystem "/", as well as the kernel zImage, are loaded at boot from the boot.img image. Therefore, any changes you make will just be reverted when you reboot because it reloads the original from the boot.img image. In order to modify /init.rc, you must pull your boot.img and then extract the files from it. Now you can add the necessary lines to it. After that, you re-combine everything back into the boot.img, and push it back to your device.
If all that sounds unfamiliar to you, you will have some reading to do. Most of this will need to be done on a linux machine too.
What ROM are you running? If you have init.d support, that would be the most straightforward way to accomplish your goals.
I'm running asus' rom .24 on a tf101
I don't know if it support init.d, didn't found this file on my device.
Regards
You can also use an app from here, XDA, called directory bind. It all depends what you're looking to do with those symlinks.
Sent from my Sprint Evo View 4G (PG41200) using Xparent Purple Tapatalk 2
Hello, i plan to move game data to sdcard and symlink it to the old internal place.
Also plan to symlink some folders to the movie folder
Regards
Then directory bind app is designed for just your need. All these solutions require rooting your device.
Sent from my HTCEVOV4G using Xparent Purple Tapatalk 2
I will look at this, thanks.
Directory bind run during boot or after boot ?(little delay before things get re symlinked ?)
Regards

[Q] No root access for the converted JB ROM from NAND to SD

I tried to convert one of the JB ROMs but i can't reference it here now till I:
1- Success to convert it.
2- Get the permission from the developer to make public.
The problem is:
once the ROM started and everything looks fine and i tried to load the superuser, it crashes and any applications that requires root access will fail to function properly like (romtoolbox).
I can confirm that the structure of the system.ext4 is OK and has the 0,0 for User,group
I can also confirm that the file has 777 access.
The same configuration i applied to other converted ROM with Success.
I copied the corrected init.rc, init.htcleo.rc, ...... to the root of the system file.
So, What's missing?

How to Edit build.prop file in Nexus 4

Hi ,
i like to install My galaxy app in my Mako running on lollipop - unable to edit build.prop tried multiple tools.
Can some one help me to edit the file .
Thanks in advance
You need root, and a root file manager like root explorer from play store. Mount the /system partition as r/w, open the file, make changes, and then save and set the partition back to r/o.

How to create update zip for custom Rom 9.0 Pie ?

Hello, I have Rom 9.0 Pie NFE 2.2 loaded, I miss a few things in this Rom, I have to do everything by editing and replacing files in the system, it is time consuming, and it extends the reboot to 1 minute after modifying the files. So I would like to create an update zip file, so that immediately after flashing the rom, I immediately upload the update zip to add the application and replace other files. Please help
Basically you need this folder hierachy inside the update.zip:
Code:
├── META-INF
└── com
└── google
└── android
├── update-binary
└── updater-script
Beside META-INF you put all your desired files, that were needed.
Here is a tool that converts a simple shell script into a flashable update.zip:
[TOOL] Flashize: Turn Shell Scripts Into Flashable Recovery Zips
Flashize: Turn Shell Scripts Into Flashable Recovery Zips Highlights Automatically convert shell scripts to flashable zips with a single command. Don't mess with 'ui_print' crap: standard output and error streams will work just fine. Can...
forum.xda-developers.com
Unfortunately, I don't currently have a working computer, so is it possible to perform a zip update on a Samsung Phone ? One application file is to be added to system/priv-app/here and must have permissions, the rest of the files system/omc/, system/etc/, system/fonts are to be overwritten (substituted files).
Spartacus500 said:
Unfortunately, I don't currently have a working computer, so is it possible to perform a zip update on a Samsung Phone ? One application file is to be added to system/priv-app/here and must have permissions, the rest of the files system/omc/, system/etc/, system/fonts are to be overwritten (substituted files).
Click to expand...
Click to collapse
Did you download that tool to have a look on it? It's only bash script.
WoKoschekk said:
Did you download that tool to have a look on it? It's only bash script.
Click to expand...
Click to collapse
Sorry, but it's beyond me, you need a computer for this, mine is currently broken, so I won't do anything
A shell or a bash (advanced shell) script is written to be executed in a Linux environment like Android. Use Termux (Play Store version is outdated!) to execute the script.
To build a flashable zip you need some scripting skills to tell your zip what to do when it gets flashed.
I don't understand a bit why after flashing Rom 9.0 Pie NFE 2.2 clean the first boot takes about 10 minutes, but it is known because dalvik cache files are created in the data folder, but subsequent system reboots take about 15 seconds, then I upload Magisk 26.0 root and another reboot takes 15 seconds, and now it adds one application to the system/priv on the phone and the next reboot takes 1 minute if I upload modifications via TWRP zip file, the reboot time is unchanged, i.e. about 15 seconds, i.e. any interference on phone turned on by root Explorer causes that the system restart time is extended to 1 minute, and even more in some situations so the best solution would be right after flashing Rom 9.0 Pie NFE 2.2 'without reboot' to load the update zip file and only reboot the system so that you do not have to add, delete and replace files on the phone when it is turned on.
I'm still thinking if it would be possible right after uploading Rom 9.0 Pie NFE without rebooting to the system, add and replace the rest from the TWRP level, add the appropriate permissions, so time consuming and only then reboot the system.
Spartacus500 said:
I don't understand a bit why after flashing Rom 9.0 Pie NFE 2.2 clean the first boot takes about 10 minutes, but it is known because dalvik cache files are created in the data folder, but subsequent system reboots take about 15 seconds, then I upload Magisk 26.0 root and another reboot takes 15 seconds, and now it adds one application to the system/priv on the phone and the next reboot takes 1 minute
Click to expand...
Click to collapse
grab a logcat and a kernel.log right after the boot process is finished (with and without the application in /priv-app):
Code:
### create a system.log (logcat):
logcat -d > /sdcard/logcat.txt
### create a kernel.log:
dmesg -He > /sdcard/kernel.log
You'll find the logs in your internal storage.
BTW: Placing an app manually in /priv-app folder requires some additional steps.
Privileged Permission Allowlisting | Android Open Source Project
source.android.com
This is the privileged apps folder for apps with special permissions. Maybe it's better to store your app in /system/app.
Spartacus500 said:
I'm still thinking if it would be possible right after uploading Rom 9.0 Pie NFE without rebooting to the system, add and replace the rest from the TWRP level, add the appropriate permissions, so time consuming and only then reboot the system.
Click to expand...
Click to collapse
That shouldn't be a problem. Is this app in /priv-app a Magisk module or placed manually by yourself? If it's,a Magisk module then try to flash it directly via TWRP.
All permissions are in this Rom, only there is no application for them, generally it is about one KLMS Agent, this application cannot be installed from the apk level, because it is a system application. Also to replace are the build.prop files in system/build.prop permissions 0600 and system/vendor/build.prop permissions 0600.
WoKoschekk said:
That shouldn't be a problem. Is this app in /priv-app a Magisk module or placed manually by yourself? If it's,a Magisk module then try to flash it directly via TWRP.
Click to expand...
Click to collapse
No, this is not a Magisk module, this file is intended to be permanently in the system, i.e. adding the file manually.
I have a question, I enter TWRP recovery mode, after copying overwriting the application to system/app and priv-app, do I have to give each new application permissions 0644 ?
@Spartacus500 Check the current permissions of each file with
ls -l.
I checked, in TWRP if it copies and overwrites files in the system, you need to grant permissions to folders 0755 and files 0644, build.prop 0600.
Spartacus500 said:
I checked, in TWRP if it copies and overwrites files in the system, you need to grant permissions to folders 0755 and files 0644, build.prop 0600.
Click to expand...
Click to collapse
Try the flash.zip attached.
Put all your files for /system/* together in a folder "system" and keep the folder structure of your file system.
The flash script does...
...merge non-existing files to /system
...overwrite existing ones.
Example for your app + build.prop files:
Code:
system <<= folder for your ZIP
├── build.prop
├── priv-app
│ └── your_app
│ └── your_app.apk
└── vendor
└── build.prop
Your folder "system" should look like this. But feel free to add more files/folders.
The flash script sets permissions for the build.prop files to 0600. For all other files (like your app) the correct permissions will be set automatically.
Unpack my flash.zip and then create a new ZIP archive (no compression needed) with
"system" + "META-INF" + "busybox".

Categories

Resources