Rebuilding App from Device to Android Studio - Android Studio

Hello,
Apologies if that has been answered elsewhere but I have done some searching and haven't found much which is why I came here.
So, I had created an app using Android Studio and deployed it onto my phone which is fine; it works. However, recently, my PC crashed and some data was wiped completely including the files to my app. I want to be able to extract the app files from my phone and essentially redeploy those back into Android Studio. I tried using the Android Device Manager but the supposed "/data" folder is empty. I know the app is installed on the phone's internal storage as I can see it when viewing in Application Manager.
Is there a way to redownload/rebuild those app files back into Android Studio? I am also able to attach a debug process to the app once it's running on my phone but that's about it.
Any help is appreciated!

I had the same problem. After trying numerous methods that didn't work, I realized that I had accidentally changed an option in my "Run Configuration". Here's exactly what I did to fix the issue.
1.Run --> Edit Configurations
2.With your configuration selected on the left panel (mine says "app"), in the General tab on the right panel, 3.there is a section called "Before launch". This section should have an option added called "Gradle-aware 4.Make", but I had accidentally removed it.
5.I re-added it by pressing the "+", then clicking OK in the popup (leave the input box in the popup blank).
6.Click apply.

Thank you damponting44 for the reply.
Editing this configuration seems to be for projects that exists locally on the machine. I'm trying to build/extract from my device as those files no longer exist on my machine and I am trying to get those files from my phone to Android Studio. Also, my "Before launch" setting did already have "Gradle-aware Make".

Rebuilding of existing app
Building of existing app need to be executed with right strategy to over come the parent app. Creating an app like ola, uber and other famous app needs market strategy. Finding out the drawback of the app will help you in creating a clone app.

Related

[Q] Installing Non-Market .apk files?

I have an AT&T SGT. I've been using the beta version of VPlayer from the market. VPlayer is a great app but when I purchased it for $.99 through paypal for the unlocker, the download failed. I emailed Vplayer and they sent me an .apk file for the unlocker but I can't install it.
I've "googled" and got this.
"Download apps for Samsung Galaxy Tab from outside the Android Market
Android apps come in the form of APK files. You can use Google to find free APK files for your Galaxy Tab, then install them using the steps below.
Note: This method should probably only be used by techies or people who really know what they are doing. Installing APK files from some sites can compromise the security of your device.
1. Open Settings.
2. Select Applications.
3. Check Unknown sources to enable app installs from outside of the Android Market.
4. Open Android Market and download and install Astro File Manager.
5. If you used your computer to download the APK file, mount the Galaxy Tab to your computer and copy the APK file to the device. If you used the Browser on the Galaxy Tab, the file should be saved to the device.
6. Open Astro File Manager.
7. Navigate to the APK file location. Tap it and select Open App Manager.
8. Tap Install.
9. Tap Install again"
But my problem is that I cannot comply with step 3. It doesn't give me that option.
I've copied the apk file to my sdcard and installed Easy Installer App from the market to help install it. The Easy Installer App sees the apk file but when I click to install it, it shows:
" FOR SECURITY, YOUR PHONE IS SET TO BLOCK INSTALLATION OF APPLICATIONS NOT OBTAINED FROM ANDROID MARKET."
It give me the option to click the setting button but I can't find the menu to allow installation of non-market apk files.
Thanks for the help.
I don't have the link handy but search SuperOneClickv1.5.5-ShortFuse either in here or Google. Once you've downloaded the file and extract it, click the SuperOneClick.exe file and finally click allow non market apps. I highly suggest rooting your phone first to make it work. I'm sure there's an easier way but since no one has replied to you yet, I'm hoping this could get you started.
--
The above was written as part of an attempt to waste time using a Galaxy Tab,
Rush exMachina
I've installed superoneclick on my windows 7 laptop. THe program runs but when I click allow non-market apps it freezes when it's "waiting for device".
My galaxy tab is already rooted via z4root. I've also unrooted it and trying to root it through superoneclick but it still has the same freezing problem and I have to force to close.
make sure your usb connection is set to debugging then run it again. see if that works.
--
The above was written as part of an attempt to waste time using a Galaxy Tab,
Rush exMachina​
Thanks for the quick reply rush_exmachina. I've tried the debugging mode already. I also tried: http://forum.xda-developers.com/showthread.php?t=803682
"If you're having issues with "wait for device" or if RATC is looping, try this
Unplug your USB Cable
Go to Settings > Applications > Development
Uncheck USB Debugging
Plug in your USB Cable
Unplug your USB Cable
Check USB Debugging
Plug in your USB Cable"
Still no success. I've searched the forums a bit, some SGT owners were successfull with superoneclick and some were not.
no prob. I'm fairly new to the android world myself. I've exhausted everything I know on top of my head but I'll search the forums with you and post whatever I could find here.
Sounds like you may not have the correct USB drivers installed. To test this open a command prompt on your windows computer. Navigate to the same directory you have SuperOneclick installed. In that directory you will see an executable named adb.exe In the command prompt, type adb devices. It should return with a serial number. If not, it can not communicate with your tab. In this case you will need to install the correct Samsung drivers for it to work. Also, as already mentioned, make sure USB Debugging is turned on.
First my english no too good, sorry if don't understand me,i well try,i had this same problem really I could not even root using z4 root since it's not on market no more, well I rooted using superonclick,i did successfully, still my problem about installing apps out of the market....well I did click the install non market apps, and have ther same errors like you then I realized I need give superuser permission so my advice is make sure you give SU permission(this is on your tab, I'm assuming us rooted with su installed) I hope you understood (i said for my english) if not I'm sure somebody here can explain better
Sent from my SGH-I987 using XDA App
Thanks for the reply guys. I will try the command promp method when I get home from work. See if I can get somewhere with that.
As far as permissions I have my SGT rooted via z4root. I went to the superuser app to give permissions...but I don't know enough to do anything with it. I tried adding apps to set permissions but I could not choose anything.
I installed ASTRO app... It looked promising but at the and my SGT still says it's setup to blocking non-market apps. To me that means there should be a setup menu to unblock it.
Thanks again for the help.
Sent from my SGH-I987 using XDA App
GiggleGut said:
To me that means there should be a setup menu to unblock it.
Thanks again for the help.
Sent from my SGH-I987 using XDA App
Click to expand...
Click to collapse
Not on the AT&T version as they specifically block that out. The only method to add it is either via SuperOneClick or modifying the settings file directly. SuperOneClick is the easiest method though as editing the file requires Root Explorer and potential for messing something else up in the file.
FINALLY SUCCESSFULL!! I downloaded and installed my SGT drivers from here.http://samsung-phones-apps.com/samsung-galaxy-tab-usb-driver.html
I also found http://www.androidcentral.com/sideload-android-apps-all-you-want-sideload-wonder-machine
I downloaded from both links and followed the directions and it worked like a champ.
Also make sure your SGT is rooted and USB Debugging is enabled like the guys above are saying.
Thanks Rush_exMachina, cbb77 and denpad2010 for your help.
so is this the only way to accomplish this? i'm trying to install non market apps on my att tab. this way works but it is such a hassle
Setting - Security
1. Open Settings.
2. Select Applications. Select Security instead of Application
3. Check Unknown sources to enable app installs from outside of the Android Market.

[Q] IDEA: Adding cappabilities to app

GoodDayToDie said:
Two problems with that.
First of all, the app's install directory is read-only to the app permissions. You can't create, delete, or modify any file there from within the app (without some sort of "jailbreak" at least).
Second, and possibly more importantly, the permissions sandbox (or "appcontainer") that the phone uses to restrict an app is created at app install. Modifying the manifest is unlikely to have any benefit whatsoever (it certainly didn't help on WP7).
A good idea, though. Always glad to see people checking for such things.
Click to expand...
Click to collapse
As wp8.1 allows to move an app to the sd-card, I think point one should be ok. So how about modifying the app? I plugged my sd-card to the pc but all app files are kind of encrypted..
I tried it with @GoodDayToDie Webserver 0.5.0. http://1drv.ms/1flmBN4
thanks
gipfelgoas said:
As wp8.1 allows to move an app to the sd-card, I think point one should be ok. So how about modifying the app? I plugged my sd-card to the pc but all app files are kind of encrypted..
I tried it with @GoodDayToDie Webserver 0.5.0. http://1drv.ms/1flmBN4
thanks
Click to expand...
Click to collapse
as my phone doesn't support SD Card please send me one of does little apps you moved to sd card (please send a free app to me)
I will check it
but if you want to try adding Capabilities to app then re-write it in the folder it's surely not possible .
application capabilities are all checked and stored in your phone exactly when you install them (from your pc using Developer Unlock or from store)
Le Sigh...
This has been discussed extensively long, long ago. The manifest is only parsed at installation. You can do whatever you want to the manifest afterwards; it doesn't seem to have any effect.
It wouldn't help much anyhow. You wouldn't be able to *launch* a sideloaded app with Interopservices if not interop-unlocked. This can be tested by interop-unlocking a phone, sideloading an interop app, resetting the MaxUnsignedApp value to undo the unlock, and trying to run the app.

[Q] How to recover deleted SDK Manager > Extras items

Hi folks!
I'm very new to android studio and android programming. I'm still mostly setting up the workspace and reading some texts to help me get started.
In the process of upgrading the packages in SDK manager a number of items became flagged as 'corrupt' (or words to that effect).
I figured the best response would be to select them via the check box then 'delete packages' - which I did. I was hoping that the SDK manager would then automatically recognize that they were missing and reload new, clean versions... But I was wrong!
They are missing completely and I'm not even sure what they were nor how many. I'm sure one was "ARM EABI..." but I don't know much else...
How do I get back the complete original listing from which I can install afresh what was missing?
Thanks for looking and any help you can give! :good:
Google "android sdk manager adding sdk packages" and the first link should help you out. Apparently, you are missing 3rd party packages and the links you provided before are no longer valid.

[Q] Interop-unlock Ativ S with latest software (8.1 Update 1 or later)?

Hi,
with all those Lumia posts I'm wondering if it is also possible to interop-unlock a Samsung Ativ S with the latest software (8.1 Update 1 or later) on it *without* a prior downgrade to 8.0 GDR2/GDR3. If it is possible please tell me how or where to find the answer (my search yielded no result so far).
With interop-unlock I mean accessing the 'full' file system and registry and having additional capabilities just like it was/is possible with 8.0 GDR2.
Thanks.
Unblock RPC (file called "Non-production errors.txt" in the Documents folder of the phone, if I recall correctly). There are now two options:
First option: use chamber hijacking.
* Move an app with ID_CAP_INTEROPSERVICES (I like to use HTC's silly "Converter" app; it should still be available on all devices, but other targets are more popular) to the SD card.
* Either sideload or unzip and copy the contents to the SD card an app that uses Samsung RPC to write to the registry. You may need to remove ID_CAP_INTEROPSERVICES from the app before sideloading.
* Use any of the several tools for app hijacking, or do it manually (remove the Hidden and System flags from D:\WPSystem, then rename D:\WPSystem\apps to something like D:\WPSystem\apps1, then delete the files from the install folder of the app that you're hijacking, then move or copy the files from the install folder of the app that uses RPC into the install folder of the app you're hijacking; don't forget to un-rename the apps folder afterward).
* Run the hijacked app; it should by the registry editor app you replaced it with instead, and you can now interop-unlock the phone.
Second option: Use @djamol's "Root Tool" app from the Store, or another app that can modify its own capabilities via SD card tricks.
* Install "Root Tool" from the store; it should show up in Search.
* Move it to the SD card if it wasn't installed there to start.
* Run the app, hit Help, and follow the instructions (several of them are similar to the manual instructions above, but at the end you have to move the app from SD back to Phone before the trick works).
Note that in either case, the EnableAllSideloading app won't work (technically BootstrapSamsung will, but you shouldn't use it since it assumes EnableAllSideloading will be used afterward). Microsoft basically removed the capability that EnableAllSideloading relies on.
Thanks for your reply! So basically the same way works with Ativ S that works with Lumia and you don't need the Samsung diagnosis tool anymore. You just need SamWP8 or a similar tool that uses Samsung RPC after unblocking RPC.
I'll give this a try on the next weekend(s). :good:
Yeah, basically just that. The diagnosis app no longer has the registry editor, and the steps needed to launch to a specific page in an app (such as the reg editor) are technically still possible but are identical to just installing an interop-based registry editor (via hacks), so do that instead.
GoodDayToDie said:
Yeah, basically just that. The diagnosis app no longer has the registry editor, and the steps needed to launch to a specific page in an app (such as the reg editor) are technically still possible but are identical to just installing an interop-based registry editor (via hacks), so do that instead.
Click to expand...
Click to collapse
But after is it possible to unlock all capabilities?
How to interop-unlock now?
Mattemoller90 said:
But after is it possible to unlock all capabilities?
Click to expand...
Click to collapse
I'm curious about that as well.
I tried the second option from (you) GoodDayToDie: It is not possible to use Samsungs Registry Editor component from Root Tool after following the instructions (moved app to SD, deleted the two files, moved stuff from HACK-subfolder to its parent, moved app to phone memory; file "Non-Production Errors.txt" exists in Phone\Documents -- BTW: Is the file name case-sensitive?). The general registry editor from Root Tool works, but with this one it is not possible to write several important keys (e. g. MaxUnsignedApps).
After this I tried the first option: I can successfully deploy CustomPFD (replacing Preview for Developers by hand or with CustomWPSystem). But what to do then?
I tried replacing Preview for Developers with SamWP8, but the app won't start then (getting "Loading ..." for about ten seconds then it closes); also tried commenting some capabilities of SamWP8 and repeating, but has no effect.
Deploying SamWP8 or IO Explorer using application deployment tool obviously fails because of missing interop capability.
This is a fresh and clean installation of WP 8.1 Update 2 now if it should matter.
Any further hints would be appreciated.
My Samsung died months ago (spontaneous hardware failure; I wasn't even hacking on it at the time) so I can't test Samsung-specific things anymore.
The steps as described (by both you and me* *should* work - I assume you rebooted the phone afterwards - so if it's not then I'm confused. The registry editor in Root Tool is mildly terrible and sometimes gives error messages when stuff actually works, but if it's really not working then I'm not sure what you do about that.
As for unlocking all capabilities, that's going to take a little work. The hack used by BootstrapSamsung unlocks one capability, and technically it could be applied to *all* the capabilities, but it changes the registry value type and loses a couple of NULL bytes at the end of the value every time you do it, which is potentially going to break things if you do it to all the capabilities / leave the capabilities in that state for long.
For what it's worth, if you're willing to hard-reset, the OemSettings.reg method mentioned in a few other threads should work too. It requires writing to a normally-unreachable part of the file system, but the Samsung RPCComponent class allows you to do this. I haven't tested it, though, and it does require a hard-reset.
Im interested in this too
If it does not work then what to do if im on 8.1 update already?
@up
AFAIK path is
Unblock RPC Functions proved easy. You just need to create an empty file:
Phone \ Data \ Users \ Public \ Documents \ Non-Production Errors.txt
Click to expand...
Click to collapse
Maybe that's why it didn't worked if you put it just in documents.
I just want to change black/white background-color and accent color in registry. That's all.
Regards
GoodDayToDie said:
My Samsung died months ago (spontaneous hardware failure; I wasn't even hacking on it at the time) so I can't test Samsung-specific things anymore.
Click to expand...
Click to collapse
Ouch, too bad. Would be really useful to have your helping hands on getting this done.
The steps as described (by both you and me* *should* work - I assume you rebooted the phone afterwards - so if it's not then I'm confused. The registry editor in Root Tool is mildly terrible and sometimes gives error messages when stuff actually works, but if it's really not working then I'm not sure what you do about that.
Click to expand...
Click to collapse
I did reboot.
Is there an app with a basic registry editor out there so I could at least change phone manufacturer like I could with Root Tool (Root Tool doesn't seem to be available in the store anymore)?
As for unlocking all capabilities, that's going to take a little work. The hack used by BootstrapSamsung unlocks one capability, and technically it could be applied to *all* the capabilities, but it changes the registry value type and loses a couple of NULL bytes at the end of the value every time you do it, which is potentially going to break things if you do it to all the capabilities / leave the capabilities in that state for long.
For what it's worth, if you're willing to hard-reset, the OemSettings.reg method mentioned in a few other threads should work too. It requires writing to a normally-unreachable part of the file system, but the Samsung RPCComponent class allows you to do this. I haven't tested it, though, and it does require a hard-reset.
Click to expand...
Click to collapse
I tried to use ROMRebuilder, but it just gave me "Failed " when tapping "Backup". But with full file system access I copied OEMSettings.reg zip-file out of the known C:\Windows subdir, extracted the .reg-file, appended all the unlock stuff, repacked and put it back to its original place overwriting the original file (with Root Tool, because in Windows Explorer I didn't have the right to write - Root Tool told me it was successful. I didn't double check ). But after resetting (About - Reset phone) no unlock or access to C:\ was there. Looks like the stock ROM. What went wrong..?
Edit: Used CustomPFD for registry access. Looking at "This PC\Samsung ATIV S\Phone\Windows\Packages\RegistryFiles\OEMSettings.reg" I can see that it is the original file, not my modified one. Is this file restored from somewhere upon reset or did my copy action fail?
Edit2: Tried using vcREG_1_2_BOOTSTRAP (replaced Extras & Info). It gives me an error about missing ID_CAP_INTEROPSERVICES, so it can't do anything.
And CustomPFD can't write MaxUnsignedApp. :-/
Not sure if ROMRebuilder is smart enough to use Samsung's RPC instead of Nokia's for moving the file into place, but regardless it requires interop itself (at least, I'm not sure how it could work otherwise). Root Tool definitely requires interop in order to overwrite Windows files, although it can do so. For the record, for stuff like just reading files or registry values, you can use the (normal-caps) version of my webserver; might be a bit easier.
vcREG should work, assuming it supports Samsung RPC - I think so, but I haven't checked - and you use the whole app hijacking thing correctly. Did you launch the hijacked app after the installation? Pretty sure Extras+Info has interop, so that *should* work.
EDIT: Assuming that the Samsung RPC service is working at all. I don't know of any easy way to test that short of just trying to do things with it, though. I don't think they "fixed" the RPC unblock, though...
GoodDayToDie said:
Not sure if ROMRebuilder is smart enough to use Samsung's RPC instead of Nokia's for moving the file into place, but regardless it requires interop itself (at least, I'm not sure how it could work otherwise). Root Tool definitely requires interop in order to overwrite Windows files, although it can do so. For the record, for stuff like just reading files or registry values, you can use the (normal-caps) version of my webserver; might be a bit easier.
Click to expand...
Click to collapse
Okay, so it probably didn't replace the file at all but only showed a success message. Grmbl. Which file manager would you recommend for moving the file to its place or in general?
vcREG should work, assuming it supports Samsung RPC - I think so, but I haven't checked - and you use the whole app hijacking thing correctly. Did you launch the hijacked app after the installation? Pretty sure Extras+Info has interop, so that *should* work.
Click to expand...
Click to collapse
Ohhh, you mean if I started the app that's about to be hijacked before actually hijacking it? No, I did not. (Not sure what Extras+Info would do on a Ativ S...)
But I do have to?
Edit: Removed Extras&Info (with dummy.xap), installed it again, started it (it actually works) and replaced it with vcREG_1_2_BOOTSTRAP.xap. Started vcREG, but it still gives me "error initializing. check if you have correct permissions (ID_CAP_INTEROPSERVICES). registry functions disabled".
I've also deployed CustomPFD and original preview for developers to sdcard. I have access to the registry but can't write values
Have you tried to hijack Extra+Info permissions with CustomPFD? It does not work with original PFD but it may work with Nokia one. I can't find Extra+Info xap to test, sorry.
Ok tried to deploy ROMRebuilder and hijack original PFD permissions. ROM Rebuilder just crashes on start (no message) WP 8.1 14157.
Installed ROMRebuilder with deleting Capabilities from xap and deployed it from deployment tool.
Manually removed PfD with SD hack and replaced it with ROMREbuilder.
It starts but when pushing "Backup" it says FAILED
Jesus im so tired with this phone...
ROM flasher does not work at 8.1 x64 even with test mode..
Ezio21 said:
Have you tried to hijack Extra+Info permissions with CustomPFD?
Click to expand...
Click to collapse
Yes I have. CustomPFD doesn't start in this case (it does when I'm replacing Preview for developers).
cerebos said:
Edit: Removed Extras&Info (with dummy.xap), installed it again, started it (it actually works) and replaced it with vcREG_1_2_BOOTSTRAP.xap. Started vcREG, but it still gives me "error initializing. check if you have correct permissions (ID_CAP_INTEROPSERVICES). registry functions disabled".
Click to expand...
Click to collapse
Your phone can't initialize Lumia RPC.
So what can we do?
What apps are there that use Samsung RPC to write to the registry? I know SamWP8 and IO Explorer. Any more?
@cerebos
Huh im sorry but it seems that only one way to get that Interop unlock is to flash GDR3
I flashed GDR3 but there is NO WAY to unlock your phone anymore. WP 8.0 developer registration is down. You can't install developer unlock helper and can't interop unlock your phone.
Also because of Samsung firmware update you can't install custom rom on wp8.0
How to interop unlock WP 8.0 without developer unlock? Any way? Or we're locked forever?
As far as I know you can still use beta apps on windows store. Is there anyone with personal developer account reading and could upload Interop_Unlock_Helper_Debug_ARM.xap as BETA to the store and send me the link? I would be very grateful (
@-W_O_L_F- maybe?
We're in very bad situation now. Thanks for any help or advices
Based on the Posting here (by @-W_O_L_F-) it looks like 8.1 Update 2 can't be interop-unlocked. So I'll need to downgrade first.
Edit: Assuming vcREG could write to Samsung Registry is only true for a small set of values, it is never true for interop-unlock. For this you need a registry editor with Samsung's RPC components.

Deployed .xap success but some don't show up in App list

I've deployed a couple custom .xap apps to my Lumia 640 with the Windows SDK after unlocking and having success following this thread http://forum.xda-developers.com/windows-phone-8/development/xap-vcreg-lumia-reg-editor-live-interop-t3135326.
What is baffling me is that some show up on the list of apps after seeing 'deployed successfully' with SDK deployment tool but one does not show up. I've deployed some after that and they show up and have retried the one which does not show up but while deployment says success it never shows up on the list. That one is the Rom Rebuilder. How can I run this App or get it to show up on the App list? Heavy Android user new to WP but learning fast .....
Settings, extras....
Got it - I misunderstood what you were referring to initially but I see it now under settings > extras. Thanks!
I tried doing a backup of the OEMSettings.reg with the ROMRebuilder but it says 'Failed'. I ran WPCustomSystem to enable SD card permissions and tried again but it still fails.
Oh well I just backed it up manually since I have root access. Windows\Packages\Registryfiles\oemsettings.reg copied to pc and to SD card backups along with software.reg and other .reg files while I was at it.

Categories

Resources