yashsingh1/xdaforums huggingface dataset:
[Upgrading, Modifying and Unlocking] dolorespark:
Here's v1 of what might be many iterations: triofix-v1.zip [edit: this file has been deleted] The gsensor will probably work (though it may be inverted) but I'm not optimistic about the wifi.

This is definitely a D-I-Y fix. I'll assume you have adb set up and are comfortable using the Win command prompt (if not, we'll deal with it). First, get the zip and unzip it somewhere convenient - later, we'll use the same directory to pull dmesg and logcat logs. You'll find there are two files: 07gsensor and script.bin.

You can perform the following either booted normally or from CWM recovery. If you use CWM, select 'Mounts and Storage' from the main menu, then 'mount system' from the next menu (I'm at work now & don't have my tablet, so I may be off on the menu entry names). If booted normally, you'll have to create a directory in /data or /cache where you can mount the bootloader partition.

To start, open a Win cmd prompt and change directory to wherever the files are. We should only have to install 07gsensor once, so we'll do that first:

adb push 07gsensor /system/etc/init.d
adb shell chmod 755 /system/etc/init.d/07gsensor

Now for the main event! If you're in CWM, we'll use the existing, empty /boot directory to mount the bootloader partition.. If booted normally, substitute the directory you've created (e.g. /data/boot for /boot in the instructions below.

adb shell mount -t vfat /dev/block/nanda /boot
adb shell ls -la /boot
adb push script.bin /boot
adb push script.bin /boot/script0.bin
adb shell ls -la /boot
adb shell umount /boot

At key points, I've included ls -la commands to confirm that the partition was actually mounted and that the files got replaced. If the listing is empty or the file dates/sizes remain the same, then something went awry. Try to identify and fix the problem before proceeding.

At this point you can reboot. Once boot-up is done & you've unlocked the screen, please run this ASAP:

adb shell dmesg > dm.txt

Check out the gsensor and try to connect to your wifi. If the wifi doesn't work, then run this:

adb pull /data/local/logcat.log

Let me know how it goes.

BTW... getting the buttons working correctly may require some major changes - we'll deal with that in "Phase II" of this project.
[Upgrading, Modifying and Unlocking] malmostoso:
Hi Dolorespark,

thank you for your effort! Something went awry in my case, as after the procedure the tablet does not boot up but keeps on cycling between the little android and your splashscreen (the one with the palm tree). I think I followed the procedure correctly (from CWM after mounting /boot) and everything went well:

root@nostromo:/home/jack/Desktop/tablet/wifi_fix# adb devices
List of devices attached
20080411	recovery

root@nostromo:/home/jack/Desktop/tablet/wifi_fix# adb push 07gsensor /system/etc/init.d
22 KB/s (1148 bytes in 0.048s)
root@nostromo:/home/jack/Desktop/tablet/wifi_fix# adb shell chmod 755 /system/etc/init.d/07gsensor
root@nostromo:/home/jack/Desktop/tablet/wifi_fix# adb shell mount -t vfat /dev/block/nanda /boot
root@nostromo:/home/jack/Desktop/tablet/wifi_fix# adb shell ls -la /boot
drwxrwxrwx 6 root root 16384 Jan 1 1970 .
drwxr-xr-x 19 root root 0 Feb 16 21:27 ..
-rwxrwxrwx 1 root root 48680 Jan 22 15:05 boot.axf
-rwxrwxrwx 1 root root 106 Jan 22 15:05 boot.ini
-rwxrwxrwx 1 root root 181168 Jan 22 15:05 drv_de.drv
-rwxrwxrwx 1 root root 344813 Jan 22 15:05 font24.sft
-rwxrwxrwx 1 root root 357443 Jan 22 15:05 font32.sft
drwxrwxrwx 2 root root 2048 Jan 22 15:05 linux
-rwxrwxrwx 1 root root 512 Jan 22 15:05 magic.bin
drwxrwxrwx 2 root root 2048 Jan 22 15:05 os_show
-rwxrwxrwx 1 root root 43000 Feb 5 23:40 script.bin
-rwxrwxrwx 1 root root 43000 Feb 5 23:40 script0.bin
drwxrwxrwx 2 root root 2048 Jan 22 15:05 sprite
-rwxrwxrwx 1 root root 197340 Jan 22 15:05 sprite.axf
drwxrwxrwx 3 root root 2048 Jan 22 15:05 vendor
root@nostromo:/home/jack/Desktop/tablet/wifi_fix# adb push script.bin /boot
631 KB/s (45440 bytes in 0.070s)
root@nostromo:/home/jack/Desktop/tablet/wifi_fix# adb push script.bin /boot/script0.bin
1577 KB/s (45440 bytes in 0.028s)
root@nostromo:/home/jack/Desktop/tablet/wifi_fix# adb shell ls -la /boot
drwxrwxrwx 6 root root 16384 Feb 16 21:29 .
drwxr-xr-x 19 root root 0 Feb 16 21:27 ..
-rwxrwxrwx 1 root root 48680 Jan 22 15:05 boot.axf
-rwxrwxrwx 1 root root 106 Jan 22 15:05 boot.ini
-rwxrwxrwx 1 root root 181168 Jan 22 15:05 drv_de.drv
-rwxrwxrwx 1 root root 344813 Jan 22 15:05 font24.sft
-rwxrwxrwx 1 root root 357443 Jan 22 15:05 font32.sft
drwxrwxrwx 2 root root 2048 Jan 22 15:05 linux
-rwxrwxrwx 1 root root 512 Jan 22 15:05 magic.bin
drwxrwxrwx 2 root root 2048 Jan 22 15:05 os_show
-rwxrwxrwx 1 root root 45440 Feb 16 21:14 script.bin
-rwxrwxrwx 1 root root 45440 Feb 16 21:14 script0.bin
drwxrwxrwx 2 root root 2048 Jan 22 15:05 sprite
-rwxrwxrwx 1 root root 197340 Jan 22 15:05 sprite.axf
drwxrwxrwx 3 root root 2048 Jan 22 15:05 vendor
root@nostromo:/home/jack/Desktop/tablet/wifi_fix# adb shell umount /boot

Is there any kind of log I can take to help you debug this? I will retry tomorrow morning (European here), now it's late and I wanted to give you good news before going to bed but alas...

Thanks again!
[Upgrading, Modifying and Unlocking] dolorespark:
I knew that I should include a step that backed up the existing script.bin - but I didn't :( I'll post the original script.bin that we didn't save so you can get back to where you were (you should be able to get into CMW and restore it from there).

I don't think you can get a dmesg log via adb because adb doesn't start until around the time the boot animation begins. You might try going into CWM and adding a script in the init.d directory like "10dmesg" with contents like "dmesg > /data/local/dm.txt". After you restart normally and the tablet reboots the way you described, power off, then reboot into CWM where you can retrieve the log (if it exists).

Now, some questions: what was the state of your tablet when you applied these changes? Had you reinstalled both the LiveSuite image and the update zip? Had you booted into that setup to confirm it worked OK?

If you're willing to try again, let's split up the gsensor and script.bin fixes so that only one is in place when you boot normally. For example, leave the new script.bin in place, but delete the gsensor script while in CWM, then reboot. If that fails, return to CWM, restore script.bin, and reboot. If that succeeds, you can reinstall the gsensor fix from there & reboot.

The script.bin I posted was largely the one from your GB image with a few additions. On the next try, I'll use the one from my JB images and just add a few things from the GB version. I'd like to get this working...
[Upgrading, Modifying and Unlocking] dolorespark:
I don't know if all CWMs wipe the source partition or just the one that I used. I assumed that behavior was left over from the original recovery code which installed OTA updates from the /cache partition, then did a wipe for "security" reasons. It's a pain...

The driver for the ft5x touchscreen used by that ROM has explicit support for the buttons. It looks in script.bin for entries that identify the X and Y coordinates of the buttons and what each one should do. I haven't seen this in any other ft5x driver I've looked at (not that many, I'd admit). I tried to use the driver but it wan't compatible with the kernel my JB uses. I'll definitely pursue this after we get your wifi fixed because I'd like my buttons to work too (all of mine act as Back buttons).

None of the above :) I got my first tablet in September, then tried to install someone's CM10 in October but failed. Had it worked, I might not be here today but I was determined and got ever deeper into it. In January, I got this Trio A10 and decided that as my "mid-term exam" in Android 101, I'd root it without using anybody's tools or tutorials or whatever. It was really easy.

If I had to attribute my success in passing Android 101, I'd credit two things (in addition to 20+ years programming and generally messing-with computers):

my hex editor - you can't hope to figure out why these screwy drivers don't work unless you can scroll through them and see what parameters and error messages they contain. Then too, sometimes you'll get lucky and find, say, a keycode table that you can change so your Vol+ button adjusts the volume and doesn't act like a Back button.

I almost never ask questions - if the answer is simple, it's much quicker to figure it out then to wait for someone to get around to answering you. And, if the answer is difficult, no one will be able to provide an answer so you'll have to figure it out yourself anyway. So why bother asking?
[Upgrading, Modifying and Unlocking] dolorespark:
I posted triofix-v2.zip [edit: this file has been deleted] to the same folder as the last version. You'll also find scriptbin-jb.zip there which contains the version that was in my original LiveSuite image.

triofix-v2.zip contains two versions of script.bin: one says the wifi is connected to 'usbc1', the other says it's connected to 'usbc2'. If neither work, then it's a driver issue.

Also included is a new, simplified version of 07gsensor. The first version would never have worked because there was a spelling error in the GB version of script.bin. No doubt it worked there because the GB mma7660 driver probably had the same spelling error ("gsenser"). Other drivers spell the word correctly, so the entry wouldn't have been recognized as valid.

Installation is the same as v1. Try the gsensor fix first so that we'll know which file is causing trouble is you get boot loops or other crashes.

Here's hoping...
[Upgrading, Modifying and Unlocking] malmostoso:
I reinstalled the livesuite image and the zip, yes. I had to boot into the system to install Novotools, otherwise I can't get back into CWM.

I'll try the new version of the fixes and let you know how it goes, I thought as well to split the two items. I'll start with the gsensor and then go with the script.bin.

Thanks!

---------- Post added at 09:41 AM ---------- Previous post was at 09:04 AM ----------

OK here we go. I reinstalled the ROM from scratch and first tested the gsensor script: the tablet booted fine but the rotation is 90° wrong: it starts correctly with the landscape screen in the landscape position, then I tilt the tablet to portrait and nothing happens, but when I tilt it back into landscape the screen turns to portrait, and from then it's always out of phase. Disabling the screen rotation in the desired position works fine. In any case, the gsensor script itself is fine, I think.

Then I installed first the script2, since in GB you saw that the usb port used was 2, wifi does not work. I installed script1, and still no wifi. Both logs from dmesg are available here:

https://dl.dropbox.com/u/1127262/dm-script.zip

Please let me know if you have trouble accessing the files. Please note that I am on linux so if you're on Windows the line ends and return carriages might be wrong.

Thanks!
[Upgrading, Modifying and Unlocking] malmostoso:
Make sure that you are in the directory where you have saved the file 07gsensor before you issue the adb command. It simply cannot find the file.
[Upgrading, Modifying and Unlocking] dolorespark:
That ROM has a 'Reboot' app that should work for you.

For most gsensor drivers, this is an easy fix (a change in script.bin) - whether it is for this one remains to be seen.

Sadly, the 'usbc1'/'usbc2' switch wasn't the problem. On your GB ROM, 'usbc2' pointed to the same hardware port that 'usbc1' pointed to on my JB ROM - both were trying to talk to the same hardware in the same place. I included "script2" to see what would happen if the driver tried to talk to whatever is connected to the other hardware port (nothing, apparently).

Could you take a look at your logcat.log for "script1"? Do you see the same kind of errors that kevmodee got?

@kevmodee - thanks for posting that - now I have an idea of where to look next
[Upgrading, Modifying and Unlocking] kevmodee:
I noticed that it said it "faied to read proc/net/wireless" - but that path and item seem to be available from adb shell and I could pull it.

Here is what was in it - but it is read only root root owned.

Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 22

I noticed extra wifi stuff on the GB Rom's init.sun4i.rc too.

on boot
chown root root /system/xbin/su
chmod 6755 /system/xbin/su
chown system system /sys/class/usb_wifi/rtl_wifi/usb_wifi

---------- Post added at 11:01 AM ---------- Previous post was at 10:52 AM ----------

HAHA! Yep malmostoso - I moved everything to a safe folder so I would not copy over the new ones - and then forgot to move it before trying - maybe 1 am was not the best time to be trying this stuff out.

Same results with 90° off.
[Upgrading, Modifying and Unlocking] malmostoso:
Hey there, sorry I totally ignored that part. Yes I have similar messages, you can find the full file here:

https://dl.dropbox.com/u/1127262/logcat.log

This is with script1. If you need the same with script2 let me know!
[Upgrading, Modifying and Unlocking] dolorespark:
@kevmodee, @malmostoso - I've got a minor fix for you. At the same URL as before, I've posted the mma7660.ko from the seby ROM (patched to fix the spelling error I mentioned). It should be compatible with this kernel and should fix the gsensor. Make a backup of the current one, push it into /system/vendor/modules, fix permissions (644), then reboot.

[edit: the file mentioned has been deleted]

Question: have either of you ever gotten wifi working with any ROM other than the GB image you posted?
[Upgrading, Modifying and Unlocking] kevmodee:
The wifi worked out of the box from MacSpeed technologies ICS 4.0.3 (i think) - others here on this thread got their trio's from them too.

The issue was that app store would not work - easiest fix was to get the CM9 or now CM10. With LY-FI compatibilty zip most trio owners got CM9 working thanks to Goes1967 and others digging. Those lucky trio owners did NOT have this particular wifi not working issue "at all".

I did not have the original rom so I had to get the stock chinese roms and none of them recovered the wifi. My guess is that Mackspeed fiddled these ones to work some how. I begged them to sneak out the info onto XDA forum but they did not. They would just send replacements - but once flashed that was not an option.

So us unlucky few have not found ANY other ICS or Jellybean ROMs that have wifi that works. In fact on all Gingerbread ROMs I tried had no sound until this one came with sound and wifi together.

I have probably tried 3 JB's, at least 10 ICS 4.0.3 and 4.0.4 and a few GB's. Some ICS and JB's work really nice just with no wifi.

We (some users on this thread) popped open the hardware and found chip identified as 8188, not 8192 but in software I did not have the knowledge to dig deeper and look at what is actually happening.

I will add links to posts made in this thread and another listing all the hardware details and realtek driver info. Not sure if that is useful when you can get inside the software and see what is happening.

http://xdaforums.com/showthread.php?t=1831257&page=8#72 post 72 and the next few after that listed some chip info.

http://xdaforums.com/showthread.php?t=1863508&page=2#14 post 14 I gave flowish realtek info on the driver but I don't think he ever got around to taking that any further.
[Upgrading, Modifying and Unlocking] malmostoso:
Same story for me, never found another ROM that would have a working wifi apart from that GB image. I wish I took a proper backup!

---------- Post added at 09:54 PM ---------- Previous post was at 09:44 PM ----------

By the way I tried this, didn't seem to make a big difference, apart from the fact that now everything is rotated 180°. Weird :)
[Upgrading, Modifying and Unlocking] dolorespark:
That's what I need to know. To confirm, everything is upside down, both in portrait & landscape, correct?

When the display was 90 degrees off, the X and Y axes were swapped - now they're not. Instead, the X & Y values are inverted (negative values are positive & vice-versa). If the display is upside down, no matter which orientation, I don't have to think too hard, I just have to toggle two values (0->1 or 1->0) in script.bin. If it's only upside down when held one way, then I have to think "is X inverted or is it Y". It makes my head hurt :D
[Upgrading, Modifying and Unlocking] kevmodee:
I will try to test this tonight and post results :)
[Upgrading, Modifying and Unlocking] dolorespark:
One thing that's notable: that GB ROM does not have an 8188 driver, only 8192cu.ko - I guess it supports both chips.

I'm starting to think the problem may not be in the wifi driver but in the kernel's USB support. I compared dmesg output from my Trio with JB and malmostoso's with GB and they were virtually identical. Of particular note was where the wifi driver tells the USB code to enable its port. What follows is part of the USB code's output:

<6>[ 108.460000] sw_usb_enable_hcd: usbc_num = 2
<6>[ 108.460000] [sw-ehci2]: sw_usb_enable_ehci
<6>[ 108.460000] [sw-ehci2]: probe, pdev->name: sw-ehci, pdev->id: 2, sw_ehci: 0xc070604c
<6>[ 108.460000] [sw-ehci2]: open clock
<6>[ 108.490000] [sw-ehci2]: Set USB Power ON
<6>[ 108.490000] sw-ehci sw-ehci.2: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
<6>[ 108.490000] sw-ehci sw-ehci.2: new USB bus registered, assigned bus number 4
<6>[ 108.490000] sw-ehci sw-ehci.2: irq 40, io mem 0xf1c1c000
<6>[ 108.510000] sw-ehci sw-ehci.2: USB 0.0 started, EHCI 1.00
<6>[ 108.510000] ehci_irq: port change detect
<6>[ 108.510000] hub 4-0:1.0: USB hub found
<6>[ 108.510000] hub 4-0:1.0: 1 port detected

When I compare malmostoso's JB output with this, it's identical except for one line that's missing: "ehci_irq: port change detect" I have to wonder if some configuration change is happening that the the driver software isn't aware of, causing it to look for the hardware in the wrong place. I'll pursue this as well as the other leads you've provided and see what it yields.
[Upgrading, Modifying and Unlocking] kevmodee:
Hmmm - nothing to report. I have latest 07gsensor and the mma7660.ko but I have not seen anything new. No rotation at all.

Guessing maybe I did something wrong :eek: My brain hurts too
[Upgrading, Modifying and Unlocking] dolorespark:
Which script.bin are you using? Hard to tell, I know, but it should be script.bin-1 from the v2 fix package.

BTW... malmostoso has Linux installed, do you? If so, I can post the tool that would let you create your own script.bin. Beside getting the gsensor setup correctly, there are other things you could try. For example, you could speed up your Mali-400 GPU by about 12% and see if the system remains stable.
[Upgrading, Modifying and Unlocking] kevmodee:
I have Ubuntu so I can go unixy if need be - I am on Win 7 64 bit normally though. I would try the tool just to see what it can do :)

Probably using wrong script.bin - I will have to reflash and try again.

I went back to GB rom and saw the following on the USB same as you, but only on sw-ehci2

Line 283: <6>[ 0.420000] [sw-ehci1]: Set USB Power ON
Line 315: <6>[ 0.540000] [sw-ehci2]: Set USB Power ON
Line 349: <6>[ 0.580000] [sw-ohci2]: Set USB Power ON

Of the 3 USB ON attempts I see that the EXTRA line is only here on sw-ehci2

<6>[ 0.460000] sw-ohci sw-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
<6>[ 0.460000] sw-ohci sw-ohci.1: new USB bus registered, assigned bus number 2
<6>[ 0.460000] sw-ohci sw-ohci.1: irq 64, io mem 0xf1c14400
<6>[ 0.520000] hub 2-0:1.0: USB hub found
<6>[ 0.520000] hub 2-0:1.0: 1 port detected
<6>[ 0.520000] [sw-ehci2]: probe, pdev->name: sw-ehci, pdev->id: 2, sw_ehci: 0xc070604c
<6>[ 0.520000] [sw-ehci2]: open clock
<6>[ 0.540000] [sw-ehci2]: Set USB Power ON
<6>[ 0.540000] sw-ehci sw-ehci.2: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
<6>[ 0.540000] sw-ehci sw-ehci.2: new USB bus registered, assigned bus number 3
<6>[ 0.540000] sw-ehci sw-ehci.2: irq 40, io mem 0xf1c1c000
<6>[ 0.560000] sw-ehci sw-ehci.2: USB 0.0 started, EHCI 1.00
<6>[ 0.560000] ehci_irq: port change detect

---------- Post added at 08:09 PM ---------- Previous post was at 07:29 PM ----------

Ok - script.bin-1 with mma7660.ko and the latest 07gsensor

Screen appears upside down on all rotations EXCEPT horizontal with power to the right - :eek:
[Upgrading, Modifying and Unlocking] dolorespark:
Ummm... not sure which orientation that is. All the more reason we should "empower" you to fix it :D It shouldn't take you more than 3 attempts: there are only 4 possibilities and the one you have now is wrong. FYI... for no good reason I can see, stock Android won't let you rotate the screen 270 degrees - that's landscape upside down (on mine, with the back/menu/home buttons on the left).

It can be handy for getting gsensors and touch screens working properly - and more dangerously, for adjusting clock speeds and voltages. I'll post it (fexc) tomorrow.

That's because the wifi entry on that ROM points to "USBC2" which becomes hub2, ehci2, etc.; on mine it points at "USBC1", causing all those entries to be labelled with a '1'. As mentioned, both entries point at the exact same hardware port - as you'll see when you start decompiling these script.bin's into script.fex's. Gosh, what fun!
[Upgrading, Modifying and Unlocking] sileali:
trio stealth pro 7" --succes

thank you very much i was looking a lot for this image,, it made my tablet come to life,,used: LiveSuite....than modifing language, than changing the volume keys,, and succes everything work almost ,,,, fine, butbetter than nothing, thank you guys and thank you xda developers
[Upgrading, Modifying and Unlocking] malmostoso:
I'm too much of a battery geek to sacrifice precious lifetime for performance. If anything, I'd underclock it 12% :D

But sure, I can try stuff by myself. In fact if at the end of the ordeal I'd have learned how to back up the whole thing in a Livesuit image it would be pretty swell.
[Upgrading, Modifying and Unlocking] dolorespark:
That's a good attitude because you may need some of those skills.

As I was getting ready for bed at 5am this morning (I get carried away sometimes), I realized that we've been looking in the wrong place. The problem isn't in the wifi driver, or the kernel, or in script.bin - it's probably in one of the bootloader files that initializes the hardware before the kernel is loaded. Right now I'm trying to identify which one, and whether we can replace a single file with one taken from your GB image or we have to replace several of them - with unknown consequences. As soon as I back up my boot partition, I'm going to find out.

More later...