Sunday, October 27, 2019

Pt 1 :: A33 (quad core 32-bit Cortex A7) Allwinner notes

Links: ADB, APK, and ZIP sideloading :: Gadget Hacks :: XDA developers

Must have: a Micro SD card for side loading ROMS. There's no other way.

The Allwinner A33 QuadCore touchscreen tablet anachronisms come straight out of Guangdong. They run $40 on EBay and come preloaded with Android 4.42 (KitKat) and firmware embedded adware. The A33 has (a $4) quad-core 32-bit Cortex-A7 processor and a dual-core Mali-400 MP2 GPU, both are licensed from ARM, and these are built by Onda (v702 or v975).

The tablets feature only 500Mb of working RAM, and 1.2 G of internal storage, half taken with bloatware.

Google, Phone, Linux?

I can't find the SIM installation location or an IMEI. As noted however, it's Android Wi-Fi, so it would seem to do anything a Wi-Fi phone would do, if a person could get it properly configured to detect WiFi. It's not lsusb detected when a USB Micro-B (older Android connector) is attached to the tablet and the opposite USB-A connector is plugged into a desktop.

But is there a Linux distro that runs on it so we can use it as a media player tablet? It has a 3.5mm sound jack.

Out of the box, the tablet is a functional media player. Load media via USB from one's desktop -- the 7" 1024x600 WSVGA display (9" advertised, lol) natively plays MP3's and MP4's rendered as 5:3 WVGA, or WXGA...

Video: h264 (High), yuv420p, 1366x768 [SAR 2048:2049 DAR 16:9], 1096 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)
... typically created by re-rendering video, eg...
$ ffmpeg -codecs [to be certain]
$ ffmpeg -i original.mkv -vn -ar 44100 -ac 2 output.wav
$ ffmpeg -i original.mkv -vcodec libx264 -b:v 500k -s wxga -an output.avi
$ ffmpeg -i output.avi -i output.wav -acodec libmp3lame
-ar 44100 -ab 192k -ac 2 -vol 330 -vcodec copy -b:v 504k wxga final.mp4

Recharge with a standard Android charger. They supposedly take a SIM and phone service if needed. It's extremely slow, even loading a browser page. I believe the limit for SD card expansion is 32GB.

rooting these days (2019)

It's not like it was in years past. The tablets require the hassle of rooting unless you can tolerate malware/adware, but at the same time, these days, we can't easily sideload APK's and ZIPs without tripping SafetyNet (more in this 7:32 video -- TLDR: IP/DRM sewer strikes again) and losing access to much of Google Store. BTW, since one needs to access Onda factory firmware, in order to disinfect it, some custom ROMS might be fun to attempt. Fortunately, the SELinux is natively set as "permissive" (verify with any root validator), which is a start. Still, and even though it's necessary in this case, sideloading undoubtedly carries the complications of 1) signature verification, 2) tablet compatibility, and 3) Google Store risks. Early on, it looked like a new sort of ROM that carefully avoids modifying PlayStore files Xposed, might be the best solution.

some features

type note
Processor Core7 (32 bit) quad core
SoC Sunxi 8i sunxi8i
GPU Mali-400 MP2
/etc/asound.conf alsa config file for pulse
/usr/share/alsa/default.pa change ALSA hooks
/etc/pulse/default.pa change PulseAudio hooks

rooting problems 12+ hours

It's not easy; , many people have problems rooting this tablet. Neither Kingroot, Kingoroot, SuperSu, nor Towelroot could root this tablet. It was also the case that the old version of SuperSu(2.46) blocked installation of the newer SuperSu(2.82), lol. I had to get a special uninstaller, and boot into Recovery Mode, to remove the old SuperSu. This also did not work -- as with all other ZIPs, the installation was aborted.
Xposed also was a failure (screenshot), not even its basic Framework was successful. Meanwhile, from the store, I downloaded the Terminal Emulator for Android (Pavlovich), so that I could at least use the terminal once rooted. But really, I was beginning to think of some ARM version of Linux by this point. Eg, I located an ARM Arch port, and they had some Onda compatibility, but only the 2 core version of the ARM7 was available. The other interesting look might have beeen the Android Pi with GAPPS, since there are apparently getting to be many AOSP ROMS out there, if the A7 can run any of them.

wine and iRoot

I found a post from a person who successfully rooted this tablet. He wasn't confident about the process, he knew he used iRoot, a Windows based PC app, with a USB connected to the device. Unfortunately, USB device connections are one of the largest shortcomings in Wine(2015). If you've seen Chris Titus' video on Garmin software (11:45), you know he's good with these kinds of environments, so I went to his web-pages about it. I ultimately used an Arch configuration (I describe it here) underwritten with his knowledge. In short:
1) Recovery preliminary -- to kill the ad and stealware.
  • Tablet: settings -- enable developer USB connections and security
  • Tablet <-> PC: physically connect USB cable.
  • PC: digitally establish a USB connection. Suggest CLI, eg simple-mtpfs --device 1 ~/mnt
  • PC -> Tablet: transfer the ZIP file (eg, ROOT_Limpieza_Logo_V3.zip) onto whatever tablet SD card
  • Tablet: Settings -> Backup & reset -> Recovery Mode and reboot into recovery mode.
  • Tablet: select the ZIP file and reboot
The option will also appear to use either Launcher or Nova Launcher, of which Nova Launcher is apparently the lighter.
2) Install APK -- for root binary, others.

screenshot

Power and Volume Down buttons simultaneously.

disable gmail

you have to disable this or it will be downloading messages to your phone.

browser viruses and notifcations

Try to modify the stock browser google's instructions.

auto-mount connection

Requires writing a udev rule specific to the device.
  1. I get a better result with USB debugging (Developer options) turned on
  2. Put the device in file transfer mode, not just charging
  3. arrange the system as described below
I recommend this, in concert with mtpfs, a fusermount, (NOT gvfs) library way to mount. It also includes the utility mtp-detect. With a rule in place, the Onda always mounts. The rule-writing steps are described well in this Ubuntu post. For the Arch case...
$ lsusb |grep Onda
Bus 001 Device 032: ID 1f3a:1007 Onda (unverified) Android
... then take the bus and device and determine what the kernel calls them...
$ udevadm info --query=path --name=/dev/bus/usb/001/032
/devices/pci0000:00/0000:00:12.2/usb1/1-3
$ udevadm info --export --query=property --path="/sys/devices/pci0000:00/0000:00:12.2/usb1/1-3"
...
ID_MODEL='Android'
...
ID_MODEL_ID='1007'
...
... then create the rule, in /etc/udev/rules.d ...
# ONDA A33 - MTP mount & unmount rules SUBSYSTEM=="usb", ATTR{idVendor}=="1f3a", ATTR{idProduct}=="1007", MODE="0666", OWNER="your-login" ENV{ID_MODEL}=="Android", ENV{ID_MODEL_ID}=="1007", ACTION=="add", RUN+="/usr/bin/sudo -b -u your-login /usr/bin/go-mtpfs -dev=1f3a:1007 -allow-other=true /media/Nexus_4" ENV{ID_MODEL}=="Android", ENV{ID_MODEL_ID}=="1007", ACTION=="remove", RUN+="/bin/umount /media/Nexus_4"

Sunday, October 20, 2019

[solved] Nougat (Android 7) - USB options selection

In Android 7, the USB notification is sometimes available in the shade, but other times it doesn't appear. This is because some USB -> Micro USB (Android port) cables will only charge. If the cable has the capacity to transfer data, the options will appear pulling down the shade.

After tapping, the options appear, of course, as we see in the second screenshot.