Showing posts with label chromebook. Show all posts
Showing posts with label chromebook. Show all posts

Sunday, 11 December 2016

Debug Android Apps on chromebook using ADB

Background

Chromebook now supports Android Apps to be run. At Google I/O 2016, it was announced that Android apps would be available to run on supported Chromebooks via the Google Play Store, which will result in having two app stores in Chrome OS. ARC's native code approach was abandoned, instead using unmodified copy of Android's framework running in a container. Android apps run in floating windows now. You can also see google playstore in your chrome once you enable it in settings -



In this post we will see how we can run ADB and side load android apps.

 Debug Android Apps on chromebook using ADB

First make sure you your chromebook is in developer mode and and you have also enabled developer options in android settings. All of this was already shown in my last post -
Now from developer options turn on ADB debugging.



Now go to your shell again and execute following commands -

  • sudo crossystem dev_boot_signed_only=0
  • sudo /usr/libexec/debugd/helpers/dev_features_rootfs_verification
  • sudo reboot
This should reboot your chromebook . This will setup set up developer features and enable disk-write access for the firewall settings changes.



 On reboot execute following command in shell -
  • sudo /usr/libexec/debugd/helpers/dev_features_ssh
This will configure secure shell for you.





 And you are done. Now just note down the ip of your chromebook (you can execute ifconfig in shell to know)



and from your development machine type connect adb. Eg if your chromebook ip is 192.168.1.6 you will type -
  • adb connect 192.168.1.2:22
You can type following command to verify it is connected -
  • adb devices


 Now you can execute all adb commands including install to install your dev apk builds.




And you should see it get installed on your chromebook -


Related Links

Saturday, 10 December 2016

How to enable developer mode on a Chromebook

Before you Start

Caution: Modifications you make to the system are not supported by Google, may cause hardware, software or security issues and may void warranty.

Couple of things to note -
  1. You will have to turn of verified boot which mean you or anyone can install a custom (non google verified) image.
  2. This will give you access to root console/shell.
  3. All your local data will be erased. Your device will be essentially reset. All your cloud data will still be present.
So to sum up your device will be less secure. Do this on your own risk.

NOTE : This article in intended only for developers and advanced users.

If you are concerned about anything mentioned above this would be a good point to turn back.

How to enable developer mode on a Chromebook

  1. Press and hold 'Esc' and refresh key (the button with a circular arrow - which is in place of your F3). Holding these buttons press your power key.

  2. You should now see a recovery mode screen with an exclamation icon. Press 'Ctrl' + 'D'. You will see screen displaying press Enter to turn of OS verification.



  3. Press Enter. You will see a transition screen displaying message of transition to developer mode.

  4. After some time your device should reboot and start in developer mode. At the end you should see your normal setup screen with language, keyboard layout etc.


How would you test that you are in developer mode?

  • First of all you should be able to access shell (console). Press Ctrl + Alt + T. Then in opened console type shell. You should be getting access to your normal linux command line.

  •  You can also check your chrome setting. You should be able to see all new advanced setting available. You can also see Android internal setting here. You can very well go ahead tab on Build number in About devices and turn on Android developer mode to access developer options. You can use this to turn on USB debugging and adb.





That's it you are now in developer mode. You have root access and can do more cool stuff. But remember  - With great power comes great responsibility :)

NOTE :  If Ctrl + D is not working you  can press Refresh+Power to boot in developer mode with ctrl+D or hit space and wipe clean.

Related Links


How to take a screenshot on your Chromebook

Background

A Chromebook is a laptop running the Linux-based Chrome OS as its operating system. Yup you read it right it is Linux based. It used Linux kernel underneath. The devices are designed to be used primarily while connected to the Internet, with most applications and data residing in "the cloud".

Chromebooks ship with Google Chrome OS, an operating system that uses the Linux kernel and the Google Chrome web-browser with an integrated media-player.

Your Chromebook is different from your personal laptops and Desktops. There are two essential things to consider before you go for a chromebook
  1. Chrome OS : This is the OS that runs on your chromebook. You need to get familiar with it. Chrome OS is an operating system designed by Google and based upon the Linux kernel. Google announced the project in July 2009, conceiving it as an operating system in which both applications and user data reside in the cloud: hence Chrome OS primarily runs web applications. (Wiki)
  2. Cloud computing : This is a major deal breaker here. Chromebook essentially is a cloud computing device. You access your data stored in cloud and signout when done. Most if your data is in cloud. So even if you lose your chromebook your data is safe.
Without these two your chromebook is essentially a browser!

Following video posted by google which sums up what chromebook really is.




There are tons of different things associated with chromebook from it's keyboard layout, its file directories all the way to the apps you run on it. Will get into those details in perhaps upcoming posts but in this post we will see how to take a screenshot on your chromebook.

How to take a screenshot on your Chromebook


  • To take screenshot of entire screen you need to press ‘Ctrl’ and ‘Window Switcher’ keys together.

  • To get a part of the screen you need to press ‘Ctrl’ , ‘Shift’  and ‘Window Switcher’ keys together.



Once you do that you should see a notification saying "Screenshot taken".



Screenshots will be available under Downloads directory of your chromebook.


 As I mentioned earlier keyboard layout of your chromebook is different than your traditional laptop. For eg. you don't have a capslock or a delete button. Instead if capslock you would see a search button. Anyway to understand keyboard shortcuts you can press
  • Ctrl + Alt + ?
And you should see a keyboard layout. When you press on
  • Ctrl or
  • Search or
  • alt or
  • their combinations
you should see their corresponding key shortcuts. For rg when you press Ctrl while on that layout you can see all shortcuts starting with Ctrl. Notice the screenshot shortcut we saw above -





Related Links


t> UA-39527780-1 back to top