Pages

Friday, April 1, 2016

Adding a system app permission to a normal Android app using adb command

If you still don't have the source codes of your target Android image. This method helps (for me) in checking if your app will work when it becomes a system app.

Very simple, just type this command: adb shell pm grant <package> <permission>
e.g. adb shell pm grant com.sample.proj android.permission.DUMP

Thursday, October 3, 2013

Changing Activation Key in Windows 8

1. Press [Window Key] + R
2. Type: slui.exe 3

Note: [3] in slui.exe is included
Now you can change your Activation Key!

Friday, May 31, 2013

Debugging through your Android Phone

NOTE: I'm using Ubuntu 10.04 as my development PC

OK Let's start!

First, make sure your phone's "USB Debugging" is enabled.
To enable "USB Debugging":  go to Settings->Developer Options



If you don't have this, go to Settings->Applications->Development, and a list will be displayed, then find USB Debugging, and enable it.
After enabling it, connect your phone to your PC.

When your phone is already connected to your PC:
  1. Press Ctrl+Alt+t to run the Terminal.
  2. Type lsusb to list the connected devices. Then find your phone and copy its ID.
  3. In my case, I will only note/copy 24e3
  4. Then type su to be a root user. You'll know that you are a root because $ sign will be replaced by a # sign. In my case, it's: rickimaru@RickiMaru:~$ to rickimaru@RickiMaru:~#
  5.  After this, type cat > /etc/udev/rules.d/51-android.rules
  6. Then type: SUBSYSTEM=="usb", ATTR{idVendor}=="<id>", MODE="0600", GROUP=="plugdev"
  7. In my case, <id> = 24e3. So, this sould look like: ATTR{idVendor}=="24e3"
  8. Then press Enter
  9. After that, type: chmod a+r /etc/udev/rules.d/51-android.rules
Then you're done!

How to install git in Ubuntu

Press Ctrl+Alt+T to run Terminal
Then type:
  1. sudo apt-get install git
If the above command errors...
Follow the next steps:
  1. wget http://kernel.org/pub/software/scm/git/git-1.8.3.tar.gz
  2. tar -xvf git-1.8.3.tar.gz 
  3. cd git-1.8.3/
  4. sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
  5. make prefix=/usr/local all
  6. sudo make prefix=/usr/local install

Thursday, May 23, 2013

Install Linux using bootable USB drive

  1. Download the .iso file of your favorite Linux distro
  2. After downloading the .iso file, install UNetbootin (http://unetbootin.sourceforge.net/)
  3. Run the UNetbootin after installing it then follow the image shown below:
  4. Press OK, then wait for it to finish. NOW YOU HAVE BOOTABLE USB DRIVE.
  5. When it is finished. Restart your computer and enter BIOS setup.
  6. Go to the "Boot" tab and select "Boot Device Priority"
  7. Make your USB drive the 1st Boot Device
  8. Then, press F10 and select "Yes" to save it's configurations
  9. It will restart again. Just wait for it and it will boot using your USB drive.
CONGRATULATIONS!!!

Tuesday, May 21, 2013

Android x86: setting-up IP Address using command line

Press Alt+F1 to go to the command line
For your IP, type:
ifconfig eth0 <ip> <netmask>
ex: ifconfig eth0 192.168.179.165 netmask 255.255.255.0

For your GATEWAY, type:
route add default gw <gateway> dev eth0
ex: route add default gw 192.168.179.202 dev eth0

For your DNS, type:
setprop net.eth0.dns1 <dns>
ex: setprop net.eth0.dns1 192.168.179.99

Lastly, your PROXY:
sqlite3 /data/data/com.android.providers.settings/databases/settings.db
INSERT INTO system VALUES(99, 'http_proxy', '<proxy_server>:<port>');
ex: INSERT INTO system VALUES(99, 'http_proxy', '192.168.179.202:3128');