FORUMS

Voices Of XDA: Orbiting The Earth With Android

Editor’s note: This week’s feature has been written by forum … more

CloudPlayer: DIY HiFi Music Streaming Solution

In our Helpful Guide to Music Streaming Services, we mentioned several different services … more

Optimize Battery Life with This Useful App

Battery life is an important aspect of your smartphone, especially if you use it for more … more

The OnePlus 2 & The Year of Smartphone Compromises

We are very close to entering the last third of 2015, and we have now seen many of … more

[APP]Wear Reboot bootloader & recovery

5,225 posts
Thanks Meter: 9,788
 
Post Reply Subscribe to Thread Email Thread
Its difficult and annoying to try to put the Galaxy Gear into bootloader mode. Recovery takes a couple of extra steps. I made a quick wear app that allows for rebooting to Bootloader, Recovery and plain ol' reboot. Google won't allow me to upload API level 20 yet(Android L beta), and my device wont accept API level 19. So, I've attached the apk to this post.


Download Here:http://forum.xda-developers.com/atta...1&d=1407200684

Image:


here's the code.

Code:
public class RebootMenu extends Activity implements OnClickListener {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_reboot_menu);
        final WatchViewStub stub = (WatchViewStub) findViewById(R.id.watch_view_stub);
        stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener() {
            @Override
            public void onLayoutInflated(WatchViewStub stub) {
                setupWidgets();
            }
        });
    }

    private void setupWidgets() {
        Button reboot = (Button) findViewById(R.id.reboot);
        Button recovery = (Button) findViewById(R.id.recovery);
        Button bootloader = (Button) findViewById(R.id.bootloader);

        reboot.setOnClickListener(this);
        recovery.setOnClickListener(this);
        bootloader.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) { // view handler
        switch (v.getId()) {
            case R.id.reboot:
                reboot("");
                break;
            case R.id.recovery:
                reboot("recovery");
                break;
            case R.id.bootloader:
                reboot("bootloader");
                break;
        }
    }

    private void reboot(String mode) {
        String[] command = new String[]{"su", "-C", "reboot", mode};
        try {
            Process process = new ProcessBuilder(command).start();
        } catch (IOException e) {
        }
    }
}
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2014-08-04 19:58:19.png
Views:	761
Size:	25.4 KB
ID:	2884249  
Attached Files
File Type: apk app-release.apk - [Click for QR Code] (1.65 MB, 821 views)
Last edited by AdamOutler; 5th August 2014 at 03:43 AM.
The Following 10 Users Say Thank You to AdamOutler For This Useful Post: [ View ]
 
 
5th August 2014, 03:35 AM |#2  
Tower1972's Avatar
Senior Member
Flag Somewhere in Wisconsin
Thanks Meter: 227
 
More
this requires root like the one made for the LG?
5th August 2014, 03:53 AM |#4  
Tower1972's Avatar
Senior Member
Flag Somewhere in Wisconsin
Thanks Meter: 227
 
More
Quote:
Originally Posted by AdamOutler

Yes it requires root.

Well...there is one other guy here (aside from me) who is looking on how to root this thing. We both read your post and seen all the work you did, but at the very bottom, someone commented that doing so wouldnt be a wise idea lol. So I THINK we are waiting for see who will take the first shot !
5th August 2014, 03:55 AM |#5  
Quote:
Originally Posted by Tower1972

Well...there is one other guy here (aside from me) who is looking on how to root this thing. We both read your post and seen all the work you did, but at the very bottom, someone commented that doing so wouldnt be a wise idea lol.

Install TWRP, use that to root your device. Then remove the /System/app/Superuser.apk.

Boot into TWRP
Mount the system
Use the TWRP terminal emulator
rm /system/app/SuperSU.apk

You don't want to use my thread except for the stock firmware flash if you get in a jam.
The Following 2 Users Say Thank You to AdamOutler For This Useful Post: [ View ]
5th August 2014, 03:58 AM |#6  
Tower1972's Avatar
Senior Member
Flag Somewhere in Wisconsin
Thanks Meter: 227
 
More
Quote:
Originally Posted by AdamOutler

Install TWRP, use that to root your device. Then remove the /System/app/Superuser.apk.

Boot into TWRP
Mount the system
Use the TWRP terminal emulator
rm /system/app/SuperSU.apk

You don't want to use my thread except for the stock firmware flash if you get in a jam.

Im going to take this to the proper thread..sorry for hijacking it
The Following User Says Thank You to Tower1972 For This Useful Post: [ View ]
5th August 2014, 05:03 AM |#7  
Tower1972's Avatar
Senior Member
Flag Somewhere in Wisconsin
Thanks Meter: 227
 
More
well ill be...it works lol...Thank ya!!
The Following User Says Thank You to Tower1972 For This Useful Post: [ View ]
8th August 2014, 06:04 AM |#8  
Junior Member
Thanks Meter: 2
 
More
Useful One
Useful App

Quote:
Originally Posted by AdamOutler

Its difficult and annoying to try to put the Galaxy Gear into bootloader mode. Recovery takes a couple of extra steps. I made a quick wear app that allows for rebooting to Bootloader, Recovery and plain ol' reboot. Google won't allow me to upload API level 20 yet(Android L beta), and my device wont accept API level 19. So, I've attached the apk to this post.


Download Here:http://forum.xda-developers.com/atta...1&d=1407200684

Image:


here's the code.

Code:
public class RebootMenu extends Activity implements OnClickListener {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_reboot_menu);
        final WatchViewStub stub = (WatchViewStub) findViewById(R.id.watch_view_stub);
        stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener() {
            @Override
            public void onLayoutInflated(WatchViewStub stub) {
                setupWidgets();
            }
        });
    }

    private void setupWidgets() {
        Button reboot = (Button) findViewById(R.id.reboot);
        Button recovery = (Button) findViewById(R.id.recovery);
        Button bootloader = (Button) findViewById(R.id.bootloader);

        reboot.setOnClickListener(this);
        recovery.setOnClickListener(this);
        bootloader.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) { // view handler
        switch (v.getId()) {
            case R.id.reboot:
                reboot("");
                break;
            case R.id.recovery:
                reboot("recovery");
                break;
            case R.id.bootloader:
                reboot("bootloader");
                break;
        }
    }

    private void reboot(String mode) {
        String[] command = new String[]{"su", "-C", "reboot", mode};
        try {
            Process process = new ProcessBuilder(command).start();
        } catch (IOException e) {
        }
    }
}

12th August 2014, 03:11 AM |#9  
panthersdzynes's Avatar
Member
Flag Evansville, Indiana
Thanks Meter: 5
 
More
It's crazy to think that we can do so much with a watch. Lol. Thanx for this, been looking for an easier way to put in dl mode n such. Appreciate the work!
29th September 2014, 06:03 PM |#10  
Junior Member
Thanks Meter: 1
 
More
good apps
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes