Friday, April 27, 2018
HaiPad M701-R Firmware & Hacks
I bought a "Haipad" M701-R back in 2010, shipped directly from Shenzhen China, about a month before even the Samsung Galaxy Tab 7.0 was available. For a no-name Android tablet it turned out to be surprisingly well built. As I write this in April 2018 it's usefulness isn't so great, but it still works!
I used to run a user group over at AndroidTablets.net for this tablet. But during one of the redesigns of their website the user groups were apparently eliminated - along with all that collected knowledge. Now, only those things that were copied into the public forums survive...and what I archived offline.
I strongly recommend you use the custom MalaRom firmware on this tablet! It is superior to any of the stock ROMs, 1.1.0 is already rooted and tweaked, and there is also an optional pack of drivers for almost any USB device Linux supports that will make the micro-USB port a lot more useful. You can get MalaRom builds here:
http://www.michel-lange.net/tcc/
Be aware that Haipad sold this exact model number in both 2GB and 4GB versions with Samsung, Hynix, or Micron flash storage - so make sure you grab the correct version! The ZIP should also contain the FWDN firmware flashing app (but it's Windows only).
If you're running one of the stock firmwares (there were about a dozen releases) you'll probably need to root and hack it. I've collected all the useful hacks for the Haipad M701/M701-R in one place so you don't have to hunt for them.
USING ANDROID DEBUG BRIDGE (ADB)
You will need the Android SDK from Google for these, so go get it here: http://developer.android.com/sdk/index.html
If you are using Windows you need to also get the USB Driver: http://developer.android.com/sdk/win-usb.html
HACK DRIVER android_winusb.ini FILE
You may have a problem getting the ADB Driver to connect to your tablet. That is because the drivers from Google only support a small list of devices (all phones) and you need to add your tablet to that list!
1. Copy one of the existing sections with two parameters something like this:
;Moto Sholes
%SingleAdbInterface% = USB_Install, USB\VID_22B8&PID_41DB
%CompositeAdbInterface% = USB_Install, USB\VID_22B8&PID_41DB&MI_01
2. Paste it in between a couple of the other entries
3. Change the device name (";Moto Sholes" in my example) to ";Haipad M701"
4. Go to the device manager
5. Double-click on ADB (which should have an question mark next to it).
6. Select details.
7. From the dropbox select “Device Instance ID” and copy the VID and PID
8. Paste the VID & PID values into the entry you created
9. Either reinstall or update the driver
10. Open Console, cd to the SDK /tools folder and type "adb devices" (without the quotes) - your device should now show up as connected. However it may show it as a gibberish-looking device ID instead of the name, which is normal. I start every ADB session by first checking that I can connect to my device.
Things to keep in mind!
1. Back up your tablet if you can, any little mistake in ADB could brick it!
2. You MUST have changed directories into the SDK /tools/ folder to run ADB
3. When PUSHING files the first path is referring to your desktop computer, 2nd to the tablet
4. When PULLING files it's the other way around (and it has to be a directory you can write to)
5. You type [B]adb.exe[/B] on Windows and [B]./adb[/B] on Mac & Linux
6. The "#" hash sign indicates the shell prompt on the Android tablet, don't type it in.
ROOT YOUR TABLET
You need the "su" and "SuperUser.apk" apps. SuperUser.apk is available from Market. Google for "su" or download it from http://bit.ly/su2361ef (this may only be for Eclair, I'm not sure).
adb shell mount -o remount,rw /dev/block/mtdblock3 /system
adb push su /system/bin/
adb shell chmod 4755 /system/bin/su
adb push Superuser.apk /system/app/
adb shell reboot
Once Rooted, on the device you can enter the following in a terminal app to get "write" access to the file system:
mount -o remount,rw /dev/block/mtdblock3 /system
REMOVE CELL STANDBY SERVICE
A tablet is not a phone. It doesn't have a cell radio. Yet if the OS thinks it's a phone (because it is a phone OS) the cell standby service can drain your battery. Best to get rid of it:
adb shell mount -o remount,rw /dev/block/mtdblock3 /system
adb shell mv /system/app/Phone.apk /system/app/Phone.OLD
adb shell mv /system/app/TelephonyProvider.apk /system/app/TelephonyProvider.OLD
adb reboot
(This technically doesn't remove it, you can always reverse the process and change the .OLD back to .apk and it will restore them - so it's easy to undo). I just did this myself so I'll have to update this post when I know how much (if any) extra battery life I got out of it.
Also, put your tablet into "Airplane Mode" (Settings>Wireless>Airplane Mode) and turn off GPS (Settings>Location & Security>Use GPS satellites) since the tablet doesn't have a GPS module either. Turning these things off can also help improve battery life, and you can still enable Wi-Fi while Airplane Mode is on. You won't, however, be able to use Google Maps or Latitude - they require the GPS option be checked even if there isn't actually a GPS module and the apps are using wireless networks to find your location.
REMOVE EOE MARKET APP
If you don't intend to ever use the EOE Market for apps you may just want to get rid of it. Here is how to do that:
adb remount busybox
adb shell
#rm /system/app/eoemarket.apk
#cd /system/bin
#sh pm uninstall com.eoeandroid.market
#sync
#exit
adb reboot
ABOUT GOOGLE APPS (GAPPS)
I've never been clear on whether Haipad paid the license to include Google's apps on this tablet or not, but the real problem is that Google Play Services, Play Store, Maps, etc. continue to increase inside and are very, very bloated compared to the versions originally installed on this tablet. If you have the 2GB version of the tablet you probably won't be able to install anything else if you update the Google Apps to their last compatible versions.
Therefore I would recommend you de-Google-ify this tablet entirely and either download apps via the browser from some trustworthy website providing APK files (I would suggest https://www.apkmirror.com) or side-load the apps to the device instead.
UPDATE GOOGLE MAPS
You may have already found out you can't update Google Maps. You first need to get rid of the pre-installed one:
adb remount busybox
#rm /system/app/Maps.apk
#cd /system/bin
#sh pm uninstall com.google.android.apps.maps
#sync
#exit
adb reboot
Now, go to Market and install the current version of Google Maps. The newly installed one will be able to update normally.
Again, though, I'd recommend just uninstalling it and not reinstalling it at all. This tablet doesn't HAVE a GPS chip in it, so the usefulness of the Maps program is questionable.
CHANGE BUTTON LAYOUT
I don't really advocate you do this, but some people want the buttons to do other things or want to swap around which button does what.
I should start by mentioning there is one button alteration you can make without hacking system files or even needing a rooted tablet!
If you have the app "SpareParts" (either the ad supported or sdk version) on your tablet go to the "End Button Behavior" setting. You can change the behavior of the Top Left button to either "do nothing" (why?), "Go Home," "Sleep" (what it is already set to), "Go Home and then Sleep."
Now, if you want more control than that there are apparently TWO different files you have to change to reassign all three buttons:
/system/usr/keylayout/qwerty.kl
/system/usr/keylayout/telechips_keypad.kl
Just pull those with adb to your desktop, MAKE BACKUPS, and open them in a text editor.
The magic key scancode values are:
107 = Top Left
139 = Top Right
158 = Front
Some guides I found said you only need to change the first one, but to get it to work I had to change values in BOTH files so they matched.
As for changing short press and long press values, the long press functions are kind of paired up with a short press one as follows:
HOME | RECENT APPS
CALL | VOICE DIALER
SEARCH | VOICE SEARCH
MENU | SOFT KEYBOARD
SLEEP | SHUTDOWN (actually ENDCALL=SLEEP on this tablet)
So what you do is assign the short press function to a button and it automatically assigns the matching long press function as well. I found out that since Android 2.0 this isn't actually "hard coded" behavior, it can be programmatically over-ridden so apps can change what the buttons do while the app is in use. But if you want to change the default behavior to what you suggested it requires editing Framework files to change the pairings - which I'm not comfortable messing with.
So what I did was found the following lines in each .kl file:
key 107 ENDCALL WAKE_DROPPED
key 139 MENU WAKE_DROPPED
key 158 BACK WAKE_DROPPED
and changed them to:
key 107 MENU WAKE_DROPPED
key 139 HOME WAKE_DROPPED
key 158 BACK WAKE_DROPPED
Then I saved the files and pushed them back to the tablet with adb and rebooted.
In case you're wondering (I know I did) what the heck the "WAKE" and "WAKE_DROPPED" flags are all about, they refer to what happens to a button call when the device is already asleep. Does it wake up and send the command or does it wake up and drop the command? Most keycodes appear to be the latter.
Now the top left and right buttons actually match the little icons printed by them. But this creates a new problem - there's no button to properly shut the tablet all the way down! The easiest solution I could think of was to open a terminal and type:
reboot -p
Which, sure enough, shuts the tablet down instantly. The only way to turn it back on is to slide the on/off switch from off and back to on, which immediately begins booting the tablet BUT ONLY IF IT IS CONNECTED VIA USB TO THE DESKTOP! So if you make this hack you will only be able to let your tablet go to sleep when it's disconnected from the desktop.
Thankfully any button will wake it up if it goes to sleep. So it's just the shutdown that is annoying. If you want to put your SLEEP/SHUTDOWN back in just assign "ENDCALL" to your button of choice.
That's all there is to it!
Reference: http://www.androidtablets.net/forum/telechips-based/2212-need-help-rooting-changing-button-layout-m701-r.html#post12782
CHANGE REMOTE CONTROL BUTTON LAYOUT
If you have a M701-R and want to play with changing the button assignments on the Remote Control you can do that to:
pull /system/usr/keylayout/telechips_remote_controller.kl
save a backup copy. Open it in a plain text editor.
The currently assigned values will tell you which button goes with which number, for example here is my stock file:
Code:
key 1 POWER WAKE
key 2 MUTE
key 3 MEDIA_REWIND
key 4 DPAD_UP
key 5 DPAD_DOWN
key 6 DPAD_LEFT
key 7 DPAD_RIGHT
key 8 DPAD_CENTER
key 9 BACK
key 10 MENU
key 11 HOME WAKE
key 12 VOLUME_DOWN
key 13 VOLUME_UP
key 14 SEARCH
key 15 MEDIA_PLAY_PAUSE
key 16 MEDIA_PREVIOUS
key 17 MEDIA_NEXT
You can assign any valid values to those buttons, just like the hardware buttons. Might be confusing given how they are labeled on the remote, but if you're the only one using it you can customize the layout however you please (YAY!)
On a related note there is also an Audio/Video Remote Control Profile file (AVRCP.kl) which defines some remote control media operations. These are typically associated with Bluetooth devices (such as a set of headphones with ff/play/rw buttons) but is not limited to Bluetooth devices. These settings are repeated at the end of the the "telechips_keypad.kl" file, so I'm assuming if you change it in one you have to change it in the other for the new settings to take effect. I don't know, however, if these settings are for the tablet as a "control" or "target" device ("control" means the tablet controls other A/V devices, "target" means other devices control A/V on the tablet). It's also possible that this file is intended for Bluetooth devices, which this tablet can't actually use. If anyone wants to play around with the AVRCP stuff and find out you're welcome to it.
As long as I'm digging deep into the key layout files I may as well mention the "h2w_headset.kl" - it only has one button defined in it for a wired headset with a "call" button, which should wake up the tablet. I don't have a phone headset like that so I can't see if it works, but in theory you could assign the button to do anything you wanted.
Reference: http://www.androidtablets.net/forum/telechips-based/2212-need-help-rooting-changing-button-layout-m701-r.html#post21977
FORGOTTEN SCREEN LOCK PATTERN RESET
If you have already set up a Google Account on your tablet and locked yourself out by forgetting the unlock pattern you should be able to get back in by attempting patterns six or more times in immediate succession - after which it should ask you to enter your Google Account (remember to put the @gmail.com on the end!) and let you in. There is also an Unlock Page: https://www.google.com/accounts/DisplayUnlockCaptcha for Google Accounts (I don't personally know exactly how this works) but it's supposed to be an alternative if the device isn't asking for your account info.
Despite the fallbacks/safeguards it is still possible (especially on unofficial/unsupported devices like our tablets) to be locked out. This is also the case if you bypassed the Google Account setup and subsequently locked yourself out of the tablet, which would have no Google Account associated with it yet. Here is the possible fix over ADB (no guarantees this will work for you though):
1. Plug the tablet into the computer via USB and turn it on/boot it up.
2. Open a Terminal/Console and change directories to your Android SDK /tools/ folder.
3. Enter ADB commands.
adb -d shell
# sqlite3 data/data/com.android.providers.settings/databases/settings.db
sqlite> update system set value=0 where name='lock_pattern_autolock';
sqlite> .exit
# exit
adb reboot
If all went well the tablet should now boot WITHOUT the pattern lock enabled!
It will probably ask you for account info again like the first time it was booted. You can bypass that by pressing in all four corners in sequence upper left, upper right, lower right, lower left (if I recall correctly). Once into the tablet perform an actual factory data reset or it will pester you for setup info EVERY time you boot it. Go to Privacy>Factory Data Reset>Reset
Last resort is to reflash the tablet firmware, which will wipe out whatever is on it and let you start fresh.
WILL THERE BE FUTURE UPDATES?
No. Most of the no-name Chinese tablets had little to nothing in the way of customer or software support after the sale. The Haipad was the exception, by providing about a dozen firmware updates before they ended support. Unfortunately Haipad ran into the same problem as custom firmware developers did - the South Korean chip maker Telechips wouldn't release their source code, so nobody could cook up any firmware for a later version. Ok, I take that back, they did ultimately release the source code for a Honeycomb kernel on that chip, but nobody was ever able to successfully build from that source. And it took a massive e-mail campaign and complaints about them not abiding by open source rules to get them to release anything.
So the lowly M701 tablets are forever stuck on Android "Gingerbread" and of the ROMs for this tablet the MalRom custom firmware remains the best.
WHAT GOOD IS THIS THING ANYWAY?
Well, the screen on it is pretty low-res but it doesn't hurt your eyes with terrible contrast or abysmal viewing angles, so it's ok as an e-reader, or for checking your POP/IMAP email, webmail, some web browsing (keeping in mind the browser is badly outdated and never got security patches). It streams audio and video pretty well (considering it only has a 802.11/g wifi chip in it) and plays audio and video files from a micro-SD or USB flash drive quite well. Combine that with the full high-def HDMI output and the infrared remote, and it's an okay way to get some digitized movies up on a TV screen without having to muck about with Airplay or Chromecast or Miracast.
The resistive (rather than capacitive) screen means you can use it with gloves on. You can use any pointy thing as a stylus on the screen. I used to have a sketching app called "Maple" on it and, so long as you're not expecting pressure sensitivity, it was ok for dashing off quick drawings.
What it's good for depends on what uses you might have for it, and what compromises you're willing to accept. ;)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment