Wednesday, May 7, 2014

How to Auto Start Android Tablets/Phones On Power Connection


We've been to a situation where we need to turn on our tablets when the power source is connected, need to research a lot and here is the way how I met the objective:-

1. Root your phone/tablet, we were using GALAXY Tab 3 hence i used the following post to root the tablet

http://dottech.org/149779/how-to-root-samsung-galaxy-tab-3-7-0-wifi-sm-t210-sm-t210r-and-flash-twrp-guide/


2. Connect the tablet to the PC via USB, i am assuming you have adb drivers installed.

3. run "adb shell"

4. remount your file system " mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system"

5. make a file named as "playlpm" having the following contents only. 

#!/system/bin/sh 
/system/bin/reboot
Make sure you make it in linux please otherwise you will also waste an hour like me

6. Put this file on desktop or where ever

7. Open "cmd" and write "adb put playlpm /sdcard/playlpm", this send the file to the sdcard of your tablet/phone

8. From the first cmd (as of step 3) write following commands
su
cp /system/bin/playlpm /system/bin/playlpm-original
mv /sdcard/playlpm /system/bin/playlpm
chmod 0755 /system/bin/playlpmchown root.root /system/bin/playlpm

9.  You are done now run playlpm once and it should reboot your tablet
/system/bin/playlpm

You tablet should reboot

Now as a test power off your tablet and just connect the power and it will fist show a battery icon for 4-5 seconds and your tablet gets started....


Good Luck ! 





Friday, January 10, 2014

Stuck with 

1. deadlocks
2. concurrent inserts
3. insert updates and select on single table from multiple sources?


Read this for comprehensive understanding




Thursday, July 18, 2013

Setup ADB on TCP/IP Rooted Device

From Your Device, if it is Rooted

You can enable ADB over WiFi from the device with the commands

setprop service.adb.tcp.port 5555

stop adbd

start adbd

And you can disable it and return ADB to listening on USB with

setprop service.adb.tcp.port -1

stop adbd

start adbd

Tuesday, July 16, 2013

Android Studio Gradle doesnt work after update , Gradle 0.4.0

Project is using an old version of android gradle plug-in. The minimum supported version is 0.5.0

Step 1: Change line in build.gradle from:

dependencies {
    classpath 'com.android.tools.build:gradle:0.4'
}
to
dependencies {
    classpath 'com.android.tools.build:gradle:0.5.+'
} 

Step 2

: In the <YourProject>.iml file, delete the entire<component name="FacetManager">[...]</component> tag.

Friday, February 8, 2013

Erratic Touchscreen Solution (Chinese Android Tablets)

Hi

Just wanted to share my experience with Chinese Android tablets with erratic touchscreens. Although the touch screens are erratic but you can handle the erratic touches in your APK. The conclusion of the research is once you "Touchdown" and keep it down there will be number of other erratic touch downs and up's at different locations and then when you finally release your finger you will have a "Touchup" of your original press.

The point is that you need to use the last touchup.. Which you can simply find by the following algorithm

make a counter

int touchCounter=0;

On Touchdown() ---> counter++;

On Touchup()
             ------> counter--;
             ------> if (counter==0)
             ------>          doWhatEver();
             ------> else
             ------->          return false;

All of this will go in your button press events for touchdown and touchup... dont use Clicks... you need your code to work on touch up....

Let me know if you have any questions or comments...


Regards
Umer
http://www.stickpos.com



Tuesday, January 3, 2012

Query to search text In Triggers (SQL SERVER)

SELECT OBJECT_NAME(id)
FROM syscomments
WHERE [text] LIKE '%your_search_here%' AND OBJECTPROPERTY(id, 'IsTrigger') = 1
GROUP BY OBJECT_NAME(id)

Friday, September 2, 2011

ODBC FOR 32 BIT

In order to make dsn on 64 bit machines for vb6 and win32 projects you should use the following line to open the odbc...

c:\Windows\SysWOW64\odbcad32.exe