[question] adb / ubuntu shell scripting - Android Software/Hacking General [Developers Only]

so before i start i apologize if im just being lazy but if i have posted this somehow "wrong" or whatever i probally messed up but hey!
ok. to whom it may have answers,
first of all. i realize what i am asking is a "easySBF" but i would like to learn and write my own shell script that will do these steps.
(since this is just for me, my "required files" will be located for sure. and some of the script i got, its just some i dont)
1) adb shell ln -s /data/local.prop /data/preinstall_md5/magic.md5
2) i suppose this would require a "pause?" or whatever until it was ready to throw the next command at it?
3) sbf a custom preinstall image (sbf -r --preinstall dx.img 621.sbf)
4) have it wait for the boot after the flash is done? then reboot the phone one more time?
5) then if possible i want it to "adb shell" and check for a root prompt (# not $) ?
6) if it returns "#" (root) it would then go onto installing superuser files? if its "$" (not root) have it (if possible a countdown timer of like 10 seconds?) ask if i want to try again with another reboot or something. the timer would automatically send it into a reboot | return to #5
7) from here i have to send 6 more adb shell/push commands (dont know if i need to allow a "pause" or something between the commands to insure a working command?"
then if all goes well it would say something lame of course but ya.
i hope i am asking this in a readable way, if ive confused you (probally) then blame my upbringing or lack of concern for the english language
but if you can help then uhm. good looking out and either post it or pm me (makes it easier actually for me but anything is better than nuttin)
thank you in advance
@deadseth
"i die alot"

Related

EXTRA NOOB Friendly Guides

This thread is just going to be EXTRA NOOB friendly versions of other guides. Its also going to be like an index where all/most of the guides will be. Please ask you questions on original threads .
you can skip down to the Second Post Which is my First Guide about Downloading and Installing the SDK so you can use ADB.
I decided to make this guide because I too am a noob (not as much as i was before) and i know how frustrating it is when you dont understand something. even though xda make complicated things seem easy sometimes its not easy enough and im not saying its anyones fault thats why there are so many helpful members on the forum, i know i asked my fair share of questions
I will be gearing these guides to Windows XP. For many reasons, one i dont have a Mac, two Vista sucks , three not many have Windows 7 and i think its going to suck too , four I have ubuntu linux and it takes some knowledge to really know how to use it so you shouldnt be an EXTRA NOOB. Also Please use firefox because it saves files to desktop and easy to find and follow my instructions.
Downloading and Installing the SDK
This is my First Guide so bear with me
Downloading and Installing the SDK v1
First step is rooting you G1
Original Post:
http://forum.xda-developers.com/showthread.php?t=442480
Follow Koush's post it is pretty self explanatory PM if you need a MORE detailed version.
- download and install Winzip or Winrar
- go here and download the latest SDK:
http://code.google.com/android/download_list.html
- when download finishes right-click on the file and click "extract here"
- an new folder should come up rename it to: SDK
- open the folder; you should see a folder inside named tools and - some other stuff that dont matter right now
- open the tools folder, you should see two files named adb.exe and AdbWinApi.dll copy and paste those files to your system32 folder (go to my computer->local disk->windows->system32)
Next downloading and installing Drivers and getting adb to work
-Turn on "USB Debugging" on your device.
- Press Home-> press menu->select settings-> select Applications -> go down to Development then enable USB debugging
- dont plug phone in yet, if plugged unplug.
-go here and download the adb drivers now right-click and extract here
NOW plug in your phone
- the Found New Hardware Wizard will come up
- select No, not this time and click Next.
- Select Install from a list or specified location and click Next.
- Select Search for the best driver in these locations
- now find the folder: android_usb_windows and look in side and select android_usb.inf
Now we will check if everything works
- on your computer press start then go to run... and type in cmd
- first type in adb to make sure you got it working, you should see: Android Debug Bridgeversion 1.0.20
-now type adb devices, you should see something like this:
List of devices attached
HT844G****** device
The Hard Part is over.
Apps on sdcard (Magic 4.5 also)
For those with the new 4.5 rom u need to install busybox
Download this file to the root of your sdcard
http://androidfanatic.com/cms/unofficial-app-repo.html?func=startdown&id=14
then do folowinf commands from terminal emmulator or adb shell:
mkdir /data/busybox
cat /sdcard/busybox > /data/busybox/busybox
chmod 4755 /data/busybox/busybox
cd /data/busybox
./busybox --install
export PATH=/data/busybox:$PATH
then skip to STEP 2 of this post
Some people wanted a more simple Guide to installing apps on their sdcard
Original Post
http://forum.xda-developers.com/showthread.php?t=468959
First thing first go here and download and install Paragon Partiton Magic its a 90day trial chances are you'll only need to use it once.
http://www.download.com/Paragon-Partition-Manager-Personal-/3000-2248_4-10495078.html?tag=mncol
- conect your phone to computer via USB and mount it.
- and programs that may be using the phone: adb, windows explorer, mediaplayer etc
- open it up Paragon and click on create a partition, then click next
- you should see something like:
Basic Hard Disk 2 (HTC Android Phone USB Device)
- click on it and hit next
- move the slider to set how big you want you new partition to - be move left to make it smaller and right to make it bigger
I set mines to 1gb, some set theres to 2gb it also depends on how big you sdcard is if you have the 1gb that came with the phone i wouldn't advise doing this because of size and because their transfer rate are slower and could cause lag. 500mb is more than enough room it all depends on you i had 90 apps and only used 42mb.
- anyways when you select the size hit next
- in partition type select Linux Ext2 leave everything else the - way it was
- now select yes and hit next, the process should start
- it may tell you that you computer needs to restart hit yes and - let it restart
** MAKE SURE YOU DONT UNPLUG YOUR PHONE OR TURN IT OFF, DONT TOUCH IT AT ALL UNTILL THE OPERATION IS COMPLETEY FINISHED**
- when the computer boots up before getting to the logon screen paragon will finish partitioning.
now go here:
http://forum.xda-developers.com/showthread.php?t=468959
download and unzip, rename the folder it extracts to to: mod
now cut and paste the folder: mod that contains the two files to the root of your hard drive (my computer->local disk and paste them there)
if you tried this mod before and was unsuccessful make sure you wipe before you try again, you mountd and init files can be corupted, i would advice a wipe and then reinstallation of JF 1.4.1
- connect you phone to your computer if its not already, go to comand prompt (start->run... type cmd) copy and paste everything after $ into command prompt
$ adb devices
- make sure that you see you device connected
$ mkdir /backup
$ adb pull /system/etc/mountd.conf /backup
$ adb pull /system/init.rc /backup
- you just backed up those two files to a folder named backup thats on the root of your harddrive check and make sure they are there.
$ adb remount
$ adb shell mkdir /system/sd
$ adb shell ls /system
- make sure that you see sd in the list of things that come up
$ adb push /mod/mountd.conf /system/etc/mountd.conf
$ adb push /mod/init.rc /system/init.rc
$ adb shell reboot
$ adb remount
$ adb shell
STEP 2 htc magic users start here
$ busybox df -h
- make sure you see a line ending in /system/sd
$ busybox cp -a /data/app /system/sd
$ rm -r /data/app
$ ln -s /system/sd/app /data/app
$ busybox cp -a /data/app-private /system/sd/app-private
$ rm -r /data/app-private
$ ln -s /system/sd/app-private /data/app-private
if you want to move data
$ busybox cp -a /data/data /system/sd/data
rm -r /data/data
$ ln -s /system/sd/data /data/data
$ adb shell reboot
now you are finished, there are undu instructions on the original post also a way to copy yout /data/data/ (folder where caches and other stuff are saved) to sdcard i advice not if you dont have a class 5 or 6 card or artleast class 4
hope this helps
actually i really appreciate someone made this guide. this was the only guide that actually worked for me i appreciated it. now i finally have 58 mb internal storage to play with thanks a lot.
Do you have any plans on creating an extra noob guide for installing cupcake? Thanks again for all the help. Carguy1973.
Thank you, sometimes it's nice to get just the details too I am very happy to have apps on SD card in 4.5 thanks to ur help.
I have a question about the busybox install..... it worked fine for me, but the busybox PATH is broken after re-boot. After much searching I found this page here but I could not tell if it was solved as the thread sort of petered out after.
The solution was to pull intit.rc and edit it by adding this with no indent
export PATH /system/bin:/data/busybox:$PATH
Click to expand...
Click to collapse
after pushing back the edited init.rc to Android with adb I rebooted but my busybox PATH is still broken and I have to go into an adb shell and re-input "export PATH=/data/busybox:$PATH" every time the device is rebooted just to make busybox work, do you know a solution to this. Thanks again
update
I noticed on haykuro's twitter page that the update he is going to post later today will include busybox.
haitiankid4lyf said:
three not many have Windows 7 and i think its going to suck too ,
Click to expand...
Click to collapse
Windows 7 in based on the windoes vista source but eddited, its 10 times better than Xp Just to let you know
But this thread is a good idea
how do u do all of this on vista??
g1junky said:
how do u do all of this on vista??
Click to expand...
Click to collapse
Vista and xp are basicly the same to do if its based around CMD (Comand prompt for the noobs) So.. Dont worrie, Just follow it the same, Most guides for xp work on vista unless it states it needs an xp specific thing that vista wont let you do.. Dont worrie im on windows 7, Almost everything that works on vista works on xp and vice versa when it comes to CMD
Why don't you add this to the wiki?
Mast3rmatt said:
Why don't you add this to the wiki?
Click to expand...
Click to collapse
Because, The Wikkis old and outdated maybe? I dont think anyone has updated it in a while
I use both Linux and Windows 7 for accessing the phone and they work equally as well for most tasks.
For windows 7 just install the Vista USB Driver (if it is 64 bit, download the Vista 64 bit USB Driver) and either add adb and fastboot to your Windows path... OR you can put the files in Windows/system32.
ben29pickett said:
Because, The Wikkis old and outdated maybe? I dont think anyone has updated it in a while
Click to expand...
Click to collapse
That Might be a idea. Sure its outdated, why doesn't everyone want to build it. Make it strong so that many of the ''noobs'' will stop asking the same question.
pixel-painter said:
I use both Linux and Windows 7 for accessing the phone and they work equally as well for most tasks.
For windows 7 just install the Vista USB Driver (if it is 64 bit, download the Vista 64 bit USB Driver) and either add adb and fastboot to your Windows path... OR you can put the files in Windows/system32.
Click to expand...
Click to collapse
I was gonna say this, But obviously some one beat me to my seccond post
Yeh, What this dude said, Altho i have noticed, Sometimes it does tend to uninstall the driver, If it stops workin reinstall the driver in device manager
Lol at the 5 people who said stop waisting space.. I think the threads a good idea
Mast3rmatt said:
That Might be a idea. Sure its outdated, why doesn't everyone want to build it. Make it strong so that many of the ''noobs'' will stop asking the same question.
Click to expand...
Click to collapse
Maybe a fair point? But i dont belive noobs know what a wikki is let alone even bother to read one, They just want a .exe program like the ziphone program
ben29pickett said:
Maybe a fair point? But i dont belive noobs know what a wikki is let alone even bother to read one, They just want a .exe program like the ziphone program
Click to expand...
Click to collapse
Well, If you haven't seen what allshadow.com wiki is has is becoming then your in for a ride. I was hoping if we can make it sorta like the shadows on allshadow.com. Its really easy to use and has all the information ever needed.(Also Keeps the forums less clutter with TUTs everywhere.
http://wiki.allshadow.com/index.php/Main_Page
ben29pickett said:
I was gonna say this, But obviously some one beat me to my seccond post
Yeh, What this dude said, Altho i have noticed, Sometimes it does tend to uninstall the driver, If it stops workin reinstall the driver in device manager
Click to expand...
Click to collapse
Thanks another kind of related thing.... in Vista and Windows 7 you have to disable Digital Driver Signing. To do this you can hit F8 when you boot into Windows and select it from the Advanced Boot Menu.
The USB Driver will NOT install otherwise, and will NOT work after it is installed unless you do this.

{Howto}Downgrrade form rooted 1.47.651.1

Ok... If your wimax isn't working and you want to downgrade to try to get it working this is how to do it...
1st get all of the files like you want to do Toast's Part-2. link: http://forum.xda-developers.com/showthread.php?t=701835
Then do this part:
STEP 2~FLASHING MTD PARTITION TO ENABLE DOWNGRADE:
- download all files posted above
- unzip the flash_image.zip and the mtd-eng.zip
- put the flash_image and mtd-eng.img on the root of your sdcard
- go into shell on ur pc and do:
adb shell
cat /sdcard/flash_image > /data/flash_image
chmod 755 /data/flash_image
/data/flash_image misc /sdcard/mtd-eng.img
- this should only take a second or two
- now put the PC36IMG.zip on the root of your sdcard
- power off the phone
STEP 3~FLASHING ENG BUILD:
- hold volume down + power to boot into hboot
- it should now find and verify the PC36IMG.zip on the root of your sdcard. itll show a blue status bar on the top right of the screen.
- after a minute or so it will ask u if u wanna flash SAY YES
- affter it flashes the PC36IMG.zip it will ask if you wanna reboot. SAY YES
After if finally boots you should see HTC quietly brilliant which hangs forever but it should eventually get past it. Once it does you will have the oldest everything. This is a beta build and has a bunch of tools but just do an upgrade to root like you normally would. I would suggest going to .6 then upgrading to the latest 47 from there.
Hope that this helps someone.
P.S. is anyone willing to dump all of the tools that are included in this rom. It might be helpful for the other devs.
Thats the hard way... but yeah it'l work.
Why is everyone so hype on adb everything...?
Tell me the easy way. I would love to do it instead.
kthejoker20 said:
Thats the hard way... but yeah it'l work.
Why is everyone so hype on adb everything...?
Click to expand...
Click to collapse
It's just easier to copy and paste stuff, even typing on a real keyboard. It's a pain in the ass doing it via terminal emulator with the lack of a physical keyboard on our Evo's.
Can anyone confirm if this helps fix the 4g issue?
krosemm said:
Can anyone confirm if this helps fix the 4g issue?
Click to expand...
Click to collapse
If you used the unrevoked, no it wont.
There is no fix for 4g from unrevoked yet.
Neotelos_com said:
If you used the unrevoked, no it wont.
There is no fix for 4g from unrevoked yet.
Click to expand...
Click to collapse
I used the toast method. And if i'm not mistaken I should flash roms w/o the 1.47.651.1 OTA update after downgrading right?
Nope, I try this method and it is not working. Some how the new OTA encrypted a code that any lower version will not over write it.
You don't have root access to even copy/paste or push the files to /data. I tried this and got a permission denied error message.
How do you input adb shell into Vista, I clicked "start", "run" and type "cmd" it bring up C:\users\XXXXX\ cd c:\android hit "enter"
then I type
c:\android>adb remount
Access is denied
Please advise what I did wrong. thanks
It worked for me... you have to make sure that when you enter the su command in adb to look at your phone. There should be a super user permission box that pops up. Accept it and youll be able to adb. It went fine for me after that.
urcboss07 said:
How do you input adb shell into Vista, I clicked "start", "run" and type "cmd" it bring up C:\users\XXXXX\ cd c:\android hit "enter"
then I type
c:\android>adb remount
Access is denied
Please advise what I did wrong. thanks
Click to expand...
Click to collapse
1) Put your phone on USB Debug
2) On your Phone make sure the Ninja(SuperUserPermission) is set to prompt you when you have a request.
3) go to your PC and type in adb shell
4) type in SU
5) Once do you that you will see a prompt from the Ninja asking for a request. Allow for it. And it will remember from that point forward.
6) Look at your cmd prompt screen for a # - if you have it you have full access.
Then so what commands you have been given to do.
It can also be done from the Android Terminal Emulator but some might not like working with a smaller screen I like it myself. Makes me feel geeky
mrmomoman said:
1) Put your phone on USB Debug
2) On your Phone make sure the Ninja(SuperUserPermission) is set to prompt you when you have a request.
3) go to your PC and type in adb shell
4) type in SU
5) Once do you that you will see a prompt from the Ninja asking for a request. Allow for it. And it will remember from that point forward.
6) Look at your cmd prompt screen for a # - if you have it you have full access.
Then so what commands you have been given to do.
It can also be done from the Android Terminal Emulator but some might not like working with a smaller screen I like it myself. Makes me feel geeky
Click to expand...
Click to collapse
This would only work if after the messup your still has root access. Some people have root and the "SU" will work but for the people w/o root will get access denied.
also
From above (I hate quoting) have you tried going to your tools folder inside your android folder and from there try your adb commands?
If you applied the OTA sent from Sprint, you lost root access. There will be no Ninja in the programs folder, because it was a new rom that the was flashed with the OTA. Root access has been closed for those that downloaded the update. If you try and type su, you will get permission denied.
Those of you that still have the root and superuser rights, DON'T DOWNLOAD THE OTA!! You are in a better position then the rest of us. I wanted the good battery life, so that's why I did it.

The easiest 1.47.651.1 root+nand unlock you'll ever see without a gui (Updated)

Make sure your battery has a decent amount of charge in it, you don't want to run out of juice in the middle of this.
You will need to have the android sdk installed, as you will need to use the adb tool.
Windows users will need to install HTC Sync in order to get the usb driver for the phone installed.
Part 1: In which we find that the Evo spreads easier than a Thai whore during tourist season
Code:
adb shell "rm /data/local/rights/mid.txt"
adb shell "ln -s /dev/mtd/mtd1 /data/local/rights/mid.txt"
adb reboot
Part 2: In which we find that engineers have no personality, but they make one hell of a bootloader
Put the files from Toast's Part 2, for nand unlock onto the sdcard (PC36IMG.zip, mtd-eng.img, recovery.img, flash_image)
then (after making sure the sdcard is remounted to the phone if you used disk mode to xfer the files):
Code:
adb shell "cat /sdcard/flash_image > /data/local/rights/flash_image"
adb shell "chmod 755 /data/local/rights/flash_image"
adb shell "/data/local/rights/flash_image misc /sdcard/mtd-eng.img"
adb reboot bootloader
When asked if you want to update, say yes. Relax for a while, the update takes some time.
When the phone eventually boots back up:
Part 3: In which I find the whore, and make her install a custom recovery
Code:
adb shell "cat /sdcard/flash_image > /data/flash_image"
adb shell "chmod 755 /data/flash_image"
adb shell "/data/flash_image recovery /sdcard/recovery.img"
After this you should be fully rooted with nand unlock.
I highly recommend going through Whitslack's Starting Over method to bring your software and radios up to date.
You're done.
Pity this only came to light a few days before people are going to be upgrading to a new OTA.
No, this will not work for anyone who updated to 2.2.
epic!!! 789
niice!
Nice Find!
At least now people can be rooted prior to the new OTA!
damn it!
___
Sweet! Wish I had that method starting out. Lol.
Sent from my PC36100 using XDA App
does this method really work??
BAttitude7689 said:
does this method really work??
Click to expand...
Click to collapse
Yes it does.
ok, so i have no idea how that works... care to go into it alittle bit more?
khshapiro said:
ok, so i have no idea how that works... care to go into it alittle bit more?
Click to expand...
Click to collapse
The init scripts chmod 777 mid.txt on boot (this means that anyone can do anything to the file basically). By removing the file and linking it to mtd1, the chmod now makes mtd1 accessible by everyone after a reboot, which means that you can go directly to toast's part2 which starts with flashing mtd-eng.img.
Incidentally it appears the droid eris guys have been using this flaw to their advantage for a while as well ;D.
So no, really? What is "root?"
You do fine work, sir
posting in a legendary thread
Couldn't you then just use wits "start over" method for part two to make the process even shorter?
netarchy said:
Part 1:
Code:
adb shell rm /data/local/rights/mid.txt
adb shell ln -s /dev/mtd/mtd1 /data/local/rights/mid.txt
adb reboot
Click to expand...
Click to collapse
What would be more interesting is for someone on the new OTA non-root to see if this exists in the Froyo release. I'll look around for a posting of the OTA update non-rooted and try it on my smashed phone. At least I won't care if that thing looses root.
Could we get a "The easiest 1.47.651.1 root method with nand unlock" for dummies? I have no clue what to do with this code.
You need to use an ADB shell for this using the Android SDK....
I tried to use the Evo-Recovery shell and received permission denied errors.
I am not a DEV by any means, and do not claim any credit for any of this. However, for people who need help, this may offer some assistance -- this is definitely the easiest root method out there.
1. Download and Install Android SDK - Learn Here
http://forum.xda-developers.com/showthread.php?t=694250
2. Open up a Command Prompt by holding windows button & pressing R or by pressing Run and typing CMD.
3. Navigate your way in DOS to the Android SDK folder, then to the Tools Folder
4. Then enter in the code in part 1. After each line press enter...the line will repeat below it.
5. Follow Toasts Part 2 -- Link: http://forum.xda-developers.com/showthread.php?t=701835 -- Video found here: http://www.youtube.com/watch?v=tUXTB0eydwE.
5A. Because you didn't do Toast's Part 1 of Root first (you used an exploit provided by the OP), you will NOT have a NAND Backup. Put the Custom ROM you want to load on your SD card, and after unlocking NAND protection and doing the wipes, load it from the custom recovery in lieu of restoring your NAND backup.
6. You're now rooted w/ NAND Unlocked!
7. I would then suggest going here, and running this so you have a fully rooted, stock ROM with all your radio/wimax up to date: http://forum.xda-developers.com/showthread.php?t=715915.
Anyone know if this method will work on an unrevoked3'd Evo? I am trying to acquire full root and I was going to use SimpleRoot today but if this will work...
Thank you for this! Question about number part 7. YOu suggest running the fully rooted stock 1.47.651.1 afterwards. Would it be a bad idea to Just run the fully rooted stock froyo 3.23.651.3 or even any other custom rom for that matter? i.e OMJ's EVO 2.2 Custom rom? Thanks
regulator207 said:
Couldn't you then just use wits "start over" method for part two to make the process even shorter?
Click to expand...
Click to collapse
No because you need the engineering hboot to flash it since it's not signed by HTC.
Should work on 1.32 or 1.47. Nice.
Someone should test if this still works in the new 2.2 update. Good chance it does.
damit!
justinisyoung said:
damn it!
___
Click to expand...
Click to collapse
Hey! That's what I was gonna say!

[Guide] How to gain root on 2.2 for Mac

*******UPDATED 8/31/10 *******
This rooting method was adapted from regaw_leinad's method and toastcfh's method. By following these steps you will successfully downgrade your phone back to android 2.1 in order to gain root.
I don't trust unrevoked as I have had problems with it in the past.

I am not responsible for any damages to your phone.
special thanks to:
regaw_leinad
Sebastian Krahmer
Toastcfh
amon_ra
FILES YOU WILL NEED:
copy and paste into browser
Code:
sdx-downloads.com/sdx/evo/troot/eng-PC36IMG.zip
evo4g.me/downloads//count.php?target=evo-root.zip
files.androidspin.com/downloads.php?dir=amon_ra/RECOVERY/&file=recovery-RA-evo-v1.8.0.img
developer.android.com/sdk/index.html
You will need the Android SDK in order to communicate between your computer and your phone. Download it (last link above) and follow the setup instructions that it comes with.
Unzip the contents of the evo-root.zip and put all the files from it into the tools folder located in the android sdk folder.
Rename the eng-PC36IMG.zip to PC36IMG.zip and then put it the tools folder located in the android sdk folder. DO NOT UNZIP IT!

******* PC36IMG.zip md5sum~ fe8aba99893c766b8c4fd0a2734e4738 *******
Move the recovery-RA-evo-v1.8.0.img into the android sdk folder as well.
Make sure usb debugging is enabled on your device. To do so go to Settings > Applications > Development > and make sure the check box is checked.
Plug your phone into the computer. Select "Charge Only" from the notifications bar.
Open up terminal and navigate your way into the android sdk folder.
Code:
cd /
cd asdk
Push all the files onto your phone.
Code:
tools/adb push /asdk/tools/flash_image /sdcard/
tools/adb push /asdk/tools/rageagainstthecage-arm5.bin /data/local/tmp/
tools/adb push /asdk/tools/mtd-eng.img /sdcard/
tools/adb push /asdk/tools/PC36IMG.zip /sdcard/
tools/adb push /asdk/tools/recovery-RA-evo-v1.8.0.img /sdcard/
Note that the PC36IMG.zip will take longer than the other files to transfer to the sdcard because it is a large file.

Now we will make rageagainstthecage.bin executable.
Code:
tools/adb shell
chmod 0755 /data/local/tmp/rageagainstthecage-arm5.bin
You should see this (below) after it has made the change.
Code:
$
Now to use the rooted shell.
Code:
cd /data/local/tmp
./rageagainstthecage-arm5.bin
You will now see some text on your terminal screen describing the exploit. 

Wait for the adb shell to finish the process. At this point it may or may not terminate the current shell session in terminal. If it does then it should look like this:
Code:
users-iMac:asdk user$
If it doesn't it will return to
Code:
$
in that case you need to exit the current session. To do so type
Code:
exit

Now we need initiate a new shell which should now have root permissions.
Enter the following:
Code:
tools/adb shell
and you will see you now have a
Code:
#
instead of
Code:
$
Now we need to flash the mdt-eng.img in order for it to let us install a custom recovery
Code:
adb shell
cat /sdcard/flash_image > /data/flash_image
chmod 755 /data/flash_image
/data/flash_image misc /sdcard/mtd-eng.img
That will flash your misc partition with Toast's mtd-eng.img


This should return you to
Code:
#
Now boot into hBoot
Code:
reboot bootloader
This will reboot your phone into hBoot. It will scan for the PC36IMG.img. When it asks yes or no, select yes.
It should then reflash your phone into the engineering build.
When it asks to reboot select yes.
You will need to flash custom recovery in order to be able to flash other custom roms or modifications. I use Amon_RA's recovery because it works great and has NEVER caused me any problems.
Now, open up terminal and get back into the android sdk folder
Code:
cd /
cd asdk
Since we have already pushed the recovery onto the sdcard we only need to flash the recovery onto the phone so that we can use it
Code:
adb shell
cat /sdcard/flash_image > /data/flash_image
chmod 755 /data/flash_image
/data/flash_image recovery /sdcard/recovery-RA-evo-v1.8.0.img
Now lets rename that PC36IMG.zip file again
Code:
mv /sdcard/PC36IMG.zip /sdcard/eng-PC36IMG.zip
that way your phone doesn't try to flash it when you go into recovery each time
And last but not least we need to boot into it to flash a custom rom
Code:
reboot recovery
Your phone should then reboot into Amon_RA's recovery and you may now head over to the dev forum to find your new favorite custom rom.
very nice! can anyone confirm this? my buddy wants me to root his 2.2 and i would like to try this.
To make life easier for some people add this to your post mate, and apply it yourself if you would like.
Here is how to add your sdk/tools directory to your .bash_profile file so you won't have to navigate to the folder each time.
Download this so you'll be able to see your hidden files http://www.mediafire.com/?diimft1ninn Run it, check "Show Hidden Files" then click Restart finder. Now, navigate to your home folder (/Users/UserName/) and see if there's a .bash_profile already there. If not, create with textedit.
Now add this to the file: export PATH=${PATH}:/Path/Of/Your/Sdk/Tools/Folder
Mine is /Users/bmxrider4444/Documents/Android/SDK/tools
Now do not save it as rich text. If yours is in rich text, click on "Format" in the menu bar, and click "make plain text". Now save it as .bash_profile and uncheck "if no extension is provided, use .txt".
Now you can go back to Ghost and uncheck "Show all hidden files" and restart finder again (special thanks to ajones7279 for these steps)
Enjoy!
Just as clarification as to what this does, it enables you to run adb commands and other commands without having to navigate to the /android/tools/ folder every time you want to run adb or whatever.
does this work?
seekis said:
At this point we need to push the recovery onto the sdcard
Code:
tools/adb push "location of recovery-RA-evo-v1.8.0.img" /sdcard/
Click to expand...
Click to collapse
This is great! Thanks for the guide - I am planning on rooting my Wife's EVO but have been waiting for an easier method than the other one posted. Question on the above where we write "location of recovery-ra-evo-v1.8.0.img". Is that the exact code, or should we be adding a directory or folder location into this line? I rooted my 2.1 EVO on my Mac a couple months ago and don't remember this step. Once again - very much appreciate the help.
One last question - would it make more sense to have a custom ROM already on your SD Card prior to rooting, so that you can flash it right after you flash AMON-RA for the first time? Probably doesn't matter but thought i'd ask.
^^ same question as above, plus one other n00b question - does this method unlock NAND?
[edit] I was not insinuating that randymac88 is a n00b; I, however, am
seekis said:
I don't trust unrevoked as I have had problems with it in the past.

I am not responsible for any damages to your phone.
Click to expand...
Click to collapse
Don't trust us with the unrevoked 3.x/unrevoked forever application combo that's worked for thousands of users without sideeffects on regaw's post?
You should note to everyone that your method will screw up their PRI, reverting it back to 1.34. By using unrevoked and unrevoked forever, you can keep 1.40.
randymac88 said:
This is great! Thanks for the guide - I am planning on rooting my Wife's EVO but have been waiting for an easier method than the other one posted. Question on the above where we write "location of recovery-ra-evo-v1.8.0.img". Is that the exact code, or should we be adding a directory or folder location into this line? I rooted my 2.1 EVO on my Mac a couple months ago and don't remember this step. Once again - very much appreciate the help.
One last question - would it make more sense to have a custom ROM already on your SD Card prior to rooting, so that you can flash it right after you flash AMON-RA for the first time? Probably doesn't matter but thought i'd ask.
Click to expand...
Click to collapse
Thats not the exact code no. I just put that as a place holder you are suppose to put in the location of where you have the recovery.img. For example, the exact command for me would be:
Code:
/Users/seekis/Downloads/recovery-ra-evo-v1.8.0.img
Don't trust us with the unrevoked 3.x/unrevoked forever application combo that's worked for thousands of users without sideeffects on regaw's post?
You should note to everyone that your method will screw up their PRI, reverting it back to 1.34. By using unrevoked and unrevoked forever, you can keep 1.40.
Click to expand...
Click to collapse
As far as using unrevoked, I stated that I, ME, MYSELF, has had issues with it. not that anybody else has. By all means go and use it if you would like. I will not. It is true that you will loose PRI 1.40, but seeing as how even after installing the OTA from HTC my phone still didn't update it to 1.40, I don't see the issue.
rsage said:
^^ same question as above, plus one other n00b question - does this method unlock NAND?
[edit] I was not insinuating that randymac88 is a n00b; I, however, am
Click to expand...
Click to collapse
i believe it does unlock nand seeing as how i adapted it from toasts method
Hey Seekis - question, I'm stuck here. I keep getting "permission denied", or "operation not permitted" when trying to make the exploit executable at this step:
chmod 0755 /data/local/tmp/rageagainstthecage-arm5.bin
Am I missing something? I've tried a million times and can't seem to get past this. I've successfully pushed all the files onto the sdcard.
I've also have had some trouble finding the exact root path to these files. I've been able to navigate, but I would think a lot of users would have some trouble.
Regardless, many thanks for getting this posted...
EDIT: I pushed the rageagainstthecage file to the sdcard by mistake. Will try again tomorrow.
ok i got rid of that step by moving the file into the android sdk and pushing it with all the other files
Okay now I appear to be in big trouble as I've just messed up my wife's phone, and its probably going to be unusable for a while until I get this figured out (assuming I do!).
I got through most of the process. I flashed the PC36IMG.zip file; however when it asked to reboot, it just dumped me back into the bootloader. Whenever I say reboot, it just takes me back to the bootloader. Pull the battery, same thing - bootloader. Yikes.
I don't know how to get to the next step because I can't get into a booted rom in order to flash the amon-ra recovery. Am I totally effed? Can anyone help me here?
EDIT: Okay reflashed the PC36IMG.zip file, and it rebooted into the stock ROM. Onward! Phew!!
The wife's EVO is now fully rooted running Baked Snack 1.5 w/Netarchy's kernel. Touch and go there for a minute, but it all worked out. No 1.40 PRI, but I don't really care about that right now.
Woot! Thanks Seekis!!
do u have to push the pc36img with adb every time or will drag and drop work or copy and paste work?
FoxHound630 said:
do u have to push the pc36img with adb every time or will drag and drop work or copy and paste work?
Click to expand...
Click to collapse
You can mount the card on your system and copy paste it over as well, yes.
randymac88 said:
Okay now I appear to be in big trouble as I've just messed up my wife's phone, and its probably going to be unusable for a while until I get this figured out (assuming I do!).
I got through most of the process. I flashed the PC36IMG.zip file; however when it asked to reboot, it just dumped me back into the bootloader. Whenever I say reboot, it just takes me back to the bootloader. Pull the battery, same thing - bootloader. Yikes.
I don't know how to get to the next step because I can't get into a booted rom in order to flash the amon-ra recovery. Am I totally effed? Can anyone help me here?
EDIT: Okay reflashed the PC36IMG.zip file, and it rebooted into the stock ROM. Onward! Phew!!
Click to expand...
Click to collapse
Had the same issue. When i first booked into the bootloader i had to select recovery then flash PC36IMG.zip. Then boot loop. Then i went back into the bootloader and it automagically read in the PC36IMG.zip and flashed it, then i got stock 2.1 root. Just a few minutes of "oh crap"
I'm stuck. I got as far as flashing PC36IMG.zip, which was successful, as my phone now runs 2.1, but it doesn't appear I'm rooted. When I go back into the adb shell, I'm getting the $ prompt, and running
Code:
cat /sdcard/flash_image > /data/flash_image
gives me a permission denied error. Help!
atom_jack said:
I'm stuck. I got as far as flashing PC36IMG.zip, which was successful, as my phone now runs 2.1, but it doesn't appear I'm rooted. When I go back into the adb shell, I'm getting the $ prompt, and running
Code:
cat /sdcard/flash_image > /data/flash_image
gives me a permission denied error. Help!
Click to expand...
Click to collapse
i dont know what to tell you other than try again. this happened to me the first time through as well. i dont know why. i just started from the top and it worked the second time through.
seekis said:
i dont know what to tell you other than try again.
Click to expand...
Click to collapse
So after you flash PC36IMG.zip you should automatically get a root (#) prompt when going into the shell? ie, I'll have rooted 2.1 yes?
seekis said:
this happened to me the first time through as well. i dont know why. i just started from the top and it worked the second time through.
Click to expand...
Click to collapse
Aha. Ok, I will keep trying til it gives me a root shell, I guess. I also tried unrevoked3 but that didn't seem to work.
Success!! So, I stupidly assumed that all PC36IMG.zip's were the same, and was using the one from the original 2.2 PC thread. Once I got the correct one, voila!
You might want to post the md5 of the one you are using, so there's no confusion for others. Also, you missed a tiny step when you first start up hboot - you have to select fastboot for it to start scanning for PC36IMG.zip.
Thanks!

Bloatware and beyond (removal)

Hello so im just making this post to inform some people who are scared to disable certain things that a lot more can be done with the disable feature then just alleviated bloatware.
So far I've disabled sense launcher and I'm currently only using launcher pro. I've also disabled everything with the word twitter in it lol.
One of my pet peeves is redundent data so I was able to disable htc sense's facebook and just download the facebook app which kicks its asssss anyway.
I've disabled the lock screen however it did not actually disable the lockscreen, no idea what that lockscreen.apk is doing but i still have it disabled.
Here is a list of my disabled packages.
package:com.htc.fm
package:com.android.browser
package:com.htc.rosiewidgets.datastrip
package:com.htc.widget3d.watch
package:com.htc.lockscreen
package:com.htc.appsharing
package:com.htc.idlescreen.stock
package:com.logmein.rescue
package:com.htc.Sync3DWidget
package:com.telenav.app.android.telenav
package:com.htc.connectedMedia
package:com.htc.streamplayer
package:com.htc.clock3dwidget
package:com.mobitv.client.tmobiletvhd
package:com.htc.android.htcsetupwizard
package:com.htc.wdm
package:com.htc.FMRadioWidget
package:com.htc.htccompressviewer
package:com.htc.widget3d.weather
package:com.omnifone.android.app.htclistenstore
package:com.htc.htcsettingwidgets
package:com.android.setupwizard
package:com.htc.android.Stock
package:com.htc.rosiewidgets.photogridwidget3d
package:com.htc.rosiewidgets.powerstrip
package:com.android.protips
package:com.htc.friendstream
package:com.htc.rosiewidgets.tip
package:com.htc.MusicWidget3D
package:com.voxmobili.sync.MobileBackup2
package:com.htc.rosiewidgets.screenbrightness
package:com.muvee.video.trimer
package:com.qiktmobile.android
package:com.tmobile.vvm.application
package:com.htc.ereader.widget3d
package:com.htc.htcmailwidgets
package:com.htc.htctwitter
package:com.westtek.jcp
package:com.sdgtl.watch.pyramid
package:com.htc.feedback
package:com.htc.android.fusion.StockWidget
package:com.htc.mysketcher
package:com.android.magicsmoke
package:com.htc.idlescreen.socialnetwork
package:com.htc.launcher
package:com.htc.cs
package:com.htc.android.teeter
package:com.slacker.radio
package:com.htc.FriendStream3DWidget
package:com.htc.recommend
package:com.nuance.nmc.sihome
package:com.htc.Trends3DWidget
package:com.htc.photowidget3d
package:com.htc.Twitter3DWidget
package:com.logmein.rescuesecurity
package:com.htc.socialnetwork.facebook
package:com.htc.socialnetwork.flickr
package:com.gameloft.android.GAND.GloftNOHP
package:com.htc.fusion.htcbookmarkwidget
package:com.htc.htccontactwidgets_3d_fusion
package:com.tmobile.apppack
moral of my story, you got a lot of room to play around with. My phone runs incredible fast now and the battery life has increased but I also just bought a 1900mAh battery and popped that in.
Let me know if anyone else can add to this list. I plan on disabling the SMS client and solely using a third party in the very near future. Any words about this? Thanks!
Noob question, how exactly do you disabled that? I see some other post saying they can disable it but never really get into how they go around doing it. I'm also new to android T_T.
I had trouble at first too.
first google this: setting up android SDK for windows
Then since they probably won't tell you this, at the step where they tell you to download google usb drivers, do it anyway (can't hurt) but immediately after that- download HTC sync, and install just to get all the drivers you need for your HTC phone onto windows. At that point you want to then close HTC sync from your running applications to avoid a server out of date error in command prompt (this will get a lot easier to understand once you have the sdk tutorial infront of your face)
Once sdk is all set up and you can access your device (you will try to run adb shell in command promp in windows and you will get a $) You can go to the dev section and look at the fre3vo post.
From here you can drop the fre3vo file into C:/ and the first command in command prompt will be
adb push C:/fre3vo /data/local/tmp
- the C:\fre3vo is where the file is located on your computer and the /data/local/tmp is where your moving it onto the android device.
Next command is
adb shell chmod 777 /data/local/tmp/fre3vo - to my understanding this is just changing permissions so you can run the file thru our terminal set up.
Last command just runs the binary and is adb shell /data/local/tmp/fre3vo
After that you should be able to run the fre3vo exploit and it will kick you back to your original command promp something like C:\users\your name
Now comes the easy part: at this point type in adb shell and you will get a # sign which means you achieved temp root. The following commands will help and should only be ran after you see the # symbol because these are commands for android on your phone, not the ADB program we used to just place the fre3vo file onto the phone.
pm list packages - this shows all packages installed
pm disable (package name) use the package name from the list above where the brackets are but exclude the brackets
pm enable (package name) will enable the package incase your phone starts to bug
pm list packages -d -this will show you which packages are disabled and yes keep the minus sign infront of the d.
PM me if you have trouble.
alright i'll try to do this right now =) thanks a lot! c how it goes~
ignore post

Categories

Resources