Messed up build.prop, phone won't boot, can I push build.prop via adb? - Samsung Galaxy Nexus

My phone is on 4.1.2 still, and I had edited the build.prop to not update to 4.2 (after hearing all the problems). Now that 4.2.2. is out i decided to update, I tried restoring the build.prop file that i had as a backup of 4.1.2. I guess I must've changed some text without realizing.
Now my phone is stuck, it gives me the Google Logo with the unlocked sign, and then it disappears...and where there should be a boot animation...black. Nothing. Stays like that.
Any way I can push the build.prop via the computer using abd or something?

Not sure if adb will push to system, since i had an issue pulling from system.
Are you rooted?
You could try booting to recovery to enable adb, then remount system as r/w
adb shell
su
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
cd /system/ NOT SURE IF THIS IS REQUIRED, I'D TRY IT FIRST WITHOUT THIS LINE TO SEE
chmod 644 build.prop
chown root.root build.prop
exit
I've never had to do that, but i belive my linux syntax is correct, i pulled it from http://www.linux.org/article/view/file-permissions-chown. This is only of course if the build.prop failed bc on the incorrect permissions and ownership(maybe you had it on your sdcard). If this doesn't work, it looks like you'll be fastboot flashing a system image. [Sometimes the time and date of your build.prop may affect the ability to ota even if you get it to boot, to which you would need to reflash the system image anyway]. But i'd like to know if you try this and it works.

So what I ended up doing was installing clockwork recovery and then installing an odexed Rom version of the stock image of 4.1.2. Everything works, nothing got wiped.
Sent from my GT-N7100 using xda app-developers app

bodh said:
Not sure if adb will push to system, since i had an issue pulling from system.
Are you rooted?
You could try booting to recovery to enable adb, then remount system as r/w
adb shell
su
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
cd /system/ NOT SURE IF THIS IS REQUIRED, I'D TRY IT FIRST WITHOUT THIS LINE TO SEE
chmod 644 build.prop
chown root.root build.prop
exit
I've never had to do that, but i belive my linux syntax is correct, i pulled it from http://www.linux.org/article/view/file-permissions-chown. This is only of course if the build.prop failed bc on the incorrect permissions and ownership(maybe you had it on your sdcard). If this doesn't work, it looks like you'll be fastboot flashing a system image. [Sometimes the time and date of your build.prop may affect the ability to ota even if you get it to boot, to which you would need to reflash the system image anyway]. But i'd like to know if you try this and it works.
Click to expand...
Click to collapse
Yes, you need to 'cd /system' before typing the commands to change permissions and ownership, as you have them.
Sent from my Nexus

ksc6000 said:
So what I ended up doing was installing clockwork recovery and then installing an odexed Rom version of the stock image of 4.1.2. Everything works, nothing got wiped.
Sent from my GT-N7100 using xda app-developers app
Click to expand...
Click to collapse
How did you install clockwork recovery when it was not booting at all ??! Could you please guide me ? I actually have an LG Optimus G stuck in boot loop ..... (T_T)

Claureid said:
How did you install clockwork recovery when it was not booting at all ??! Could you please guide me ? I actually have an LG Optimus G stuck in boot loop ..... (T_T)
Click to expand...
Click to collapse
Then you should go to your own forums, as 99% of the info here wont do you any good

Claureid said:
How did you install clockwork recovery when it was not booting at all ??! Could you pbootlease guide me ? I actually have an LG Optimus G stuck in boot loop ..... (T_T)
Click to expand...
Click to collapse
I don't think you can do that with your phone what I did. But here is the gu ide that I used to temporarily boot into clockwork recovery to use it:
http://forum.xda-developers.com/showpost.php?p=23229578&postcount=3

ksc6000 said:
I don't think you can do that with your phone what I did. But here is the gu ide that I used to temporarily boot into clockwork recovery to use it:
http://forum.xda-developers.com/showpost.php?p=23229578&postcount=3
Click to expand...
Click to collapse
Thanked you buddy !!

Related

[GUIDE] Flash any recovery easily on the phone using flash_image

Background
To update (flash) a recovery image onto your phone allows you to update or replace your recovery environment on your phone. There are a number of ways to flash a new recovery image, some of the more commonly used methods are using a tool such as ROM Manager or using development tools such as Fastboot. There is also a third method using a standalone utility "flash_image" which allows the flashing of recovery using the terminal emulator on the phone.
flash_image is not a new tool, it has been used on Android since the beginning, many custom ROMs include the utility as part of the ROM itself though not all stock ROMs (including the stock ROM on the G2) include it.
Requirements
1. A permanently rooted (with S-OFF) phone
2. The flash_image binary
3, A recovery image that is compatible with your phone and ROM
3. A terminal emulator application on the phone or use of an ADB shell
Overview:
1. Get the flash_image binary and recovery image onto your phone
2. Copy or move the flash image binary to your system and make executable
3. Use flash_image to update your recovery environment
Stage 1: Get flash_image and recovery image on your phone
1. Download the flash_image binary (not needed if you are running a custom ROM that includes this binary)
2. Download the recovery image you wish to use
You can either directly download the files onto your phone or onto your PC and transfer to your phone. Probably the easiest way to do this is to connect your phone to your computer via USB and mount USB storage, then copy the files to your SD Card. Alternatively you can use ADB Push, bluetooth file transfer or several other methods.
Stage 2: Copy or move the flash image binary to your system and make executable
In terminal emulator:
su
mount -o remount, rw /system
cd /sdcard (or wherever you downloaded/copied the file)
cp flash_image /system/bin
cd /system/bin
chmod 777 flash_image
Click to expand...
Click to collapse
Stage 3: use flash_image to update your recovery environment
In terminal emulator:
su (not needed if using the same terminal session used in the steps above)
cd /sdcard (or wherever you downloaded/copied the recovery image)
flash_image recovery recovery.img (use the appropriate file name for the image file you are flashing)
Click to expand...
Click to collapse
Reboot into recovery and verify that the correct recovery environment is installed
Notes
Any of the commands that call for using a terminal emulator on the phone should work fine using an ADB shell if you prefer.
This was tested on G2 but I can't think of why it would not work on Desire Z or any other phone for which this version of flash_image works. Obviously different phones have different compatible recovery images.
I've attached a zip file containing the flash_image binary that I extracted from the CM 6.1 update zip. I suspect most custom ROMs already have flash_image.
If you are wondering "Why should I use this method over using ROM Manager?" you could be using a recovery image that ROM manager doesn't support, for example ClockWorkMod Recovery 3.x which is required for some experimental ROMs.
If you are wondering "Why should I use this method over using fastboot?" The two main reasons are you can't use fastboot if you are not with a computer with working ADB and using fastboot requires that you have previously flashed the engineering HBOOT.
This is my first guide so I'm open to suggestions or feedback.
Nice one
Though I would suggest that
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
could be simplified to :
Code:
mount -o remount,rw /system
Edit - actually /system isn't even on /dev/block/mtdblock3, and it's not a yaffs2 file system, I suspect that's come from another phone model ?
"dd" will do exactly the same, but no need to install extra stuff since its already there.
dhkr123 said:
"dd" will do exactly the same, but no need to install extra stuff since its already there.
Click to expand...
Click to collapse
I wouldn't have a problem using dd myself. But I would have thought it was much more risky, since instead of typing something relatively user-friendly like "recovery", you're typing in /dev/xyz/abc or similar, which if you get it slightly wrong could be disastrous ?
Excellent, worked for me, flashed CW 3.0 without fastboot
steviewevie said:
Nice one
Though I would suggest that
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
could be simplified to :
Code:
mount -o remount,rw /system
Edit - actually /system isn't even on /dev/block/mtdblock3, and it's not a yaffs2 file system, I suspect that's come from another phone model ?
Click to expand...
Click to collapse
Interesting, I've been using that command since forever (since I first rooted my G1 in early 2009) and it definitely does work on my G2 as well as my wife's MT4G.
I just tried "mount -o remount,rw /system" on my phone and it does not work, mount gives me the "Usage:" messages which seems to mean it wants more parameters.
steviewevie said:
I wouldn't have a problem using dd myself. But I would have thought it was much more risky, since instead of typing something relatively user-friendly like "recovery", you're typing in /dev/xyz/abc or similar, which if you get it slightly wrong could be disastrous ?
Click to expand...
Click to collapse
Unless you run wpthis before dd, you're perfectly safe. The radio partitions are all protected by the power-on write protect feature of the eMMC AS WELL as the linux kernel write protect on low addresses. Worst you can do is blow away your system, data, cache, misc, boot, or recovery partitions, and these are trivial to recover from.
raitchison said:
Interesting, I've been using that command since forever (since I first rooted my G1 in early 2009) and it definitely does work on my G2 as well as my wife's MT4G.
I just tried "mount -o remount,rw /system" on my phone and it does not work, mount gives me the "Usage:" messages which seems to mean it wants more parameters.
Click to expand...
Click to collapse
Depends on whether or not the mount command can tell the associations between the devices and mount points, which is determined by either system configuration, or what mount command you are using (i.e. android's mount or busybox mount).
raitchison said:
Interesting, I've been using that command since forever (since I first rooted my G1 in early 2009) and it definitely does work on my G2 as well as my wife's MT4G.
I just tried "mount -o remount,rw /system" on my phone and it does not work, mount gives me the "Usage:" messages which seems to mean it wants more parameters.
Click to expand...
Click to collapse
Sorry, there should have been an extra space, this works on my phone :
Code:
mount -o remount, rw /system
I don't have a "/dev/block/mtdblock3" on my system. My system partition is mounted on /dev/block/mmcblk0p25, and it is ext3 not yaffs2.
What ROM are you running ? I am running the stock DZ 1.34 ROM. I wonder if you are running Gingerbread ?
steviewevie said:
Sorry, there should have been an extra space, this works on my phone :
Code:
mount -o remount, rw /system
I don't have a "/dev/block/mtdblock3" on my system. My system partition is mounted on /dev/block/mmcblk0p25, and it is ext3 not yaffs2.
What ROM are you running ? I am running the stock DZ 1.34 ROM. I wonder if you are running Gingerbread ?
Click to expand...
Click to collapse
I'm running the Stock G2 T-Mobile post-OTA ROM, definitely not Gingerbread.
Edit: I just tried your method and it works, I will update the guide because your way is simpler and sounds like a safer choice.
you could just rename the CW 3.x.x recovery to the exact named recovery slap it in the cloclwork download folder after you delete the old one and flash it with CW just a quicker trick for GB roms
Not sure that's actually quicker, at least I don't think it would be for me, especially if you are changing recoveries with any frequency (like if tying out Gingerbread ROMs then going back to a 2.2 ROM) because you'd need to constantly rename your recovery images. With my method you would only need to leave the two files named as they are, or for expediency you could rename to recovery.img and recovery3.img then when you wanted to switch you could just execute:
flash_image recovery recovery.img
Click to expand...
Click to collapse
or
flash_image recovery recovery3.img
Click to expand...
Click to collapse
Depending on which recovery you wanted at that point & time.
As I said in the guide, there are already a number of options available, using ROM Manager and fastboot are the most commonly seen in guides but your method and mine are other options for people for whom they work better.
Works!!!
Hi my friends!
It worked for me flawlessly. I was using virtuos 0.9 on my desireZ
Great description, but file did not work for me
It's a very good description that a novice like me can follow. And, I am sure the provided file works for many of you, since many of you reported it to work. After following this guide, and not getting it to work (Stopping Signal error), I decided to find another binary file for flash_image, and the other flash_image file worked for me on my Sprint CDMA Hero. My phone currently has aospMod v0.9.9.2 | AOSP 2.2.1(12/10/2010), if it matters.
One can download a flash_image from here http://cyanogen-files.carneeki.net/flash_image.zip
Then unzip and place on sdcard - follow all the steps in the original post of this thread.
It is my understanding that this file is not unique for different android phones, but if I am incorrect, someone please reply to this thread to correct me.
Again, great job in summarizing the steps.
Regards,
Sanjiv
so darn easy! thank you!
Also usable for splash screen ??
Just curious,
Anybody tried to use flash_image to flash a custom splash screen ?
Something like :
flash_image splash1 customsplash.img
very good post for a newbie like me, just want to make sure, do i need to do the stage 2 every time I flash the recovery?
jaoyina said:
very good post for a newbie like me, just want to make sure, do i need to do the stage 2 every time I flash the recovery?
Click to expand...
Click to collapse
No, you only need to do stage 2 once, whenever you update/change recoveries from that point forward just use stage 3.
Is there a way I can reflash a recovery without access to the ROM?
I'm stuck at the HTC splash screen, so I'm basically stuck in my current (broken) recovery.
sanjivp2000 said:
One can download a flash_image from here (..)[/URL]
Click to expand...
Click to collapse
The flash_image in the start post did not work for me, the one above did.
Also, my HTC Hero was missing the cp command.
Instead, I used: cat /sdcard/flash_image > /system/bin/flash_image
Successfully flashed recovery again

[Q] Bricked need help....

So I was loading a new cm9 rom last night and everything seemed fine until reboot now its stuck at the roms boot screen...
So I attempted to get it to reboot to recovery or fast reboot no dice...
went through all the forums and couldnt get anythign to work...
adb devices sees my kindle fine...
i can adb shell and do a ls and it see directorys and i can cd to a different directory...
and time i try too do the commands to push fbmode or any of that i always get
failed to copy 'fbmode' to '/data/local/temp': No such file or directory
if i try to put it in a different directory or mkdir through shell i get an error for read-only file system
someone please help me out here...
First of all, what recovery are you using?
Bornxero said:
So I was loading a new cm9 rom last night and everything seemed fine until reboot now its stuck at the roms boot screen...
So I attempted to get it to reboot to recovery or fast reboot no dice...
went through all the forums and couldnt get anythign to work...
adb devices sees my kindle fine...
i can adb shell and do a ls and it see directorys and i can cd to a different directory...
and time i try too do the commands to push fbmode or any of that i always get
failed to copy 'fbmode' to '/data/local/temp': No such file or directory
if i try to put it in a different directory or mkdir through shell i get an error for read-only file system
someone please help me out here...
Click to expand...
Click to collapse
/data/local/tmp not /data/local/temp
soupmagnet said:
First of all, what recovery are you using?
Click to expand...
Click to collapse
think i was using cwm cant remember for sure but i cant get it to boot into anything but the cm9 bootscreen...
and tmp vs temp doesnt matter...all directories show either no such directory or read only system
Bornxero said:
think i was using cwm cant remember for sure but i cant get it to boot into anything but the cm9 bootscreen...
and tmp vs temp doesnt matter...all directories show either no such directory or read only system
Click to expand...
Click to collapse
It is important to know because the newer ICS roms won't work with CWM, only TWRP.
from the screenshots ive seen of twrp looks like it was cwm...I just want to be able to restore to stock first then I'll do another rom via twrp...
I previously loaded the hellfire ICS without issue as well...
Hey is it a 3.0 kernel from like energy's, I ,may have your answer then. I just need to know if thats the issue you are having.
Sent from my Amazon Kindle Fire using Tapatalk 2
Bornxero said:
I previously loaded the hellfire ICS without issue as well...
Click to expand...
Click to collapse
How recently? Trust me, from what I've seen here, you need TWRP. None of the 3.0 kernel based ICS roms work well or at all with CWM these days, including Hellfire.
Bornxero said:
So I was loading a new cm9 rom last night and everything seemed fine until reboot now its stuck at the roms boot screen...
So I attempted to get it to reboot to recovery or fast reboot no dice...
went through all the forums and couldnt get anythign to work...
adb devices sees my kindle fine...
i can adb shell and do a ls and it see directorys and i can cd to a different directory...
and time i try too do the commands to push fbmode or any of that i always get
failed to copy 'fbmode' to '/data/local/temp': No such file or directory
if i try to put it in a different directory or mkdir through shell i get an error for read-only file system
someone please help me out here...
Click to expand...
Click to collapse
I would try to use KF utility which is very useful for all kinds of issues with KF and very easy to use. It has helped me a great deal.
Yea its was a 3.0 kernel...gedeROM..
forest1971 said:
I would try to use KF utility which is very useful for all kinds of issues with KF and very easy to use. It has helped me a great deal.
Click to expand...
Click to collapse
I deff. tried everything in the kindle unbrick utility if thats what your talking about...
Bornxero said:
I deff. tried everything in the kindle unbrick utility if thats what your talking about...
Click to expand...
Click to collapse
I'm guessing you still have the stock bootloader ("kindle fire" bootlogo when the device first powers up) or you would have gotten yourself to recovery already. You'll want to try and get the bootmode changed to recovery and reboot like this...
Code:
adb shell idme bootmode 5001
adb reboot
If you can get back to CWMR, the first thing you should do is flash a new bootloader... probably FFF 1.4a that you can find in the dev section. Then use that to get into fastboot mode and flash TWRP.
If you cannot change bootmodes through adb. You'll have to push fbmode or rcmode in some writeable directory. I'm guessing /data/local/tmp doesn't exist in CM9, so try pushing it to /data instead.
If none of that works and my guess about your bootloader is right, you're going to need a factory cable.
kinfauns said:
I'm guessing you still have the stock bootloader ("kindle fire" bootlogo when the device first powers up) or you would have gotten yourself to recovery already. You'll want to try and get the bootmode changed to recovery and reboot like this...
Code:
adb shell idme bootmode 5001
adb reboot
If you can get back to CWMR, the first thing you should do is flash a new bootloader... probably FFF 1.4a that you can find in the dev section. Then use that to get into fastboot mode and flash TWRP.
If you cannot change bootmodes through adb. You'll have to push fbmode or rcmode in some writeable directory. I'm guessing /data/local/tmp doesn't exist in CM9, so try pushing it to /data instead.
If none of that works and my guess about your bootloader is right, you're going to need a factory cable.
Click to expand...
Click to collapse
w00t solved thanx....i was crying over here lol...
used this to put back the old rom I was using then used KFU to install twrp and installed the new rom without issue....
thanx again....

[Q] Unrooting

Hi All,
This is just a quick 2 part question as I see many threads for the GNEX on rooting, but none very concrete on removing root. I've tried searching, but I must have missed it.
So, my questions are:
1. Once rooted via whatever method (I used fastboot method myself, thanks efrant for teaching the fastboot stuff), how do I unroot this thing to bring it back to stock configuration?
2. To make the unit truly stock again, can I just use fastboot and flash a factory google image? I know doing this will eliminate all my data, but will it remove all traces of any rooting done? (Insecure Kernal, SU, Busybox and whatever else)?
Please let me know.
Thanks guys... wasn't planning on rooting, but I miss the ability to do it. lol
1. See two.
2. Yes.
Flashing the stock image will bring your phone back to an out-of-the-box state.
Sent from my Galaxy Nexus using Tapatalk 2
infazzdar said:
1. See two.
2. Yes.
Flashing the stock image will bring your phone back to an out-of-the-box state.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Thanks man,
Makes me feel better about my decision to root this phone.
Appreciate the reply.
If you installed Superuser to system when you rooted then you'll need to remove that also but here are the basic adb commands for the job (make sure you have data and system mounted via CWM so you have access):
Code:
adb shell
rm /system/bin/su
mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
exit
BusyBox is another matter since CWM installs it to sbin every time you boot with it. Perhaps someone has a better idea (?), but from messing around a bit the other night the best method I've come up with is to use BusyBox to remove BusyBox, as follows:
Code:
adb shell
cd /sbin
cp busybox /data/local/tmp/busybox
chmod 06755 /data/local/tmp/busybox
rm busybox
/data/local/tmp/busybox rm `/data/local/tmp/busybox find -follow -maxdepth 1 -type l`
/data/local/tmp/busybox rm /data/local/tmp/*
exit
that second to last line gets rid of all the stray symlinks busybox left behind, not sure if CWM leaves any of those recovery/symlinks in sbin also or if those should be removed as well; perhaps someone else can fill us in on that point!
osm0sis said:
If you installed Superuser to system when you rooted then you'll need to remove that also but here are the basic adb commands for the job (make sure you have data and system mounted via CWM so you have access):
Code:
adb shell
rm /system/bin/su
mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
exit
BusyBox is another matter since CWM installs it to sbin every time you boot with it. Perhaps someone has a better idea (?), but from messing around a bit the other night the best method I've come up with is to use BusyBox to remove BusyBox, as follows:
Code:
adb shell
cd /sbin
cp busybox /data/local/tmp/busybox
chmod 06755 /data/local/tmp/busybox
rm busybox
/data/local/tmp/busybox rm `/data/local/tmp/busybox find -follow -maxdepth 1 -type l`
/data/local/tmp/busybox rm /data/local/tmp/*
exit
that second to last line gets rid of all the stray symlinks busybox left behind, not sure if CWM leaves any of those recovery/symlinks in sbin also or if those should be removed as well; perhaps someone else can fill us in on that point!
Click to expand...
Click to collapse
So flashing a Google factory image won't remove root? Or it will, but won't remove all evidence if someone went searching around trying to deny warranty.
When I rooted, I used the method of flashing recovery, then installed the su.zip via recovery. When I unrooted I simply flashed a factory image.
when you say installed superuser to system I'm guessing you mean something more advanced than the typical root process, correct?
Sent from my Galaxy Nexus using XDA
thos25 said:
So flashing a Google factory image won't remove root? Or it will, but won't remove all evidence if someone went searching around trying to deny warranty.
When I rooted, I used the method of flashing recovery, then installed the su.zip via recovery. When I unrooted I simply flashed a factory image.
when you say installed superuser to system I'm guessing you mean something more advanced than the typical root process, correct?
Sent from my Galaxy Nexus using XDA
Click to expand...
Click to collapse
Flashing the factory system image DOES remove root (and busybox and anything else you changed on the ROM).There is no need to do anything that osm0sis said to do.
And there is no "more advanced" process of rooting. Root is two files placed on you system: /system/bin/su and /system/app/Superuser.apk. Nothing more. (Whether you place them there yourself, or have CWM do it for you, is irrelevant.) Remove those those and root is gone.
Sent from my Galaxy Nexus using Tapatalk 2
if you grab wugfresh's toolkit itll do all of that with one-click convenience. thats what I do to un-root my Nexus.
Zbraptorsdr said:
if you grab wugfresh's toolkit itll do all of that with one-click convenience. thats what I do to un-root my Nexus.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=21936493
Sent from my Galaxy Nexus using Tapatalk 2
efrant said:
Flashing the factory system image DOES remove root (and busybox and anything else you changed on the ROM).There is no need to do anything that osm0sis said to do.
Click to expand...
Click to collapse
Right, I was referring to "unroot"ing without reflashing the system.img, since my intent with that method was to keep all settings, etc. as-is, just remove all traces of root.
osm0sis said:
Right, I was referring to "unroot"ing without reflashing the system.img, since my intent with that method was to keep all settings, etc. as-is, just remove all traces of root.
Click to expand...
Click to collapse
Yup, you would need to remove it manually if you were running a custom ROM, but with a stock ROM, flashing the system partition only WOULD leave all your data/settings as is.
osm0sis said:
BusyBox is another matter since CWM installs it to sbin every time you boot with it.
Click to expand...
Click to collapse
IS this true? Can someone confirm? And is it true for all phones?
Zbraptorsdr said:
if you grab wugfresh's toolkit itll do all of that with one-click convenience. thats what I do to un-root my Nexus.
Click to expand...
Click to collapse
The easiest way to do it, just click and its does it on its own.
The-Droidster said:
IS this true? Can someone confirm? And is it true for all phones?
Click to expand...
Click to collapse
Just wanted to clear this up now that I'm a bit more wise on the subject. The sbin stuff doesn't matter since it's all part of the ramdisk, and gets generated on each boot (to recovery or OS) and otherwise doesn't exist. No need to delete anything but su. :good:
osm0sis said:
Just wanted to clear this up now that I'm a bit more wise on the subject. The sbin stuff doesn't matter since it's all part of the ramdisk, and gets generated on each boot (to recovery or OS) and otherwise doesn't exist. No need to delete anything but su. :good:
Click to expand...
Click to collapse
he means, of course, "su" as in /system/bin/su AND /system/app/Superuser.apk. partially correct, i think, ramdisk is only used for early OS boot. Ramdisk + kernel = boot.img.
Recovery is on a different partition, for starters, and AFAIK, deploys needed files to a temporary location on the phone's ram or in the file system, which would be the recovery partition. Busybox gets placed in there as well.
Sent from my i9250
stock kernel has a ramdisk but not all kernels are packaged with one. recovery also has a ramdisk, just as it also has a kernel. Decompile/split/unzip one some time and you'll see /sys/ and /proc/ and /sbin/ all get generated from the ramdisk. And yes, if you for some reason put Superuser.apk or SuperSU.apk in /system/app/ (a completely unnecessary step), then naturally they need to go too.

[Q][ADB][Stuck on bootloop]

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.

[Q] sdcard read-only after restoring

galaxy nexus 4.1.1 (JRO03C).
backed up & restored all apps and sdcard using GNex Toolkit v7.8.
after restoring, sdcard seems to be read-only, applications complain about "open failed: EACCES Permission denied" when trying to open files in /storage/sdcard0/... . tried remount, didn't help. directory permissions look fine to me.
what am i doing wrong?
how about trying to open /sdcard/?
and dont use a toolkit..
sent from my i9250
I bet you've done something on toolkit. I always backup and restore, but I have no problem at all
Can you install app from play store? If so, install root browser. It has a feature where you can change permission.
Swyped on my Galaxy Nexus running AOKP with Franco Kernel
bk201doesntexist said:
how about trying to open /sdcard/?
Click to expand...
Click to collapse
what do you mean by opening /sdcard ? the message above comes from an application which worked fine before backup-restore.
i can read files from /sdcard, it's just that the applications cannot write there.
e.g. camera does not work either.
kyokeun1234 said:
I bet you've done something on toolkit. I always backup and restore, but I have no problem at all
Can you install app from play store? If so, install root browser. It has a feature where you can change permission.
Click to expand...
Click to collapse
i've had this exact same problem twice in a row when restoring to two different nexuses (nexi?)
so i'm trying to find out what am i doing wrong.
yes, i can install applications. i already have ES file explorer installed; which permissions should I change? all permissions look fine to me.
All the permissions should be checked. I dunno about es file explorer, but on root browser, you'll have to check all the permissions like this
Swyped on my Galaxy Nexus running AOKP with Franco Kernel
op, have you tried fixing permissions in recovery?
sent from my i9250
kyokeun1234 said:
All the permissions should be checked. I dunno about es file explorer, but on root browser, you'll have to check all the permissions like this
Click to expand...
Click to collapse
mine permissions for /sdcard (/storage/sdcard0) are 775. is this a problem? it won't let me change them to 777...
bk201doesntexist said:
op, have you tried fixing permissions in recovery?
Click to expand...
Click to collapse
how do i do this? i've found this page: wiki.cyanogenmod.com/wiki/Fix_permissions (cannot post links), but running "fix_permissions" from terminal emulator gives me
Code:
[email protected]:/ $ su
[email protected]:/ # fix_permissions
sh: fix_permissions: not found
or do i have to boot into recovery first? (22 -> 4 from gnex toolkit)? how do i run terminal emulator then?
sorry, i'm really new with android..
qot said:
how do i do this? i've found this page: wiki.cyanogenmod.com/wiki/Fix_permissions (cannot post links), but running "fix_permissions" from terminal emulator gives me
Code:
[email protected]:/ $ su
[email protected]:/ # fix_permissions
sh: fix_permissions: not found
or do i have to boot into recovery first? (22 -> 4 from gnex toolkit)? how do i run terminal emulator then?
sorry, i'm really new with android..
Click to expand...
Click to collapse
boot into recovery, run the menus, but i think on cwm it's under Advanced > Fix permissions. wth? using a toolkit to BOOT into recovery? jeez... just power down the device, press vol up+vol down+power, select Recovery with vol keys, press start to boot into your currently installed recovery.
bk201doesntexist said:
boot into recovery, run the menus, but i think on cwm it's under Advanced > Fix permissions. wth? using a toolkit to BOOT into recovery? jeez... just power down the device, press vol up+vol down+power, select Recovery with vol keys, press start to boot into your currently installed recovery.
Click to expand...
Click to collapse
when I do this, i get a lying android with an exclamation mark in read triangle. is this "recovery"?
it does not seem to respond to any key, volume or power...
... somehow i got the following menu:
Code:
Android system recovery <3e>
Volume up/down to move highlight;
power button to select.
reboot system now
apply update from ADB
apply update from USB drive
wipe data/factory reset
wipe cache partition
which one should i select to fix permissions?
i've also found an app in play market called "fix permissions"
when i run it, i can select an application and it says "Permissions fixed, UIDs aligned".
however, nothing changes, sdcard is still not writable.
okay, you dont have a custom recovery installed. look for cwm latest non-touch, or twrp.
the stock recovery doesn't have this option.
is it only me or this is becoming quite freakin old very fast, we replying to "i used a toolkit to do"? i know this is q&a, but how in the hell how are we supposed to troubleshoot this?
i can only think of "redo things manually like it's supposed to." and to myself i think "witness the simplicity of command line interfaces and weep".
sent from my i9250
bk201doesntexist said:
okay, you dont have a custom recovery installed. look for cwm latest non-touch, or twrp.
the stock recovery doesn't have this option.
is it only me or this is becoming quite freakin old very fast, we replying to "i used a toolkit to do"? i know this is q&a, but how in the hell how are we supposed to troubleshoot this?
i can only think of "redo things manually like it's supposed to." and to myself i think "witness the simplicity of command line interfaces and weep".
Click to expand...
Click to collapse
i'd be glad to redo things manually, or whatever it takes to make sdcard writable again. this is really a nuisance.
i've downloaded "recovery-clockwork-6.0.1.0-maguro.img" and did the following from fastboot:
Code:
C:\Fastboot>fastboot devices
01498B0C1200F013 fastboot
C:\Fastboot>fastboot flash recovery recovery-clockwork-6.0.1.0-maguro.img
sending 'recovery' (4894 KB)... OKAY [ 0.703s]
writing 'recovery'... OKAY [ 0.757s]
finished. total time: 1.460s
C:\Fastboot>fastboot reboot
rebooting...
finished. total time: 0.006s
however, when i reboot into recovery again, i still get "Android system recovery <3e>"
am i doing something wrong?
I've also tried this with "fastboot flash recovery openrecovery-twrp-2.2.2.0-maguro.img" instead, no errors, same result.
check for /system/recovery-from-boot.p. is it there? rename it to recovery-from-boot.p.bak.
reflash recovery.
note: you can try 'fastboot boot recovery.img'.
sent from my i9250
bk201doesntexist said:
check for /system/recovery-from-boot.p. is it there? rename it to recovery-from-boot.p.bak.
Click to expand...
Click to collapse
yes, this worked. thanks!
however, even after i've installed twrp and ran "fix permissions", the problem remains exactly the same: applications complain about not being able to write to sdcard; camera does not work, etc. etc..
forget your data and start fresh manually by flashing factory images manually through fastboot.
sent from my i9250
It's not a permissions issue, it's an ownership issue...
If you have any directories/files that you can't modify or delete, then boot into CWM recovery, plug in the USB cable, go into adb shell. Also make sure that /data is mounted in the CWM mounts menu. Then:
cd /data/media
chown -R media_rw.media_rw *
danger-rat said:
It's not a permissions issue, it's an ownership issue...
If you have any directories/files that you can't modify or delete, then boot into CWM recovery, plug in the USB cable, go into adb shell. Also make sure that /data is mounted in the CWM mounts menu. Then:
cd /data/media
chown -R media_rw.media_rw *
Click to expand...
Click to collapse
yeah, thats it, i forgot. thanks.
sent from my i9250
danger-rat said:
It's not a permissions issue, it's an ownership issue...
If you have any directories/files that you can't modify or delete, then boot into CWM recovery, plug in the USB cable, go into adb shell. Also make sure that /data is mounted in the CWM mounts menu. Then:
cd /data/media
chown -R media_rw.media_rw *
Click to expand...
Click to collapse
that was it, thank you so much!
danger-rat said:
It's not a permissions issue, it's an ownership issue...
If you have any directories/files that you can't modify or delete, then boot into CWM recovery, plug in the USB cable, go into adb shell. Also make sure that /data is mounted in the CWM mounts menu. Then:
cd /data/media
chown -R media_rw.media_rw *
Click to expand...
Click to collapse
thanks a ton!

Categories

Resources