[Q] Removed T-Mobile Boot and Shutdown Animations - Now ADB cannot run as root - LG Optimus L9 P760, P765, P768, P769

Hello everyone,
I have a T-Mobile L9 Optimus and I have rooted it according to this guide, it was very helpful
http://forum.xda-developers.com/showthread.php?t=2173465
After removing a bunch of bloatware, I also wanted to remove T-Mobile's Boot and Shutdown animations, which on this phone are located in system/media -> bootanimation.zip and shutdownanimation.zip
I used ADB to pull both files into Windows as a backup
Then, I used ADB to open a shell as su:
adb shell
su
Then I realized I couldn't use the rm command for those zip files because the /system folder is mounted as read-only by default. To change that I used the following commands:
mount -o rw,remount /system
then I used the rm command to remove the two zip files
then I used
mount -o ro,remount /system
to have the folder back in its default read-only state
Then I restarted my phone and voila - no shut-down animation and only a default LG and Android animation on startup
Then I re-started Command prompt to get back to ADB (I still don't know how to exit shell and get back to ADB, help on that?) and here's the problem - I can no longer access root permission in ADB.
When I type in adb root, I get "adbd cannot run as root in production builds"
When I type in adb remount, I get remount failed: Operation not permitted
If I open a shell, I can still enter su, but after the procedures above, ADB thinks that my phone is a production build and I would like to know why, and how I can fix it without returning the original bootanimation.zip and shutdownanimation.zip files.
Is there a background process on T-Mobile phones that goes through a default checklist of system files, then determines that a phone must be a production build if some of those files aren't there? Is there a way to modify that process if it exists? I would rather do that than have to put in a "dummy" bootanimation.zip and shutdownanimation.zip
Lastly, if I were to return those original files through shell, would everything return to normal regarding ADB?

So adb shell and su doesn't work for you now ?
Edit:
I missed a part of your post,
That is a normal behaviour. I don't thing you could adb root before removing animations.
Edit:
If you want to run something from command prompt you have to:
adb shell su -c command_goes_here

Related

installing root, flash_image permission denied

going through the entire 1.5 to 2.1 root tutorial to a tee, but once i get to the recovery image, this happens (following is an entire copy/paste of what I went through, incase i did something wrong before i hit the point)
Code:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Lemcott>cd C:\android-sdk-windows\tools
C:\android-sdk-windows\tools>adb shell mount -o rw,remount /dev/block/mtdblock3
/system
adb server is out of date. killing...
* daemon started successfully *
C:\android-sdk-windows\tools>adb shell mount -o rw,remount /dev/block/mtdblock3
/system
C:\android-sdk-windows\tools>adb push recovery.img /sdcard
1192 KB/s (3926016 bytes in 3.215s)
C:\android-sdk-windows\tools>adb push flash_image /system/bin/flash_image
448 KB/s (9640 bytes in 0.021s)
C:\android-sdk-windows\tools>adb shell flash_image recovery /sdcard/recovery.img
flash_image: permission denied
C:\android-sdk-windows\tools>
EDIT: I am a complete ass hat. nothing to see here, move a long. mods delete this if you please.
P.S. Everyone else: ALWAYS DOUBLE CHECK BEFORE POSTING FOR HELP. *ahem* now be on your way.
try programming thru fastboot. press call + vol down and select the fastboot option and use this command from the pc
fastboot flash recovery recovery.ing
Sent from my Evil Eris v1.1 using the XDA mobile application powered by Tapatalk
It looks like you forgot the step where you modify the flash_image's permissions
Code:
adb shell chmod 755 /system/bin/flash_image
I had the same thing but I just kept reentering
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push recovery.img /sdcard
adb push flash_image /system/bin
and after maybe 4 iterations it worked.
I have a very simular problem:
(moto droid with android 2.1)
$su
su
Permission denied
Click to expand...
Click to collapse
I have try to use chmod the file but it said permission denied on chmod... please help T_T
note this is rooted, of course, when i'm in the phone type su, it'll pop up ask for me to allow or not, allowed, everything seems fine, but when i try to modify files in /system/etc/wifi (trying to make it work for ad hoc) it said permission denied....(even in su???) I tried in adb and it's the same, very very frustrating, any help is appreciated, Thanks.
edit: here's what it looks like using chmod...
>adb shell chmod 755 /system
unable to chmod /system: Read-only file system
>
Click to expand...
Click to collapse
penthoy said:
I have a very simular problem:
(moto droid with android 2.1)
I have try to use chmod the file but it said permission denied on chmod... please help T_T
note this is rooted, of course, when i'm in the phone type su, it'll pop up ask for me to allow or not, allowed, everything seems fine, but when i try to modify files in /system/etc/wifi (trying to make it work for ad hoc) it said permission denied....(even in su???) I tried in adb and it's the same, very very frustrating, any help is appreciated, Thanks.
edit: here's what it looks like using chmod...
Click to expand...
Click to collapse
make it read/write
penthoy said:
I have a very simular problem:
(moto droid with android 2.1)
I have try to use chmod the file but it said permission denied on chmod... please help T_T
note this is rooted, of course, when i'm in the phone type su, it'll pop up ask for me to allow or not, allowed, everything seems fine, but when i try to modify files in /system/etc/wifi (trying to make it work for ad hoc) it said permission denied....(even in su???) I tried in adb and it's the same, very very frustrating, any help is appreciated, Thanks.
edit: here's what it looks like using chmod...
Click to expand...
Click to collapse
I wouldn't try to flash anything you find here to a Moto Droid.
This is for the HTC Droid Eris.
Otherwise, and if I'm misunderstanding you, good luck with your problem.
archmagus said:
It looks like you forgot the step where you modify the flash_image's permissions
Code:
adb shell chmod 755 /system/bin/flash_image
Click to expand...
Click to collapse
I've been bashing my head in ALL day trying to get past this and finally found this thread! This worked perfectly!
theboo7 said:
make it read/write
Click to expand...
Click to collapse
How should i make is read/write?????
i cant get it to work at all.. need help plz.
Hello Guys
why cant i mount that **** together, i have the root permission, but also i dont..somehow
Code:
Microsoft Windows [version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. Alle rettigheder forbeholdes.
C:\Users\Rasmus H. G. Johnsen>d:
D:\>cd android\tools
D:\android\tools>adb devices
List of devices attached
HT9B7LG00092 device
D:\android\tools>adb shell mount -o rw,remount /dev/block/mtdbloc3 /system
mount: Operation not permitted
D:\android\tools>adb shell
$ ls
ls
sqlite_stmt_journals
cache
sdcard
etc
system
sys
sbin
proc
logo.rle
init.rc
init.goldfish.rc
init.bahamas.rc
init
default.prop
data
root
dev
$ exit
exit
Also if I go on and try to do this:
Code:
D:\android\tools>adb push flash_image /system/bin
failed to copy 'flash_image' to '/system/bin/flash_image': Read-only file system
I know that the flash_image fil and my recovery.img file is in this library and also on my sdcard, but I cant push the gotdamn flas_image file in the /system/bin catalog.
Can some one please help me ?
PS. I have the USB-debugging turned ON.
How do you know that you have root? Or, how did you gain root?
doogald said:
How do you know that you have root? Or, how did you gain root?
Click to expand...
Click to collapse
I have the app called androot from google market, ang i have run it to get root.
wfdi said:
I have the app called androot from google market, ang i have run it to get root.
Click to expand...
Click to collapse
I'm not aware of that app, and cannot find it in the market myself (do you have a link?)
However, one way to check for sure if you truly have root is run the adb command adb shell and, when you get a prompt, type the command "su". If it returns with a "#" prompt (rather than the "$" prompt that you are seeing), then you have root on the phone.
Most people these days root with either jcase's 1click root for eris: https://market.android.com/details?id=net.andirc.erisrooter or they use the procedure here: http://androidforums.com/eris-all-things-root/127861-universal-eris-root-dummies.html
You may be able to use the steps here as well, since you seem pretty comfortable with adb and have that working already: http://androidforums.com/eris-all-things-root/125436-detailed-leak-root-tutorial.html
Guys new I found another solution (tested on u8150)
First make sure that you are rooted first.
Open adb shell
Type in su.
Remount the system partition as read write.
Change the owner of system from root to system via chown root system
the exit the shell and push flash_image to system/
also push clockworkmodrecover.img into the system partion dont forget the last /.
then exit.
use a file manager, I used rootbrowser.apk without a memory card and installed recovery.
with rootbrowser copy flash_image to the bin directory.
don't forget to change the owner back to root to the system partition after you finish with rootexplorer or whatever u use even adb can work.
then the rest follows.
The above works only if your'e rooted and have adb.
Goodluck
haha am a genius Installing ROM +Recover without sdcard on u8150
all you have to do is:-
1. Make sure u have installed clockwork mode recovery on your device and have su binary.
2. Open adb with the device normally on.
3. Remount the data partition as read write using mount remount in adb .
4. use adb and push the cynogenmode.zip or any rom that fits into the data partition using
adb push romname.zip /data/
5. Reboot into clockworkmod recovery using the various options available.
6. This is what to do if you don't have a sdcard.
open adb with phone connected and run
adb shell
mount /data /sdcard
then go back to the main recovery menu and wipe dalvik cache only
then choose update from sdcard
flash your rom and tadaaa.
your'e done.
NB:CAUTION MAKE SURE TO FLASH A ROM THAT DOES NOT WRITE INTO THE DATA PARTION
THIS CAN BE DONE BY LOOKING FOR A FILE CALL UPDATE SCRIPT IN THE zip OF THE ROM U WANT TO INSTALL
Am going to make a post about this later.
Goodluck
Lol, 3 and a half year break between responses.
The problem with flash_image & dump_image is that it doesn't work on devices devices which use emmc (recent phones)and have
mmcblk0
and cat /proc/mtd won't work here either.
This means that you have to use dd to write to this devices.
I wonder how guys determine the partitions to use on such devices, and someone should hint as to what is going on since it seems manufacturers seriously don't want people to exploit their devices.

Rooted Hero can't delete bootanimation.zip

Hi,
I have rooted my Hero with the tutorial on villainroms page but when I try to delete the bootanimation.zip with astro file manager it doesn't work.
zulu1 said:
Hi,
I have rooted my Hero with the tutorial on villainroms page but when I try to delete the bootanimation.zip with astro file manager it doesn't work.
Click to expand...
Click to collapse
Did you remount the system partition as RW first? The app should let you do this
I have just done what was said in the tutorial so I don't think that I have done what you say and actually I don't quite know what that is.
I made myself a bootscreen and I tried to use that but it didn't work so I downloaded a bootscreen available on the web but that didn't work either.
The bootscreen I have at the moment is from here called drawing-froyo maybe it has to do something with that.
Nah, nothing to do with which one you have.
You need to find out how to remount system in astro (google maybe) and do that.
It will then be easy to overwrite
You could use adb, or downloader a popular root explorer for your pc to browse your phone
MacaronyMax said:
You could use adb, or downloader a popular root explorer for your pc to browse your phone
Click to expand...
Click to collapse
Could you provide the adb command to remount with the proper permissions?
Command prompt:
C:\ ..\> adb devices <-- this will detect your phone connect to pc
C:\ ..\> adb remount <-- remount the phone
C:\ ..\> adb shell <-- command to enter shell command, the drive letter C change to # meaning u have enter shell mode
# su <-- superuser permission
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system <-- changing permission of read/rewrite
# cd /system/media/bootscreen/ <-- change directory to /system/media/bootscreen/
# ls -l <-- list of apps/files in current directory, this is not important, just to ensure the file u seek is there..
# rm any_files_u_wanna_delete <-- remove aka delete command(make sure u already backup or pulled it before doing this)
# exit <-- exit shell command, type it again until the # change back to "C:\>"
C:\ ..\> adb push C:\any_files_u_wanna_push /system/media/bootscreen/ <-- push ur files, with directory of the file to push then directory of where the files should be pushed in
C:\ ..\> adb reboot <-- reboot command, reboots the phone, unplug it and see it runs.. if the bootanimation didn't play/just stalled, try redoing all these steps with the old bootanimation, or do a nandroid restore.
as far as I know, bootanimation in /system/media/bootanimation/ folder is not in zip files, it's in multiple files(in my stock 2.1, it's boot.gif, boot.mp3, boot2.gif, boot_animation.xml and boot_bg.gif). so I bet, u have to extract these files from the zip and push it one by one.
Good luck on adb

[Q] Help with bootanimation

i have wildfire S-OFF and root, using CM7 stable,i installed super manager, gave it superuser permissions,set busybox path to system/xbin,gave R/W acces to system, and tried to copy bootanimation.zip to both data/local and system/media... but when i paste super manager always says not enough free space... but i doubt thats the issue cause the animation is just a few kbs...after it says not enough free space it the sign goes away and the bootanimation.zip appears in the directory as it was copied there but when i reboot i dont have the animation just blank screen.. i tried everything and i dont really have a clue whats wrong
can anyone help me please?
you need to copy the file as root, which means your file manager should have asked for permission. if you cant get it to work you can just fire up a terminal on your phone and run the following commands
su
cp <path to bootanimation you want to use> /system/media/bootanimation.zip
Or via ADB
(Place the bootanimation.zip to where you have adb)
Open up command prompt
cd (location of your adb)
adb shell
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3
# chmod 777 /system
exit
adb push bootanimation.zip data/local
thank you both for your help it works now
Thank you very much.
It works correctly

[Q] ADB Shell

Hi guys,
So I'm in a spot of bother with my Android Tablet (Sony Tablet S) - I deleted the default launcher from the /system/app folder and when I power my device on I get a constant stream of force closes. It can't be used, all I can access is the settings menu.
I'm trying to push a launcher across into the system/app folder - it's rooted, and ADB is working.
Now here's the trouble.
I start CMD from platform-tools folder > adb devices > my device is listed.
adb shell > adb devices > no longer listed.
Any commands I enter in the shell, I "su" and its granted permissions, then adb push 1.apk /system/app > error: device not found. If I try the same without adb shell, then it's permission denied.
I'm pretty desperate to get this working, but any ideas please? I've contacted Sony, I hope that they will repair this, at a cost or not.
Thanks.
When you are in the shell, you don't need to type "adb" anymore, maybe that's it. "push" must be used with adb though, but not in adb shell.
For the permission problem, is /system/ mounted writeable? You could try running this line (not in shell):
Code:
adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
This should mount /system/ writeable. Then, try again with adb push. This might differ from device to device though, I don't know if it will work for you.
Other than that, I recommend you pose your question again in the subforum specific to your Android device: http://forum.xda-developers.com/forumdisplay.php?f=1294
Thanks for the response.
I've just run that, and got mount: operation not permitted.
Ok, try it again as follows:
Code:
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Ok, when I run that it works, but as soon as I push, I get device not found?
Anymore suggestions please?
what exactly do you type in when you push? Do you push after entering "adb shell"?
I've made some progress!
I've mounted the /data partition with busybox and now have GoLauncherX.apk in there. But I'm still getting all of the force closes and I pressing the home button, I can't get to the home, it's almost likes it's not installed....
I'll keep trying but it could be something else at fault.
You might need to reflash the ROM. To find out how that is done, check the subforum appropriate to your device.
If you deleted the stock launcher from the system partition, I would suggest you try to get it back there first.

ADB push alternative from Android device itself (non-rooted)

I have a non-rooted Android device with stock ROM 4.4.2 and I have the following test shell script:
Code:
adb push test.sh /data/local/tmp
adb shell "cd /data/local/tmp; chmod 755 test.sh"
adb.exe shell "sh /data/local/tmp/test.sh > /dev/null 2>&1 &"
If I run this over ADB from PC to my device, it simply works.
Now convert this to:
Code:
cp test.sh /data/local/tmp
cd /data/local/tmp; chmod 755 test.sh
/system/bin/sh /data/local/tmp/test.sh > /dev/null 2>&1 &"
and it doesn't work. It says permission denied on /data/local/tmp.
Is there any other EXT4 place on a non-rooted device that I can do this?
Well, I cd to /data/local/tmp and even submitting a 'ls' command inside Terminal Emulator doesn't work, it says permission denied, but when doing it from PC to Android using ADB it's fine. Is there any workaround for this? I want to be able to do this on the device itself.
Thanks
idoit said:
I have a non-rooted Android device with stock ROM 4.4.2 and I have the following test shell script:
Code:
adb push test.sh /data/local/tmp
adb shell "cd /data/local/tmp; chmod 755 test.sh"
adb.exe shell "sh /data/local/tmp/test.sh > /dev/null 2>&1 &"
If I run this over ADB from PC to my device, it simply works.
Now convert this to:
Code:
cp test.sh /data/local/tmp
cd /data/local/tmp; chmod 755 test.sh
/system/bin/sh /data/local/tmp/test.sh > /dev/null 2>&1 &"
and it doesn't work. It says permission denied on /data/local/tmp.
Is there any other EXT4 place on a non-rooted device that I can do this?
Well, I cd to /data/local/tmp and even submitting a 'ls' command inside Terminal Emulator doesn't work, it says permission denied, but when doing it from PC to Android using ADB it's fine. Is there any workaround for this? I want to be able to do this on the device itself.
Thanks
Click to expand...
Click to collapse
No there isnt, not if you try using /data partition. ADB can read this partition (and that too was added around android kitkat itself for purpose of adb backup
etc). So ADB can read this partition, but terminal emulator and such cannot.
Assuming that you have a great reason to simply not copy the sh file to user-usable internal memory, /system partition is the one place where you can copy things without actually having root (and even access them with terminal emulator, but not manipulate them), and this isn't that simple either. Rather, the method will be device dependent. For instance, if you have a phone like Nexus phones, simply download stock firmware, open/extract it depending on what format it is (img or tar), add your sh file and repack the firmware, then flash it into the phone. The firmware should be same as your current installed so your applications dont mess up. But this method is not only long (and messy if your device has integrity checks on firmware files), but also not possible on some phones (as far as I know).
You can also try copying the sh file with adb to /data/data/com.android.terminal. Then you should be able to access this with terminal emulator (since an app has permissions inside its own data folder). However I have not tested this method and I am not sure it will work.
Besides this, every app (including terminal emulator) runs in a sandbox and does not have access to anything except /system (read-only access), emulated user-storage and its own data inside /data/data/. So in phone itself, you cannot read the file unless you copy it to /system or user-memory. And this finally implies that except above two methods, there is no other way to copy file to some other place except user-memory and be able to read it using some app inside phone itself without rooting.
Thanks for your comprehensive reply. I resolved the problem. Yes, it's right, I can simply run the shell script without even moving it to /data/local/tmp... so now I can conveniently running it directly from my phone without having to turn a computer on and do it over ADB.
thankx

Categories

Resources