Author Topic: Yinlips YDPG19 - How I Rooted Mine and Removed the Bloat. USE AT YOUR OWN RISK!  (Read 15887 times)

kurmudgeon (OP)

  • *
  • Posts: 8
I just received my Yinlips YDPG19 today.  Wow did this ship fast!  I had it in my hands after only ordering it 7 days ago.  Any way, as soon as I opened the box and got a charge on this thing, I did what I do best and started hacking away at it.  After a couple hours, I have it rooted and have all the apps installed that I want and many of the stock apps removed permanently.  If you want to know how I did everything, just read this quick guide below.

Note: I'm only providing this information so I can reference it later if I need to.  This worked perfectly for me, but if you mess up your own device, then Mr. Willgoo will get another sale when you re-buy one for yourself.  In other words, do this at your own risk, you alone are responsible for anything bad happening to your device.

This guide won't be for beginners.  From what I've seen by watching all the YouTube videos about the previous generation Yinlips devices, the ROM, Recovery Manager and software on this one is set up differently from the YDPG18, YDPG18A, etc.  Some of the notable differences I've found are as follows:

  • Cannot boot into recovery using the hardware keys.  I could only do this through ADB, but even then, the recovery manager was NOT very helpful.  (If you ever need to do this, just plug the device to your computer and run "adb reboot recovery".)
  • All of the emulators are hidden on this device and the GameManager program is a wrapper program containing all the binaries and associated files and libraries for these emulators.  Basically, this means I left it alone, so it's still there currently.  Later I'll probably back it up and try removing it to see if I need it for mapping buttons on the YDPG19.
  • The device is already rooted, but you won't be able to get access to the su binary pre-installed.  So you will have to hack like I did to take full control.  I tried installing the Superuser app, but it couldn't get privileges from the su binary.  Since this app couldn't, no other app could either.  The solution is simple though.
  • Oh yeah, one last thing difference.  From reading about the YDPG18 and YDPG18A, I was led to believe that those devices could not charge from USB and would only charge from the included power adapter.  Well, I can confirm that the YDPG19 does charge from USB; quite well actually.  I'm almost wondering why Yinlips even included the AC power adapter to begin with.

Prerequisites are as follows:

  • Knowledge of ADB and ADB or the Android SDK is already installed and ready to go (with the platform-tools folder).  ADB is quite simple.  If you want to continue and have never used ADB, Google the Android SDK and get it set up.  Then Google, "Android ADB" and get familiar with this awesome tool.
  • I have the path of the platform-tools folder added to my bash profile.  I'd recommend this if you are on Linux or with Windows you would add this folder to the environment path (right-click Computer, go to Properties, click on Advanced System Settings, click the Environment Variables button).  It's a quick Google search also.  This makes it so that you don't have to type the entire path to the adb or adb.exe file with each command like I do with my instructions below.
  • If you are using Windows, you will have to find a driver for use with ADB.  I'm sure this is a quick Google search as well.  If you are on Linux, you should be good with the Android SDK installed.
  • Go to this site: http://androidsu.com/superuser/ and download the current zipped su binary to your desktop.  The file will be named something similar to: "Superuser-3.1.3-arm-signed.zip" but the version may vary.  As of today, Oct. 15th, 2012, that is the file name to download.

Root Guide:

Let's first fix root so we can give permissions to our rooted apps.  My directions are for Linux, but if you are using Windows, the directions should be very similar.  The only real differences between my instructions for Linux and what you will need to do when on Windows are:
  • You will need to hunt down drivers so that ADB can recognize the device in Windows
  • All the paths specified will use the Windows path style (using '\' instead of '/')
  • Replace all occurances of 'adb' with 'adb.exe'.

Let's start at the desktop where you should have downloaded the zip file we need:
Code: [Select]
cd ~/Desktop
Extract the zip file you downloaded from androidsu.com like so:
Code: [Select]
unzip Superuser-3.1.3-arm-signed.zip
Now, let's organize and move the su binary you'll need to your desktop (note the period at the end):
Code: [Select]
mv system/bin/su .
Next we need to fix su on your android device, but first we need to remove your current su binary:   
Code: [Select]
adb shell
In adb:
Code: [Select]
rm /system/xbin/su
exit

We're back to the commandline in Linux (command prompt in Windows).  We are now going to push the new su binary to the correct location(s) and fix it's permissions:
Code: [Select]
adb push su /system/bin/
adb shell

In adb:
Code: [Select]
chmod 06755 /system/bin/su
ln -s /system/bin/su /system/xbin/su
exit

Lastly, reboot the device from the commandline in Linux:
Code: [Select]
adb reboot

Install Superuser App:

You have now successfully installed a su binary that Superuser app from the Play Store will work with properly.  So once you are back on the home screen in Android, fire up Google Play and install Superuser.  Start up Superuser and check if there are any updates to the binary.  It should say you have the current one.


Optional:

Replace Superuser with SuperSu:

On my Yinlips, I went further and installed SuperSu from the Play Store.  When I started up SuperSu, I gave it permissions with Superuser when prompted.  Then I closed SuperSu.  After that I revisited the Play Store and uninstalled Superuser.  SuperSu now handles all my root permission requests.  Afterwards, I rebooted the device.

Install ES File Explorer and Browse as root:

Now, I recommend ES File Explorer over RootExplorer.  Once you install ES File Explorer, go into the settings.  Under the root settings, give ES File Explorer root access and grant the permissions when prompted.

Perform Some Cleanup:

From here on out, you are free to install Titanium Backup if you want to remove programs.  I personally removed many of the unwanted programs manually using ES File Explorer or adb from the /system/apps folder.  The apps I removed myself include the following:

 - AngryBirds-Space.apk
 - BaiduInput.apk
 - com.anifree.anipet.aquarium_zh.apk
 - com.google.android.music.apk
 - com.qiyi.video3.2.apk
 - fruitninja_2.apk
 - iReader_V1.5.0.1.apk
 - jixianmotuo.apk
 - Mobile_QQ_for_Pad1_1.91.apk
 - WowFish.apk

While some of these apps were free with the device, we all know they were pirated.  Not that I have an issue with pirating necessarily, but with these being pirated, they will never get updates.  I already had most of these purchased for my Galaxy Nexus, so I just reinstalled the ones I had onto my Yinlips

Remove the GaGa Media Player app Permanently!:

Next I went to Settings --> Applications and uninstalled all the apps I was able to.  To get rid of the GaGa media player app, after uninstalling it from within Settings, I fired up ES File Explorer and navigated to /vendor/extra.  For some reason whenever you uninstall the GaGa media player app, it reinstalls after a reboot.  Well, remove it from /vendor/extra and it won't any more.

Hope this helps someone else with the YDPG19 out!  Thanks Willgoo for all your help and quick responses to my ordering questions!
« Last Edit: October 16, 2012, 11:04:29 pm by kurmudgeon »

funkatron101

  • *
  • Posts: 32
Hopefully there is a simpler solution soon.

skelton

  • *****
  • Posts: 6842
If device is pre-rooted, the you just need to download superuser from market and tell the program that update su binary. Unless from my knowledge. Maybe using unlockroot or shuame works too. (I don't know, don't have this device). Maybe the method I explained for s602 work in this device too (since it is a general plus)

http://forum.openhandhelds.net/index.php/topic,167.0.html

But it's only a guess. I would try simply download superuser and buysboc from market and tell superuser that updates binary.
Retired

kurmudgeon (OP)

  • *
  • Posts: 8
I tried that but the Superuser app couldn't get root privileges from the su binary that was already there.  Therefore, you couldn't provide root access to any root apps.  You would never see a prompt for this.  So the solution was to replace the su binary with the newest one that Superuser could work with.  Really the process isn't that long, I just threw a bunch of extra stuff in there.

Bottom line, this is what it entails if you only want to root:

1. Download the zip.
2. Extract it to your computer.
3. Use adb to delete old su binary from /system/xbin
4. Copy new su to /system/bin
5. Create a symbolic link in /system/xbin which points to /system/bin/su
6. Reboot.

So it's not that bad and if you can find just the adb executable, you could probably just use that.  The instructions are similar for Windows, Mac and Linux.  The only thing that's different is the syntax used (Windows uses "\" for it's paths, Linux/Mac uses "/").  That's basically it.

If you follow my guide, after you install Superuser app from the Play Store, you are essentially done.  The rest is just some extra stuff I did to clean mine up.
« Last Edit: October 16, 2012, 04:19:23 pm by kurmudgeon »

funkatron101

  • *
  • Posts: 32
How do you like the system so far?

skelton

  • *****
  • Posts: 6842
I don't have the Yinlips g19, but I have a s602, which is same CPU/GPU, this is why I gave my idea about rooting (although in s602 system isn't even pre-rooted). I suppose G19 is very similar to s602, except obviously for screen and resolution, which is better in G19. S602 is fine, battery time is the only thing I don't like about it. Well, and the fact that firmware came in tat weird bin format which makes me impossible to develop stuff fot it.
Retired

funkatron101

  • *
  • Posts: 32
Thanks skelton.

My main concerns are:

1. The d-pad (and if I need remedy it with the PS1 d-pad modification I saw in another thread.)
2. Removing bloatware
3. How well it works for N64 emulation
4. Button mapping for android games and how well it works
5. General stability.

After the recent announcements of the newer devices I got a little discouraged as I just ordered this, but if my concerns are not an issue, I can get over it.

kurmudgeon (OP)

  • *
  • Posts: 8
So far, the first day I've had it I spent rooting and cleaning it up.  I stripped this thing pretty bare too.  There were music videos with Chinese teenager ladies, Chinese music, and tons of Chinese language apps.  What surprised me was that there were over 1000 ROMs already installed, however many are Japanese or are hacked ROMs.  It's also strange that of the included ROMs, the biggest titles you'd expect to see are missing.

One thing I've learned so far with this device is that you can't see the SD card if you mount it for USB storage.  This may be common knowledge for Android users, but this is my first Android device with external SD storage, so it's new to me.

As far as the D-Pad, up, down, right and left are all their own buttons, so rocking between the two is not the same as you might expect.  I'm sure I will get used to it though.  I haven't tested out whether or not the D-pad and analog stick are mapped separately with a game or emulator yet, but I have hope.  The reason is that when I booted into the recovery manager, the D-pad buttons did nothing, however, the analog stick did.  So somewhere, the hardware is mapped differently.  It all depends on how the software side was written.

I tested a few N64 ROMs and so far, so good.  PSX also worked for the included Tekken 3.  The menus were glitchy, but the game ran flawlessly.

So far stability of Android is great.  As far as stability with ROMs and emulation, I'll know more soon.  My YDPG19 arrived much, much faster than I expected.  I ordered an SD card from New Jersey on Amazon, and wouldn't you know it, Willgoo managed to ship this Yinlips from China before I got the SD card.

As soon as I get the SD card, I'm going to load it up with ROMs and test both Game Manager and the .EMU emulators.  I'll post updates later.

My friend also purchased one, so I'm sure we are going to test out the new multi-player/wifi connection also.  I also plan to test this devices ability to map on-screen controls of Android games.  I'm still trying to figure out how to do that exactly (is it a key combination?  Is there an app I'm supposed to run?)  One downside of ordering a product like this is no instructions, let alone English instructions.  There's not even a digital manual on the Yinlips site.

Bottomline, so far I'm just glad I was able to strip this puppy clean without bricking it.  I can attest to the fact that the only thing the reset button does is just kick it back to the bootloader.  It does not wipe the device or anything like that.  At one point, I messed up the ROM and it wouldn't boot.  I just used ADB to boot into recovery (adb reboot recovery) and factory restored it.  That worked great.  Be careful in the meantime doing anything too drastic to the ROM because as of now, there is no download for a stock image from Yinlips or anywhere else for that matter.

Once there is, I will probably start hacking the hell out of the stock image.  If I can figure out how, I may even make a de-odexed ROM so that it's easier to install apps to /system/app.

Hope all this helps.

TL;DR:

1. D-Pad has separate buttons for up, down, right and left.  Rocking between them takes some effort, but I should be able to adapt with more gameplay.

2. There is tons of bloatware.  I listed the apps that are safe to remove from /system/app once you get root access.  Any of the other apps can be removed from Settings in Android.

3. So far, N64 emulation is pretty good.  There are fewer buttons on this device than what was on a N64 controller, so you have to get creative with the button mapping.

4. Haven't tried button mapping for Android games yet, but that's one of the things I plan to test soon.

5. So far so good, Android is running great, even with the hacking, rooting, and general genocide of the Yinlips bloat.  Emulators seem to be working quite well also.  I'm really surprised at how well the NEO-GEO/MAME ones are working.
« Last Edit: October 16, 2012, 11:05:06 pm by kurmudgeon »

funkatron101

  • *
  • Posts: 32
Thank you so much! I feel better about the purchase already.

Azabache

  • Posts: 1
Thank you for the hard work! This is a topic which will become more of concern as the number of YDPG19 owners steadily grows. The time you put into this is greatly appreciated and makes prompts me to re-consider making a linux partition to work with android. Alas, not all has gone well in my translation of these steps to Windows.


My issues:
1. Android Commander in windows seems to do fine in finding drivers and editing files from the device.  However, I can't tell if having any drivers that allow for /system editing do the trick. All commands resulted in successful pushing of 'su into /bin, the removal of 'su' from /xbin, and the creation of the symbolic link in /xbin. Once on the device, it failed to grant superuser permissions. Superuser lists the version as (3.13. Unsure if this is the up-to-date version). My reckoning is that I have an incorrect driver since infrequent errors of " Access violation at address XXXX..." from Android Commander, signaling limited access to the device.


2. The lack of any native access to the recovery tool is troublesome. I can only assume Yinlips altered the ability to access recovery, not outright removed it as this would have made diagnostics a nightmare for their programmers. I will keep trying to find different ways to access recovery and report back if I can notice anything. If anyone else comes up with something, any advice will be well received.

« Last Edit: October 17, 2012, 05:51:20 am by Azabache »

skelton

  • *****
  • Posts: 6842
Probably the lack of recovery is because maybe the Yinlips don't have vloume buttons, can be? In s602 (same CPU/GPU), you can access recovery just pressing Power and volume +.

About the android gamekey mapping, in s602 there is an app called key2touch that can be launched at any time pressing slect and start at the same time. Maybe it's the same with Tinlips, you can try.

Kurmudgeon, the firmwares of this GeneralPlus come in a weird format called firmware.bin that at least in the case of s602 (I have not been able to extract and repack at all). And generalplus refused to release any sources, so luck with that.
Retired

funkatron101

  • *
  • Posts: 32
Does anyone know if this has the same mobo as the YDPG18A?

kurmudgeon (OP)

  • *
  • Posts: 8
I found an issue today which was driving me nuts.  I ended up remapping the emulator keys to get around the issue.  The issue I'm running into was first noticed in Super Mario World in any of the SNES/SFC emulators.  When I'm running using the "OK" button and I press "B" to spin-jump, nothing happens.  I'm still running, but no spin jump.  I can spin-jump when I press "B" by itself, and I can run by holding "A" and normal-jump by hitting "X".

In other words, key combinations between "A" and any other key seem to work just fine.  However, key combinations between "OK" and any other button fails.

Another issue is that the analog stick doesn't seem to be mapped properly to mimic the D-Pad.  I can go Up or Left just fine, but Down and Back are mapped differently.  They both seem to do the same thing as the Android back button some times, other times they don't do anything.

Anyone else having this problem or know of a solution?  I'm not sure if these are a common problem with Yinlips devices or not.

P.S.  The button names I'm referring to are what the buttons are called on the Yinlips.  You know, the naming convention that makes no sense.

skelton

  • *****
  • Posts: 6842

The button combo issue is a common issue in all yinlips devices. Certain button combinations are not possible. I only have a G16 and happens this. To test all buttons you can try to install keytest, which will give you the scancode of all buttons, you can try pressing different combo too to see if there are some erratic combinations.

https://github.com/chrisboyle/keytest/downloads
Retired

kurmudgeon (OP)

  • *
  • Posts: 8
Hi skelton,

I used the keytest apk you provided and found that there were some erratic combinations indeed.

Using SNES/SFC style mappings:

- When I press 'A', this maps scancode 30 to KEYCODE_A (29)
- When I press 'X', this maps scancode 45 to KEYCODE_X (52)
- However, when I press and hold 'X' and tap 'A', this maps scancode 19 to KEYCODE_R (46)
- When I press 'R', this maps scancode 19 to KEYCODE_R (46)

So basically, when I am running in Super Mario World by holding down 'X' and I press 'A' to do a spin jump, the screen moves to the right and Mario just keeps running (causing me to die usually).

Others I found were:

- When I press 'L', this maps scancode 38 to KEYCODE_L (40)
- When I press 'R', this maps scancode 19 to KEYCODE_R (46)
- However, when I press and hold 'L' and tap 'R', this maps scancode 30 to KEYCODE_A (29)

- When I press 'X', this maps scancode 45 to KEYCODE_X (52)
- When I press 'L', this maps scancode 38 to KEYCODE_L (40)
- However, when I press and hold 'X' and tap 'L', this maps scancode 48 to KEYCODE_B (20)

- When I press 'B', this maps scancode 48 to KEYCODE_B (30)
- When I press 'R', this maps scancode 19 to KEYCODE_R (46)
- However, when I press and hold 'B' and tap 'R', this maps scancode 38 to KEYCODE_L (40)

This is a total of 4 bad combinations.  Is this normal for these things?  Is there a way to fix this?  Is this most likely related to hardware or software?  Please let me know if you have any idea.  I like to hack and am willing to put in the work if it's software related.

kurmudgeon (OP)

  • *
  • Posts: 8
Hi Azabache,

It sounds like the driver may be your issue.  The version superuser shows is correct and the most current version.  You might want to check the permissions of your su binary (chmod 06755 /system/bin/su).  Mine shows up like this:
Code: [Select]
[email protected]:/system/bin # ls -al su
-rwsr-sr-x root     root        91980 2012-10-16 03:32 su

Also, double-check the permissions of the symbolic link in the /system/xbin folder as well.
Code: [Select]
[email protected]:/system/xbin # ls -al su
lrwxrwxrwx root     root              2012-10-16 10:35 su -> /system/bin/su

If the symbolic link in /system/xbin doesn't match what my output looks like, then do the following:

- First, go to your applications menu in settings.  Force close superuser if it's open, then clear it's cache and data.  After that, uninstall it.

- Next, using ADB from terminal/command prompt from your PC, connect your device, then do the following:
Code: [Select]
adb remount
adb shell
rm /system/xbin/su
chmod 06755 /system/bin/su
ln -s /system/bin/su /system/xbin/su
exit
adb reboot

After the reboot, go to the Play Store and reinstall superuser.  Start up superuser.  I don't remember if superuser will ask for permissions or not, but if you install another root app it should ask for permissions.  You could use ES File Explorer.  Install ES, then in settings enable the Root Settings, like Root Explorer, Up to Root, Mount File System, etc.  If you get the prompt and ES gets it's permissions properly, then it's working.

Hope this works for you.  If it doesn't, I'd blame the drivers being used.  Usually ADB works the same whether in Windows or Linux, but with Windows, drivers can cause problems sometimes.
« Last Edit: October 18, 2012, 06:00:38 am by kurmudgeon »

kurmudgeon (OP)

  • *
  • Posts: 8
For those of you with the YDPG19, I created a custom SetCPU file so you can set up the conservative governor and hopefully save some battery life, or at least not run the battery down so much when you leave the device locked and just sitting there.  Here's how to do it:

 - Note: This requires that you are rooted prior to continuing.

1. Create a file on your desktop and call it "setcpu" (Note: no extension)
2. Edit the file with the following:
Code: [Select]
378000,405000,432000,459000,486000,513000,540000,567000,594000,621000,648000,675000,702000,729000,756000,783000,810000,837000,864000,891000,918000,945000,972000,999000,1026000
3. Save your changes.
4. Now, either copy the file to your SD card or fire up ADB and enter the following:
Code: [Select]
adb push setcpu /data/local/
- If you copied it to your SD card, use ES File Explorer or a file explorer with root permissions and copy the file to /data/local/

5. Download SetCPU from the Play Store: https://play.google.com/store/apps/details?id=com.mhuang.overclocking
6. Start up the app and give it root permissions.  Set the max frequency to 1026MHz and the min frequency to 378MHz. 
7. Change the governor to "Conservative".
8. Check the box to "Set on boot".

And you're done.  Now your Yinlips will have much more efficient usage of the processor, hopefully helping to have better battery life.  I've been running mine like this the past couple of days and haven't noticed any drawbacks yet.

funkatron101

  • *
  • Posts: 32
Hi skelton,

I used the keytest apk you provided and found that there were some erratic combinations indeed.

Using SNES/SFC style mappings:

- When I press 'A', this maps scancode 30 to KEYCODE_A (29)
- When I press 'X', this maps scancode 45 to KEYCODE_X (52)
- However, when I press and hold 'X' and tap 'A', this maps scancode 19 to KEYCODE_R (46)
- When I press 'R', this maps scancode 19 to KEYCODE_R (46)

So basically, when I am running in Super Mario World by holding down 'X' and I press 'A' to do a spin jump, the screen moves to the right and Mario just keeps running (causing me to die usually).

Others I found were:

- When I press 'L', this maps scancode 38 to KEYCODE_L (40)
- When I press 'R', this maps scancode 19 to KEYCODE_R (46)
- However, when I press and hold 'L' and tap 'R', this maps scancode 30 to KEYCODE_A (29)

- When I press 'X', this maps scancode 45 to KEYCODE_X (52)
- When I press 'L', this maps scancode 38 to KEYCODE_L (40)
- However, when I press and hold 'X' and tap 'L', this maps scancode 48 to KEYCODE_B (20)

- When I press 'B', this maps scancode 48 to KEYCODE_B (30)
- When I press 'R', this maps scancode 19 to KEYCODE_R (46)
- However, when I press and hold 'B' and tap 'R', this maps scancode 38 to KEYCODE_L (40)

This is a total of 4 bad combinations.  Is this normal for these things?  Is there a way to fix this?  Is this most likely related to hardware or software?  Please let me know if you have any idea.  I like to hack and am willing to put in the work if it's software related.
Did you find a solution to this? I had to get really creative in getting Mario Kart 64 to work properly. I mapped the buttons differently to avoid this, but it is much less enjoyable.


skelton

  • *****
  • Posts: 6842
Most of Button combo issues are related to hardware, so difficult to fix. In fact, s602 uses the same SoC GeneralPlus and doesn't have combo issue, but maybe in the case of the Yinlips is different (I don't know because I don't have it). Yinlips machines use to have these problems with buttons.

Any case, if it were a software problem, difficult to fix too, since GeneralPlus source code is not available, so the work would be trying to reverse engineering the module for keypad.

an easy way to know if it's software or hardware is trying to connect an external usb gamepad and see how it works. Does G19 support USb OTG?
« Last Edit: October 31, 2012, 02:43:33 pm by skelton »
Retired

funkatron101

  • *
  • Posts: 32
Well, I tried for three hours to root this device, to try and remedy what ever is causing all of my downloaded apps to crash. I couldn't find the right windows drivers to recognize the device. I downloaded the basic google usb drivers, but that didn't work.

Any tips?