Terminal Script help - Android Q&A, Help & Troubleshooting

Hi, Im trying to write a terminal script to batch install apk files from my sdcard
Here's the code I have
# Place apk files in Sdcard/apps/ folder
# Insert command lines in following format
# pm install "sdcard/apps/appname.apk"
pm install sdcard/apps/"Google_Maps_6_14_4.apk"
pm install sdcard/apps/"Quick Boot.apk"
However some times it gives an error " INSTALL_FAILED_INVALID_URI"
following is the o/p:
[email protected]:/ # sh sdcard/inst.sh
pkg: sdcard/apps/Google_Maps_6_14_4.apk
Failure [INSTALL_FAILED_INVALID_URI]
pkg: sdcard/apps/Quick Boot.apk
Success
I think perhaps this is due to series of commands without pause.
Any idea to get this working

Why don't you use ADB?
Sent from my Nexus 4 running Android 4.2.2

mihahn said:
Why don't you use ADB?
Sent from my Nexus 4 running Android 4.2.2
Click to expand...
Click to collapse
Perhaps due to unavailability of PC. Or wanting to batch install with just the phone
-------------------------------------------------------​
You should use Titanium Backup to batch install apps of there are other options too.
However, if you rather prefer Terminal,
Try to add pause command with significant time interval after each installation command. Because next command will be rejected until the previous one is completed. I think that's the problem.

Related

[How to] Gmail and the Android Market

THIS METHOD IS NOW OUTDATED.
For everyone that is starting from scratch with a wiped NookColor, I have made a linux script available that will do everything for you. This includes enabling apk installs on the device, live wallpapers, multitouch, etc. It will also download and install YouTube, Gmail, and the Market. It also changes the Market fingerprint to that of a Droid Eris on Verizon so you can see protected apps. It does not require use of the Android Emulator to generate an AndroidId as this is done automatically thanks to clockworx. All it does require is that you be nootered and have working Superuser.
Thread here:
http://forum.xda-developers.com/showthread.php?t=871210
DISCLAIMER:
These steps are what worked for me and some may not even be required. If this guide needs any clarification, post a reply and I will do my best to update it. I'm 99% certain all the steps are here.
If you have already tried to get the Market or other Gapps working, etc then it is very likely you will have to do a full factory reset before this will work for you. I have no idea why, but if these steps don't work I would try that first.
In my experience the factory reset is two steps:
8 failed boots restores the /system partition. You can easily trigger this reset without 8 failed boots by running this command from a Linux or Mac OSX command line:
echo -n -e "\008\000\000\000" > /tmp/foo; adb push /tmp/foo /rom/devconf/BootCnt; adb reboot
Click to expand...
Click to collapse
Afterwards:
Booting while holding power+volumeup+nook button restores /data
I had to do both of these steps in this order to get a full reset on the device.
Required:
nc_gapps.zip
system.img for AVD
Youtube for Eclaire
Optional:
Root Explorer really speeds this up. If you have it, I recommend using it as this tutorial is written with it in mind.
* Copy nc_gapps.zip onto the 4gb internal partition of the NC, /media/
* Unmount both the internal partition and the SD card (if applicable) from within your OS but leave the USB cable connected.
* Using a command prompt on your OS, navigate to android-sdk/tools (or platform-tools in newer SDK) and type the following:
adb shell
mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system <-----This can be also done by going to /system/ in Root Explorer and clicking "Mount R/W" at the top
cd /media
miniunz -x nc_gapps.zip -d /system/ <-----Overwrite [A]ll if prompted!
echo "ro.config.nocheckin=no" >> /system/build.prop
exit
Click to expand...
Click to collapse
* Leave this command prompt open, we will need it in a minute!
* Install Youtube App. If you have a previous version installed it's best to use Titanium Backup to wipe it's data then uninstall.
* Run Youtube. Press Menu->My Channel. Log in with Gmail account. If you get the authentication error here you can try rebooting and wiping Youtube data again with Titanium Backup.
* Reboot NC
After reboot:
* Using the command prompt on your OS from before, type:
adb pull /data/system/packages.xml
Click to expand...
Click to collapse
*In this file find the string "uid.system". You should find a line that looks like:
<shared-user name="android.uid.system" userId="1000">
Remove the 3 lines beneath this one. They should look similar to:
<sigs count="n">
<cert index="n" />
</sigs>
n is an integer that may be different for everyone. After removing these lines, the line immediately after "<shared-user...>" should be "<perms>"
Save.
* Using the command prompt on your OS:
adb push packages.xml /data/system/
Click to expand...
Click to collapse
Reboot NC and disconnect USB.
Gmail should work but running the Market should load the TOS after which you will get a server error. This is caused by our device not having a valid androidId. Let's generate a valid androidId using the AVD emulator.
Create a new AVD for Android 2.1-API Level 7 using these settings:
SD Card Size: 100M
Skin: Built-in: Default (HVGA)
Hardware Properties:
Abstracted LCD Density: 160
Touch-screen support: yes
Device RAM size: 1024
Once the AVD is in your list, click on it and then click Details on the right hand side. Note the path and move the system.img you downloaded in that directory.
Start the AVD. When prompted, sign in with your existing Gmail credentials. Use CTRL+F11 to slide the keyboard in and out when prompted.
Run this command to get the androidId from the emulator:
adb shell sqlite3 /data/data/com.google.android.googleapps/databases/accounts.db "select * from meta";
Click to expand...
Click to collapse
It's the long number after androidId|, SAVE IT!
Now, connect your NC back to USB.
On the third command below, be sure to replace ANDROID_ID_FROM_EMULATOR with the number I just told you to save.
adb pull /data/data/com.google.android.googleapps/databases/gls.db
sqlite3 gls.db
update meta set intvalue='ANDROID_ID_FROM_EMULATOR' where name='androidId';
.q
adb push gls.db /data/data/com.google.android.googleapps/databases/
Click to expand...
Click to collapse
Reboot NC
Wow, that was quite a bit of work to figure out, to be sure.
Thanks, will give it a try!
Does this also provide the Google account setup capability (Reader, Listen, etc.)?
Thanks for the fix first of all!!!
I used root explorer and copied over all of the files recommended, then installed the youtube app you linked to, but when I tried to go to menu/my channel it flashes a message that there was a problem authenticating.
Any ideas?
Thanks!!!
Never mind...
Before doing the androidID stuff, Gmail is supposed to work? It doesn't. Just flashed for a sec and goes back to home screen
Also, there is no Market icon available. Am I supposed to install Vending.apk after putting it in /system/app?
EDIT: Youtube now doesn't work either...
EDIT2: Youtube works after an uninstall/reinstall, and I can sign in. Gmail still doesn't work and no market icon
bazzly said:
I'm confused....
"Using Root Explorer:
1) copy etc, framework, and lib folders into /system."
Those files are already in the /media/system directory....ohh...you talking the root /system not media/system....correct...?
Click to expand...
Click to collapse
Yes, that is correct.
bbtheory said:
Thanks for the fix first of all!!!
I used root explorer and copied over all of the files recommended, then installed the youtube app you linked to, but when I tried to go to menu/my channel it flashes a message that there was a problem authenticating.
Any ideas?
Thanks!!!
Click to expand...
Click to collapse
Try rebooting first. If that does not fix it then try clearing the data for the youtube app. If all else fails do a complete factory reset and start this from scratch. The youtube authentication issue was my biggest hurdle and I ended up doing a factory reset myself.
Xhorder said:
Before doing the androidID stuff, Gmail is supposed to work? It doesn't. Just flashed for a sec and goes back to home screen
Also, there is no Market icon available. Am I supposed to install Vending.apk after putting it in /system/app?
EDIT: Youtube now doesn't work either...
EDIT2: Youtube works after an uninstall/reinstall, and I can sign in. Gmail still doesn't work and no market icon
Click to expand...
Click to collapse
Same here...
Does the build.prop contain a valid version string which allows market access?
Also, there's a new version of the market going about too
Ok so I got past the youtube and now gmail works and the market gets the server error. However, I cant seem to get started with AVD to get the android ID... are there some more detailed instructions for an AVD noob???
bbtheory said:
Ok so I got past the youtube and now gmail works and the market gets the server error. However, I cant seem to get started with AVD to get the android ID... are there some more detailed instructions for an AVD noob???
Click to expand...
Click to collapse
Were there any variations from the steps above that you made to get gmail working? Not sure why mine is flashing then closing.
norkoastal said:
Were there any variations from the steps above that you made to get gmail working? Not sure why mine is flashing then closing.
Click to expand...
Click to collapse
No variations from the steps above other than fixing the permissions on the files that I copied over... They need to match the permissions of the other files in the respective folders.
Managed to get Gmail, Reader, and Market working. However, every download on the market fails. When I run a logcat i get "authentication failed"
I did replace androidId using the emulator.
Any ideas?
Nice! this works great! just tested out couple free apps from Market and both installed and worked fine. Thanks for figuring this out! finally I don't have to hunt for apk files
-----------
buy the way, AppBrain works fine with Market too.
From my pandigital days I have this question: does enabling google market and other apps prevent your nook color from staying in deep SLEEP?
Sent from my LogicPD Zoom2 using Tapatalk
I had an issue because I had not ever logged into youtube with my gmail account. I went to youtube.com and logged in, then was able to log in using the YouTube app.
Can someone plase post some AVD or emulator instructions??? That would be awesome!!!
For avd, you have to have the Android SDK installed. Then you can run (sdk folder)/tools/android to start the avd manager.
msid said:
For avd, you have to have the Android SDK installed. Then you can run (sdk folder)/tools/android to start the avd manager.
Click to expand...
Click to collapse
When I do that I get this message:
[INFO] Starting Android SDK and AVD Manager
'java' is not recognized as an internal or external command,
operable program or batch file.
bbtheory said:
When I do that I get this message:
[INFO] Starting Android SDK and AVD Manager
'java' is not recognized as an internal or external command,
operable program or batch file.
Click to expand...
Click to collapse
You need Java. (java.com)

[Q] "Operation not permitted" trying to mount extSD as intSD

Hi, I've been trying to move all my game data from my internal SD card to my larger external SD card with no joy.
I have used condi's AIO tool to install init.d support, which reported as successful, but when I follow obicom's instructions as listed in POST #43 of this thread http://forum.xda-developers.com/showthread.php?t=1490116&page=5
I repeatedly receive the message "Operation not permitted."
I have used both ADB Shell and Terminal Emulator with the same result.
I'm obviously doing something wrong as other people appear to have had success with these instructions, I just don't know what.
Here's what I've done: (on rooted ICS from condi's AIO tool)
Installed init'd support "successfully"
Moved all data from sdcard/Android/data over to sdcard2/game_data
In ADB Shell/Terminal Emu. entered the following line;
mount -o bind /sdcard2/game_data /sdcard/Android/data
and this is where I get the "Operation not permitted" message.
Any ideas?
Once you're in shell, before running the mount command, run the command 'su' first (without the quotes). Your prompt should change from $ to # and try running the mount command again.
Explained: In most Linux systems, unless the fstab has been specifically setup to do it with the user option, filesystems can only be mounted by root. In rooted versions of Android, the normal user can elevate into a root prompt with su, then allowing you to mount and unmount any filesystems.
Ahaaa
Awesome! Can't believe it was something so simple, thanks, and thanks for explaining the reason.
I must have somehow totally missed the "su" instruction in the other thread.
Half of my games work, the other just seem to need re-installing which is no big drama.
Again, thanks, it's much appreciated mate.
Script?
agc93 said:
Once you're in shell, before running the mount command, run the command 'su' first (without the quotes). Your prompt should change from $ to # and try running the mount command again.
Explained: In most Linux systems, unless the fstab has been specifically setup to do it with the user option, filesystems can only be mounted by root. In rooted versions of Android, the normal user can elevate into a root prompt with su, then allowing you to mount and unmount any filesystems.
Click to expand...
Click to collapse
Hi, is there a way I can create a script (or the like) that would do this, and other similar directory changes, at boot?
At present I need to enter these manually each time the tablet starts, which isn't too much of a drama for me but when other people use it they end up downloading the data all over again when they start a game.
Thanks
There is an app available on Google Play called Script Manager (which can be used to create scripts to run at boot as su (which mount command require), which should do what you need. You'll need to use a plain text editor (I believe there is one included with Script Manager) to enter each of the mount command you want to run on a separate line. Then set the file to executable (chmod +x scriptname), and add it to Script Manager.
Note that I haven't used it in a while, so follow whatever instructions Script Manager gives you. They're probably more up to date.
agc93 said:
There is an app available on Google Play called Script Manager (which can be used to create scripts to run at boot as su (which mount command require), which should do what you need. You'll need to use a plain text editor (I believe there is one included with Script Manager) to enter each of the mount command you want to run on a separate line. Then set the file to executable (chmod +x scriptname), and add it to Script Manager.
Note that I haven't used it in a while, so follow whatever instructions Script Manager gives you. They're probably more up to date.
Click to expand...
Click to collapse
Okay thanks, yet again, I'll give it a try today.
Operation not permitted
Hi,i wanted to change my mac address on phone and even with that su command i get "operation not permitted" (my phone is rooted)...even apk named overclock for android could not grant root acces...in root checker my phone is rooted(and i have been rerooting it but still same).AND THERE IS NO FIX ON INTERNET

[INFO] JRummy BusyBox Installer Warning

I thought I'd post this...even though I'm a noob...so that others can benefit if possible. If you're using the JRummy BusyBox installer, please be careful with the Advanced Install option. Here's why:
After rooting my phone I installed JRummy's BusyBox installer. First, after checking busybox.net for the latest stable install version, I did a full install without the symlink apps option selected. Then I did another full install with the symlink apps option checked. Finally, after reading through the entire list of available commands and what they did, I decided to do an advanced install. I selected "Remove Symlinks" for each of the busybox commands I wanted NOT to have available in Terminal Emulator.
Soon after the advanced installation, I noticed that Terminal Emulator wasn't working. Then I noticed that my WiFi connection wasn't working...specifically the part in which the phone attempts to lease an address using DHCP. After emailing the developer with my issue, I tried to re-install BusyBox manually based on a link he included in the reply. I could push the file to the phone using 'adb push' but when I tried to open a shell to run the install commands, I would get the following error: exec '/system/bin/sh' failed: No such file or directory (2) . Long story short, I had to re-flash the phone using Odin to fix it.
In the AFWall+ logs, around the time I ran the Advanced Install, there were a bunch of entries like this: ld_library_path=/vendor/lib:/system/lib busybox rm /system/xbin/strings exit. There may have been a -s after the 'rm' command and before the directory but I'm not completely sure. After I flashed the phone with Odin, I opened Root Explorer and took a look at the files under /system/bin/. I noticed that the commands that can be run without installing busybox...like ls, or ifconfig...were linked to 'toolbox'. /system/bin/sh was linked to mksh.
After more research and reading, I'm about 90% sure what happened. Here's an excerpt from the email I sent to the developer:
<snip>
Basically, the "Remove Symlinks" option in your app does either one of two things:
It removes the directories entirely
It removes the symlinks to busybox, but doesn't restore the original symlinks that were present before busybox was installed.
<snip>
So if you're using this particular installer, please be careful with the Advanced Option.
Please help
MonaLisaOverdrive said:
I thought I'd post this...even though I'm a noob...so that others can benefit if possible. If you're using the JRummy BusyBox installer, please be careful with the Advanced Install option. Here's why:
After rooting my phone I installed JRummy's BusyBox installer. First, after checking busybox.net for the latest stable install version, I did a full install without the symlink apps option selected. Then I did another full install with the symlink apps option checked. Finally, after reading through the entire list of available commands and what they did, I decided to do an advanced install. I selected "Remove Symlinks" for each of the busybox commands I wanted NOT to have available in Terminal Emulator.
Soon after the advanced installation, I noticed that Terminal Emulator wasn't working. Then I noticed that my WiFi connection wasn't working...specifically the part in which the phone attempts to lease an address using DHCP. After emailing the developer with my issue, I tried to re-install BusyBox manually based on a link he included in the reply. I could push the file to the phone using 'adb push' but when I tried to open a shell to run the install commands, I would get the following error: exec '/system/bin/sh' failed: No such file or directory (2) . Long story short, I had to re-flash the phone using Odin to fix it.
In the AFWall+ logs, around the time I ran the Advanced Install, there were a bunch of entries like this: ld_library_path=/vendor/lib:/system/lib busybox rm /system/xbin/strings exit. There may have been a -s after the 'rm' command and before the directory but I'm not completely sure. After I flashed the phone with Odin, I opened Root Explorer and took a look at the files under /system/bin/. I noticed that the commands that can be run without installing busybox...like ls, or ifconfig...were linked to 'toolbox'. /system/bin/sh was linked to mksh.
After more research and reading, I'm about 90% sure what happened. Here's an excerpt from the email I sent to the developer:
<snip>
Basically, the "Remove Symlinks" option in your app does either one of two things:
It removes the directories entirely
It removes the symlinks to busybox, but doesn't restore the original symlinks that were present before busybox was installed.
<snip>
So if you're using this particular installer, please be careful with the Advanced Option.
Click to expand...
Click to collapse
Hello I installed BusyBox and I had same issue with WIFI also others for example after reboot of my tablet wholle setting is set to orignaly(language and everithing).How can put back everithing?Does exist some apps etc???Thank you.
OMG... i installed busybox with this app into /system/xbin on my dopo d7015 with advanced install... and then the problems started... 0 total internal size, wifi not acquiring ip with dhcp ... no factory restore could fix it. then i eventually learned that /system/bin/sh didn't exist when trying to adb shell. i've downloaded an sh binary and copied it, now i have valid internal total size, and android terminal works... but wifi won't even turn on now! like an idiot i didn't backup before i started playing with the tablet... i have no clue as to how to fix it! please someone help me!
With one version of this app, it said Busy box 1.20.x is not compatible for my phone. But busy box installer by Stericson does the job perfectly.
Sent from my GT-S5360 Gadget of Mass Destruction using xda-app
Using CWM........Busybox Commands........No I use my hands

Batch Install apps without prompt

Hi guys,
I tried almost every Lollipop ROMs available, they are either buggy or doesn't provide a great battery life which I care about a lot since this is my primary device. Definitely KK [pa ROM] battery life is way better than LP. So decided to go back, but I have the problem where almost 186 apps I have to install it manually since the auto restore doesn't work in KK properly. Is there a way to batch install the apps from the backup without all those install prompts so that I don't want to press install 186 times? These are the ways already tried,
1. Tools from XDA -- Doesn't install every apk, it says some are 'Invalid APKs' while I can install it manually without any problems.
2. Terminal Emulator - Can I even batch install with it?
Please let me know if any method available. Thanks
seriously looking for the same. Anyone please tell me to do this. Im trying to do this using terminal emulator.
Trying below command
pm install apkname.apk from terminal from the apk folder but its giving invalid uri.
---------- Post added at 01:14 PM ---------- Previous post was at 01:01 PM ----------
You can use system app remover. It worked great in kitkat...... and if possible use marshmallow its yielding great battery
The correct terminal commands:
cd YourApkBackupDirectory
install -D -m 644 Name.apk /data/app/Name/base.apk
Pack these commands into a usual shell. You also can install all apk's of one directory by wildcards.
Some apps create another directory-name in /data/app. Idk, whether it matters.
After installing go to recovery, wipe both caches and reboot.

[HOWTO]Backup, transfer LINE to second phone with complete chat/images (without root)

Looking to setup a new phone I encountered the issue that there is no way from LINE itself to transfer chat, except the very tedious mechanism to ex- and import every single contact chat manually. What's worse, this doesn't work with group chats. The other documented alternative is using Titanium Backup, but this requires root. After some further investigation I finally discovered that the Android Debug Bridge (adb) - which is part of the official Android SDK - offers everything that is needed to backup and transfer LINE to second smartphone. That means it works root-free and without any paid tools. You can use this process either to transfer the data to a new device or to restore it to the same device, for this description I assume you're going to copy it to a new phone.
The short version is, you can use adb to:
Read out android_id
Install an old LINE version that allows adb backups (in LINE < 5.3 android:allowBackup is not set, thus by default true)
Backup LINE app data & LINE sdcard data
Set android_id (on new device), which LINE is checking to validate it's data
Restore LINE app data & LINE sdcard data (to new device)
The long version
Prerequisites
Enable the Email verification for your LINE account. If something goes wrong , you will at least have access to all of your contacts and messages of the last weeks.
You must have ADB working. I'm not going to explain how to install it in detail, you should be able to find Android Developer guides who cover that (e.g. http://www.howtogeek.com/125769/how-to-install-and-use-abd-the-android-debug-bridge-utility/) The rough outline is:
- install Android SDK
- install USB phone drivers from you phone manufacture
- enable (hidden) Developer Mode/USB debug mode on your phones
Furthermore you must have an old line APK, I used LINE 5.1 You should have no issue to find it online in one of the APK archives. As mentioned earlier, the current versions of LINE does not allow ADB backups, like old versions do. Luckily you can install an old version, while keeping the data. Ideally the old LINE versions never runs, so that it has no chance to corrupt your chat-data. However even accidentally running it, didn't have any visible impact on my data, the app closed itself after starting.
For the next steps I assume you have a folder called c:\backup\line to store the backup inside and already containing a file called 'line-old.apk' which - as the name suggests - is your copy of an old line apk.​
Backup old phone
) Close/Kill LINE app if it's running, disconnect from WLAN and put into flight mode (to ensure that nothing wants to interact with the LINE app) and connect your old phone via USB cable
------
) Start ADB service:
Code:
adb start-server
Accept access/fingerprint from ADB on your old phone, if you haven't done so already
------
) Create a file called android_id.txt that contains your android_id:
Code:
adb shell settings get secure android_id > c:\backup\line\android_id.txt
You can also use "adb shell settings get secure android_id" to simply show the current android_id value.
------
) Install old LINE Version:
Code:
adb install -r -d c:\backup\line\line-old.apk
-r = reinstall, keep data; -d = allow to install older version
------
) Backup LINE app data (chats) to your PC:
Code:
adb backup -f c:\backup\line\line.ab jp.naver.line.android
You need to click 'allow backup' on your old phone
------
) Backup LINE sdcard data (images, sticker) to your PC:
Code:
adb pull /sdcard/Android/data/jp.naver.line.android c:\backup\line\sdcard
------
) (optional) restore current LINE APK, either by using an APK like in step 4.) or via updating through Google Play store
------
) End ADB service
Code:
adb kill-server
------
) Finished, disconnect your old phone from your PC
Restore to (new) phone:
) Connect your new phone via USB cable
------
) Start ADB service:
Code:
adb start-server
Accept access/fingerprint from ADB on your new phone, if you haven't done so already
------
) Change your new phone android_id to that of your old phone. Replace XXXXXXXX with the value inside c:\backup\line\android_id.txt
Code:
adb shell settings put secure android_id XXXXXXXX
You can use "adb shell settings get secure android_id" to show the current android_id value.
------
) Install old LINE Version:
Code:
adb install -r -d c:\backup\line\line-old.apk
-r = reinstall, keep data; -d = allow to install older version
------
) Upload LINE app data (chats) to your new phone:
Code:
adb restore c:\backup\line\line.ab
Click on your phone to "restore my data"
------
) Upload LINE sdcard data (images, sticker) to your new phone:
Code:
adb push c:\backup\line\sdcard /sdcard/Android/data/jp.naver.line.android
------
) Install current LINE APK, either by using an APK like in step 4.) or via updating through Google Play store
------
) End ADB service
Code:
adb kill-server
------
) Finished, disconnect your new phone from your PC
Final notes
Alternatively to changing the the android_id it used to be - and maybe still is? - possible to erase the settings. I haven't tried this and I can't see any real downsides to reusing the android_id. Considering how easy it is to change, I wouldn't consider it a specially protected property.
Thank you for the very good description!
However, when I try to downgrade current Line 7.3.0 I get an error message:
"c:\backup\line\line-old.apk: 1 file pushed. 5.0 MB/s (23629798 bytes in 4.516s)
pkg: /data/local/tmp/line-old.apk
Failure [INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE]
c:\tools>adb backup -f c:\backup\line\line.ab jp.naver.line.android
Now unlock your device and confirm the backup operation...
c:\tools>adb pull /sdcard/Android/data/jp.naver.line.android c:\backup\line\sdcard
/sdcard/Android/data/jp.naver.line.android/: 435 files pulled. 0.7 MB/s (1825753 bytes in 2.469s)!"
So the backup file: line.ab only become 42 bytes.
The Failure message semmes to be something new from Android 6 ?
Is there a way to get around this?
kamoj1 said:
Thank you for the very good description!
However, when I try to downgrade current Line 7.3.0 I get an error message:
"c:\backup\line\line-old.apk: 1 file pushed. 5.0 MB/s (23629798 bytes in 4.516s)
pkg: /data/local/tmp/line-old.apk
Failure [INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE]
c:\tools>adb backup -f c:\backup\line\line.ab jp.naver.line.android
Now unlock your device and confirm the backup operation...
c:\tools>adb pull /sdcard/Android/data/jp.naver.line.android c:\backup\line\sdcard
/sdcard/Android/data/jp.naver.line.android/: 435 files pulled. 0.7 MB/s (1825753 bytes in 2.469s)!"
So the backup file: line.ab only become 42 bytes.
The Failure message semmes to be something new from Android 6 ?
Is there a way to get around this?
Click to expand...
Click to collapse
If u have root the easiest way is
Get old android_id
Backup line with titanium backuo
Put old android_id on new device
Restore line backup
kamoj1 said:
So the backup file: line.ab only become 42 bytes.
The Failure message semmes to be something new from Android 6 ?
Is there a way to get around this?
Click to expand...
Click to collapse
I've looked around and the only way around that message is to uninstall the App. You can uninstall an app and keep it's data with adb, so in theory this should work:
Backup old phone
4) Install old LINE Version:
Code:
adb shell pm uninstall -k jp.naver.line.android
adb install -r -d c:\backup\line\line-old.apk
But fair warning, I haven't tried it myself.
Amazing! Working for me.
Thank you very much for your effort.
Very appreciated.
Hey there, hoping I can get a reply from you in regards to this tutorial.
I had followed everything to the T, made backups and made sure to be careful along the way... upon logging in on my new device, I had to log in via Facebook, wasn't a problem at all, and I was back into my account, however it seems like my chats didn't get moved over at all. On the otherhand, it seems like my stickers were able to be transferred over due to them popping up in my store (unless that's simply due to them being associated with my account).
I'm lucky enough to have root somewhat working (it's slightly broken atm) on my old device, so at least I was able to nandroid backup before attempting to backup/uninstall any data... and am currently attempting to restore back into the backup with hopes that all of my chat data is available as it was before I attempted to transfer.
Currently my root is broken, and cause any backups from TB to show an "insufficient space" error message (unless this is because I am using a PRO apk I found somewhere... maybe I should try another TB apk.
Anyhow, I also ran into the "Failure INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE" which the above member ran into and used your suggested steps which seemed to work for him.
Waiting on your reply! Thanks ahead of time!
Sounds to me like your data wasn't transferred at all. Stickers are indeed bound to your account and remain with it even if you switch from Android to iOS. Unless you had your old phone connected to the internet and used LINE again, the data should be still on that phone. (LINE is deleting it, if it detects you moved to a second phone (or probably changed the android_id?)).
Anyways, trying to pin down your issue: As part of the first steps, you should have created backup files of your chats (line.ab) and your sd card. Did they end up on your PC? line.ab for me was around 40MB and there are plenty of files in the sdcard folder.
Can this method be used for line lite? what modification in the command should I use?
I want full version of it
Any new and easy way to move all line chat logs/chats along with images from a previous device to a new device?
https://help.line.me/line/android/pc?lang=en
desiregeek said:
Any new and easy way to move all line chat logs/chats along with images from a previous device to a new device?
https://help.line.me/line/android/pc?lang=en
Click to expand...
Click to collapse
I am afraid the solution in the link you provided doesn't allow the back-up of media that are older than a few weeks old (The rest of the chats will be backuped though
It looks like that the push command doesn't have the permissions to write anything on last Android versions like 12
Code:
adb push c:\backup\line\sdcard /sdcard/Android/data/
adb: error: failed to copy 'c:\backup\line\sdcard\jp.naver.line.android\.nomedia' to '/sdcard/Android/data/jp.naver.line.android/.nomedia': remote secure_mkdirs failed: Operation not permitted
adb: error: failed to read copy response
This is the main limit on an unrooted phone, I am trying to see if I can do anything repacking those together into the line.ab file which is possible to be restored but missing the other data.

Categories

Resources