Uninstalling an APK via command prompt? - G1 Q&A, Help & Troubleshooting

I found this website: http://www.androidkit.com/steps-to-install-and-uninstall-apk-file-on-android-g1-device
Section 3: Uninstalling the .apk file from the G1 device before installing the same .apk again.
1. In the G1 Phone, Go to Applications Menu ->Settings->Manage Applications.
2. Select the application which you want to Uninistall, and click on the ‘Uninstall’ button.
3. Follow steps 6 and 7 of Section 1.
Section 4: Uninstalling the .apk file (from the Device or Emulator) using adb shell.
There is an adb uninstall command which always shows Failure!!!
Using adb shell :
Important: The device has to be unplugged from USB if you are trying to uninstall from the emulator, else emulator should not be open and device needs to be plugged in the USB of the PC if you are trying to uninstall from the G1 Device. If either of them are not connected the adb shell command will not work
Go to the shell and making sure adb is in PATH:
Go to shell (from cmd->adb shell or directly through a terminal)
#
#cd data
#cd app
#cd ls
You will get a list of installed application with the complete package name of the package containing the main activity. e.g com.company.product.apk
#rm com.company.product.apk
#cd ls
You will not find the application – you just removed it!.
Click to expand...
Click to collapse
So, when I type:
Cd Data
Cd App
Cd ls
in my command prompt I get:
cd: can't cd to ls
$
as a prompt feedback.
----
I found an .APK to enable my headphone adapter working ( see this thread: http://forum.xda-developers.com/showthread.php?t=575534 ) via this board ( see this thread: http://forum.xda-developers.com/showthread.php?t=511704 ), and if it doesn't work, I'm taking precautions on how to uninstall it.
Anyone know why it's doing this?
Thanks people.

Minifig said:
I found this website: http://www.androidkit.com/steps-to-install-and-uninstall-apk-file-on-android-g1-device
So, when I type:
Cd Data
Cd App
Cd ls
in my command prompt I get:
cd: can't cd to ls
$
as a prompt feedback.
----
I found an .APK to enable my headphone adapter working ( see this thread: http://forum.xda-developers.com/showthread.php?t=575534 ) via this board ( see this thread: http://forum.xda-developers.com/showthread.php?t=511704 ), and if it doesn't work, I'm taking precautions on how to uninstall it.
Anyone know why it's doing this?
Thanks people.
Click to expand...
Click to collapse
the command should be "ls" not "cd ls"
also, if you know the package name you could use adb: adb uninstall <package_name>
and if you're just trying to install an app that you already have (such as updating the app) you could use adb and not have to uninstall first with: adb install -r app_name.apk

OK.
I'm just going to make sure before I even install this thing:
http://code.google.com/p/toggleheadset/downloads/detail?name=ToggleHeadset.apk&can=2&q=
This is just a widget, so it won't replace anything in my phone..
If I can't find it on the shell command, I'll be able to uninstall it via the phone like the Date widget I have as well?
Right?

Related

Help With ADB...please

Hey guys, i'm having a bit of a problem here. It might be a stupid problem that i am over looking, but i just cant seem to figure it out. I dont use ADB often, but i just installed cyanogens newest rom and it no longer comes with the advanced launcher. which i absolutely love. so heres my issue, I am trying to follow these directions:
Installation
- Plug your USB cable into the phone and your computer
- Make a backup of your original launcher: "adb pull /systemapp/Launcher.apk LauncherBAK.apk"
- Remount the /system filesystem: "adb remount"
- Unzip the advanced launcher "unzip Launcher_update_x.zip"
- Push the advanced launcher "adb push Launcher.apk /system/app/Launcher.apk"
- Remove the odex file "adb rm /system/app/Launcher.odex"
- Reboot your phone.
This is whats happening:
cd C:\android-sdk-windows-1.5_r3\tools
C:\android-sdk-windows-1.5_r3\tools> adb shell
#adb pull /system/app/Launcher.apk LauncherBAK.apk
adb: not found
#
I tried moving forward without backing up. this is what i get:
adb: not found
#adb remount
adb remount
#adb: not found
#
This is where im at. can sombody please point me int he right direction of whats going on here? thank you
As I understand it, when you type adb shell, youre in the android shell, and no longer use the adb commands, but you use the commands that youd use in console. ADB has different commands, which you can list by just typing adb.
SO,
plug it in
adb remount
adb pull /system/app/Launcher.apk LauncherBAK.apk
unzip Launcher_update_x.zip
adb push Launcher.apk /system/app/Launcher.apk
adb rm /system/app/Launcher.odex
reboot
That should work. Dont use the shell. The pros can feel free to correct me.
Hummeroid said:
As I understand it, when you type adb shell, youre in the android shell, and no longer use the adb commands, but you use the commands that youd use in console. ADB has different commands, which you can list by just typing adb.
SO,
plug it in
adb remount
adb pull /system/app/Launcher.apk LauncherBAK.apk
unzip Launcher_update_x.zip
adb push Launcher.apk /system/app/Launcher.apk
adb rm /system/app/Launcher.odex
reboot
That should work. Dont use the shell. The pros can feel free to correct me.
Click to expand...
Click to collapse
As far as I know this is right. Don't try to pull when you're in adb shell.
Hummeroid said:
As I understand it, when you type adb shell, youre in the android shell, and no longer use the adb commands, but you use the commands that youd use in console. ADB has different commands, which you can list by just typing adb.
SO,
plug it in
adb remount
adb pull /system/app/Launcher.apk LauncherBAK.apk
unzip Launcher_update_x.zip
adb push Launcher.apk /system/app/Launcher.apk
adb rm /system/app/Launcher.odex
reboot
That should work. Dont use the shell. The pros can feel free to correct me.
Click to expand...
Click to collapse
Right on! thanks so much Hummeroid.
Okay so I tried to do it without the shell and this is what i'm getting. So I'm stuck...Btw, I really appreciate all the help everyone's giving me.
C:\>cd androidsdk\tools
C:\AndroidSDK\tools>adb devices
List of devices attached
HT96LLV00999 recovery
C:\AndroidSDK\tools>adb remount
remount failed: Invalid argument
C:\AndroidSDK\tools>
Why are you doing in recovery, try it with the phone on.

[GUIDE] ADB For Beginners (Setup, Use, and More!)

Hello All!
After much frustration with setting up ADB i finally got it working. Everyone said its simple and takes minimal knowledge but when things dont work, nothing really worked. Anyways after 2 hours of research trying to get ADB to work i finally got it all working and wanted to share my knowledge to anyone else that needed help.
This Guide is for windows only. If you are using Mac OS X please go here: ADB For Dummies
If you are using Linux please go here: [HOW-TO]Set up Android SDK/ADB/Fastboot on Ubuntu Linux
Like My Guide(s)? Donate
--------------------------------------------------------------------------
Things you need:
Android SDK - Download
Winrar - Download (32bit) Download (64bit)
Windows PC
USB Cable
A Rooted HTC Dream (Google G1)
--------------------------------------------------------------------------
Setting up the Android SDK
Download the file from above
Unzip to your desktop
Take the "android-sdk-windows" folder and move it to the root of your hard drive (C:\)
Right click on My Computer and click properties
Select the Advanced Tab or Advanced System Setting (Vista/Windows 7)
Select Environment Variables...
Press New
For Variable Name type: adb
For Variable Value type: C:\android-sdk-windows\tools
Now, [Get new sdk (1.5r3) to work]
1. Run SDK Setup.exe
2. If it gives you an error go to settings and click on "Force http//....."
3. Select all options and let it download and install
If you cant get the setup to work, Download the USB-DRIVERS folder - HERE (Windows XP/Vista/Windows 7)
--------------------------------------------------------------------------
Preparing your phone for ADB
Go to Settings on your phone
Select Applications
Select Development
Make sure 'USB Debugging' is checked
--------------------------------------------------------------------------
Installing Drivers
Plug in your phone through USB and DO NOT MOUNT IT!!!!!
Your computer should see a new device and try to install Android 1.0 driver (If it doesnt, scroll down to the "Im not getting a notification of Android ADB when i plug in my USB" section)
Let it load
Once it cant find them select "Install drivers from my pc"
The drivers you need are in the Android SDK 1.5r2 folder (C:\android-sdk-windows\usb_driver)
Depending on your OS pick x86 or amd64
You ADB Android Device should now be installed! Good Job
For Android SDK 1.5r3+
1. Run SDK Setup.exe
2. If it gives you an error go to settings and click on "Force http//....."
3. Select all options and let it download and install
If you cant get the setup to work, Download the USB-DRIVERS folder - HERE (Windows XP/Vista/Windows 7)
--------------------------------------------------------------------------
Check if your phone is detected by ADB
Open up Command Prompt (Go to run, type in cmd, press enter)
Type in
Code:
cd C:\android-sdk-windows\tools === Press Enter
adb devices === You should see your device listed
adb shell === you should see # in the next line
Now you are all set to run adb commands
Note: for a list of commands type in 'adb' in cmd
CONGRATS YOU NOW HAVE ADB FULLY RUNNING!
--------------------------------------------------------------------------
Droid Explorer by Camalot
Droid Explorer is a Windows software that will download, install, and setup the android SDK for you all in under a minute so you are ready to go. I use this on a daily basis. This amazing piece of software has tons of plugins and a built in file explorer for all your files on your phone! All you gotta do is download, install, and go!
Download Droid Explorer - Here
Install the program, and let it setup the SDK files for you
Connect your phone
Enjoy!
--------------------------------------------------------------------------
"Im not getting a notification of Android ADB when i plug in my USB"
Why: Your computer has detected your phone but as a protable device and as a storage device.
Fix: This took me a lot of research and time to figure out so this is what your are going to do.
First download USBDeview - Here
Unzip it
Run USBDeview.exe as Administrator
You will see all drivers being used on your computer
Highlight and Uninstall all drivers with the description have HTC Android (Should be 3 of them)
Right Click on the driver and press uninstall
Once done, Unplug your phone and plug it back in
You should now get the notification of the ADB device
Follow the steps above to install the drivers
--------------------------------------------------------------------------
When Typing just adb in cmd you will get whats called a "usage doc" which gives you a lits of commands that you can use:
Code:
-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <serial number> - directs command to the USB device or emulator w
ith
the given serial number
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> <local> - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] <file> - push this package file to the device and instal
l it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb root - restarts adb with root permissions
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PDP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be u
pdated.
- If it is "system" or "data", only the corresponding partition
is updated.
--------------------------------------------------------------------------
Commands that you should know
adb push - Insert file to phone such as Stock.apk to /data/app_s
Code:
adb push <pathtofile.apk> <file system location> - Example: adb push c:\app.apk /data/app
adb pull - Remove file from phone such as Stock.apk from /data/app_s
Code:
adb pull <pathtofile.apk> - Example: adb pull /data/app_s/Stock.apk
adb install - Install app to phone
Code:
adb install <path to file> - Example: adb install c:/apps/apps2sd.apk
adb uninstall - Uninstall app from phone
Code:
adb uninstall <name of application> - Example: adb uninstall linda.apk
For more ADB Commands go - Here
--------------------------------------------------------------------------
Thats it for ADB! Congrats and if you have any questions please ask me or if anything is missing or not correct please tell me. I got all of this from research and personal experience.
-------bump------
Good guide, pretty simple... Ill bookmark this, so I can send people that needs help here.
i have attached a zip that has the files i use to get basic use like for doing root to stock to upgrading 2.1-2.2 and other small things.
extract to C:\fastboot
in C:\fastboot you will find a "cmd" batch file. just run it and it should be ready for you to type in adb commands or fastboot. just make sure your in debug mode by doing all in the first post for installing drivers and all that.
U seriously bumped this thread? Lmfao
help?
i was trying adb and i got!
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
K:\>adb devices
List of devices attached
HT07YHL02294 offline
HT07YHL02294 device
K:\>adb remount
error: more than one device and emulator
Click to expand...
Click to collapse
ADB
i have this message Permission Denied what should i do?
thank you D200P13 soo much. i got it working thanks to your files
X10 adb issues
Can't get it to work for my X10.
ADB does not see my X10 when connected, have tried all mentioned above several times, no luck.
USB drivers seem not to install.
Do i need something special for my X10 to connect via ADB ?
p2dewit said:
Can't get it to work for my X10.
ADB does not see my X10 when connected, have tried all mentioned above several times, no luck.
USB drivers seem not to install.
Do i need something special for my X10 to connect via ADB ?
Click to expand...
Click to collapse
Turn telephone i debug mode.
when i type adb it says that it's an unrecognized command.
That's because you haven't navigated to the folder where the adb file is located...
Sent from my Nexus One using XDA App
danger-rat said:
That's because you haven't navigated to the folder where the adb file is located...
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Isn't it in the android-sdk-windows folder?
EDIT
nvm found it. it's in another folder....thanks
when i run adb shell, it doesn't give me a # it gives me $. what do i do?
What are you trying to do?
Sent from my Nexus One using XDA App
Trying to flash a rom on my phone (x10) and was making sure adb is working properly before i do anything. When flashing the new rom there's some bugs that require adb to fix. From my understanding "$" means i don't have su access. Thanks for the help btw. Sorry for bothering you. Just taking proper precautions.
EDIT
Sorry again. Found my answer. I forgot to unlock my device to accept superuser permissions. Thanks for your help
to check ur phone is detected by adb....
i type "adb shell" in cmd,and according 2 u i should show #.....but it shows $ to me......why?
To check connection, type "adb devices"
"adb shell" will allow you to work remotely on your device. If the $ doesn't change to #, then you don't have root access.
Sent from my Nexus One using XDA App
If your just trying to set up adb to riot your device, I put this together to make things much easier...
http://www.nexusoneforum.net/forum/...mple-sdk-setup-manual-root-guide-windows.html
Sent from my Nexus One using XDA App
Where is the Mac Specific version. Everything you posted is for windows mate!

[Q]I'm trying to make a little .cmd file to uninstall my apps. need a little help.

Trying to make a little .CMD Files to uninstall my app so I don't have to type everything in again when I do a flash rom.. here is what I have
Code:
pause
@adb kill-server
@adb shell cd /system/app/
@adb shell su*
pause
@adb shell rm /system/app/RemotePVR.apk
@adb shell rm /system/app/tn55-android-blur.apk
@adb shell rm /system/app/FaceRecognition.apk
@adb shell rm /system/app/Layar-samsung.apk
pause
The issue is at the "@adb shell su*" I get an error saying at the super not found.. now when I type the commands in my self it works great.. but in a .bat file or .cmd files it does not work.. what i'm I missing?
Every call to ADB like this is a standalone command.
That is, when you do a
Code:
adb shell cd /system/app/
what happens is that it starts the adb shell, runs the command, and then exits. So when you call su, you lose superuser access when running the next adb shell command, because that shell instance is now gone, kaput, finito.
I also tried to make a script like this, but got stuck. We need to chain commands to ADB, like you can do in *nix with a semi-colon separator between command, like thus:
Code:
command1 ; command2
("&&" in Windows/DOS)
But ADB doesn't seem to support chaining commands.
I guess you have to do a shell script, put it on the phone and run it from there. Or some kind of "adb sushell" command would be nice...
Thanks I was kinda wondering if that was what was happening.. to bad the su command would not stay active.. o well.... maybe someone will come up with something..
Im not at a pc but can u test
adb shell su command
Does tht work ?
you could make a 2nd script which pushes the 1st to the device with "adb push". this script then gets root with "su" and uninstalls/deletes the apps ... btw. you can try using "pm" (packetmanager) which can install/uninstall/reinstall apps. however i don't know if it works with system apps...
Alright here : (eg, say remove launcher)
Code:
adb shell su -c 'mount -o rw,remount /dev/block/mtdblock3 /system'
adb shell su -c 'rm /system/app/Launcher.apk'
adb shell su -c 'rm /system/app/Launcher.odex'
adb shell pm uninstall com.android.launcher
fyi : "SystemApp Remover" on market essentially does the same thing, except it eliminates the need for u to look for the package name ur self.
Hm, that works, but I get a superuser prompt on the phone for every new command (the "app name" is the command line).
Daneshm90 said:
Alright here : (eg, say remove launcher)
Code:
adb shell su -c 'mount -o rw,remount /dev/block/mtdblock3 /system'
adb shell su -c 'rm /system/app/Launcher.apk'
adb shell su -c 'rm /system/app/Launcher.odex'
adb shell pm uninstall com.android.launcher
fyi : "SystemApp Remover" on market essentially does the same thing, except it eliminates the need for u to look for the package name ur self.
Click to expand...
Click to collapse
sweet that worked. I would get the SystemApp Remover but I can't download paid apps till Google will fix my account. unless there is something like it for free.

Onemsomic's ICS 3.1RC no GPS lock!

I wanted to ask this in the actual thread but 10 post limit...
Anyway,
I can't get any GPS lock on my I9000, Onemsomic's ICS RC3.1, JVU modem.
I tried changing the NetworkLocation.apk by following this post http://forum.xda-developers.com/showthread.php?p=21351809#post21351809
but since I have absolutely no idea how to use ADB I couldn't do the "change mode to 0644" step.
Someone help a noob?
Thanks.
Well, first off, download the *.apk provided in that post and place it on the sdcard.
adb is a command line tool, so you must insert those commands on a terminal emulator (maybe you got one installed, if not, download one from the market, I can recommend "Android Terminal Emulator").
So, open your terminal emulator and go to the directory where you placed your *.apk. this example has been wrote with the *.apk in the sdcard folder:
Code:
su
cd /mnt/sdcard
adb start-server
adb remount
adb push NetworkLocation.apk /system/app/NetworkLocation.apk
adb chmod 0644 /system/app/NetworkLocation.apk
adb reboot
Note: I wrote this example following my common sense, so I'm not completely sure if this will work!
Cheers!
AurosGamma said:
Well, first off, download the *.apk provided in that post and place it on the sdcard.
adb is a command line tool, so you must insert those commands on a terminal emulator (maybe you got one installed, if not, download one from the market, I can recommend "Android Terminal Emulator").
So, open your terminal emulator and go to the directory where you placed your *.apk. this example has been wrote with the *.apk in the sdcard folder:
Code:
su
cd /mnt/sdcard
adb start-server
adb remount
adb push NetworkLocation.apk /system/app/NetworkLocation.apk
adb chmod 0644 /system/app/NetworkLocation.apk
adb reboot
Note: I wrote this example following my common sense, so I'm not completely sure if this will work!
Cheers!
Click to expand...
Click to collapse
I get a "device not found" error after adb remount. What should I do?
hadar.shamir said:
I get a "device not found" error after adb remount. What should I do?
Click to expand...
Click to collapse
Well I have been looking here and there, and I found that adb doesn't work directly on the phone, you must use adb from your pc. So, this is what you should do from now on:
Install Java SDK
Install Android SDK
Turn on "USB Debugging" in your SGS settings
Connect the Device to the PC
And finally, use the following commands (from the PC):
Code:
// Go to the folder where you put the *.apk
cd C:\users\exampleuser\Documents\ // or /home/exampleuser/Documents/ if you're using linux
adb start-server
adb remount
adb push NetworkLocation.apk /system/app/NetworkLocation.apk
adb chmod 0644 /system/app/NetworkLocation.apk
adb reboot
Note:
The text after the double-slash ( // ), must not be written in the console, they are just comments
You need to install the SDK's because there it is where the adb tool (and tools needed by adb) is found, so, good luck!

[ROOT][HOW-TO]Working Root Method for ICS 4.0.4

** Update ****************
************************
Posted a .zip with scripts for both Windows and *nix users to automate the process.
Linux:
-----
Unzip the contents of the attached ICS404root.zip anywhere on your computer and run the script aptly named "runme_root_script.sh". It should take care of the rest. Make sure you have USB Debugging enabled and you put the phone in Camera mode, not mass storage device.
Windows:
---------
Unzip ICS404root.zip wherever you want and then run "rootscript.bat". Make sure you have USB Debugging enabled and you put the phone in Camera mode, not mass storage device.
*************************
*************************
Credit to miloj for finding this technique on the Transformer. (See the thread noted below and be sure to thank him!) I modified it to work on our devices.
http://forum.xda-developers.com/showthread.php?t=1704209
I'll put together a script to automate this process shortly, but if you're antsy like me, here's the lowdown:
1. Download the following files:
su: http://db.tt/ShPzea6I
debugfs: http://db.tt/bGFh43LZ
2. Save the two files downloaded above on /sdcard. (ie: mount your sdcard in windows and copy them over, or "adb push" them to /sdcard).
**Make sure you have your phone on Mount Camera mode, not as a mass storage device; otherwise, you won't be able to access your /sdcard directory via adb. **
3. In a linux terminal/Windows command prompt:
Code:
adb shell
[email protected]_maserati:/ $ cd /sdcard
[email protected]_maserati:/ $ cp su /data/local/12m/
[email protected]_maserati:/ $ cp debugfs /data/local/12m/
[email protected]_maserati:/ $ cd /data/local/12m
[email protected]_maserati:/ $ chmod 755 debugfs
[email protected]_maserati:/ $ chmod 755 su
[email protected]_maserati:/ $ mv batch batch.bak
[email protected]_maserati:/ $ ln -s /dev/block/mmcblk1p20 batch
[email protected]_maserati:/ $ exit
adb reboot
4. While you are waiting for the phone to reboot, type the following into your terminal/command window:
Code:
adb wait-for-device shell
5. Once you're back into the android shell:
Code:
[email protected]_maserati:/ $ cd /data/local/12m
[email protected]_maserati:/ $ rm batch
[email protected]_maserati:/ $ mv batch.bak batch
[email protected]_maserati:/ $ /data/local/12m/debugfs -w /dev/block/mmcblk1p20
(The following is entered at the "debugfs:" prompt)
debugfs: # cd xbin
debugfs: # write /data/local/12m/su su
debugfs: # set_inode_field su mode 0104755
debugfs: # set_inode_field su uid 0
debugfs: # set_inode_field su gid 0
debugfs: # quit
[email protected]_maserati:/ $ cd /data/local/12m
[email protected]_maserati:/ $ rm su
[email protected]_maserati:/ $ rm debugfs
[email protected]_maserati:/ $ exit
adb reboot
Done deal. Now you've got the "su" binary pushed to your /system partition and set with the proper permissions for execution. Download the Superuser app from the market and you're good to go. Make sure you update the su binary within the Superuser app as well to make sure you're up to date.
Awesome! Were you able to upgrade to the latest leak and not lose root? Btw, what carrier are you on? I figured out how to get tethering fully functional on rogers but the process requires root...
Sent from my XT894 running ICS
You bet. I had to fastboot the leaked .208 update over top of the .206 update yesterday because I messed up my /system partition; I had used the OTA Rootkeeper to keep root permissions when upgrading from .219 but had foolishly disabled it right before I bungled everything up.
So to sum it up, this method didn't require anything to be done before updating to the .208 leak; since it has nothing to do with the technical details of the kernel itself, I'm fairly certain it should work for the .200 or .206 leaks as well. Root permissions were obtained from a completely stock system.
I'm in Canada with Bell but it doesn't matter because I imported the phone from the US; Verizon is the only carrier that has this phone. At any rate, this method is pretty universal, it is preying on a vulnerability present in the stock init.rc file and I bet it would work on other phones such as the RAZR as well.
So we can confirm this is 100% working with Fastbooting back and moving to 208? If so I will probably jump on this immediately.
I am trying to do this method but I cant adb to detect my phone. Im on the .208 leak. Can anybody help?
Have you enabled USB Debugging in the Settings->Developer Options menu?
Rick#2 said:
Have you enabled USB Debugging in the Settings->Developer Options menu?
Click to expand...
Click to collapse
Yep.
Not able to reboot, trying manually...
Code:
debugfs: /data/local/12m/su: Permission denied
debugfs: su: File not found by ext2_lookup
debugfs: su: File not found by ext2_lookup
debugfs: su: File not found by ext2_lookup
Had to reboot manually twice. This is the only error message I received. Tried Superuser, but it stops.
I'm on .200 btw.
droidian1441 said:
Yep.
Click to expand...
Click to collapse
I'm having the same issue. I'm on the 208 leak. I start command prompt in windows then type "adb shell" and I get the "device not found" message. I enabled usb debugging and my phone is connected as mass storage.
Likewise, Reboot requires su access, manual only. When I go and run the write command in debugfs permission denied. Any ideas what would cause this? Based on the code shown in the first post, SU had been already acquired(# vs $), which makes me wonder here.
Die Bruine said:
Not able to reboot, trying manually...
Code:
debugfs: /data/local/12m/su: Permission denied
debugfs: su: File not found by ext2_lookup
debugfs: su: File not found by ext2_lookup
debugfs: su: File not found by ext2_lookup
Had to reboot manually twice. This is the only error message I received. Tried Superuser, but it stops.
I'm on .200 btw.
Click to expand...
Click to collapse
Looks like you're doing something wrong with the debugfs command; you don't want to enter /data/local/12m/su at that prompt.
Running su from any partition other than /system will lead to a permissions error, so you don't want to bother trying to execute it from the /data/local/12m location.
(The following is entered at the "debugfs:" prompt, ie: after executing /data/local/12m/debugfs -w /dev/block/mmcblk1p20; see step 5.)
Code:
debugfs: # cd xbin
debugfs: # write /data/local/12m/su su
debugfs: # set_inode_field su mode 0104755
debugfs: # set_inode_field su uid 0
debugfs: # set_inode_field su gid 0
debugfs: # quit
Grizzy3 said:
I'm having the same issue. I'm on the 208 leak. I start command prompt in windows then type "adb shell" and I get the "device not found" message. I enabled usb debugging and my phone is connected as mass storage.
Click to expand...
Click to collapse
Ive got the same situation over here. I can stick without root, just the fact that I would have it again would be just the single reason to do it. Lol.
Sent from my DROID4 using Tapatalk 2
Code:
debugfs 1.42 (29-Nov-2011)
debugfs: cd xbin
cd xbin
debugfs: write /data/local/12m/su su
write /data/local/12m/su su
/data/local/12m/su: Permission denied
Rick, that's what we're putting in. From the code you posted it shows that you had root access already. Do you have any other suggestions on this? Because that's the in and out I get.
---------- Post added at 04:57 AM ---------- Previous post was at 04:53 AM ----------
Problem resolved. Need to run the following code:
Code:
chmod 755 debugfs
chmod 755 su
Then continue with rooting.
gdeeble said:
From the code you posted it shows that you had root access already.
Click to expand...
Click to collapse
Not sure where you're making this assumption from. I just wrote the "#" symbol in there to signal where to start entering commands... though I suppose you're correct in pointing out that the "#" shows up on a root prompt. A smarter choice probably would have been "$".
Trust me, I'm not an idiot. I wouldn't have gone through the hassle of writing up the guide in the first post if it didn't work.
Didn't mean it that way, just looked like it already had root, which was what confused me. But thanks again for this. :-D
Tried it again. This time no errors and the phone rebooted. But now Superuser keeps on FC .
Reinstalled superuser, updated and busybox. Now rooted! Thnx.
BTW, you might wanna update the OP. Do not batch the commands under windows. I tried several times. I think there is something wrong with the timing. Manually entering all the commands in a shell works. But putting them in a batch will enter them too fast for ADB to handle (under Windows shell) I guess.
Die Bruine said:
BTW, you might wanna update the OP. Do not batch the commands under windows. I tried several times.
Click to expand...
Click to collapse
I don't know, it seemed to work fine for me with the script I made. Anyways, glad it worked out for you.
Now that we can re-root as well as (somewhat convolutedly) fastboot ourselves back on track, we're good to go.
droidian1441 said:
Ive got the same situation over here. I can stick without root, just the fact that I would have it again would be just the single reason to do it. Lol.
Sent from my DROID4 using Tapatalk 2
Click to expand...
Click to collapse
As stated in the guide, you need to be in camera mode not mass storage.
Sent from my DROID4 using XDA
I was trying to do it manually last night before the OP posted the batch file, and it was not working because I was in MTP instead of PTP. SO make sure you use PTP.
Put your phone in camera (PTP) mode for the USB connection and it should work fine. Also, after it completes, download Superuser from the market.
I ran Titanium Backup after everything and it told me it needed to fix my su binary permissions or something like that... I let it do its thing... Either way, IT WORKED!!!!!
I put it in camera mode and made sure usb debugging is enabled. Then I ran the script for windows. Still getting the device not found error throughout. Really don't know what's going on.

Categories

Resources