• HomeBoards
  • RulesRules
  • HelpHelp
  • WikiWiki
  • Donate

Author Topic: [EXPERIMENTAL] Android 7.1 for GPD XD  (Read 68365 times)

phh (OP)

  • Posts: 22
[EXPERIMENTAL] Android 7.1 for GPD XD
« on: September 25, 2017, 11:06:11 am »
Hi all,

Here is an Android 7.1 for GPD XD:
- v4 https://we.tl/QZVjd1QWe8 (see #3 for older versions)
- Play Store: https://we.tl/yzZZ2mKb27 run install.sh (linux-only script, sorry)
Kernel source: https://github.com/phhusson/linux/tree/gpdxd-rk3288-7

Please note that this is HIGHLY EXPERIMENTAL.
Many things are not working, and I don't expect this ROM to be usable for day-to-day.

Things that work:
- Vulkan
- Adoptable Storage on microSD
- Audio out
- ...

Things that don't work:
- No Gamepad mapping tool
- DDR scaling

Known quirks:
- Bootloader doesn't support the screen, so you'll most probably see weird images at boot.
- WiFi doesn't survive a suspend, you need to reboot after a suspend to get Wifi back
- Sometimes the screen doesn't power up, though the backlight does. Don't worry, unplug your GPD XD, power it off for 30s, and power it back on. It should be good now.

ChangeLog:
v4:
- Enable suspend

v3:
- Fixed power button
- Fixed audio output (speaker and headphones)
- Forced permanent wake lock. No suspend, but no suspend crash either
- Fixed battery gauge

v2:
- Works on legacy flash tool
- LCD fix
- 1GB /system instead of 2GB

Have fun! And if you find this useful, tell me, so I keep working on it :)
(Also I'm curious about the usage of Vulkan, I haven't seen much except demos, so if it's useful for you, please tell!)
« Last Edit: October 17, 2017, 10:05:07 pm by phh »

tiagao_extremo

  • Posts: 744
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #1 on: September 25, 2017, 12:24:10 pm »
That was quite unexpected. I hope you will keep working on it. Congratulations!

phh (OP)

  • Posts: 22
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #2 on: September 25, 2017, 11:04:41 pm »
Ok, this behaviour means you need a more recent rockchip flashtool. (like one which is able to flash an rk3399 should be good)
I can make an image which works with older versions of rockchip flashtool, but it makes the image bigger, takes more time to flash, ...

CommanderKitler

  • Posts: 115
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #3 on: September 25, 2017, 11:09:16 pm »
I don't know what this version is supposed to do but it just turns GPD into a brick at this point.

This person just registered and made 1 post. Very suspicious. I installed just to test it out and it doesn't load at all. It almost seems like that is the sole purpose of it. I get an image saying "erasing" with some sort of progress wheel.

I have flashed my gpd at least 200 times in the last month so this was just once more.

So until this guy elaborates on the firmware I do not suggest anyone installs. Just my opinion.

Yeah thats really fishy  :( . Still wouldn't write it off as a hoax. Take a look at his github: he forked the rk3288 branch of the linux kernel and made some significant changes/additions to it (over 1000 lines of code, 8 commits in 2 days) for XD button support, power supply driver, the XD's panel etc. some of it looks like some of it's derived from skeltons kernel. He even took the time to add a GPL2 license to the code.I'm not a kernel-dev but what i've seen of the code looks pretty legit. That seems like a metric ****-ton of work just for a hoax.

Take a look for yourself:
https://github.com/phhusson/linux/commits/gpdxd-rk3288-7

Also this github account wasn't created yesterday. He has been actively contributing to projects github since 2008 and has been a developer on the XDAndroid project back in the day ( a project aiming to port android 2.3 to phones shipped with windows mobile 6.X).

This probably is the real deal.

I'll see if I can get it to run on my XD but I first need to install a custom recovery and back up my existing rom. Took me forever to get it running exactly the way I want it and I don't wanna have to set-up everything all over again.

CommanderKitler

  • Posts: 115
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #4 on: September 26, 2017, 12:50:42 am »
I used RockchipBatchTool 1.8 which I think is the latest. Maybe I can use RK3xxx to repack it and try again.

As soon as I'm done backing up my stuff I can try flashing it with the upgrade tool for linux maybe that works.

Quote
If you want to change to ext4 version let me know. (it's easy) You can basically reinstall Legacy as an update and it will just change it with no changes to user data. Then you can flash twrp. Flashing recoveries takes like 2 seconds.

Just cause I like twrp better hehe.

yup I too prefer TWRP and ext4 is also pretty good to have. (ext3 is pretty old and ext4 has been the standard in linux for a while)

CommanderKitler

  • Posts: 115
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #5 on: September 26, 2017, 02:47:54 am »
This is just to be super safe.

1.) Install CWM and make a CWM NandBackup.
2.) Install GPD Stock Recovery ( return old recovery )
3.) Grab the file from here and update your gpd. ( Link )
4.) Install TWRP then make a TWRP backup.

** Make sure to grab the same Legacy Version you have now. 1.8, 1.6, 1.4. They are all updated to ext4.

You should have Legacy Rom in ext4. under Build info you should see the (ext4)



Quote
Ok, this behaviour means you need a more recent rockchip flashtool.

I tried AndroidTool_v2.38 and that didnt work either. Black screen

I was able to get into recovery. Tried a factory reset and nothing. I noticed the power button thing. I was able to nav with vol+ and vol- and holding them both down selects. Dunno if that is of use to you.
** nevermind I just read the recovery screen. It's the longpress that selects.

Too late dirty flashed the ext4 firmware and then twrp worked fine.

 After waiting for the backup I did a lowflash to wipe the nand and then an upgrade flash to install the fw with linux rockchip upgrade tool. getting the same result as PsyOps boots into black screen. Same with the recovery but after waiting 10 minutes it printed some errors, wiped data and cache and then started the recovery. After rebooting into windows to check if it will work with the batchtool, windows recognized the device and installed adb drivers but the device isn't recognized by adb.exe so no logcat for us   :(

i'll flash it again with batchtool and if that won't work I'll go back to legacy for the time being.

CommanderKitler

  • Posts: 115
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #6 on: September 26, 2017, 03:10:09 am »
I just unpacked that update.img and it contains uboot (rockchip open source bootloader found on tvboxes for instance) and I remembered this:

The bootloader in rk3288 tablets is different from rk3288 tvboxes. If you flash the wrong bootloader from a tvbox you will brick it. Unfortunately, bootloader is close source, so nothing you can do. You would also need to make a ramdisk for linux, the one included in the xd won't work. But you don't.miss anything, i have run ubuntu in a tvbox and runs very poorly, bad performance and bad GPU Support, so cannot be used to emulate anything better than Android.

The bootloader in the xd is the allminiloader versi?n 2.2.5

So... wrong bootloader? would explain why it won't boot at all. Allthough the image also contains the miniloader.
seems I'm on the wrong track.

Almost forgot, Commander flash this zip : http://www.sectioneight.net/s8files/gpd/tools/TWRP-theme.zip

It will fix the twrp resolution. It will make a folder on your sd card and save it there: /TWRP/Theme I think.
cool I'll remember that when flashing back to legacy

UPDATE: well strike that. repacked the firmware and flashed and now the XD seems completely FUBAR. won't boot up, won't get into recovery, cannot get into flashmode - completely hardbricked. something must've gone really wrong. Maybe I can find a way do get into maskrom mode and fix it, if not I got a nice paperweight.
« Last Edit: September 26, 2017, 03:40:55 am by CommanderKitler »

CommanderKitler

  • Posts: 115
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #7 on: September 26, 2017, 04:16:05 am »
What exactly did you do?

Maybe the battery drain method could save it.


Well I unpacked the update.IMG and then repacked it using imgrepackerrk and then flashed it again with androidtool 2.3(seems i've messed something up there)  . flashed without problems and bam: green led of death. thought to myself "ok no biggie just power down, press vol+ and plug back in" and green light again. darn. kept it connected to the pc and pressed vol+ and power and got a green light again. vol- and power; green light. hooked up to the power adapter; green light. looks pretty bad, bricked a lot of android devices in my days and recovered all of them but this looks pretty bad. I doubt that draining the battery will do much in this case and that could take a while with nothing going on in the device except a green led glowing.

Also my pc doesn't recognize it at all. It's not even showing up in the device manager.

UPDATE: looks like some files got mixed up when I unpacked the legacy rom to compare it so it has probably has the wrong bootloader now. mea culpa. thats pretty much a hardbrick. the only thing that might fix it is maskrom mode but I don't even know if that works on the XD and even if it works I have to teardown the device to short the pins on the motherboard. biggest problem is finding out wich 2 pins to short to enter maskrom mode.
« Last Edit: September 26, 2017, 04:30:19 am by CommanderKitler »

phh (OP)

  • Posts: 22
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #8 on: September 26, 2017, 11:21:24 am »
As for the brick, the device can be in three states:
- powered on/suspend ==> long press on power button for 15 seconds to power off
- powered off ====> keep pressing volume+ button and plug USB cable
- battery drained ====> well same thing, though possibly it will need some time to raise above lower battery voltage limit

As for flashing, while you're unpacking, you can do simg2img system.img, this will make it compatible with your flashtool.

Skelton-retired

  • Posts: 6745
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #9 on: September 26, 2017, 07:48:05 pm »
What exactly did you do?

Maybe the battery drain method could save it.


Well I unpacked the update.IMG and then repacked it using imgrepackerrk and then flashed it again with androidtool 2.3(seems i've messed something up there)  . flashed without problems and bam: green led of death. thought to myself "ok no biggie just power down, press vol+ and plug back in" and green light again. darn. kept it connected to the pc and pressed vol+ and power and got a green light again. vol- and power; green light. hooked up to the power adapter; green light. looks pretty bad, bricked a lot of android devices in my days and recovered all of them but this looks pretty bad. I doubt that draining the battery will do much in this case and that could take a while with nothing going on in the device except a green led glowing.

Also my pc doesn't recognize it at all. It's not even showing up in the device manager.

UPDATE: looks like some files got mixed up when I unpacked the legacy rom to compare it so it has probably has the wrong bootloader now. mea culpa. thats pretty much a hardbrick. the only thing that might fix it is maskrom mode but I don't even know if that works on the XD and even if it works I have to teardown the device to short the pins on the motherboard. biggest problem is finding out wich 2 pins to short to enter maskrom mode.

When you connect yout XD to BatchTool, do you see a blue light instead of green? If that's the case you are in mask rom mode, probably because of a bad bootloader. You would need to shortcircuit nand, generaly even if you don't know what pins, just using a paperclip through all pins should do the trick, and make the system go to loader mode to reflash stock, legacy or the firmware you use.


About the kernel, there are things different from mine, joystick driver is different (no adc.js which I use in my kernel) so no ps3/xbox/null modes I guess.

My feeling is that this ROM is made using or porting firefly RK3399 SDK to RK3288. As far as I know, RK3288 SDK for nougat is beta and full of bugs, even the RK3399 is full of bugs. But that's just my guess. The maker of this rom is the one that can explain which one is using, because I only see kernel but not a device tree, so I suppose is firefly SDK and not aosp, but no idea because I don't have an XD to test or to help with the development
« Last Edit: September 26, 2017, 07:52:02 pm by skelton »
Retired

CommanderKitler

  • Posts: 115
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #10 on: September 26, 2017, 08:14:44 pm »
What exactly did you do?

Maybe the battery drain method could save it.


Well I unpacked the update.IMG and then repacked it using imgrepackerrk and then flashed it again with androidtool 2.3(seems i've messed something up there)  . flashed without problems and bam: green led of death. thought to myself "ok no biggie just power down, press vol+ and plug back in" and green light again. darn. kept it connected to the pc and pressed vol+ and power and got a green light again. vol- and power; green light. hooked up to the power adapter; green light. looks pretty bad, bricked a lot of android devices in my days and recovered all of them but this looks pretty bad. I doubt that draining the battery will do much in this case and that could take a while with nothing going on in the device except a green led glowing.

Also my pc doesn't recognize it at all. It's not even showing up in the device manager.

UPDATE: looks like some files got mixed up when I unpacked the legacy rom to compare it so it has probably has the wrong bootloader now. mea culpa. thats pretty much a hardbrick. the only thing that might fix it is maskrom mode but I don't even know if that works on the XD and even if it works I have to teardown the device to short the pins on the motherboard. biggest problem is finding out wich 2 pins to short to enter maskrom mode.

When you connect yout XD to BatchTool, do you see a blue light instead of green? If that's the case you are in mask rom mode, probably because of a bad bootloader. You would need to shortcircuit nand, generaly even if you don't know what pins, just using a paperclip through all pins should do the trick, and make the system go to loader mode to reflash stock, legacy or the firmware you use.

nah it's basically like a normal softbrick but it will not go into flashmode when connected to the PC or ligth up red when connected to the charger.


I disassembled the XD yesterday (don't try that at home kids) the biggest problem is gonna be getting to the NAND. couldn't take a look at the front of the motherboard because it is fixed in place with tiny little screws so I need to buy a small electronics screwdriver kit. also I have taken a couple of looks at photos of the motherboard and I can't see the NAND chip on there.

https://imgur.com/kfoe93Q

If it's under the the RF shielding covering most of the board, I'll have to get some acetone and desoldering braid to desolder and re-solder the whole thing. I'll see to that next week and probably post an update. I got a friend who does a lot of electronics tinkering maybe he's got the tools to do this. Gonna open a dedicated thread for this though as this is getting offtopic and if i succeed, some in-depth documentation could be useful for people running into the same problem.

Skelton-retired

  • Posts: 6745
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #11 on: September 26, 2017, 08:52:48 pm »
Maybe it is under the heatsink. I have never opened mine so not sure. The strange thing is that it doesn't show any light in batchtool. I hope you can repair it.
Retired

phh (OP)

  • Posts: 22
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #12 on: September 26, 2017, 09:42:10 pm »
About the kernel, there are things different from mine, joystick driver is different (no adc.js which I use in my kernel) so no ps3/xbox/null modes I guess.
Yup, I'd like to be able to push GPD XD support into Linux mainline, so no ps3/xbox emulation will be allowed.
Though, what I'm currently trying to do, is to make an Android application handle all gamepad => game stuff (either ps3/xbox emulation, or touchscreen emulation, ...)
This way it will work on all (rooted) Android devices/gamepad, not just GPD XD :P

Quote
My feeling is that this ROM is made using or porting firefly RK3399 SDK to RK3288. As far as I know, RK3288 SDK for nougat is beta and full of bugs, even the RK3399 is full of bugs. But that's just my guess. The maker of this rom is the one that can explain which one is using, because I only see kernel but not a device tree, so I suppose is firefly SDK and not aosp, but no idea because I don't have an XD to test or to help with the development
Well, that's not exactly firefly's rk3399 SDK, that's from another private SDK, but it looks really close.
I'll try to make something that works based on firefly rk3399's SDK, so that I can share all my changes.
So thanks for pointing me to this direction :-)

For the details of the work needed:
Rockchip dropped support for the PMIC, the WiFi chip, the audio chip, the touchscreen of the GPD XD.
For all of those, the code is actually there, but hasn't been updated for Linux 4.4

For the PMIC, I've actually sent mainline a basic support, so that's what I've integrated there.
It's still missing a lot. I'll keep working on the PMIC anyway to get a better mainline driver,
but I think it would be much faster to get a fully working device if someone just fixes Rockchip's code for it.

For the WiFi chip, I did some changes to make it build, changed a build init logic, and it seems to work, but I'm expecting bugs.

For audio, the good thing is that rockchip moved to a mainline method, and that our codec is supported in mainline!
So only minor configuration changes are required.

For the touchscreen, it has mainline support, I just had to enable it in kernel config \o/

For accelerometer, there is both a rockchip and mainline support. I need to switch to rockchip support, so that it works in Android.

For those who want to compare my kernel to rockchip's, do the delta with https://github.com/rockchip-linux/kernel branch release-4.4
You'll notice there are actually really little changes.



Skelton-retired

  • Posts: 6745
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #13 on: September 26, 2017, 10:04:42 pm »
Oh I see, well if it's private SDK I suppose you cannot share it. Though if it's from rockchip it won't be much different from firefly RK3399, because in the end all manufacturers just clone the repo that Rockchip provides to them, including GPD.

About the app you mention, try Tincore keymapper, basically it is what you want to do I think, since it can emulate several gamepads (xbox, ps3, mofa, shield etc.)

About SDK, the last thing I heard from GPD is that rockchip is dropping support for RK3288 because they are gonna stop producing them. No idea if it's true or not (it makes sense because GPD XD will be upgraded with a different SoC), but I suppose rockchip want to focus on RK3399,, which still needs a lot of love, I tested a firefly RK3399 with android 7.1 and was quite dissaspointing, and their linux distro ran pretty bad too. So I guess rockchip still has work to do.

The firefly RK3399 SDK is here if you want to take a look, though it's buggy.

https://gitlab.com/TeeFirefly/FireNow-Nougat/tree/Firefly-RK3399_Android7.1.1_MP_170829

Android M runs a bit better, but not so much.

Good luck with the development. Now that I am retired I am happy to see new people making firmwares for these devices.

Edit: Because of some mistakes using my english, but I am from Spain and my english is far from perfect, specially when I post using my phone LOL



« Last Edit: September 26, 2017, 10:07:30 pm by skelton »
Retired

CommanderKitler

  • Posts: 115
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #14 on: September 29, 2017, 04:53:54 am »
How about you CommanderKitler? any update on your situation?

As I said, I gonna open up a new thread if find I anything groundbreaking.

Only thing I can confirm right now is that draining the battery doesn't help in any way. Not a surprise though as I had it hooked up to the PC without the battery out of curiosity when I opened it up earlier and even then the only thing happening was the green led. The only thing interesting is that it does take a while for the green light to come up when the battery is drained (probably because it needs to have a certain charge to power up) but it comes up instantly without the battery installed. Maybe that's a quirk of the rk3288, usually most android devices don't respond at all when the battery is not installed.

The electronics guy I know is on holiday right now but he should be back next week so I gonna see to that then. Sucks that I messed up my XD but this could be an interesting opportunity to get some more information about the device. Anyways, don't worry, I gonna keep you guys in the loop :).
« Last Edit: September 29, 2017, 05:21:05 am by CommanderKitler »

chent7

  • Posts: 65
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #15 on: October 02, 2017, 12:18:22 pm »
There's just no way to get this to boot into the os for now

I tried repacking and flashing with imgRePackerRK, RK3xxx firmware tools 5.78.35.00, RKBatchTool 1.8, AndroidTool_Release_v2.38. Always ended up with the same thing, the recovery pops up for a few seconds with "erasing" and then black screen
EDIT: or there's just a black screen, I'm pretty lucky for not bricking my xd

I am not familiar with rockchip roms at all, hopefully someone will figure this out ;)
« Last Edit: October 02, 2017, 12:20:15 pm by chent7 »

phh (OP)

  • Posts: 22
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #16 on: October 02, 2017, 08:39:12 pm »
Ok ok I'll make a non sparse-image...

Here it is:
http://dl.free.fr/mzOZDYNBB
« Last Edit: October 02, 2017, 09:13:52 pm by phh »

Jutleys

  • Posts: 1797
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #17 on: October 03, 2017, 11:42:25 am »
Anyone tried flashing the .img with rocktool flasher yet? will it flash?

Jutleys

  • Posts: 1797
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #18 on: October 03, 2017, 11:47:01 am »
Ok ok I'll make a non sparse-image...

Here it is:
http://dl.free.fr/mzOZDYNBB

We would love you to keep working on this and get it working perfect gpd xd needs a updated rom bad there are many users out there inc me.I am willing to donate if we can get this at least a usable state and i am sure many will follow keep up the great work great project.

ruffnutts

  • Posts: 2648
Re: [EXPERIMENTAL] Android 7.1 for GPD XD
« Reply #19 on: October 03, 2017, 09:39:59 pm »
Like to see a video of it working on the XD, I'm not just goner flash a untested ROM :)

Would love to see an updated ROM to atlest Android M so I can run Romflix  ;)

 

Post a new topic
Post a new topic