[Q] Renaming SystemUI.odex to SystemUI.odex.bak in /system/app/ using ADB - Captivate Q&A, Help & Troubleshooting

Hey guys,
I'm attempting to rename SystemUI.odex to SystemUI.odex.bak in /system/app/ using ADB. Is this the correct string of console commands?
Code:
adb shell remount rw
adb pull /system/app/SystemUI.odex
adb push /system/app/SystemUI.odex.bak
adb chmod 644 /system/app/SystemUI.odex.bak
adb rm /system/app/SystemUI.odex
adb shell remount ro
Confirmation would be appreciated.

Ok, according to Hencke, this is the only ADB command I would have to use:
Code:
adb shell remount rw
adb shell mv /system/app/SystemUI.odex /system/app/SystemUI.odex.bak
adb shell remount ro
Totally makes sense. Thanks!

Related

Problem Flashing recovery image

I have Sprint signed 2.0 ruu and I have the phone rooted successfully.
My problem is this, when I try to flash the recovery image it says "file not found"
I've tried flashing from terminal on phone and from CMD on pc.
I have searched and searched with no luck.
please anyone help. Also how to use nand Restore what is the file that is being restored.
Also how to add removed apps from DC 2.0.72 rom step by step please.
Thanks
make sure debugging is turned on in the phone
settings>applications>development>usb debugging
Here is a guide that you can try
http://forum.androidcentral.com/htc-hero-roms-hacks/9542-how-repair-your-bootloader-after-using-2-1-ruu.html
or try these instructions
http://forum.xda-developers.com/showthread.php?t=583291
Theres some others you can do, but its a males it more difficult after doing the 2.1 RUU
Thanks for the reply
Still showing flash image not found
I tried those websites with no luck!! Does this not work after installing the 2.1 ruu?
C:\AndroidSDK\tools>adb shell
# su
su
# cd /sdcard
cd /sdcard
# flash_image recovery recovery-ra-heroc-v1.6.2-blue.img
flash_image recovery recovery-ra-heroc-v1.6.2-blue.img
flash_image: not found
# [1] Killed su
# exit
exit
C:\AndroidSDK\tools>adb shell
# su
su
# cd /sdcard
cd /sdcard
# flash_image recovery recovery-ra-heroc-v1.5.2.img
flash_image recovery recovery-ra-heroc-v1.5.2.img
flash_image: not found
# flash_image recovery recovery-RA-heroc-v1.5.2.img
flash_image recovery recovery-RA-heroc-v1.5.2.img
flash_image: not found
# exit
exit
# adb push recovery-RA-heroc-v1.5.2.img /sdcard
adb push recovery-RA-heroc-v1.5.2.img /sdcard
adb: not found
#
joshuadb20 said:
I tried those websites with no luck!! Does this not work after installing the 2.1 ruu?
C:\AndroidSDK\tools>adb shell
# su
su
# cd /sdcard
cd /sdcard
# flash_image recovery recovery-ra-heroc-v1.6.2-blue.img
flash_image recovery recovery-ra-heroc-v1.6.2-blue.img
flash_image: not found
# [1] Killed su
# exit
exit
C:\AndroidSDK\tools>adb shell
# su
su
# cd /sdcard
cd /sdcard
# flash_image recovery recovery-ra-heroc-v1.5.2.img
flash_image recovery recovery-ra-heroc-v1.5.2.img
flash_image: not found
# flash_image recovery recovery-RA-heroc-v1.5.2.img
flash_image recovery recovery-RA-heroc-v1.5.2.img
flash_image: not found
# exit
exit
# adb push recovery-RA-heroc-v1.5.2.img /sdcard
adb push recovery-RA-heroc-v1.5.2.img /sdcard
adb: not found
#
Click to expand...
Click to collapse
No that will not work. pm me and I will fix it with you on gtalk.
Since you ran the test ruu you do not have flash_image on your phone. You need to push flash_image to /system/bin/flash_image. I will attach it as a .zip below. Put the .zip in your sdk folder then follow these adb instructions to rename and push it:
Code:
adb remount
adb push flash_image.zip /system/bin/flash_image
Be sure to type it as above to correctly rename it..it is not really a .zip but XDA forces the rename to attach..
You have to give flash_image permission now, so type this:
Code:
adb remount
adb shell chmod 0755 /system/bin/flash_image
Now you should be able to flash the custom recovery if you have indeed rooted your phone and gave permissions to flash_image.
Thankyou thankyou thankyou
I love you guys, This fixed my issue, it drove me nutts all night last night.
Thank you very much!!! Your posting solved my all day issue, im happy :-*
C:\>cd androidsdk\tools\
C:\AndroidSDK\tools>adb shell
$ su
su
# cd /sdcard/
cd /sdcard/
# flash_image recovery recovery-ra-heroc-v1.2.3.img
flash_image recovery recovery-ra-heroc-v1.2.3.img
flash_image: not found
# adb remount
adb remount
adb: not found
#
I am having the same issue on my phone except I can't get the the flash_image file to even work. See above for example of my outcome. Am I not rooted fully? I am using universal androot and getting the Superuser icon and everything. Please help if you can. This is driving me crazy.
91nbtsi said:
...
# flash_image recovery recovery-ra-heroc-v1.2.3.img
...
Click to expand...
Click to collapse
Are you sure it is not named recovery-RA-heroc-v1.2.3.img ?
kjjjjshab said:
Are you sure it is not named recovery-RA-heroc-v1.2.3.img ?
Click to expand...
Click to collapse
I am pretty new to this, so it is case sensitive? I will try and see.
jeez guys. just plug your phone into your computer and drop the heroc-...img into your sdcard's root folder.
then:...\tools> adb shell
ls (to see what's in your current directory)
cd sdcard (to hop onto your sdcard)
su (if not already root)
flash_recovery recovery-.......3.img
reboot recovery
kjjjjshab said:
Are you sure it is not named recovery-RA-heroc-v1.2.3.img ?
Click to expand...
Click to collapse
It is the command "flash_image" that is not found - not the img file
I have the same problem - but in posting it I see that everyone is looking at the error as though it relates to9 the img file
91nbtsi said:
C:\>cd androidsdk\tools\
C:\AndroidSDK\tools>adb shell
$ su
su
# cd /sdcard/
cd /sdcard/
# flash_image recovery recovery-ra-heroc-v1.2.3.img
flash_image recovery recovery-ra-heroc-v1.2.3.img
flash_image: not found
# adb remount
adb remount
adb: not found
#
I am having the same issue on my phone except I can't get the the flash_image file to even work. See above for example of my outcome. Am I not rooted fully? I am using universal androot and getting the Superuser icon and everything. Please help if you can. This is driving me crazy.
Click to expand...
Click to collapse
Here is what you need to do
Code:
adb shell
cd sdcard
flash_image recovery xxxxxxxxxxxx.img
reboot recovery
You should not need to remount, but if you need to or for future reference you type in adb remount from the command prompt and not in adb shell
diogenesthesceptic said:
It is the command "flash_image" that is not found - not the img file
I have the same problem - but in posting it I see that everyone is looking at the error as though it relates to9 the img file
Click to expand...
Click to collapse
Read an earlier post, download the file and do what the post instructs. You need the flash_image file on your phone
danknee said:
Since you ran the test ruu you do not have flash_image on your phone. You need to push flash_image to /system/bin/flash_image. I will attach it as a .zip below. Put the .zip in your sdk folder then follow these adb instructions to rename and push it:
Code:
adb remount
adb push flash_image.zip /system/bin/flash_image
Be sure to type it as above to correctly rename it..it is not really a .zip but XDA forces the rename to attach..
You have to give flash_image permission now, so type this:
Code:
adb remount
adb shell chmod 0755 /system/bin/flash_image
Now you should be able to flash the custom recovery if you have indeed rooted your phone and gave permissions to flash_image.
Click to expand...
Click to collapse
Mine says "remount failed: Operation not permitted" when I try to remount.
LARPkitten said:
Mine says "remount failed: Operation not permitted" when I try to remount.
Click to expand...
Click to collapse
If you are in recovery and trying this you do not need to remount. If you are booted into Android try
Code:
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
you might also replace /dev/block/mtdblock3 with /dev/mtd/mtd1
and then chmod
I am having this problem as well.
Okay if your having a problem with the ole "flash_image not found" saying do this open up command prompt and type
Code:
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
then open up another command prompt with the old one still running and type this
Code:
adb push flash_image /bin
adb shell chmod 0755 /system/bin/flash_image
Now you should be good to flash your recovery
Asadullah said:
Okay if your having a problem with the ole "flash_image not found" saying do this open up command prompt and type
Code:
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
then open up another command prompt with the old one still running and type this
Code:
adb push flash_image /bin
adb shell chmod 0755 /system/bin/flash_image
Now you should be good to flash your recovery
Click to expand...
Click to collapse
I'm getting all the same errors everyone else on here is getting. Is flash_recovery a file that is required? I don't mean the .img file, but is it some kind of command file?

[?] what are your favorite ADB commands when flashing a new ROM?

So I like to flash a new ROM every now and then.
Recently I flashed LeoFroYo 2.0.0 on my N1.
I ALWAYS flash everything.
I enjoy starting fresh, don't you?
So I start every ROM install the same way: by running a few ADB commands.
***** ***** ***** ***** ***** ***** ***** ***** ***** *****
replace ADWLauncher with Launcher2 (IF APPLICABLE, Cyanogen, etc.) URL
Code:
adb shell stop
adb remount
adb shell cp /system/app/ADWLauncher.apk /system/app/ADWLauncher.apk.bak
adb pull /system/app/ADWLauncher.apk ./_STUFF/launchers/ADWLauncher.apk
adb push _STUFF/launchers/Launcher2.apk /system/app
adb shell rm /system/app/ADWLauncher.apk
adb shell start
adb reboot
DroidX multi-touch keyboard BLACK URL
Code:
adb remount
adb shell cp /system/app/LatinIME.apk /system/app/LatinIME.apk.bak
adb pull /system/app/LatinIME.apk.bak ./_STUFF/Droid2keyboard/LatinIME.apk.bak
adb shell cp /system/lib/libjni_latinime.so /system/lib/libjni_latinime.so.bak
adb pull /system/lib/libjni_latinime.so.bak ./_STUFF/Droid2keyboard/libjni_latinime.so.bak
adb push ./_STUFF/Droid2keyboard/d2keyboard-signed-fixed4_BLACK.apk /system/app/LatinIME.apk
adb push ./_STUFF/Droid2keyboard/libjni_latinime.so /system/lib/libjni_latinime.so
adb shell reboot
Swype 1.56.30.7625.t100 URL
Code:
adb install _STUFF/swype/swype.wvga-1.56.apk
TitaniumBackup 3.3.5.2 URL
Code:
adb install _STUFF/TitaniumBackup/TitaniumBackup.apk
All without touching the market.
What are your favorites?!

adb problems.......

first of all iv been trying to root my legend for hours and this is geting very furstarting... i am using the guide here http://forum.xda-developers.com/showthread.php?t=845512
i have finaly managed to get adb to work and have made my goldcard after 2 days of intense work and now im trying to downgrade my phone to root it
i am geting the following error in adb
when i type adb remount it says remount failed operation not permitted i have looked all over the net and found no answer
in additon to that when im trying to use adb push i type the following
adb shell
$su
su
#adb push flash_image /data/local/
adb push flash_image /data/local/
i just get the same line repeated how to excute commands from adb? this is very confusing since im noob with rooting also the following lines i don't know how to excute them too
adb push flash_image /data/local/
adb push misc1-2.img /data/local/
chmod 755 /data/local/flash_image
cat /dev/mtd/mtd0 > /sdcard/misc_backup.img
/data/local/flash_image misc /data/local/misc1-2.img
please explain to me how to use theese thanks!
That one is relatively easy. You could also follow Paul's guide but I like my approach better
Connect your phone to your PC. Second you have to install VISIONary r13 into your phone and do the "temproot" procedure. After a successful "temproot" you should be able to adb shell and then su. Fire up command prompt and issue:
adb shell
su
...you should have root privileges now (showing #). Next thing is backing up misc partition and replacing it with one from hack4legend-v5.zip. Extract this zip somewhere and fire another command promt there. Now you should upload flash_image binary and misc1-2.img:
adb push flash_image /data/local/
adb push misc1-2.img /data/local/
...switch back to 1st command prompt and change permission of flash_image_binary:
chmod 755 /data/local/flash_image
...and backup your current misc partition:
cat /dev/mtd/mtd0 > /sdcard/misc_backup.img
Now flash misc1-2.img:
Code:
/data/local/flash_image misc /data/local/misc1-2.img
exit
...and you are set to downgrade retaining HBOOT 1.00.
Click to expand...
Click to collapse
Read better, you have to open a new terminal for pushing the files to the phone, you can't use adb push while you are in adb shell.
BTW you should avoid posting questions in development section.

Issue with SuperSU on AndroidThings 1.0

I tried to perform a manual installation of SuperSU (2.82 SR5) on my Raspberry Pi running the developer version of AndroidThings 1.0.4, which is based on Android 8.1.0 / API 27. Rather than flashing the zip in recovery, as I'm not sure where to start with that on the Things platform, I manually pushed files and set file permissions and contexts via adb shell. My guide for this was the summary at the top of the script at SuperSU/META-INF/com/google/android/update-binary.
The new su binary appears to work for the most part. I can execute su and read/write with the interactive shell. However, when I attempt to execute the same operations as a command through su (ie: su -c mkdir /system/testdirectory), it responds saying its a read-only filesystem. The filesystem has been remounted with adb remount. I'm unable to perform the remount with the mount command, as /system is not listed in /proc/filesystems. From my understanding, this is due to some recent security model changes in Android. That being said, after the adb remount, all other normal interactions with the filesystem seem to work without issue. I have verified that selinux is in permissive mode.
I don't have busybox installed. These efforts are to allow for installation of busybox for other projects.
Does anybody know whats causing the commands proxied through su to not work correctly?
Here are the commands I used to perform my manual installation.
Code:
cd ~/Downloads/SuperSU-2.82-SR5
adb connect [IP_ADDRESS]:5555
adb root
adb remount
adb push common/install-recovery.sh /system/etc/install-recovery.sh
adb shell chmod 0755 /system/etc/install-recovery.sh
adb shell chcon u:object_r:toolbox_exec:s0 /system/etc/install-recovery.sh
adb shell ln -s /system/etc/install-recovery.sh /system/bin/install-recovery.sh
adb shell chcon -h u:object_r:toolbox_exec:s0 /system/bin/install-recovery.sh
cd armv7
# adding as `su_next` to prevent any issues before dropping it in
adb push su /system/xbin/su_next
adb shell chmod 0755 /system/xbin/su_next
adb shell chcon u:object_r:system_file:s0 /system/xbin/su_next
adb push su /system/xbin/daemonsu
adb shell chmod 0755 /system/xbin/daemonsu
adb shell chcon u:object_r:system_file:s0 /system/xbin/daemonsu
adb push supolicy /system/xbin/supolicy
adb shell chmod 0755 /system/xbin/supolicy
adb shell chcon u:object_r:system_file:s0 /system/xbin/supolicy
adb push libsupol.so /system/lib/libsupol.so
adb shell chmod 0644 /system/lib/libsupol.so
adb shell chcon u:object_r:system_file:s0 /system/lib/libsupol.so
adb shell cp /system/bin/app_process32 /system/bin/app_process32_original
adb shell cp /system/bin/app_process32 /system/bin/app_process_init
adb shell rm /system/bin/app_process
adb shell ln -s /system/xbin/daemonsu /system/bin/app_process
adb shell rm /system/bin/app_process32
adb shell ln -s /system/xbin/daemonsu /system/bin/app_process32
adb shell chmod 0755 /system/bin/app_process
adb shell chmod 0755 /system/bin/app_process32
adb shell chcon u:object_r:system_file:s0 /system/bin/app_process
adb shell chcon u:object_r:zygote_exec:s0 /system/bin/app_process32
# Swapping new su binary in
adb shell cp /system/xbin/su /system/xbin/su_original
adb shell rm /system/xbin/su
adb shell mv /system/xbin/su_next /system/xbin/su
adb shell /system/xbin/su --install
adb reboot
I need to correct myself: the new su binary can only read with privileges. It cannot write at all. I am only able to write either as the adb root shell, or with the stock su binary. I noticed that the device's adbd process relaunches with its own privileged context passed to it when adb remount is run. (adbd --root_seclabel=u:r:su:s0)
If I've run adb root and adb remount, adb shell, and then enter the su binary, I lose the ability to write to the remounted filesystem. So it appears that there is something wrong with the new su binary and its related files.
Anyway, this isn't critical to my project, so I'm abandoning my efforts for now. If anyone has any ideas on what is wrong here, I'd love to hear them and give this another shot!

[SCRIPT] [HACK] root on most variant

REMOVED
Mods please close thread
Code:
adb push su98 /data/local/tmp
adb shell cd data/local/tmp && adb shell chmod 775 su98 && adb shell ./su98 && adb shell su
adb push recovery /sdcard
adb shell cat /dev/zero >> /dev/mtd/mtd2 && adb shell cd /sdcard && adb shell flash_image recovery /sdcard/recovery.img
adb shell rm /sdcard/recovery.img
adb shell reboot
sorry this is incomplete, more like a PoC
I think will not work if bootloader still locked
GiaiPhapAndroid said:
I think will not work if bootloader still locked
Click to expand...
Click to collapse
yEs

Categories

Resources