[Q] How to Embedding a custom APK inside Android 11 Stock ROM as part of the System? - Android Q&A, Help & Troubleshooting

Hello all,
my Question is:
How to Embedding a custom APK inside Android 11 Stock ROM as part of the System?
I want this APK to survive a Reset to factory settings and to be installed again as part of the system no matter how many times I reset to factory settings or wipe/format the device!
My device is: Samsung SM-M315F/DSN
should this APK goes inside:
"system\system\priv-app" or "system\system\app" or "/product/priv-app/" or "/product/app/"
I need help achieving this please on Android 11?
I can Root my Device if it's needed at first, but the idea is after I do all the necessary steps for embedding this APK into system that I'll UNROOT my device.
thats it. I hope to find help please.
thanks.

If you wipe / format an Android device by nature all data housed therein are lost - Android OS included, hence it doesn't matter where the APK in question gets installed to.

but jwoegerbauer, when I reset to factory settings android device already gets back to system defaults and preinstalled stock apps!
thats what I need, is to make my APK part of the stock apps, so when I reset to factory its installed as well.
eg. same like google play store, samsung members, galaxy store, etc.
these apps above are part of the system and no matter how many times u reset, they will be installed.
thats my idea..
and btw, thx for your ADB-FASTBOOT-INSTALLER

Correct: A Factory Reset does NOT affect Android's core components such as system-apps ( along with apps pre-loaded by your carrier and/or manufacturer into the system partition ).
So converting / installing an user-app to / as a system-app might be a good idea. But this requires device's Android must got rooted.

it is rooted already but thats not the idea.... coz it's very easy.. all I need to do is using a root file explorer and create a folder with the apk file in it inside app folder inside /system/system/app or /priv-app or /app and give proper permission to folder and to file inside it and reboot and this APK will be installed and be part of the system and even with reset it'll keep be installed
this is not what I'm aiming for or is not my question.
my question is for EDITING stock rom itself and embedding this APK inside it, without the need to root
or
even if I do so with this APK using root method, I then need to UNROOT my device, and if I do so, this private or user APK I installed/embedded will be lost.
and I dont want to lose it.

any help?
used CRB doesn't help and now S.U.R says Format not supported!

Related

[Q]How can I get stock apps back to stock rom system/app

So I have Stock 2.1 rom htc Hero rooted with 1 click root. (Vista x64 and cant sync but the app inventor works fine)
I needed the space (thought I did, in the end I didnt)
And via titanium backup I uninstalled the stocks and stocks widget(without a backup). Now I got them from a very nice guy in apk form but I need also ODEX files to it.
I have a friend with the exact rom as me. BUT he doesnt have root and I am not sure I will be able to get root from him.
So any way to get the apk + odex without root? . And if no. How is the root way?
But cant push them back to the system.
He suggested I do it with the adb thingy but the first step:
adb remount -a
does this
when set change only = device not found
+ USB debugging = operation not permitted
Then I read here somewhere to try to install and move them to the system/app
But "application not installed" when trying to install
Bought yesterday the root explorer and was thinking to just move them to the system/app. Would it do some damage? Or just dont work? Or maybe work?
As you can see I dont have any idea what linux and android is about so I dont know what that move would do or anyone has any other idea how I could do this? (Without flashing )
And why I need it. There is a new update coming 405.2 with the G-sensor calibration tool (htc wrote me to get it) . But here somewhere I read that it wont install since in the package are updates for ALL apps even stocks.
I cant do much more to this hero, since its still in warranty (and kinda not mine ) And I know more of this is posted here, and I tried to get some answers in some other threads, but no luck.
If I know the 405.2 will go on without the stocks and stocks widget installed , I wont even need this. But I cant be sure or did actually someone try this?
And thanks for any answer and sorry for doubleposting.
I have created an UPDATE.zip without stocks, because I hate It and had removed from ny ROM too.
If You need It I can send You a link.
Perdita2000
Sent from my HTC Hero using XDA App
perdita2000 said:
I have created an UPDATE.zip without stocks, because I hate It and had removed from ny ROM too.
If You need It I can send You a link.
Perdita2000
Sent from my HTC Hero using XDA App
Click to expand...
Click to collapse
Perdita, I wouldnt know what to do with the update.zip . If it involves adb.exe on the stock rom as described it didnt work. Also if I might to know.
Will I loose the future OTA update capability?
Will I loose warranty in some way?
Will I loose root?
And is your version compatible with mine? Meaning the locale files, languages etc?
Btw what would the original OTA do to my stock rom if it wont find the app? Will it boot into the recovery as did for the one guy in the thread before? Or it would just skip the files?
If it really just dont patch what it wont find I would wait
Perdita you seen the update what else is fixed as just the G-sensor, since that I fixed now manually and if thats the only change, no need for me to update kinda?
Latest PATCH updates about 100 files, so I don't think it shows changes G-calibration. I think that if you remove stocks with root, you will have errors with every patch that updates those files, so OTA updates that touches those files will fail too.
You will loose root for a while because you must re-root again (in my case I have update superuser application too).
About warranty, I don't know if you have root, and removed some applications from Stock ROM, you will have problems with warranty now?¿?¿?
Perdita2000,
Well with the one click root and unroot I wont loose the warranty .
So perdita . you sau I wll get errors. But that means I will brick my phone? Wont boot or just wont update? Or just errors and will upadte and skip files.
And thanks for the answer
You can't not update using standard OTA because it will try to patch files missing on your phone. That's all, you can't use HTC patches if you removed software to be patched...
I have tried and... files are not skiped, UPDATE just doesn't install...
Perdita2000,
Ah thanks soo much for the info When I get out of work I will bug you more
Perdita thanks for your asisstance .
But I was luckily able to get the apps back.
here is how (all at own risk!):
1. Find them . I found a suitable original non patched rom and extracted the apps I needed, in my case , STOCKS and WIDGET both APK and ODEX
2. Copy them with ROOT explorer to SYSTEM/APP (mount in RW)
3. Change permissions so they are the same as the other apps in that directory
4. Reboot (once or twice)
Maybe even the sense cache to erase and you have them back
This is what worked for me since I had no luck with the adb.exe :/
Now I am running the new update ....405.2 with ROOT and Stock rom (still with warranty )
Thanks PAGOT, but I'm running my own custom ROM without a lot of unusefull apps for me and a added apps and custom kernel to, so I want to update just files I have on my rom that's why a told you to use a custom UPDATE.zip.
Perdita2000

[Q] Huawei U8652 no keyboard!

I've searched EVERYWHERE and I just can't seem to restore my phones keyboard.
I have an AT&T Fusion, AKA the Huawei U8652, and I successfully rooted it.
I currently have an iPhone 4S, so I was trying to use the Fusion as a sort of Android "iPod", so I downloaded a Terminal Emulator and started deleting unnecessary applications and bloatware, and any phone-related apks (and another type of file that I cannot remember), since I figured I wouldn't need them.
I deleted these apps from the System folder, which usually is read-only, but I gave myself temporary RW access via the command:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4/system
which allowed me to delete apps, and after deleting a few, my keyboard disappeared. I believe there was a pop-up about Google Services Framework crashing, but I had that happen prior to losing the keyboard after I deleted an app, and nothing seemed wrong.
I reset the phone to factory default to try and get the keyboard back, but nothing changed.
Now I'm on the activation screen, and clicking the Android does nothing, nor does clicking emergency dial, so there is no way I can bypass the activation screen via dialing numbers.
Since I reset the phone to factory default, I think I lost my root-access, so when I try to install a custom recovery image, the phone isn't recognized, and I cannot access the phone to enable USB-debugging so I can root the phone again.
I've gone into the recovery menu and deleted the cache, and data, and did a few factory resets, and nothing has changed.
Is there ANYTHING I can do? I believe I was on 2.3.5, so is there like a stock ROM I can download that I can install via the regular recovery menu?
The worst part about this is I only tried deleting the bloatware because I couldn't figure out how to install a custom ROM, but while looking for solutions to this problem, I figured out how to install custom ROMs on my phone...
Any help would be greatly appreciated, thanks in advance.
EDIT: I tried to install a supposed stock ROM on it, but it acts as if I'm installing a custom ROM, giving me a verification error, which leads me to believe its not a stock ROM. Is there anyway I could download the stock firmware and install it on my device as to restore the missing files? Also, would I need a valid AT&T SIM card to do any of this?
I did some googling, and it appears on many websites that the U8650 (Sonic) is almost identical to the U8652 you have. I can't tell you whether flashing sonic roms on your fusion is safe or not, but at the very least, if you can get your phone working with ADB, you can extract the sonic rom's zip and just push the apks you removed onto your phone. I can't guarantee it will work, but I don't see why it won't.
If you do try this, let me know how it works.
Hope that helps..
Edit: Oh, and you do not need a SIM card to flash ROMs onto your phone.
Edit: I just saw that you found a supposed stock ROM; perhaps try pushing apks from that?

[Q] Jellbean 4.3 App Deleted

I just bought a Samsung Galaxy S3 SGH-T999L with Android 4.3, then downloaded Titanium Back-up, and then started removing several apps (in an attempt to strip the bloatware). Now when I go to Google Play and try to install a new app, I click the "Install" button and wait for the progress meter to reach 100%, but no "Open" button appears afterward (which used to happen). When I search my phone, there are no icons for any of the new apps I try installing.
Does anyone know which app I deleted that caused this problem? Thank you.
Put back you're nandroid backup. (I assume you make one before you start deleting some apps.)
Or flash a stock rom back without whipping. So you dont lose some data.
Send From A Devil3 - f2fs - Dualboot Jb4.3/cm11 Powered Machine
Have you tried rebooting the phone?
if you have installed TB then you have rooted the phone obviously. Explore your data folder from the root directory using TB or any advanced file explorers like Root explorer or Es file explorer. Find the apk files of the apps you have installed just to verify if your play store has downloaded the apps to your phone.
Also are you sure if you removed only bloatware or any core apks related to your android system... like eg: application provider.apk
I did not make a backup. Before flashing a ROM, I wanted to post here and see if anyone knows what app being deleted caused the behavior I described. That's what I'm wondering: Do you know which specific app being deleted would cause Google Play to have the described problem? When I try to install a new app, it gets to "100%" on the status bar, but subsequently fails to display the "Open" button. Everything else on the phone works flawlessly and I put a lot of time into customizing the phone with apps I like.
Having said that, I am curious about the option to flash a ROM that you mentioned. The reason I did not want an Apple phone is because they seemed to restrictive of options and freedom. But lately I am thinking about Google censoring AdBlock from Google Play, the EFF's criticism of doing away with AppOpps, and shoving Google+ down the throats of YouTube users. So, I looked into Cyanogen but my model of phone was not listed on Cyanogen's website for phones tested to work. I am interested to exploring the idea of flashing a ROM (which I never did before) but I definitely want to keep my 4G LTE functioning via T-Mobile. Any ideas?

[PLEASE HELP] how i can modify a rom ? there're some problems...

hello
i have some problems with a rom based in Cyanogen 7 ( it's no official)
the keyboard is small...
there is in some way to modify it and make it bigger?
another thing is that i would like to pass apks from my pc to my htc wildfire s but there's no way the system android don't detected them
the good things is that I got 2.00 GB of free internal memory and is supposed it was installed directly to the sd , so I would like to improve and not change the rom
to prevent spam i can't put the link to download the rom , so the person who was interesed please send me a message
the rom is from another foro in spanish called htcmania
someone could help me?
thanks a lot !
The Keyboard can be changed by searching for another keyboard.apk for your phone, U can update it with google Play, or Aptoide.
Then the app problem, so you can't copy apks to your phone? and your phone doesn't install apps to sd?
Try the app:
apps2sd
or
connect your phone with your computer, install adb drivers
type in your path to yourAndroid SDK installation at Step 1:
Step 1: cd C:\android-sdk-windows\platform-tools
Step 2: adb devices (it should say there's a device listed when your phone is connected!)
Step 3: adb shell
=> A $ sign should pop up
Step 4 :pm setInstallLocation 2 (or, new syntax : adb shell pm set-install-location 2)
Another $ should pop up
MrMaddTraxx said:
The Keyboard can be changed by searching for another keyboard.apk for your phone, U can update it with google Play, or Aptoide.
Then the app problem, so you can't copy apks to your phone? and your phone doesn't install apps to sd?
Try the app:
apps2sd
or
connect your phone with your computer, install adb drivers
type in your path to yourAndroid SDK installation at Step 1:
Step 1: cd C:\android-sdk-windows\platform-tools
Step 2: adb devices (it should say there's a device listed when your phone is connected!)
Step 3: adb shell
=> A $ sign should pop up
Step 4 :pm setInstallLocation 2 (or, new syntax : adb shell pm set-install-location 2)
Another $ should pop up
Click to expand...
Click to collapse
i installed a new keyboard and the adb drivers but the problem with the apps continues i mean i can't copy apks download from my pc to my phone with a modified rom, the phone doesn't detected them.
for example i tried to download and put in my phone some apk who play store deleted for obvious reasons it is droidsheep XD
however i can download and install apks who are in play store , it is strange...
thanks for your reply ^^
Did you turn on unknown sources in Settings>Security settings ? This allows you to install apps which are not from the play store...
If this is not the issue, you should check google settings( the grey cog with a g in it ), google got this feature which blocks apps, there should be a function in these settings which stops checking your apps that you install.
MrMaddTraxx said:
Did you turn on unknown sources in Settings>Security settings ? This allows you to install apps which are not from the play store...
If this is not the issue, you should check google settings( the grey cog with a g in it ), google got this feature which blocks apps, there should be a function in these settings which stops checking your apps that you install.
Click to expand...
Click to collapse
okey , i will check the google settings , anyway i am sick of this rom ... some apps like google play are continually restart
and a few days later I have noticed that the apks who i want to install from the google play (when it's installed ) restart the phone
that rom have some bugs...
thanks for the reply , but i will not continue with this rom , i make another post asking how i can change modified rom to oficial rom in the htc wildfire s , i don't find anything for this phone in google ...
thanks a lot ^^
Allright, well the problem could lie in your gapps, a corupt google play service can cause alot of trouble and Force Closes on your phone, also when you installed yothe mod, did you wipe everything? (Dalvik cache, Data, cache ...) Don't have the phone so can't test anything, might do some research tho
good luck further!
MrMaddTraxx said:
Allright, well the problem could lie in your gapps, a corupt google play service can cause alot of trouble and Force Closes on your phone, also when you installed yothe mod, did you wipe everything? (Dalvik cache, Data, cache ...) Don't have the phone so can't test anything, might do some research tho
good luck further!
Click to expand...
Click to collapse
yes , about the custom rom i wipe everything so i think that was a fault from the chef T_T
pd: do you know how i can change modified rom to oficial rom in the htc wildfire s ?
thanks for your reply again :fingers-crossed:
Well I don't really understand what you mean, but the thing I understand out of it is that you want to go back to a stock Firmware or Rom?
I'd recommend backing everything up firstly (don't forget all your contacts!) .
Then go into recovery and do a factory reset / or Data, Dalvik cache & cache Wipe... (system should be wiped for modified stuff like battery improvements, added scripts, etc. ...)
& that's it for going back to your stock rom.
If you want to go back to stock firmware you should search what type of phone you have (the nickname , single sim or dual sim , all this) and look for stock firmware (.ftf Files)
To get this flashed on your phone you gotta use a flash tool and a computer.
For further information you should read some tutorials on how to flash firmware.
MrMaddTraxx said:
Well I don't really understand what you mean, but the thing I understand out of it is that you want to go back to a stock Firmware or Rom?
I'd recommend backing everything up firstly (don't forget all your contacts!) .
Then go into recovery and do a factory reset / or Data, Dalvik cache & cache Wipe... (system should be wiped for modified stuff like battery improvements, added scripts, etc. ...)
& that's it for going back to your stock rom.
If you want to go back to stock firmware you should search what type of phone you have (the nickname , single sim or dual sim , all this) and look for stock firmware (.ftf Files)
To get this flashed on your phone you gotta use a flash tool and a computer.
For further information you should read some tutorials on how to flash firmware.
Click to expand...
Click to collapse
i was talking about the firmware , but i called it oficial rom sorry xD
in a spanish foro called htcmania the moderator told me: You can only install an equal or higher version .
the rom has a version 2.3.7 and the firmware that i would like to install has a 2.3.5 version
anyway, there was a tutorial who explain how downgrade the version of the rom?
thanks ^^
Well you can downgrade, if it is availble for your phone... Better so some more research regarding your phone and just try it.

Permanently deleting system apps from android - root or ROM modification?

Hey there I am looking to permanently delete certain system apps from my phone and my question is how to ensure that even factory reset will not re-enable them.
My question is whether this can be achieved purely with rooting a device and using superuser tools or whether this requires flashing a custom-built ROM that has had the undesired packages manually removed.
Any insight greatly appreciated!
Thanks

Categories

Resources