Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[APP]Wear Reboot bootloader & recovery

OP AdamOutler

5th August 2014, 03:06 AM   |  #1  
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:	667
Size:	25.4 KB
ID:	2884249  
Attached Files
File Type: apk app-release.apk - [Click for QR Code] (1.65 MB, 585 views)
Last edited by AdamOutler; 5th August 2014 at 04:43 AM.
The Following 10 Users Say Thank You to AdamOutler For This Useful Post: [ View ]
5th August 2014, 04:35 AM   |  #2  
Tower1972's Avatar
Senior Member
Flag Somewhere in Wisconsin
Thanks Meter: 212
 
995 posts
Join Date:Joined: Mar 2008
More
this requires root like the one made for the LG?
5th August 2014, 04:53 AM   |  #4  
Tower1972's Avatar
Senior Member
Flag Somewhere in Wisconsin
Thanks Meter: 212
 
995 posts
Join Date:Joined: Mar 2008
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, 04: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, 04:58 AM   |  #6  
Tower1972's Avatar
Senior Member
Flag Somewhere in Wisconsin
Thanks Meter: 212
 
995 posts
Join Date:Joined: Mar 2008
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, 06:03 AM   |  #7  
Tower1972's Avatar
Senior Member
Flag Somewhere in Wisconsin
Thanks Meter: 212
 
995 posts
Join Date:Joined: Mar 2008
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, 07:04 AM   |  #8  
Junior Member
Thanks Meter: 0
 
4 posts
Join Date:Joined: Aug 2013
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, 04:11 AM   |  #9  
panthersdzynes's Avatar
Member
Flag Evansville, Indiana
Thanks Meter: 4
 
63 posts
Join Date:Joined: Feb 2008
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, 07:03 PM   |  #10  
Junior Member
Thanks Meter: 1
 
12 posts
Join Date:Joined: Sep 2014
good apps

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes