tag:blogger.com,1999:blog-13007612790215767582024-03-13T11:55:21.736+08:00Icenowy's Icy ZoneSome Icy hacks ;-)Anonymoushttp://www.blogger.com/profile/07679553035520478178noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-1300761279021576758.post-16411128593092843302016-11-28T22:52:00.002+08:002016-11-28T22:52:44.845+08:00Allwinner A33 Tablets Hacking Guide (with Mainline Kernel/U-Boot)For any infomation update, please send a mail to me (icenowy@aosc.xyz).<br />
<h3>
Assumptions</h3>
<div>
I will assume that the reader is able to cross-compile a Linux kernel.</div>
<h3>
How to check whether a tablet uses Allwinner A33</h3>
<div>
<ul>
<li>The most exact way, disassemble the tablet, and find a chip with "A33" on it ;-)</li>
<li>Check the "Build Number"(版本号) in "About Tablet" in the stock Android's Settings, if it starts with "aster", then it will mostly be an A33-based tablet.</li>
</ul>
<h3>
Get root permission</h3>
</div>
<div>
<ul>
<li>Usually unbranded Allwinner tablets are shipped with "userdebug" firmware, which by default have adbd running as root. So simply try "adb shell" on a PC first.</li>
<li>If your tablet unfortunately disabled adbd's root permission, you can try a Kingroot. (Although I do not like Kingroot...)</li>
</ul>
<h3>
Prequisites to hack an A33 tablet</h3>
</div>
<div>
<ul>
<li>Prepare a PC with GNU/Linux installed ;-)</li>
<li>Prepare a ARM GCC toolchain. (The Linaro one is Okay. https://releases.linaro.org/components/toolchain/binaries/latest/arm-linux-gnueabihf/ )</li>
<li>Prepare host build environment, and build sunxi-tools ( https://github.com/linux-sunxi/sunxi-tools ) or install it from your distro.</li>
<li>Prepare a reliable Micro-USB cable, and if your tablet come with a dedicated DC power input, you'd better prepare a power adapter for it (as you can use OTG in the same time then).</li>
<li>Prepare a brain that likes hacking ;-)</li>
</ul>
<h3>
Retrieve necessary info from Android</h3>
</div>
<h4>
Run lsmod and detect device by modules loaded</h4>
<div>
Touchscreen controllers:</div>
<div>
<ul>
<li>gt9xx{,f}_ts - Goodix GT9xx touchscreen controller</li>
<li>gslX680{,new} - Silead GSLX68X touchscreen controller</li>
</ul>
<div>
Wireless network adapters:</div>
</div>
<div>
<ul>
<li>8723bs - Realtek RTL8723BS Wireless Network Adapter (SDIO)</li>
<li>8723cs - (usually) Realtek RTL8703AS Wireless Network Adapter (SDIO)</li>
<li>esp8089 - Espressif ESP8089 Wireless Network Adapter (SDIO)</li>
</ul>
<h4>
Retrieve script.bin</h4>
</div>
<div>
On A33 devices, script.bin are usuall not accessible on nanda partition.</div>
<div>
So you must use a dd command to dump it:</div>
<div>
<span style="font-size: small;">dd if=/dev/mem of=/sdcard/script.bin bs=1 count=262144 skip=1124073472</span></div>
<div>
<span style="font-size: small;">Then use bin2fex from sunxi-tools to decipher the script.bin to script.fex .</span></div>
<div>
Some infomation in it may be needed.</div>
<h4>
<span style="font-size: small;">(For Silead GSLX68X touchscreen controller) Retrieve the firmware</span></h4>
<div>
<span style="font-size: small;">Retrieve all the .ko files prefixed with "gslX680" in /vendor/modules .</span></div>
<div>
<span style="font-size: small;">Then use the fw_extractor tool from </span>https://github.com/onitake/gsl-firmware to extract the firmwares from the .ko files.<br />
<h3>
Mainline kernel's restrictions and advantages</h3>
</div>
<h4>
Restrictions:</h4>
<div>
<br />
<ol>
<li>NAND cannot be supported well now. (But if your device uses an eMMC, you still have the opportunity to install Linux to the eMMC. )</li>
<li>Hardware-accelerated video decoding is not yet supported.</li>
<li>More features missing...</li>
</ol>
<h4>
Advantages:</h4>
<div>
<ol>
<li>It's newer.</li>
<li>It can support newer Systemd ;-)</li>
<li>It's more stable.</li>
</ol>
<div>
(NOT FINISHED YET)</div>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/07679553035520478178noreply@blogger.com2tag:blogger.com,1999:blog-1300761279021576758.post-75982387222621431142016-11-28T21:34:00.001+08:002016-11-28T21:35:39.696+08:00My BioIcenowy Zheng, a Grade 2 student @ Sun Yat-Sen University.<br />
<br />
Allwinner fans (as I'm POOR).Anonymoushttp://www.blogger.com/profile/07679553035520478178noreply@blogger.com0