[Q] Sideload APKs to /System - Droid Turbo 2 Q&A, Help & Troubleshooting

This is going to be an incredibly stupid question, but things have changed and I cannot figure out what is going on.
On my previous phone (Jellybean) I was able to simply sideload system APKs by copying the appropriate file to /system/app, setting permissions and rebooting.
On my Force, when I go to /system/app, I see a list of folders, which look like they have individual APK files +others in them. If I follow the same procedure as before and copy the apk to that /system/app directory, set perms and reboot the APK does not show up.
What am I doing wrong? Is there a different procedure to copy over APKs on Lollipop?
PS: I have also tried copying to /system/priv-app & setting perms with no luck either.

Related

Help with compiling apk for framework-res

I am trying to create a custom theme, by modifying the framework-res.apk. I have been successful in porting some really cool .png files, but my problems start with the de-compiling & recompiling the .apk so I can modify the .xml & .9.png files. It seems every time I recompile my .apk it sends me in to a boot loop. I have used both APKTool and APK Manager with no luck. Here are my steps:
APK Manager:
1. Use a root explorer to copy the framework-res.apk.
2. Paste the file on my sd card.
3. Copy the file and paste it in the "place-apk-here-for-modding" folder.
4. Choose option 9 for compile.
5. Open the .xml file with Notepad++.
6. Recompile .apk using option 11.
7. Yes to "is this a system file?"
8. Yes to "keep original files & signatures"
9. Delete the files I modified from the "keep" folder and the resources.ascr file.
10. Finish the build of the .apk.
11. Copy & paste the modified .apk back to my sd card.
12. Rename the file from unsigned-framework-res.apk to framework-res.apk.
13. Use root explorer to cut & paste the modified to my /system/framework folder.
14. Reboot.
I now end up in a boot loop what am I doing wrong??
Rockstar52 said:
I am trying to create a custom theme, by modifying the framework-res.apk. I have been successful in porting some really cool .png files, but my problems start with the de-compiling & recompiling the .apk so I can modify the .xml & .9.png files. It seems every time I recompile my .apk it sends me in to a boot loop. I have used both APKTool and APK Manager with no luck. Here are my steps:
APK Manager:
1. Use a root explorer to copy the framework-res.apk.
2. Paste the file on my sd card.
3. Copy the file and paste it in the "place-apk-here-for-modding" folder.
4. Choose option 9 for compile.
5. Open the .xml file with Notepad++.
6. Recompile .apk using option 11.
7. Yes to "is this a system file?"
8. Yes to "keep original files & signatures"
9. Delete the files I modified from the "keep" folder and the resources.ascr file.
10. Finish the build of the .apk.
11. Copy & paste the modified .apk back to my sd card.
12. Rename the file from unsigned-framework-res.apk to framework-res.apk.
13. Use root explorer to cut & paste the modified to my /system/framework folder.
14. Reboot.
I now end up in a boot loop what am I doing wrong??
Click to expand...
Click to collapse
You have to sign it with 12
Lenn said:
You have to sign it with 12
Click to expand...
Click to collapse
Tried it, still boot loops at the Archos screen. I then have to do a complete format & wipe reinstalling the SDK, firmware, and the root files. I don't get it.
Lenn said:
You have to sign it with 12
Click to expand...
Click to collapse
Do not sign frameworks! How many time do I have to say this! System apps do not get signed...
Now, as far as the framework, there's two things to check. First, what XMLs have you edited? Second, instead of using root explorer to copy the framework, connect to a pc and use adb to perform these commands:
Code:
su
stop
cp /system/framework/framework-res.apk /system/framework/framework-res.old
cp /sdcard/framework-res.apk /system/framework/framework-res.apk
chmod 644 /system/framework/framework-res.apk
sync
start
If it continues boot-looping, you will still be connected through adb, so you just
Code:
stop
cp /system/framework/framework-res.old /system/framework/framework-res.apk
sync
start
and it will come back up without having to reformat or anything.
If it's bootlooping even when you use the adb method to copy, then your XMLs must be reencoding incorrectly. Post a list of all XMLs you have changed.
msticninja said:
Do not sign frameworks! How many time do I have to say this! System apps do not get signed...
Now, as far as the framework, there's two things to check. First, what XMLs have you edited? Second, instead of using root explorer to copy the framework, connect to a pc and use adb to perform these commands:
Code:
su
stop
cp /system/framework/framework-res.apk /system/framework/framework-res.old
cp /sdcard/framework-res.apk /system/framework/framework-res.apk
chmod 644 /system/framework/framework-res.apk
sync
start
If it continues boot-looping, you will still be connected through adb, so you just
Code:
stop
cp /system/framework/framework-res.old /system/framework/framework-res.apk
sync
start
and it will come back up without having to reformat or anything.
If it's bootlooping even when you use the adb method to copy, then your XMLs must be reencoding incorrectly. Post a list of all XMLs you have changed.
Click to expand...
Click to collapse
I do have my system set up for adb, but for some reason it don't read my A101, it works fine for my phone. The device manager shows my A101 listed as a Gen8 ADB Device, but it don't show up when i use the command: adb devices.
With your help I did manage to replace all of the stock .png's. I also found that I don't need to edit the .xml files to do what I want to. Thanks, for so much of your help! Although I would like to replace the .9.png's also and I understand that you must de-compile the .apk in order to do so. this way I could build a custom theme.
Rockstar52 said:
I do have my system set up for adb, but for some reason it don't read my A101, it works fine for my phone. The device manager shows my A101 listed as a Gen8 ADB Device, but it don't show up when i use the command: adb devices.
With your help I did manage to replace all of the stock .png's. I also found that I don't need to edit the .xml files to do what I want to. Thanks, for so much of your help! Although I would like to replace the .9.png's also and I understand that you must de-compile the .apk in order to do so. this way I could build a custom theme.
Click to expand...
Click to collapse
Have you done this yet(from the archos support site):
Windows: echo 0x0e79 >> "%USERPROFILE%\.android\adb_usb.ini"
Macos: echo "0x0e79" >> ~/.android/adb_usb.ini
Linux: echo "0x0e79" >> ~/.android/adb_usb.ini
And disabled/reenabled debugging on the tablet?
msticninja said:
Have you done this yet(from the archos support site):
Windows: echo 0x0e79 >> "%USERPROFILE%\.android\adb_usb.ini"
Macos: echo "0x0e79" >> ~/.android/adb_usb.ini
Linux: echo "0x0e79" >> ~/.android/adb_usb.ini
And disabled/reenabled debugging on the tablet?
Click to expand...
Click to collapse
No but I will give it a try and report back.
None of my changes are taking effect??!
Still not working, just a question. I am running Win7 64bit could this be the problem?? Do I need to be on a 32bit system to do the decompiling, compiling?
Tried on my wife's 32bit system still the same. For some reason it's not compiling the .apk right.
Rockstar52 said:
I am trying to create a custom theme, by modifying the framework-res.apk. I have been successful in porting some really cool .png files, but my problems start with the de-compiling & recompiling the .apk so I can modify the .xml & .9.png files. It seems every time I recompile my .apk it sends me in to a boot loop. I have used both APKTool and APK Manager with no luck. Here are my steps:
APK Manager:
1. Use a root explorer to copy the framework-res.apk.
2. Paste the file on my sd card.
3. Copy the file and paste it in the "place-apk-here-for-modding" folder.
4. Choose option 9 for compile.
5. Open the .xml file with Notepad++.
6. Recompile .apk using option 11.
7. Yes to "is this a system file?"
8. Yes to "keep original files & signatures"
9. Delete the files I modified from the "keep" folder and the resources.ascr file.
10. Finish the build of the .apk.
11. Copy & paste the modified .apk back to my sd card.
12. Rename the file from unsigned-framework-res.apk to framework-res.apk.
13. Use root explorer to cut & paste the modified to my /system/framework folder.
14. Reboot.
I now end up in a boot loop what am I doing wrong??
Click to expand...
Click to collapse
With ApkManager did you delete the 'public.xml' folder in ..\res\values ?
waterpolo said:
With ApkManager did you delete the 'public.xml' folder in ..\res\values ?
Click to expand...
Click to collapse
No, I did not. Was I supposed to?
EDIT: Ok I did some digging and what I have found is that the file size of the original framework-res.apk is 9.32mb. Once I rebuild it whether I modified anything or not the rebuilt .apk is only 7.34mb. Upon further inspection it seems to leave out all of the "value" named folders from the newly built .apk, and it does this whether I use APKTool or APK Manager(even though I say keep files). Has anyone else had this problem?
IM having the same problem,no solution though ! i edited bools.xml but after recompiling its not there ! Anyone solution ?

Odex>Deodex>Permissions

I'm with the latest Lollipop rom for the n910F. I thought in deodexing all my system apps and framework so I pulled out through adb my system/app, system/priv-app and system/framework. Deodex every file and then in TWRP (twrp file manager) delete the original (odex) app, priv-app and framework folders and replace those folders with the deodexed ones previously copied to my sdcard. After that fix permissions and detete cache and dalvik and reboot.
Everything work fine, the rom boots normally and all works but now although I had fix permission in TWRP my app, priv-app, and framework folders and all files inside have rwx-rwx-rwx permissions.
Is there any problem to have permissions like that?
How can I fix these folders/files permissions?
Thanks
Answering myself have all the possible permissions on is not a problem (maybe a security one...) at least the rom run without problems. But using Total Commander I've corrected all the permissions.

How to Deodex Lollipop 5.1.1 (10.7.A.0.222)

Hey guys! Since deodexing older Z series phones with this latest update has been a pain in the *** for deodexing here's a detailed guide on how to get a correctly deodexed system folder and avoid bootloops...
First part: Getting files from the phone.
To get the files from our phone first we'll have to install ADB Drivers, you can find them here on xda or go google it. Once you have adb drivers installed go to the folder where you installed them. Press Shift while right clicking on the folder and select Open command promp.
Here are the commands to get the folders with apk, note that you'll find them in your C:\ folder.
- To get app folder:
Code:
adb pull /system/app /app/
- To get framework folder:
Code:
adb pull /system/framework /framework/
- To get priv-app folder:
Code:
adb pull /system/priv-app /priv-app/
You will get apk's only on app and priv-app folders, the only folder with odex files (arm folder) will be framework.
------------------------------------------------------------------------------------------------------------
Now let's go for sqsh files to get odex files for app and priv-app folders.
- To get odex.app.sqsh:
Code:
adb pull /system/odex.app.sqsh
- To get odex.app.sqsh:
Code:
adb pull /system/odex.priv-app.sqsh
You'll find these files inside the same folder where adb.exe is
Second part: Unpacking .SQSH files
To resume a little, you may refer to IaguCool's guide
Once you have downloaded SquashFS Tool, move both .sqsh files to the folder.
When you have opened the command promp use these codes to extract files...
> To get odex files for app folder (After extracting rename the squash-root folder to app):
Code:
unsquashfs -no-xattrs odex.app.sqsh
> To get odex files for priv-app folder (After extracting rename the squash-root folder to priv-app):
Code:
unsquashfs -no-xattrs odex.priv-app.sqsh
Third part: Merging files
Create a folder named system and move app, framework and priv-app folders from C:\ to the new folder.
After that grab the folders you extracted with SquashFS Tool and merge them with app and priv-app folder.
After doing this move SemcGenericUxpRes folder to priv-app folder
Fourth part: Deodexing
Download JoelDroid's Lollipop Batch Deodexer and replace the file named oat2dex.jar found on /tool folder with this one: Latest oat2dex
Then open the program and select the /system/ you've created to start the process.
Once it has finished, grab SemcGenericUxpRes folder and move it back to /framework
Now you can either replace folders manually on your phone using TWRP by moving the deodexed system folder to your phone and mounting System partition, erasing app, framework and priv-app folder and then pasting the ones from the deodexed folder. OR make a flasheable zip.
How to manually move folders to /system partition
> Boot to recovery (TWRP MANDATORY)
> Mount system partition
> Go to file manager and go to: /system/ partition
> Manually delete app, framework and priv-app folder (you must first open the folder, then open the menu and delete)
> Then go to where you put the deodexed folders, open app folder, open menu, choose copy and paste on /system/ folder, same process for priv-app and framework.
> Once you're done go to Wipe option, choose advanced wipe and wipe Dalvik-cache and cache.
> Boot and you're good to go! No need to fix permissions
In both cases, after you have either flashed or replaced the folders, go to Wipe option > Advanced Wipe and clean Dalvik-cache and cache to avoid problems.
Does it have issue with OpenGL and Play Store?
Sent from my D6503 using Tapatalk
RyTekk said:
Does it have issue with OpenGL and Play Store?
Sent from my D6503 using Tapatalk
Click to expand...
Click to collapse
No, that's why you need to download latest oat2dex version See deodexing part
Why not just copy App, priv-app and framework folder from system and deodex them?
Black_Eyes said:
Why not just copy App, priv-app and framework folder from system and deodex them?
Click to expand...
Click to collapse
Cause you get bootloop if you just replace odex files present in app and priv-app (Especially after replacing the deodexed framework folder in system).
If you extract via adb you'll get app and priv-app folders clean, without odex files. That way you can make a cleaner deodex since you don't replace .odex files, just merge both folders in one, app with .apks and app with .odex
I wish it was as easy as in 5.0.2 but no, on 5.1.1 is way more complicated to have a properly deodexed system.
BTW i've tried by deodexing manually by copying folder and then boot into recovery delete app, priv-app and framework folder via TWRP file manager and then flashed the deodexed zip and it worked
C:\adb>adb pull /system/odex.app.sqsh
remote object '/system/odex.app.sqsh' does not exist
C:\adb>adb pull /system/odex.priv-app.sqsh
remote object '/system/odex.priv-app.sqsh' does not exist
help
Everything was fine except google play services, it crashes every time i want add account
Perfect work @xkeita ,
I saw you asking so many guys about deodexing .222 firmware these days and finally you managed!
Great work, great tutorial. I will try asap.
could you provide the zip? or the zip from this thread http://forum.xda-developers.com/sprint-galaxy-s5/general/how-to-deodex-lollipop-rom-t3065596 can be used?
zyclops1 said:
C:\adb>adb pull /system/odex.app.sqsh
remote object '/system/odex.app.sqsh' does not exist
C:\adb>adb pull /system/odex.priv-app.sqsh
remote object '/system/odex.priv-app.sqsh' does not exist
help
Click to expand...
Click to collapse
same problem..
edi194 said:
Everything was fine except google play services, it crashes every time i want add account
Click to expand...
Click to collapse
Same here bro
I thought I had accidently deleted some necessary google services files while removing bloatwares so I tried flashing latest Gapps for 5.1.1 over stock sony FW but no effect. Can't figure out why
I'm having Xperia ZR (5.1.1 Stock)
zyclops1 said:
C:\adb>adb pull /system/odex.app.sqsh
remote object '/system/odex.app.sqsh' does not exist
C:\adb>adb pull /system/odex.priv-app.sqsh
remote object '/system/odex.priv-app.sqsh' does not exist
help
Click to expand...
Click to collapse
gundam_warlock said:
could you provide the zip? or the zip from this thread http://forum.xda-developers.com/sprint-galaxy-s5/general/how-to-deodex-lollipop-rom-t3065596 can be used?
same problem..
Click to expand...
Click to collapse
If you have an Xperia Z1 it might differ from this a little bit, I think those don't have odex.xx.sqsh on their filesystem, check if you have odex files in app and priv-app.
Phones that I know that so far work with this sqsh filesystem are Xperia Z, ZL, ZR, Xperia Tablet Z
edi194 said:
Everything was fine except google play services, it crashes every time i want add account
Click to expand...
Click to collapse
sshivampp said:
Same here bro
I thought I had accidently deleted some necessary google services files while removing bloatwares so I tried flashing latest Gapps for 5.1.1 over stock sony FW but no effect. Can't figure out why
I'm having Xperia ZR (5.1.1 Stock)
Click to expand...
Click to collapse
Did you clear dalvik-cache and cache? If it still gives you googleplayservices fc, manually download the GooglePlayServices from APKMirror and install as normal app
xkeita said:
If you have an Xperia Z1 it might differ from this a little bit, I think those don't have odex.xx.sqsh on their filesystem, check if you have odex files in app and priv-app.
Phones that I know that so far work with this sqsh filesystem are Xperia Z, ZL, ZR, Xperia Tablet Z
Click to expand...
Click to collapse
I tried to deodex directly without pull sqsh, everything except nfcnci failed, when i tried to copy to system and reboot, nfc is fc. When check nfcnci folder only apk and lib folder exsist, but nothing exsist inside lib folder.
Where do i wrong?
xkeita said:
Did you clear dalvik-cache and cache? If it still gives you googleplayservices fc, manually download the GooglePlayServices from APKMirror and install as normal app
Click to expand...
Click to collapse
Dalvik-cache & Cache ! I tried wiping the whole data, it didn't work.
App install window goes on forever and app not installing.
Got it working by installing latest play services before deodexing. (as the updated play services app in the data partition runs, no matter if system is having broken play services package)
Fixed it for now but still wondering what causes the issue
sshivampp said:
Fixed it for now but still wondering what causes the issue
Click to expand...
Click to collapse
same issue here , how can i fix this?
@xkeita Bro if not ask for much could create a video tutorial ? ?????
Hamidreza2010 said:
same issue here , how can i fix this?
Click to expand...
Click to collapse
what I did is flashed the ftf (to go back to stock)
installed latest play services via play store
then followed the deodexing guide
Note: after deodexing, do not wipe data or uninstall updated play services otherwise error will occur again
works fine thank you
ZR 5.1.1
After download the rom by XperiaFirm I must continue this step?
Second part: Unpacking .SQSH files
To resume a little, you may refer to IaguCool's guide
Once you have downloaded SquashFS Tool, move both .sqsh files to the folder.
When you have opened the command promp use these codes to extract files...
> To get odex files for app folder (After extracting rename the squash-root folder to app):
Code:
unsquashfs -no-xattrs odex.app.sqsh
> To get odex files for priv-app folder (After extracting rename the squash-root folder to priv-app):
Code:
unsquashfs -no-xattrs odex.priv-app.sqsh
Third part: Merging files
Create a folder named system and move app, framework and priv-app folders from C:\ to the new folder.
After that grab the folders you extracted with SquashFS Tool and merge them with app and priv-app folder.
After doing this move SemcGenericUxpRes folder to priv-app folder
Fourth part: Deodexing
Download JoelDroid's Lollipop Batch Deodexer and replace the file named oat2dex.jar found on /tool folder with this one: Latest oat2dex
Then open the program and select the /system/ you've created to start the process.
Once it has finished, grab SemcGenericUxpRes folder and move it back to /framework

[Q] How to install cereberus.apk as a system file?

Hi
I have a question because I don't know how to install cereberus.apk as a system file.
I have single .apk file but in system\app I have some folders with apk files inside.
Do I need to make folder for my apk file or only copy this and change permissions (644)?
And which is the best place for this apk:
*system\app
or
*data\app?
Thanks a lot
If you are rooted you can use titanium backup to change it from a normal app to a system app.
^This
Alternatively you can drop the apk into system/priv-app, fix its permissions and then reboot.

[LGH870][Oreo] How to integrate apps update in rom.

After update from nougat to oreo, I've have problem with integration updated apps in to /system.
I do it like this:
1. copy apk file from data/apk to sd card
2. rename copied apk file to name of /system apk
3. extract lib folder from apk
4. copy newer file to proper folder in /system/app or /system/priv-app and replace file in it
5. Copy lib files extracted form apk to right folder /system/lib or /system/lib64
6. Uninstall update from /data/app
7. reboot + dalvik-cache wipe
In nougat it was working, but in oreo, app after integration, breaks. It cannot be open, and app name changes to random words (ex. google docs name changes to "write com.android").
To repair integrated apps I have to perform a full /data/ wipe.
Is it a some kind of protection? How to do it properly?
TitaniumBackup and Link2SD cannot integrate updates to rom properly without errors since Lolipop.
So no one knows?
or just nobody wants to write?

Categories

Resources