[APKTOOL] Package couldn't be installed ... base.apk code is missing - Samsung Galaxy S7 Edge Questions and Answers

Hi,
today Samsung published the Beta Browser and the Edge panel for opening web pages does not work anymore as the package name of the browser changed.
I decompiled the sbrowseredge app, changed the app name as well as the hardcoded part (in cocktail_widget.xml) to the beta, compiled it again with apktool 2.2.2 and signed without problems. However, I'm not getting it installed.
Failed to install Internet panel_2.0.14\dist\Internet panel_2.0.14.apk: Failure [INSTALL_FAILED_INVALID_APK: Package couldn't be installed in /data/app/myapp.sbrowseredge-1: Package /data/app/myapp.sbrowseredge-1/base.apk code is missing]
Click to expand...
Click to collapse
I installed the Nougat framework-res.apk for apktool. What else do I miss?
I still use jarsigner and thus v1 signing, however, my own apps (not Samsung related) do install without any problems.
(I tried as well just to decompile, change name only and compile/sign again with the same result.)
Thank you!
Andreas

andiling said:
Hi,
today Samsung published the Beta Browser and the Edge panel for opening web pages does not work anymore as the package name of the browser changed.
I decompiled the sbrowseredge app, changed the app name as well as the hardcoded part (in cocktail_widget.xml) to the beta, compiled it again with apktool 2.2.2 and signed without problems. However, I'm not getting it installed.
I installed the Nougat framework-res.apk for apktool. What else do I miss?
I still use jarsigner and thus v1 signing, however, my own apps (not Samsung related) do install without any problems.
(I tried as well just to decompile, change name only and compile/sign again with the same result.)
Thank you!
Andreas
Click to expand...
Click to collapse
I just tried and it works... here... https://www.sammobile.com/apk/samsung-internet-beta/samsung-internet-beta-5-4-00-3/
S7 Edge Powered By Echoe

Related

Re-signing with test-keys issue

I have been breaking my head on this one for a while, so hopefully someone can give me some pointers...
I'm having troubles re-signing a stock ROM with testkeys.
When I re-sign ALL apk files (in app and the one in framework) with test-keys I get the error : "ERROR/Sync(125): Google login service not found." at boot.
When I don't sign anything the ROM boots fine...
Code:
08-17 20:48:39.326: ERROR/Sync(125): Google login service not found
08-17 20:48:39.326: ERROR/Sync(125): com.google.android.googlelogin.GoogleLoginServiceNotFoundException: The Google login service cannot be verified.
08-17 20:48:39.326: ERROR/Sync(125): at com.google.android.googlelogin.GoogleLoginServiceBlockingHelper.checkGoogleLoginServiceVerificationLocked(GoogleLoginServiceBlockingHelper.java:271)
08-17 20:48:39.326: ERROR/Sync(125): at com.google.android.googlelogin.GoogleLoginServiceBlockingHelper.getLoginService(GoogleLoginServiceBlockingHelper.java:260)
08-17 20:48:39.326: ERROR/Sync(125): at com.google.android.googlelogin.GoogleLoginServiceBlockingHelper.getAccounts(GoogleLoginServiceBlockingHelper.java:347)
08-17 20:48:39.326: ERROR/Sync(125): at com.google.android.googlelogin.GoogleLoginServiceBlockingHelper.getAccounts(GoogleLoginServiceBlockingHelper.java:329)
08-17 20:48:39.326: ERROR/Sync(125): at com.google.android.providers.AbstractGDataSyncAdapter.onSyncStarting(AbstractGDataSyncAdapter.java:1178)
08-17 20:48:39.326: ERROR/Sync(125): at com.android.providers.contacts.ContactsSyncAdapter.onSyncStarting(ContactsSyncAdapter.java:1219)
08-17 20:48:39.326: ERROR/Sync(125): at android.content.TempProviderSyncAdapter$SyncThread.sync(TempProviderSyncAdapter.java:236)
08-17 20:48:39.326: ERROR/Sync(125): at android.content.TempProviderSyncAdapter$SyncThread.run(TempProviderSyncAdapter.java:210)
You don't need to resign the APK's.
The full update.zip should be enough =)
Though it is still quite a mystery why the Google Login won't work when signed with a test-key.
maxisma said:
You don't need to resign the APK's.
The full update.zip should be enough =)
Click to expand...
Click to collapse
That is correct, the ROM works fine when I sign the full update.zip
I just would like to know why this it is giving problems when you resign everything... I would be nice to know the exact reason behind this issue.
Is there any advantage to signing all the apks, or is this just an academic exercise? I tried (and obviously failed) when messing with the T-Mobile stock ROM but like you said it works fine without.
Amon_RA did you ever find away to get this to work? I'm asking because I've tried re-signing all the apk's in /system/app & /system/framework on my Rogers build so I could include irrenhaus' Advanced Launcher v17 as a HTCLauncher replacement. If it's flashed as an "update" after the the rom is setup, running, etc. It works fine. But as soon as you wipe, you start getting boot loops. When you resign every apk, it'll flash in the build fine, but you can't access the market or sign into google. It's not only me, but Soulife & Enomther have spent quite a bit of time looking into this also. So, before someone say's just throw it into the /system/app directory & re-sign the update.zip, you can't it because it won't work properly. Any suggestions would be appreciated! Thanks.
kb7sqi said:
Amon_RA did you ever find away to get this to work? I'm asking because I've tried re-signing all the apk's in /system/app & /system/framework on my Rogers build so I could include irrenhaus' Advanced Launcher v17 as a HTCLauncher replacement. If it's flashed as an "update" after the the rom is setup, running, etc. It works fine. But as soon as you wipe, you start getting boot loops. When you resign every apk, it'll flash in the build fine, but you can't access the market or sign into google. It's not only me, but Soulife & Enomther have spent quite a bit of time looking into this also. So, before someone say's just throw it into the /system/app directory & re-sign the update.zip, you can't it because it won't work properly. Any suggestions would be appreciated! Thanks.
Click to expand...
Click to collapse
Some of the google apps have a "Signature" that is checks against itself to see if it's been modified - you'd need toedit that to make them work
Amon_RA said:
That is correct, the ROM works fine when I sign the full update.zip
I just would like to know why this it is giving problems when you resign everything... I would be nice to know the exact reason behind this issue.
Click to expand...
Click to collapse
its because it needs a release keys signature to login not test keys ;-)
idk where i read it but i do believe it originated it in a thread by stericson having to do with theming android and why test keys wont sign some apps or files for them to work they need to be signed with a release keys version like the actual Google signature not their open source signature they give us to sign apk's etc
Hello everyone - I do development on the myTouch Slide, but I have a question related to this post: how do we re-sign the HTC resources file (com.htc.resources.apk) with test keys? I've essentially decompiled it and built it back (using apktool), then signed the resulting APK with signapk.jar using the test keys, but when Android is being loaded it's unable to find the 'Resources'. (I haven't even arrived at this so-called 'Google Login' error - the GUI won't even load due to an error in HTCLockScreen not finding the resources).
The reason this all came about is because I'm looking for an easy way to edit the file and perform any changes I want to it. The 7-zip method is hackish and is specific to Windows - I am looking for a way where I can go as far as to edit the XML files in the package, but the 7-zip method doesn't work for that (because the XML files are compiled).
Any ideas? Can people link posts related to this? Thanks.
EDIT: Ok, some people are probably going to point out that I can hex edit the file through 7zip, but I would rather not do that, especially since I do not run Windows for my Android development.
I've actually discovered that the reason 7zip works is because it technically doesn't follow zip format specifications. Once you edit a file from within 7zip and save the changes 7zip doesn't calculate the CRC of the new (updated) file. Android proceeds to load the APK because the CRC hashes in the zip file are still "correct", but really they're not.
While this doesn't answer my original question, it does provide a possibility of extending other (non-Windows) utilities with the sole intended function of hacking APKs.
EDIT: I'm not entirely sure this is correct information as I'm still trying to sort through the different actions that various programs (Android included) take on an APK, plus I can't find a specification of an APK file (other than people simply saying its "similar to a zip").
I been looking at this as well and hopefully can help. First look at my signature for a release key maker for those that wanna know. okay so this is just all theory but I been looking to resign all apks with the same signature my signature. Reason being is I'm helping to port froyo sense to sprint hero and there's alot of smali editing and resigning of apks. I have noticed while doing this that some proprietary apks have this in there android manifest xml "androidprotection:signature". I'm not a genious but i'm guessing that is what checks the signature or rathere requires it.
I also noticed that there is a keystore file in /system/bin (at least in sense roms ).
That might be where the signature is kept. But I'm thinking that if you disable the requirement for a signature in the android manifest you might be able to resign the apks I haven't tried this yet since I'm sure someone has some feedback annd it's 348 in the morning i'm going to bed

[Q] making system apks Into regular installable apks.

I was wondering how to make a system apk such as idk the browser into a regular installable apk so that someone with no knowledge of pushing apks can install it along side their apk.
Generally system apps are just normal apps, only installed on a system partition. If you pull a system apk from a device, then you should be able to install it normally on any other device.
There are exceptions from this rule:
You can't install an app if you have it installed already. Many system apps are installed on most devices by default and this is the reason, why you can't install e.g. Browser.apk pulled from other device - most probably you have it installed already.
There are 2 solutions: you could remove system app before installation of new one or just replace it - but this isn't what you want. To create normal, installable apk you would have to modify its package name as I did with Google Maps.
Some system apps use system internals, private APIs or privileges, some additional libraries, etc. For example Settings.apk changes internal settings of OS - you can't do that in normal apk.
You can't easily move/install such apps, they're integrated with system.
thanks for this long great reply. So lets say I pulled my dialer apk changed the package name, could I install it on a friends phone NOT on the system partition ?
I'm trying to pull the dialer apk from gingerbread and port it into a normal apk using apk tool, but once and changed the package name and all that and compile it I go to install it on my phone but it says that it could not open it as an apk file. Any ideas?
Newklearx3 said:
thanks for this long great reply. So lets say I pulled my dialer apk changed the package name, could I install it on a friends phone NOT on the system partition ?
Click to expand...
Click to collapse
I think not. Note that Phone.apk is only one app that can dial, you can't add such feature to your own app, so most probably it uses private APIs to do that. It's integrated-with-system one. Same for Settings.apk and PackageManager.apk, but you should be able to pull Browser.apk, Launcher.apk, MMS.apk, Gmail.apk, Talk.apk, etc., change their package name and install on another device.
Ahh, there is one more group: SenseUI, Motoblur, etc. apps, which use additional framework resources: images, colors, texts. They won't work on a device lacking this framework, but it should be possible to make these apps framework-independent by copying all dependencies to app itself. Not that easy, but possible
Brut.all said:
I think not. Note that Phone.apk is only one app that can dial, you can't add such feature to your own app, so most probably it uses private APIs to do that. It's integrated-with-system one. Same for Settings.apk and PackageManager.apk, but you should be able to pull Browser.apk, Launcher.apk, MMS.apk, Gmail.apk, Talk.apk, etc., change their package name and install on another device.
Ahh, there is one more group: SenseUI, Motoblur, etc. apps, which use additional framework resources: images, colors, texts. They won't work on a device lacking this framework, but it should be possible to make these apps framework-independent by copying all dependents to app itself. Not that easy, but possible
Click to expand...
Click to collapse
Dude, you're amazing! So how would I go about porting the gingerbread dialer to workable installable apk?
I might be doing something wrong but I pulled the launcher and changed the package name and still the same error
Okay, i guess I'm not. I copied the apk ( unmodded ) from the rom zip and placed it on my SD card to install it and the same error, so there must be something wrong.
figured out it was the sdk version, got it to show up but wont install now.
im also interested in porting specific development apk, lets say.. CM Settings into a non Cyanogen. Tried that once by pulling CM*.apk and push it to other non Cyanogen but got cant be installed message.. any hints on this?
phoezies said:
im also interested in porting specific development apk, lets say.. CM Settings into a non Cyanogen. Tried that once by pulling CM*.apk and push it to other non Cyanogen but got cant be installed message.. any hints on this?
Click to expand...
Click to collapse
Use logcat as a start to see dependencies
XDA App

Problem with edited APK's - xpost from General

Hi all,
First of all, apologies for the xpost...
Question re: weird behaviour on APK files I've edited according to http://forum.xda-developers.com/showpost.php?p=23923507&postcount=2
I use a couple of apps regularly and have tried modifying them to make the UI suit me a bit better. For what it's worth, one's a Twitter app and one's a keyboard.
I've used apktool to decompile them, edited certain res .xml files to change the interface and then compiled them again with apktool. I've then signed them using Sigare (obviously it's not signed using the original developers key, but a key that I've made)
I've then replaced the apk in data\app with my modified one.
The problem is that, while the new app works for a little white, after a while it just disappears from my app list. When I go to run it directly, I get a message that the app won't load.
TL;DR: apps I've modified work to start with and then don't. Anyone think of a reason?
have you read this answer of mine?
http://forum.xda-developers.com/showpost.php?p=25205513&postcount=239
spirosbond said:
have you read this answer of mine?
http://forum.xda-developers.com/showpost.php?p=25205513&postcount=239
Click to expand...
Click to collapse
I did thanks. Giving it a go now
Arrow Problem with edited APK's (updated
I've tried a couple of things and got these edited APK's to install and work
...initially.
Fire it up the next morning and find that the app crashes
Ideas?

Gallery APK

hello forum
can any1 provide me with the official android gallery apk version 4.2.2 it suddenly stopped working and i deleted it by mistake now when i try to open it it says this application is not installed
my s4 GT-I9505 is rooted...
thanks
can some1 plz help?...its not hard u can use titanium backup.....i think
xweel said:
can some1 plz help?...its not hard u can use titanium backup.....i think
Click to expand...
Click to collapse
Hi,
Look HERE
malybru said:
Hi,
Look HERE
Click to expand...
Click to collapse
this doesnt work....it requires the app to be installed
first it asks me if i want to update the existing built in app, no other option but to choose install then i get the message " app not installed "
thanks
xweel said:
this doesnt work....it requires the app to be installed
first it asks me if i want to update the existing built in app, no other option but to choose install then i get the message " app not installed "
thanks
Click to expand...
Click to collapse
with root explorer move this app to system/app, then fix permission to 744, reboot
xweel said:
this doesnt work....it requires the app to be installed
first it asks me if i want to update the existing built in app, no other option but to choose install then i get the message " app not installed "
thanks
Click to expand...
Click to collapse
Hi,
Go to the market and get "FX File Explorer" + root
Navigate to system/app
Unlock the padlock at the top of the page.
Paste the Gallery app into the folder.
Save.
Reboot
malybru said:
Hi,
Go to the market and get "FX File Explorer" + root
Navigate to system/app
Unlock the padlock at the top of the page.
Paste the Gallery app into the folder.
Save.
Reboot
Click to expand...
Click to collapse
samersh72 said:
with root explorer move this app to system/app, then fix permission to 744, reboot
Click to expand...
Click to collapse
weird, the app was already in that folder.....i still moved the downloaded one though its the same, and i changed permission to 744, nothing changed....btw reboot as in restart?...
edit: now i cant see the gallery icon in the app drawer...
xweel said:
weird, the app was already in that folder.....i still moved the downloaded one though its the same, and i changed permission to 744, nothing changed....btw reboot as in restart?...
Click to expand...
Click to collapse
you ment that it is not deleted!
reboot=restart
samersh72 said:
you ment that it is not deleted!
reboot=restart
Click to expand...
Click to collapse
i thought it was deleted...the icon was in the app drawer...when i tried opening i get the message application is not installed, this happened after i cleared date from the application manager which i forgot to mention or thought it wasnt important..was it important ^^?
thanks
edit: maybe i should delete the .odex file? ..
i think a titanium back file will work...no1 can provide ??....or it wont work.....?
xweel said:
i thought it was deleted...the icon was in the app drawer...when i tried opening i get the message application is not installed, this happened after i cleared date from the application manager which i forgot to mention or thought it wasnt important..was it important ^^?
thanks
edit: maybe i should delete the .odex file? ..
i think a titanium back file will work...no1 can provide ??....or it wont work.....?
Click to expand...
Click to collapse
hey just root your phone with cf root download rootbrowser and replace the downloaded version with the one in system/app
then reboot
Hi guys!
I'm bumping an ancient thread here, hope that's okay with you.
I have this old S4+ lying around. I love it's Gallery app due to the built-in possibility to losslessly trim MPEG-4 AVC (H.264) videos by cutting to nearest keyframe, and also lossless rotation by changing the rotation metadata flag of the MP4 file in question. This simple feature is not implemented in "modern" Gallery apps, or well at least not in the OnePlus 5T I'm using today. So, I was thinking I could extract the .APK from my S4+ (running Android 5.x) and put it in my OP5T (running Android 8.x) without too much headache. Guess if I was wrong.
I get the error about that app was not installed. After browsing around on e.g. ApkMirror, I ultimately found a Samsung Galaxy derived Gallery .APK that I could install, it was a very early version (v1.x.something) which has the cutting feature, but not the rotation (flag changing) feature. So, this ancient Gallery3D .apk installed well, but not the one on my own Galaxy S4+.
So, what could be my issue? Is the .APK flagged to be installed as a system app, and due to my OP5T not being rooted I don't have access too /system/app/, therefor the error? Could it be that simple? If so, is it possible the modify the .APK to install as in /data/app/ instead? Of course I'd resign the APK with some dummy/androiddebug signature afterwards to make installation possible.
Could it be some silly (not really needed) demand listed in the AndroidManifest.xml of the APK in question? If so, is it possible to replace the AndroidManifest.xml with a very "basic" one listing more or less no demands, and re-wrap everything with new signature?
I'm really investigating all my options __except__ for having to root my OnePlus!
I figured that I could get a more specific error message from ADB than by just trying to install the .APK through the phone interface.
So, here goes..
Code:
C:\>adb.exe install F:\Galleri_com.sec.android.gallery3d.apk
adb: failed to install F:\Galleri_com.sec.android.gallery3d.apk: Failure [INSTALL_FAILED_INVALID_APK: Package couldn't be installed in /data/app/com.sec.android.gallery3d-RAEW5FZ4VBWqTWXx48LPmQ==: Package /data/app/com.sec.android.gallery3d-RAEW5FZ4VBWqTWXx48LPmQ==/base.apk code is missing]
What does this tell me?
gewone said:
What does this tell me?
Click to expand...
Click to collapse
The Galaxy S4 and most Samsung devices has a second framework app, twframework-res.apk, that only works with their apps. Here's the fun part: the existing Android framework-res.apk is modified by Samsung so both framework apps are required by a given Samsung app to function. Even better is that you cannot simply port the app and twframework-res.apk to a totally different device and expect it to function. You'd have to port the framework-res.apk as well, and with that apk being a system file, you'd soft brick your device after copying it and rebooting.
The tl;dr here? What you're attempting won't work due to Samsung modifications to Android.

Decompiling and recompiling Maps APK

Hi,
I wanted to decompile, modify XMLs only of the Google Maps app and add one asset, and recompile the APK (only for personal use). I don't need to edit any of the source code. I already tried this process but the package will not install on my Galaxy S5. I just added an extra permission (may not be used since the code doesn't use it) and when I try to install the new APK it tells me that it requires the new permission (which is good), but when I click 'install' it tries to do it but ultimately says "app not installed."
Does anyone have any idea as to what is going on? I understand that once I sign the package with my own keystore, the Google API will stop working. I tried to create my own Google API key that is linked to my keystore, but that didn't seem to resolve the issue. I would appreciate any help from someone who has done this previously.
Thank you very much!
i'll do and tell you the results ...
Sent from my MI 4LTE using Tapatalk

Categories

Resources