Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There was a problem parsing the package #1

Closed
kardesken opened this issue Jul 24, 2021 · 38 comments
Closed

There was a problem parsing the package #1

kardesken opened this issue Jul 24, 2021 · 38 comments

Comments

@kardesken
Copy link

When trying to install the "EWay_Scooter_v1.0.15_speed.apk" i get the following error:
"There was a problem parsing the package"

I'm running Android 11 with June security patch.

--

Is it possible to get more info about the patching?
When I try to run the patch_apk.sh i get (in Windows):

bash: keytool: command not found
bash: apktool: command not found
patching file EWay_Scooter_v1.0.15_speed/smali/com/scooter/ewayscooter/Utils/ConstantBle.smali
bash: apktool: command not found
bash: apksigner: command not found

What am I supposed to do here?

@BenjaminSoelberg
Copy link
Owner

BenjaminSoelberg commented Jul 24, 2021 via email

@kardesken
Copy link
Author

I have no problem installing the unpatched version from from your GitHub.

@BenjaminSoelberg
Copy link
Owner

BenjaminSoelberg commented Jul 24, 2021 via email

@BenjaminSoelberg
Copy link
Owner

BenjaminSoelberg commented Jul 24, 2021 via email

@BenjaminSoelberg
Copy link
Owner

Source : https://updato.com/how-to/there-was-a-problem-parsing-the-package-error-fix-it-now/

Can you please try this :

Enable Unknown Sources

Regardless of the Android OS version or the device manufacturer, you will always be able to sideload apps on to your phone. However, you need to grant the device permission to do so, before you can enjoy the freedom of installing apps without the governance of the Google Play Store. To do so, you will need to make sure that specific permission to install apps from unknown sources have been enabled from the Developer Options menu, and here’s how you can do it:

On your Android device, head over to the Settings app.
Head over to Settings – About phone – Build number and tap it 7 times to enable Developer options. 
Now head back to the Settings menu, where you should be able to find the Developer Options menu available for access.
Scroll down within the Developer Options menu and enable the toggle switch for Allow apps from Unknown Sources right next to it.

The system will now allow you to install apps from third-party sources, outside the bounds of the Google Play Store.

@kardesken
Copy link
Author

kardesken commented Jul 24, 2021

Thanks for trying to help, and for sharing the app.

I'm unfortunately not skilled in any programming and I know little of Android..

I have enabled the option to install programs from unknown sources (I have installed other programs this way before). This does not help.
I have also uninstalled the previously app and tried again, also with the same error.

My phone is a Oneplus Nord running original OS (Oxygen OS 11.1.4.4)

I'll see if I can think of any other ways to try this, and give an update if I happen to find something of use.

@BenjaminSoelberg
Copy link
Owner

Ok thank you for trying. Let's hope others can help here. But I'm still convinced that this is a sideloading issue of some sorts. Unfortunately I don't have a newer Android phone so I'm unable to test it further. Btw try and download an older king song scooter apk. I have heard that it might do the trick as well.

@kardesken
Copy link
Author

So I've tried to install the apk trough Android Studio and then I get this message:
"The application could not be installed: INSTALL_PARSE_FAILED_RESOURCES_ARSC_COMPRESSED"

So when I google this I find:

Apps that target Android 11 (API level 30) or higher can't be installed if they contain a compressed resources.arsc file or if this file is not aligned on a 4-byte boundary. This file cannot be memory-mapped by the system if either of these conditions is present. Resources tables that cannot be memory-mapped must be read into a buffer in RAM resulting in unnecessary memory pressure on the system and greatly increased device RAM usage.

https://developer.android.com/about/versions/11/behavior-changes-11

I don't know if this could be the case?

@BenjaminSoelberg
Copy link
Owner

BenjaminSoelberg commented Jul 24, 2021 via email

@kardesken
Copy link
Author

Some more info:
I've tried to install the apk on an emulator (in android studio).

With android 11 (API:30) i get same error as I mentioned before.
With android 9 (API:28) everything works.

And I feel the need to mention that I only installed android studio to test this, so I really don't know what I'm doing!

@BenjaminSoelberg
Copy link
Owner

BenjaminSoelberg commented Jul 24, 2021 via email

@Hrhansen1
Copy link

I have the same problem as kardesken and i have a samsung galaxy s21 also with the newest version of android.

I will follow in this forum and hope for a solution 😊

@kardesken
Copy link
Author

kardesken commented Jul 24, 2021

I found a old phone with Android 8 and tried your program with that one.

I had no problem installing the app.
But I didn't manage to unlock the speed on my E-Way 350 (FW V1.17).

When going into Settings/ Speed Settings (there is only one option of 20km/h) and press confirm, the app freezes and then it close.
On the original app I could choose max speed of 20km/h or 22km/h

When I then try it on my normal phone with the original app from Google Play, I no longer have the option to choose from 20 or 22 km/h. Only option is 20km/h, and if I press confirm, this app now also start to freeze and then close. So something has changed (But not the speed limit).

Do you have an older firmware on your E-Way?
And is there any way of bringing my scooter back to "normal" operation again?

@Hrhansen1
Copy link

Again same problem here as kardesken, the program freezes and crash, even in the orginal app i have triede with APK Editor and i can install but it will still crash in speed settings or will not start at all.

@BenjaminSoelberg
Copy link
Owner

BenjaminSoelberg commented Jul 24, 2021 via email

@Hrhansen1
Copy link

Do you have Discord or something?

@BenjaminSoelberg
Copy link
Owner

I do. Bugsy#2873

@BenjaminSoelberg
Copy link
Owner

So I have a hack working that will set your speed to max again!

The current problem might be with the King Song server returning bad data but I'm working on a fix that will bypass that.

@kardesken
Copy link
Author

Try uninstalling the app first and reinstalling the original after and try again. See if this helps.

This does not help I'm afraid. Original app freezes and stops when i confirm speed setting in settings.

If not then I can make a custom apk that sets the value to say 25 km/t and we can try setting the speed to that and then deleting the patched apk and reinstalling the original again to see if that restores it back to factory

I don't mind trying

Also if you have an iPhone try that as that will restore it to factory as well (mine does).

Sorry, I don't have that. But good to know. I'm sure I have some friends with an iPhone that can help me out if needed.

So I have a hack working that will set your speed to max again!
The current problem might be with the King Song server returning bad data but I'm working on a fix that will bypass that.

If you're working on something, then I'll just sit back and wait :)

Thank you for keep trying. Your time and help is very valuable

And I thank you for trying to find a solution to this.

@BenjaminSoelberg
Copy link
Owner

Try the latest APK!

@BenjaminSoelberg BenjaminSoelberg changed the title Can't install app There was a problem parsing the package Jul 25, 2021
@kardesken
Copy link
Author

Tested.

It still want install on Android 11 (but I guess that this is not important now).

Installed it on my old phone with Android 8.

At first I had problems to connect to my scooter. The app says it has connected, but there is no info available in the app. Everything is blank.
I also believe that I had this issue a couple of times with the original app. So this could be because the original app sucks..

After a couple of restarts on my phone and the scooter, it finally connected, and it works. I can now choose all the different max speed settings 22, ... 25 and unlimited.

Nice work.

@BenjaminSoelberg
Copy link
Owner

That is good news. I can attest that the original app is not very well done. But it kinda works and that's what matters for the manufacturer.

I'll keep this issue open as it was originally about an installation problem on android 11 which still persists. I have moved the app crash into issue #2 which is now fixed and closed.

@Mortenton
Copy link

Mortenton commented Jul 25, 2021 via email

@BenjaminSoelberg
Copy link
Owner

Good to hear. What is the maximum speed on the e500 ?

@Mortenton
Copy link

Mortenton commented Jul 25, 2021 via email

@maruudn
Copy link

maruudn commented Jul 30, 2021

I'm having the same issue as the OP, on Sony Xperia 1 ii (XQ-AT51) running Android 11, July security patch.
I tried to install the app with adb, getting the following error:
image

Edit: I had no problem installing the unpatched version from your GitHub (via adb).

@maruudn
Copy link

maruudn commented Jul 30, 2021

I was able to install the app with no problems on my older HTC U11 running Android 9. Tested with my E-600 MAX and reached 42 KM/h (!). Pretty scary, to be honest! If I had a longer stretch of road I think I could have gone even faster, but I'll probably stick to 25 KM/h.

@maruudn
Copy link

maruudn commented Aug 19, 2021

@BenjaminSoelberg any progress on this issue? I'd really like to be able to use the app on my main phone. Sucks not being able to use the app on my main phone to lock the scooter etc.

@ataz
Copy link

ataz commented Sep 10, 2021

Don't have an older Android so would also be happy with progress on this issue :)

@ataz
Copy link

ataz commented Sep 10, 2021

Also would like to add for anyone else who wants to just unlock 25 km/h, there is another solution, which is to install a VPN and set the location to Helsinki Finland (which is a market which allows 25 km/h). Then also install a GPS spoofing app and set the location to Helsinki. When using the original app from E-way, you will then be able to unlock the scooter to 25. Note that you will either always need to have the VPN on when using their app, or simply delete it after unlocking 25.

BenjaminSoelberg added a commit that referenced this issue Sep 13, 2021
@BenjaminSoelberg
Copy link
Owner

So I have tried to fix this issue by upgrading apktool as well as extracting/repacking resources. Hopefully this now generates a valid resource bundle. Since I don't have a newer Android phone it will be up to you guys to test it.

@maruudn
Copy link

maruudn commented Sep 15, 2021

it will be up to you guys to test it.

@BenjaminSoelberg Unfortunately I'm still having the same issue.

@maruudn
Copy link

maruudn commented Apr 25, 2022

@BenjaminSoelberg just wondering if this is still being worked on?

@sjm42
Copy link

sjm42 commented May 19, 2022

Well, I can confirm this error message on Android 11 and 12 after trying with two different phones from Cat and Samsung.
Rebuilding the apk on my Linux machine did not help. There must be something wrong with the apk metadata or something like that.

But on a huawei tablet with Android 8 the pre-built apk installs ok and works.

@Lindoffx
Copy link

Lindoffx commented Jul 18, 2022

I Recompiled and Zipaligned .apk now it installs on Android 12 no issues. Hack works great, Cheers.
PS.. Tested on E-way E-2540. Stock speed 20km/h. Waiting for fully charge but 25km/h on low battery with unlocked speed.

Download

@johbec
Copy link

johbec commented Aug 6, 2022

I Recompiled and Zipaligned .apk now it installs on Android 12 no issues. Hack works great, Cheers. PS.. Tested on E-way E-2540. Stock speed 20km/h. Waiting for fully charge but 25km/h on low battery with unlocked speed.

Download

You sir, are a hero <3

I can confirm that it works on the following hardware and Android version bundle:

DEVICE | VERSION OF ANDROID OS

Sony Xperia XZ1Compact : (rooted with custom rom built on) Android 10
Samsung Galaxy S10 : Android 11
Samsung Galaxy S21+5G : Android 12

Thank you! :D

@BenjaminSoelberg
Copy link
Owner

BenjaminSoelberg commented Aug 6, 2022 via email

@johbec
Copy link

johbec commented Aug 8, 2022

I Recompiled and Zipaligned .apk now it installs on Android 12 no issues. Hack works great, Cheers. PS.. Tested on E-way E-2540. Stock speed 20km/h. Waiting for fully charge but 25km/h on low battery with unlocked speed.

Download

Yeah, could you give us the steps to zipalign and/if you compiled with and non default parameters or flags? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants