Backup System --> priv-app and System -->app - One (M9+) General

Hi!
Please backup for me folders: (from any HTC ONE M9+ or HTC ONE ME)
System --> priv-app
System -->app
I would be very pleased if someone will do this for me.
Thanks a lot.

Anyone?
I can't take this files form RUU or Custom ROM's on my own :/

Got the system image from here.
http://forum.xda-developers.com/showpost.php?p=62594813&postcount=2
Mount the system image in your linux system and extract what you want.
[[email protected] M9pw_system]# du -sh *
1.1G app
26M bin
12K build.prop
85M customize
180K data
267M etc
58M fonts
231M framework
143M lib
116M lib64
4.0K lost+found
200M media
196K plugin
1.5G priv-app
1.4M recovery-from-boot.p
9.7M res
6.2M tts
41M usr
113M vendor
1.4M xbin

Related

apps on sdcard -- can't install apps anymore

I'm having a strange problem. I'm trying to update a few apps and I keep getting errors. I have a rooted RC33 and I have the apps on /system/sd/app.
It looks like I have space:
Code:
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.2M 284.0K 100% /system
/dev/block/loop0 1.5M 1.5M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/mmcblk0p2 1.0G 63.1M 913.9M 6% /system/sd
/dev/block/mtdblock5 74.8M 60.1M 14.7M 80% /data
/dev/block/mtdblock4 67.5M 1.4M 66.1M 2% /cache
/dev/block/mmcblk0p1 6.4G 4.6G 1.8G 73% /sdcard
#
Most apps seem to install OK, but there are a few I've tried to install today (qsearch, mybackup, quickoffice) that give me errors. It will say install unsuccessful and the error is either "insufficient storage available" (which seems odd) or "could not delete old application" (which also seems strange).
Any ideas? I'm stumped.
And yes, I've rebooted several times.
Thanks
P.S. Is it normal that my /data/app-private is empty? I just noticed that...
Oh, also, here's the debug log:
Code:
D/PackageParser( 58): Scanning package: /data/app/vmdl23451.tmp
W/PackageManager( 58): Package source /data/app-private/com.qo.android.am.apk does not exist.
I/installd( 37): unlink /data/dalvik-cache/[email protected]@[email protected]
D/dalvikvm( 58): GC freed 15380 objects / 698304 bytes in 442ms
I/vending ( 483): com.android.vending.AssetDownloader$DownloadManagerBroadcastReceiver$MyPackageInstallObserver.packageInstalled(): Package install from content://downloads/download/336 failed: Could not delete old application.
-- more info --
So I tried chmod 777 app-private and then created an empty file com.qo.android.am.apk since that is what it was complaining about. Then I tried installing again. The debug log shows:
Code:
D/PackageParser( 58): Scanning package: /data/app/vmdl23453.tmp
D/PackageManager( 58): Scanning package com.qo.android.am
I/PackageManager( 58): /data/app/vmdl23453.tmp changed; unpacking
D/installd( 37): DexInv: --- BEGIN '/data/app/vmdl23453.tmp' ---
D/dalvikvm( 1564): DexOpt: load 541ms, verify 2688ms, opt 214ms
D/installd( 37): DexInv: --- END '/data/app/vmdl23453.tmp' (success) ---
D/PackageManager( 58): Services: com.qo.android.quickoffice.NotifyingService com.qo.android.ipc.RemoteServiceQW com.qo.android.ipc.RemoteServiceQS
D/PackageManager( 58): Receivers: com.qo.android.quickoffice.MyStartupIntentReceiver
D/PackageManager( 58): Activities: com.qo.android.quickoffice.NotifyingDialogActivity com.qo.android.am.Quickoffice com.qo.android.quickoffice.Quickoffice com.qo.android.am.EulaActivity com.qo.android.quicksheet.Quicksheet com.qo.android.quickword.Quickword
I/installd( 37): move /data/dalvik-cache/[email protected]@[email protected] -> /data/dalvik-cache/[email protected]@[email protected]
E/PackageManager( 58): Couldn't move package file to: /data/app-private/com.qo.android.am.apk
I/installd( 37): unlink /data/dalvik-cache/[email protected]@[email protected]
W/PackageManager( 58): Package source /data/app-private/com.qo.android.am.apk does not exist.
D/PackageManager( 58): Removing package com.qo.android.am
D/PackageManager( 58): Services: com.qo.android.quickoffice.NotifyingService com.qo.android.ipc.RemoteServiceQW com.qo.android.ipc.RemoteServiceQS
D/PackageManager( 58): Receivers: com.qo.android.quickoffice.MyStartupIntentReceiver
D/PackageManager( 58): Activities: com.qo.android.quickoffice.NotifyingDialogActivity com.qo.android.am.Quickoffice com.qo.android.quickoffice.Quickoffice com.qo.android.am.EulaActivity com.qo.android.quicksheet.Quicksheet com.qo.android.quickword.Quickword
D/ActivityManager( 58): Uninstalling process com.qo.android.am
I/vending ( 483): com.android.vending.AssetDownloader$DownloadManagerBroadcastReceiver$MyPackageIns
tallObserver.packageInstalled(): Package install from content://downloads/download/338 failed: Insufficient storage available.
At this point, I am getting the insufficient space message (as shown in the log). Previously, I was getting the could not delete app message (as shown in the log above this one).
I get this error occasionally too... I don't know why it happens, but it's usually for protected apps.
EDIT: Also, I have my /data/app folder on an ext2 partition on my miccroSD card, but the app-private remains on the phone. I don't know what's going on... I want to buy dxTop, but I don't think that it will install...
I got the same error while trying to install parkmark free. I've been contemplating moving everything back to the phone to install and then move them back to the SD. PITA but I would like to nab it before it is no longer available.
Blarg -- there must be a way, no? Maybe they got smart and are checking to see if /data/app is a symlink? JesusFreke, help us!
It's happening for every protected app which gets installed in the /data/app-private directory...
I don't get it though. I haven't even touched that folder. I've just symlinked /data/app to /system/sd/app
amgupt01 said:
It's happening for every protected app which gets installed in the /data/app-private directory...
I don't get it though. I haven't even touched that folder. I've just symlinked /data/app to /system/sd/app
Click to expand...
Click to collapse
Same here -- that's the only symlinking I did (well, aside from the caches).
I wonder if un-symlinking the apps dir (putting it back to "normal"), installing and then re-symlinking (and copying the new stuff) would work. Does that seem risky? So maybe something like:
Temporarily rename the symlink to app.DISABLED
Create a new app directory (a "real" directory)
Install the new app(s)
Copy whatever is in the new ("real") app directory to the symlinked (now named "app.DISABLED") directory
Remove the "real" app directory and rename the symlink back to app
I'm just wondering if it is dangerous to rename the app directory while apps may be running as suddenly they won't be able to find themselves and that could upset things.
I'll try that. If it works, I'll make a GScript out of it and I'll post the two .sh scripts (one for before installing, one for after) here.
amgupt01 said:
I'll try that. If it works, I'll make a GScript out of it and I'll post the two .sh scripts (one for before installing, one for after) here.
Click to expand...
Click to collapse
I got bold and tried it and it worked (I did get a few errors about some apps force-closing because I moved directories around). Here's what I did:
cd /data
mv app app.SDCARD
mkdir app
chmod 771 app
chown 1000:1000 app
Went to Market and installed the app that wouldn't install earlier
busybox cp -a app/* /system/sd/app
mv app app.ORIGINAL
mv app.SDCARD app
Voila! My newly installed app works. A reboot should resolve any background apps (like the caller-ID app) that were running while I moved the directories.
If you wanna make some scripts out of that, I'm sure it would help others. A quick "run this" then install then "run that" kind of operation.
EDIT: That worked for a new app. To replace an existing app, I had to do this:
Code:
busybox cp -a /system/sd/app/<old-app> /data/app
before updating so that it could delete the old app. That worked for a replacement (update).
mlevin said:
Blarg -- there must be a way, no? Maybe they got smart and are checking to see if /data/app is a symlink? JesusFreke, help us!
Click to expand...
Click to collapse
I'm wondering if they are checking to see if /data/app is a symlink -- or maybe if /data/app and /data/app-private are on the same filesystem (which could be solved by moving both app and app-private over to the card). Hmm...
I'll try putting app-private to SD card...
EDIT: ARE YOU KIDDING ME? Every single app that wasn't working before, is now working once I moved the app-private to /system/sd as well...
I feel retarded.
amgupt01 said:
I'll try putting app-private to SD card...
EDIT: ARE YOU KIDDING ME? Every single app that wasn't working before, is now working once I moved the app-private to /system/sd as well...
I feel retarded.
Click to expand...
Click to collapse
Wow. That was easy. I'll do that on mine as well. Cool.
EDIT: Yup, after symlinking and a quick reboot, that worked for me as well!
HELP PLEASE:
Cant update or download new apps from market to SD card.
I can only download & update apps on internal storage and then move them to SD... But If I have app on SD I cannot update or install app.. I always get - Installation Unsuccessful
I am using Leedroid NOA2SD 2.4.1. Tried to format SD card, unmount and mount SD.. nothing helps.
Titanium Backup:
Internal: 23 MB free
SD card: 1.29 GB free
SD card (a2sd): 1.90 MB free
Can you help me with any idea?
Tnx
I have a log file but I cant send it :|

[Dev][2.3][Fixed] How to remove stock apps that stored in cust.img?

I installed 2.3 to my phone.
The cust.img contain a lot of unneeded apks. (The cust.img is a disk image file.)
How to extract cust.img and delete a file in that?
The cust.img mounted to /cust folder as "read only" by init.rc (init.rc automatically generated on boot)
ufukyayla said:
i installed 2.3 to my phone.
The cust.img contain a lot of unneeded apk.
How to extract cust.img and delete a file in that?
The cust.img mounted to /cust folder as as read only by init.rc (init.rc automatically generated on boot)
Click to expand...
Click to collapse
Is cust.img or cust_data.img? See on /cust_backup/image/cust...
This is cust.img in image folder. (When pink screen mode)
ufukyayla said:
This is cust.img in image folder. (When pink screen mode)
Click to expand...
Click to collapse
I never change or delete anything on that place (when pink screen mode). I make all on /cust_backup/image/recovery.img or /cust... don't remember all.
Is from here that at each restarting or rebooting is loaded the bootloader (pink screen).
I deleted in this place all Carrier data /cust_backup/image/cust... something.
But take care, that /image/ is backed also on ROM Backups. If you delete the /cust... like I made, and if one day you made a ROM Restore made before, the /cust... return to same place. You must delete this after each ROM Restore.
For all restores I have, I made: Rom Restore-> delete /cust... (carrier data) -> new Rom backup.
..................................
EDIT: I made all this because I'm rooted and whit Root Explorer.
I dont want to delete cust.img.
The cust.img is a disk image file.
I want to delete a file in disk image that contained in cust.img.
The cust.img mounted to /cust folder as read only on boot.
i delete all boot files.
I delete all of boot files in this folder.When i open phone i faced blue screen. can someone zip all files in this folder and upload for me. Otherwise i have to send my phone to technical service.
I fixed it.
I deleted all unneeded apks (stock apps) that stored in cust.img
My method;
1. On Slitaz Linux 3.0
2. Open terminal
3. Copy cust.img from phone to /home folder
4. mkdir tmp
5. mount cust.img /home/tmp
6. cd /home/tmp/hw/default/app
7. Delete apk files what you don't want
8. umount tmp
9. Copy cust.img from /home folder to phone
It is for who don't have linux;
http://www.multiupload.com/EKPGJ7EUGO
This is "cleared" cust.img. That contains only these apks;
BeyondTheSkyTheme.apk
Calendar.apk
CalendarProvider.apk
DeskClock.apk
ToolBox.apk
modify init.rc
Code:
mount vfat /dev/block/mmcblk0p1 /.cust_backup ro wait
mount ext3 [email protected]_backup/image/cust.img /cust ro
to
Code:
mount vfat /dev/block/mmcblk0p1 /.cust_backup rw wait
mount ext3 [email protected]_backup/image/cust.img /cust rw
then you could delete any files in cust.img..(/cust in phone)
genokolar said:
modify init.rc
Code:
mount vfat /dev/block/mmcblk0p1 /.cust_backup ro wait
mount ext3 [email protected]_backup/image/cust.img /cust ro
to
Code:
mount vfat /dev/block/mmcblk0p1 /.cust_backup rw wait
mount ext3 [email protected]_backup/image/cust.img /cust rw
then you could delete any files in cust.img..(/cust in phone)
Click to expand...
Click to collapse
The init.rc automatically generating on boot.
Changes lost when you reboot your phone.
The init.rc is in your boot.img, which you could edit with a tool like abootimg, but you'd need Linux to modify that, anyway.
qwerty12 said:
The init.rc is in your boot.img, which you could edit with a tool like abootimg, but you'd need Linux to modify that, anyway.
Click to expand...
Click to collapse
But, it is very hard to do.
abootimg -x boot.img
rename initrd.img to initrd.gz
gunzip initrd.gz
extract initrc using cpio
edit init.rc
recompess
regzip
update bootimg
...
...
etc. etc.
do you know easy way?
ufukyayla said:
But, it is very hard to do.
abootimg -x boot.img
rename initrd.img to initrd.gz
gunzip initrd.gz
extract initrc using cpio
edit init.rc
recompess
regzip
update bootimg
...
...
etc. etc.
do you know easy way?
Click to expand...
Click to collapse
Combine the commands together; create scripts or add aliases to your .bashrc
Do "abootimg -x boot.img && mkdir newramdisk && cd newramdisk && zcat ../initrd.img | cpio -i --no-absolute-filenames" and you're in the folder with the extracted initrd.
When you're done editing, run "find . -print | cpio -o -H newc | gzip -n -9 > ../initrd.img" followed by "cd .. ; abootimg -u boot.img -r initrd.img" and you're done
thanks a lot. i'll try this.
Is there any other way without Linux to remove a .apk from cust.img?
Yes, look at the page 1
I deleted app, but size boot.img has not changed. How to reduce size boot.img?
Moved To General​
As the OP contains no development, as such this does not belong here​

i9100 emulated sdcard, partition resizing and full disk encryption

I recently upgraded a Galaxy S2 to Cyanogenmod 12.1 / android 5.1. I also wanted to use full disk encryption with the device and being able to access the internal memory via MTP instead of having a mass storage device. The removable sd card may be accessed via MTP, too, but will not be encrypted. Updating the recovery images to reflect the changes in the storage configuration (in case this is necessary) is not in scope, either.
Cyanogenmod by default only encrypts the /data partition. Newer models emulate the sdcard storage and save the data to /data/media, so everything gets encrypted. However, being an older phone there is still a separate sdcard-partition on the phone which is physically and directly mounted and which will not be touched by encryption.
In order to achieve the goal of full disk encryption two steps are necessary:
1. Change storage configuration to emulated media
2. Shrink old /sdcard partition and grow /data partition
= Change storage configuration to emulated media =
Emulating the sdcard in /data/media instead of physically mounting it directly requires changes to fstab.hardware (fstab.smdk4210), storage_list.xml and init.hardware.rc (init.smdk4210.rc). These files have to be changed in the Cyanogenmod source code and compiled to a new image. The configuration is based on the "Emulated primary, physical secondary" example given in h t t p s : / / source . android . com / devices / storage / config-example.html (cannot properly post URL due to new user restriction).
Here are the relevant changes in init.hardware.rc (init.smdk4210.rc):
Code:
--- init.smdk4210.rc.bak 2015-11-22 23:01:49.259579157 +0000
+++ init.smdk4210.rc.final 2015-11-30 20:21:37.977943177 +0000
@@ -2,35 +2,47 @@
import init.gps.rc
on init
- export EXTERNAL_STORAGE /storage/sdcard0
+ export EXTERNAL_STORAGE /storage/emulated/legacy
+ export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
+ export EMULATED_STORAGE_TARGET /storage/emulated
export SECONDARY_STORAGE /storage/sdcard1
- mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
- mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
mkdir /mnt/media_rw/usbdisk0 0700 media_rw media_rw
- mkdir /storage/sdcard0 0770 root root
- mkdir /storage/sdcard1 0770 root root
+ mkdir /mnt/shell/emulated 0700 shell shell
+ mkdir /storage/emulated 0555 root root
+ mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
+ mkdir /storage/sdcard1 0700 root root
+
mkdir /storage/usbdisk0 0770 root root
+ mkdir /storage/sdcard1 0775 system system
+
mkdir /efs 0771 radio system
mkdir /preload 0771 system system
mkdir /mnt 0775 root system
mkdir /mnt/.lfs 0755 root root
# for backwards compatibility
- symlink /storage/sdcard0 /sdcard
- symlink /storage/sdcard0 /mnt/sdcard
- symlink /storage/sdcard1 /extSdCard
- symlink /storage/sdcard1 /mnt/extSdCard
symlink /storage/usbdisk0 /usbdisk0
symlink /storage/usbdisk0 /mnt/usbdisk0
+ symlink /storage/emulated/legacy /sdcard
+ symlink /storage/emulated/legacy /mnt/sdcard
+ symlink /storage/emulated/legacy /storage/sdcard0
+ symlink /mnt/shell/emulated/0 /storage/emulated/legacy
+ symlink /storage/sdcard1 /ext_card
+ symlink /storage/sdcard1 /mnt/ext_card
+
+
+
# Disable CFQ slice idle delay
write /sys/block/mmcblk0/queue/iosched/slice_idle 0
on fs
mount_all /fstab.smdk4210
+ setprop ro.crypto.fuse_sdcard true
+
swapon_all /fstab.smdk4210
mkdir /efs/bluetooth
@@ -428,11 +440,10 @@
oneshot
keycodes 114 115 116
-service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard0 /storage/sdcard0
+service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
class late_start
- disabled
-service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
+service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
class late_start
disabled
Here are the relevant changes in fstab.hardware (fstab.smdk4210):
Code:
--- fstab.smdk4210.bak 2015-11-29 23:52:30.652913883 +0000
+++ fstab.smdk4210.final 2015-11-30 20:20:23.513945994 +0000
@@ -11,8 +11,8 @@
/dev/block/mmcblk0p12 /preload ext4 noatime,nosuid,nodev,journal_async_commit wait
# vold-managed volumes ("block device" is actually a sysfs devpath)
-/devices/platform/dw_mmc/mmc_host/mmc0/mmc0* auto auto defaults wait,voldmanaged=sdcard0:11,nonremovable,noemulatedsd
-/devices/platform/s3c-sdhci.2/mmc_host/mmc1* auto auto defaults wait,voldmanaged=sdcard1:auto,noemulatedsd
+/devices/platform/dw_mmc/mmc_host/mmc0/mmc0* auto auto defaults wait,voldmanaged=sdcard0:11,nonremovable
+/devices/platform/s3c-sdhci.2/mmc_host/mmc1* auto auto defaults wait,voldmanaged=sdcard1:auto
/devices/platform/s3c_otghcd/usb* auto auto defaults voldmanaged=usbdisk0:auto
# recovery
Here are the relevant changes in storage_list.xml:
Code:
--- storage_list.xml.bak2 2015-11-30 21:38:14.565769302 +0000
+++ storage_list.xml.final 2015-11-30 21:43:21.697757684 +0000
@@ -1,16 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<StorageList xmlns:android="h t t p : / / schemas . android . com / apk / res / android "(cannot properly post URL due to new user restriction)>
- <storage android:mountPoint="/storage/sdcard0"
- android:storageDescription="@string/storage_internal"
- android:primary="true"
- android:removable="false"
- android:allowMassStorage="true" />
+ <storage android:storageDescription="@string/storage_internal"
+ android:emulated="true"
+ android:mtpReserve="100" />
<storage android:mountPoint="/storage/sdcard1"
android:storageDescription="@string/storage_sd_card"
- android:primary="false"
android:removable="true"
- android:allowMassStorage="true" />
+ android:maxFileSize="4096" />
<storage android:mountPoint="/storage/usbdisk0"
android:storageDescription="@string/storage_usb"
@@ -18,3 +15,4 @@
android:removable="true" />
</StorageList>
Compile Cyanogenmod and flash your phone. It should boot, but the amount of available storage should be significantly lower as the sdcard is emulated on the /data partition which has not been grown, yet.
= Shrink old /sdcard partition and grow /data partition =
Use PIT Magic to resize the partitions to an appropriate size. For a stock i9100 having 16GB of internal memory my configuration was as follows (according to the backup .pit-file downloaded via heimdall):
Code:
DATAFS:
start: 1,392,640
block count: 4,194,304
end: 5,586,943
UMS:
start: 5,586,944
block count: 24,133,632
end: 29,720,575
Hidden:
start: 29,720,576
block count: 1,048,576
end: 30,769,151
I changed the partition layout to the following sizes:
Code:
DATAFS:
start: 1,392,640
block count: 28,295,167
end: 29,687,807
UMS:
start: 29,687,808
block count: 32,768
end: 29,720,575
Hidden:
start: 29,720,576
block count: 1,048,576
end: 30,769,151
Deleting the UMS or hidden partitions or shrinking the hidden led to Cyanogenmod not booting. Upload the new .pit-file using heimdall and boot the modified Cyanogenmod. Reboot to Cyanogenmod recovery and wipe data. Formatting again using the Cyanogenmod recovery was required as apparently only this recovery honours the "encryptable=footer,length=-16384" option for the /data partition in fstab.hardware which directs the formatting tools to leave 16 kiB of space at the end of the partition for in-place encryption.
Is there a way to achieve emulated SD, without changing source code and recompiling?
Like editing fstab and other config files?
I run CM13 at the moment and would like to achieve full encryption through emulated SD.
I was playing around with the idea that i would resize the sdcard partition to 8mb and resize the /data partition (~14gb), so that applications have a hefty space and i would use the external sdcard (sdcard1) for storing data and media files. Would that be possible to with an emulated sdcard ? I was hoping that with the introduction of Android 6.0 it would allow me to merge (LVM?) the /sdcard0 and /sdcard1 but instead it merges /data and /sdcard1.
fireburner-de said:
Is there a way to achieve emulated SD, without changing source code and recompiling?
Like editing fstab and other config files?
Click to expand...
Click to collapse
I cannot prove that there is no way without having to recompile. However, I couldn't find storage_list.xml in the filesystem on my phone, so I assume that this file is only used during image compilation and therefore it's probably hard/impossible to achieve emulated SD without recompiling.
Maybe this configuration is easier to achieve using Cyanogenmod 13 / Android 6 as the storage_list.xml resource overlay has been removed.
PelzigesOhr, thank you sharing and documenting your experience so well, it has inspired me to try the same on Replicant 4.2 (distro based on CyanogenMod 10).
https:// github . com / GrimKriegor / replicant42-device_samsung_galaxys2-common / commit / 84c5a91a45b059a147921d0ea32367534904b314
However it seems the best way to create a partition table is using PitMagic, which seems to be proprietary software. Would you consider sharing your PIT file please?
Thank you for your time, all of this is greatly appreciated!
EDIT:
If you still have memory of the heimdall parameters used to flash this partition table, please do share as well.
EDIT2:
Managed to create a PIT file similar to yours, thanks for documenting it.
The following thread also includes a patch compatible with Replicant/Android 4.2.
Best of luck!
redmine . replicant . us / boards / 39 / topics / 13707
GrimKriegor said:
Would you consider sharing your PIT file please?
Thank you for your time, all of this is greatly appreciated!
EDIT:
If you still have memory of the heimdall parameters used to flash this partition table, please do share as well.
EDIT2:
Managed to create a PIT file similar to yours, thanks for documenting it.
The following thread also includes a patch compatible with Replicant/Android 4.2.
Click to expand...
Click to collapse
Thanks for the praise, I'm happy that the instructions are of use to someone else. Good to know that you managed everything yourself, I'll answer anyway: This forum doesn't seem to support attachments, so I haven't attached the .pit-file. Feeding the parameters I provided to PIT Magic should yield a good result, though. PIT Magic is indeed a proprietary Windows binary, but it runs fine using wine (at least that's the way I use it).
All the flashing has been done by loading clockworkmodrecovery (
Code:
heimdall flash --KERNEL clockworkmodrecovery.6050.i9100.touch.img
) and afterwards sideloading the compiled ROM.
PelzigesOhr said:
Thanks for the praise, I'm happy that the instructions are of use to someone else. Good to know that you managed everything yourself, I'll answer anyway: This forum doesn't seem to support attachments, so I haven't attached the .pit-file. Feeding the parameters I provided to PIT Magic should yield a good result, though. PIT Magic is indeed a proprietary Windows binary, but it runs fine using wine (at least that's the way I use it).
All the flashing has been done by loading clockworkmodrecovery (
Code:
heimdall flash --KERNEL clockworkmodrecovery.6050.i9100.touch.img
) and afterwards sideloading the compiled ROM.
Click to expand...
Click to collapse
Thanks for the reply sir.
Which partitions did you upload via Heimdall when you flashed the PIT file? I believe repartitioning could delete the contents of important partitions such as BOOT and MODEM, but I am unsure. Do you think maintaining their block boundaries would preserve the data in the respective partitions?
guy i can't mount /storage/sdcard0
i use Cyanogenmod 12.1 android 5.1.1
i need help guy
GrimKriegor said:
Which partitions did you upload via Heimdall when you flashed the PIT file? I believe repartitioning could delete the contents of important partitions such as BOOT and MODEM, but I am unsure. Do you think maintaining their block boundaries would preserve the data in the respective partitions?
Click to expand...
Click to collapse
The exact command I used for repartitioning with Heimdall-1.3.1 was as follows:
Code:
heimdall flash --repartition --pit <filename>
Data should be preserved and if you don't mess with the boundaries of partitions other than DATAFS, UMS and HIDDEN you should be fine. Before repartitioning I backed up all partitions as a precautionary measure, but I didn't have to restore any of them. See also http://forum.xda-developers.com/galaxy-s2/orig-development/guide-enlarge-datafs-partition-rid-t2353551
PelzigesOhr said:
The exact command I used for repartitioning with Heimdall-1.3.1 was as follows:
Code:
heimdall flash --repartition --pit <filename>
Data should be preserved and if you don't mess with the boundaries of partitions other than DATAFS, UMS and HIDDEN you should be fine. Before repartitioning I backed up all partitions as a precautionary measure, but I didn't have to restore any of them. See also http://forum.xda-developers.com/galaxy-s2/orig-development/guide-enlarge-datafs-partition-rid-t2353551
Click to expand...
Click to collapse
Ah! This is excellent, thanks for clarifying this! Just one last question if I may, how did you backup the partitions? Did you use Heimdall to download their contents as image files, did you use DD or maybe even ADB?
Thank you for your time!
GrimKriegor said:
Just one last question if I may, how did you backup the partitions? Did you use Heimdall to download their contents as image files, did you use DD or maybe even ADB?
Click to expand...
Click to collapse
Good guess, I used dd and adb. Get a shell on the phone with adb and dump the partitions to files using dd:
Code:
dd if=/dev/block/mmcblk0pX of=/sdcard/mmcblk0pX.bin bs=512
And then copy the files to your computer using adb pull. You may want to get the mountpoints of the partitions (e.g. using mount) so that you can associate them easily.
Read here for an easy way to switch to emulated storage. Thanks to @Lanchon
https://forum.xda-developers.com/galaxy-s2/orig-development/mod-switch-emulated-to-emulated-t3539651

[Guide][Xiaomi][MSM8956] Port Redmi Note 3 ROMs To Mi Max

In my previous guide i explained How to port hydrogen ROMs to helium, and in this simple guide i'll show you guys How to port ROMs from kenzo as it's the same SoC like hydrogen (MSM8956) let's start !
You'll need some tools:
- ROM kitchen, i prefer superr's kitchen. :good:
- Boot image Extractor, you can use Android Image Kitchen
- Any text editor, Notepad++ is good choice for windows users.
Part 0: Preparing:
0- Get any Redmi Note 3 ROM (kenzo), you can find many in XDA or 4PDA
1- Open superr's kitchen and create new project, then copy kenzo ROM to project folder and Extract zip using kitchen (option 4). [when it asks for perm type choose sparse_dat]
2- Copy boot.img to Android Image Kitchen folder and run unpackimg.sh / unpackimg.bat (You can also drag and drop boot to unpackimg.bat if you're using windows).
Part 1: System files:
there's many differences between hydrogen and kenzo, like audio, camera and fingerprint, so you'll need to copy these files to "system" folder in kitchen.
File list
Then you have to edit build.prop replace kenzo with hydrogen and copy lines in hydrogen one like "fpc"
You can get this files from any working hydrogen ROM or from my Github Repo Here
Part 2: Editing Boot.img :
After unpacking kenzo boot.img using Android Image Kitchen You'll need to copy hydrogen zImage and edit somefiles:
* i prefer editing the following files even you can just copy it from hydrogen boot.img *
- Copy hydrogen zImage to "split_img" and make sure it's renamed as "boot.img-zImage"
- edit default.prop, change kenzo to hydrogen
- edit init.qcom.rc, you should use any compare program, like diff / meld / beyondcompare to check what code is in hydrogen and not in kenzo like
Line 204:216
Code:
# LED
chmod 0666 /sys/class/leds/led:torch_0/brightness
chmod 0666 /sys/class/leds/led:torch_1/brightness
chmod 0666 /sys/class/leds/led:switch/brightness
chown system system /sys/class/leds/red/blink
chown system system /sys/class/leds/green/blink
chown system system /sys/class/leds/blue/blink
chown system system /sys/class/leds/red/led_time
chown system system /sys/class/leds/green/led_time
chown system system /sys/class/leds/blue/led_time
on post-fs
start qseecomd
line 352:376
Code:
# Mark the copy complete flag to not completed
write /data/misc/radio/copy_complete 0
chown radio radio /data/misc/radio/copy_complete
chmod 0660 /data/misc/radio/copy_complete
# File flags for prebuilt ril db file
write /data/misc/radio/prebuilt_db_support 1
chown radio radio /data/misc/radio/prebuilt_db_support
chmod 0400 /data/misc/radio/prebuilt_db_support
write /data/misc/radio/db_check_done 0
chown radio radio /data/misc/radio/db_check_done
chmod 0660 /data/misc/radio/db_check_done
# Fingerprint
mkdir /data/fpc 0770 system system
mkdir /data/fpc/s 0770 system system
mkdir /data/tombstones 0771 system system
mkdir /tombstones/modem 0771 system system
mkdir /tombstones/lpass 0771 system system
mkdir /tombstones/wcnss 0771 system system
mkdir /tombstones/dsps 0771 system system
mkdir /persist/data/sfs 0700 system system
mkdir /persist/data/tz 0700 system system
mkdir /data/misc/dts 0770 media audio
mkdir /data/misc/audio_pp 0771 media audio
And
Code:
# Bring up all cores online
write /sys/devices/system/cpu/cpu1/online 1
write /sys/devices/system/cpu/cpu2/online 1
write /sys/devices/system/cpu/cpu3/online 1
write /sys/devices/system/cpu/cpu4/online 1
write /sys/devices/system/cpu/cpu5/online 1
To:
Code:
# Bring up all cores online
write /sys/devices/system/cpu/cpu1/online 1
write /sys/devices/system/cpu/cpu2/online 1
write /sys/devices/system/cpu/cpu3/online 1
write /sys/devices/system/cpu/cpu4/online 1
write /sys/devices/system/cpu/cpu5/online 1
write /sys/devices/system/cpu/cpu6/online 1
write /sys/devices/system/cpu/cpu7/online 1
Line 823:861
Code:
service fingerprintd /system/bin/fingerprintd
class late_start
user system
group drmrpc input system
socket fpce stream 0660 system system
writepid /dev/cpuset/system-background/tasks
service imsqmidaemon /system/bin/imsqmidaemon
class main
user system
socket ims_qmid stream 0660 system radio
group radio log diag
service imsdatadaemon /system/bin/imsdatadaemon
class main
user system
socket ims_datad stream 0660 system radio
group system wifi radio inet log diag
disabled
on property:sys.ims.QMI_DAEMON_STATUS=1
start imsdatadaemon
service ims_rtp_daemon /system/bin/ims_rtp_daemon
class main
user system
socket ims_rtpd stream 0660 system radio
group radio diag inet log
disabled
service imscmservice /system/bin/imscmservice
class main
user system
group radio diag inet log
disabled
on property:sys.ims.DATA_DAEMON_STATUS=1
start ims_rtp_daemon
start imscmservice
- Edit init.rc
Change
Code:
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
To
Code:
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/green/blink
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/blue/blink
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
- Edit init.qcom.sh
Add this line after start_sensors
Code:
start_copying_prebuilt_qcril_db
And this line at the end of file
Code:
chown radio:radio /data/misc/radio/copy_complete
- then Repack boot and copy image-new.img to superr's kitchen project folder then rename it to boot.img
You can get these files from any hydrogen boot.img
Part 3: Finalizing :
Now you've finished porting kenzo ROM to hydrogen, but you need to repack ROM into zip to be able to use it.
- Open superr's kitchen, choose 8) ROM Tools Menu then 7) Build Menu and finally 1) Build full ROM Zip
- Wait till it finishes (when it asks for sign zip press "y") then you'll have to edit META-INF/com/google/android/updater-script inside ROM Zip, so open ROM zip and head to META-INF/com/google/android/ to open updater-script file using text editor then change script to:
Code:
package_extract_dir("install", "/tmp/install");
set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755);
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "backup");
unmount("/system");
show_progress(0.750000, 0);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
show_progress(0.020000, 10);
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "restore");
unmount("/system");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
show_progress(0.200000, 10);
set_progress(1.000000);
And Congratulations You've finished porting kenzo ROM to your hydrogen
Special Thanks:
SuperR. for his great kitchen
osm0sis for amazing image tools script
iBotPeaches for apktool
@nijel8 for helium device tree
@Davehimself for helium vendor
@Ahmed Hady & @androidlover5842 my great friends & helpers
And me for typing this guide :good:
Reversed 1
Reversed 2
yshalsager said:
In my previous guide
Click to expand...
Click to collapse
Can u plz port sailfish os of kenzo for MiMAX hydrogen please?
https://forum.xda-developers.com/redmi-note-3/development/rom-sailfish-os-2-0-5-6-kenzo-t3571258/
afridi.shahriar said:
Can u plz port sailfish os of kenzo for MiMAX hydrogen please?
https://forum.xda-developers.com/redmi-note-3/development/rom-sailfish-os-2-0-5-6-kenzo-t3571258/
Click to expand...
Click to collapse
I think it can't be ported. Need to built from sources
yshalsager said:
I think it can't be ported. Need to built from sources
Click to expand...
Click to collapse
Then leave it
yshalsager said:
I think it can't be ported. Need to built from sources
Click to expand...
Click to collapse
Can u port nubia or funtouch os for kenzo or tell me name of device from which I can try to port these ui
Criston said:
Can u port nubia or funtouch os for kenzo or tell me name of device from which I can try to port these ui
Click to expand...
Click to collapse
I don't have kenzo, try with any MSM8956 device or MSM8976
What if rom does not contain some files in the system folder?
psbankar said:
What if rom does not contain some files in the system folder?
Click to expand...
Click to collapse
Forget it
yshalsager said:
I don't have kenzo, try with any MSM8956 device or MSM8976
Click to expand...
Click to collapse
Devices Based On MSM8976 Can Be used R U Sure though the difference is only core base
Criston said:
Devices Based On MSM8976 Can Be used R U Sure though the difference is only core base
Click to expand...
Click to collapse
Yes. As we can port from helium
can similarly kenzo roms can be ported to leeco le with sd652 ??
ankk98 said:
can similarly kenzo roms can be ported to leeco le with sd652 ??
Click to expand...
Click to collapse
yes
yshalsager said:
yes
Click to expand...
Click to collapse
i am a beginner
can u plz explain how this port can work? i mean both devices have different soc?
I want to try it by porting some oreo kenzo rom to leeco le 2 with msm8976
ankk98 said:
i am a beginner
can u plz explain how this port can work? i mean both devices have different soc?
I want to try it by porting some oreo kenzo rom to leeco le 2 with msm8976
Click to expand...
Click to collapse
Follow the guide and take files from your stock/working rom to kenzo rom
Part 3: Finalizing :
Now you've finished porting hydrogen ROM to helium, but you need to repack ROM into zip to be able to use it.
I dont get it, porting rom from hydrogen to helium?
raymondsanusi said:
Part 3: Finalizing :
Now you've finished porting hydrogen ROM to helium, but you need to repack ROM into zip to be able to use it.
I dont get it, porting rom from hydrogen to helium?
Click to expand...
Click to collapse
lol, sorry i was typo mistake
You can port from H2 to He but follow my another guide.
Is this guide can be used for porting Oreo roms?
Hello @yshalsager the file of hydrogen you have uploaded on GitHub are from which MIUI version?

Read-Only File System

I'd like to delete/remove the *.ogg files from these paths:
/product/media/audio/alarms
/product/media/audio/notifications
/product/media/audio/ringtones
But the file system is read-only and adb shell commands do not succeed. For instance:
Code:
C:\Users\Dave\Documents\Asus Zenfone8\platform-tools>adb shell rm /product/media/audio/alarms/Alarm_Beep_01.ogg
rm: /product/media/audio/alarms/Alarm_Beep_01.ogg: Read-only file system
How can I delete those files?
ASUS Zenfone 8
OmniROM 13/MICROG
Build date 202302181102
you can replace files with empty files
https://topjohnwu.github.io/Magisk/guides.html#the-system-folder

Categories

Resources