Shell command to halt/restart the Java VM? - Nexus One Q&A, Help & Troubleshooting

A few times recently I've found that my phone will lock up, or go VERY slow, and I can't do anything with it. But if I plug it in and run ddms and Halt VM after about 10s it restarts Android and 20s later back to normal.
This is not a full reboot, don't need that. It's just restarting the Android VM.
My idea is that maybe I can have Tasker intercept incoming SMS with a command to run this program. I know in general this idea will work, but I wonder how long it might take for it to actually execute, or if the SMS will even be received in this state.

Try "hot reboot", now on the market. It kills the system server process.
http://forum.xda-developers.com/showthread.php?t=787611
Some background info (hope this answers all the questions above): the app kills the system server and reboots android without rebooting the linux kernel. It uses busybox to execute the command because not all devices come with the same set of linux/unix commands. So yeah, you need to have busybox installed otherwise you see only the beautiful animation. Furthermore, there are buggy busyboxes around so you may wish to install the newest from the market.
Click to expand...
Click to collapse
Not free anymore, but I have a backup of old version.

britoso said:
Try "hot reboot", now on the market. It kills the system server process.
http://forum.xda-developers.com/showthread.php?t=787611
Not free anymore, but I have a backup of old version.
Click to expand...
Click to collapse
Cool, thanks for that reference. Sounds like it's clearly possible from the command line. Probably as simple as killall java-something Just haven't looked or experimented yet.

Code:
adb shell
su
killall system_server
that worked for me. Took a few seconds before it hot rebooted.

Related

"Superuser Permissions" freezing (JF 1.51)

Hi all,
Whenever I go to use a program for the first time that requires root, my screen goes black and processes start freezing. Eventually, a box comes up saying that the "Activity SU Request" process has frozen.
Any idea what's causing it (could it be the amount of apps i've installed?) and/or how to remedy it?
EDIT: found this:
@Androidandy the easiest way to get it working seems to be:
turn on your phone by holding the home+end(power) key
press alt+x to enter the recovery console and then press enter when it asks you
next type:
mount data
rm /data/data/com.koushikdutta.superuser/databases/superuser.sqlite
if you have the problem where it says this file does not exist, type:
rm /data/data/koushikdutta.superuser/databases/superuser.sqlite
Click to expand...
Click to collapse
Sorry for asking without looking completely thoroughly first, a mod can close this thread if they like.
blakew said:
Hi all,
Whenever I go to use a program for the first time that requires root, my screen goes black and processes start freezing. Eventually, a box comes up saying that the "Activity SU Request" process has frozen.
Any idea what's causing it (could it be the amount of apps i've installed?) and/or how to remedy it?
EDIT: found this:
Sorry for asking without looking completely thoroughly first, a mod can close this thread if they like.
Click to expand...
Click to collapse
Or...... dear lord, why.... you could just go to Settings>Applications>Development and enable "USB debugging". It's a known problem with the current SuperUser.apk
Usb debugging simply isn't working with my stupid windows computer, and I'm too lazy to boot it into linux. I found out the hard way that the recovery console doesn't work on my phone, I must have forgotten to update the phone somehow. I was fiddling with all the key combinations, conveniently forgetting alt + w = wipe.
Managed to get an old backup working, and the SU popup is working again.

Rebooting android without psyhicaly rebooting device

Is there any way to reboot android kernel only without physically rebooting device? I want to reboot, but i don't want to first wait 5 minutes for WinMo to load and then launching haret manually.
You could try launching the kernel via kexec, but in most cases, if you've only screwed up android but not the kernel or hardware, you can open the terminal and type
su
killall zygote
and wait until it boots
sp3dev said:
You could try launching the kernel via kexec, but in most cases, if you've only screwed up android but not the kernel or hardware, you can open the terminal and type
su
killall zygote
and wait until it boots
Click to expand...
Click to collapse
Can I just restart the Network and NOT the phone??
Like if i am moving from one place to another, my range becomes ZERO..then, for the phone to connect again, I need to shut it, come to winMO and then RUN Haret again...Tremere gave me a command to kill all the radio service, BUT HOW DO U restart the services??

[Q] HELP... Problem with ADB in C# Program.

ok, so i wrote a program in C# that will open a process CMD.exe and send adb Commands from a Working directory i setup previously that includes Adb and all the other goodies i need for automating the process of rooting and such.
here's my issue, the program will work perfectly in Win 7, but when i run in XP,
i run ADB shell reboot. the phone will reboot. but never reconnect until i end the my program process. ive tried adb kill-server. tried closing the process within my program. i do notice in XP adb will open two adb.exe processes. even when running outside of my program in the command prompt.
i am using a backgroundworker thread to send the commands.
any help is appreciated.
let me know if you want me to post some code. though i don't think its the programming.
Don't think its the programming either. XP has all sorts of weird bugs and why I jumped ship immediately when 7 came out and have been quite happy since. Don't know much about programming but I've read alot of issues with XP and adb. Stick with 7 if you can.
ok, so still haven't found out why adb doesn't like Win XP. the way i got around it was to drop C# for the ADB commands. i made a batch script to run my adb commands. and a C# console app to send the Serial Modem Commands(for PRL and NV item writing) that i call in my Batch file.
but if anyone has any tips to try ill for sure try them.
more detailed description.
i create a new thread that will create a Process of cmd.exe then do a process.StandardInput("ADB Commands");
the current running thread will finish before the next can be started so no prob with multiple threads running.
all my adb commands ie. adb push recovery.img /wherever/recovery.img
work just fine and does what its 'spose to.
until i get to adb shell reboot.
the phone will reboot but the adb driver is never reconnected after the reboot. like it normally would when running the command from the terminal.
i will have to close my C# program before it will connect and recognize the driver again.
again all this works just fine in Win 7.
i also tried to do a "Scan new Hardware" in device manager after reboot and both programs will just go unresponsive at that point.
next, i will attempt to make my own ADB in C#. if im not mistaken adb uses a TCP connection to communicate with the device. default port 5037 me thinks.
@TronofTroy
Hey do you mind sharing a couple of commands with me in C# on how to write the prl n nv items please.
Also I have been trying to send commands from a windows based form in C# but I can figure out how to do it properly.
Thank You very much!
I just use batch scripts and run them.
filmaker said:
I just use batch scripts and run them.
Click to expand...
Click to collapse
U mean u can write prl, nam, and Evdo with a batch script?
Slinged from my iPhone 4 On Straight Talk using Tapatalk

[Perma-Temp Root] Better Temp Root [From The Rezound]

This release has been out in the wild for several days now for the Rezound. Everyone who has gotten it to work reports root lasting much longer than previous methods. I am glad that it is working out for others. This should also work on other devices, such as the Vivid and that is why I am posting it here. There is nothing about it that makes it work specifically for the Rezound.
It still uses zergrush and absolutely does not provide any other capability than other temp roots. (Although some people have reported root apps see root better so it might actually be better). The only difference is I have the things relating to root (ie su,busybox, etc) stored in a ramdisk that lasts alot longer (I have not seen of a report of it being lost before a reboot yet) than things "written" or linked to /system. This is because we still have /system write locked so when we write things to it (like the original zergrush implementation) it gets forgotten after while.
Your mileage may vary. I am obviously not responsible for bricks, data loss, etc if you use this. I and others have used it for about a week and it has been fine.
To use:
0) Make sure superuser isn't installed
1) Reboot phone (full reboot), make sure usb debugging is on.
2) Plug in phone in charge only mode to PC.
3) Kill everything in the built in task manager, then go back to the rosie home screen.
4) Extract zip and doubleclick temproot.bat
5) There is a 20 second time out at the beginning just in case you forgot to plug in your phone, etc so you have time to cancel the process before it starts. To skip it just hit enter on the keyboard or wait the 20 seconds.
6) Hit the thanks button (bottom left of this post) if you like it!
Let me know if you like it better or if something bad happens so I can take it down. Lets hope we get S-Off soon and don't have to deal with this temp root **** anymore.
Troubleshooting:
1) Bootlooping? Pull the battery. If you still are boot looping, an RUU restore may be necessary. I believe this has only happened to one user and it was likely a result of something that was done AFTER root and not directly caused by this program.
2) Just not working? Reboot both your PC and Phone. If ADB cannot see your phone, it is not a fault of the program. If you haven't gotten other temp root methods to work, it is likely this one won't either.
con247 said:
This release has been out in the wild for several days now for the Rezound. Everyone who has gotten it to work reports root lasting much longer than previous methods. I am glad that it is working out for others. This should also work on other devices, such as the Vivid and that is why I am posting it here. There is nothing about it that makes it work specifically for the Rezound.
It still uses zergrush and absolutely does not provide any other capability than other temp roots. (Although some people have reported root apps see root better so it might actually be better). The only difference is I have the things relating to root (ie su,busybox, etc) stored in a ramdisk that lasts alot longer (I have not seen of a report of it being lost before a reboot yet) than things "written" or linked to /system. This is because we still have /system write locked so when we write things to it (like the original zergrush implementation) it gets forgotten after while.
Your mileage may vary. I am obviously not responsible for bricks, data loss, etc if you use this. I and others have used it for about a week and it has been fine.
To use:
0) Make sure superuser isn't installed
1) Reboot phone (full reboot), make sure usb debugging is on.
2) Plug in phone in charge only mode to PC.
3) Kill everything in the built in task manager, then go back to the rosie home screen.
4) Extract zip and doubleclick temproot.bat
5) There is a 20 second time out at the beginning just in case you forgot to plug in your phone, etc so you have time to cancel the process before it starts. To skip it just hit enter on the keyboard or wait the 20 seconds.
6) Hit the thanks button (bottom left of this post) if you like it!
Let me know if you like it better or if something bad happens so I can take it down. Lets hope we get S-Off soon and don't have to deal with this temp root **** anymore.
Troubleshooting:
1) Bootlooping? Pull the battery. If you still are boot looping, an RUU restore may be necessary. I believe this has only happened to one user and it was likely a result of something that was done AFTER root and not directly caused by this program.
2) Just not working? Reboot both your PC and Phone. If ADB cannot see your phone, it is not a fault of the program. If you haven't gotten other temp root methods to work, it is likely this one won't either.
Click to expand...
Click to collapse
Just don't execute the program again after you have done it once, or it will boot loop the vivid to high hell. And you'll have to do a factory reset.
Sent from my HTC PH39100 using xda premium
Did that just happen to you? There is a 20 second timeout for a reason...
Is there a possibility in making a Mac or Linux friendly version?
Thank
Drew
Sent from my HTC PH39100 using xda premium
drewdatrip said:
Is there a possibility in making a Mac or Linux friendly version?
Thank
Drew
Sent from my HTC PH39100 using xda premium
Click to expand...
Click to collapse
If you know how to use adb on Mac or Linux you can just run the equivalent command one by one
Sent from my ADR6425LVW using XDA App
Code:
timeout /T 20
adb shell rm /data/local/tmp/boomsh
adb shell rm /data/local/tmp/sh
adb push zergRush /data/local/
adb shell chmod 755 /data/local/zergRush
adb shell /data/local/zergRush
adb wait-for-device
adb shell sleep 1
adb remount
adb shell mkdir /system/xbin
adb shell mount -t tmpfs none /system/xbin
adb push busybox /system/xbin
adb shell chmod 4755 /system/xbin/busybox
adb push su /system/xbin/su
adb shell chmod 4755 /system/xbin/su
adb shell cd /system/xbin
adb shell /system/xbin/busybox --install -s /system/xbin
adb install Superuser.apk
Does nothing different from the original scripts that were posted here a month ago.
Read my OP bud. I have downloaded all of the ones posted in your Vivid section and made sure. This one stores the root to a ramdisk that lasts until a reboot instead of /system rw mount going away after a short time.
I had a problem pushing this to the phone at first. Then I made sure the screen didnt time out and everything worked fine for me....just a little FYI incase someone runs into this problem as well.
Thanks
Didn't work for me.
I followed the instructions to the letter, and when I ran the batch file, there was no 20-second wait; it started immediately. It found the phone, went through the "sending speedbots" or whatever, and then rebooted the phone. It then re-ran ADB with "wait-for-phone" and the phone got stuck in a bootloop. I kept it connected to the PC and did a battery pull, and as the Beats Audio logo came up during boot, the command window on my PC flashed some more text and then closed. I let the phone completely boot and tried to run Titanium Backup and I get an error indicating it doesn't have root access. Any thoughts?
BTW - running Windows XP on a Dell Optiplex 755 with 4GB of RAM.
UPDATE - I tried performing the whole process again, and it ran for about 10 seocnds then just closed. So, I tried again, and it went through the process, up to rebooting my phone and indicating "wait-for-device," but the phone never completely shut down; it hung at that shutdown point where the entire screen is black but you can see a bit of lighting. So I did another battery pull and turned the phone on again, and after about 15 seconds, the command window scrolled a bunch more stuff and then closed and the phone continued to boot. It did manage to boot this time without a battery pull and no loops, and SU is there, but when I run Titanium Backup, I still get a "phone not rooted" error.
Looks like I'm waiting for perm root. Thanks for your work though. I'm glad it worked for others. Viva la Android!!!!
FYI: I did disable bloatware using a script, within the same command prompt window right after achieving temporary root.
The bloatware APPS and widgets remain disabled even after full reboots, including a battery pull.
I'm very grateful to temporary root, since it allows to disable most of the pre-installed bloatware.
Went from bad to worse.
I ran this on my phone last night, and even though it didn't temp root my phone, it still ran fine for the rest of the night and all day today. I decided to reboot the phone before I went to bed and now I am stuck in some kind of loop. The phone actually boots to the lock screen, and I can unlock it, but some of the icons on my homescreen don't load and the phone becomes unresponsive after about 10 seconds and then reboots. It's done this about 10 times and a battery pull does not resolve the issue. Help?
Have you tried a factory reset ? After that it may allow you to run the temp root. At least that is what happened once when I tried it.
Well through trial and error, I have found out several things...
1. The temp root that comes with the Rezound Clean Tool is the only temp root tool I can get to work.
2. Even if you have BT turned on before using the Rezound Clean Tool, turning it off permanently disables it until a reboot is done.
3. It is common for the Rezound to suddenly start boot looping, even if you haven't done any rooting or anything. This is caused by the connection type in Phone Properties randomly changing to a type that is incompatible with the Verizon SIM. (Google search "rezound boot loop" and you'll find the fix quite easily.) Also, removing the battery cover may disable the antenna but only a SIM-less boot will stop the boot looping so that the communication type can be set back to what it should be.
4. I still love this phone. It is the best phone on the market today; it has the fastest processor available from any carrier and has the most internal memory of phones that allows for removeable storage.
Thanks to all the devs for their hard work - I can't wait for perm root and custom ROMs!!!!

4X extremely slow after rooting/reboot

So, I followed the guide we all did here:
http://forum.xda-developers.com/showthread.php?t=1818502
And before someone asks: I have deleted the Backup app (IS11LG_SystemBackupTest.signed.apk) we had to install during rooting after the phone was rooted.
The phone then happily ran, rooted. SUpersu was installed/updated, the phones root check said it's all perfect, I was a happy camper. But today I had to reboot it. I can't say if it was the first reboot after rooting, sadly. The phone boots up, arrives at the lockscreen (some colorful defaultthing, before I get to see my GO Locker screen after login), and then stops being responsive, it basically at first feels like it's not reacting at all. Some things are responsive, strngely ... I get accurate sounds when touching the screen for instance. If I then wait, I eventually get to the SIM Unlock ... which is also totally unresponsive, it will maybe show two digits, then freezes up. Strangely, I could type the remaining digits and hit OK and the SIM would unlock ... but the screen no longer showed what I typed. I then arrive at GO locker, can unlock it (sluggish and slow again) and finally am properly logged in, but still totally sluggish and slow. Needles to say it's a pseudobrick that way, unusable.
What's going on and what could I check?
Please try the following:
alexp999 said:
REALLY SLOW AFTER ROOT?
Remove the "SystemBackupTest" app, if you haven't already.
On your phone, go to "Settings -> Developer options" and make sure "USB debugging" is TICKED
Connect your phone via USB to your computer.
Open a command prompt (may need admin privelages, right click, run as administrator)
Type without quotes "cd C:\o4xr" and press enter.
Type without quotes "adb shell rm /data/local.prop" and press enter.
Type without quotes "adb reboot" and press enter.
Click to expand...
Click to collapse
alexp999 said:
Please try the following:
Click to expand...
Click to collapse
Thanks, that fixed it! It's not easy to do, as the scrolling lists do not work, either, and you can't seem to get to the developer options, it won't scroll. Strangely enough "internally" it seems to do things ... if you re-enter the options, they're down to the end of the list, it looks like it doesn't update the screen properly (much like when I had to enter the SIM code).
Anyway, it's fast again, whew ... I was scared. What is the local.prop thing, if I may ask?
voon said:
Thanks, that fixed it! It's not easy to do, as the scrolling lists do not work, either, and you can't seem to get to the developer options, it won't scroll. Strangely enough "internally" it seems to do things ... if you re-enter the options, they're down to the end of the list, it looks like it doesn't update the screen properly (much like when I had to enter the SIM code).
Anyway, it's fast again, whew ... I was scared. What is the local.prop thing, if I may ask?
Click to expand...
Click to collapse
I'm not entirely sure, I just know it gives us temp root for the rest of the root script to run.
Hm, so its' not a systemwide ini file or so, that existed before ... it was created during the above rooting process and was an undesired leftover from it? I'm always a bit worried if I delete something with such an unspecific name in the OS
voon said:
Hm, so its' not a systemwide ini file or so, that existed before ... it was created during the above rooting process and was an undesired leftover from it? I'm always a bit worried if I delete something with such an unspecific name in the OS
Click to expand...
Click to collapse
Its actually created by the SystemBackupTest app.
The script then removes it just before issuing a reboot.
The only way it can come back, is if you accidently open that app again before uninstalling it.
alexp999 said:
Its actually created by the SystemBackupTest app.
The script then removes it just before issuing a reboot.
The only way it can come back, is if you accidently open that app again before uninstalling it.
Click to expand...
Click to collapse
I see, I might have done that ... good to know. Anyway, great that it works again, thanks again
laggy phone
My lg 4x hd is very slow after root...
I just tried to make this few steps above, but I got this message.
Any idea what to do?
Pls help me!
THX
66aaa
66aaaa said:
My lg 4x hd is very slow after root...
I just tried to make this few steps above, but I got this message.
Any idea what to do?
Pls help me!
THX
66aaa
Click to expand...
Click to collapse
It looks like you have either plugged in more than one android device, or you have an android emulator (from the SDK I guess) running. Unplug all USB devices (except keyboard and mouse) and then try again. Good luck!
If you have an emulator running try "adb -d shell rm /data/local.prop"
Edit: To see all adb-devices type "adb devices". This will return a list of all adb-devices connected (emulators + usb devices)
Dexxon said:
If you have an emulator running try "adb -d shell rm /data/local.prop"
Edit: To see all adb-devices type "adb devices". This will return a list of all adb-devices connected (emulators + usb devices)
Click to expand...
Click to collapse
I still don't understand and hope you do it...
THX for your help!
As you can see the same device is listed two times. Restarting the adb server may help. Just type "adb kill-server" and than launch the second command from your screenshot. Maybe this works.
Dexxon said:
As you can see the same device is listed two times. Restarting the adb server may help. Just type "adb kill-server" and than launch the second command from your screenshot. Maybe this works.
Click to expand...
Click to collapse
This is the result...what to do know?
THX
The devices is detected and the command is executed, but the file does not exist. Make sure that there is a file "prop.local" at /data. If not, you may have a different problem.
Maybe you have an emulator running or Bluestacks installed... Uninstall Bluestacks...
I don't think that this is the case as the device shows up with a serial number in the "adb devices" list.
To be sure it is the correct phone you could compare the serial number shown in the list with the serial number of your phone (you might find this information in settings -> about phone).
Dexxon said:
The devices is detected and the command is executed, but the file does not exist. Make sure that there is a file "prop.local" at /data. If not, you may have a different problem.
Click to expand...
Click to collapse
I don't have in the system/data "prop.local" file...sure....
What is emulator and Bluestacks?
I really don't understand this problem I have...
Could you help me pls?
THX
66aaaa said:
I don't have in the system/data "prop.local" file...sure....
What is emulator and Bluestacks?
I really don't understand this problem I have...
Could you help me pls?
THX
Click to expand...
Click to collapse
An emulator is a program which emulates Android so you can execute Android-Apps on your PC. BlueStacks is an emulator. It may show up as an adb devices, but this is not the case here.
Back to your problem: Are you sure the rooting process worked?
Did you reboot your phone after rooting?
I didn't root my phone under ICS so I don't have any experience with this
no one raised this question to confirm or did this info was provided anywhere
What version of ROM? ICS V10x? JB V20x? User could had used the wrong guide.
Best way out is to do a reflash and retry rooting if all fails.
Dexxon said:
An emulator is a program which emulates Android so you can execute Android-Apps on your PC. BlueStacks is an emulator. It may show up as an adb devices, but this is not the case here.
Back to your problem: Are you sure the rooting process worked?
Did you reboot your phone after rooting?
I didn't root my phone under ICS so I don't have any experience with this
Click to expand...
Click to collapse
I dont't have this Bluestacks emulatur, sure...
I have Superuser working properly on JB V20 stock ROM. The only thing it is very slow sometimes, Thats why I tried to make the process above...
I made the root few month ago...and rebooted many times since than...
Any idea what to do now?
THX

Categories

Resources