How Repair USB Brick [Alternative Method] - Android General

After 3 days trying to fix my USB Brick in My Touch 3G HTC Magic, and got nothing, invented this method:
1. We climbed and mtd0.img flash_image files to an FTP server, I have mine on a server that will give them to you, do not use is:
FTP host name: geecko.site90.com
FTP user name: a4977439
FTP user password: freepass01
2. Terminal Emulator and download the install it, reminding him of the Market full suction, I just connect my phone with wifi and enter the market.com (I think it's that xD) and they look and then give up and is sent to your phone, of course if you have your gmail account open in your phone and PC.
3. Download a FTP manager for android, I use the AndFTP, we can do in the same way that we installed in the Terminal Emulator.
4. Open the terminal emulator and enter the following commands
"su" - to have administrator permissions
chmod 777 / data / - to change the permissions to the folder where you downloaded the file data
5. Then we connect to the host via FTP with AndFTP and then configure it by selecting the folder where we asked DATA "folder where you download the files."
6. connect to the server, enter into the public_html directory and select the files mtd0.img and flash_image and unloaded, and we expect the HOME key
7. walked into Terminal Emulator and type chmod 775 / data / to protect the folder and then write data / flash_image misc / data/mtd0.img and reboot.
Sometimes the data / flash_image misc / data/mtd0.img ami fails but gave me errors, just restart and ready and had my memory ready xD
I just hope it does not change the password to the HOST xD
My English no so good

i have a good idea
xD Enjoy!!!!!

Related

Where are located the launched process at boot ?

Hi, i just rooted my hero yesterday.
I have some small capacities on linux, and i wnated to know if there is ( and where it is ) an equivalent to the /etc/init.d and different rc.x.d config. file for the process launched at boot. I wouldl ike to edit or delete some programs launching at startup which i don't need really to launch at startup Is it possible and simple ?
Ciao
Fred
Edit : stupid question... there is no vi on the system so no way to edit the file ..
I am even new than you to android rooting (just rooted my Sprint Hero 2.1 today!).
I loaded Fresh ROM 2.1.2 on my Hero today and there's an app called "ES File Explorer". It allows me to browse the unix-like filesystem, right to the directory you mentioned above.
I can click on the files and open them as Text, Executable, etc. Opening as Text even gives me two different text editors.
Unfortuantly, the file(s) you talk about are for readonly. You have to be logged in as a Superuser to edit them (as I found out today). The easiest way I found is to do it via a command-line prompt.
When you "root" your android phone, that means you are able to login remotely as another user. Such as the "superuser" account from the Android SDK. On Windows, after you have rooted your phone, you can do:
Code:
C:\android\tools\> adb remount
C:\android\tools\> adb shell
#
When you see that "#" prompt, you are now logged into your phone running the default shell (not sure which shell it is). So, now you can copy/open that file:
Code:
# cd \
# type init.rc | more
Of course u can't do squat from here. So, you have two options:
1) Change the permissions to allow you to modify it from the Android device itself (possible security issue if u download a broken app that wants to modify your phone).
Code:
# chmod 755 init.rc
Now you are able to modify the file locally, right on your device. No PC needed any longer. But again, it's a possible seucrity issue.
2) just pull the file from your device to your desktop pc, edit it, and push it back. Exit out of the # shell by typing "exit" and pressing enter. At the C prompt, pull the file:
Code:
C:\android\tools\> adb pull /init.rc C:\init.rc
That pulls the file from your android device and places it at C:\init.rc. You can obmit the C:\ part, which would place the file in your android Tools folder u are running adb from (mine is getting messy though).
Once you edit it to your liking, push it back to your device:
Code:
C:\android\tools\> adb push C:\init.rc /init.rc
And that's it.
most custom roms contain nano, which is also a possible way to edit files.
I updated my post to reflect actual directions on how to modify a system file like that.

My adfree scripts for visionary

I've finally created working adfree for Desire HD.
*** Probably there is something in ROM which overwrites hosts to default every one hour. I'm trying to track this. ***
Please comment.
Instructions:
1. Install visionary
2. Set visionary to run on boot
3. Extract files to /data/local/
Use Root Explorer or something like this, mount system partition as r/w and copy files from zip. You should have two files: /data/local/hosts and /data/local/visionary.sh
4. Set permissions of visionary.sh to executable
4. Restart phone
Ver. 0.9
Using my huge hosts file which is compilation from three sources plus my manual additions.
Is it for always have a root acces ? (Android logged)
NeoKiro said:
Is it for always have a root acces ? (Android logged)
Click to expand...
Click to collapse
It is for hiding ads.
Code:
4. Set permissions of visionary.sh to executable
How to set permissions executable?
Pacjonek said:
Code:
4. Set permissions of visionary.sh to executable
How to set permissions executable?
Click to expand...
Click to collapse
In Root Explorer hold your finger on file and choose option 'permissions'.
Probably You can try skip this step.
than33 said:
In Root Explorer hold your finger on file and choose option 'permissions'.
Probably You can try skip this step.
Click to expand...
Click to collapse
When I do that I don't get "permissions"... Trying to restart now without it...
E D I T: Just rebooted and ads are now gone in some apps Will see what will happen in one hour
ANOTHER EDIT: Thank you for this. Hope you can fix the one hour problem. Still need to wait for an hour to be over before I can check it.
/CK
So everything works? If so, thank you
Do you recommend we uninstall adfree app when using this?
Uninstalled but still not blocking ads in apps for me, e.g. in alchemy
The ads came back a few mins later... So guess you didn't quite break the code yet
/CK
Does this method not work with the temp root?
1. Search for Adfree Android on the market
2. Install and run
3. allow it to download and install new hosts file, it will copy it to your sdcard and try to replace /system/etc/hosts but fail (it should reboot the phone shortly)
4. Power off the phone and hold Volume Down and power.
5. Use volume down to select recovery
6. In clockwork recovery volume down to "partitions menu" and hit the track pad to select
7. Select "mount /system" and "mount /sdcard" "mount /data"
8. Plug in your usb cord and open a command line on your pc
9. enter adb shell and type the following commands
cp /sdcard/hosts /data/data/hosts
rm /system/etc/hosts
ln -s /data/data/hosts /system/etc/hosts
10. Reboot your phone and enjoy adfree android.
this is what i used on my legend was hoping it would be as easy, :\
I think it might be better to use 0.0.0.0 instead of 127.0.0.1
With 127.0.0.1 it will attempt to connect to itself and wait until it times out, but with 0.0.0.0 is will stop straight away since it's an invalid address.
noobdeagle said:
Does this method not work with the temp root?
1. Search for Adfree Android on the market
2. Install and run
3. allow it to download and install new hosts file, it will copy it to your sdcard and try to replace /system/etc/hosts but fail (it should reboot the phone shortly)
4. Power off the phone and hold Volume Down and power.
5. Use volume down to select recovery
6. In clockwork recovery volume down to "partitions menu" and hit the track pad to select
7. Select "mount /system" and "mount /sdcard" "mount /data"
8. Plug in your usb cord and open a command line on your pc
9. enter adb shell and type the following commands
cp /sdcard/hosts /data/data/hosts
rm /system/etc/hosts
ln -s /data/data/hosts /system/etc/hosts
10. Reboot your phone and enjoy adfree android.
this is what i used on my legend was hoping it would be as easy, :\
Click to expand...
Click to collapse
on the DHD we don't have a custom recovery nor write access to /system atm so this won't work
Strangely enough my Ad-Free works fine without the need of this.
0.0.0.0 worked for me.. cheers

Android Terminal Commands

Here are a few commands for Android in terminal. If you have any commands that you think should be here, just reply. Enjoy!
chmod - give/take rights away from files. The numbers you see in the how-to's is a little complicated. It has to do with the rights you are assigning the file or folder. http://wiki.linuxquestions.org/wiki/Chmod for further reading.
cat - look at, modify, or combine a file. You can also copy files with this command by "reading" it to another file instead of to the screen.
cd - change from one directory to another
cp - Copy a file from one location to another
dd - copies exact locations to other locations. Can be an entire drive, a folder, etc.
dd if= of=. uses an input file and an output file.
exit - exits the shell you are in. When you type su you start up a shell.
ls - lists all files with in a directory try ls - l too.
mv - Move a file from one location to another. At the same time you can rename a file.
su - Substitute User. We type this to switch to the root user. You need to type this command first to do a lot of the other commands.
tar - creates taped archives. Compresses files like winzip, 7zip, winrar and others tar /? for details.
rm - followed by a file name with delete the file sync - synchronizes any data on disk with data in memory. We type this before rebooting to ensure we've got all data written
Other commands of interest:
df - how much free disk space. In linux you can add a switch "df -h" but the "-h" does nothing for me on Android. top - like task manager, it displays running processes. in Linux the q key quits. On Android I don't know how to make it quit other than closing the app. uptime - displays how long it has been since you last rebooted the system.
busybox - a tool that combines many linux commands into a single compact file. Typing this displays all the commands at your disposal.
busybox df - a much easier to read display of free diskspace. This display shows how full (use%) each file system is.
Thanks
thank you so much, well for a noob like me very informative was looking for this kind from very long :laugh:
Substitute user XD you know it is superuser right?
free - see all free Memory from the Device
mid-kid said:
Substitute user XD you know it is superuser right?
Click to expand...
Click to collapse
Actually substitute user is also correct.
"The su command, also referred to as substitute user, super user, or switch user, allows a computer operator to change the current user account associated with the running virtual console."
Source: http://en.wikipedia.org/wiki/Su_(Unix)
Sent from my Galaxy Nexus using xda premium
So practically the basic linux comands are the same with android terminal!!!
I just noticed that the ping command is working just fine
Type ping 4.2.2.4 for example
rezo609 said:
If you have any commands that you think should be here, just reply. Enjoy!
Click to expand...
Click to collapse
svc data enable - turn on mobile data
svc data disable - turn off mobile data
svc wifi enable - turn on wifi
svc wifi disable - turn off wifi
svc help - show information about subcommands
For the top command mentioned in the OP, just type "top -n 1" and it will exit, leaving you with the readout at the time you executed the command. -n is for number of updates before stopping.
Also will add that the powertop command will show the top reasons for wakeups from idle.
Tnx
Metalcorpe said:
So practically the basic linux comands are the same with android terminal!!!
Click to expand...
Click to collapse
Yep
rezo609 said:
If you have any commands that you think should be here, just reply.
Click to expand...
Click to collapse
grep - Useful to apply filters to other commands. For example, to list only the apk files inside a folder:
Code:
ls /folder/to/list | grep apk
or to search a string inside a file:
Code:
cat /file | grep stringToSearch
logcat - Debugging tool, all the system messages are shown here. To show only the debug messages (useful when an app is giving FC without apparent reason), type:
Code:
su
logcat -d
mount - The most common use for this command is remount the system partition, to modify its content (be careful, you can easily brick your device!). Common usage (needs root):
Code:
Mount /system in Read/Write mode:
mount -o rw,remount /system
Mount /system in Read Only mode:
mount -o ro,remount /system
Saving command output to file. Type
Code:
command >> /folder/to/save/file
If the file doesn't exist will be created, otherwise, the info will be added to the end of the file.
You can also use:
Code:
command > /folder/to/save/file
If the file doesn't exist also will be created, but if the file exists its content will be deleted before add the info.
mount - Mounting a partition
umount - Unmounting a mounted partition
reboot - Reboot phone
stop - Shutdowns the GUI
start - Restarts GUI
above two commands can be used to get a fast reboot.
Also you my use the reboot command to do a faster restart to the device but your are going to lose any unsaved work
You must be rooted
First type : su
Then : reboot
Sent from my GT-I9505 using XDA Premium 4 mobile app
run program with command
I want to run "Applock"s lock all command. I have widgetsoid which can create shortcut for any command. How to do it? I am rooted.
SAVED ME!
toasterwater said:
svc data enable - turn on mobile data
svc data disable - turn off mobile data
svc wifi enable - turn on wifi
svc wifi disable - turn off wifi
svc help - show information about subcommands
Click to expand...
Click to collapse
Dude, thank you so much for posting this information. I had switched my MNVO service to a newer a phone, and this one was just sitting around. There were still things on it that I needed like some notes that I had saved. Because I had not used it in a while, and there was no data/cell service on it, I was out of luck (or so I thought) when I forgot my unlock pin. It wouldn't accept my google login information because there was no data connection. I COULD NOT GET INTO MY PHONE! I was dreading the possibility of having to factory reset, which would erase my notes and other things saved on there. On a whim and after MUCH Google searching, I was trying to find a way to reset the number of attempted pin locks to no avail. I was about to give up, but luckily, I remembered I had rooted it. And after downloading the latest SDK bundle, I came across your post. It allowed me to turn the wifi on my cell phone even though I was "locked out." Wouldn't you know that it very quickly picked up my home wifi signal. Because a data connection was enabled, I was then able to use my gmail login information to get into the phone. Your post saved me and prevented me from having to factory reset my phone and losing my information. Thank you so much!
netstat - show connections status in local device
...
rezo609 said:
Here are a few commands for Android in terminal. If you have any commands that you think should be here, just reply. Enjoy!
chmod - give/take rights away from files. The numbers you see in the how-to's is a little complicated. It has to do with the rights you are assigning the file or folder. http://wiki.linuxquestions.org/wiki/Chmod for further reading.
cat - look at, modify, or combine a file. You can also copy files with this command by "reading" it to another file instead of to the screen.
cd - change from one directory to another
cp - Copy a file from one location to another
dd - copies exact locations to other locations. Can be an entire drive, a folder, etc.
dd if= of=. uses an input file and an output file.
exit - exits the shell you are in. When you type su you start up a shell.
ls - lists all files with in a directory try ls - l too.
mv - Move a file from one location to another. At the same time you can rename a file.
su - Substitute User. We type this to switch to the root user. You need to type this command first to do a lot of the other commands.
tar - creates taped archives. Compresses files like winzip, 7zip, winrar and others tar /? for details.
rm - followed by a file name with delete the file sync - synchronizes any data on disk with data in memory. We type this before rebooting to ensure we've got all data written
Other commands of interest:
df - how much free disk space. In linux you can add a switch "df -h" but the "-h" does nothing for me on Android. top - like task manager, it displays running processes. in Linux the q key quits. On Android I don't know how to make it quit other than closing the app. uptime - displays how long it has been since you last rebooted the system.
busybox - a tool that combines many linux commands into a single compact file. Typing this displays all the commands at your disposal.
busybox df - a much easier to read display of free diskspace. This display shows how full (use%) each file system is.
Click to expand...
Click to collapse
if i wanted to delete a directory with data ? what would be the syntax
Set/View Network Host Name
Run the following as root
setprop net.hostname <new_hostname> // To Change Device Hostname
getprop net.hostname // To View Device Hostname
list of all android terminal commands
Open terminal or file explorer with root access
From root folder go to /system/bin
Type command :ls
The list contains all the terminal codes available
Enjoy!!
Disclaimer1: I'm not responsible if anything goes wrong while you try out the codes.
Disclaimer:man & help pages are not available on android terminal

How to run a Minecraft Server on the Xperia Play

Hello everyone! This is a simple guide on how to run a Minecraft Server on your Xperia Play. Note that this is not a Minecraft Pocket Edition server, it is a server for the full version of Minecraft for computers!
This is my first guide ever, so if something isn't clear or is missing because I thought it was obvious, ask me!
Why do this?
I did this to see if I could get it running. If you do it, you will be able to carry your Minecraft world with you whenever you go! You could run the server on the computer that you're using to connect to the server, but what if you only have your Xperia Play and a friend's laptop with you?
What you will need:
- Your phone
- Root access to your phone
- Working Busybox on your phone
- A kernel that supports loop devices (I am using the stock GB rom and DooMKerneL and it works fine)
The limitations that the server will have:
- It will be creative mode, because survival mode makes it crash more
- It will only be able to handle 1-2 players because it's a phone
- It will be slow (especially with redstone) because it's a phone
- The world will be flat because it crashes a lot less if the world is flat
- There won't be any mobs, npcs or monsters.
But it will work!!!
So, let's start!
1. Download the "Ubuntu Installer Free" app on your phone
2. In the app, press Install Guides > Ubuntu 12 Install Guide > Next
3. Say "Unicorn" three times (this step is optional)
4. Download the Boot Script and the Core Ubuntu Image with the two buttons that you see in the app. It is important to download the core image, and not the small or large images.
5. Also download the Terminal app on your phone if you don't have it already. (the app has a button for that, too!)
6. Close the Ubuntu Installer app, and make a folder on your SD card named "ubuntu" without the quotes. Then decompress the files that you downloaded (the script and the core image) and put their contents in that folder. Your "ubuntu" folder should now have these files inside it: ubuntu.sh, ubuntu.img
7. Open the Terminal that you downloaded in step 5 and write these commands:
Code:
su
cd sdcard/ubuntu
sh ubuntu.sh
Because this is the first time you are running it, it will ask you for a password. Enter one and remember it or write it somewhere in case you need it later. Then it will ask you for a resolution, but this doesn't do anything since you won't have a GUI so enter "800x480" and then enter "y" to make this the default.
If Ubuntu doesn't boot, try updating your busy box. If you don't get Ubuntu working, you won't be able to continue from here. You will know it has booted when you see [email protected]:/#
8. Now you have to install Java, nano and wget. To install these enter these commands:
Code:
sudo apt-get install openjdk-7-jre
sudo apt-get install icedtea6-plugin
sudo apt-get install wget
sudo apt-get install nano
you can also enter this to install cowsay because it is epic but this is completely unrelated to this guide:
Code:
sudo apt-get install cowsay
9. Now that you have Java and the other things installed, you have to download the minecraft server and put it in a folder of your sdcard. First, go to your sdcard with the command:
Code:
cd sdcard
Then create a folder to put the server in and go to it with the commands:
Code:
mkdir mcserver
cd mcserver
Now you have to download the file minecraft_server.jar and put it in the folder that you created (mcserver for me)
You can do this with a browser and a file manager, or with the command:
Code:
wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar
10. It's time to configure the server! To do this, we will create the file server.properties by running the command:
Code:
nano server.properties
then copy this and paste it into nano:
Code:
#Minecraft server properties
#Tue Jun 26 14:43:57 EEST 2012
allow-nether=false
level-name=world
enable-query=false
allow-flight=false
server-port=25565
level-type=FLAT
enable-rcon=false
level-seed=
server-ip=
max-build-height=64
spawn-npcs=false
white-list=false
spawn-animals=false
online-mode=false
pvp=false
difficulty=0
gamemode=1
max-players=2
spawn-monsters=false
generate-structures=false
view-distance=3
motd=Minecraft Server on a phone!
(as you can see, this puts the server into offline mode. I did this because when it is in online mode it has to check the username online and you are likely to get a time out error)
Then you have to press CTRL + O to save the file. This is very easy to do if you have installed the Hacker's Keyboard from Google Play (it's free). If you don't have it and don't want to install it you can use a file manager like Root Explorer to create the file, or press menu > special keys in the Terminal and figure out how to press CTRL with a hardware button. After you press CTRL + O press the enter key and then CTRL + X to close nano.
11. You should now be able to start the server! Do this with the command
Code:
java -Xms512M -Xmx512M -jar minecraft_server.jar nogui
It will create a flat world and start. Then you should be able to connect to it from Minecraft on your computer.
Yay! You got it running! A server on your phone! :good:
To stop the server enter the command "stop" and then to shutdown Ubuntu enter "exit", all without quotes.
I guess that if you got it running, you'll be able to figure out how to start it again the second time so I won't cover that.
I was actually wondering if something like this was possible. Thanks a lot for the tutorial!
There's an easy way to connect to a server...
Get pocket tool from the play tore and change the server ip to one of the pocket edition specialized minecraft servers.
look at this link: http://www.minecraftforum.net/topic/1284148-minecraft-pe-mcpe-fan-mulltiplayer-server-closed/
only problem, the server is currently offline, you need to find another one
Thank you so much for this tutorial.
I've searched something like this for a while, but i ain't successful in finding this.
Thank you!:highfive:

[Q] backtrack permission denied

Hi,
I download backtrack-v10-image and I used the Linux Installer from linuxonandroid to launch it, but when I want to install anything, it's shows me "permission denied" in terminal emulator :crying: as well as in console of backtrack "requested operation requires superusers privilege" and when i tape Vnc password's it's show me "authentications failure" .
So I try to start the image manually using the bootbt provided by the website of backtrack. this faith it, the console shows me backtrack
[email protected] by red, against the keys of keyboard are completely messed up, whether in the physical or virtual keyboard.
Sorry if I'm not in the right section .... thank you
tf300t , ww_epad -10.6.1.15.3-20130416, rooted
ps: I can't post any link, you have to google it (To prevent spam on the XDA forums, ALL new users prevented from posting outside links in their messages. After approximately 10 posts, you will be able to post outside links. Thank you for understanding!) as you can see that I'm noob here .
solved by my self, i was able to do it by modifying the directory of the image and using linuxonandroid launcher, but i took precaution to note the password now, like this:
[email protected]:/ $
[email protected]:/ $ cd /sdcard/BT5
[email protected]:/sdcard/BT5 $ su
[email protected]:/storage/emulated/legacy/BT5 # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /sdcard/BT5/backtrack.img
Checking loop device... MISSING
Creating loop device... OK
mount: mounting /storage on /data/local/mnt/external_sd failed: Invalid argument
No user defined mount points
net.ipv4.ip_forward = 1
Config file not found, using defaults!(/root/cfg/backtrack.img.config)
Starting first boot setup.......
Creating User account (named backtrack)
Enter new UNIX password: <you have to note this password to use it in backtrack console after sudo su
Retype new UNIX password:
passwd: password updated successfully
The user `backtrack' is already a member of `tty'.
Please enter a password for VNC (must be between 6 and 8 characters long
Using password file /home/backtrack/.vnc/passwd
Password:
Password too short
groupadd: group 'sdcard-rw' already exists
Start VNC server? (y/n)
y
Start SSH server? (y/n)
y
Now enter the screen size you want in pixels (e.g. 800x480), followed by [ENTER]:
1280x752
New 'X' desktop is localhost:0
Starting applications specified in /home/backtrack/.vnc/xstartup
Log file is /home/backtrack/.vnc/localhost:0.log
If you see the message 'New 'X' Desktop is localhost:0' then you are ready to VNC into your backtrack OS..
If connection from a different machine on the same network as the android device use the address below:
eth0: error fetching interface information: Device not found
If using androidVNC, change the 'Color Format' setting to 24-bit colour, and once you've VNC'd in, change the 'input mode' to touchpad (in settings)
* Starting OpenBSD Secure Shell server sshd [ OK ]
Save settings as defaults? (y/n) (You can always change it later in the app)
y
Config saved to /root/cfg/backtrack.img.config
To shut down the Linux environment, just enter 'exit' at this terminal - and WAIT for all shutdown routines to finish!
Click to expand...
Click to collapse
I just want to know how to clean the installation of the "chroot"
without move / rename the image in android to return to the initial state of "chroot"
(without the files are installed in the backtrack)

Categories

Resources