Edit build.prop on rooted Moto X Pure MM - X Style (Pure) Q&A, Help & Troubleshooting

Am trying to set up a new property in build.prop but am running into issues with not being able to save the edit properties.
Some things we tried:
mount -o remount,rw /system (BTW we never took it out of this state)
Somehow, during our various futzing, ADB no longer work (we are using Minimal ADB and Fastboot), but was working previously. Fastboot works fine.
Was going to try this in shell, with the following
adb shell mount /system
adb shell
echo "net.tethering.noprovisioning=true" >> /system/build.prop
but without being able to do adb, that won't work...
We did make a copy of the build.prop and moved it to the sdcard, but if I wanted to get it back to /system with the modifications, what do I need to do?
BTW, I remember when I first set this up before current security update (which wiped the prior changes), there was something about the system apps being the issue and we had to remove YouTube. I don't remember how we did that.

Related

Rooted Hero Fails adb remount, can't move files from SD

I rooted my hero last night and tried out a few different ROMs but eventually decided to revert to stock and make some manual changes. I used nandroid to restore to just after the root (1.56.651.2). I was able to remove some apps using adb, but the adb remount command fails (permission denied), and I'm unable to push a new bootscreen on to the phone. I also tried a Root File Manager and pre-kitchen as alternatives for the bootscreen, and neither one works. The Root Manager won't paste the files from SD into /system/media/ and pre-kitchen just reboots the phone.
Any suggestions?
Any chance this has something to do with downloading only up to SDK Platform 1.5? I'm at a total loss. I RUU'd my phone, did a clean root at startup using adb shell, and I still have the same problem. The adb remount command won't work, and I can't push anything into the system directory. For what it's worth, when I still had Root Manager installed I was able to toggle RO R/W in any directory with no problem, and I could move files around within the ROM... but I couldn't move anything into it from the SD. I'm new at this, so I have no idea what the problem might be. Anyone else had this problem or have any suggestions?
If anyone else runs into this problem, this solution worked for me:
adb shell
# su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# chmod 777 /system (Or any subdirectory you want to push to inside system)
# exit
adb push <local file> <device location>
Restore modified permissions when done.
Though I'm still not sure why this is necessary in place of adb remount.
I'm pretty sure the adb remount command will not work on the stock rom. You should be able to do it with just this command instead:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
dametzg said:
I'm pretty sure the adb remount command will not work on the stock rom. You should be able to do it with just this command instead:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
Thanks... didn't realize stock wouldn't accept adb remount. If I use the above line from within shell, that doesn't help me push anything on to the phone though... so I needed to enable global permission and then do the push. Oddly enough I tried the same approach last night using Root Manager, and the transfer from SD still failed, even after I applied 777 to the dir I was trying to modify. The current solution may be kind of tedious, but at least it works.
you really shouldn't do 777 on your filesystem, ANY app can then write to your system, overwrite things, or install malicious code. Just remount manually and you should be able to push anything you want, just remember that w/ the stock rom you also don't get a full busybox either.
I'm not positive, but I would think after you remount, you should be able to "adb push" to /system. I suppose it might be specific to that shell, but I would think not.
You just may have to do it once each time you boot your phone.
Edit - err nevermind... you're having permission errors.... um... change adbd on the phone to run as root? not sure how off the top of my head...

cannot adb remount

when i try to do adb remount i get the following message: remount failed: Operation not permitted
I have search trying to find and answer and dont see much of anything. The device is listed when i do adb devices. I did do some cleanup on my sdcard and saw something about boot img in one of my searches. I'm wondering if accidentally deleted something???
you are rooted?
Sent from my HERO200 using XDA App
yeah have been rooted for months. I was using 2.2 froyo, then nandroided back to 1.5. adb remount worked fine the first time. THen i cleaned somethings off my sdcard (not sure if this matters), and since then adb remount doesnt work. if i do an 'adb shell' then su, everything works still?
edit: btw, this is not while in recovery. this is while the phone is fully booted.
the sd card is irrelevant to the remount command. Something is keeping you from having root privledges via adb. Maybe try Ruu again and then re-root and load up your rom?
it's probably the rom you are using, it my be secured connect the phone to your computer, open a command prompt, cd into the android-sdk/tools folder and enter
Code:
adb pull /default.prop
then go into the android-sdk/tools folder and open the default.prop file in wordpad or notepad++
look for the line
Code:
ro.secure=
if it is set to 1 it is secured and adb remount will not work, you can still mount the file system temporarily manually though.
make sure debugging is enabled
yeah i think it has something to do with this:
Code:
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=1
ro.allow.mock.location=0
ro.debuggable=0
persist.service.adb.enable=0
i tried to change the 1 to 0 in recovery mode, but when it booted back up again it still shows 1???
dbldown768 said:
yeah i think it has something to do with this:
Code:
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=1
ro.allow.mock.location=0
ro.debuggable=0
persist.service.adb.enable=0
i tried to change the 1 to 0 in recovery mode, but when it booted back up again it still shows 1???
Click to expand...
Click to collapse
i think those files are overwritten every time you reboot, if you really love the rom and you need rw support built into the rom, you can take a nandroid backup of that rom and use the kitchen here and add it to the rom rebuild and reflash it.

[Q] Editing Build.prop results in failure to boot [bricked]

As you may know, some Android games especially most Gameloft games are not compatible with the Kindle Fire. So in efforts to find a way to make certain Gameloft games to work such as Modern Combat 2 and Shrek Kart and others, I resorted to editing my build.prop in the systems folder to make my device compatible with the apps. So I copied the original build.prop file, renamed it, and saved it to my SD Card folder. I took the copy I made and I then replaced it with the build.prop from HTC Glacier. (I never knew what could possibly happen) So then to apply those settings you have to reboot the device. I rebooted the Kindle and now it won't boot up. It get's to the Kindle Fire screen when booting up but after several seconds it just shows a black screen. No physical damage has been incurred to it but I feel like my stupid mistake of modding the build.prop resulted in the Kindle Fire unable to boot up correctly. It also isn't recognized by the PC when I hook it up to a USB cable. So far I've found nothing that could help to solve this. I've seen a Factory Default Settings Cable which is a special cable to reverts the device to its factory default settings but I'm not too sure if that would work. I'm in desperate need of help as in I use my Kindle Fire for everyday work and play. Thanks.
EDIT: I've tried adb push and renaming and moving the build.prop into the /system/ but returns that it is a Read-File System Only. Also adb shell and su doesn't work as in it ends up with segmentation fault. I've tried to zergRush root it and permanently root it using KFU but it ends up with 'Cannot Access Package Manager. Is System running?' Also the mount -o rw,remount.....command doesn't work either as it says Permission Denied. All of this would be easy to accomplish if only it ADB allowed me to write onto the /system file.
EDIT**: The biggest issue I'm faced with is the permission settings that prevent my from editing anything. You cannot simply change it from RO to RW because apparently the ADB is not rooted. And I also can't root it because problems exist when accessing either Package Manager or Activity Manager. What I need is a way to access the /system files without a root (non-rooted). Either that or enable fastboot because I cannot access that either. On a reply on the second page is the resulting lines when changing bootmodes on the KFU.
Don't know how to fix your problem, but just wondering, did you just completely replace the kindle fire build.prop with the HTC glacier? Because you can't do that, it will, as you have learned, mess up your device.. Your supposed to edit the build.prop and just change a few things. Next time read up on the subject before deciding to mod the device you use everyday...
the cable you'r talking about is a "factory cable" it forces the kf to fastboot mode - it don't restore any settings !
you need fastboot mode to install fff (firefirefire - custom bootloader) and twrp (recovery)
do you allready have installed fff & twrp (or cwm) ?
if you have twrp installed and booted into then you have adb command available and can copy back the original build.prop
Did you remember to restore the read/write permissions to build.prop? It should be set to 644.
As already stated, your not supposed to replace the whole file, build.prop tells android which device you have, so now Android thought and configured itself to different hardware config. which is not available to it. Adb seems like the only option.
I should have really looked more into it before modifying the build.prop. I replaced the ENTIRE build prop with the build.prop of HTC Glacer. (I know, i know I was stupid) And referring to the factory cable, I don't think I'll resort to that: too time consuming. In regards to the last person that posted before me who said that my only option was ADB could you elaborate? Thanks for all your feedback.
gococogo321 said:
I should have really looked more into it before modifying the build.prop. I replaced the ENTIRE build prop with the build.prop of HTC Glacer. (I know, i know I was stupid) And referring to the factory cable, I don't think I'll resort to that: too time consuming. In regards to the last person that posted before me who said that my only option was ADB could you elaborate? Thanks for all your feedback.
Click to expand...
Click to collapse
Your going to have to use adb to basically remove the HTC Glacier build.prop and replace it with the original build.prop.
For example:
Adb remount <- allows you to mount system as rw
Adb pull /path-to-original/build.prop
Adb push build.prop /system
Adb shell chmod 644 /system/build.prop <- sets permissions to rwrr
Adb reboot
Sent from my Kindle Fire using xda premium
You dont have access to recovery? Either TWRP or CWM?
daggy1985 said:
Your going to have to use adb to basically remove the HTC Glacier build.prop and replace it with the original build.prop.
For example:
Adb remount <- allows you to mount system as rw
Adb pull /path-to-original/build.prop
Adb push build.prop /system
Adb shell chmod 644 /system/build.prop <- sets permissions to rwrr
Adb reboot
Sent from my Kindle Fire using xda premium
Click to expand...
Click to collapse
I tried doing that but it says something like Access Denied or Read-Only File System when i try to push the build.prop into it.
gococogo321 said:
I tried doing that but it says something like Access Denied or Read-Only File System when i try to push the build.prop into it.
Click to expand...
Click to collapse
Did you use the 'adb remount' command? Sometimes, when attempting to push a file to the system, I get the 'read-only file system' and I have to issue adb reboot followed by adb remount and then push the file again. It seems after a time the mount system as read write automatically goes back to read-only.
Sent from my ADR6400L using xda premium
Have you got TWRP or ClockworkMod?
Because you could flash a new rom then.
abd - root mode
Perhaps, running adb in root mode will
allow you to push the original build.prop
back. Then execute "adb remount / rw" to mount the
root directory as read/write. Hopefully you will be able to push
it then follow daggy1985's instructions.
* In Win 7, type "cmd " at the 'SEARCH/RUN' and hold
shift + ctrl while hitting 'Enter' to put yourself
in Admin mode which apparently makes adb work in root mode when you launch it.
* Xda-dev is the coolest site for Android that I have seen. Kudo's to everyone participating.
sum1nil said:
Perhaps, running adb in root mode will
allow you to push the original build.prop
back. Then execute "adb remount / rw" to mount the
root directory as read/write. Hopefully you will be able to push
it then follow daggy1985's instructions.
* In Win 7, type "cmd " at the 'SEARCH/RUN' and hold
shift + ctrl while hitting 'Enter' to put yourself
in Admin mode which apparently makes adb work in root mode when you launch it.
* Xda-dev is the coolest site for Android that I have seen. Kudo's to everyone participating.
Click to expand...
Click to collapse
Thanks but I have actually been running it from Administrator from the very beginning. I've used Kindle Fire Utility KFU and it says that ADB Server is Online and my Bootmode is 4000 but it says ADB root: No. And whenever I choose any bootmode whether it be Normal, Fastboot, or Recovery, it always shows this:
***********************************************
* Activating Normal (4000) *
***********************************************
Installing BurritoRoot, Courtesy of Jcase of TeamAndIRC!
1393 KB/s (1164225 bytes in 0.816s)
Error: Could not access the Package Manager. Is the system running?
Activating BurritoRoot...
Error type 2
android.util.AndroidException: Can't connect to activity manager; is the system
running?
Elevating the Shell...
* daemon not running. starting it now *
* daemon started successfully *
/data/local/tmp/BurritoRoot3.bin: permission denied
mount: Operation not permitted
mount: Operation not permitted
failed to copy 'files\rbfb' to '/system//rbfb': Read-only file system
Unable to chmod /system/rbfb: No such file or directory
Unable to chmod /system/rbfb: No such file or directory
mount: Operation not permitted
mount: Operation not permitted
***********************************************
* Root Activated *
***********************************************
The kindle is successfully running in root mode.
<idme> Invalid permission
reboot: Operation not permitted
Same goes for the Temp Burrito Root and installing FFF and TWRP. It always shows something about cannot access Package manager. I have no clue what the Package Manager even does but apparently I cannot find a solution to that.
I think you need to get a factory programming cable like we talked about on gtalk. I'm confident that will fix this.
Sent from my DROIDX using Tapatalk
I used android commander for windows, mounted system in TWRP and used android commander to copy a new working build.prop to the right place.
With a cable from my htc desire.
would make a little test:
issue "adb shell"
if you get a error message your up to a factory cable because the system shell is messed up and you have no possibility to get to fastboot mode to install fff & twrp
if you get a $ or # prompt you can resume and try "mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system" to mount system in read/write mode
daggy1985 said:
Your going to have to use adb to basically remove the HTC Glacier build.prop and replace it with the original build.prop.
For example:
Adb remount <- allows you to mount system as rw
Adb pull /path-to-original/build.prop
Adb push build.prop /system
Adb shell chmod 644 /system/build.prop <- sets permissions to rwrr
Adb reboot
Sent from my Kindle Fire using xda premium
Click to expand...
Click to collapse
hey, I've tried to remount my rooted galaxy y, fall in for same problem.but there show this message; "remount failed: Operation not permitted"
my device's usb debugging mode was off in last entire.
what I have to do now?
how did u edit build.prop in the first place if u don't have root and this might help
http://yaseminavcular.blogspot.com/2012/01/how-to-get-bricked-kindle-fire-back-to.html?m=1
Sent from my R800i using Tapatalk

[TIPS][SCRIPTS][ROOT]egingell's scripts. Updated 11/22/13 11:30 MST

I will be using this thread to post my scripts and link them to other threads as needed. For this thread, I am assuming you know what you're doing. You don't need mad hacking skills and you don't need to be an expert (I'm sure as hell not), but knowing your way around the file system and basic shell scripting are helpful.
Some background: I am using the stock ROM and kernel (SGS2 - GB27, SGS4 - MDC), so all of my tips revolve around using stock and all of my scripts (even the flashable ones) will work without flashing from recovery (just extract the script from the ZIP and execute it while the phone is in phone-mode - you know... powered on ).
You are welcome to use my scripts in your apps. I only ask that you give me some credit.
I am not responsible for bricking your phone. I have only tested my scripts on my personal Samsung Galaxy S2 and S4 from Sprint. You are welcome to try on your phone, but I offer no warranties or guarantees as to whether they will work or not. Back up your ****!
All of this requires root!
Below is a list of the scripts I have written for y'alls. Enjoy.
Custom df: Shows where irregular mounts ("mount -o bind") are mounted. [ Forum post | Download ]
Currently doesn't work on my SGS4.
Easily move Phonesky.apk and GoogleServicesFramework.apk to /system or /preload for Multi DPI Play Store. [ Forum post | Download ]
Untested on my SGS4, but there's no reason to think that it won't work.
Use your SGS2's internal SD card for Link2SD instead of making a second partition on your external SD card (although, depending on the setup, you may still need to make a tiny partition on your external SD card) and your external SD card as your internal SD card [ Forum post ]
Untested on my SGS4. I have no need for it.
Clean up Link2SD: Delete files associated with Link2SD when uninstalling it. It does not revert the links Link2SD makes. It only deletes the mount scripts. [ Forum post | Download ]
If you use the debuggerd script to enable init.d, running this script will cause you to lose init.d.
Untested on my SGS4, but there's no reason to think that it won't work.
Delete Samsung's bloatware from the Sprint SGS2. [ Forum post | Download ]
Untested on my SGS4, but there's no reason to think that it won't work; however, it was written specifically for the SGS2's bloatware. See thread S4 System Apps Safe To Remove for a list of SGS4 bloatware apps.
Google Home Launcher (from Kit Kat).
Works on Jelly Bean.
Below are some other tweaks.
You can use custom boot animations with the stock ROM. All you need to do is swipe a "/system/bin/bootanimation" binary file from another ROM (such as @rujelus22's Blu Kuban FL24 (ICS) or Blu Kuban GB27 (JB 4.1.2)), paste it into "/system/bin", and make it executable.
For JB 4.2.2, make sure the user and group are root and shell respectively. This doesn't seem to be a problem with JB 4.1.2 and below. It's also possible that my initial testing involved a boot animation that didn't work on my SGS4, so if it works with root as both user and group, then roll with it. :good:
Also for JB 4.2.2, use the file from a JB 4.2.2 ROM, such as The Blu Kuban S4.
You can enable init.d scripts very easily by renaming "/system/bin/debuggerd" to "/system/bin/debuggerd.bin", replace it with the following, and make both files executable. If "/system/bin/debugger.bin" already exists, then edit "/system/xbin/busybox run-parts /system/etc/init.d" into "/system/bin/debuggerd".
As with the above, make sure the user and group are root and shell.
Code:
[color=green]#!/system/bin/sh[/color]
LOG=/data/debuggerd.log
echo "$(date)" > $LOG
echo "init.d" >> $LOG
/system/xbin/busybox run-parts /system/etc/init.d 1>>$LOG 2>>$LOG
echo "$(date) finished" >> $LOG
echo debuggerd.bin launched >> $LOG
exec /system/bin/debuggerd.bin
Below are some tips.
Most of the things you can do with a custom kernel, you can do with the stock kernel, it just requires more work and more risk.
If you replace an odexed system app with a deodexed system app, make sure you delete the app's ODEX file (it's the same file name except with the extension .odex).
Conversely: if you replace a deodexed system app with an odexed system app, you better have the ODEX file to go with it.
You can clear the dalvik-cache without a custom kernel by deleting the contents of "/data/dalvik-cache". You can even delete an individual app's dalvik-cache by finding the file "/data/dalvik-cache/[email protected]@[email protected]" or "/data/dalvik-cache/[email protected]@[email protected]" and delete it.
You can manually uninstall a system app's update by finding the file "/data/app/.apk" and delete it.
You can manually delete all user data by deleting the contents of "/data/data". You can even delete an individual app's data by finding the folder "/data/data/" and delete it.
Making scripts and binaries executable:
They must be on an EXT formatted filesystem (e.g. /data, /system, /preload).
They must be at least readable and executable by the user 'shell' (755 (read/execute for all, write only for user - "u=rwx,a=rx" if your busybox supports that method) is what I usually use).
Code:
chown root:shell ""
chmod 755 ""
chmod u=rwx,a=rx "" # busybox must support symbolic modes
Changing file permissions requires read/write access to the filesystem on which the file resides:
Code:
mount -o remount,rw /system # make the /system partition read/write
mount -o remount,ro /system # make the /system partition read only
The stock kernel is considered "production" whether or not it's rooted; therefore, you cannot use ADB to push or pull files directly to or from protected partitions, nor run ADB as root, nor use ADB's remount command, so you have to use unprotected partitions as a sort of buffer. You can, however, access the ADB shell and issue the "su" command wherein you can use "cp" to copy files to or from protected partitions prior to using ADB to push or pull the desired file. However, there is an app aptly named [root] adbd Insecure by @Chainfire that patches the ADB daemon to get around this limitation.
Example:
Code:
c:/android-sdk> adb shell
[email protected]:/ $ su
[email protected]:/ # cp /system/bin/debuggerd /sdcard/debuggerd
[COLOR="green"]-- open a new command prompt window --[/COLOR]
c:\android-sdk> adb pull /sdcard/debuggerd debuggerd
c:\android-sdk> adb push debuggerd /sdcard/debuggerd
[COLOR="green"]-- switch to the first command prompt window --[/color]
[email protected]:/ # mount -o remount,rw /system
[email protected]:/ # cp /sdcard/debuggerd /system/bin/debuggerd
[email protected]:/ # chown root:shell /system/bin/debuggerd
[email protected]:/ # chmod 755 /system/bin/debuggerd
[email protected]:/ # mount -o remount,ro /system
Some noteworthy files and folders:
/proc/self/mountinfo: If you can read it, it tells you where your partitions and folder binds are mounted.
/proc/partitions: Shows all of your SD card's partitions, how many blocks each has, and their vold numbers (eg "179 1 30578964 mmcnlk0p1").
/dev/block/platform/dw_mmc/by-name: This folder contains symlinks to your internal eMMC's partitions indexed by what they are for (eg UMS for your internal SD card - "realpath /dev/block/platform/dw_mmc/by-name/UMS" will print out the device path (ie "/dev/block/mmcblk0p11")).
/dev/block/platform/dw_mmc/by-num: This folder is like the previous except that they are indexed by partition number (eg "p11").
/proc/version: Shows what version of Linux is currently being used.
/data/system/batterystats.bin: Delete this when your battery is fully charged and still plugged in to recalibrate it.
Footnotes:
For "/data/app", "/data/data", and "/data/dalvik-cache" files you need to know the package name. There are various apps that will tell you, including Link2SD (mentioned above), Titanium Backup, and the web URL of the app in the Play Store (ex: https://play.google.com/store/apps/details?id=com.devname.appname).
More:
Random boot sound using your notification sounds
Make ADB work for all users - Jelly Bean 4.2.2 (Updated 07/15/13 00:35 MST)
Stock ROM - SGS4 - init.d
No-data restore tips
SGS4 Bloatware Remover
Make apps run faster and increase battery life
Random boot sound using your notification sounds
The attached ZIP contains a script that can be run pre or post boot. It just needs to be executable.
Preboot requires init.d. See the OP for enabling it if you are on a stock rooted ROM and requires the file to be readable and executable ("chmod 755" works fine).
Postboot requires an app such as Scripter (ROM Toolbox) or Script Manager to execute the script at boot.
Requires the variable $RANDOM. You can make sure it's available from the command line ("echo $RANDOM").
Use this script at your own risk. I provide no warranties or guarantees.
What does this script do?
Check for carrier boot up sounds (sub folders in the "/system/media/audio/ui" folder) and moves them to "/system/media/audio/notifications" renaming them as needed.
Create symlinks in the above folders to "/system/media/audio/ui/PowerOn.ogg".
Check if "/system/media/audio/notifications/PowerOn.ogg" is present and copy it to "/system/media/audio/ui/PowerOn.ogg" it's not.
Count the number of files in "/system/media/audio/notifications".
Grab a random number between 1 and the number of files found inclusive (math notation: "[1, numFiles]").
Go through "/system/media/audio/notifications" and copy the file at index random to "/system/media/audio/ui/PowerOn.ogg".
Notes:
The stock file is included. If you want a different sound in its place, you can either comment out that line in the script and delete the "/system/media/audio/notifications/<subfolder>_PowerOn.ogg" files from "/system/media/audio/notifications" or just replace "/system/media/audio/notifications/PowerOn.ogg" with some other sound file and still delete the "/system/media/audio/notifications/<subfolder>_PowerOn.ogg" files from "/system/media/audio/notifications".
If you want more sounds, just copy them to "/system/media/audio/notifications" (OGG files only).
The script does not check for valid files and blindly renames the destination file to "PowerOn.ogg".
It does not look in "/sdcard/media/audio/notifications" or anywhere else for audio files.
I do not recommend using alarms or ringtones files as they are usually looped which can cause the media scanner to get stuck and overheat your phone or tablet - those files may continue to play even if you can't hear them.
If you can't hear a sound on boot, it is likely that the file is either invalid or has no audio (ex: my /system/media/audio/ui/BST/PowerOn.ogg has no audio).
It was tested and works on a Samsung Galaxy S2 (stock JB 4.1.2) and a Samsung Galaxy S4 (stock JB 4.2.2) both from Sprint and using stock kernels.
There's no obvious reason it won't work on other phones and tablets with other ROMs from other carriers.
Nice work E.
cerj said:
Nice work E.
Click to expand...
Click to collapse
:good:
Make ADB work for all users - Jelly Bean 4.2.2 (Updated 07/15/13 00:35 MST)
With Android 4.2.2, ADB now requires RSA keys. This poses a problem when attempting to connect to the device's ADB server from the device itself and the device won't ask for authorization unless it's connected via USB. Well, there's hope, yet.
For the following, I'm assuming you used my method for adding init.d support to your device.
Use these scripts at your own risk. I provide no warranties or guarantees.
Add the following script to /system/bin/debuggerd. If you use an alternate method, please note that it must be executed by the debugger daemon. You must do this first or you'll have to manually restart the debugger daemon after editing this file and executing the run-once script (next step), so edit this file first and save it.
Code:
if [ ! -e "/.android" ]; then
busybox mount -o rw,remount /
mkdir /.android
mount -o bind /data/.android /.android
busybox mount -o ro,remount /
fi
Then run this script once from the device (not over ADB on your PC).
Code:
[COLOR="Green"]#!/system/bin/sh[/COLOR]
HOME=/data
adb kill-server
adb start-server
stop adbd
cat /data/.android/adbkey.pub >> /data/misc/adb/adb_keys
echo "" >> /data/misc/adb/adb_keys # Add a blank line at the end of the file
start adbd
HOME=/
adb kill-server
stop debuggerd
start debuggerd
Notes:
You can also find the abdkey.pub file on your Windows' PC here, C:\Users\<user name>\.android\adbkey.pub. Copy it to your device by whatever means necessary, then append it to /data/misc/adb/adb_keys and you won't need to initially use the USB to allow the PC connection. Not really necessary unless your PC has no USB or you've broken your USB cable.
This may have inadvertently corrected the mounting issue introduced in Jelly Bean 4.2.2.
You can also allow other Android 4.2.2 devices, but it requires ADB version 1.0.31 and for you to manually append the contents of /data/.android/adbkey.pub from device A (the one you want to use to ADB on) to /data/misc/adb/adb_keys on device B (the target device).
Don't delete /data/.android
This won't fix apps. Just allow you to use ADB to connect to your device from itself.
Tested on my SGS4. No reason it won't work on other devices.
If you already have a /data/.android directory, you may not need to do this. On my SGS4, HOME defaults to "/" which the ADB daemon can't write to, so it can't make the RSA key.
The run-once script temporarily changes HOME to "/data", a writable directory, so the ADB daemon can write the RSA key then it append it to the allowed clients file then restarts the debugger daemon thus binding /data/.android to the /.android directory allowing all Linux users ADB access to the device.
Reassigning HOME to a new value on one user only changes its value for that user which is why I'm binding /data/.android to /.android.
Code:
# Example
[email protected]:/ $ echo $HOME
/
[email protected]:/ $ HOME=/data
[email protected]:/ $ echo $HOME
/data
[email protected]:/ $ su 1000
[email protected]:/ $ echo $HOME
/
Alternatively (much easier):
Make the .android folder in /data (mkdir /data/.android).
Add the script, the first code block in this post, to your debuggerd file or an init.d script.
Restart the debugger (stop debuggerd; start debuggerd) or reboot the phone.
Restart ADB (stop adbd; start adbd).
Copy the newly created public key to the allowed clients (cat /data/.android/adbkey.pub >> /data/misc/adb/adb_keys; echo "" >> /data/misc/adb/adb_keys).
Restart the ADB server (adb kill-server; adb start-server).
SGS4 Bloatware Remover
I have written a live-script to delete all of the SGS4 bloatware except GoogleContactsSycAdapter and SecLauncher3. If you want to delete those, remove the "#" from that line in the script. If you want to exclude an app, add a "#" to that line and put the app name in quotes (ie AppName / becomes "#AppName" / (including the forward slash) or just remove that line. If you remove the last item (YouTube in this case), remove the forward slash from the previous line.
Use this scripts at your own risk. I provide no warranties or guarantees.
What this script does:
Move the app's APK and ODEX to /sdcard/SystemAppsBackup.
Delete its dalvik-cache.
Reboot the phone. If it doesn't reboot, you'll have to do this yourself.
What this script does not do:
Delete the app's data. Because the script doesn't know the package name.
Delete its Play Store update (located in /data/app). Because the script doesn't know the package name.
Mount the SD card if it's not mounted. If you want backups, make sure the SD card is mounted.
Care if you delete a system app you wanted to keep. Most apps that you would want to keep may be available in the Play Store.
Restore apps.
Notes:
Apps will crash left and right when you execute this script in running mode. Don't fret, this is normal.
This is a live-script which means you have to manually execute the script either with a terminal emulator, a script executor like Scripter, or ADB.
This is not flashable.
If executing via ADB in Recovery mode, you may need to mount the SD card to /storage/sdcard0 manually or settle for no backups.
If you restore an app from /sdcard/SystemAppsBackup, make sure you get the ODEX file if present and set the permissions for both to 644.
This list is based off the list in the thread, S4 System Apps Safe To Remove.
Here You Go Guys, I took me about 30 mins, but I have successfully added all the app in the Op to a flashable Zip.
The Zip is base of TrulyClean v1.6 script code, I just deleted his ;delete/system/...apk and replaced it with all the ones from the OP
bigtobitobs said:
Here You Go Guys, I took me about 30 mins, but I have successfully added all the app in the Op to a flashable Zip.
The Zip is base of TrulyClean v1.6 script code, I just deleted his ;delete/system/...apk and replaced it with all the ones from the OP
Click to expand...
Click to collapse
Looks like you're deleting bloatware, perhaps you should post that in the right thread... or at least a more appropriate thread.
Sent from my SGS4.
egingell said:
Looks like you're deleting bloatware, perhaps you should post that in the right thread... or at least a more appropriate thread.
Sent from my SGS4.
Click to expand...
Click to collapse
LOL OMG I am so sorry, I had multiple tabs open and put this in the wrong forum. Please Delete
bigtobitobs said:
LOL OMG I am so sorry, I had multiple tabs open and put this in the wrong forum. Please Delete
Click to expand...
Click to collapse
Would that I could.
Sent from my SGS4.
Make apps run faster and increase battery life using Xposed App Settings.
Did you install GravityBox on your SGS4 then uninstall it and now you can't hear your games or music?
I think it has to do with GravityBox's "Volume Steps" option not undoing when GB is uninstalled. This is how I fixed it (forum post).
Stock ROM - SGS4 - init.d
I recently found out that my debuggerd hack to enable init.d support on my stock SGS4 wasn't working. So, I did this and now it works.
Make a file named "install-recovery.sh" and drop it into /system/etc. Whatever script you put in here will execute at boot up so long as the user/permissions are correct.
Code:
chown shell:shell "/system/etc/install-recovery.sh"
chmod 755 "/system/etc/install-recovery.sh"
chmod u=rwx,a=rx "/system/etc/install-recovery.sh" # busybox must support symbolic modes
Use this script at your own risk. I provide no warranties or guarantees.
My "/system/etc/install-recovery.sh" script:
Code:
[COLOR="Green"]#!/system/bin/sh[/COLOR]
LOG="/data/install-recovery.log";
echo "Executing install-recovery.sh" > $LOG;
echo "" >> $LOG;
echo "$(date) install-recovery hack..." > $LOG
echo "" >> $LOG
echo "init.d" >> $LOG
[COLOR="green"]# I can't get run-parts to work for some reason, but this will run every *.sh script in /system/etc/init.d as root.[/COLOR]
for N in /system/etc/init.d/*.sh; do
su -c "$N" 1>>$LOG 2>>$LOG
done;
Notes:
Mount binding (in JB 4.2.2+) seems to work. E.g. mount -o bind /folder1 /folder2
$(date) does not provide the correct date (mine said: "Wed Apr 15 13:24:13 MST 1970").
The Package Manager is not available. (There may be other unavailabilities, but I don't intend to test it thoroughly.)
Somethings I discovered recently while doing a no-data system restore for the second time in the same night and some tips relating to system restores:
* When doing a no-data restore, disabled/frozen system apps remain disabled.
* Apps that can't be disabled even with Titanium Backup will not remain disabled after a reboot and will sometimes crash/FC repeatedly until uninstalled.
* If an app won't open or FCs, try converting it to a system app and back to user app or vice versa.
* Don't integrate system app updates into the ROM. In the event that you have to do a no-data restore, those updates will be retained.
* Don't convert user apps to system apps for the same reason.
* Disregard the previous two tips if disk space is a problem. It's just more time consuming (redownloading updates, reintegrating, and reinstalling) after a restore.
* Save all modified system files, such as /system/bin/debuggerd, /system/build.prop, /system/etc/install-recovery.sh, and if your ROM uses /system/etc/unit.d, any modified or extra files there. If you use them, you'll need them after a restore.
* For a smoother post no-data restore, use Titanium Backup's labels so you can batch-uninstall those pesky system apps you don't want.
SGS2 - JB 4.1.2 GB27
SGS4 - JB 4.2.2 MF9
any command for updater script to make directory in root of android ??
HassanMirza01 said:
any command for updater script to make directory in root of android ??
Click to expand...
Click to collapse
Creating directories in / and all the files contained therein must be redone on every boot. That said, you just need to make root writable and make the directory.
mount -o remount,rw /
mkdir /whatever
mount -o remount,ro /
Note: Every time you wish to create, modify, or delete files you'll have to make root writable.
Sent from my LG-H811 using Tapatalk
egingell said:
Creating directories in / and all the files contained therein must be redone on every boot. That said, you just need to make root writable and make the directory.
mount -o remount,rw /
mkdir /whatever
mount -o remount,ro /
Note: Every time you wish to create, modify, or delete files you'll have to make root writable.
Sent from my LG-H811 using Tapatalk
Click to expand...
Click to collapse
Actually.... I wanna add some files within folder in root of android root... So i need to use above three commands nd then after making directory, i should extract files to that folder ??
HassanMirza01 said:
Actually.... I wanna add some files within folder in root of android root... So i need to use above three commands nd then after making directory, i should extract files to that folder ??
Click to expand...
Click to collapse
Yes.
Sent from my LG-H811 using Tapatalk
:good:

[Help] how to modify system files with root access?

I've now tried in several ways to change /system/build.prop (phone rooted) but I had no luck.
Method 1: BuildProp Editor
I've tried using this app to change the file, the save succeeds, but after rebooting, the "original" file is restored and the changes are lost.
Method 2: Remounting the filesystem
I've tried remounting the filesytem:
Code:
$ adb shell mount
/dev/block/dm-4 on / type ext4 (ro,seclabel,relatime,block_validity,discard,delalloc,barrier,user_xattr,acl,i_version)
...
Code:
$ adb shell su -c mount -o rw,remount /
$ adb shell mount
/dev/block/dm-4 on / type ext4 (rw,seclabel,relatime,block_validity,discard,delalloc,barrier,user_xattr,acl,i_version)
...
After making my changes, if I try to remount with ro access, it fails. After rebooting the changes are lost again.
Method 3: Modify system.img
I've tried changing the file in the system.img, repacking the super.img file and flash it as single AP file, same result, the changes are lost. I've tried to decompress the super.img and remount it (just to check the changes were still there) and indeed they were.
What am I doing wrong?
Is there any way to achieve this?
I've found a good description of how the system and Magisk work:
- https://topjohnwu.github.io/Magisk/details.html
- https://topjohnwu.github.io/Magisk/guides.html
hello, i am trying to modify build.prop to disable knox and enable multiuser but changes are not persistent, have you found a solution with magisk?
use notepad ++ to modify buildprop on pc. connect phone while off and while phone is booting push file to phone (repeatedly) theres a small window where you can inject during boot...takes awhile sometimes to hit it right. ive dont it on samsungs and lg.

Categories

Resources