Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

27 December, 2012

Galaxy Note 2, Quick root & flash guide

Thanks to my wife I just got one new Galaxy Note 2 as Xmas gift. It's one awesome gadget, it came with Android 4.1.1 pre-installed and it has some ugly vendor animations on it that I wanna get rid off so I'm going to root and re-frash it with a custom room (new version 4.2.1, Jelly Bean).

What is root? On many computer operating systems including Unix, Linux and Android, the root account, is a special user with complete access to all files and commands. Various names for this type of account might include, administrator, superuser, or supervisor.

In the context of Android, root access allows the user to have complete control over their device. Root access is commonly granted for developers allowing them access to all files and commands on the device.

With full root access to a device, there is potential for damage. Any user with root access is strongly cautioned to be very careful.

My previous experience with my old and rusty HTC desire tells me that xdev and android geek is the right place to go in order to find the firmware and instructions to do it without bricking my "phablet"...

How to Root Samsung Galaxy Note 2 N7100 with Odin

Rooting the device

    Required files and tools:
  1. The root & recovey package
  2. Odin

This installation has done on a clean PC - no android ADK or samsung drivers were installed before it

    The rooting process:
  1. The first thing to do is to download the root & recovery package from here.
  2. Save the file on your computer.
  3. On the same PC download Odin.
  4. Extract and install the tool.
  5. On the computer open Odin.
  6. Next, turn off the device as it must be entered in download mode.
  7. For download mode press and hold Volume Down, Center Home, and Power buttons together.
  8. When the download mode is reached, connect the Note with the computer by using its USB cable.
  9. Press Volume Up to continue and then windows will install all required drivers (SAMSUNG Mobile USB CDC Composite Device and SAMSUNG Mobile USB Modem).
  10. Once windows finishes the driver installation the “added” message should be displayed at Odin.
  11. Also, the ID:COM section should be yellow.
  12. If not, install the drivers again and then redo the above steps.
  13. Up next, on Odin, select “PDA”.
  14. Pick the unzipped downloaded file (cwm6-root-n7100.tar).
  15. Don’t make any other changes, just click on “Start”.
  16. The root process will now begin.
  17. Wait until it’s over and in the end unplug the USB cord and reboot the Note2.
  18. If the device does not boot don't panic, you will have to start the CWM, for that remove the baterry, put it back and then press and hold Volume Up, Center Home, and Power buttons together until the SAMSUNG Logo disappears.

You don't need to download and install Rom Manager into the device. You will not see the recovery image for this device into CWM because there is no official support yet. Next time you will only need to flash the recovery image (without root).

    THE Backup!!!
  1. Start the Rom Manager App then select "boot into recovery mode".
  2. Select backup, etc.
  3. reboot the device.
  4. Connect the USB cable, open the device and then copy the content of the folder clockworkmod\backup into your computer ...

Last, fixing permissions ...

    A few usefull links:
  1. Android USB Drivers For Windows OS
  2. How To Carrier Unlock Samsung Galaxy Note 2 Permanently

17 July, 2012

AllWinnwer A10 Based Tablets

If you are looking for one cheap android ICS based tablet I would recommend this one below. It's does not came with Bluetooth nor 3G embedded but you can "easily" reflash this guy in order to add the support drivers you need.

I bought mine one eBay by 100 bucks with shipping, it's a real bargain. Where I live the usual "well know" brands are twice or more this price. I bought this guy just to stop to reflash and install code into my HTC desire - it's not a good idea to use your main cell phone to test this kind of stuff right? I don't need a US600 paper weight!

Be warned thought: there are lots and lots of versions of tablets using this microcontroller and It's almost impossible to identify all of then. I liked mine very much but I can't say who is the brand behind mine (even on the package there is no brand name nor label). Well, it's okay, it works and the material is really good for the price that I payed, to be honest it's better than what I was expecting.

I saw this very same microcontroller in one Set Top Box on deal extreme (for those whom doesn't know deal extreme is one ebay/china online seller/importer kinda of store, usually the same stuff that you see on dx you can get from ebay or on china, like the original Set Top Box here). I don't know mandarin but I do know that this Set Top Box has more power than the Raspberry Pi and cost so so 100 bucks on ebay ...

So, if you are, like me, interested on installing, flashing and trying some new roms I would recommend:

  1. The Tablet that I bought on ebay
  2. Windows 32 / 64 ADB Drivers
  3. List of tablets powered by Allwinner A10 processor
  4. Allwinner A10 General FAQ (non tablet specific)
  5. Hack A10 Devices
  6. xDev Tutorial, Build AOSP Android 2.3.7 for Allwinner A10 tablets
  7. Some pre-compiled roms to your AllWinner A10 based tablet
  8. Open Source Firmware for the Mele A1000

23 April, 2012

Android issues with WebView.loadData and WebView.getContentHeight

If you tried the suggested code at Stack Overflow on Gingerbread you will see that it still doesn't work when using loadData or loadDataWithBaseURL. The proposed code only works when using the loadUrl - at least it didn't worked on my HTC Desire nor the 2.3.3 Emulator.

In the Andromedev blog you will see one possible solution using the android javascript bridge but I'm not still convinced that this is the best approach to take. Even if you do decide that it's the best approach you will face one bug already reported on Issue 12987 that affects any javascript bridged call on Gingerbread.

Right know I'm developing one pager fragment that uses one webView to display simple html texts and I had disabled the javascript support to try to keep the memory usage low. With the proposed solution I'll have to turn it on again and pray that my user don't use the gingerbread version ...

Well, the point is: IF you are using the WebView.loadUrl AND you are not on gingerbread you don't need to worry, you just need to write a listener - the onPageFinished and all height and width methods will work as expected.

However the code below still doesn't work! The java script bridge call the code in the JavaScriptInterface but the height is not there yet ...

/**
 * To use the webView embedded in another view (not full screen).
 */
public class EmbeddedWebView2 extends WebViewClient {

   private static final String P_MIMETYPE     = "text/html";
   private static final String P_ENCODING     = "utf-8";
   private static final String LOG_TAG        = "EmbeddedWebClientView2";
   private static final String JS_BRIDGE      = "JSB";
   private static final String JS_CONTENTSIZE = "javascript:window." + JS_BRIDGE + ".setContentSize(" + //
                                                    "document.getElementsByTagName('html')[0].scrollHeight," + //
                                                    "document.getElementsByTagName('html')[0].scrollWidth" + //
                                                    ");";

   @Override
   public void onPageFinished(WebView webView, String url) {

      super.onPageFinished(webView, url);

      WebSettings webSettings = webView.getSettings();
      webSettings.setJavaScriptEnabled(true);
      webView.addJavascriptInterface(new JavaScriptInterface(), JS_BRIDGE);
      webView.loadUrl(JS_CONTENTSIZE);
   }

   public static void loadData(WebView webView, String data) {

      webView.setWebViewClient(new EmbeddedWebView2());

      WebSettings webSettings = webView.getSettings();
      webSettings.setSavePassword(false);
      webSettings.setSaveFormData(false);
      webSettings.setJavaScriptEnabled(true);
      webSettings.setUseWideViewPort(false);

      final String dataHtml = "" + data + "";
      webView.loadData(dataHtml, P_MIMETYPE, P_ENCODING);
   }

   public static void loadDataWithBaseURL(WebView webView, String baseUrl, String data) {

      webView.setWebViewClient(new EmbeddedWebView2());

      WebSettings webSettings = webView.getSettings();
      webSettings.setSavePassword(false);
      webSettings.setSaveFormData(false);
      webSettings.setJavaScriptEnabled(true);
      webSettings.setUseWideViewPort(false);

      final String dataHtml = "" + data + "";
      webView.loadDataWithBaseURL(baseUrl, dataHtml, P_MIMETYPE, P_ENCODING, null);
   }

   /**
    * getHeight, getContentHeight and getMeasuredHeight are ONLY updated when
    * using loadUrl that's why we need this guy. 
    * 
    * TODO: wait a fix for ISSUE 12987 on gingerbread.
    */
   public class JavaScriptInterface {

      private int height, width;

      public void getContentSize(String sHeight, String sWidth) {

         if (sHeight != null) {
            width = Integer.parseInt(sHeight);
            Log.d(LOG_TAG, "Result from javascript, height = " + height);
         }
         if (sWidth != null) {
            width = Integer.parseInt(sWidth);
            Log.d(LOG_TAG, "Result from javascript, width = " + width);
         }
      }
   }
}