can someone tell me? how to avoid bootloop when we modified something in system partition? i mean sometimes i always get a problem with bootloop, just like that install a superuser MOD (services.jar) bootloop when restart. i still locked bootloader. can i push any file or something without must turn on the phone. like use any adb debugging?
Nicklas Van Dam said:
can someone tell me? how to avoid bootloop when we modified something in system partition? i mean sometimes i always get a problem with bootloop, just like that install a superuser MOD (services.jar) bootloop when restart. i still locked bootloader. can i push any file or something without must turn on the phone. like use any adb debugging?
Click to expand...
Click to collapse
When you modify something on the system partition it is advised that you set the permissions to it. When you push SUPERUSERMOD to the system you are pushing it with 0664 (I think) permissions, it needs 0644 permissions to run and execute. You can easily push your files to your device and set the permissions using ADB.
gamer649 said:
When you modify something on the system partition it is advised that you set the permissions to it. When you push SUPERUSERMOD to the system you are pushing it with 0664 (I think) permissions, it needs 0644 permissions to run and execute. You can easily push your files to your device and set the permissions using ADB.
Click to expand...
Click to collapse
ya, i understand with android sdk right? ya ya thanks ya!!!
Nicklas Van Dam said:
ya, i understand with android sdk right? ya ya thanks ya!!!
Click to expand...
Click to collapse
Yes it is, drop me a PM if you need any of the codes to push the file to the system partition.
some code?
gamer649 said:
Yes it is, drop me a PM if you need any of the codes to push the file to the system partition.
Click to expand...
Click to collapse
i think the first code is adb shell and then su, but before that i active the usb debugging and then apply the root permission do this command
mount -o remount rw "/system" to mount system. and
do cp,rm and maybe chmod to copy,delete and change permission right? are still any code that i still don't know it?
Related
I have rooted my HTC One X and want to copy files in /system/xbin folder. My phone shows S-ON. And Eclipse is not able to copy files to /system and adb push from shell is also not working. Is there a way I can copy files to /system/xbin?
I am running stock ROM.
My phone is NOT associated with any vendor.
adb remount
adb push filename /system/xbin
Sent from my HTC One X
You can also use es file explorer and go into the options tick up to root and the request root and then tick mount as r/w.
Then just move files as you will.
Sent from my HTC One X using XDA Premium HD app
realunited123 said:
adb remount
adb push filename /system/xbin
Sent from my HTC One X
Click to expand...
Click to collapse
The above way does not seem to work. Whenever I use adb remount(or adb mount) it says operation not permitted and I am trying to this from root privileges
My OS is :- Ubuntu 12.04
ADB(platform-tools) -> Rev 20
If you need anything more please ask me .
Additional Question
treebill said:
You can also use es file explorer and go into the options tick up to root and the request root and then tick mount as r/w.
Then just move files as you will.
Sent from my HTC One X using XDA Premium HD app
Click to expand...
Click to collapse
First of all thanx it worked. I think I will have to live with this way A ADB/Eclipse based would have been cool
Will the files moved from SDcard to phones root in anyway lose and privileges(like losing executable)? If yes, please suggest a way to restore it.
KillerTheLord said:
The above way does not seem to work. Whenever I use adb remount(or adb mount) it says operation not permitted and I am trying to this from root privileges
My OS is :- Ubuntu 12.04
ADB(platform-tools) -> Rev 20
If you need anything more please ask me .
Click to expand...
Click to collapse
When doing adb shell su do you get any toast notification on your phone? Or does it just say denied ?
Strange it works perfectly here Also are you using SuperSU or any other superuser app?
---------- Post added at 03:37 PM ---------- Previous post was at 03:36 PM ----------
KillerTheLord said:
First of all thanx it worked. I think I will have to live with this way A ADB/Eclipse based would have been cool
Will the files moved from SDcard to phones root in anyway lose and privileges(like losing executable)? If yes, please suggest a way to restore it.
Click to expand...
Click to collapse
Yes you need to change the permissions after moving from sdcard. Use Root Explorer(Long press on the file--> Change permissions)
realunited123 said:
When doing adb shell su do you get any toast notification on your phone? Or does it just say denied ?
Strange it works perfectly here Also are you using SuperSU or any other superuser app?
---------- Post added at 03:37 PM ---------- Previous post was at 03:36 PM ----------
Yes you need to change the permissions after moving from sdcard. Use Root Explorer(Long press on the file--> Change permissions)
Click to expand...
Click to collapse
I am using SuperSU as Super User App. And I think I am doing something wrong here. You mentioned about adb shell su. I think I might be wrong here. Here is how I tried to execute the command.
[email protected]: <path to platformtools> ./adb remount
remount failed: Operation not permitted
do I have to raise ADB shell to SU level. If yes, how?
KillerTheLord said:
I am using SuperSU as Super User App. And I think I am doing something wrong here. You mentioned about adb shell su. I think I might be wrong here. Here is how I tried to execute the command.
[email protected]: <path to platformtools> ./adb remount
remount failed: Operation not permitted
do I have to raise ADB shell to SU level. If yes, how?
Click to expand...
Click to collapse
Strange. Are you using the stock kernel ? If that is the case then it does not have insecure adbd (ro.secure=0) so remount will not work. Try a custom kernel.
Does adb has SU permissions from recovery ? Try booting into recovery, mounting the system partitions and try to push something from adb. Check the SuperSU app to update binary but that should not be a problem.
realunited123 said:
Strange. Are you using the stock kernel ? If that is the case then it does not have insecure adbd (ro.secure=0) so remount will not work. Try a custom kernel.
Does adb has SU permissions from recovery ? Try booting into recovery, mounting the system partitions and try to push something from adb. Check the SuperSU app to update binary but that should not be a problem.
Click to expand...
Click to collapse
Yes I have rooted the phone but the ROM is stock(I was thinking to put in CM9 Alpha).
About the second thing. I know how to boot my phone into recovery(Vol Down + Power -> From Screen -> Recovery(ClockwerkMod))
But about the rest I don't know.
Sorry about my annoying questions this is my first time I am dealing with rooting and stuff.
KillerTheLord said:
Yes I have rooted the phone but the ROM is stock(I was thinking to put in CM9 Alpha).
About the second thing. I know how to boot my phone into recovery(Vol Down + Power -> From Screen -> Recovery(ClockwerkMod))
But about the rest I don't know.
Sorry about my annoying questions this is my first time I am dealing with rooting and stuff.
Click to expand...
Click to collapse
I guess you are using stock kernel then. Try franco's or faux's kernel.
adb remount wont work from os on stock boot.img.
After rebooting into recovery go to mounts and storage-->mount /system and then push something from adb. See if that works.
KillerTheLord said:
Yes I have rooted the phone but the ROM is stock(I was thinking to put in CM9 Alpha).
About the second thing. I know how to boot my phone into recovery(Vol Down + Power -> From Screen -> Recovery(ClockwerkMod))
But about the rest I don't know.
Sorry about my annoying questions this is my first time I am dealing with rooting and stuff.
Click to expand...
Click to collapse
I think this app does exactly what you want :
http://forum.xda-developers.com/showthread.php?t=1687590
realunited123 said:
I guess you are using stock kernel then. Try franco's or faux's kernel.
adb remount wont work from os on stock boot.img.
After rebooting into recovery go to mounts and storage-->mount /system and then push something from adb. See if that works.
Click to expand...
Click to collapse
Well this didn't work either. I hope to switch to some other ROM in future(I hate HTC Sense ). But as of now Root Explorer did the job. I mounted my sdcard and copied files to it and used Root Explorer to move files to /system and then changed permissions.
Thanks for help it really made it easy .
make sure your path devs are oke for su.
in terminal run:
sudo su
adb kill-server
adb devices
you should see your HOX HTxxxxx nr.
and here you should be able to connect eclipse to HOX by adb.
NikMel said:
make sure your path devs are oke for su.
in terminal run:
sudo su
adb kill-server
adb devices
you should see your HOX HTxxxxx nr.
and here you should be able to connect eclipse to HOX by adb.
Click to expand...
Click to collapse
The problem was not accessing the device using ADB. The problem was I was not able to write to root system. ES Explorer and Root Explorer both did the job for me. I will be putting the final instructions for the process(detailed ones) soon.
Instructions onw how to copy files to root file system on HTC One X with S-ON
1) Unlock and Root your phone. Follow instructions below
http://www.youtube.com/watch?v=gIeq8Jx28cs
and then
http://www.youtube.com/watch?v=80lMHUgxwww
2) Install ES Explorer(File Manager) Link :- https://play.google.com/store/apps/details?id=com.estrongs.android.pop&hl=en
3) Connect device to computer(even if it is not recognized by ADB/Computer)
4) In Phone select Disk drive option. Now the phone's storage will be mounted on your computer as removable device.
5) Copy the files you want to send to phone's root system to any folder here.
6) Change phone's mode to charge only and wait for 2-3 secs(let phone remount sdcard)
7) Open ES Explorer and open menu(those 3 dots at bottom and select Settings)
8) Tick the following options
Up to Root
Root Explorer
Mount File System
9) A dialog box for permission will open Grant it.
10) Now copy files from /sdcard/<Folder where u put files> to where ever you want o copy files to.
11) Long press on file to change permissions and stuff.
Post here if you are stuck someone will surely help you.
Hello,
Quick noob question. Today I was experimenting with my phone. I decided that I wanted to push an apk through adb (without much experience on adb). I did this by
Code:
adb remount
adb shell chmod 644 /system/app
adb push .apk/system/app
adb push (a lib file).so /system/lib
adb reboot
Since then my phone has been stuck on boot loop. I'm pretty sure maybe it's because I forgot to mount perhaps? Again, I am new to this. Also I've tried mounting system and data through recovery 4ext. Didn't help.
Can anyone explain what I did wrong? Or fix my problem? Thanks!
EDIT: Fixed the problem by flashing another rom, but would like to learn what I did wrong though. Thanks
To install an app, you need to use 'adb install path/to/app.apk'.
Sent from my HTC Vision using xda app-developers app
OriginalGabriel said:
To install an app, you need to use 'adb install path/to/app.apk'.
Sent from my HTC Vision using xda app-developers app
Click to expand...
Click to collapse
though I'm assuming he wanted to install it as a system app, in which case I would have rebooted into recovery, mounted /data and /system and moved the already installed app from /data/app/ to /system/app/ to make it a system app. (and made sure the appropriate chmod permissions were set). Then rebooted after that was done.
Shouldn't be messing with the /system partition while the phone is booted live.
kbeezie said:
though I'm assuming he wanted to install it as a system app, in which case I would have rebooted into recovery, mounted /data and /system and moved the already installed app from /data/app/ to /system/app/ to make it a system app. (and made sure the appropriate chmod permissions were set). Then rebooted after that was done.
Shouldn't be messing with the /system partition while the phone is booted live.
Click to expand...
Click to collapse
Yes that was my intended purpose. Thanks.
My guess is you broke it by chmod'ing /system/app.
Making it completely not-executable would've stopped the phone from loading any system apps.
-Nipqer
Nipqer said:
My guess is you broke it by chmod'ing /system/app.
Making it completely not-executable would've stopped the phone from loading any system apps.
-Nipqer
Click to expand...
Click to collapse
+1
I think you want something like "chmod 644 /system/app/*" The difference is the /* at the end. Your original command made the directory inaccessible. The new command just changes the files inside. The actaul directory should have 755 permissions - "chmod 755 /system/app" without the /* at the end.
OK I used the kit at port for smt210r and I tryed to add build.props and it gets stuck at boot any ideas
dsilx said:
OK I used the kit at port for smt210r and I tryed to add build.props and it gets stuck at boot any ideas
Click to expand...
Click to collapse
d,
did you reset permissions on build.prop to 644 ?
if not boot to recovery, connect to pc
in terminal, assuming you are using linux, enter;
adb start-server
adb remount
adb shell
and wait for service to start and bring up prompt
then at prompt
# chmod 644 /system/build.prop
exit and reboot
m
no windows 7/8
moonbutt74 said:
d,
did you reset permissions on build.prop to 644 ?
if not boot to recovery, connect to pc
in terminal, assuming you are using linux, enter;
adb start-server
adb remount
adb shell
and wait for service to start and bring up prompt
then at prompt
# chmod 644 /system/build.prop
exit and reboot
m
Click to expand...
Click to collapse
hi no im using windows its different sadly and how can i see if i reset the build.prop to 644 plse for give me i am new to this and il try to do adb
all i know is when i started editing the rom it wouldnt let me edit it so i had to go on my computer and edit it with notpad ++
okay
dsilx said:
hi no im using windows its different sadly and how can i see if i reset the build.prop to 644 plse for give me i am new to this and il try to do adb
all i know is when i started editing the rom it wouldnt let me edit it so i had to go on my computer and edit it with notpad ++
Click to expand...
Click to collapse
notepad++ is good,
unless you set something wrong inside build.prop then it is the wrong permissions on the file
download aromafm http://forum.xda-developers.com/attachment.php?attachmentid=2231581&stc=1&d=1378202418
install just like any zip in recovery just make sure you mount system from recovery. navigate to /system long press on
build.prop and select change permissions. and you should be good unless like i said you got something wrong in
build.prop itself.
m
Just flash the latest update. All my updates include a build.prop.
gr8nole said:
Just flash the latest update. All my updates include a build.prop.
Click to expand...
Click to collapse
Yes, but learning how to get around things has value..
m
link pls and thanks
gr8nole said:
Just flash the latest update. All my updates include a build.prop.
Click to expand...
Click to collapse
Can I pls have the link and @moonbutt74 thanks for all our help I'm just a little confused on what to do with the aroma cause I don't see build.prop
But thank u for all the help
dsilx said:
Can I pls have the link and @moonbutt74 thanks for all our help I'm just a little confused on what to do with the aroma cause I don't see build.prop
But thank u for all the help
Click to expand...
Click to collapse
before your run aromafm, select mounts option in recovery and mount /system , then run aromafm.
there is an option in aromafm to automount all partitions, very helpful.
it takes a little till you get the hang of using it. very good tool.
m
Like a dummy I tried to rename framework-res while using my nexus so I could replace it with an edited one (deb rooted, stock 4.4.4 rom, franco -17 kernel)
Now Im trying to ADB in to rename the original file so it will boot again.
I'm connected to the nexus in ADB but when I try to pull or rename the file I always get some sort of error.
I was able to adb push a framwork file I downloaded on my computer but it still wouldnt boot. Im assuming it was bad.
Any help is much appreciated!
thanks!
Rhatfield25 said:
Like a dummy I tried to rename framework-res while using my nexus so I could replace it with an edited one (deb rooted, stock 4.4.4 rom, franco -17 kernel)
Now Im trying to ADB in to rename the original file so it will boot again.
I'm connected to the nexus in ADB but when I try to pull or rename the file I always get some sort of error.
I was able to adb push a framwork file I downloaded on my computer but it still wouldnt boot. Im assuming it was bad.
Any help is much appreciated!
thanks!
Click to expand...
Click to collapse
The reason it would not boot with the one you pushed to the device is probably because you have to set permissions correctly after the push. Framework res should probably be set to rw-r--r--
Run this after the push, or if the file is still on the phone, run it now.
Code:
adb shell
su
chmod 644 /system/framework/framework-res.apk
SwoRNLeaDejZ said:
The reason it would not boot with the one you pushed to the device is probably because you have to set permissions correctly after the push. Framework res should probably be set to rw-r--r--
Run this after the push, or if the file is still on the phone, run it now.
Code:
adb shell
su
chmod 644 /system/framework/framework-res.apk
Click to expand...
Click to collapse
I will give it a shot the second I get home! Thank you so much for the help. So by default files pushed to the system do not have full read and write permissions?
Thanks again!
Rhatfield25 said:
I will give it a shot the second I get home! Thank you so much for the help. So by default files pushed to the system do not have full read and write permissions?
Thanks again!
Click to expand...
Click to collapse
Yes, most of the time, pushed files will copy with bad permissions. Every time I've ever edited a system APK, I've had to subsequently set permissions before it would act correctly. Might not be 100% your issue, but it's definitely worth a shot.
SwoRNLeaDejZ said:
Yes, most of the time, pushed files will copy with bad permissions. Every time I've ever edited a system APK, I've had to subsequently set permissions before it would act correctly. Might not be 100% your issue, but it's definitely worth a shot.
Click to expand...
Click to collapse
Well now Ive run into a new problem. When I SU to get root access it tells me that /sbin/sh isnt found.
I rooted the n7 with cf autoroot.
this would be a whole lot easier if twrp would mount the tablet so I could just upload and flash a zip to update it.
Well I was able to sideload the boot animation herehttp://forum.xda-developers.com/showthread.php?t=2591471 just to confirm that sideload was working. I rebooted and it worked but still will not get past the boot animation.
The framework file simply needs to be put in /system right? so the command would look like
abd sideload framework-res.apk /system
Is that right?
Rhatfield25 said:
Well now Ive run into a new problem. When I SU to get root access it tells me that /sbin/sh isnt found.
I rooted the n7 with cf autoroot.
this would be a whole lot easier if twrp would mount the tablet so I could just upload and flash a zip to update it.
Click to expand...
Click to collapse
What about trying to use the terminal emulator in twrp?
Rhatfield25 said:
Well I was able to sideload the boot animation herehttp://forum.xda-developers.com/showthread.php?t=2591471 just to confirm that sideload was working. I rebooted and it worked but still will not get past the boot animation.
The framework file simply needs to be put in /system right? so the command would look like
abd sideload framework-res.apk /system
Is that right?
Click to expand...
Click to collapse
You need to fix the framework file before you can boot. Try running the permission command without su first.
Anyone have success pushing a system file and having it stick after reboot WITHOUT root? I haven't been successful to have it stick...
808phoneaddict said:
Anyone have success pushing a system file and having it stick after reboot WITHOUT root? I haven't been successful to have it stick...
Click to expand...
Click to collapse
Not sure if it will work, but have you tried it as su in adb?
>adb shell
>su
#
JimSmith94 said:
Not sure if it will work, but have you tried it as su in adb?
>adb shell
>su
#
Click to expand...
Click to collapse
Yeah I tried it didn't recognize su...I'll try again later
808phoneaddict said:
Yeah I tried it didn't recognize su...I'll try again later
Click to expand...
Click to collapse
Sounds like you need to figure out why su isn't working anyway. You might need to update your adb.
JimSmith94 said:
Sounds like you need to figure out why su isn't working anyway. You might need to update your adb.
Click to expand...
Click to collapse
I updated that...hmm otherwise it should be working? Would I need to do command prompt from another window?
If you have root installed and reboot to recovery, then "adb shell" should get you a # prompt.
If it does, then you're already ADB with root.
If you get $ prompt then you don't have root.
I don't think you can push system files without root?
You certainly can't "adb root" without root. That's for sure.
808phoneaddict said:
I updated that...hmm otherwise it should be working? Would I need to do command prompt from another window?
Click to expand...
Click to collapse
I just tried it on my rooted phone and "su" asks for root privileges on the phone, so that won't work, sorry.
JimSmith94 said:
I just tried it on my rooted phone and "su" asks for root privileges on the phone, so that won't work, sorry.
Click to expand...
Click to collapse
You did it in recovery mode? I know u can try to mount as rw in recovery...could U try that and see what happens?
808phoneaddict said:
You did it in recovery mode? I know u can try to mount as rw in recovery...could U try that and see what happens?
Click to expand...
Click to collapse
As I said, my phone is rooted, so of course it would work in recovery for me. Assuming you don't have TWRP already installed, you could try booting into TWRP with "fastboot boot <TWRP img file name>" and see if you can mount system and copy your system file with its file manager.
JimSmith94 said:
As I said, my phone is rooted, so of course it would work in recovery for me. Assuming you don't have TWRP already installed, you could try booting into TWRP with "fastboot boot <TWRP img file name>" and see if you can mount system and copy your system file with its file manager.
Click to expand...
Click to collapse
I actually booted to twrp and change the mount to rw, then I pushed the hosts file successfully (it says 100%) but when I boot up it doesn't work, not sure if I need to prove the old one maybe? Or does having the boot slots make a difference? Am I pushing to the wrong place?
808phoneaddict said:
I actually booted to twrp and change the mount to rw, then I pushed the hosts file successfully (it says 100%) but when I boot up it doesn't work, not sure if I need to prove the old one maybe? Or does having the boot slots make a difference? Am I pushing to the wrong place?
Click to expand...
Click to collapse
Sorry, you'll have to find someone else to help, or just go ahead and root it. You can probably unroot it after you have done your copy, but I don't know why you would bother.
I have always rooted my phones, so I haven't done what you're trying to do. Plus I don't even have my Pixel XL yet, so I don't know anything about the boot slots yet. Over and out!
JimSmith94 said:
Sorry, you'll have to find someone else to help, or just go ahead and root it. You can probably unroot it after you have done your copy, but I don't know why you would bother.
I have always rooted my phones, so I haven't done what you're trying to do. Plus I don't even have my Pixel XL yet, so I don't know anything about the boot slots yet. Over and out!
Click to expand...
Click to collapse
O yeah I rooted, was rooted for a while but I ran into the data drain that others are reporting when there is an OTA update...knowing that December is upon us I was trying to unroot but push modified hosts file so I wouldn't get ads. Honestly, if it wasn't for the ads, I have no problem with a stock pixel xl...there hasn't been much development for it just yet, understandable since it's so new...