[Mod] Flash Fix For CM7 Via Terminal Emulator - HTC Sensation

I got this from the cyanogen thunderbolt forums and it worked for me all credit to ktech11 for this
I used the terminal emulator on the phone. If you have ever used Linux this is much easier. I can give you the list of commands:
Download Terminal Emulator Free App From The Market
Type su then enter to allow root
(grant terminal emulator root permissions when busybox comes up)
then type exactly this then hit enter
cd /data/data/com.android.browser/app_plugins/com.adobe.flashplayer/.macromedia/Flash_Player/
then type this
ls -a then hit enter
then type this
ls -l and hit enter & should come up as -rw-rw-rw-
then you type the following to remove the permissions
chmod 000 config.data
then reboot and you are done.
Remember the file paths are case sensitive, so type it exactly as shown. if it worked for you don't forget the thank button.
DJ Eddie One
www.facebook.com/djeddieone
www.twitter.com/djeddieone

Related

USCC Mesmerize Rooting on Official 2.2 (Froyo)

Okay, this was my first time trying to root my phone and it would figure that non of the automated methods worked for me. Still, I was able to get root on my US Cellular Samsung Galaxy S Mesmerize (SCH-i500 for the kids keeping track at home) and these are the steps that I took. I hope this helps others who may be scratching their head wondering what to do when the developers haven't gotten around to (read: forsaken) us.
The nice thing about this method is that it doesn't require Windows (though you still do download SuperOneClick).
NOTE: This is only for an officially updated Mesmerize. Rooting is unnecessary for the leaked version.
APOLOGY: I can't post any links to anything outside the forum as I am a newer member, so, sorry for not being able to post URLs.
1. Download the Android SDK from the Android developer website and install/unzip it. You may need to add the path to the adb tool (found under platform-tools for me) to your PATH variable.
2. Download the SuperOneClick tool and unzip it
3a. If you are using Windows, then make sure to install the drivers for your phone. I don't have Windows, so don't ask me which file to download. Sorry.
3b. Enable USB Debugging on your phone (Settings->Applications->Development->Check "USB Debugging").
4. Connect your phone to your computer using the USB cable
5. Open a shell (or command prompt on Windows) and change directories to where you unzipped SuperOneClick
6. Run the following commands to copy files to your device
A. adb push psneuter /data/local/tmp/psneuter
B. adb push busybox /sdcard/busybox
C. adb push su-v2 /sdcard/su
NOTE: A quick note of each of these files.
A. psneuter - an exploit to gain root access temporarily on your phone
B. busybox - a compilation of common unix commands to help you along the CLI world
C. su - the super-user command used to gain elevated privileges
7. Run the following command to get a command line interface to your device
adb shell
At this point, you should see a $ prompt indicating that you are on your phone.
From here, you will change directories to where you put the exploit, change the permissions so you can run it, copy over the files that we need to sustain root access, and finally, install the Superuser.apk app so that you can manage root access from the UI.
Execute the following commands:
$ cd /data/local/tmp
$ chmod 777 psneuter
$ ./psneuter
Here, you will be disconnected from your device. This is normal. Just run "adb shell" again to get back in, though now, you will notice that the prompt has changed to a #. The following commands will reflect that.
# mount -t rfs -o remount,rw /dev/block/st19 /system
# cd /system/xbin
# cat /sdcard/busybox > busybox
# cat /sdcard/su > su
# chmod 4755 busybox
# chmod 4755 su
# exit
Now, you will be back on your computer. Type the following to install the Superuser.apk app.
adb install Superuser.apk
That should do it! You now have root access. Go ahead and try to install Titanium Backup (requires root). You can also install a terminal app or anything else.
I hope this helps. Report your successes/failures in the comments.

Noob guide: how to start terminal emulator as root.

The way to start the terminal as root is pretty easy.
Open term emulator and then hit the menu button and go into preferences. You need to go down to the bottom where it says something like initial command. Click that and at the end of the export command you see (I think the end is after $PATH) type ;su then hit enter. Now whenever you start TE you get su immediately.
Sent by breaking the sound barrier
Indirect said:
The way to start the terminal as root is pretty easy.
Open term emulator and then hit the menu button and go into preferences. You need to go down to the bottom where it says something like initial command. Click that and at the end of the export command you see (I think the end is after $PATH) type ;su then hit enter. Now whenever you start TE you get su immediately.
...
Click to expand...
Click to collapse
Sorry to re-open this old thread, but can anyone suggest modification to the terminal emulator that may allow it to START as root. Typing "su" afterwards switches the user, however the app DOESN'T start initially as root.
There's a better way to do it. Allow me to elaborate some logic:
In Terminal Emulator, whatever you set as the 'shell command line', basically is nothing more than the command you set as the 'initial shell command'. The key difference is that the 'shell command line' is initiated prior to the 'initial shell command'. Therefore, anything set as 'initial shell command' to automate root access comes secondary to the shell you have already started (through the 'shell command line'), which will cause you opening a shell in a shell and thus having to exit two shells. This is dirty. You could work around that with an 'initial shell command' like "su && exit", but it'll remain to be a dirty solution.
If you want the shell in Terminal Emulator to start as root, then set the following 'shell command line' (personally I prefer bash):
Code:
[SIZE="3"]/system/xbin/su -c "/system/xbin/bash -"[/SIZE]
That way only, Terminal Emulator will actually start your session as root and nothing more but root. When you exit the shell, you exit the one and only shell initiated as root ending your session at once.
Now for the 'initial shell command', which you no longer require to obtain root using the above method, I personally have the following set to keep things consistent and give the shell a nice looking start:
Code:
[SIZE="2"]mkdir -p /data/local/bin && export PATH=/data/local/bin:$PATH && clear && uname -a && echo[/SIZE]
I hope this clarified things a bit.
Albert
bitmaster2000 said:
There's a better way to do it. Allow me to elaborate some logic:
In Terminal Emulator, whatever you set as the 'shell command line', basically is nothing more than the command you set as the 'initial shell command'. The key difference is that the 'shell command line' is initiated prior to the 'initial shell command'. Therefore, anything set as 'initial shell command' to automate root access comes secondary to the shell you have already started (through the 'shell command line'), which will cause you opening a shell in a shell and thus having to exit two shells. This is dirty. You could work around that with an 'initial shell command' like "su && exit", but it'll remain to be a dirty solution.
If you want the shell in Terminal Emulator to start as root, then set the following 'shell command line' (personally I prefer bash):
Code:
[SIZE="3"]/system/xbin/su -c "/system/xbin/bash -"[/SIZE]
That way only, Terminal Emulator will actually start your session as root and nothing more but root. When you exit the shell, you exit the one and only shell initiated as root ending your session at once.
Now for the 'initial shell command', which you no longer require to obtain root using the above method, I personally have the following set to keep things consistent and give the shell a nice looking start (think twice before commenting about the mkdir if you don't like it):
Code:
[SIZE="2"]mkdir -p /data/local/bin && export PATH=/data/local/bin:$PATH && clear && uname -a && echo[/SIZE]
I hope this clarified things a bit.
Albert
Click to expand...
Click to collapse
Thanks a lot, I solved the problem somewhat differently, in a way that may cause some raised eyebrows from people concerned with security. I created a copy of "sh", did a chmod 6755 on it, and set it as the shell. The reason for this is that I don't have superuser installed on my phone.
Off topic, it's all moot now because I managed to drop it again and the LCD detached from the gorilla glass. Happens once every 9 months. I came to XDA to see from my old posts where I bought the screen before.
Initial Command not working in cm11 (s7262).
Entering su in Initial Command in Terminal Emulator Preferences get this result:
Code:
[email protected]:/ $ 8;53R
Entering manually su command get OK., but initial command is not working.
How can I fix this problem?
Thanks.

[GUIDE][ADB]Basic Linux/Unix Commands

Basic Linux/Unix Commands
[HIGHLIGHT] DISCLAIMER - You know the drill. I don't deem myself responsible in case you screw up your phone. Always make a backup if you don't trust yourself and if you know that you screwing up is your forte[/HIGHLIGHT]
Thanks -
mihir287 for his FAQ
sweetnsour for his extensively detailed thread
Shen - advice
Zayed from www.addictivetips.com
http://www.linuxtopia.org
This guide aims to give you a background on some of the linux commands available to you once you obtain an adb shell.
In order to obtain an ADB shell, you must have adb set up on your computer (all ADB really consists of in windows is adb + 2 dlls + adb drivers.
However it makes sense to fully set up the Android SDK if you plan on developing for Android.
You need to install adb or get Terminal Emulator. To install adb and get more info about it visit here.
NOTE = All commands in linux/unix are CASE SENSITIVE.
Shell Commands
These commands are to be typed after typing
Code:
adb shell
In the Command Prompt.
Or, you can proceed normally if you are using a Terminal Emulator.
1. cd - Change Directory
To change to any directory, simply type:
Code:
cd <dirname>
dir name is the path. For instance, to switch to system/etc, type:
Code:
cd /system/etc
'..' will allow you to go back one directory. In our example, typing:
Code:
cd ..
would take you back to /system
2. ls - List Files
To list all the files in whatever directory you're in, simply type:
Code:
ls
pressing enter after, of course. This will list all NON-HIDDEN files/directories.
Code:
ls /system/etc
will list the contents of system/etc
Code:
ls -l
will list all NON-HIDDEN files in your current directory with additional details
Code:
ls -a
will list all files/directories(including hidden) within your current directory
Code:
ls *.extension
will list all the files wit the specified extension in the directory
For example i wanna list all apps -
Code:
cd /system/app
ls *.apk
3. su - SuperUser
The standard adb shell (unless you're on an insecure kernel/ramdisk), will be a non-root shell ($)
To obtain root priviliges (if your phone is rooted), simply type:
Code:
su
on obtaining superuser priviliges, you will be presented with a # symbol, which represent a root shell.
4. chmod - Change Mode
The two most commonly used 'modes' you'll come across in Android are '777' and '755'
These numerical pemissions have different meanings, of course. This can be a little confusing, so I hope this explains it in a simple to understand way.
As you can see, there are three numbers in the following example; 'chmod 755'
So, to break that down: The first number in the sequence, '7', represents the USER (aka, you). The second number in the sequence, '5', represents the GROUP (users who are members of the file's group) and the third number, '5' represents OTHERS (aka, everyone else).
Now to explain why they are 755, and the significance of those numbers, see the following list:
7 Full
6 Read/Write
5 Read/Execute
4 Read Only
3 Write/Execute
2 Write Only
1 Execute
0 None
So in the instance of 777, you can see that USER, GROUP and OTHERS have FULL access to the file in question.
To change the permissions of one file (apns-conf.xml for example, type:
Code:
chmod 777 /system/etc/apns-conf.xml
To change the permissions of all files in a directory, use the -R (recursive)option:
Code:
chmod 777 -R /system/etc
5. pwd - Print Working Directory
Couldn't be more simple. if you want to find out which dirctory you're currently in, type:
Code:
pwd
and press enter.
6. cat - Concatenate (evolved from)
The cat command if used to list a file's contents on your screen; or pass via pipeline to use with other Linux commands.
cat /proc/mounts
will output the various mount points in your android OS.
Note that there are many other uses for the cat command.
7. mount - remount as r/w or r/o
The mount command is used to mount a directory as r/w[Read-Write which allows you to modify it] or r/o[Read-Only]
Mount info -
Code:
mount
To mount as r/w and r/o respectively use -
Code:
mount -o remount rw <dirname>
or
mount -o remount ro <dirname>
To mount /system i will use
Code:
mount -o remount rw /system
or
mount -o remount ro /system
8. cp, mv, rm - Copy, Move, Remove
Use the 'cp' and 'mv' commands to copy, move a file/directory respectively and 'rm' to remove one. They are equivalent to copy+paste and cut+paste and delete
If you are planning to copy/move/remove from your android to anywhere else or viceversa you need to mount as r/w prior to this and mount as r/o after it.
They can be used as
Code:
cp <source> <destination>
or
mv <source> <destination>
or
rm <source>
For example i wanna copy/move/delete my zip file to system/media [after mounting system]
Code:
cp /sdcard/bootanimation.zip system/media
or
mv /sdcard/bootanimation.zip system/media
or
rm /sdcard/bootanimation.zip
9. Auto - Install Applications To SDCard
Type the following -
Code:
pm setInstallLocation 2
10. logcat
A logcat is basically a command to view messages in one of the system logs.
Logcat is the command to view the internal log of the Android system.
Viewing logcat is often the best way - and sometimes the only way - to diagnose a problem.
Dev's always need proper and useful feedback. So if you are testing something, you can always obtain the errors an report back to the dev who in turn can solve your problem efficiently.
Code:
su
logcat > /sdcard/log.txt
Will obtain the logcat to your sdcard as log.txt
Googlers have a sense of humour so even 'lolcat' works identically as 'logcat'
Code:
lolcat
Some dev's require extensive logcat info. To know more about it continue reading here.
ADB Commands
The following commands are to be type in your adb folder directory.
For instance, mine is in C:\android-sdk-windows\platform-tools so i will type
Code:
cd C:\android-sdk-windows\platform-tools
and then proceed with the following code lines
Alternatively you can change your PATH variable
Setting Path on Windows
For Windows XP:
Start -> Control Panel -> System -> Advanced
Click on Environment Variables, under System Variables, find PATH, and click on it.
In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
Close the window.
For Windows Vista/Windows 7:
Right click “My Computer” icon
Choose “Properties” from context menu
Click “Advanced” tab (“Advanced system settings” link in Vista)
In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
Click to expand...
Click to collapse
1. Check Connected Phone
To display list of available devices, type
Code:
adb devices
You will get the following output
Code:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 21342737ft6273
where the number indicates your devices serial number usually the one one the back of your phone[needs citation]
2. Login To Android Shell
Code:
adb shell
After pressing enter you will either see '$' or '#'
If you get ‘#’ after typing adb shell, you have already get root access on the phone, no need to type su. Otherwise if you get ‘$’ , type ’su’ to get root access (only for rooted device).
3. Install Application
This command installs the app whose directory is specified by you.
Code:
adb install appname.apk
Note that the name of the application should be without any blank spaces in between. Say i have an app called pes 12.apk, I rename it to pes_12.apk - Also don't miss out the .apk extension
example
Code:
adb install C:\programfiles\pes_12.apk
4. Files From Phone To PC And Vice Versa
For Phone - PC
Code:
adb pull <source> <destination>
For PC-Phone
Code:
adb push <source> <destination>
Example
Code:
adb pull /sdcard/bootanimation.zip C:\programfiles
Code:
adb push C:\programfiles\bootanimation.zip /sdcard
^Self Explanatory
5. Reboot To (Normal/Recovery/Bootloader)
Type the following to reboot normally or to recovery/bootloader respectively
Code:
adb reboot
Code:
adb reboot recovery
Code:
adb reboot bootloader
Some Useful Codes-
I do not know many. If you have any suggestions please do tell me
Type them in line by line and don't type in the '$' and '#'
1. Rooting
Code:
adb devices
adb shell
$ echo 1 > /data/local/lge_adb.conf
Then you can proceed onto using SuperOneClick
2. Installing Custom Recovery
The recovery.img and flash_image files must be in /sdcard
Code:
adb shell
$ su
# mount -o remount rw /system
# cat /sdcard/flash_image > /system/xbin/flash_image
# chmod 755 /system/xbin/flash_image
# flash_image recovery /sdcard/recovery.img
# mount -o remount ro /system
# exit
$ exit
adb reboot recovery
Will add FAQ later if needed
Ohh ! so much detail !
As far as i can see its very well written.
Will read tomorrow
Awesome guide! Thank you!
Sent from my LG-P500 using xda premium
MaKTaiL said:
Awesome guide! Thank you!
Sent from my LG-P500 using xda premium
Click to expand...
Click to collapse
Glad You Like It
Rutuj said:
Glad You Like It
Click to expand...
Click to collapse
I knew Half of this but the way you put it is basically noob written and easy to follow through. Thumbs up for this guide. I wish someone posted this when I first started playing with android. This would've made life easier for me >.<
Sent from my LG-P500 using XDA App
purple1 said:
I knew Half of this but the way you put it is basically noob written and easy to follow through. Thumbs up for this guide. I wish someone posted this when I first started playing with android. This would've made life easier for me >.<
Sent from my LG-P500 using XDA App
Click to expand...
Click to collapse
This doesnt make life easier, if one command wrong, bam! A fresh brick phone...
Sent from my Nexus One using Tapatalk
and how to uninstall app from adb ?
nice guide btw
Great guide. I would suggest you add details on how to get logcat as well, since many developers will find it useful if users post logs of bugs
Code:
su
logcat > /sdcard/log.txt
mihir287 said:
Great guide. I would suggest you add details on how to get logcat as well, since many developers will find it useful if users post logs of bugs
Code:
su
logcat > /sdcard/log.txt
Click to expand...
Click to collapse
Thanks !
Added !
Bump !
Thanks commands working perfect.
Tell me onething..how did you get time to type all of this?
royalflusher9 said:
Thanks commands working perfect.
Tell me onething..how did you get time to type all of this?
Click to expand...
Click to collapse
Compiling info takes time.
Type time = 30 mins
Nice thread for n00bs like me !!!! Thanks very much!!!1
Bumping this thread
very helpful guide ......
thanxxxx

GOOGLE TV & Better Terminal Emulator V4.0.3

First of all I would like to thank my intuitions on this discovery! the SONY Google TV can be rooted, well, at least the /system partition can be changed to read/write. I have not actually executed the command to do so, but I do know the necessary path to the Google TV's /system partition. I recently discovered that the the Google TV uses Better terminal Emulator pro V4.0.3, and I was looking around on the magicandroidapps.com WIKI and noticed that there was an application called TV Terminal Emulator Pro, but I think that was a throw-off. Better Terminal Emulator Pro version 4 works perfectly when trying to access system level permissions on SONY's (notice I said SONY) Google TV. Here are the facts. Hopefully someone can try the usual remount command and switch the system to read/write
1.install Better Terminal Emulator Pro (version 4.0.3 ONLY!) no other version will work
Hit the menu button in your SONY Google TV remote once the terminal has opened and in the default shell setting, choose the Almquist shell as the default!
2.type this command in the terminal
\ $/system/bin/ash
This will give you permission to execute all /system/bin commands(ash=advanced shell)
you will now have a prompt like this one below
\w \ $
3.you can now type this command to see all files in /system/bin directory:
\w \ $ls /system/bin
4. type this command:
\w \ $/system/bin/mount
NOTE: This command will give you a list of all partitions within the TV's file system!
NOTE:The system partition will be in the list of mounts called /dev/block/sda5. It is the only one of two mounts that is in read only mode.
NOTE: This directory is a ext3 file system, and this should be added in the remount command in terminal. Plaese give me some feedback on this matter because I know you GTV fans have been waiting on something like this!!
GOOGLE TV & Better Terminal Emulator Pro V.4.0.3 [UPDATE]
So have figured out how to issue the command to remount the system partition to rw, but it appers that I am not in root? For those who do not know the command, here it is:
\w \$ mount -o remount,rw -t ext3 /dev/block/sda5 /system
mount: permission denied (are you root?)
This is no big deal, this just means that we are getting closer to seeing just what this giant tablet can go. This also means that the command is corrects as well, for one to get an output like the one above., I will try to use another shell and see what commands will have to be executed and get back with all you GTV users.
NOTE: This is post is related to the (SONY Internet TV) and NOT the LOGITECH Revue
ALSO: Those of you who are trying to use ADB to control the television, The \$ adb root command cannot be executed in a production build of GOOGLE TV, which led me to go with Better terminal Emulator Pro.
GOOGLE TV & Better Terminal Emulator Pro V4.0.3 [UPDATE]
Hay guys, I was playing around some more with the terminal and I see that there ARE busybox commands present in the application.
I think the trick to rooting the SONY NSX32GT1 would be the CHMOD command. Entering this command while in the BASH shell when the emulator starts will give you the options for executing the command properly. if smeone can help me out with this command to change the permissions of the /system file system, that would be great. The CHOWN command may be of some use as well. I am almost 100 percent sure that if we change the permissions of the filesystem with one of these commands, we will be on our way to getting proper root access to out TVs!
If you are familiar with linux commands, please post a reply with the proper execution, and I will, in return, provide some very exclusive information about the television!
Here are some pics of the terminal up and running with busybox v1.16.2 built in.
i believe u may be speaking of commands like chmod -R 777 /system to give read write and execute permissions to user group owner .or chown root:root but to do any of that u must be root (the owner of most system files) or owner of said files in order to change owner group permissions and more. those commands come after a su or sudo in full bash. so u would still have to remount as rw. but the fact u got busybox installed is nice perhaps we can start looking at other root options if the busybox commands can be found during zerg or other overflow
Sent from my SPH-D710 using xda premium

help with Acer a200 auto root batch file...

hello,
I am trying to set up a simple batch/ script to "automate" the root process.
I am using the mempodroid exploit to gain root access. The problem is this:
I am using this in my script,
adb shell /data/local/mempodroid 0xd9f0 0xaf47 sh
when I use this I get a return of [email protected]:/ # and the cmd window locks up and I can not enter anything.
however if I manually enter this,
adb shell
I get back [email protected]:/ $
and then I enter,
/data/local/mempodroid 0xd9f0 0xaf47 sh
I get back [email protected]:/ #
and that is what I want.
I don't know how to automate it in a working way. Any thoughts?
finished this up and have a working simpleRoot! check it out at acertabletforums.com
and now i have compiled ClockWorkMod for A200 as well! check it out at the same spot!

Categories

Resources